Changes for GCC version 2.7.0 from version 2.6.3: Before applying these diffs, go to the directory gcc-2.6.3. Remove all files that are not part of the distribution with the command make distclean Then use the command patch -p1 feeding it the following diffs as input. Delete the following files, which are no longer needed or have been replaced with a file of a different name. config/i386/linuxelf.h config/i386/netbsd-i386.h config/i386/x-linux config/m68k/netbsd-m68k.h config/m88k/mot-sysv4.h config/pa/t-pa-hpux config/pa/x-pa-hiux config/pa/xm-pahiux.h config/sh/ashlsi3.c config/sh/ashrsi3.c config/sh/lshrsi3.c config/t-svr3 cross-test.c fixlimits.h future.options Then rename the directory to gcc-2.7.0, re-run the configure script, and rebuild the compiler. Changes in files you can reconstruct with Bison, etags, makeinfo, and TeX have been omitted. Some of these files are updated just by building the compiler. You can update rest of these files by executing this command make TAGS info dvi in the gcc-2.6.3 directory, provided the necessary tools (etags, makeinfo, TeX and texi2dvi) are installed and you have run configure. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/BUGS gcc-2.7.0/BUGS *** gcc-2.6.3/BUGS --- gcc-2.7.0/BUGS Fri Jan 13 17:40:17 1995 *************** *** 0 **** --- 1,23 ---- + If you think you may have found a bug in GNU CC, please + read the Bugs section of the Emacs manual for advice on + + (1) how to tell when to report a bug, + (2) where to send your bug report, and + (2) how to write a useful bug report and what information + it needs to have. + + There are three ways to read the Bugs section. + + (1) In a printed copy of the GCC manual. You can order one from the + Free Software Foundation; see the file ORDERS. But if you don't have + a copy on hand and you think you have found a bug, you shouldn't wait + to get a printed manual; you should read the section right away as + described below. + + (2) With Info. Start Emacs, do C-h i to enter Info, + then m gcc RET to get to the GCC manual, then m Bugs RET + to get to the section on bugs. Or use standalone Info in + a like manner. (Standalone Info is part of the Texinfo distribution.) + + (3) By hand. Search for the chapter "Reporting Bugs" in gcc.texi, or + cat /usr/local/info/gcc* | more "+/^File: emacs, Node: Bugs," diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ChangeLog gcc-2.7.0/ChangeLog *** gcc-2.6.3/ChangeLog Wed Nov 30 19:14:11 1994 --- gcc-2.7.0/ChangeLog Fri Jun 16 06:56:43 1995 *************** *** 1,7197 **** ! Wed Nov 30 19:13:50 1994 Richard Kenner ! * Version 2.6.3 released. ! Wed Nov 30 19:02:49 1994 Jim Wilson ! * combine.c (record_dead_and_set_regs_1): Handle SUBREGs. ! * expr.c (convert_move): When emit multiword conversion, force FROM ! into a new pseudo-reg if it overlaps TO. ! * fold-const.c (fold_truthop): Delete BIT_AND_EXPR of constants ! with masks. ! Wed Nov 30 18:40:32 1994 Jason Merrill (jason@cygnus.com) ! * alpha.h (ENCODE_SECTION_INFO): Don't do anything in g++. ! Wed Nov 30 15:48:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expr.c (emit_block_move): Only use movstr if size is ! small enough constant or MODE is at least BITS_PER_WORD. ! Tue Nov 29 16:50:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expmed.c (expand_shift): Open-code rotate even if by a variable. ! * optabs.c (init_optabs): Don't set functions for rotl and rotr. ! Mon Nov 28 18:53:06 1994 Dave Love (d.love@dl.ac.uk) ! ! * Makefile.in (FLAGS_TO_PASS): Fix typo in GCC_FOR_TARGET. ! ! Wed Nov 23 17:25:43 1994 Ian Dall (dall@hfrd.dsto.gov.au) ! ! * config/ns32k/{ns32k.c,ns32k.h}: Add -mhimem to ! support linking above 0x20000000 boundary. ! ! * config/ns32k/{netbsd.h,pc532.h, ns32k.c}: Fix meaning ! of BASE_REG_NEEDED. ! ! Wed Nov 23 17:24:24 1994 Matthias Pfaller (leo@marco.de) ! ! * configure (ns32k-pc532-netbsd): No need for fixincludes ! and libgcc1. ! * ns32k/ns32k.h (CONST_COSTS): Correct range is -0x1fff to 0x2000. ! * ns32k/ns32k.md (everywhere): Correct range is -0x1fffffff ! to 0x20000000, others have to be loaded with movd. ! Shortcircuit with TARGET_32532 as early as possible. ! (movsi): Use movd to load unknown symbol values. to allow ! * ns32k/ns32k.c (print_operand): Removed dead code. ! * ns32k/pc532.h (TARGET_DEFAULT): Forbid usage of bitfield ! instructions. ! ! Wed Nov 23 14:09:42 1994 Jim Wilson (wilson@cygnus.com) ! ! * mips.c (mips_output_external): Exclude __builtin_next_arg from list ! of used external functions. ! ! Wed Nov 23 13:30:52 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expr.c (emit_move_insn): If splitting up into individual words ! and X is a push_operand, do the push and reference top of stack. ! ! Tue Nov 22 06:29:21 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * fold-const.c (fold_convert): Don't fold conversion if it would ! produce constant larger than we can support. ! * emit-rtl.c (gen_lowpart_common): Do nothing if size is ! greater than twice host wordsize, not just if equal. ! ! * optabs.c (emit_no_conflict_block): Just emit the insns if ! the block contains something not an INSN or has an embedded block. ! ! Mon Nov 21 18:41:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * varasm.c (output_constant): When eliminating conversions, ! treat ARRAY_TYPE like a record. ! ! * m68k.md (movqi): Fix typo in push/pop case. ! ! Mon Nov 21 17:59:07 1994 David Edelsohn ! ! * aix41.h (LINK_SPEC): New overriding defintion. ! ! Fri Nov 18 19:10:24 1994 Kresten Krab Thorup (krab@next.com) ! ! * objc/object.c (class_create_instance): Replace memchr ! with memset. ! ! Fri Nov 18 18:53:57 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * cccp.c (create_definition): Allow carriage-return ('\r') ! as white space in simple or empty expansion. ! ! Fri Nov 18 18:30:40 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * winnt/ld.c (main): Fix off-by-one error allocating sdbuff. ! ! Fri Nov 18 14:16:04 1994 Chris Huey (cah@tactix.rain.com) ! ! * Makefile.in (objc-parse.y, mostlyclean): Rename temp file ! for objc-parse.y to be under 14 characters. ! ! Thu Nov 17 17:26:02 1994 Mark P. Gooderum (mark@good.com) ! ! * stddef.h: Include on NetBSD. ! Check for _BSD_XXX_T_ as well as _XXX_T_. ! Add _BSD_XXX_T_ to list of defines to check and define for a given ! type for SIZE_T, PTRDIFF_T, and WCHAR_T. ! ! Thu Nov 17 11:11:50 1994 Mike Collison (collison@sw.stratus.com) ! ! * dsp16xx.c (notice_update_cc): Removed reference to obsolete LSHIFT. ! * dsp16xx.h (RTX_COSTS): Likewise. ! ! Thu Nov 17 11:06:43 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * alpha.c (some_operand): New function. ! * alpha.h (PREDICATE_CODES): Add `some_operand'. ! * alpha.md (addsi3, adddi3): For patterns valid only ! during reload, allow operand 1 to be `some_operand'. ! ! * flow.c (find_auto_inc): Insert missing "return" statement. ! ! * c-common.c (print_char_table): Allow `L' for `u'. ! ! Wed Nov 16 19:28:46 1994 Jim Wilson (wilson@chestnut.cygnus.com) ! ! * loop.c (move_movables): For move_insn case, skip notes when deleting ! instructions. ! ! Tue Nov 15 19:29:04 1994 Per Bothner ! ! * tree.c (staticp): A non-nested function is always static. ! ! Tue Nov 15 19:07:00 1994 Warner Losh (imp@village.org) ! ! * i386/freebsd.h (NO_IMPLICIT_EXTERN_C): Define. ! ! Tue Nov 15 18:57:46 1994 Jim Wilson (wilson@chestnut.cygnus.com) ! ! * reorg.c (relax_delay_slots): When invert a conditional jump over a ! single unconditional jump, invert the INSN_FROM_TARGET_P bit of insns ! in the delay slots. ! ! * reorg.c (redundant_insn_p): Change return type to rtx. Return the ! redundant insn instead of true. ! (update_reg_unused_notes): New function. ! (fill_slots_from_thread): Call update_reg_unused_notes after one of ! the redundant_insn_p calls. ! ! Tue Nov 15 18:39:33 1994 Torbjorn Granlund (tege@tiny.cygnus.com) ! ! * expmed.c (expand_divmod, case ROUND_DIV_EXPR): Implement. ! * expr.c (do_jump_by_parts_greater_rtx): No longer static. ! (expand_expr): Delete code for plain `abs'. ! * optabs.c (expand_abs): New function, code moved from expand_expr. ! * expr.h: Declare expand_abs. ! ! Mon Nov 14 19:16:00 1994 Dennis Glatting ! ! * fixincludes: Fixes for NextStep 3.2. Remove ``__const__'' from ! sin and cos prototypes in ansi/math.h. Remove keyword ``template'' ! from bfd/libc.h. Remove ``volatile'' from abort in bsd/libc.h ! and abort and exit in ansi/stdlib.h. ! ! Mon Nov 14 18:54:28 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * i386/x-winnt (EXTRA_PROGRAM): Match target name. ! ! Mon Nov 14 18:48:21 1994 Torbjorn Granlund (tege@tiny.cygnus.com) ! ! * freebsd.h (INCLUDE_DEFAULTS): Move definition beyond ! FREEBSD_NATIVE conditional. ! (FUNCTION_PROFILER): Move down to make file more similar to ! netbsd-i386.h. ! (DEFAULT_TARGET_MACHINE, etc): Comment our this braindamage! ! ! Mon Nov 14 18:46:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * calls.c (expand_call): If IS_CONST and VALREG == 0, end our ! sequence and emit the insns. ! ! Sat Nov 12 06:35:42 1994 Richard Kenner ! ! * Version 2.6.2 released. ! ! Sat Nov 12 06:35:21 1994 Torbjorn Granlund (tege@cygnus.com) ! ! * expmed.c (expand_divmod, case TRUNC_DIV_EXPR): Promote signed ! division by 0x80000000 to unsigned. ! ! Fri Nov 11 17:07:35 1994 Michael Meissner (meissner@osf.org) ! ! * c-common.c (decl_attributes): Add double-underscore version of ! printf and scanf for format type. ! ! Fri Nov 11 16:38:04 1994 Jim Wilson (wilson@chestnut.cygnus.com) ! ! * mips-tdump.c: Include . Delete ctime prototype. ! ! Fri Nov 11 14:16:00 1994 Holger Teutsch ! ! * clipper.md (movsi+1): Allow r->m move during reloading. ! ! Fri Nov 11 12:40:51 1994 Richard Kenner ! ! * c-decl.c (duplicate_decls): Properly merge decls with ! differing DECL_CONTEXT. ! ! * function.c (preserve_rtl_expr_result): find_temp_slot_from_address ! now used. ! Don't bring the temp slot to an inner level than it was. ! (assign_stack_temp): Always initialize p->rtl_expr. ! ! * m68k/mot3300g.h (SPACE_AFTER_L_OPTION): Deleted. ! ! Thu Nov 10 18:50:52 1994 Kresten Krab Thorup (krab@next.com) ! ! * objc/list.h: Add ifndef/define for repeated inclusion. ! ! Thu Nov 10 18:02:58 1994 Michael Meissner ! ! * c-common.c (decl_attributes): Check for attributes with leading ! and trailing double underscores. ! ! Thu Nov 10 17:55:07 1994 Chris Metcalf (metcalf@catfish.lcs.mit.edu) ! ! * fixincludes: Make argument type const for popen and tempnam in ! stdio.h and for strdup in string.h, for OSF/1 V3.0. ! ! * va-alpha.h (va_arg): Add cast to void * to suppress warning. ! ! Thu Nov 10 17:48:21 1994 Walter Misar (hrz.th-darmstadt.de) ! ! * m68k/hp320.h (FUNCTION_{PRO,EPI}LOGUE): Don't define. ! (IMMEDIATE_PREFIX, REGISTER_PREFIX): Define. ! ! Thu Nov 10 15:04:57 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * m68k/crds.h (FUNCTION_{PRO,EPI}LOGUE): Add code to adjust stack ! when no frame pointer. ! * m68k.c (output_function_epilogue): Use a1 as scratch, not a0. ! * m68k/tower-as.h (FUNCTION_{PRO,EPI}LOGUE): No longer defined. ! (FUNCTION_EXTRA_EPILOGUE): Define. ! * m68k/tower.h (REGISTER_PREFIX, IMMEDIATE_PREFIX): Define. ! ! * i386/x-sco, i386/x-sco4 (CLIB): Add -lPW. ! (ALLOCA): Delete. ! ! * c-common.c ({print,scan}_char_table): Allow `L' modifier ! for integer output formats. ! (check_format_info): Treat `ll' like `q'. ! ! * rs6000.md (movsi): In TOC symbol case, use "la" for PowerPC. ! (movdi): Handle TOC symbol just like movsi. ! ! * objc-act.c (init_objc): Add missing casts to args of bcopy. ! (lang_init): Ensure line number is 0, not -1. ! ! Tue Nov 8 07:51:53 1994 Paul Eggert ! ! * cccp.c (dump_single_macro, dump_defn_1): If -traditional, ! dump macros in traditional style. This also avoids a bogus error ! message if the macro uses traditional stringizing. ! ! Mon Nov 7 21:28:13 1994 Michael I Bushnell ! ! * protoize.c [!POSIX]: Only define O_RDONLY and O_WRONLY if not ! already defined. ! ! Mon Nov 7 19:33:31 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * combine.c (try_combine): Update split_code after converting MULT ! to ASHIFT. ! ! Mon Nov 7 12:26:24 1994 Torbjorn Granlund ! ! * rs6000.md (DImode load-with-update matcher): Fix typo in MEM mode. ! (compare patterns): Fix several typos, SImode => CCmode. ! * sh.md (subdi3): Delete % from constraints. ! * 1750a.md (subqi3): Likewise. ! * clipper.md (subdi3): Likewise. ! * i370.md (subqi3): Likewise. ! (anonymous subqi3 matcher): Likewise. ! * i860.md (subdi3): Likewise. ! * dsp16xx.md (mulqi3): Fix typo in MULT mode. ! * elxsi.md (one_cmplsi2): Fix typo in NOT mode. ! ! Mon Nov 7 12:47:37 1994 Ian Lance Taylor ! ! * m68kv4.h (ASM_IDENTIFY_GCC): Use proper definition for SGS assembler. ! ! Mon Nov 7 11:02:25 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * gcc.c (process_command): Ignore LIBRARY_PATH and LPATH if ! cross-compiler. ! ! Sun Nov 6 07:23:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * cross-test.c (foo): Return value for BU in range for shifts. ! ! Sat Nov 5 14:25:36 1994 Jim Wilson (wilson@chestnut.cygnus.com) ! ! * m68k.h (PREFERRED_RELOAD_CLASS): FP constants rejected by 'G' ! are OK for class FP_REGS. ! ! Sat Nov 5 14:08:31 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * calls.c (store_one_arg): Preserve any temp slots whose address ! may have been taken. ! ! * real.c (GET_REAL, PUT_REAL): Cast args to bcopy to char *. ! * reload1.c (reload): Likewise. ! * i386.c ({save,restore}_386_machine_status): Likewise. ! * reg-stack.c (subst_asm_stack_regs): Likewise. ! (BLOCK_NUM): Rework to avoid cast of abort to int *. ! (find_blocks): Don't use BLOCK_NUM on lhs. ! (reg_to_stack, record_arg_reg_life): Cast arg to bzero to char *. ! ! Sat Nov 5 08:29:45 1994 Paul Eggert ! ! * cccp.c (rescan): Do not preserve newlines after macro name ! if rescanning a macro expansion. Instead, preserve them if ! not outputting marks. ! ! Fri Nov 4 17:25:29 1994 John David Anglin (dave@hiauly1.hia.nrc.ca) ! ! * vax.c: Include tree.h and VMS-specific functions #ifdef VMS_TARGET. ! * vms.h (VMS_TARGET): Define. ! ! Fri Nov 4 17:19:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * bi-arity.c (main): Cast enum to char in output. ! * bc-emit.c (bc_emit_bytecode): Add missing cast. ! ! Thu Nov 3 18:55:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * Makefile.in (c-parse.o, c-lex.o): c-parse.h is in $(srcdir). ! ! Thu Nov 3 18:11:56 1994 John F Carr (jfc@mit.edu) ! ! * rs6000.md (movsi): New alternative for SYMBOL_REF source operand. ! * rs6000.c (print_operand): New code '*' to print TOC register number. ! (input_operand): Allow address of TOC entry. ! * rs6000.h (EXTRA_CONSTRAINT): 'R' matches a SYMBOL_REF for TOC entry. ! (PRINT_OPERAND_PUNCT_VALID_P): Recognize '*'. ! (PREDICATE_CODES): input_operand can now match SYMBOL_REF. ! ! Thu Nov 3 18:03:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * cccp.c: TOOL_INCLUDE_DIR is not C++-aware. ! ! Thu Nov 3 17:23:30 1994 Jim Wilson (wilson@chestnut.cygnus.com) ! ! * mips.c (mips_output_external): Exclude alloca from list of ! used external functions. ! ! Tue Nov 1 19:19:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * Version 2.6.1 released. ! ! Tue Nov 1 18:51:00 1994 Torbjorn Granlund (tege@cygnus.com) ! ! * pa.md (add_high_const): Add missing mode for PLUS. ! ! Tue Nov 1 18:39:53 1994 Stephen L Moshier (moshier@world.std.com) ! ! * cse.c (simplify_unary_operation, case TRUNCATE): Set LV and HV. ! ! Tue Nov 1 18:36:23 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * vax.c (struct extern_list): Put code back outside of #ifdef VMS. ! (vms_check_external, vms_flush_pending_externals): Likewise. ! ! Mon Oct 31 16:18:12 1994 Michael Meissner ! ! * i386/i386.md (movsf, movdf, movxf): If we are moving floating ! point constants to a non-memory location that aren't 0 or 1, ! assume we need the pic register if -fpic. ! ! Mon Oct 31 13:26:45 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * sparc.h (GO_IF_LEGITIMATE_ADDRESS): Don't allow TFmode LO_SUM. ! * sparc.md (movtf+3): Disable pattern. ! ! Mon Oct 31 08:11:47 1994 Doug Evans ! ! * expr.c (expand_expr, COND_EXPR case): Don't use original target as ! a temp if it's a volatile mem ref. Finish previous patch (don't ! expand "X ? A & 1 : A" as "A & (X != 0)"). ! ! Mon Oct 31 08:07:09 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * vax.c: Include tree.h #ifdef VMS. ! (struct extern_list): Move inside #ifdef VMS; add SIZE and IN_CONST ! fields; make `extern_head' static; add second list head. ! (vms_check_external): Move inside #ifdef VMS; give new args; maintain ! list of both pending external symbols and previously defined ones. ! (vms_flush_pending_externals): New function. ! * vax/vms.h (ASM_GLOBALIZE_LABEL): Pass new args to vms_check_external. ! (ASM_OUTPUT_EXTERNAL): Just call vms_check_external. ! (ASM_{,FINISH_}DECLARE_OBJECT_NAME, ASM_FILE_END): Define. ! ! Mon Oct 31 08:00:59 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at) ! ! * pdp11.h (TARGET_SWITCHES): Add -split and -no-split. ! (TARGET_SPLIT, TARGET_NOSPLIT): New macros. ! (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Abort if -split. ! ! Mon Oct 31 07:53:34 1994 Warner Losh ! ! * i386/x-freebsd (CLIB): Add definition. ! ! Mon Oct 31 07:49:17 1994 Jeffrey A Law ! ! * reorg.c (mark_set_resources): Properly handle SUBREGs. ! ! Mon Oct 31 07:24:32 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expr.c (expand_expr, case COMPONENT_REF): Don't extract ! field from a CONSTRUCTOR if it already has a TREE_CST_RTL. ! (expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken ! on the temporary made when operand needs to be stored into memory. ! * function.c (preserve_temp_slots): Preserve anything whose ! address was taken when X is zero. ! ! Sun Oct 30 15:11:51 1994 Richard Kenner ! ! * msdos/top.sed, i386/config-nt.sed: Update version to 2.6.1. ! * pa/t-pa-hpux: Add missing newline at end. ! ! Sat Oct 29 21:16:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * emit-rtl.c (operand_subword): Fix typo: HOST_BITS_PER_INT ! should be HOST_BITS_PER_WIDE_INT. ! ! Fri Oct 28 19:13:13 1994 Andrew McCallum (mccallum@vein.cs.rochester.edu) ! ! * objc/misc.c (__objc_xcalloc): Use calloc instead malloc/bzero. ! ! Fri Oct 28 19:07:53 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at) ! ! * pdp11.h (TRAMPOLINE_SIZE): Install real implementation. ! (INITIALIZE_TRAMPOLINE, TRAMPOLINE_TEMPLATE): Likewise. ! ! Fri Oct 28 19:01:27 1994 Craig Burley (burley@gnu.ai.mit.edu) ! ! * Makefile.in (stage?-start): Add semicolon between fi and done. ! ! Fri Oct 28 17:12:26 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * cse.c (cse_insn): Don't record a DEST if paradoxical SUBREG ! and SRC is a SIGN_EXTEND or ZERO_EXTEND. ! ! * alpha.md (reload_outqi): Correctly handle scratch assignments ! for unaligned case when ADDR is a REG. ! ! Fri Oct 28 07:55:40 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.md (adddi3): Fixup code in case operands[0] is equal ! to operands[2]. ! ! Thu Oct 27 18:58:39 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (count_possible_groups): Fix typo in setting ! counted_for_groups. ! ! Thu Oct 27 15:30:41 1994 Per Bothner ! ! * c-typeck.c (process_init_element): In the case of ! [LO .. HI] = VALUE, use save_expr to only evaluate VALUE once. ! ! Thu Oct 27 15:15:25 1994 Torbjorn Granlund (tege@rtl.cygnus.com) ! ! * gcc.c (process_command): Don't forget to split -Wl arguments at ! commas. ! ! * gcc.c (process_command): Handle -Wl, and -Xlinker similar to -l, ! i.e., preserve their order with respect to linker input files. ! ! Thu Oct 27 13:11:16 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * configure (i[345]86-*-winnt3*): Allow any version 3.x. ! Don't use a t-winnt file and move x-winnt to config/i386. ! * i386/x-winnt: Build ld-winnt.exe only on host. ! * winnt/t-winnt: Deleted. ! ! Thu Oct 27 13:05:16 1994 Mike Collison (collison@chianti.sw.stratus.com) ! ! * reload.c (debug_reload): New function to print reload info ! set up by find_reloads. ! ! Wed Oct 26 18:27:03 1994 David Mosberger-Tang ! ! * alpha.h (FUNCTION_PROFILER): Use $28 instead of $27. ! (LINK_SPEC): Pass -pg to linker. ! (LIB_SPEC): Link in -lprof1 with -pg, not -lprof2. ! (STARTFILE_SPEC): USe gcrt0.o if -pg, not mcrt0.o. ! ! Wed Oct 26 18:22:34 1994 Doug Evans (dje@cygnus.com) ! ! * expr.c (expand_expr, COND_EXPR case): Don't expand ! "X ? A & 1 : A" as "A & (X != 0)". ! ! Wed Oct 26 18:06:52 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * winnt/ld.c (expand_lib, main): Fix off-by-one bugs in several ! calls to malloc. ! ! Wed Oct 26 22:00:09 1994 Richard Kenner ! ! * winnt/t-winnt: Remove some spurious blank lines. ! ! Wed Oct 26 14:14:39 1994 Michael Meissner (meissner@osf.org) ! ! * i386/osfrose.h (REAL_NM_FILE_NAME): Use /usr/ccs/gcc/bfd-nm ! instead of /usr/ccs/bin/nm, since the GNU nm does not output stab ! symbols by default. ! ! Wed Oct 26 13:47:06 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at) ! ! * config.sub (pdp11): New machine name. ! * configure (pdp11-*-*): New configuration. ! * pdp11.c, pdp11.h, pdp11.md, xm-pdp11.h: New files. ! ! Wed Oct 26 07:33:40 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * flow.c (find_basic_blocks): Ensure each live basic block is ! actually reachable. ! (life_analysis): Clean up handling of basic_block_drops_in. ! ! Tue Oct 25 18:40:12 1994 Paul Eggert ! ! * cccp.c (rescan): ".." no longer terminates a preprocessing ! number, since that's incompatible with the C standard. ! ! Tue Oct 25 16:16:40 1994 Michael Dobson (dobson@info.usuhs.mil) ! ! * we32k.h (CPP_PREDEFINES): Define u3b2, not u3b. ! ! Tue Oct 25 16:15:27 1994 Jim Wilson (wilson@cygnus.com) ! ! * reorg.c (fill_slots_from_thread): Update THREAD if it is split. ! ! Mon Oct 24 00:12:46 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * toplev.c (lang_options): Add -f{no-,}access-control. ! ! Mon Oct 24 06:14:03 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * arm/arm.md (peepholes for call followed by branch): Disable. ! ! Sun Oct 23 08:54:27 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * arm/x-riscix (INSTALL): Invoke install.sh with -c flag. ! ! Fri Oct 21 00:42:08 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * Makefile.in (LIB2FUNCS): Add _pure. ! ! * libgcc2.c (__pure_virtual): New function to go into vtable ! entries for pure virtual methods instead of abort. ! ! Thu Oct 20 18:40:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * alpha.md (define_split comparison op with power of two minus 1): ! Fix typo. ! ! Thu Oct 20 13:14:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * collect2.c (add_to_list): Check for duplicates. ! ! * alpha/alpha.h (LINK_SPEC): Pass -shared through; don't ! pass -init __main if -shared. ! (STARTFILE_SPEC): Wrap startfiles in %{!shared:}. ! (INIT_NAME_FORMAT): Define. ! (FINI_NAME_FORMAT): Define. * alpha/osf12.h (LINK_SPEC): Ditto. ! * alpha/gdb-osf12.h: #include osf12.h instead of alpha.h ! ! * gcc.c (STARTFILE_SPEC): Wrap startfiles in %{!shared:}. ! ! Thu Oct 20 16:07:46 1994 Jim Wilson (wilson@cygnus.com) ! ! * unroll.c (loop_iterations): Move all failure exits after the ! computation of final_value. ! ! * mips.md (movdf_internal2+1): Disable when TARGET_64BIT. ! ! * i960.c (VARARGS_STDARG_FUNCTION): New macro. ! (i960_function_name_declare, output_function_profiler, ! i960_function_epilogue, i960_output_call_insn, i960_output_ret_insn, ! i960_reg_parm_stack_space): Use it. ! (compute_frame_size): Don't use current_function_pretend_args_size. ! (i960_function_arg_advance, i960_function_arg): Don't use parameter ! named. ! (i960_setup_incoming_varargs): No need to adjust first_reg_offset ! after setting it. Don't save last named argument to stack. ! Don't set pretend_size. ! * i960.h (SIGNED_CHAR_SPEC): Use #if instead of ?:. ! * va-i960.h (va_start): Use builtin_arts_info instead of ! builtin_next_arg. ! ! * cse.c (merge_equiv_classes, cse_insn): Call rehash_using_reg ! after insert_regs. ! (canon_hash): Don't use qty_const to compute hash code for a ! register. ! ! Thu Oct 20 09:41:51 1994 Richard Kenner (kenner@vlsi1.ultra.nyu) ! ! * stor-layout.c (variable_size): Return SIZE if it contains ! a PLACEHOLDER_EXPR. ! ! Tue Oct 18 19:51:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * collect2.c (main): Check REAL_*_FILE_NAME first. ! ! Wed Oct 19 15:55:15 1994 David J. MacKenzie ! ! * config.sub: Add licensing exception for Autoconf. ! ! Wed Oct 19 06:43:46 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.h (FUNCTION_BLOCK_PROFILER): Don't bother preserving ! eax if -fpic, since it is a call clobbered register anyway. Fix -fpic ! code so that it is correct. ! ! Tue Oct 18 18:00:23 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Move ! macros here from osfrose, netbsd, and freebsd ports. Remove ! assumptions that the assembler is gas. Rewrite and fix the ! instructions produced with -fpic. ! ! * i386/osfrose.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Delete. ! * i386/freebsd.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Delete. ! * i386/netbsd-i386.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): ! Delete. ! ! Tue Oct 18 20:27:29 1994 Doug Evans (dje@cygnus.com) ! ! * sparc.h (FRAME_POINTER_REQUIRED): Require frame pointer if ! non-leaf flat function. ! * sparc.c (sparc_frame_info): Combine members gp_sp_offset and ! fp_sp_offset into reg_offset. All uses changed. ! (RETURN_ADDR_REGNUM): New macro. ! (RETURN_ADDR_MASK, FRAME_POINTER_MASK): New macros. ! (sparc_flat_compute_frame_info): Rename local mask to gmask. ! Only ensure reg save area is 8 byte aligned if necessary. ! (sparc_flat_save_restore): New arguments base_reg, offset, gmask, ! and fmask. All callers changed. No longer use %g2 to save regs ! in big stack frames. ! (sparc_flat_output_function_prologue): Delete local tsize. ! Reorder storing of previous frame pointer and return address reg to ! make it easier for gdb to identify flat functions. Decrement %sp ! twice when saving call-saved regs in big frames. ! Count fp regs as 4 bytes in assembler comment. ! (sparc_flat_output_function_epilogue): Likewise when restoring ! call-saved regs. ! ! Tue Oct 18 19:33:55 1994 Mike Collison (collison@sw.stratus.com) ! ! * reload1.c (reload): Correctly compute group additional needs when ! the return register cannot be used as a spill register. ! ! Tue Oct 18 16:17:26 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * mips.h (ASM_SPEC): Pass -mcpu= option to GNU as. ! ! Tue Oct 18 08:39:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * flow.c (propagate_block): Call mark_used_regs to show global regs ! used by call. ! * combine.c (can_combine_p): Don't combine into CALL_INSN where ! DEST is a global reg. ! ! * c-decl.c (start_function): Save immediate_size_expand ! and initialize it to zero in case nested function. ! ! * pa.c (non_hard_reg_operand): New function. ! * pa.md (reload_{in,out}*): Replace general_operand with ! non_hard_reg_operand. ! ! Fri Oct 14 18:35:30 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * gcc.c (default_compilers): Treat files with an extension of .c++ ! as C++ code. ! ! Mon Oct 17 19:21:57 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * configure (rs6000-ibm-aix4.1*): New configuration. ! * rs6000/aix41.h: New file. ! ! Mon Oct 17 19:15:14 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * va-mips.h (va_arg): Add little endian mips3 support. ! ! * sparc.h (RETURN_IN_MEMORY): Return true for TCmode values. ! ! * README.IRIX5: Delete. ! * install.texi: Update Irix 5 debugging info. ! ! * mips.c (function_prologue): Only emit line number when SDB_DEBUG. ! ! * configure: Delete new argument, --noguess. Default build from ! host if host specified, otherwise guess build. Fix typo in ! setting build from host. ! ! Mon Oct 17 15:54:56 1994 Per Bothner ! ! * calls.c (expand_call, emit_library_call, emit_library_call_value): ! Allways adjust current_function_outgoing_args_size, even #ifndef ! ACCUMULATE_OUTGOING_ARGS. (Useful for stack overflow checking.) ! * function.c (current_function_outgoing_args_size): Update comment. ! ! Mon Oct 17 18:49:01 1994 Paul Eggert ! ! * cccp.c (rescan): Preserve newlines after macro names at the top level ! since this is more likely to do the right thing with line numbers. ! ! Mon Oct 17 11:31:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (gen_reload): Renamed from gen_input_reload. ! (emit_reload_insns): Delete SECONDARY_MEM_NEEDED case for input ! reloads that can't happen and doesn't work. ! Fix errors in use of reload_outxx insns. ! Simplify output reload code by using gen_reload. ! * reload.h (gen_reload): Renamed from gen_input_reload. ! ! Mon Oct 17 09:26:57 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * unroll.c (copy_loop_body, case JUMP_INSN): Don't abort if invert_exp ! fails. Instead, redirect the jump around an unconditional branch. ! ! Sun Oct 16 05:02:23 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * emit-rtl.c (add_insn_{before,after}): Don't abort because AFTER was ! deleted when not optimizing. ! ! Fri Oct 14 19:26:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa.c (emit_move_sequence): Handle secondary reload when loading ! a constant into SAR. ! ! Fri Oct 14 10:29:31 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * fixincludes: Fix X11/Intrinsic.h for RISCiX to remove ___type from ! XtOffset. ! Add all files that receive special attention to REQUIRED, so that ! dependent copies are done if necessary. ! ! * getpwd.c: Always use getwd if HAVE_GETWD is defined. ! * arm/xm-arm.h: Define HAVE_GETWD. ! ! * arm/x-riscix, arm/t-riscix: New files ! * configure (arm-*-riscix*): Use them. ! ! Thu Oct 13 17:12:27 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * i960.md (call, call_internal, call_value, call_value_internal): ! Use memory_operand not general_operand. ! ! * optabs.c (expand_fix): Correct typo with FIX/UNSIGNED_FIX ! REG_NOTES. ! ! Thu Oct 13 10:44:32 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * genattrtab.c (optimize_attrs): Don't do anything if ! num_insn_ents is zero. ! ! Wed Oct 12 19:06:48 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * mips/mips.c (mips_expand_prologue): Handle types that need ! constructing. Rename TYPE to PASSED_TYPE and use consistently. ! ! Wed Oct 12 11:32:05 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * genattrtab.c (num_insn_ents): New static variable. ! (remove_insn_ent): Decrement num_insn_ents. ! (insert_insn_ent): Increment num_insn_ents. ! (optimize_attrs): Use xmalloc to allocate all the attr_value_list ! structures at once, rather than using alloca for each one. ! ! Wed Oct 12 09:17:34 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * optabs.c (??hf2_libfunc): Define like ??sf2_libfunc. ! (emit_float_lib_cmp): Call HFmode library functions. ! (init_optabs): Set names for HFmode comparison functions. ! * expr.h (??hf2_libfunc): Add declarations, like ??sf2_libfunc. ! ! Tue Oct 11 19:20:48 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * winnt/ld.c (main): Pass -debug:full -debugtype:coff. ! * winnt/t-winnt: Rework rules for ld. ! * i386/config-nt.bat: Renamed from config/i386/config-winnt.bat. ! Make specific for x86, not all winnt; change filenames. ! * i386/config-nt.sed: Remove -g from CFLAGS. ! Reflect changes to t-winnt and other minor changes. ! * i386/x-winnt: Renamed from winnt/x-winnt. ! * i386/config-nt.sed: Renamed from config/winnt/top.sed. ! ! Tue Oct 11 18:40:41 1994 Peter Schauer (Peter.Schauer@regent.e-technik.tu-muenchen.de) ! ! * rs6000.h (ASM_DECLARE_FUNCTION_NAME): Always put out .lglobl ! for static functions. ! ! Mon Oct 10 19:19:51 1994 Alex T. Ramos (ramos@engr.latech.edu) ! ! * expr.c (convert_move): Add TImode conversions. ! ! Mon Oct 10 18:46:44 1994 Alex Dreyzen (alex@alex.jf.intel.com) ! ! * optabs.c (expand_float): Copy TEMP to TARGET when ! making recursive call and adjusting. ! ! Mon Oct 10 07:10:25 1994 Michael Meissner (meissner@osf.org) ! ! * i386/linux.h (DEFAULT_PCC_STRUCT_RETURN): Do not define as 0 if ! LINUX_ELF is defined. ! (perform.h): Include perform.h to define asm statements to use for ! libgcc1.a builds. ! ! * i386/linuxelf.h (DEFAULT_PCC_STRUCT_RETURN): Define as 1. ! (RETURN_IN_MEMORY): Don't define. ! ! Sun Oct 9 11:49:20 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.md (movsf_mem): Add & constraint, so that the scratch ! register does not clobber the destination address. ! ! Sun Oct 9 12:40:43 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * arm.md (reload_outdf): Don't call gen_addsi3 if the address is just ! a register. ! ! Sat Oct 8 11:16:50 1994 Doug Evans (dje@cygnus.com) ! ! * objc/archive.c (__objc_free): New function. ! (__objc_finish_read_root_object): Use it. ! ! Fri Oct 7 19:23:03 1994 J.T. Conklin (jtc@cygnus.com) ! ! * ginclude/stddef.h: Netware uses _SIZE_T_DEFINED_, _WCHAR_T_DEFINED_. ! ! Fri Oct 7 12:45:43 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.c (legitimate_address_p): Disable SUBREGs as either ! the index or base register. ! ! Fri Oct 7 08:24:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * i386/gnu.h (CPP_PREDEFINES): Define __HURD__. ! ! * collect2.c (my_strerror): If HAVE_STRERROR defined, call strerror. ! * xm-gnu.h (HAVE_STRERROR): Define. ! ! * function.c (preserve_temp_slots): If X cannot be a temp ! slot, preserve all things whose address was taken at the ! present level. ! ! * function.c (assign_stack_temp): Abort if SIZE == -1. ! ! * expr.c (safe_from_p): If EXP has a variable size, assume safe. ! (preexpand_calls): Don't preexpand a call that returns a variable- ! sized object. ! ! * emit-rtl.c (add_insn_{after,before}): Fix error in last change. ! ! Thu Oct 6 09:18:28 1994 Kresten Krab Thorup (krab@next.com) ! ! Adam Fedor (fedor@hopper.colorado.edu) ! * objc/archive.c (__objc_finish_read_root_object): Delay freeing ! of back-patch list. ! ! Andrew McCallum (mccallum@cs.rochester.edu) ! * objc/objc.h (BOOL): Changed from char to unsigned char. ! ! Thu Oct 6 08:17:04 1994 Stan Cox (coxs@dg-rtp.dg.com) ! ! * m88k/m88k.c (emit_move_sequence): If operand1 is an invalid PIC ! address, then legitimize it before doing anything else. ! Thu Oct 6 06:54:03 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (cse_insn): Don't call force_const_mem on (const (truncate)). ! * expr.c (store_expr): Don't clobber TEMP with address. ! * reorg.c (try_merge_delay_insns): Update THREAD if it is split. ! * function.c (struct temp_slot): New field addr_taken. ! (assign_stack_temp): Initialize it. ! (mark_temp_addr_taken): New function. ! (preserve_temp_slots): Decrement level of things at same level ! but whose address has been taken. ! * expr.c (expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken. ! Wed Oct 5 14:17:39 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * fold-const.c (fold, COMPONENT_REF): Don't die if the CONSTRUCTOR ! doesn't initialize the field we want. ! Wed Oct 5 11:38:48 1994 Michael Meissner (meissner@osf.org) ! * i386/i386.c (legitimize_pic_address): Changes to support ! LABEL_REF references when using -fpic. ! (output_pic_addr_const): Ditto. ! (print_operand_address): Ditto. ! * i386/i386.md (movsi insn): Changes to support LABEL_REF ! references when using -fpic. ! (movsi_lea): Name insn supporting lea instruction so it shows up ! more clearly when doing -dp. ! Wed Oct 5 06:56:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reorg.c (try_merge_delay_insns): Update THREAD if deleting first ! insn in it. ! Wed Oct 5 01:19:14 1994 Roland McGrath ! * configure (i[345]86-*-gnu*): Set xm_file=i386/xm-gnu.h. ! * config/i386/xm-gnu.h: New file. ! * config/xm-gnu.h: New file. ! * config/i386/gnu.h: Move #include out of here, into ! config/xm-gnu.h. ! Tue Oct 4 23:19:28 1994 Michael Meissner ! * protoize.c (POSIX includes): If POSIX is defined, include ! sys/wait.h to get WIFSIGNALED, WTERMSIG, WIFEXITED, and ! WEXITSTATUS. ! Tue Oct 4 21:48:02 1994 Michael I Bushnell ! * config/i386/gnu.h: Include to get O_RDONLY definition. ! * gcc.c (O_RDONLY): Define macro iff not already defined. ! (read_specs): Second arg to open should be O_RDONLY, not constant 0. ! ! Tue Oct 4 19:06:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expr.c (do_jump_for_compare): Properly scan insns when ! branch is at start of sequence. ! ! Tue Oct 4 16:53:54 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * gcc.c, collect2.c, protoize.c (WIFSIGNALED): Define if not ! already defined. ! (WTERMSIG, WIFEXITED, WEXITSTATUS): Likewise. ! * gcc.c (execute): Use them. ! * collect2.c (do_wait): Likewise. ! * protoize.c (gen_aux_info_file): Likewise. ! ! Tue Oct 4 16:38:06 1994 Michael Meissner ! ! * i386/i386.h (RETURN_IN_MEMORY): Define so that large types such ! as complex double values get returned like structures do, and ! don't overwrite %ebx. ! ! Tue Oct 4 15:58:21 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! ! * lynx-ng.h, lynx.h (PREFERRED_DEBUGGING_INFO): Add undef before ! define. ! ! Tue Oct 4 05:12:02 1994 Richard Stallman ! ! * config.sub: Translate -gnu/linux* to -linux*. ! ! Mon Oct 3 11:43:45 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * config.sub: Add support for MIPS variants: mips64, mipsel, ! mips64el, mips64orion, mips64orionel, mips3*. ! ! Sun Oct 2 18:26:34 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * function.c (push_function_context_to): Renamed from ! push_function_context, adds argument to indicate that the new ! function is not a nested function. ! (push_function_context): Call it. ! (pop_function_context{,_from}): Similarly. ! ! * tree.c (save_tree_status): Add argument to indicate that the new ! function is not a nested function. ! (restore_tree_status): Ditto. ! ! Sun Oct 2 18:05:37 1994 Doug Evans (dje@cygnus.com) ! ! * configure (i[34]86-*): Change to i[345]86-*. ! (target_cpu_default): Treat i586 as an i486 (for now). ! ! Sun Oct 2 10:25:51 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * arm.md (movsf): If reloading, create a scratch from the target for ! loading a constant into integer regs. ! (movdf): Likewise. ! ! Support for variants that fault on unaligned addrs: ! * arm.h (TARGET_SHORT_BY_BYTES): New macro. ! (TARGET_SWITCHES): Recognize switches -m[no-]short-load-bytes. ! (TARGET_DEFAULT): Only define if not already done so. ! (PROMOTE_MODE): Promote HImode unsigned if TARGET_SHORT_BY_BYTES. ! (SECONDARY_INPUT_RELOAD_CLASS): Need a scratch for reloading HImode if ! TARGET_SHORT_BY_BYTES. ! * arm.c (arm_reload_in_hi): New function. ! * arm.md (zero_extendhisi2, extendhisi2): Expand to suitable byte ! sequence when TARGET_SHORT_BYTES and loading a mem. ! (movhi_bytes, extendhisi2_mem): New expands. ! (movhi): Call movhi_bytes to load a short from memory if ! TARGET_SHORT_BY_BYTES. ! (all matchers loading a short from memory): Don't match if ! TARGET_SHORT_BY_BYTES. ! (matcher for movhi when TARGET_SHORT_BY_BYTES): New pattern to cover ! remaining valid cases. ! ! Sun Oct 2 08:54:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reg-stack.c (subst_stack_regs): Check for NOTE to see if insn was ! deleted. ! ! * reorg.c (fill_slots_from_thread): Update THREAD if deleting ! its first insn. ! ! * reg-stack.c (delete_insn_for_stacker): Don't set INSN_DELETED_P ! on NOTE_INSN_DELETED. ! ! Sat Oct 1 20:42:33 1994 Chip Salzenberg ! ! * sco4.h (CPP_PREDEFINES): Remove i386, unix. ! (CPP_SPEC): Add them here, so that they're undefined if -ansi. ! Also add _i386 and _unix, which are always defined. ! * x-sco (CLIB): Add "-lmalloc". ! (ALLOCA): Define as "-lPW". ! * x-sco4 (CC, OLDCC, RCCFLAGS, CCLIBFLAGS, CLIB, ALLOCA): From x-sco. ! (X_CFLAGS): Remove. ! ! Sat Oct 1 14:27:45 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.md (movsf_push386): Rename to movsf_push_nomove. ! (movdf_normal): Prefer to use float registers rather than general ! purpose registers. ! ! Sat Oct 1 07:01:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! ! * c-decl.c (shadow_label): Emit an error if the label is already ! declared at this label scope. ! ! Sat Oct 1 06:44:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * emit-rtl.c (add_insn_{before,after}): Abort if insertion point is ! a deleted insn. ! * jump.c (jump_optimize): When deleting a jump, properly set NEXT. ! (duplicate_loop_exit_test): Don't insert NOTE_INSN_LOOP_VTOP ! before deleted insn; insert first, then delete. ! ! * gcc.c: Install omitted hunk from last diff. ! ! Fri Sep 30 18:26:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * emit-rtl.c (add_insn_after): Abort if can't find AFTER and it ! has no NEXT_INSN. ! (add_insn_before): New function. ! (emit_{insn,insns,jump_insn,call_insn,barrier,note}_before): Call it. ! ! Fri Sep 30 17:33:41 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * config.sub (windowsnt): Alias for winnt. ! (winnt): New OS name. ! * configure (extra_programs): New, like extra_parts. ! (i[34]86-*-winnt3.1): New configuration. ! * genattr.c (atoi): Remove declaration. ! * getpwd.c: #ifdef WINNT, include direct.h. ! * sdbout.c: Don't include syms.h for winnt. ! * toplev.c: Don't include times.h for winnt. ! (get_run_time): Just return zero for winnt. ! (main): Don't print memory usage for OS/2 or winnt. ! * cccp.c (main): Use DIR_SEPARATOR if defined. ! Use "Include" environment variable instead of CPATH for winnt. ! * gcc.c: Don't include sys/file.h for winnt; use process.h instead. ! (concat): Now just concats two things; all callers changed. ! (concat[346]): New functions. ! (dir_separator_str): New variable. ! (exec_prefixes, startfile_prefixes, include_prefixes): Renamed ! from same names without plural; all users changed. ! (find_a_file, process_command, do_spec_1): Use DIR_SEPARATOR. ! (find_file, is_directory, main): Likewise. ! (lookup_compiler): If OS/2, do case-independent search. ! (fix_argv): New function on winnt. ! (FIX_ARGV): New macro for some systems; use instead of argv. ! * i386/unix.h: Treat ALMOST_STDC like __STDC__. ! (AS2C): New macro. ! * i386.c (output_387_binary_op): Use AS2C instead of AS2 with ! null first arg. ! * config/winnt/config-nt.bat, config/winnt/ld.c: New files. ! * config/winnt/{[tx]-winnt, config/winnt/top.sed: New files. ! * config/winnt/winnt.h, config/winnt/xm-winnt: New files. ! * i386/winnt.h, i386/xm-winnt.h: New files. ! ! Thu Sep 29 19:53:14 1994 Jim Wilson (wilson@cygnus.com) ! ! * sparc.md (movdf+3): Handle overlapping registers in define_split. ! ! * gcc.c (default_compilers): Add %Z to all cpp specs. ! (n_preprocessor_options, preprocessor_options): New variables. ! (process_command): Handle -Wp option. ! (do_spec_1): Handle %Z spec. ! ! * i960/i960-coff.h: New file. ! * t-960bare: New file. ! * config.sub (os): Accept coff as an OS. ! * configure (i960-*-coff): New configuration. ! ! * expr.c (result_vector): Use INCOMING_REGNO when !savep instead ! of when savep. ! * sparc.md (call): Use struct value pattern is struct size is not ! equal to zero instead of greater than zero. ! (call+7, call+8): New patterns for untyped calls. ! (untyped_call): Revise to emit explicit rtl for all operation. ! Delete four old patterns that matched the unexpanded untyped_call ! pattern. ! (blockage): New pattern. ! (flush_register_windows): Modify from 0 to 1. ! (goto_handler_and_restore): Modify from 1 to 2. ! (flush): Modify from 2 to 3. ! * sparc.c (sparc_initialize_trampoline): FLUSH is now 3 not 2. ! ! * calls.c (emit_library_call): For FUNCTION_ARG_PASS_BY_REFERENCE, ! pass address through force_operand before using it. ! ! * i960.c (i960_setup_incoming_varargs): Store parameter registers ! at proper offset in argument block. ! ! Thu Sep 29 16:39:32 1994 Mike Stump ! ! * stmt.c (expand_return): We have to be careful of cleanups that can ! be generated when expanding the return value, as they might otherwise ! wipe out the return value. ! ! Thu Sep 29 13:35:24 1994 Mike Stump ! ! * expr.c (do_jump): Handle cleanups in TRUTH_ANDIF_EXPR and ! TRUTH_ORIF_EXPR. ! ! Thu Sep 29 13:23:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * gcc.c (struct option_map): Sort in alphabetical order. ! (translate_options): Ignore option once an error occurs. ! Fix error with reversed 'a' and 'o'. ! Give error if specified abbreviation is unambiguous. ! ! * c-typeck.c (convert_for_assignment): When converting object ! to union, allow converting the constant zero into a pointer ! member of the union. ! ! Wed Sep 28 19:33:01 1994 Alex T Ramos (ramos@engr.latech.edu) ! ! * machmode.def (PSImode): Widens to PDImode. ! * expr.c (convert_move): Added handling of PDImode conversions. ! ! Wed Sep 28 19:24:17 1994 H.J. Lu (hjl@nynexst.com) ! ! * configure: Don't make objc-runtime if cross-compiling gcc. ! * build-make (FIXINCLUDES): Set to Makefile.in. ! ! Wed Sep 28 19:18:19 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * function.c (trampoline_address): Add missing call to ! round_trampoline. ! ! Wed Sep 28 18:34:13 1994 Michael Meissner (meissner@osf.org) ! ! * config/svr4.h (ESCAPES): Print \v in octal rather than as '\v', ! since some older versions of gas didn't accept it. ! ! Wed Sep 28 14:29:20 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Comment out loop which handles symbolic links to ! files. It appears to not work, and to be unnecessary. ! ! Tue Sep 27 19:27:56 1994 Matthias Pfaller (leo@marco.de) ! ! * ns32k.h (ENCODE_SECTION_INFO): Only calls may go through the ! PLT. All address loads, even function address loads, have to ! go through the GOT or function addresses will not be unique. ! ! Tue Sep 27 19:20:12 1994 Paul Eggert (eggert@twinsun.com) ! ! * cccp.c (newline_fix, name_newline_fix): Don't treat \r ! specially here; it only causes bugs. This undoes the ! May 14 16:01:13 1990 change to newline_fix and name_newline_fix. ! ! Tue Sep 27 19:02:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * m88k.h (ASM_OUTPUT_SOURCE_LINE): Add missing #undef. ! ! Tue Sep 27 18:32:17 1994 William J. Eaton (wje@hoffman.rstnu.bcm.tmc.edu) ! ! * function.c (optimize_bit_field): Put any insns made by ! change_address in front of INSN. ! (expand_function_end): Don't pass DECL_INITIAL to setjmp_protect ! if it is error_mark_node. ! ! * genoutput.c, reload.c (n_occurrences): Make arg int, not char. ! * objc-act.c (warn_with_method): Likewise. ! ! * optabs.c (expand_fix): Call emit_library_call_value. ! ! Tue Sep 27 12:39:10 1994 Mike Stump (mrs@cygnus.com) ! ! * Makefile.in, libgcc2.c (L_eh): some support routines for C++. ! ! Mon Sep 26 06:45:20 1994 Michael Meissner (meissner@osf.org) ! ! * 386/i386.md (adddi3, subdi3): Rewrite to add a clobber of a ! scratch variable, so that memory/memoroy adds and subtracts can be ! done using just one scratch register. Also, don't require op1 to ! be the same as op0. ! ! Fri Sep 23 19:03:09 1994 Roland McGrath ! ! * config/i386/gnu.h (LIB_SPEC): Remove macro. ! ! Fri Sep 23 16:11:26 1994 Michael Meissner (meissner@osf.org) ! ! * i386/lynx-ng.h (CALL_USED_REGISTERS): Copy definition from ! i386/lynx.h that makes ebx be a call clobbered register, since ! some system calls evidently trash it. ! ! Fri Sep 23 15:54:53 1994 Jim Wilson (wilson@cygnus.com) ! ! * configure (mips-*riscos*): Changed to mips-*-riscos*. ! (mips-*-riscos*-*): Deleted. ! ! * cse.c (invalidate): New parameter FULL_MODE. All callers ! changed. ! (set_nonvarying_address_components): Modify initial comment. ! (cse_insn): When call invalidate for dest, use the actual dest not ! inner_dest. ! ! Thu Sep 22 18:56:19 1994 Torbjorn Granlund (tege@cygnus.com) ! ! * expmed.c (expand_divmod): Special case for signed CEIL_DIV_EXPR ! when divisor is power of 2. ! ! Thu Sep 22 12:28:53 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * fixinc.svr4: Fix size_t, ptrdiff_t and wchar_t like fixincludes ! does. Use extern inline rather than static inline in byteorder.h. ! ! Thu Sep 22 12:22:03 1994 Steve Dum (steve_dum@mentorg.com) ! ! * collect2.c (main): Discard the first executable once we've ! exploited it. ! ! Thu Sep 22 11:38:34 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Tweaks for LynxOS 2.2.2: accept spaces after # when ! removing #define void int in curses.h; change prototype of fnctl ! in fcntl.h to match POSIX.1. ! ! Thu Sep 22 07:18:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * configure: Consistently put specified manufacturer names ahead ! of entries with wildcard manufacturers. ! ! * calls.c (emit_call_1): Fix typo in last change. ! ! Wed Sep 21 21:32:56 1994 Chris Smith (csmith@convex.com) ! ! * config.guess: Add convex c3* and c4* guesses. ! * configure: Don't run fixincludes on convex. ! ! Wed Sep 21 15:59:12 1994 Ashley Saulsbury (ans@sics.se) ! ! * alpha.h (ASM_FILE_START): Write .set volatile. ! Wed Sep 21 14:45:45 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * calls.c (emit_call_1): Properly add a CLOBBER for sp ! to CALL_INSN_FUNCTION_USAGE. ! * c-typeck.c (mark_addressable): Give different error if trying ! to put object with volatile fields into register; don't use DECL_NAME. ! Wed Sep 21 14:02:10 1994 Jim Wilson (wilson@cygnus.com) ! * reload1.c (eliminate_regs): Make test in LOAD_EXTEND_OP case ! more precise. ! Wed Sep 21 11:34:12 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixincludes: Don't try to remove empty directories until after ! removing DONE files. ! Wed Sep 21 05:52:49 1994 Uwe Seimet (seimet@chemie.uni-kl.de) ! * m68k/atari.h (NO_{DOLLAR,DOT}_IN_LABEL): Define. ! Tue Sep 20 20:06:08 1994 Doug Evans (dje@cygnus.com) ! * final.c (asm_insn_count): Handle ASM_INPUTs too. ! Tue Sep 20 19:32:10 1994 Oliver Kellogg (okellogg@salyko.cube.net) ! * 1750a.h, 1750a.c, 1750a.md: New files, to use as1750. ! * 1750a/m1750.inc: File deleted. ! * 1750a/ms1750.inc: New file. ! Tue Sep 20 17:55:50 1994 Hallvard B Furuseth (hbf@durin.uio.no) ! ! * cccp.c (make_definition): Enable `-D' with macro arguments. ! Tue Sep 20 17:49:47 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cexp.y (HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT): New macros. ! (expression_value): Now HOST_WIDE_INT. ! (parse_c_expression): Now returns HOST_WIDE_INT. ! * cccp.c (eval_if_expression): Likewise. ! (do_if, do_elif): Reflect new return value of functions. ! * alpha.c (mode_mask_operand): Always return a value. ! * function.c (pop_function_context): Clear reg_renumber. ! * gcc.c (process_command): Add new switch, -dumpmachine. ! Tue Sep 20 15:57:40 1994 Jim Wilson (wilson@cygnus.com) ! * sched.c (sched_analyze_insn): Parameter loop_note type changed ! to rtx, and name changed to loop_notes. Code adding it to ! REG_NOTES modified to account for type change. ! (sched_analyze): Variable loop_note type changed to rtx, and name ! changed to loop_notes. Store LOOP_* REG_DEAD notes in it instead ! of LOOP_* NOTE_LINE_NUMBER. ! (schedule_block): Pass last not insn to emit_note_before call. ! * iris5.h (ASM_OUTPUT_UNDEF_FUNCTION): Define. ! (ASM_OUTPUT_EXTERNAL_LIBCALL): Define. ! (ASM_DECLARE_FUNCTION_SIZE): Define. ! * mips.c (mips_output_external): Use ASM_OUTPUT_UNDEF_FUNCTION. ! (mips_output_external_libcall): New function. ! (mips_asm_file_end): Handle ASM_OUTPUT_UNDEF_FUNCTION. ! * README.IRIX5: Update. ! Tue Sep 20 14:39:37 1994 Michael Meissner (meissner@osf.org) ! * i386/i386.h (output_move_memory): Add declaration. ! (output_move_pushmem): Ditto. ! * i386/i386.c (output_move_pushmem): New function to handle ! pushing bytes from memory onto the stack, possibily using ! temporary registers. ! (output_move_memory): New function to handle moving bytes from ! memory to memory via temporary registers. ! * i386/i386.md (movsi insn): If -fpic and the value we are moving ! is a constant pool address, emit a leal instruction instead of ! movl. ! (movsf_push): Allow pushes from memory. ! (SF, DF, XF, DI pushes): Move most of the code to the common ! function output_move_pushmem. ! (SF, DF, XF, DI memory->memory moves): Move most of the code to ! the common function output_move_memory. ! (DI move patterns): Combine DI patterns into two, one for pushes, ! and one for everything else, so that the combiner will combine a ! load with a store into a memory->memory move. ! (untyped_call): Replace non-working code with m68k version that ! emits a regular call, then breaks the parallel moves into separate ! moves, and then issue a blockage instruction. ! (blockage): New unspec_volatile insn to block insns from being ! moved across this point. ! (untyped_return): Delete. ! (update_return): Delete. ! * objc/sendmsg.c (get_imp): Allow __inline__ on x86 platforms. ! Tue Sep 20 12:21:12 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixincludes: Handle the case of a symlink to root/* from a ! subdirectory of another symlink to root/*. ! Mon Sep 19 20:30:21 1994 Jason Merrill (jason@deneb.cygnus.com) ! * fold-const.c (fold): Handle COMPONENT_REFs involving CONSTRUCTORs. ! Mon Sep 19 20:25:38 1994 Will Athanasiou (will@westford.ccur.com) ! * rs6000.md (load sf with update): Fix RTL typo. ! Mon Sep 19 08:46:46 1994 Charles M. Hannum (mycroft@duality.gnu.ai.mit.edu) ! * c-common.c (check_format_info): Enable checking of format ! specifiers using the `q' (quad) length modifier. ! (format_char_info): Add `qlen'. ! (print_char_table, scan_char_table): Add appropriate entries for ! qlen. ! Sat Sep 17 12:48:57 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * stmt.c (mark_seen_cases): Don't call fatal (or do anything ! else) if case index out of range. Warning is given later. ! Fri Sep 16 19:22:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * global.c (global_alloc): Mark regs assigned to SCRATCH as used by ! more than just local alloc. ! Thu Sep 15 14:36:59 1994 Michael Meissner ! * i386/i386.c (order_regs_for_local_alloc): Instead of using ! flag_cse_follow_jumps and not leaf_function_p to determine whether ! to allocate EDX, and ECX before EAX, use whether or not a DImode ! variable was used in the compilation. DImode variables seem to ! cause spill failures if EAX is allocated first, while smaller code ! is generated if EAX is allocated first, assuming no spill failure. ! * i386/i386.md (SF, DF, XF, and DI moves and pushes): Eliminate ! special patterns for TARGET_386 that allow direct pushes from ! memory, and instead allow direct pushes from memory as the last ! alternative in case no scratch registers could be allocated. ! (movxf_mem): Remove inadvertent !TARGET_386 condition. ! (addsi3): Allow generation of lea on 486, since the single ! instruction lea is at least as fast as the mov and add it ! replaces. ! (zero extend patterns): Replace !TARGET_486 with TARGET_386. ! (bit extracts): Ditto. ! * i386/osfrose.h (LONG_DOUBLE_TYPE_SIZE): Don't redefine to be 64 ! unless NO_LONG_DOUBLE is defined. ! Thu Sep 15 13:46:05 1994 Jim Wilson (wilson@cygnus.com) ! * expmed.c (store_split_bit_field): Use number of bits in arg not ! BITS_PER_WORD to adjust arg in BYTES_BIG_ENDIAN case. ! Thu Sep 15 09:19:12 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! * optabs.c (expand_binop, multi-word shifts): Generate rtl ! free of conflicts for shifts less than one word. ! Thu Sep 15 05:29:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * gcc.c: Rework last change so it's done like collect2.c. ! * cse.c (cse_around_loop): Don't invalidate SUBREG unless ! it's a SUBREG of a REG. ! * sched.c (sched_analyze_insn): Don't set SCHED_GROUP_P for previous ! INSN a USE unless it's a USE of a REG. ! Wed Sep 14 10:08:58 1994 Michael I Bushnell ! * gcc.c: Include in case `errno' is really a macro ! as permitted by ANSI C. ! * getpwd.c (GUESSPATHLEN): If there is no definition of ! MAXPATHLEN, then set GUESSPATHLEN to be 100. (It's used ! as a starting point, not a limit, so this is harmless.) ! Tue Sep 13 15:02:19 1994 Michael Meissner ! * i386/i386.md (movxf_mem): Fix typo with memory/memory moves ! of XFmode variables, where the store actually did a load, ie, the ! source and destination operands were fixed. ! (fixuns_trunc patterns): Revert to the old code. ! (movdf_push486, movxf_push486, movdi_push486): If an address is ! based on the stack pointer, account for the stack pointer changing ! due to the intermediate pushes generated. ! Tue Sep 13 14:11:16 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * collect2.c (fatal_perror, fatal, error): Declare all args as char *. ! Tue Sep 13 12:40:39 1994 Jeffrey A. Law (snake.cs.utah.edu) ! * pa.c (emit_move_sequence): Handle secondary FP load/store ! reloads of the form (subreg (mem (plus (reg) (disp)))). ! (secondary_reload_class): A secondary register is needed to handle ! out-of-range FP loads and stores. ! * pa.md (reload_indf, reload_outdf): New expanders. ! (reload_insf, reload_outsf): Likewise. ! Mon Sep 12 18:15:48 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * t-pa (ADA_CFLAGS): New override. ! * pa/t-pa-hpux: New file. ! * configure (hppa*-*-hpux*): Use t-pa-hpux instead of t-libc-ok. ! Mon Sep 12 14:52:17 1994 Jim Wilson (wilson@cygnus.com) ! * function.c (assign_parms): Set RTX_UNCHANGING_P on stack_parm ! for const parameter before calling move_block_from_reg. ! Mon Sep 12 14:27:58 1994 Doug Evans (dje@cygnus.com) ! * config/fp-bit.c (FLO_union_type): Add packed attribute to `bits'. ! Sat Sep 10 09:50:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (invalidate_for_call): Properly set IN_TABLE. ! Sat Sep 10 06:46:24 1994 Bill Burton (billb@progress.com) ! * Added improved support for Sequent DYNIX/ptx 1.x and 2.x: ! * fixinc.ptx: New file. ! * i386/seq-sysv3.h (HAVE_ATEXIT): No longer defined. ! * i386/seq2-sysv3.h: New file. ! * configure (i[34]86-sequent-ptx[12]*): New configurations. ! (i[34]86-sequent-sysv*, i[34]84-sequent-ptx): Deleted configurations. ! * config.sub (ptx): New OS; use for Sequent. ! Fri Sep 9 21:48:48 1994 Paul Eggert (eggert@twinsun.com) ! * cccp.c (rescan, handle_directive): Backslash no longer suppresses the ! specialness of the following char unless -traditional. ! (rescan): Remove backslash-newline only if at top level, since ! backslash-newline-space can be encountered during macro processing. ! (collect_expansion): Remove special hack for \# inside a #define; ! it's not compatible with the C Standard. ! Thu Sep 9 17:36:03 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * Utilize OSF/1's limited .init support. ! * alpha/alpha.h (HAS_INIT_SECTION): Define. ! (LINK_SPEC): Add '-init __main'. ! * alpha/osf12.h (LINK_SPEC): Ditto. ! ! * function.c (expand_main_function): Don't call __main if ! HAS_INIT_SECTION is defined. ! Fri Sep 9 16:36:46 1994 Mike Stump (mrs@cygnus.com) ! * tree.c (decl_function_context): Don't treat C++ member ! functions of classes declared in a function, as nested functions. ! Fri Sep 9 16:10:25 1994 Steve Chamberlain (sac@jonny.cygnus.com) ! * sh/sh.c (prepare_move_operands): Generate better DI constant ! code. ! (fake_shift): New function. ! * sh/sh.md (ashlsi3_n, lshrsi3_n): Only recognise if fake_shift ! enabled. ! * sh/{lib1funcs.asm, ashlsi3.c, lshrsi3.c, ashrsi3.c} : New files. ! * sh/t-sh : Build new files. ! Fri Sep 9 15:52:54 1994 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) ! * cccp.c: Correct unprototyped pointer args from `0' to `NULL_PTR' ! Fri Sep 9 15:17:52 1994 Matthew Green (mrg@splode.mame.mu.oz.au) ! * configure (sparc-*-netbsd): New configuration. ! * sparc/netbsd.h: New file. ! Fri Sep 9 15:15:48 1994 Jim Wilson (wilson@cygnus.com) ! * mips.md (truncdisi2): Change from define_expand to define_insn. ! (truncdihi2, truncdiqi2): Likewise. ! * sparc.h (SQRTTF2_LIBCALL): Delete. ! (INIT_TARGET_OPTABS): Define. ! (INIT_SUBTARGET_OPTABS): Define. ! * stmt.c (check_for_full_enumeration_handling): Cast malloc result ! to `unsigned char *' not `char *'. ! * dbxout.c (dbxout_symbol_location): Handle error_mark_node in ! DECL_INITIAL for C++. ! * mips.md (memory): Add missing !r4600 to first define_function_unit. ! * sparc.md (negsi2): Use register_operand not general_operand for ! output. ! Fri Sep 9 14:52:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * config/netbsd.h: Add #undef for everything we define; a few were ! missing. ! * reload.c (find_reloads, case 'p'): Operand is BASE_REG_CLASS. ! Fri Sep 9 14:00:28 1994 Mike Collison (collison@world.std.com) ! * configure (dsp16xx-*): New configuration. ! * config.sub (dsp16xx): New basic machine. ! * dsp16xx.c, dsp16xx.md, dsp16xx.h, xm-dsp16xx.h: New files. ! Fri Sep 9 12:47:00 1994 Michael Meissner (meissner@osf.org) ! * i386/i386.md (All SF, DF, XF, DI 486 push patterns): Merge the ! memory and nonmemory push patterns together. ! Fri Sep 9 00:53:36 1994 Richard Stallman ! * config.sub: Accept i586 like i386. ! Do not use SCO as a default for i386-*. ! Thu Sep 8 18:49:35 1994 Steve Chamberlain (sac@cygnus.com) ! * config/fp-bit.c (_fpmul_parts): Perform optimized ! 64bit*64bit multiply correctly. ! * sh/sh.c (synth_constant): Ensure DI mode constants get their ! high part zeroed. ! (add_constant): Entabled constants are only identical if their ! sizes are the same. ! Thu Sep 8 14:40:31 1994 Jim Wilson (wilson@cygnus.com) ! * flow.c (mark_used_regs, case REG): Correct typo, use GET_MODE ! not GET_CODE. ! * sched.c (attach_deaths): Likewise. ! Tue Sep 6 23:33:41 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * tree.c (get_set_constructor_bits, get_set_constructor_words): ! New functions. Extract bits or words from SET_TYPE CONSTRUCTOR. ! * tree.h: Declare above new functions. ! Thu Sep 8 14:02:05 1994 Michael Meissner (meissner@osf.org) ! * 386/i386.h (TARGET_OPTIONS): New macro to define -mreg-alloc= ! switch to allow users to override the register allocation order. ! (OVERRIDE_OPTIONS): Call the function override_options. ! (REG_ALLOC_ORDER): Define to allocate in the natural order, this ! is needed for ORDER_REGS_FOR_LOCAL_ALLOC to work. ! (ORDER_REGS_FOR_LOCAL_ALLOC): Define to call the function ! order_regs_for_local_alloc. ! (regclass_map): Move declaration to end of file. ! (i386_compare_op0, i386_compare_op1): Ditto. ! (CLASS_LIKELY_SPILLED_P): Define, return 1 for AD_REGS in addition ! to all of the single register classes, since AD_REGS is only used ! to allocate EAX:EDX. ! (override_options, order_regs_for_local_alloc): Add declarations. ! (hi_reg_name): Add declaration. ! (qi_reg_name): Ditto. ! (qi_high_reg_name): Ditto. ! (i386_reg_alloc_order): Add declaration for TARGET_OPTIONS to use. ! * i386/i386.c (i386_compare_op0, i386_compare_op1): Initialize ! with NULL_RTX. ! (i386_reg_alloc_order): Provide global variable definition. ! (regs_allocated): Static array to note whether a register is noted ! via -mreg-alloc=. ! (override_options): Provide checking for registers declared with ! -mreg-alloc=. ! (order_regs_for_local_alloc): If -mreg-alloc= was used, ! allocate registers mentioned in order, and then allocate all other ! registers in the normal register order. If -mreg-alloc= was ! not used, allocate registers in natural order except for non-leaf ! functions with CSE following jumps, allocate EAX after EDX and ! ECX, to allow the function return to be CSE'd, and perl 4.036's ! perly.y to be compiled without aborting due to not being able to ! find a spill register. ! (movsf, movdf, movdi): Rewrite all patterns to provide effecient ! memory to memory moves, including pushes for i386 and i486. Fixes ! problems in compiling motif+ without optimization. ! (swapsf): Add, like swapdf and swapxf. ! (fixuns_truncsfsi2, fixuns_truncdfsi2): Use general_operand ! instead of register_operand for define_expand, since the operand ! is copied to a new pseudo register as part of the expansion. ! (fix_truncxfdi2, fix_truncdfdi2, fix_truncsfdi2): Rewrite to call ! the more primitive generator functions instead of knowing how many ! clobbers of match_scratchs they do. ! * Makefile.in (aux_output.o): Define TARGET_CPU_DEFAULT if ! specified when compiling aux_output.o to allow the machine C file ! access to this if it wants it. ! Thu Sep 8 07:15:29 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.md (movsi matcher): Merge TARGET_POWER and !TARGET_POWER ! cases. Rationalize mnemonics. ! (movhi and movqi matchers): Likewise. ! (movsf matcher): Correct length attribute for stfs which no longer ! includes frsp. ! Thu Sep 8 07:06:31 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * rs6000.h (REGISTER_MOVE_COST): Fix typo in last change. ! Wed Sep 7 19:31:52 1994 Paul Eggert (eggert@twinsun.com) ! * cccp.c (handle_directive): In `#include ' directives, ! remove backslash-newline properly. Don't allow any other newlines. ! Wed Sep 7 18:11:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * rs6000.h (REGISTER_MOVE_COST): Moving between special registers ! is expensive. ! * combine.c (simplify_comparison): Convert comparison to unsigned ! when stripping off a ZERO_EXTEND. ! * combine.c (simplify_set): Only convert IF_THEN_ELSE to logical ! expression if mode of object being compared is result mode. ! Wed Sep 7 18:09:17 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) ! * configure: Ignore --help, --version, --program-prefix, ! --program-suffix, --cache-file, --quiet, --silent. ! Wed Sep 7 13:29:50 1994 Doug Evans (dje@cygnus.com) ! * stmt.c (expand_asm_operands): Move test for misspelled registers ! higher so all cases caught. ! Wed Sep 7 09:54:14 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * configure: Touch Makefile.ll before appending subdir stuff. ! (Needed if there are no subdirs.) ! Wed Sep 7 11:19:18 1994 Kresten Krab Thorup (krab@akvavit.next.com) ! * objc/init.c (__objc_init_protocols): Remove assertion. ! * objc/Object.m (conformsTo:): Make lookup allways happen in ! the class object. ! Tue Sep 6 17:47:39 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * configure: Rename *-next-ns[23] to *-next-nextstep[23]. ! * config.sub: Cleanup NeXT support to emit nextstep*. ! Tue Sep 6 18:38:02 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload.c (find_reloads_address): Don't reorder the operands of a ! PLUS when fixing up index. ! Tue Sep 6 18:24:50 1994 Matthias Pfaller (leo@marco.de) ! * ns32k.md (stackadjust/push peepholes): For the adjust/push/push ! pattern one offset was wrong. ! Don't use addr for register and and MEM refs. ! Tue Sep 6 11:24:06 1994 Steve Chamberlain (sac@jonny.cygnus.com) ! * sh/sh.c (push, pop): Generate REG_NOTES. ! (synth_constant): Correct one of the patterns. ! (output_file_start): Bump version number. ! * sh/sh.h (EXIT_IGNORE_STACK): Now 1. ! * sh/sh.md (adddi3, subdi3): Simplify. ! (casesi_worker): Use TARGET_BIGTABLE. ! Mon Sep 5 12:29:15 1994 Ian Lance Taylor (ian@cygnus.com) ! * ginclude/math-68881.h: Change inline functions from static to ! extern. ! * configure (i[34]86-*-sysv4*): If --with-stabs, set tm_file to ! i386/sysv4gdb.h. ! * config/i386/sysv4gdb.h: New file; sets PREFERRED_DEBUGGING_TYPE. ! Sun Sep 4 08:40:02 1994 Chris Smith (csmith@convex.com) ! * convex.h (VTABLE_USES_MASK, VINDEX_MAX, SET_DECL_VINDEX): ! delete, no longer used. ! (target_flags): delete cexp.c hack, no longer needed. ! * convex.md (decr-and-set-cc0): fix HImode to use halfword ! insns. ! (cmpqi patterns): fix constraints not to use A regs ! Sat Sep 3 14:12:11 1994 Michael Meissner (meissner@osf.org) ! * i386/i386.md (DImode move and push insns): Eliminate movdi ! wrapper that made a DI temp register to do a memory to memory ! move because it creates too much register pressure, especially ! when not optimizing. On the 486, allocate and use 1-2 scratch ! registers to push a DImode value. ! Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com) ! * c-decl.c (min_precision): Move from here. ! * c-common.c: To here. ! ! Fri Sep 2 13:16:38 1994 Per Bothner (bothner@kalessin.cygnus.com) ! ! * tree.h (maximum_field_alignment, set_alignment): New declarations. ! Fri Sep 2 14:25:36 1994 Ian Lance Taylor (ian@cygnus.com) ! * config/svr4.h (DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE, ! DBX_BLOCKS_FUNCTION_RELATIVE, ASM_IDENTIFY_GCC, ! ASM_IDENTIFY_GCC_AFTER_SOURCE, ASM_OUTPUT_SOURCE_LINE, ! DBX_FUNCTION_FIRST): Define. This adds support for -gstabs for ! SVR4 configurations. -gstabs requires gas and gdb. ! * config/sparc/sol2.h (DBX_DEBUGGING_INFO, ! DBX_BLOCKS_FUNCTION_RELATIVE, ASM_IDENTIFY_GCC, ! ASM_IDENTIFY_GCC_AFTER_SOURCE, ASM_OUTPUT_SOURCE_LINE, ! DBX_FUNCTION_FIRST): Don't define. Now defined by config/svr4.h. ! (PREFERRED_DEBUGGING_TYPE): Undefine before defining. ! * config/sparc/sysv4.h (DBX_DEBUGGING_INFO): Don't bother to ! undefine before including svr4.h. ! (ASM_OUTPUT_SOURCE_LINE): Undefine before including svr4.h. ! ! Thu Sep 1 22:02:02 1994 Michael Meissner (meissner@osf.org) ! ! * toplev.c (fatal_insn): Move most of the code from ! fatal_insns_not_found here, and add an argument to give the error ! message. ! (fatal_insn_not_found): Call fatal_insn. ! * rtl.h (fatal_insn, fatal_insn_not_found): Add prototypes. ! * genextra.c (main): Don't declare fatal_insn_not_found in ! insn-extract.c. ! * reload1.c (reload): Call fatal_insn where appropriate to print ! an error message instead of calling abort. ! (spill_failure): Ditto. ! (reload_as_needed): Ditto. ! (allocate_reload_reg): Ditto. ! (emit_reload_insns): Ditto. ! Thu Sep 1 19:34:26 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * tree.c (type_list_equal): If the types of the default arguments ! differ, the lists do not match. ! ! Thu Sep 1 19:29:58 1994 Matthias Pfaller (leo@marco.de) ! * ns32k.md (stack-adjust/push peepholes): Addresses are ! moved with "addr", not with "movd". ! Thu Sep 1 19:17:55 1994 Paul Eggert (eggert@twinsun.com) ! * cccp.c (make_definition): Don't dump core when given an ! unterminated string in a -D option. ! Thu Sep 1 19:13:35 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-typeck.c (convert_arguments): Give proper warnings when ! converting COMPLEX_TYPE; widen check to include all integral types. ! Wed Aug 31 20:38:53 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) ! * fixproto: Define FIX_HEADER (needed by Aug 19 change). ! Use FIX_HEADER instead of $original_dir/fix-header (twice). ! Wed Aug 31 16:56:15 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * stmt.c (warn_if_unused_value): Extend special case for casted ! MODIFY_EXPRs to apply to INIT_EXPRs as well. ! ! Wed Aug 31 16:30:09 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * stor-layout.c (set_alignment): New global. ! (layout-type): Add support for SET_TYPE. ! * expmed.c (store_bit_field): Semi-revert Aug 25 change: ! Make it apply only for BLKmode, not integral modes. ! * stmt.c (all_cases_count, mark_seen_cases): New functions. ! (BITARRAY_TEST, BITARRAY_SET): New macros. Used (mainly by ! Chill) to check all cases are covered (for enums and ranges). ! (check_for_full_enumeration_handling): Re-write to use the ! new functions, now that we have them. ! Wed Aug 31 19:19:29 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) ! * combine.c (nonzero_bits, cases DIV, MOD, UDIV, UMOD): Declare ! op0_maybe_minusp and op1_maybe_minusp as HOST_WIDE_INT. ! Wed Aug 31 18:54:54 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expmed.c (store_split_bit_field): Always adjust arg to ! extract_fixed_bit_field in BYTES_BIG_ENDIAN case. ! Wed Aug 31 02:49:34 1994 Roland McGrath ! * config/i386/gnu.h (LIB_SPEC): New macro. ! Tue Aug 30 16:35:23 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * toplev.c (lang_options): Add -W{no-,}reorder. ! Tue Aug 30 13:55:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * combine.c (simplify_comparison, case GEU): Add missing break. ! ! Mon Aug 29 17:50:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * vax.md (extv, extzv): Don't use ROTL when field is outside ! boundaries of a word. ! ! Mon Aug 29 11:43:18 1994 Kresten Krab Thorup (krab@akvavit.next.com) ! ! * objc/sendmsg.c (get_imp): Don't inline on 386. ! ! Sun Aug 28 18:56:03 1994 Andrew McCallum (mccallum@cs.rochester.edu) ! ! * objc/class.c (objc_get_meta_class): New function. ! ! Sat Aug 27 23:13:53 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.c (legitimate_address_p): If index register is either ! the arg pointer or the stack pointer, and there is no scale ! factor, swap with the base register. ! ! * i386/i386.h (REG_CLASS_CONTENTS): Don't allow the arg pointer ! register as an index register, since the frame could be omitted, ! and the stack pointer is not valid as an index. ! ! * i386/i386.md (mov*, movstrict*): Don't create pushes of memory ! values when creating insns, let the combiner create a push of a ! memory value if -m386. In particular, pushes of byte values was ! broken because there is no pattern to recognize such a push. ! ! Fri Aug 26 16:03:09 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.h (MASK_*): Add masks for all of the switches. ! (TARGET_*): Use appropriate MASK_* instead of a number. Add ! -mdebug-addr switch to debug GO_IF_LEGITIMATE_ADDRESS, ! -mno-wide-multiply to turn off widening multiplies, and -mno-move ! to allow integer move insns to generate direct memory to memory ! copies, which reload will fix up. Add TARGET_386 which is not of ! TARGET_486. ! (REG_ALLOC_ORDER): Go to the order used in 2.5.8, eax, edx, ecx, ... ! Add a comment describing the tradeoffs. ! (REG_OK*): Add strict and non-strict versions of the macros that ! are always present, and REG_OK_STRICT chooses between the two ! inner macros. ! (GO_IF_LEGIMATE_ADDRESS): Move processing to legitimate_address_p ! function. ! (LEGITIMIZE_ADDRESS): Move processing to legitimize_address ! function. ! (function declarations): Add function declarations for all extern ! functions in i386.c. ! ! * i386/i386.c (asm_add): Add support in case adding by 1 or -1 to ! use inc/dec. ! (various): Change TARGET_486 -> !TARGET_386. ! (legitimate_address_p): Move GO_IF_LEGITIMATE_ADDRESS processing ! here from i386.h. Combine OSF/rose support from osfrose.h through ! the use of conditional macros. Only recognize addresses in ! canonical formats, code adapted from the i960 port. Add tracing ! if -mdebug-addr. ! (legitimize_address): Move LEGITIMIZE_ADDRESS here from i386.h, ! and add adaptations from the i960 port. ! (convert_387_op): Remove unused function. ! ! * i386/i386.md (various): Remove cast to char * of output ! functions, since i386.h now declares them all properly. Change ! TARGET_486 tests to !TARGET_386 and !TARGET_486 to TARGET_386. ! (movsi, movstricthi, movhi, movstrictqi, movqi, movdi): Add ! define_expand wrappers to prevent memory<->memory moves from being ! generated unless -mno-move is used. On 486's do not allow push of ! memory insns to be generated unless -mno-move. ! (movdi): For movdi patterns, add 2 (clobber (match_scratch...)) ! declarations to allow memory<->memory moves with non-contigous ! registers, so that reload don't abort if it can't make a DI ! register. ! (umulsidi3, mulsidi3): Don't allow pattern if -mno-wide-multiply. ! (smultsi3_highpart, umultsi3_highpart): Add patterns to make ! division by constants generate better code. ! ! * i386/osfrose.h (MASK_*): Use octal to define bitmasks, not hex, ! for compatibility with i386.h. ! (NO_IMPLICIT_EXTERN_C): Define. ! (LONG_DOUBLE_TYPE_SIZE): Explicitly define to be 64 instead of ! just #undef'ing it. ! (GO_IF_LEGITIMATE_ADDRESS): Delete, merged with common i386 code. ! (ASM_FILE_END): Print -fschedule-insns and -fschedule-insns2 in ! ident string if those options are used. ! (REAL_LD_FILE_NAME): Delete. ! (ASM_OUTPUT_DOUBLE): Delete, use the common macros. ! (ASM_OUTPUT_FLOAT): Ditto. ! (ASM_OUTPUT_LONG_DOUBLE): Ditto. ! ! Thu Aug 25 17:15:18 1994 Per Bothner (bothner@kalessin.cygnus.com) ! ! * expmed.c (store_bit_field): Always store into multi-word ! bitfields starting with low addresses. (Old code was ! incompatible with operand_subword_force on big-endian targets.) ! ! Thu Aug 25 18:31:20 1994 Antti Miettinen (amiettin@ntc.nokia.com) ! ! * m68k/lynx.h (CALL_USED_REGS): Add d2 and d3 as call-used. ! ! Thu Aug 25 11:30:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * cse.c (record_jump_cond): Don't do anything if OP0 and OP1 ! are already equivalent. ! ! * rtlanal.c (may_trap_p, case EXPR_LIST): New case. ! ! * c-common.c (shorten_compare): Don't issue warning if both ! operands constants and the signedness doesn't affect the ! comparison results. ! ! * configure: Refine handling and error-checking of positional args. ! ! * print-tree.c (print_node): Print more flags for types and decls. ! ! * c-typeck.c (type_lists_compatible_p): Treat transparent unions ! just like unnamed ones. ! ! Wed Aug 24 19:34:52 1994 Charles Hannum (mycroft@duality.gnu.ai.mit.edu) ! ! * configure: Rearrange handling of NetBSD ports to use the standard ! `cpu-vendor-os' format. ! * config.sub: Recognize names of NetBSD ports that do not correspond ! to a CPU name. ! ! Wed Aug 24 18:43:30 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * print-tree.c (print_node_brief, print_node): Use assignment instead ! of initialization for aggregate local variable REAL_VALUE_TYPE d. ! ! Wed Aug 24 18:28:52 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * config/svr4.h (ASM_OUTPUT_SECTION_NAME): Define. ! * config/sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): Output #alloc to ! set SHF_ALLOC in section flags. ! ! Wed Aug 24 17:45:19 1994 Jim Wilson (wilson@sphagnum.cygnus.com) ! ! * c-parse.in (parmlist_2): Give error for function with only ! ELLIPSIS as an argument. ! ! Wed Aug 24 17:36:22 1994 H.J. Lu (hjl@nynexst.com) ! ! * i386/linux.h (STARTFILE_SPEC): Add %{static:-static}. ! ! Wed Aug 24 14:34:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * calls.c (expand_call): Check for variable-sized return value ! in proper place. ! * c-typeck.c (default_conversion): Don't substitute constant ! value if array since will return address. ! * configure (LANG_MAKEFILE): Include lang/Makefile.in in list. ! * alpha.h (EXTRA_CONSTRAINT): Add new letter, `R'. ! (ENCODE_SECTION_INFO): Don't check TREE_ASM_WRITTEN. ! (PREDICATE_COSTS): Add call_operand. ! * alpha.c (call_operand): New function. ! (output_epilog): Don't set SYMBOL_REF_FLAG of current function. ! * alpha.md (call): Rework to use macro version of jsr. ! * osf2.h (LINK_SPEC): Don't define; should never have been. ! * c-typeck.c (push_init_level): Don't blow up if construct_type ! is null (can happen with missing brace). ! Wed Aug 24 10:49:35 1994 Michael Meissner (meissner@osf.org) ! * i386/i386.h (REG_ALLOC_ORDER): Restore previous version which ! allocates edx first, then ecx, eax, ... This is because perl ! doesn't build when the order is eax, ecx, edx... ! Tue Aug 23 09:20:16 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * configure: Restore old behavior of positional arguments. ! Add new argument, --noguess. ! config.guess now guesses BUILD, not HOST; HOST defaults from BUILD. ! Always compare canonical names, not user-specified names. ! Numerous minor changes in the messages output to make the ! configuration chosen clearer. ! Tue Aug 23 02:01:42 1994 Richard Stallman ! * config.sub: Move m68k-ccur handling to proper part of file. ! Canonicalize cpu type pentium into i486. (Change it to i586 later.) ! Mon Aug 22 18:41:59 1994 Steve Chamberlain (sac@jonny.cygnus.com) ! * sh/sh.c (find_barrier): Calculate the size of larger than ! SI moves correctly. ! (general_movsrc_operand): Allow label_refs plus const. ! (sh_function_arg_partial_nregs, sh_function_arg): Pass BLKmode ! objects in partial regs. ! * sh.h (TARGET_DEFAULT): Turn off BIGTABLE_BIT. ! (EXTRA_CONSTRAINT_Q): Allow label_refs plus const. ! (READONLY_DATA_SECTION_ASM_OP, EXTRA_SECTIONS, rdata_section): ! Delete rdata section and refs. ! * sh.md (dimode split): Don't allow a Q constraint source. ! Sun Aug 21 23:15:35 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa.h (FUNCTION_ARG): Use indirect calling conventions when ! TARGET_LONG_CALLS is in effect. ! Sat Aug 20 13:31:34 1994 Jim Wilson (wilson@cygnus.com) ! * sched.c (sched_analyze_insn): Add new parameter loop_note. ! If loop_note set, then serialize on this insn. ! (sched_analyze): New variable loop_note. Pass to ! sched_analyze_insn. Set it if we pass a NOTE_INSN_LOOP_BEG or ! NOTE_INSN_LOOP_END. ! (unlink_notes): Don't save away NOTE_INSN_LOOP_BEG or ! NOTE_INSN_LOOP_END notes. ! (schedule_block): Generalize code that looks for magic REG_DEAD ! notes and converts them to notes. ! Sat Aug 20 12:47:21 1994 Michael Meissner (meissner@osf.org) ! * i386.h (REG_ALLOC_ORDER): Allocate eax first, then ecx, edx, and ! then do the nromal allocation order for the remaining registers. ! Fri Aug 19 20:14:35 1994 Jim Wilson (wilson@cygnus.com) ! * tree.c (build_type_variant): Only return existing type if it ! also has the same TYPE_NAME. ! * irix5.h (NO_IMPLICIT_EXTERN_C): Comment out. ! Fri Aug 19 16:41:43 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * fixproto: Use $FIX_HEADER macro instead of calling ! fix-header directly in 2nd location. ! Fri Aug 19 17:34:19 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expr.c (emit_move_insn_1): Never make a no-conflict block. ! * tree.h (struct tree_type): New field transparent_union_flag. ! (struct tree_decl): New field transparent_union. ! ({DECL,TYPE}_TRANSPARENT_UNION): New macros. ! * c-common.c (decl_attribute): Handle "transparent_union" attribute. ! * function.c (assign_parms): If parm is transparent union, use ! type of first field. ! * calls.c (expand_call): Likewise. ! * integrate.c (function_cannot_inline): Don't inline if any ! parm is a transparent union. ! Fri Aug 19 12:01:11 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixincludes: Canonicalize ${INPUT} to avoid automounter ! problems. ! Fri Aug 19 11:31:24 1994 Kresten Krab Thorup (krab@akvavit.next.com) ! * objc-act.c (build_selector_translation_table): Reset ! current_function_decl after hack_function_prototype build it. ! (build_module_descriptor): Return constructor name from functions ! decl_rtl. ! Thu Aug 18 17:23:18 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) ! * README.FRESCO: New file. Notes about compiling the Fresco ! toolkit with g++. ! Thu Aug 18 14:10:22 1994 Jim Wilson (wilson@cygnus.com) ! * combine.c (distribute_notes, case REG_UNUSED): Ignore notes when ! from_insn != i3 only if the notes would remain as REG_UNUSED notes. ! Wed Aug 17 18:31:43 1994 Holger Teutsch (holger@hotbso.rhein-main.de) ! * clipper.h (CLIPPER_ARG_SIZE): Return size in bytes. ! (FUNCTION_ARG_ADVANCE): Fix argument alignment processing. ! Wed Aug 17 18:03:54 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * fx80.md (casesi_2): Operand 0 is HImode; add SIGN_EXTEND ! when adding to pc. ! (casesi): Operand 0 is HImode. ! (unnamed PC addition pattern): Add SIGN_EXTEND to add HImode ! offset to SImode PC. ! * m68k.md (tablejump): Add SIGN_EXTEND to HImode offset ! so can add to SImode PC. ! Likewise for matching pattern. ! * cse.c (fold_rtx): When folding tablejump, allow LABEL_REF ! to be in arg0; also allow other arg to be MINUS, not just be ! equivalent to it. ! Mon Aug 15 19:19:11 1994 Paul Eggert (eggert@twinsun.com) ! * cccp.c (index0): New function. ! (trigraph_pcp): Use index0 instead of index, so that a null ! byte doesn't suppress further trigraph preprocessing. ! * cccp.c (rescan, do_ident): Pass more accurate size request ! to check_expand. ! * cccp.c (main): Don't dump core if given -pcp, -MD, or -MMD ! without following arg. ! Mon Aug 15 17:56:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * stmt.c (expand_elseif): New function. ! Mon Aug 15 14:16:18 1994 Ian Lance Taylor (ian@cygnus.com) ! * configure: If the host is guessed, and the target name is a ! prefix of the host name, then use the target name as the host ! name. ! ! Mon Aug 15 13:35:24 1994 Stan Shebs (shebs@andros.cygnus.com) ! ! * m68k/m68k-coff.h: New file. ! ! Sun Aug 14 00:28:15 1994 Andrew McCallum (mccallum@vein.cs.rochester.edu) ! ! * objc/encoding.c (objc_sizeof_type): Assign from ROUND, ! don't increment. Remove ; after while to fix infinite loop. ! Add float and double cases. ! (objc_alignof_type): Add float and double cases. ! * objc/selector.c (): Use __objc_selector_names, not ! __objc_selector_array. ! (sel_types_match): New function. ! (sel_get_typed_uid): Use sel_types_match. Change strcmp to !strcmp. ! ! Sun Aug 14 21:54:29 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL): ! Define. ! (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete. ! ! * pa.c (hppa_expand_prologue): Avoid writing outside the current ! stack boundary in code to handle large stack frames. ! ! Sun Aug 14 18:55:51 1994 Jim Wilson (wilson@cygnus.com) ! ! * unroll.c (loop_iterations): Use PREV_INSN not prev_nonnote_insn. ! ! * bsd-5.h (ASM_OUTPUT_NEWLINE): Delete. ! (ASM_OUTPUT_ASCII): Define. ! * mips-5.h, svr3-5.h, svr4-5.h: Likewise. ! * mips.h (ASM_OUTPUT_NEWLINE): Delete. ! (ASM_OUTPUT_ASCII): Don't use ASM_OUTPUT_NEWLINE. ! ! * va-mips.h (va_start): Add cast to __gnuc_va_list type. ! * flow.c (mark_used_regs): When adding REG_DEAD notes, check for ! the case where a multiple register hard reg overlaps a register ! set by the insn. ! * sched.c (attach_deaths): Likewise. ! * combine.c (distribute_notes, case REG_DEAD): Add another ! find_reg_fusage call. ! * unroll.c (calculate_giv_inc): Handle constants loaded with IOR. ! Sun Aug 14 16:40:04 1994 Richard Stallman ! * cccp.c (skip_if_group): New arg op. All callers changed. ! If output_conditionals is true, output text of failed conditionals. ! (conditional_skip): New arg op. All callers changed. ! (main): Handle -ifoutput option. ! Sun Aug 14 05:49:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * print-tree.c (print_node{,_brief}): Use REAL_VALUE_TO_DECIMAL ! to print REAL_CST ifdef REAL_ARITHMETIC. ! * reload1.c (count_possible_groups) Pass CLASS as arg and only ! try to find groups of that class. ! * configure: If config.guess fails and target specified, use as host. ! Print a message when making a cross-compiler. ! Sat Aug 13 17:12:30 1994 Jim Wilson (wilson@cygnus.com) ! * configure (sparc-*-sunos4.0*): New configuration. ! * t-sunos4: Rename file to t-sunos41. ! * t-sunos40: New file. ! Sat Aug 13 13:50:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * reload1.c (emit_reload_insns): Handle a secondary input reload ! which needs to use secondary memory too. ! Fri Aug 12 18:53:24 1994 Ian Lance Taylor (ian@cygnus.com) ! * mips/mips.c (override_options): If neither -mcpu= nor -mipsN was ! used, and MIPS_CPU_DEFAULT is defined, set mips_cpu to ! MIPS_CPU_DEFAULT and set mips_cpu_string to ! MIPS_CPU_STRING_DEFAULT. ! Fri Aug 12 10:54:35 1994 Stan Cox (coxs@dg-rtp.dg.com) ! * m88k/dgux.h, m88k/dguxbcs.h (ASM_SPEC,CPP_SPEC): ! Made -pipe work for -msvr4. Added -D*_TARGET definitions. ! * m88k.c (emit_bcnd): Improved code generated by changing cmp/bbx ! instruction pair to single bcnd instruction ! Fri Aug 12 07:52:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (set_nonvarying_address_components): If BASE is CONST_INT, ! add value to start and set BASE to const0_rtx. ! (refers_to_mem_p): Don't do it here. ! * function.c (expand_function_start): Add redundant copy to ! static_chain_incoming_rtx if SMALL_REGISTER_CLASS so inlining ! works properly. ! * integrate.c (expand_inline_function): Use single_set when appropriate. ! Delete insn that sets static_chain_incoming_rtx before its use. ! (subst_constants): Treat virtual reg as constant. ! ! * flow.c (mark_used_regs): Only show changes size if one mode is ! integral. ! * stupid.c (stupid_mark_refs): Likewise. ! * combine.c (simplify_rtx, case FLOAT_TRUNCATE): Remove ! redundant float_truncate. ! * rs6000.md (movsf): Don't truncate if not register; clean up. ! ! * c-decl.c (duplicate_decls): Suppress -Wredundant-decls warning ! if we have already given an error. ! ! Thu Aug 11 18:44:25 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * stmt.c (expand_anon_union_decl): Fix up the alignment and mode ! of the member VAR_DECLs. ! ! Thu Aug 11 13:36:14 1994 Per Bothner (bothner@kalessin.cygnus.com) ! ! * tree.c (stabilize_reference): Handle COMPOUND_EXPR. ! ! * fix-header.c (write_rbrac): If NO_IMPLICIT_EXTERN_C is defined, ! add extern "C" { ... } to added prototypes. (Needed for hpux.) ! ! Thu Aug 11 14:23:59 1994 Paul Eggert (eggert@twinsun.com) ! ! * cccp.c (rescan): Fix botches with `-lint': the output buffer ! pointer was not recached properly, leading to lost output. ! Also, buffer overrun was possible. ! ! * cccp.c (dump_defn_1): Skip newlines and strings correctly. ! ! Thu Aug 11 14:13:17 1994 Niklas Hallqvist (niklas@appli.se) ! ! * configure (m68k-*-netbsd*): New target, like others. ! ! Thu Aug 11 14:09:23 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu) ! ! * alpha.h (FUNCTION_PROFILER): Load global pointer from $27, not $26. e ! ! Thu Aug 11 13:52:15 1994 Walter Misar (misar@rbg.informatik.th-darmstadt.de) ! ! * m68k/hp320.h (NO_DOT_IN_LABEL): Define if HPUX_ASM. ! ! Thu Aug 11 13:12:12 1994 David Mosberger-Tang (davidm@cs.arizona.edu) ! ! * alpha.h (BLOCK_PROFILER): Use $26 and $27 instead of $0 and $1. ! ! Thu Aug 11 13:09:36 1994 Antti Miettinen (amiettin@trshp.trs.ntc.nokia.com) ! ! * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Call assemble_name. ! ! Thu Aug 11 12:57:22 1994 Stephen L Moshier (moshier@world.std.com) ! ! * expr.c (expand_builtin): Relegate sin and cos to ffast-math. ! ! Thu Aug 11 12:45:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * flow.c (find_auto_inc): Ensure that all proposed changes to ! insns are valid before commiting to the auto-inc. ! ! * calls.c (expand_call): Ensure we call force_operand on ! structure_value_addr. ! ! * configure: Use config.guess to get default value for host, ! not target. ! ! Thu Aug 11 12:43:24 1994 Robert Wilhelm (Robert.Wilhelm@physik.tu-muenchen.de) ! ! * Makefile.in (mostlyclean): Add missing -f. ! ! Tue Aug 9 02:02:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa.md (default set high): Do not accept function label arithmetic ! as a valid operand. ! (default lo_sum): Likewise. ! * pa.c (hppa_legitimize_address): Do nothing with function label ! arithmetic. ! (emit_move_sequence): Split up function label arithmetic so that ! function's address is loaded first, then constant part is added to ! the function's address. ! (is_function_label_plus_const): New function. ! ! Mon Aug 8 19:57:05 1994 Matthias Pfaller (leo@marco.de) ! ! * ns32k.md (all patterns that use ins/inss and ext/exts): ! Disallow use of these instructions when -mnobitfield is ! specified. ! * ns32k.h (TARGET_BITFIELD): New macro. ! (TARGET_SWITCHES): Support for TARGET_BITFIELD. ! * ns32k/netbsd.h (TARGET_DEFAULT): Added -mnobitfield. ! (CPP_PREDEFINES): Added -Dpc532. ! (WCHAR_{TYPE, UNSIGNED, TYPE_SIZE}): Changed to match new definition ! in NetBSD 1.0. ! * ns32k.c (print_operand_address): A patch for 2.5.8 ended up at the ! wrong place. Moved. ! ! Mon Aug 8 19:42:09 1994 Paul Eggert (eggert@twinsun.com) ! ! * cccp.c (create_definition): Warn about `#define a@', since a ! diagnostic is now required (see ISO TC1's addition to ! subclause 6.8). Also warn about `#define is-empty(x) (!x)'. ! ! Mon Aug 8 16:32:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * fix-header.c (write_rbrac): Set up to use fixed headers ! if __USE_FIXED_HEADERS__ is defined. ! * reload1.c (emit_reload_insns): Always clear new_spill_reg_store. ! * reload.c (find_reloads): Force reload for paradoxical SUBREG ! of MEM if BYTES_BIG_ENDIAN. ! * m68k/hp320.h (READONLY_DATA_SECTION): Remove definition. ! * function.c (expand_function_start): Only use ! static_chain_incoming_rtx once if it is a REG and we ! have SMALL_REGISTER_CLASSES. ! * local-alloc.c (find_free_reg): Fix typo in last change. ! * rs6000.h (CLASS_CANNOT_CHANGE_SIZE): New macro. ! Sun Aug 7 08:54:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * regs.h (reg_changes_size): Add declaration. ! * flow.c (reg_changes_size): New variable. ! (allocate_for_life_analysis): Allocate and initialize it. ! (mark_used_regs, case SUBREG): Set it. ! * local-alloc.c (qty_changes_size): New variable. ! (alloc_qty{,_for_scratch}, update_qty_class): Set it. ! (local_alloc): Allocate it. ! (find_free_reg): If CLASS_CANNOT_CHANGE_SIZE, avoid its registers ! if qty_changes_size. ! * global.c (find_reg) If CLASS_CANNOT_CHANGE_SIZE, avoid its ! registers if reg_changes_size. ! * stupid.c (regs_change_size): New variable. ! (stupid_life_analysis): Alloc, init and pass it to stupid_free_reg. ! (stupid_mark_regs): Set it. ! (stupid_find_reg): New arg, CHANGES_SIZE; avoid regs ! in CLASS_CANNOT_CHANGE_SIZE if defined and CHANGES_SIZE nonzero. ! * reload.c (push_reload): Make test in LOAD_EXTEND_OP case more ! precise; handle CLASS_CANNOT_CHANGE_SIZE. ! (find_relods): When setting force_reloads, make LOAD_EXTEND_OP ! case more precise. ! * alpha.h (CLASS_CANNOT_CHANGE_SIZE): New macro. ! * reload1.c (eliminate_regs, case SUBREG): Add USE of pseudo ! so we don't improperly delete an output reload. ! Fri Aug 5 15:08:39 1994 Jason Merrill (jason@deneb.cygnus.com) ! * expr.c (expand_expr, COND_EXPR case): Use truthvalue_conversion ! to make the condition for running cleanups acceptable to ! invert_truthvalue. ! Fri Aug 5 12:29:42 1994 Jim Wilson (wilson@cygnus.com) ! * expmed.c (expand_mult): Accept DImode for synth_mult only if ! CONST_DOUBLE_HIGH is zero. Reject negative values for synth_mult ! if the mode is larger than HOST_BITS_PER_INT. Don't do the ! negate_variant if the mode is larger than HOST_BITS_PER_INT. ! Fri Aug 5 12:23:17 1994 Stephen L Moshier (moshier@world.std.com) ! * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Use long instead of ! HOST_WIDE_INT. ! Fri Aug 5 12:18:18 1994 Kaveh R. Ghazi (ghazi@caip.rutgers.edu) ! * configure: In subdirectories, make link to include directory. ! * Makefile.in (distclean): Delete it. ! Thu Aug 4 17:21:02 1994 Jason Merrill (jason@deneb.cygnus.com) ! * expr.c (defer_cleanups_to): Put back line which was mistakenly ! removed. ! Wed Aug 3 21:37:31 1994 Doug Evans (dje@cygnus.com) ! * sparc.c (v9 sparc_builtin_saveregs): Save quadword fp regs on ! 16 byte boundaries. Handle non-zero number of named fp args. ! * va-sparc.h (v9 va_start): Pass an arg to __builtin_next_arg. ! (v9 va_arg): Advance over float's. ! Wed Aug 3 11:10:32 1994 Ian Lance Taylor (ian@mole.gnu.ai.mit.edu) ! * fixincludes: Changes for glibc. In the main loop, don't fix ! files which contain the string ``This file is part of the GNU C ! Library''. Don't include in if ! contains the string ``__need___va_list''. In , don't ! change GNUC_VA_LIST to GNUC_DUMMY_VA_LIST. Don't add extern "C" ! to if it contains the string ``__BEGIN_DECLS''. Don't ! add multiple inclusion protection to or if ! they contain the string ``#ifndef''. ! Tue Aug 2 18:38:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (simplify_unary_operation): Clean up some mode and ! size checks with CONST_DOUBLEs; TRUNCATE should do nothing. ! * combine.c (subst_prev_insn): Remove variable and all uses. ! Tue Aug 2 14:42:29 1994 Doug Evans (dje@canuck.cygnus.com) ! ! * sparc.h (V9_SWITCHES): Add -mmedlow, -mmedany. ! (TARGET_OPTIONS): Delete. ! (CONDITIONAL_REGISTER_USAGE): Don't unfix %g4 if -mmedany. ! * sparc.c (sparc_code_model): Delete. ! (sparc_override_options): Code model flags only useable with v9. ! ! * sparc.h (enum reg_class): New values EXTRA_FP_REGS, ! GENERAL_OR_EXTRA_FP_REGS for the v9 case. ! (REG_CLASS_NAMES): Likewise. ! (REG_CLASS_CONTENTS): Likewise. ! (REGNO_REG_CLASS): Handle EXTRA_FP_REGS. ! (REG_CLASS_FROM_LETTER): Likewise, as `e'. ! Treat `e' like `f' in v8 case. ! (FP_REG_CLASS_P): New macro. ! (PREFERRED_RELOAD_CLASS): Use it. ! (SECONDARY_INPUT_RELOAD_CLASS, SECONDARY_OUTPUT_RELOAD_CLASS, ! SECONDARY_MEMORY_NEEDED, CLASS_MAX_NREGS, REGISTER_MOVE_COST): ! Likewise. ! * sparc.md (all DF/TFmode patterns): Use `e' in contraint field ! instead of `f'. ! ! Mon Aug 1 20:05:51 1994 Roland McGrath ! ! * config/i386/gnu.h: New file. ! * configure (i[34]86-*-gnu*): Deal with this on its own, not like ! i[34]86-*-mach*. Use i386/gnu.h and t-libc-ok; set gnu_ld and ! gas, and disable fixincludes. ! ! Mon Aug 1 19:27:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * tree.c (permanent_allocation): When freeing to ! momentary_function_firstobj, set momentary_firstobj to be ! the next available location (i.e., momentary_function_firstobj). ! ! Mon Aug 1 18:52:40 1994 Chris Arthur (csa@gnu.ai.mit.edu) ! ! * stddef.h: Handle _BSD_WCHAR_T_ like _WCHAR_T_, since ! at least BSD/386 1.1 uses the former instead of the latter. ! If _BSD_RUNE_T_ is defined, then define rune_t when we define ! wchar_t. Test definedness of _GCC_SIZE_T as well as ! _GCC_SIZE_T_; likewise for _GCC_PTRDIFF_T and _GCC_WCHAR_T. ! ! Mon Aug 1 05:20:44 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa-ghpux.h, pa-hpux.h (LINK_SPEC): Any -g argument implies ! static linking. ! ! Sun Jul 31 17:19:37 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * integrate.c (expand_inline_function): Don't fall down trying to ! pass things by invisible reference. ! ! Sun Jul 31 06:56:46 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * cccp.c (my_strerror): New function. ! (error_from_errno, perror_with_name): Use it. ! ! Sat Jul 30 12:59:01 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * fold-const.c (fold_truthop): Apply masks to constants. ! ! * print-tree.c (print_node{,_brief}): Use correct printf code to ! print INTEGER_CST if HOST_WIDE_INT is wider than int. ! ! * expmed.c ({store,extract}_bit_field): Don't use bitfield insn ! if OP0 is register and bitfield spans it. ! ! * m88k.c (arith64_operand): Integer CONST_DOUBLE is not DImode. ! * sparc.c (reg_or_0_operand): Likewise. ! * ns32k.c, pa.c (print_operand): Likewise. ! * fx80.h, gmicro.h, ns32/{genix,merlin}.h (PRINT_OPERAND): Likewise. ! * m68k/crds.h, m68k/news.h, pyr.h (PRINT_OPERAND): Likewise. ! ! * alpha.h (CASE_VECTOR_PC_RELATIVE): Define. ! (ASM_OUTPUT_ADDR_VEC_ELT): Abort. ! (ASM_OUTPUT_ADDR_DIFF_ELT): Now what used to be previous definition. ! * alpha.md (tablejump): Rework to look like normal add but verify ! that label is for next insn and is tablejump; look for ADDR_DIFF_ELT. ! * cse.c (fold_rtx, case MEM): Surround TRUNCATE for jump table ! entry with a CONST. ! (fold_rtx, case '1'): Handle operand 0 of a CONST. ! (fold_rtx, case PLUS): Handle (const (minus (label_ref) (label_ref))). ! ! Fri Jul 29 19:27:17 1994 Lee Iverson (leei@ai.sri.com) ! ! * c-decl.c (finish_decl): Preserve initialializer if iterator. ! ! Fri Jul 29 19:07:23 1994 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) ! ! * libgcc2.c: Add declaration of ctime. ! * bc-emit.c (bc_sym_write): Change %d to %lu in printf calls. ! * fix-header.c (write_{l,r}brac): Specify return type of int. ! * tree.c (change_main_variant): Return type now void. ! * varasm.c (bc_output_constructor): Return type now rtx. ! ! Fri Jul 29 18:33:48 1994 Ken Duda (kjd@cache.crc.ricoh.com) ! ! * c-typeck.c (build_unary_op, case *INCREMENT_EXPR): ! Add size in bytes, not value of sizeof. ! ! Fri Jul 29 17:36:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * function.c (expand_function_start): Initialize VALUE_ADDRESS. ! ! * romp.md (tst?f): Use CONST0_RTX instead of incorrect call ! to immed_real_const_1. ! ! * expr.c (move_block_to_reg): Do nothing if NREGS == 0. ! ! Fri Jul 29 17:17:18 1994 Tom Tromey (tromey@busco.lanl.gov) ! ! * cccp.c (special_symbol, do_xifdef): Don't access value.defn ! of a T_CONST. ! ! Thu Jul 28 17:19:32 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Reverse order of execution ! of constuctor lists. ! * config/svr3.h (DO_GLOBAL_CTORS_BODY): Ditto. ! ! * libgcc2.c (__do_global_dtors): Reverse order of execution of ! destructor lists. ! ! Thu Jul 28 19:56:30 1994 Jim Pendergraft (jimp@dg-rtp.dg.com) ! ! * dwarfout.c (output_decl, case FUNCTION_DECL): Corrected ! and simplified code that determined when to generate ! varargs or ANSI stdargs variable length parameter list ! DWARF information. ! ! Thu Jul 28 19:38:57 1994 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) ! ! * m68k.md (extv, extzv): In patterns that will use movb and ! movw, ensure size is 8 or 16. ! ! Thu Jul 28 19:28:31 1994 David Robinson (drtr@mail.ast.cam.ac.uk) ! ! * expr.c (expand_expr, case CONJ_EXPR): Use correct mode for ! parts of a complex expression. ! ! * optabs.c (expand_binop, case MULT [complex]) Fix typo. ! ! Thu Jul 28 19:21:38 1994 Uwe Seimet (seimet@chemie.uni-kl.de) ! ! * am68k/atari.h (FUNCTION_VALUE): New override. ! ! Thu Jul 28 17:27:38 1994 Paul Eggert (eggert@twinsun.com) ! ! * Makefile.in (c-lex.o, distdir-start): ! Depend on $(srcdir)/c-gperf.h, not c-gperf.h. ! ! Thu Jul 28 15:14:33 1994 Oliver Kellogg (okellogg@salyko.cube.net) ! ! * m1750.inc (DNR.M): Add missing macro. ! ! Thu Jul 28 13:02:56 1994 Kresten Krab Thorup (krab@akvavit) ! ! * objc/misc.c (__objc_xcalloc): Remove declaration of bzero. ! ! Thu Jul 28 07:29:52 1994 Markus Wild (mw@eunet.ch) ! ! * c-common.c (decl_attributes): Correct string check for "format" ! to include unsigned and signed char. ! ! Thu Jul 28 07:11:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (compare_spill_regs): Simplify and return zero if ! registers are the same. ! ! * c-decl.c (finish_struct): Don't look at alignment of error_mark_node. ! ! * combine.c (try_combine): Don't make a MULT if none of the insns ! in our input had one. ! ! Wed Jul 27 19:06:53 1994 R Bowler (rbowler@cix.compulink.co.uk) ! ! * i370/mvs.h (ASM_OUTPUT_ASCII): Fix bug when first character ! of string constant is single quote. ! ! Wed Jul 27 22:44:32 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * m68k/next.h: #undef PCC_STATIC_STRUCT_RETURN. ! ! * alpha/alpha.h: #define NO_IMPLICIT_EXTERN_C. ! ! Wed Jul 27 14:06:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expmed.c (expand_mult): Properly set ADD_TARGET for add_variant. ! ! * alpha.h (INITIAL_ELIMINATION_OFFSET): Properly compute offset ! between AP and SP when get_frame_size and ! current_function_pretend_args_size are not a multiple of 16 bytes. ! ! * expmed.c (expand_divmod): Don't make REG_NOTE if last insn's ! destination isn't QUOTIENT. ! ! Tue Jul 26 19:45:54 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expr.c (expand_expr, case ARRAY_REF): Don't fold L"foo"[2]. ! ! Tue Jul 26 14:10:52 1994 Per Bothner (bothner@kalessin.cygnus.com) ! ! * config.sub: Refer to NeXT's operating system as nextstep. ! Tue Jul 26 13:50:37 1994 Jim Wilson (wilson@cygnus.com) ! * c-typeck.c (process_init_element): Do not call push_init_level ! if the value is error_mark_node. ! * iris5.h (NO_IMPLICIT_EXTERN_C): Define. ! Mon Jul 25 00:20:36 1994 Chris Arthur (csa@gnu.ai.mit.edu) ! * configure (canon_target): add cases to recognize BSD/386 ! specifically, so we can use a tm_file that will cause __bsdi__ ! to get defined (since emacs, among other things, needs it). ! * config/i386/bsd386.h: New. Use 386bsd.h, and just override ! CPP_PREDEFINES (add -Dbsdi) and WCHAR stuff. ! Sat Jul 23 16:30:12 1994 Kaveh R. Ghazi (ghazi@caip.rutgers.edu) ! * fixinc.svr4: Change i860 in #if to __i860__, as with other CPUs. ! Fri Jul 22 14:33:59 1994 Doug Evans (dje@cygnus.com) ! * h8300.md (andhi3, iorhi3, xorhi3): Change constraint on ! operand 2 from `i' to `n'. ! Fri Jul 22 09:30:39 1994 DJ Delorie (dj@ctron.com) ! * configure.bat: move code to config/msdos/* (simplification) ! * config/msdos/configure.bat [new file]: moved most processing ! here so that as things get more complicated with the language ! breakouts, the top directory won't get too messy. Sed script ! broken out to simplify processing and avoid quoting errors. ! * config/msdos/top.sed [new file]: sed script to change Makefile.in ! to Makefile in top directory (currently used for cp directory also) ! sed commands changed to handle language breakout ! * gcc.c (pexecute): use spawn*() for djgpp to ensure that quotes ! are properly preserved. Response file code left for 16-bit ! compilers, which can't handle the long command lines that gcc ! may generate. ! * config/i386/go32.h: define NO_IMPLICIT_EXTERN_C. ! Thu Jul 21 23:19:03 1994 Steve Chamberlain (sac@wombat.gnu.ai.mit.edu) ! * sh/sh.h (TARGET_SWITCHES, PACKSTRUCT_BIT, STRUCTURE_SIZE_BOUNDARY): ! parse and handle new option. ! (LEGITIMATE_CONSTANT_P): LABEL_REFs are no longer illegal. ! (WCHAR_TYPE, WCHAR_TYPE_SIZE): New definitions. ! (HANDLE_PRAGMA): Has return. ! * sh/sh.c (add_function, seen_function): Experimental code to ! generate bsrs. ! (handle_pragma): Return final char. ! (expand_acall): Handle TARGET_BSR. ! (general_movdst_operand, general_movsrc_operand): Allow ok ! autoinc/dec. ! (bsr_operand): New function. ! (fixit): Need to fix LABEL_REFs. ! * sh/sh.md (addc): Simplify. ! (adddi3, subdi3, negdi3): Use operand_subword. ! (subc, negc): New pattern. ! (shifts): Fix constraints. ! Thu Jul 21 17:59:43 1994 Jim Wilson (wilson@cygnus.com) ! * objc-act.c (build_module_descriptor): Don't set DECL_EXTERNAL on ! current_function_decl. ! * combine.c (simplify_rtx): For (not (xor X C)) generate new rtx ! instead of modifying old rtx. ! * c-decl.c (start_function): If old_decl is NULL, then set it to ! the implicit decl if any. Delete superfluous test from warn missing ! prototypes code. For warn missing declarations code, only warn if ! previous decl is implicit. ! Thu Jul 21 17:47:05 1994 Paul Eggert (eggert@twinsun.com) ! * fold-const.c (fold): Don't fold X-X to 0 if X is floating point ! and !flag_fast_math. ! Thu Jul 21 02:07:45 1994 Charles Levert (charles@comm.polymtl.ca) ! * Makefile.in (stmp-multilib): Rework to handle make -n. ! (stmp-multilib-sub): New target. ! Tue Jul 19 23:14:42 1994 Larry Jones (larry.jones@sdrc.com) ! * configure (i[34]86-*-isc*): Treat isc4 like isc3. ! Remove references to nonexistant files and add extra_parts ! when needed. ! (i[34]86-*-solaris2*): Remove reference to nonexistant ! t-sco and use extra_parts instead. ! (i[34]86-*-sysv*, i860-*-sysv3*, m68k-*-sysv3*, m68k-ncr-sysv*): ! Replace t-svr3 with extra_parts. ! Tue Jul 19 20:31:34 1994 Doug Evans (dje@cygnus.com) ! * configure (find lang subdirs loop): Try to work around an ! apparent bug in bash 1.12 on linux. ! * Makefile.in (clean): Remove multilib build dirs. ! * h8300.c (print_operand, default case): Handle SFmode regs. ! Mon Jul 18 22:02:53 1994 Jim Wilson (wilson@cygnus.com) ! * sparc.c (call_operand): Use symbolic_operand not CONSTANT_P. ! (call_operand_address): Likewise. ! * sparc.md (call*): Use symbolic_operand not immediate_operand. ! Use 's' constraint not 'i' constraint. ! * toplev.c (rest_of_compilation): Clear DECL_ABSTRACT_ORIGIN if ! clear DECL_INLINE. ! * global.c (find_reg): Store divide results in temporary variables. ! * gcc.c (process_command): When have -BstageN option, pass include ! not stageN/../include to preprocessor. ! Mon Jul 18 21:58:27 1994 Torbjorn Granlund (tege@tiny.cygnus.com) ! * loop.c (move_movables): Aviod lossage when CALL_INSN_FUNCTION_USAGE ! is NULL. ! Mon Jul 18 20:53:54 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixincludes: Rework required loop to avoid crash on decstation. ! Thu Jul 14 09:42:23 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * Version 2.6.0 released. ! * explow.c (force_reg): Don't make a REG_EQUAL note for an insn ! that doesn't set TEMP. ! Wed Jul 13 17:00:35 1994 Torbjorn Granlund (tege@rtl.cygnus.com) ! * expmed.c (expand_divmod, case CEIL_DIV_EXPR): ! Handle emit_store_flag returning 0. ! Wed Jul 13 16:35:57 1994 Jim Wilson (wilson@cygnus.com) ! * expr.c (store_field): Set MEM_IN_STRUCT_P on object and ! blk_object. ! Wed Jul 13 08:40:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * Makefile.in (distdir-start): Make tmp/ginclude and copy its files. ! (distdir-finish): Don't use -f Makefile.in. ! (gcc.xtar.gz): Add --best. ! * fold-const.c (decode_field_reference): Merge operand of ! a BIT_AND_EXPR with the mask made from the description of the field. ! * fold-const.c (fold, case MULT_EXPR): Remove last change. ! Wed Jul 13 07:12:32 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! * xm-pa.h, xm-pahpux.h, xm-pahiux.h (USE_C_ALLOCA): Define. ! Wed Jul 13 03:30:36 1994 Jason Merrill (jason@deneb.cygnus.com) ! * tree.h (TYPE_NEEDS_CONSTRUCTING): New macro. ! (tree_type): Add needs_constructing_flag. ! * function.c (assign_parms): If TYPE_NEEDS_CONSTRUCTING, pass by ! invisible reference. ! * calls.c (expand_call): Ditto. ! Wed Jul 13 06:49:05 1994 Simon Cooper (scooper@hardees.rutgers.edu) ! * objc/Object.m: Include stdarg.h before stdio.h. ! Tue Jul 12 21:31:59 1994 Jim Wilson (wilson@cygnus.com) ! * c-decl.c (pushdecl): Don't call lookup_name_current_level_global ! when traditional. When doing checks against ! IDENTIFIER_LIMBO_VALUE, also do check against ! INDENTIFIER_GLOBAL_VALUE when traditional. ! * final.c (getpwd): Declare. ! Tue Jul 12 16:24:10 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa.h (GO_IF_LEGITIMATE_ADDRESS): Only allow immediate addressing ! using 5 bits to avoid losing with FP loads and stores on page zero. ! Tue Jul 12 16:20:09 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.md (ashlsi3, lshrsi3, ashrsi3): Only output low-order five ! bits for !TARGET_POWER case. ! Tue Jul 12 13:06:14 1994 Jim Wilson (wilson@cygnus.com) ! * combine.c (record_dead_and_set_regs_1): Can only handle SUBREG ! if the register is smaller or equal to BITS_PER_WORD. ! * sparc/sysv4.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Define. ! * final.c (end_final): Store full path name in .d file not just ! the filename. ! * README.IRIX5: New file. ! Tue Jul 12 10:55:14 1994 Michael Meissner (meissner@osf.org) ! * i386/osfrose.h (CC1_SPEC): If both -pic-extern/-pic-lib and ! -pic-none, use -pic-extern win, instead of -pic-none. ! * i386/osfelf.h (CC1_SPEC): Ditto. ! Tue Jul 12 09:08:06 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload.c (find_reloads): Don't try to call force_const_mem on ! a HIGH. ! * fold-const.c (fold, case MULT_EXPR): If arg is an unsigned ! CEIL_DIV_EXPR, convert to TRUNC_DIV_EXPR of a PLUS_EXPR in some cases. ! * alpha.md (ashldi3): Update pattern for (sign_extend (ashift ..)) ! to match the current canonicalization. ! * explow.c (round_push, allocate_dynamic_stack_space): Avoid ! using CEIL_DIV_EXPR; add adjustment and use TRUNC_DIV_EXPR instead. ! Tue Jul 12 08:12:04 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * dbxout.c (dbxout_source_file): Increment source_label_number outside ! of macro expansion. ! * arm.c (reversible_cc_register): New function. ! (final_prescan_insn): Don't try to conditionalize jumps with JUMP_CLOB ! attribute. ! * arm.h (PREDICATE_CODES): Add reversible_cc_register. ! * arm.md (matcher for SFmode inequality comparison): Use cmfe, not cfm. ! (matchers for {store-flag, not-store-flag, neg-store-flag}): Output ! if-false instruction first before if-true instruction. ! (matcher for (AND store-flag x)): Only match if reversible_cc_register. ! (matcher for (IF-THEN-ELSE reg (NOT reg))): Likewise. ! * arm.h (FRAME_POINTER_REQUIRED): Always true if the function has ! nonlocal labels. ! * arm.md ({save,restore}_stack_nonlocal): Delete. ! Mon Jul 11 19:29:15 1994 Oliver Kellogg (okellogg@salyko.cube.net) ! * machmode.def (TQFmode): New mode. ! * expr.c (convert_move): Add some conversions for TQFmode. ! * varasm.c (assemble_real): Handle TQFmode output. ! * config.sub (basic_machine): Add 1750a. ! * configure (1750a-*-*): New configuration. ! * 1750a.c, 1750a.h, 1750a.md, m1750a.inc: New files. ! Mon Jul 11 18:38:42 1994 Doug Evans (dje@cygnus.com) ! Add support for the h8/300h cpu. ! * config/h8300/lib1funcs.asm: New file. ! * h8300/t-h8300 (CROSS_LIBGCC1): Use libgcc1-asm.a. ! (LIB1ASMSRC, LIB1ASMFUNCS, LIB2FUNCS_EXTRA, MULTILIB_OPTIONS, ! MULTILIB_DIRNAMES, LIBGCC, INSTALL_LIBGCC): Define. ! (fp-bit.c): Build it. ! * h8300/h8300.h (CPP_PREDEFINES, CPP_SPEC, LIB_SPEC, TARGET_SWITCHES, ! BITS_PER_WORD, MAX_BITS_PER_WORD, UNITS_PER_WORD, MAX_UNITS_PER_WORD, ! POINTER_SIZE, PARM_BOUNDARY, BIGGEST_ALIGNMENT, ! BIGGEST_FIELD_ALIGNMENT, STACK_BOUNDARY, HARD_REGNO_NREGS, ! HARD_REGNO_MODE_OK, REG_CLASS_NAMES, REG_CLASS_CONTENTS, ! REGNO_REG_CLASS, PUSH_ROUNDING, FUNCTION_ARG_ADVANCE, ! TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE, ! CONSTANT_ADDRESS, MOVE_MAX, Pmode, SIZE_TYPE, PTRDIFF_TYPE): ! Add h8/300h support. ! (LINK_SPEC, TARGET_RTL_DUMP, TARGET_H8300, TARGET_H8300H, ! REAL_ARITHMETIC, SETUP_INCOMING_VARARGS, HAVE_POST_INCREMENT, ! HAVE_PRE_DECREMENT, MAX_MOVE_MAX, NO_BUILTIN_SIZE_TYPE, ! NO_BUILTIN_PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE, ! MAX_WCHAR_TYPE_SIZE, ASM_WORD_OP, INIT_SECTION_ASM_OP, ! CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, EXTRA_SECTIONS, ! EXTRA_SECTION_FUNCTIONS, ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR, ! DO_GLOBAL_CTORS_BODY, DO_GLOBAL_DTORS_BODY, INIT_TARGET_OPTABS): ! Define. ! (CAN_DEBUG_WITHOUT_FP, PCC_STATIC_STRUCT_RETURN, STRUCT_VALUE_REGNUM, ! STRUCT_VALUE_INCOMING, STRUCTURE_SIZE_BOUNDARY): Undefine. ! (enum reg_class): Add h8/300h support. ! (emit_a_shift): Declare. ! (TARGET_DEFAULT): Set default to -mquickcall. ! (DOUBLE_TYPE_SIZE): Fix at 32. DFmode support doesn't exist. ! (CALL_USED_REGISTERS, REG_ALLOC_ORDER): Swap registers 2,3 with 4,5. ! Registers 0,1 contain function result, allocate after 2,3. ! (STATIC_CHAIN_REGNUM): Use reg 4. ! (CONST_OK_FOR_LETTER_P): 'O' is ok_for_bclr, 'P' is small_power_of_two. ! (FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): First ! attempt at an implementation. ! (CONST_COSTS): Move code into function const_costs. ! (BRANCH_COST): Set to 0. ! (NOTICE_UPDATE_CC): Move code into function notice_update_cc. ! (ASM_FILE_START): Move code into function asm_file_start. ! (ASM_FILE_END): Move code into function asm_file_end. ! (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Use REAL_VALUE_TO_DECIMAL. ! * h8300/h8300.c (cpu_type, names_extended, names_upper_extended, ! h8_reg_names, h8_push_ops, h8_pop_ops, h8_mov_ops, h8_push_op, ! h8_pop_op, h8_mov_op, current_function_anonymous_args, extra_pop, ! hand_list): New variables. ! (h8300_init_once, asm_file_start, asm_file_end, ok_for_bclr, o_operand, ! p_operand, call_insn_operand, jump_address_operand, bit_operand, ! eq_operator, const_costs, notice_update_cc, bit_operator, ! nshift_operator, expand_a_shift, get_shift_alg, emit_a_shift, ! fix_bit_operand): New functions. ! (shift_alg, shift_type, shift_mode): New enums. ! (shift_insn): New struct. ! (shift_n_bits, can_shift): Deleted. ! (shift_one, rotate_one): New variables. ! (WORD_REG_USED): New macro (was function word_reg_used). ! (dosize, function_prologue, function_epilogue, print_operand_address): ! Add h8/300h support. ! (small_power_of_two): Renamed from potl8. ! (potg8): Deleted. ! (general_operand_src): Fix POST_INC case. ! (general_operand_dst): Fix PRE_DEC case. ! (function_arg): 3 regs of args are passed if -mquickcall. ! 4 regs of args are passed to handwritten assembler routines. ! (print_operand): New cases 'A', 'P', 'S', 'U', 'W', 'b', 'c', 'd', 'g'. ! Delete case 'O'. Sort cases. Add h8/300h support. ! (do_movsi): Renamed from domovsi. ! Handle reload_in_progress and reload_completed. ! (initial_offset): Renamed from io. Add h8/300h support. ! * h8300/h8300.md (cpu): New attribute. ! (attribute length): Add h8/300h support. ! (attribute cc): New value `cbit'. ! (all anonymous insns): Give them names. ! (move insns): Add h8/300h support. ! (tstqi, tsthi): Use btst insn if able. ! (arithmetic insns): Add h8/300h support. ! (boolean insns): Likewise. ! (negate insns): Likewise. ! (branch insns): Likewise. ! (call_value): Use call_insn_operand for operand 1. ! (shift insns): Completely rewritten. Add h8/300h support. ! (zero/sign extension insns): Add h8/300h support. ! (extv): Deleted. ! (insv, extzv): Only use for h8/300. ! (bitfield insns): Completely rewritten. ! (fancyb*): New insns for speeding up bit accesses. ! * optabs.c (init_optabs): Allow target specific libcalls ! with INIT_TARGET_OPTABS. ! Mon Jul 11 18:32:42 1994 Steve Chamberlain (sac@cygnus.com) ! * config/fp-bit.c: New file. Provides simple fp emulation library. ! Mon Jul 11 18:27:42 1994 Ian Lance Taylor (ian@cygnus.com) ! * Makefile.in (libgcc1-asm.a): New target for building libgcc1.a ! in cross compilers. ! Mon Jul 11 17:00:45 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.md (movsi matcher): Add nop for moving special register ! to itself for !TARGET_POWER. ! (movhi and movqi matcher): Likewise and add mtjmpr attribute. ! Separate MQ from CTR and LR target registers for TARGET_POWER. ! * powerpc.h (CPP_SPEC): Fix typo. ! Mon Jul 11 16:50:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-parse.in (stmt): Don't give more than one error message if a ! nested `if' has an empty body. ! * a29k.md (movqi): Call loadhi, not loadqi. ! Mon Jul 11 16:46:09 1994 Jeffrey A. Law (law@mole.gnu.ai.mit.edu) ! * pa.h (DEBUGGER_ARG_OFFSET): Define. If no frame pointer ! is available, then adjust the offset by the size of the ! current frame. ! Mon Jul 11 16:34:14 1994 Stan Shebs (shebs@andros.cygnus.com) ! * configure (*-*-lynxos*): Always run fixincludes, and if not using ! gas, set tm_file to lynx-ng.h. ! * config/x-lynx: Always run fixproto. ! * config/lynx.h, i386/lynx.h, m68k/lynx.h, sparc/lynx.h: Rewrite ! to work with gas producing coff files. ! * config/lynx-ng.h, i386/lynx-ng.h, m68k/lynx-ng.h, ! sparc/lynx-ng.h: New files. ! Mon Jul 11 15:16:28 1994 Pat Rankin (rankin@eql.caltech.edu) ! * make-cc1.com: Compile most of cc1plus in the `cp' subdirectory. ! * vmsconfig.com: When setting up tm.h, convert "vax/vax.h" into ! "config-vax.h" rather than "[.config.vax]vax.h" for #include so ! it will work from [.cp] subdirectory; copy vax.h to config-vax.h ! as part of configuration setup. Also, manually include cc1plus ! in the list of buildable compilers (a temporary measure; it ! should process cp/Makefile.in like it does for primary makefile). ! * make-cc1.com: Use `=' rather than `:=' when setting up CC, ! so that `gcc' can be defined as a foreign command if necessary; ! eliminate `set symbol/scope=noGlobal' for same reason; use `=' ! with all other symbols, for consistency; add explicit .obj ! extension to some lists of object files passed to the linker; ! general cleanup of the command text echoed during execution. ! * make-cccp.com: Revise to be more consistent with make-cc1.com ! for symbol setup & usage and for echoing command execution. ! Mon Jul 11 15:03:23 1994 Charles Hannum (mycroft@duality.gnu.ai.mit.edu) ! * configure: Recognize m68k-*-netbsd* and i[345]86-*-netbsd*. ! * cccp.c, collect2.c, gcc.c, protoize.c, cp/g++.c (sys_errlist) ! [bsd4_4]: Do this for __NetBSD__ also. ! Mon Jul 11 14:16:28 1994 Kresten Krab Thorup (krab@spiff.gnu.ai.mit.edu) ! * mips/mips.h (STRUCT_VALUE): Change definition from `(rtx)0' to ! just `0' so it is a valid expression for the pre-processor. ! Mon Jul 11 10:54:35 1994 Stan Cox (coxs@dg-rtp.dg.com) ! * configure (m88k-dg-dguxbcs): New configuration. m88k-dg-dgux ! Now builds an elf compiler. Both targets will create bcs or elf. ! * m88k/dgux.h (ASM_SPEC,STARTFILE_SPEC,LIB_SPEC): svr4 default. ! * m88k/dguxbcs.h (ASM_SPEC,STARTFILE_SPEC,LIB_SPEC): ! New target for svr3. ! * m88k/x-dgux, m88k/t-dgux, m88k/x-dguxbcs: ! Changed for svr4/svr4/svr3 respectively. ! * m88k/m88k.h (TARGET_SVR3): New target switch. ! Wed Jun 29 19:23:27 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu) ! * alpha.h (LIB_SPEC): If -pg, add -lprof2. ! ! Mon Jul 11 13:17:38 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * combine.c (simplify_set): Only turn IF_THEN_ELSE into AND if ! MODE_INT. ! ! Sun Jul 10 06:03:12 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (eliminate_regs_in_insn): Handle special case of ! assignment from hard frame pointer to frame pointer (for ! nonlocal goto). ! * function.c (instantiate_virtual_regs_1): Remove last change. ! * stmt.c (expand_end_bindings): When adjusting FP, set it ! from hard_frame_pointer_rtx. ! ! * expr.c (expand_builtin, case BUILT_IN_FSQRT): Don't use ! asterisk in name of `errno'. ! ! Fri Jul 8 22:07:32 1994 Jim Wilson (wilson@cygnus.com) ! ! * stdarg.h: Delete include of when not gcc. ! * varargs.h: Delete include of when not gcc. ! ! Fri Jul 8 18:45:56 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): Copy a0 to d0, not ! the other way. ! ! Fri Jul 8 17:41:39 1994 Jim Wilson (wilson@cygnus.com) ! ! * expr.c (get_inner_unaligned_p): New function. ! (expand_assignment, expand_expr): Use it. ! ! Fri Jul 8 17:16:25 1994 Doug Evans (dje@cygnus.com) ! ! * expmed.c (extract_split_bit_field): Set UNIT to BITS_PER_WORD for ! register values. ! (store_split_bit_field): Likewise. Call operand_subword_force. ! ! Fri Jul 8 13:48:23 1994 Mike Stump (mrs@cygnus.com) ! ! * expr.c (target_temp_slot_level): New variable to keep track of ! the current stack level for temporaries created by TARGET_EXPRs. ! * expr.h (target_temp_slot_level): Declare it. ! * expr.c (expand_expr): Add code to maintain the new temporary ! stack for TARGET_EXPRs to the CLEANUP_POINT_EXPR code and change ! the allocation of temporaries for TARGET_EXPRs to be from the new ! stack, so that they may live longer, and only be reused after they ! are no longer in use. ! * function.c (assign_stack_temp): KEEP can now also be 2, to ! indicate allocation from the longer term frontend controlled ! temporary stack. ! * function.c (init_function_start): Initialize ! target_temp_slot_level to zero. ! ! Fri Jul 8 16:52:38 1994 Jim Wilson (wilson@cygnus.com) ! ! * combine.c (distribute_notes, REG_DEAD case): When check to see ! if insn uses register, also call find_regno_fusage. ! ! * sparc.h (SECONDARY_MEMORY_NEEDED_RTX): Call assign_stack_local ! if the frame has zero size. ! ! Fri Jul 8 11:46:50 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * varasm.c (record_constant_rtx, force_const_mem): Ensure everything ! is in saveable_obstack, not current_obstack. ! ! * combine.c (force_to_mode): OP_MODE must be MODE if MODE and ! mode of X are of different classes. ! (nonzero_bits, num_sign_bit_copies): Say nothing known for ! floating-point modes. ! ! * function.c (instantiate_virtual_regs_1, case SET): ! If DEST is virtual_stack_vars_rtx, replace with hardware ! frame pointer. ! ! * expr.c (expand_expr, case CONVERT_EXPR): If changing signedness ! and we have a promoted SUBREG, clear the promotion flag. ! ! * c-decl.c (finish_decl): Put RTL and other stuff in ! permanent_obstack if DECL is. ! ! * combine.c (gen_unary): Add new arg, OP0_MODE. ! All callers changed. ! ! Thu Jul 7 19:58:35 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * varasm.c (assemble_variable): Do set TREE_ASM_WRITTEN on ! erroneous incomplete decls. ! ! Thu Jul 7 17:59:46 1994 Joseph Arceneaux (jla@gnu.ai.mit.edu) ! ! * configure (m68k-motorola-sysv*): Use mot3300g.h for gas. ! * m68k/mot3300g.h: New file. ! ! Thu Jul 7 17:42:21 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): Fix typo in last change. ! ! Thu Jul 7 17:36:26 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expmed.c (expand_mult_highpart): Build constant forms of CNST1 ! in MODE or WIDE_MODE, as appropriate. ! ! * optabs.c (expand_binop, case DIV [complex]): Fix typo in last change. ! ! * alpha.md (reload_inqi): Make operand[2] be TImode and ! pass register number that differs to unaligned_loadqi. ! (reload_outqi): Change overlap in temps to unaligned_storeqi. ! * alpha.c ({un,}aligned_memory_operand): Check against ! hard_frame_pointer_rtx, not frame_pointer_rtx. ! ! Thu Jul 7 01:39:33 1994 Doug Evans (dje@cygnus.com) ! ! * combine.c (make_compound_operation, AND case): Do extraction in ! desired result mode. ! ! * flow.c (mark_set_1): Record explicit hard registers in their ! raw mode. ! (mark_used_regs): Likewise. ! * combine.c (distribute_notes): Likewise. ! ! Wed Jul 6 14:45:08 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * longlong.h (vax sdiv_qrnnd): Fix typo. ! ! Wed Jul 6 19:59:12 1994 Mike Stump (mrs@cygnus.com) ! ! * expr.c (expand_expr, defer_cleanups_to, expand_cleanups_to): All ! cleanups have to be protected by interim exception handling code. ! * stmt.c (expand_decl_cleanup, expand_cleanups): Ditto. ! * toplev.c (interim_eh_hook): Hook for interim exception handling. ! * toplev.c (interim_eh): Default implementation for exception ! handling that does nothing. ! * toplev.c (main): Set default for interim_eh_hook. ! ! Wed Jul 6 17:56:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * alpha.c (output_prolog): Start memory probing with $2. ! ! Wed Jul 6 14:21:14 1994 Jim Wilson (wilson@cygnus.com) ! ! * stmt.c (struct nesting): Add new field alt_end_label. ! (expand_start_loop): Initialize it to zero. ! (expand_end_loop): Reorder loop if find either a jump to end_label ! or a jump to alt_end_label. ! (expand_exit_loop_if_false): Set alt_end_label. ! ! Wed Jul 6 05:07:31 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * c-common.c (decl_attributes): If TREE_TYPE for the DECL is updated, ! then update TYPE as well. ! ! * longlong.h (arm umul_ppmm): Fix use of uninitialized register. ! Eliminate clobbers of hard registers. ! ! Wed Jul 6 03:22:04 1994 Torbjorn Granlund (tege@rtl.cygnus.com) ! ! * expmed.c (expand_divmod): Clear out TARGET also if OP1 is a ! constant, when TARGET == OP0. ! ! Tue Jul 5 18:58:28 1994 Torbjorn Granlund (tege@rtl.cygnus.com) ! ! * Makefile.in (c-parse.y): Redirect through tmp file. ! (objc-parse.y): Likewise. ! (c-gperf.h): Likewise. ! (mostlyclean): Delete the new tmp files. ! ! * expmed.c (expand_divmod): Fix typo setting op1_is_pow2. ! (expand_divmod): Handle powers-of-two specifically for unsigned ! CEIL_*_EXPR. ! ! * longlong.h: Really fix the test for _IBMR2. Change test of ! __powerpc__ to _ARCH_PPC. ! ! Tue Jul 5 17:00:19 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * combine.c (try_combine): Don't check for replacing ! arg of function here. ! (can_combine_p): Do it here. ! ! * expr.c (expand_increment): If pre-incrementing a promoted ! variable, don't adjust OP0 since the result won't be used. ! ! * jump.c (duplicate_loop_exit_test): Handle SUBREG in SET_DEST ! of loop exit test statements. ! ! * combine.c (try_combine): If I2DEST was used in I2SRC, it isn't ! unused just because there is no SET for I2 anymore. ! ! Mon Jul 4 11:15:13 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * rs6000.h (RS6000_OUTPUT_BASENAME): Always call assembler_name ! and pass the actual symbol name. ! ! * varasm.c (assemble_name): Call STRIP_NAME_ENCODING. ! ! * cse.c (canon_hash, exp_equiv_p): Refer to string in SYMBOL_REF ! with XSTR, not XEXP. ! ! Sat Jul 2 18:53:19 1994 Jim Wilson (wilson@cygnus.com) ! ! * mips.md (smuldi3_highpart, smuldi3_highpart_internal, ! umuldi3_highpart, umuldi3_highpart_internal): New patterns. ! ! * unroll.c (loop_iterations): Only use REG_EQUAL note value if it ! is constant. ! ! * dbxout.c (dbxout_type_methods): Enable debugging info for ! template classes. ! ! * c-lex.c (yylex): Reject imaginary numbers when pedantic. ! ! * c-decl.c (duplicate_decls): When make void* match char*, set ! DECL_IN_SYSTEM_HEADER. ! ! * Makefile.in (clean): Delete LIB2FUNCS_EXTRA. ! ! * alpha.h (FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, ! BLOCK_PROFILER): Use multiple fputs/fprintf calls instead of ANSI ! C concatenated strings. ! (PREDICATE_CODES): Add cint8_operand. ! ! * gcc.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -isystem. ! ! Sat Jul 2 09:34:20 1994 Torbjorn Granlund (tege@rtl.cygnus.com) ! ! * expmed.c (expand_divmod): Always return gen_lowpart (mode, ...). ! ! Fri Jul 1 19:28:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * reorg.c (make_return_insns): Make sure redirecting a jump to ! a RETURN insn does not invalidate the delay slots of the jump. ! ! Fri Jul 1 16:32:58 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * longlong.h: (arm umul_ppmm): Fix typos in last change. Mark ! hard-coded registers with "%|". ! ! Fri Jul 1 10:08:47 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * toplev.c (compile_file): Pass through static consts and inlines ! multiple times in case they reference each other. ! ! Fri Jul 1 07:41:19 1994 Torbjorn Granlund (tege@tiny.cygnus.com) ! ! * longlong.h: Test for _AM29K and _IBMR2, not ___AM29K__ ! and ___IBMR2__. ! (arm umul_ppmm): New definition. ! (clipper umul_ppmm, smul_ppmm, __umulsidi3): New definitions. ! (hppa count_leading_zeros): New definition. ! (i960 umul_ppmm, __umulsidi3): New definitions. ! (mc68000 umul_ppmm): Use %. before size suffixes. ! (mc88110 umul_ppmm, udiv_qrnnd): Rewrite, ! (mc88000): Get UMUL_TIME and UDIV_TIME right. ! (mips): Get UMUL_TIME right. ! (ns32000 umul_ppmm): New definition. ! (ns32000 udiv_qrnnd): Rename from bogus div_qrnnd, rewrite. ! (powerpc umul_ppmm, smul_ppmm): New definitions. ! (_IBMR2/powerpc add_ssaaaa, sub_ddmmss): Improve. ! (pyr umul_ppmm): Fix typo. ! (sparc add_ssaaaa, sub_ddmmss): Match constant 0 for all inputs. ! (vax sdiv_qrnnd): New definition. ! ! * expmed.c (expand_divmod): Put OP0 in a register when computing ! remainder, or when OP1 is constant. ! ! Fri Jul 1 06:46:09 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * jump.c (jump_optimize): Don't convert if (foo) x++ into an ! add of an scc unless X has no side effects and can't trap. ! ! * c-parse.in (initelt): The equal sign is optional when ! positioning to a single element of an array. ! ! * c-typeck.c (push_init_level): If not at "unfilled" position, ! set constructor_incremental to 0; likewise for range. ! ! * xm-alpha.h: If GNUC, include alloca.h, else declare alloca. ! ! * m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): New macro. ! ! * expmed.c (expand_divmod): Don't set REG_NOTES unless we generated ! a quotient. ! ! Thu Jun 30 18:25:52 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * gcc.c (do_spec_1, case 'P'): Don't add underscores to macros ! starting with '_[A-Z]'. ! ! Thu Jun 30 18:16:36 1994 Will Athanasiou (will@guardian.westford.ccur.com) ! ! * m68k.md (umulsi3_highpart, smulsi3_highpart): Fix constraint ! for operand 0 in define_insn. ! ! Thu Jun 30 16:07:33 1994 Kaveh R. Ghazi (ghazi@noc.rutgers.edu) ! ! * fixincludes: Put wrappers around and to ! avoid multiple inclusion errors on m88k-tektronix-sysv3. ! ! Thu Jun 30 12:08:48 1994 Kresten Krab Thorup (krab@spiff.gnu.ai.mit.edu) ! ! * objc-act.c, objc/init.c (OBJC_VERSION): Incremented to 6. ! ! * objc/sendmsg.c (INVISIBLE_STRUCT_RETURN): New macro. ! (__objc_block_forward): Declare depending on the above. ! ! * objc/class.c (objc_next_class): New function. ! * objc/objc-api.h (objc_next_class): New function. ! ! * objc-act.c (get_proto_encoding, build_typed_selector_reference): ! New fucnctions. (UTAG_PROTOCOL): New define. ! (objc_selector_template, flag_typed_selectors): New variables. ! (objc_init): set flag_typed_selectors if -fgnu-runtime. ! (synth_module_prologue): Change declaration of ! _OBJC_SELECTOR_TABLE when flag_typed_selectors is non-null. ! (build_module_descriptor): Make sure the generated constructor ! function is declared public. ! (build_selector): Only cast to SEL when not doing typed selectors. ! (build_selector_translation_table): Rewrite initialization. ! (build_tmp_function_decl): Make up new name when called, since it ! may now be called multiple times. ! (hack_method_prototype): Use init_function_start to reinit args ! machinery. Also set current_function_decl before calling ! assign_parms. ! (generate_protocols): Don't generate encoding twice. ! (build_selector_template): New function. ! (build_method_list_template): Generate (void*)0 as first element, ! not (int)0. ! (build_message_expr): move the call to build_selector_reference ! towards the end, where we have determined the function prototype. ! ! * objc/Object.h, objc/Object.m (read:, write:, streamVersion:): ! Un-disable for alpha. (forward::, performv::): Declare and fix to ! return retval_t. ! * objc/archive.c: Completely rewritten to handle 64 bit longs and ! pointers. ! * objc/class.c (class_pose_as): Rewritten. ! * objc/encoding.c: use new ROUND macro for alignment rounding. ! * objc/init.c, objc/selector.c, objc/sendmsg.c: Rewritten to ! handle new selectors. ! ! Thu Jun 30 07:49:50 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.h (INITIAL_ELIMINATION_OFFSET): Check frame_pointer_needed when ! eliminating the arg pointer into the stack pointer. ! ! Thu Jun 30 06:25:50 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-common.c (c_build_type_variant): Remove last change; instead, ! copy TYPE if not in old obstack. ! ! Wed Jun 29 21:51:52 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * toplev.c (lang_options): Add -W{no-,}non-virtual-dtor. ! ! Wed Jun 29 19:23:27 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu) ! ! * final.c (end_final,profile_function): Profiling variables are ! size of pointer, not int. ! * alpha.h (LIB_SPEC): If -pg, add -lprof2. ! (STARTFILE_SPEC, {FUNCTION,BLOCK,FUNCTION_BLOCK}_PROFILER): New macros. ! ! Wed Jun 29 15:52:45 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * loop.c (basic_induction_var, case REG): Allow previous ! insn to set a SUBREG of X. ! ! * alpha.c (alpha_sa_size): Round size to 16-byte boundary. ! (add_long_const): Add new arg, TEMP_REG. ! (output_{pro,epi}log): Rework to put save area between outgoing ! args and local variables. ! * alpha.h (FRAME_POINTER_REGNUM): Now register 63. ! (HARD_FRAME_POINTER_REGNUM): New macro. ! (CONDITIONAL_REGISTER_USAGE, REG_CLASS_CONTENTS, REGNO_REG_CLASS): ! Show register 63 is not an FP register. ! (REGHNO_OK_FOR_BASE_P, REG_OK_FOR_BASE_P, REGISTER_NAMES): Likewise. ! (ALPHA_ROUND): New macro. ! (STARTING_FRAME_OFFSET, ELIMINABLE_REGS, INITIAL_ELIMINATION_OFFSET): ! Modify to reflect save area between outgoing args and local vars. ! * alpha.md: Add new pattern for double-add when have ! reg + frame pointer. ! Slight changes to all such patterns and add define_splits for them. ! ! * global.c (global_alloc): Make a more accurate attempt to see ! if the frame pointer will be used. ! If it is, show HARD_FRAME_POINTER_REGNUM used if its not ! the same as FRAME_POINTER_REGNUM. ! * reload1.c (reload): Can't eliminate if frame pointer needed ! and TO is stack pointer. ! Spill HARD_FRAME_POINTER_REGNUM if not FRAME_POINTER_REGNUM ! and frame pointer is needed. ! (spill_hard_reg): If CANT_ELIMINATE, set regs_ever_live; ! no longer done by callers. ! ! * a29k.md (movqi): Add missing `DONE'. ! ! Wed Jun 29 15:44:18 1994 Doug Evans (dje@canuck.cygnus.com) ! ! * sparc/sparc.h (CPP_SPEC): Split up v9/non-v9 stuff. ! Move -Acpu and -Amachine from here. ! (CPP_PREDEFINES): To here. ! (NO_BUILTIN_PTRDIFF_TYPE): Undefine. ! (NO_BUILTIN_SIZE_TYPE): Likewise. ! (PTRDIFF_TYPE): Split up v9/non-v9 definitions. ! (SIZE_TYPE): Likewise. ! * sparc/sp64-elf: (PTRDIFF_TYPE): Remove dependence on POINTER_SIZE. ! (SIZE_TYPE): Likewise. ! ! Wed Jun 29 15:28:17 1994 Michael Meissner (meissner@osf.org) ! ! * cccp.c (collect_expansion): Always put 1 space after the macro ! expansion in ANSI mode to fix regression from June 24th. ! ! Tue Jun 28 22:41:52 1994 Doug Evans (dje@cygnus.com) ! ! * combine.c (simplify_set): Evaluate HAVE_conditional_move at runtime. ! ! Tue Jun 28 20:27:08 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! ! * optab.c (expand_binop): Convert OP0 to mode for library calls. ! ! Changes to optimize division-by-constants, and make ceil and floor ! rounding work correctly: ! * expmed.c (expand_mult): Generalize to call synth_mult also ! for OP1 - 1. ! (ceil_log2): New function. ! (choose_multiplier): New function. ! (invert_mod2n): New function. ! (expand_mult_highpart_adjust): New function. ! (expand_mult_highpart): New function. ! (EXACT_POWER_OF_2_OR_ZERO_P): New macro. ! (expand_divmod): Almost completely rewritten. ! (expand_shift): Don't truncate immediate shift count, it doesn't work ! for types smaller than int. ! * expr.h (smul_highpart_optab, umul_highpart_optab): New variables. ! * genopinit.c (optabs): Add [us]mul_highpart_optab. ! * optabs.c (smul_highpart_optab, umul_highpart_optab): New variables. ! (expand_binop): Handle [us]mul_highpart_optab as commutative. ! (init_optabs): Initialize [us]mul_highpart_optab. ! * fold-const.c (div_and_round_double): Make it globally accessible. ! * a29k.md (smulsi3_highpart, umulsi3_highpart): New patterns. ! * alpha.md (umuldi3_highpart): New expander and matcher. ! * alpha.c (cint8_operand): New predicate. ! * m68k.md (umulsi3_highpart, const_umulsi3_highpart): ! New expander and matcher. ! (smulsi3_highpart, const_smulsi3_highpart): Likewise. ! ! Tue Jun 28 13:42:10 1994 Jim Wilson (wilson@cygnus.com) ! ! * sol2.h (CPP_SPEC): Handle -msupersparc. ! * sparc.c (cpu_type, sparc_cpu_type): Rename to arch_type and ! sparc_arch_type. Fix all users. ! (supersparc_adjust_cost): New function. ! * sparc.h (cpu_type, sparc_cpu_type): Rename to arch_type and ! sparc_arch_type. ! (CPP_SPEC): Handle -msupersparc. ! (MASK_SUPERSPARC, TARGET_SUPERSPARC): New macros. ! (TARGET_SWITCHES): Add -msupersparc and -mcypress. ! (ADJUST_COST): New macro. ! * sparc.md (cpu attribute): Rename to arch attribute. Add a new ! cpu attribute. Fix all users. ! (type attribute): Add ialu, shift, imul, fpdivs, and fpdivd. ! Delete fpdiv. ! (function units): Add Cypress and Supersparc versions of each. ! (addsi3, subsi3, andsi3, iorsi3, xorsi3): Add ialu type attribute. ! (mulsi3): Add imul type attribute. ! (divtf3, divdf3): Use fpdivd not fpdiv type attribute. ! (divsf3); Use fpdivs not fpdiv type attribute. ! (ashlsi3, ashrsi3, lshrsi3): Add shift type attribute. ! ! * i960.md (andsi3+6): Replace bad clrbit pattern with two working ! ones. ! ! Tue Jun 28 13:31:31 1994 Uwe Seimet (seimet@iris1.chemie.uni-kl.de) ! ! * configure (m68k-atari-sysv4*): New configuration. ! * m68k/atari.h, m68k/xm-atari.h: New files. ! ! Tue Jun 28 12:41:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa.md (define_split for (plus (reg) (large_constant))): Treat ! large_constant as signed. ! ! Tue Jun 28 05:46:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (eliminate_regs_in_insn): When checking for moves ! and adds, use single_set. ! ! * reload1.c (reloads_conflict): Handle R1_TYPE of RELOAD_OTHER. ! ! * expr.c (do_jump, case BIT_AND_EXPR): Only narrow to a type ! that corresponds to a mode. ! ! Tue Jun 28 05:41:29 1994 Will R. Athanasiou (will@westford.ccur.com) ! ! * rs6000.h (MEMORY_MOVE_COST): Make processor-dependent. ! * rs6000.md (movsf): Emit frsp if storing to memory and not PowerPC. ! (movsf matcher): Remove explicit frsp. ! (store sf with update): Likewise. ! * rs6000.c: Include ctype.h. ! ! Tue Jun 28 05:40:44 1994 Mike Collison (collison@chianti.sw.stratus.com) ! ! * real.c: Treat HFmode like SFmode, for now. ! ! Mon Jun 27 19:16:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * optabs.c (expand_binop, multi-words shifts and rotates): ! Fix errors in last change. ! ! Mon Jun 27 11:29:18 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.c: Include "expr.h". ! (arm_fpu): New variable. ! (arm_gen_movstrqi): Fix typo. ! * arm.h: (enum floating_point_type): New enumeration type. ! (arm_fpu): New declaration. ! * arm.md: (function_unit fpa): Add more accurate scheduling ! information. ! (all floating point patterns): Add more detailed instruction type ! information to attributes. ! * riscix.h: (STARTFILE_SPEC,SIZE_TYPE,PTRDIFF_TYPE): Fix typos. ! (ASM_FINAL_SPEC): Only reject -mbsd and -mxopen when -pedantic. ! ! Sun Jun 26 05:37:26 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * toplev.c (v_message_with_decl): Avoid fwrite for stderr; mixing ! it with fprintf and fputs can cause strange results under VMS. ! ! Sat Jun 25 06:07:56 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * combine.c (distribute_notes, case REG_DEAD): If a call uses a ! hard reg, then this is where it dies. ! ! Fri Jun 24 19:09:33 1994 Chip Salzenberg (chip@fin.uucp) ! ! * cccp.c (create_definition): Eliminate whitespace before and ! after macro definitions. ! ! Fri Jun 24 16:19:27 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * c-decl.c (lang_decode_option): Set warn_bad_function_cast ! for -Wbad-function-cast. ! * c-typeck.c (build_c_cast): Issue a warning for non-matching cast ! from a function call (like malloc without proto). ! * c-tree.h: Declare warn_bad_function_cast. ! * toplev.c (lang_options): Add -W[no]-bad-function-cast. ! ! Fri Jun 24 16:09:12 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * vax.h (ASM_IDENTIFY_LANGUAGE): New macro. ! ! Fri Jun 24 15:36:37 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * jump.c (jump_optimize): If we reverse "if (foo) bar else break;" ! and there follows a NOTE_INSN_LOOP_END, move the note before "bar". ! ! * arm.md (movstrsi): Delete. ! (movstrqi): New expand. ! * arm.h (arm_gen_movstrqi): New function. ! ! Fri Jun 24 14:43:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * alpha.c (alpha_builtin_saveregs): Fix typo in computing value ! for __base. ! ! * vax.md (zero_extract patterns): Don't allow constants in ! the first operand of ZERO_EXTRACT since the recognizer ! function forces them to match the mode of the match_operand. ! ! * c-typeck.c (decl_constant_value): Test for const and ! not iterator. ! (default_conversion, digest_init): Remove redundant checks ! before calling decl_constant_value. ! (convert_for_assignment): See if RHS has a constant value. ! ! * m68k.md (ashrsi3, lshrsh3): Remove patterns using bfext[su]. ! ! * reg-stack.c (goto_block_pat): Ignore undefined label. ! ! Thu Jun 23 22:07:42 1994 Doug Evans (dje@cygnus.com) ! ! * sparc/sp64-elf.h (LINK_SPEC): Fix typo. ! (PTRDIFF_TYPE): Likewise. ! ! Thu Jun 23 19:15:36 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * tree.h (TREE_SYMBOL_REFERENCED): New macro. ! * varasm.c (assemble_name): Set TREE_SYMBOL_REFERENCED on the ! identifier for `name'. ! * toplev.c (compile_file): Use TREE_SYMBOL_REFERENCED instead of ! TREE_USED and TREE_ADDRESSABLE where appropriate. ! ! Thu Jun 23 19:06:05 1994 Randy Wright (rwright@dhostwo.convex.com) ! ! * cse.c (simplify_unary_operation, case UNSIGNED_FLOAT): Add ! missing cast to unsigned. ! ! Thu Jun 23 19:00:18 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.md (fix_truncdfsi2, movsf, movdi): Use assign_stack_temp. ! (mulsidi3): Add earlyclobber constraint modifier to PowerPC ! version and !TARGET_POWERPC64 to final condition. ! ! * rs6000.h (CPP_PREDEFINES): Define _POWER (alias for _IBMR2). ! (CPP_SPEC): New macro. ! * powerpc.h (ASM_SPEC): Use PowerPC mode, not 601 mode. ! (CPP_SPEC): New macro. ! (TARGET_DEFAULT): Generate pure PowerPC code, not 601-specific. ! ! Thu Jun 23 18:09:23 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * vax.h (CPP_PREDEFINES): Add `__vax__'. ! * vax/vms.h (CPP_PREDEFINES): Add `__vax__', `__vms__', and `__VMS__'; ! update __GNUC_MINOR__ to 6. ! ! Thu Jun 23 17:59:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * toplev.c (compile_file): Don't try to write function if we ! didn't save insns for it. ! ! * reload.c (find_reloads): Don't rejecting non-const due to value ! of PREFERRED_RELOAD_CLASS if no regs were valid for alternative. ! ! Thu Jun 23 17:45:55 1994 Matthias Pfaller (leo@marco.de) ! ! * ns32k.c (output_move_double): If the dest is register pair and both ! regs are used in src address, use ADDR to compute src address, not ! ADDD, which throws away scaled index. ! ! Thu Jun 23 17:40:06 1994 Craig Burley (burley@gnu.ai.mit.edu) ! ! * c-decl.c (clear_binding_level): Add missing fields in initializer. ! (c_decode_option): Correct misspelling of -fno-dollars-in-identifiers. ! ! Thu Jun 23 13:47:23 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Fix return type of sbrk in on Alpha ! OSF/1 V2.0. Also, redirect grep errors to /dev/null in ! fix. ! ! Thu Jun 23 12:08:23 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.c: Include tree.h. ! (const_ok_for_arm): Add fast return for 0 or just one non-zero bit. ! (const_ok_for_op, arm_split_constant): New functions. ! (arm_rtx_costs, reg_or_int_operand): New functions. ! (shift_operator): Accept ROTATERT. ! (multi_register_push): New function. ! (shift_op): Don't abort if a constant is outside the acceptable range, ! but convert the whole shift expression into something legal. If the ! shift is zero, then return NULL. ! (output_return_instruction): Output a call to abort if the function is ! volatile. ! (arm_volatile_func): New function. ! (get_prologue_size): Remove all adjustments for insns that are now ! output as rtx. ! (output_func_prologue): Remove all code that outputs instructions, ! just print a few comments. ! (output_func_epilogue): Output a call to abort if a volatile function ! tries to return. ! (emit_multi_reg_push): New function. ! (arm_expand_prologue): New function. Don't bother to push call-saved ! regs if we will never return. ! (arm_print_operand, case 'S'): If shift_op returns NULL, then no shift ! is required. ! * arm.h (TARGET_WHEN_DEBUGGING): Delete. ! (MODES_TIEABLE_P): All modes of the same class are tieable. ! (CONST_OK_FOR_LETTER_P): Add 'M' for constants valid in a shift. ! (FUNCTION_PROFILER): Don't call arm_increase_location. ! (INITIAL_ELIMINATION_OFFSET): Call saved regs are no-longer pushed for ! functions that don't return. ! (LEGITIMIZE_ADDRESS): Push constants that will never be legitimate -- ! symbols and labels -- into registers. Handle DImode better. ! (DEFAULT_SIGNED_CHAR): Use unsigned unless already defined. ! (RTX_COSTS): Call arm_rtx_costs. ! (ADDRESS_COST): Since most operations have the same rtx cost, make the ! more complex addresses cheaper. ! (PREDICATE_CODES): Add ROTATERT to shift_operator; and new predicates ! for reg_or_int_operand and multi_register_push. ! (DBX_CONTIN_LENGTH): Only define if not already done. ! (PRINT_OPERAND_ADDRESS): Let arm_print operand output the ", " for ! shifts. ! * arm.md (addsi3, subsi3, andsi3, iorsi3, ashlsi3, ashrsi3, lshrsi3, ! rotrsi3): Rewrite as expand patterns. ! (rotlsi3): New expand. ! (matchers, and split patterns for above): New. ! (all patterns with shifts): Let arm_print_operand output the ", " ! before a shift if it is needed. ! (zero_extendqihi2): Delete. ! (zero_extendqisi2): Expand to (and ...) if not memory. ! (movsi): Call arm_split_constant to generate a constant. ! (movqi): Only force a MEM into a register if not reloading. ! (movsf, movdf): If loading a non-immediate floating point value, or ! loading and floating point immediate into integer regs, push the ! constant straight into the pool. ! (movdf): Get rid of the scratch register. ! (reload_outdf): Rewrite to expand to the two required insns. ! (matcher for movdf): Remove alternative that used scratch register for ! storing. ! (movxf): rewrite as expand. ! (matcher for movxf): Recognize even when XFmode code is disabled, so ! that prologue insns can be generated. ! (Matcher for reversed conditional jump): Don't match if the mode of the ! CC register is not reversible. ! (prologue): New expand. ! (matcher for multi_register_push insn): New. ! * riscix.h: Delete some dead code. ! (STARTFILE_SPEC): Look in the correct places for start files. ! (LIB_SPEC): Define. ! (LINK_SPEC): Define. ! (TARGET_WHEN_DEBUGGING): Delete. ! (DEFAULT_SIGNED_CHAR): Set to unsigned. ! (SIZE_TYPE, PTRDIFF_TYPE, TARGET_EDOM): Define. ! * rix-gas.h (DBX_CONTIN_LENGTH): Set to 80. ! (DEFAULT_GDB_EXTENSIONS, DBX_NO_XREFS): Don't try to pander to dbx, it ! is just to broken to use. ! ! Wed Jun 22 20:13:03 1994 Will Athanasiou (will@westford.ccur.com) ! ! * configure (m68k-ccur-rtu): New configuration. ! * config.sub (m68k-ccur): New system. ! * protoize.c: Include , not on Concurrent. ! * ccur-GAS.h, x-ccur: New files. ! ! Wed Jun 22 18:49:17 1994 Walter Misar (misar@rbg.informatik.th-darmstadt.de) ! ! * m68k/hp320.h (LINK_SPEC): New macro. ! ! Wed Jun 22 18:43:51 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * configure: For target alpha-*-*, if using gas, set ! target_cpu_default to 4. ! * config/alpha/alpha.h (TARGET_SWITCHES): Include ! TARGET_CPU_DEFAULT in default value. ! (TARGET_CPU_DEFAULT): Define as 0 if not already defined. ! (ASM_FINAL_SPEC): Include TARGET_CPU_DEFAULT in test for which ! version to define. ! ! Wed Jun 22 18:15:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * loop.c (strength_reduce): When replacing DEST_ADDR givs, make ! sure resulting insn is valid. ! ! * optabs.c (expand_binop): New variable next_methods; pass to ! most recursive calls when trying to avoid libcalls. ! Always check for a return value of zero in recursive calls. ! (expand_float): Ensure TARGET has proper mode. ! Pass OPTAB_LIB_WIDEN to expand_binop calls. ! ! Tue Jun 21 14:35:38 1994 Doug Evans (dje@cygnus.com) ! ! * cccp.c (skip_to_end_of_comment): Catch unterminated comments. ! ! Sat Jun 18 17:49:41 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * fixproto: Move hacking of assert.h from here. ! * fixincludes: To here. ! ! Sat Jun 18 16:42:31 1994 Jim Wilson (wilson@cygnus.com) ! ! * c-typeck.c (process_init_element): For fieldtype, don't access ! TYPE_MAIN_VARIANT field if the type is error_mark_node. ! ! * jump.c (duplicate_loop_exit_test): Initialize copy to zero. ! Emit jump to end lable if copy is still zero. ! ! * mips.md (truncdisi2): Change from define_insn to define_expand. ! (truncdihi2, truncdiqi2, extendsidi2): Likewise. ! (extendsidi2_internal): New pattern. ! ! * loop.c (move_movables): Copy CALL_INSN_FUNCTION_USAGE field. ! ! * sdbout.c (sdbout_one_type): Use DECL_ASSEMBLER_NAME if ! DECL_LANG_SPECIFIC is set. Use DECL_ASSEMBLER_NAME not ! DECL_NAME for child_type that is a template type. ! (sdbout_symbol): Use DECL_ASSEMBLER_NAME if DECL_LANG_SPECIFIC ! is set. ! ! Sat Jun 18 16:39:03 1994 Kung Hsu (kung@mexican.cygnus.com) ! ! * dbxout.c (dbxout_symbol): Replace DECL_IGNORED_P with ! TYPE_DECL_SUPPRESS_DEBUG. ! ! Sat Jun 18 10:21:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * expmed.c (expand_shift): Don't try extzv for lshr. ! ! * vax.md (lshrsi3): New define_expand. ! ! * optabs.c: Pass NULL_RTX for TARGET in calls to expand_{un,bin}op. ! (expand_float): Use expand_shift instead of expand_binop. ! ! Fri Jun 17 15:05:58 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Correct math.h on Lynx handling again. ! ! Fri Jun 17 10:52:41 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * cse.c (simplify_binary_operation, case MINUS): Check mode of op0, ! instead of op1, before calling plus_constant. ! ! Fri Jun 17 01:42:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa.h (DEBUGGER_AUTO_OFFSET): Define. If no frame pointer ! is available, then adjust the offset by the size of the current ! frame. ! ! Thu Jun 16 16:35:12 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * tree.h (DECL_DEFER_OUTPUT): New macro. ! * toplev.c (compile_file): Unset DECL_DEFER_OUTPUT on decls ! considered at end of file. ! * integrate.c (output_inline_function): Unset DECL_DEFER_OUTPUT on ! fndecl. ! * toplev.c (rest_of_compilation): Also postpone compilation of ! inlines with DECL_DEFER_OUTPUT set. ! (compile_file): Always emit postponed inlines if ! -fkeep-inline-functions. ! ! Thu Jun 16 11:00:14 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Fix argument type for ffs in on Alpha ! OSF/1 V2.0. ! ! Thu Jun 16 06:49:03 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (reload_reg_free_p, case RELOAD_OTHER): Allowed ! to conflict with RELOAD_FOR_OTHER_ADDRESS. ! ! * cse.c (set_nonvarying_address_components): Rework and also ! handle an AND used for non-aligned accesses. ! ! Thu Jun 16 06:36:49 1994 Chip Salzenberg (chip@fin.uucp) ! ! * i386.h (REG_ALLOC_ORDER): Prefer registers listed in ! CALL_USED_REGISTERS. ! ! Wed Jun 15 20:45:14 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * tree.h (TREE_NO_UNUSED_WARNING): Note that this can be applied ! to COMPOUND_EXPRs, too. ! ! * stmt.c (warn_if_unused_value): Handle TREE_NO_UNUSED_WARNING for ! COMPOUND_EXPRs, too. ! ! Wed Jun 15 20:35:21 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.md (divsi3): Fix divide by 2^N with compare RTL. ! ! * rs6000.md (maxsf3, minsf3, maxdf3, mindf3): Fix predicate of ! define_split. ! (muldi3): Fix predicate. ! (movdf matcher): Allow update and indexed for lfd instruction. ! ! Wed Jun 15 19:24:23 1994 Doug Evans (dje@cygnus.com) ! ! * dbxout.c (dbxout_type): Fix call to bzero. ! ! Wed Jun 15 19:20:34 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * cse.c (simplify_unary_operation): Fix typo in last change. ! ! Wed Jun 15 15:20:54 1994 Per Bothner (bothner@cygnus.com) ! ! * dbxout.c (dbxout_range_type): Handle the case that an array ! range is neither an integer nor a sub-range. (In Pascal or ! Chill it could be a Boolean, character, or enumeral type.) ! ! Wed Jun 15 04:00:42 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * genmultilib: New shell script to generate multiple library ! information. ! * Makefile.in (multilib.h, stmp-multilib, install-multilib): New ! targets. ! (gcc.o): Depend on multilib.h. ! (clean): Remove multilib.h and tmpmultilib*. ! * gcc.c: Include multilib.h. ! (print_multi_lib, print_multi_directory, multilib_select, ! multilib_dir): New static variables. ! (option_map): Added --print-multi-lib and --print-multi-directory. ! (set_spec): Get multilib_select from specs file. ! (process_command): Dump multilib_select into specs file. Handle ! -print-multi-lib and -print-multi-directory. ! (do_spec_1): Try multilib_dir for %D case. ! (find_file): Try multilib_dir. ! (main): Call set_multilib_dir. Handle print_multi_lib and ! print_multi_directory. ! (used_arg, set_multilib_dir, print_multilib_info): New functions. ! * configure (sparc-*-sunos4*): Use target fragment sparc/t-sunos4. ! * sparc/t-sunos4: New file. ! ! Wed Jun 15 03:54:32 1994 Doug Evans (dje@cygnus.com) ! ! Add support for the SPARC V9 cpu. ! * configure (sparc64-*-aout): New target. ! (sparc64-*-elf): New target. ! * config.sub (sparc64): New cpu. ! (aout, elf): New os's. ! * genconfig.c (main): Allow targets to override HAVE_conditional_move. ! * jump.c (jump_optimize): Use it at run-time. ! * sparc/t-sp64: New file. ! * sparc/sp64-aout.h: New file. ! * sparc/sp64-elf.h: New file. ! * sparc/sysv4.h (ASM_OUTPUT_CASE_LABEL): Handle 64 bit pointers. ! * sparc/sparc.h (cpu_type): New enum. ! (CPP_PREDEFINES,CPP_SPEC): Add v9 support. ! (NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE, ! SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, ! FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE, ! MAX_LONG_TYPE_SIZE): Define. ! (PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD, ! UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE, ! POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN, ! EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER, ! FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE): ! Add v9 support. ! (sparc_override_options, sparc_code_model): Declare. ! (OVERRIDE_OPTIONS): Call it. ! (MASK_*): Define bits set by target flags. ! (TARGET_*): Use them. ! ({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS, ! MEDLOW,MEDANY,FULLANY}): Define. ! (MEDANY_BASE_REG): Define. ! (V9_SWITCHES, TARGET_OPTIONS): Define. ! (TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*. ! (SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define. ! (SECONDARY_MEMORY_NEEDED): Simplify. ! (hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare. ! (REG_PARM_STACK_SPACE): Do not define if v9. ! (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P, ! RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class, ! REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER, ! REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER, ! CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET, ! BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG, ! BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support. ! (sparc_arg_class): New enum (v9 only). ! (sparc_args): New struct to record v9 arguments. ! (CUMULATIVE_ARGS): Use it (v9 only). ! (GET_SPARC_ARG_CLASS): Define. ! (sparc_arg_count, sparc_n_named_args): Declare. ! (PASS_IN_REG_P): Define. ! (ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE, ! FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS, ! FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES): ! Add v9 support. ! (sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare. ! (INIT_EXPANDERS): Define (v9 only). ! (gen_v9_scc, output_v9branch): Declare. ! (HAVE_conditional_move): Define. ! (FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, ! DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P, ! REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT, ! CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES, ! SELECT_CC_MODE, REGISTER_NAMES): Add v9 support. ! (REGNO_OK_FOR_CCFP_P): Define. ! (sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare. ! (INITIALIZE_TRAMPOLINE): Call them. ! (ENCODE_SECTION_INFO): Mark functions in v9. ! (RTX_COSTS): Assume MULT costs the same for v9 as v8. ! (ASM_LONGLONG, ASM_FLOAT): Define. ! (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support. ! * sparc/sparc.c (SKIP_CALLERS_UNIMP_P): Define. ! (sparc_cpu_type, sparc_arg_count, sparc_n_named_args, ! frame_base_offset, fpconv_stack_temp): New globals. ! (leaf_reg_remap): Add additional registers for v9. ! (sparc_override_options, sparc64_init_expanders, ! sparc64_fpconv_stack_temp, intreg_operand, ccfp_reg_operand, ! data_segment_operand, text_segment_operand, v9_regcmp_op, ! arith11_operand, arith10_operand, arith11_double_operand, ! arith10_double_operand, gen_v9_scc, emit_v9_brxx_insn, ! sparc_init_modes, build_big_number, output_v9branch, ! sparc_initialize_trampoline, sparc64_initialize_trampoline): ! New functions. ! (arith_double_operand, gen_compare_reg, finalize_pic, ! emit_move_sequence, mem_aligned_8, output_move_double, ! output_move_quad, output_fp_move_double, output_fp_move_quad, ! output_block_move, save_regs, restore_regs): Add v9 support. ! (sparc_mode_class): New enum. ! (*_MODES): Redefine to use it. ! (hard_32bit_mode_classes): Renamed from hard_regno_mode_ok. ! (hard_regno_mode_classes, hard_64bit_mode_classes, ! sparc_mode_class): New globals. ! (num_gfregs): Renamed from num_fregs. ! (compute_frame_size): Add v9 support. Simplify calculations. ! (output_function_prologue): Call build_big_number to compute stack ! size in %g1, then adjust %sp. ! Fix saving of call saved registers. Handle new v9 registers. ! (output_function_epilogue): Fix restoration of call saved registers. ! Handle new v9 registers. ! Use SKIP_CALLERS_UNIMP_P to see if unimp insn is at return address. ! (sparc_builtin_saveregs): Define v9 version. ! (output_cbranch): New argument fp_cond_reg. All callers changed. ! Add v9 support. ! (output_return): Use SKIP_CALLERS_UNIMP_P. ! (print_operand): New codes '_', '@', 'C', 'D'. ! (output_double_int): Handle LABEL_REF and MINUS for v9. ! Use ASM_LONGLONG if assembler can handle it. ! * sparc/sparc.md (cpu): New attribute. ! (type attribute): New value cmove (conditional moves). ! (cmpdi): New pattern for v9. ! (seq*, sne*): Add v9 support. ! (sgt,slt,sge,sle): Explicitly restrict operand 0 to the integer ! registers. Try emitting a conditional move for v9. ! (sgtu,sltu,sgeu,sleu): Likewise. ! (comparison insns): Add v9 versions. ! (scc insns): Add DImode versions for v9. ! (beq, bne, bgt, blt, bge, ble): If comparing DImode with 0 on v9, ! use brxx insns. Use emit_jump_insn, not emit_insn, as the latter ! mishandles brxx insns. ! (branch insns): Update calls to output_cbranch. ! Add v9 versions to support multiple floating point condition code regs. ! Add v9 versions to support brxx insns. ! (lo_sum, high, pic): Add v9 support. ! (symbolic move patterns): Disable for v9. ! (DImode, DFmode, TFmode moves): Add v9 support. ! (conditional move insns): Define for v9. ! (zero_extendqidi2, extendqidi2, zero_extendhidi2, extendhidi2, ! zero_extendsidi2, extendsidi2, floatdisf2, floatdidf2, floatditf2, ! fix_truncsfdi2, fix_truncdfdi2, fix_trunctfdi2, muldi3, divdi3, ! udivdi3, ashldi3, ashrdi3, lshrdi3, ffsdi2): New patterns for v9. ! (bitfield compare insn): Add DImode version for v9. ! (adddi3, subdi3, negdi2, anddi3, iordi3, xordi3, one_cmpldi2, ! mixed mode fp mult insns, negdf2, negtf2, absdf2, abstf2, tablejump, ! call, call_value, untyped_call, untyped_return, indirect_jump, ! flush_register_windows, flush): Add v9 support. ! (ldd peep holes): Disable for v9. ! (set/compare peep hole): Define DImode version for v9. ! (sign extend/compare peep hole): Likewise. ! (return peep holes): Add v9 support. ! (call/jump peep holes): Add v9 support. ! * ginclude/va-sparc.h: Add v9 support. ! ! Tue Jun 14 22:44:52 1994 Michael Meissner (meissner@osf.org) ! ! * config/i386/i386.h (reg_class): Add AD_REGS that match %eax and ! %edx to allow %eax:%edx to be specified as one DI register. ! (REG_CLASS_NAMES): Ditto. ! (REG_CLASS_CONTENTS): Ditto. ! (REG_CLASS_FROM_LETTER): 'A' specifies AD_REGS. ! ! * config/i386/i386.md (umulqihi3): Name the insn with the standard ! name. ! (mulqihi3, umulsidi3, mulsidi3): Add new widening multiply ! patterns. ! ! Tue Jun 14 22:25:16 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! ! * fold-const.c (encode, decode): Use 4 HOST_WIDE_INTs for encoded ! value with HOST_BITS_PER_WIDE_INT/2 bits in each. ! (LOWPART, HIGHPART): New macros. ! (BASE): Move definition outside of div_and_round_double. ! (add_double, mul_double, lshift_double, rshift_double): Rewrite. ! (lrotate_double): Use LOWPART, HIGHPART, and BASE. ! (rrotate_double): Likewise. ! (div_and_round_double): Major changes to code for general case. ! Now it actually produces non-garbage results for large operands. ! (div_and_round_double): Simplify condition for special code used when ! divisor < BASE. ! (const_binop): Delete special cases for multiplying by 0, 1, 2, 4, 8. ! (fold, case *_DIV_EXPR): Don't try to optimize for overflow. ! * machmode.h (MAX_SHORTS): Deleted. ! ! * m68k.md: Trivial simplification of many patterns. ! (subsi3): Don't handle CONST_INT for operand 2. ! (ashiftrt, op2 > 8): New pattern. ! (lshiftrt, op2 > 8): New pattern. ! ! * a29k.md (logical patterns): Tune to give better code for immediate ! values. ! * a29k.c (cmplsrcb_operand): New predicate. ! * a29k.h (PREDICATE_CODES): Add cmplsrcb_operand. ! ! Tue Jun 14 17:52:10 1994 Tor Egge (tegge@flipper.pvv.unit.no) ! ! * m88k/sysv3.h (DO_GLOBAL_CTORS_BODY): Call __builtin_alloca ! with a non-zero argument, forcing a frame pointer to be needed. ! ! Tue Jun 14 17:37:41 1994 Mike Collison (collison@sw.stratus.com) ! ! * reload.h (RELOAD_FOR_OPADDR_ADDR): New reload class. ! * reload.c (find_reloads): Change secondary reloads of class ! RELOAD_FOR_OPERAND_ADDRESS to RELOAD_FOR_OPADDR_ADDR. ! * reload1.c (reload): Process and accumulate needs for ! RELOAD_FOR_OPADDR_ADDR reloads. ! When determining if needs are nongroup needs, ignore ! inactive or optional reloads. ! (reload_reg_used_in_op_addr_reload): New variable to indicate ! when reloads of class RELOAD_FOR_OPADDR_ADDR are in use. ! (mark_reload_reg_in_use, clear_reload_reg_in_use): ! Process reloads of class RELOAD_FOR_OPADDR_ADDR. ! (reload_reg_free_p, reload_reg_free_before_p, reloads_conflict): ! Likewise. ! (choose_reload_regs): Support RELOAD_FOR_OPADDR_ADDR reloads. ! (emit_reload_insns): Output RELOAD_FOR_OPADDR_ADDR reloads. ! Tue Jun 14 17:29:53 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cccp.c, toplev.c, tree.c, print-tree.c, fold-const.c: ! Cast pointer operands to bzero, bcopy, and bcmp to (char *). ! * function.c, stmt.c, expmed.c, varasm.c, emit-rtl.c: Likewise. ! * dbxout.c, integrate.c, jump.c, real.h, calls.c, cse.c: Likewise. ! * loop.c, unroll.c, flow.c, stupid.c, combine.c, regclass.c: Likewise. ! * local-alloc.c, global.c, reload.c, reload1.c, sched.c: Likewise. ! * genattrtab.c, bc-emit.c, gcc.c, collect2.c: Likewise. ! * c-decl.c (min_precision): New function. ! (finish_enum): Rewrite code to determine precision required ! for enumeral type. ! * cse.c (simplify_unary_operation): Correctly and consistently ! handle CONST_INT cases for FLOAT and UNSIGNED_FLOAT. ! * xm-alpha.h (sbrk): Don't declare here. ! * alpha.h (CONST_COSTS, case CONST_INT): Fix typo. ! * tree.c (staticp, case FUNCTION_DECL): A nested function isn't static. ! * i386/linux.h (STARTFILE_SPEC): Don't force -static for -g. ! * gcc.c (find_a_file): Try EXECUTABLE_SUFFIX first, then file ! without the suffix. ! * jump.c (jump_optimize): Don't delete dead insn if it has a ! REG_RETVAL note. ! * fix-header.c (xstrdup): Renamed from strdup. ! (check_protection): Call xstrdup, not strdup. ! Tue Jun 14 17:26:08 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.h (TARGET_SWITCHES): Remove -mpowerpc64 and -mno-powerpc64. ! * rs6000.c (rs6000_override_options): Remove MPC620 cpu variants. ! * rs6000.c (output_prolog): Fix error in loading size of large ! stack frames. ! Tue Jun 14 17:24:09 1994 Chip Salzenberg (chip@fin.uucp) ! * reload1.c (reload_as_needed): Clear spill_reg_store at start. ! (emit_reload_insns): Omit erroneous predicate of reload ! deletion -- reload_spill_index is not indexed by regno. ! Tue Jun 14 15:59:55 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixincludes: Wrap assert.h in extern "C" { } to avoid problem on ! HP/UX, which uses NO_IMPLICIT_EXTERN_C. Also fix 12 May 94 ! change. ! ! Tue Jun 14 15:12:50 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * jump.c (condjump_in_parallel_p): New function to detect ! conditional jumps within PARALLEL insns. ! (jump_optimize): Allow for some simple optimizations involving ! conditional jumps within PARALLEL insns. ! * reorg.c (get_jump_flags): Handle conditional jumps in PARALLEL ! insns. ! (get_branch_condition, fill_simple_delay_slots): Likewise. ! (fill_eager_delay_slots, relax_delay_slots, dbr_schedule): Likewise. ! ! * pa-osf.h (SIZE_TYPE): Define as "long unsigned int" to be ! compatable with system include files. ! * pa1-osf.h (SIZE_TYPE): Likewise. ! ! * pa1-osf.h (WCHAR_TYPE): Define as "short unsigned int". ! (WCHAR_TYPE_SIZE): Define as 16 bits. ! ! * pa.c (output_arg_descriptor): Restore old behavior for SImode ! USE insns of FP registers (used by untyped call support). ! ! Mon Jun 6 09:15:43 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.c (arm_reload_out_hi): Rewrite. Add support for processors ! running in big-endian mode. ! (fp_immediate_constant): Fix typo in argument declaration. ! * arm.h (PROMOTE_MODE): Promote HImode integers as signed. ! (BYTES_BIG_ENDIAN): Allow OS description to override default. ! (LOAD_EXTEND_OP): When big-endian, HImode loads are sign extended. ! * arm.md (storehi_bigend): New expansion pattern. ! (storeinthi): Rework to generate better code, add big-endian support. ! (movhi): Add support for processors running in big-endian mode. ! (movhi_bigend): New expansion pattern. ! (matcher for movhi): Remove incorrect alternative for storing HImode to ! memory. Only match when little endian. ! (matcher for big-endian movhi): New pattern. ! (matchers/peepholes for extended pre/post increment HImode loads): Only ! match when little-endian. ! (matcher for operating on adjacent memory locations): Load operation ! into arith operands. ! (peepholes for extended pre-increment byte loads): New patterns. ! ! Sat Jun 4 21:06:29 1994 Kaveh R. Ghazi (ghazi@noc.rutgers.edu) ! ! * sys-types.h (__gnuc_va_list): Use instead of va_list. ! * sys-protos.h (*): Use __gnuc_va_list, not va_list. ! ! Sat Jun 4 07:19:39 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.c (print_multi_reg, output_call, output_call_mem, ! output_mov_long_double_fpu_from_arm, ! output_mov_long_double_arm_from_fpu, ! output_mov_double_fpu_from_arm, output_mov_double_arm_from_fpu, ! output_return_instruction, output_func_{prologue,epilogue}, ! arm_print_operand, output_load_symbol): Print the register prefix ! before each register name. ! (output_func_prologue, output_lcomm_directive): Output the target ! dependent comment char for asm comments. ! * arm.h (FUNCTION_PROFILER): Delete duplicate definition. ! (FUNCTION_PROFILER, TRAMPOLINE_TEMPLATE, ASM_FILE_START, ! ASM_OUTPUT_REG_{PUSH,POP}, PRINT_OPERAND_ADDRESS): Output register ! prefix before any explicit register name. ! (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, ! ASM_OUTPUT_COMMON): Output the target dependent comment char. ! (ASM_FILE_START): Output register alias for r10. ! (REGISTER_NAMES): Output "r9" now for r9, not "rfp". ! (ADDITIONAL_REGISTER_NAMES): New macro. ! * arm.md (all patterns explicitly mentioning register names): Output ! the target dependent prefix before the register name. ! (all patterns with asm comments): Output the target dependent comment ! character. ! ! Fri Jun 3 18:14:07 1994 Doug Evans (dje@cygnus.com) ! ! * c-common.c (decl_attributes): Fix section attributes. ! * varasm.c (make_decl_rtl): If section attribute is being ignored, ! really ignore it. ! ! Fri Jun 3 15:53:57 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! ! * pa.h (FP_REGNO_P): New macro for intra file usage. ! (REGNO_OK_FOR_FP_P): Use FP_REGNO_P. ! (FUNCTION_VALUE_REGNO_P): Revert last change. ! * pa.md (mulsi3): Use MATCH_DUP for op3, not MATCH_OPERAND. ! ! * pa.h (CONDITIONAL_REGISTER_USAGE): Partially revert last changes; ! Make non-existing 1.0 fp regs fixed, including odd-numbered regs. ! (enum reg_class): Get rid of SNAKE_FP_REGS, GENERAL_OR_SNAKE_FP_REGS, ! and NON_SHIFT_REGS. ! (REG_CLASS_NAMES): Likewise. ! (REG_CLASS_CONTENTS): Likewise. ! (REGNO_REG_CLASS): Likewise. ! (HARD_REGNO_MODE_OK): Corresponding changes. Don't force 1.0 fpregs ! to even regno here; fixed_regs does the job better. ! (FP_REG_CLASS_P): Get rid of SNAKE_FP_REGS. ! (REG_CLASS_FROM_LETTER, case 'z'): Deleted. ! (HARD_REGNO_NREGS): Partially revert last change. ! (CLASS_MAX_NREGS): Partially revert last change. ! * pa.md (globally): Delete 'x' constraint or change it to 'f', ! as apropriate. ! ! Fri Jun 3 09:18:55 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.h (CONST_OK_FOR_LETTER_P): Only allow constants that are valid ! when inverted for 'K'. Only allow constants that are valid when ! negated for 'L'. ! * arm.md (all patterns): Update instruction generation to reflect new ! meanings of constraints 'K' and 'L'. Use output type 'B' to ! generate an inverted constant. Use output type 'N' to generate a ! negated floating point constant. ! ! Thu Jun 2 22:43:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * pa.h (TARGET_SWITCHES): Enable TARGET_LONG_CALLS when ! TARGET_PORTABLE_RUNTIME is enabled. ! * pa.c (output_call): If TARGET_LONG_CALLS is enabled, then emit ! an inline long-call sequence. ! * pa.md (millicode define_delay): Disable delay slots if ! TARGET_LONG_CALLS. ! (call_internal_reg, call_value_internal_reg): If TARGET_LONG_CALLS ! is enabled, then emit an inline long-call sequence. Fix length ! computation for TARGET_LONG_CALLS. ! (millicode calls): Fix length computation for TARGET_LONG_CALLS. ! ! * pa.h (ASM_DECLARE_FUNCTION_NAME): Fix typo. ! ! Thu Jun 2 18:28:07 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * stmt.c (expand_end_bindings): Don't bother emitting cleanups ! after a barrier. ! ! Thu Jun 2 18:10:36 1994 Stephen L Moshier (moshier@world.std.com) ! ! * libgcc2.c (__floatdisf): Protect against double-rounding error. ! ! Thu Jun 2 17:47:54 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.h (MASK_PPCFPX): Delete. ! (MASK_PPC_GPOPT, MASK_PPC_GFXOPT, TARGET_PPC_GPOPT, TARGET_PPC_GFXOPT): ! New Macros. ! (TARGET_SWITCHES): Remove -mpowerpc-fpx; add -mpowerpc-gpopt ! and -mpowerpc-gfxopt. ! * rs6000.c (processor_target_table): Use new macros. ! * rs6000.md (define_function_unit): Remove ppc604 from sqrt list. ! (divsi3, udivsi3): Remove spaces from PowerPC output templates. ! (sqrtsf2, maxsf3, minsf3, sqrtdf2, maxdf3, mindf3): Use new macros. ! (floatdidf2, fix_truncdfdi2, ffsdi2, muldi3): New patterns. ! ({s,u}muldi3_highpart, divdi3, udivdi3, rotldi3): Likewise. ! (movdi): Handle moves between FPRs and GPRs. ! (scc insn): Correct swapped compare and delayed_compare attributes. ! ! Thu Jun 2 14:45:04 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.c (arm_condition_code): Move to start of file. ! (const_pool_offset): Correct typo. ! (fp_const_from_val): New function. ! (all instruction generators): mark position where conditionalization ! should be with '%?'. ! (output_move_double): Use new '%m' output type to simplify load/store ! multiple generation. ! (shift_instr): Delete. ! (shift_op): New function. ! (output_arithmetic): Delete. ! (output_arithmetic_with_shift): Delete. ! (output_arithmetic_with_immediate_multiply): Delete. ! (output_shifted_move): Delete. ! (output_shift_compare): Delete. ! (arm_print_operand): New function. ! * arm.h (output_func_{prologue,epilogue}): Change declarations from ! output_{prologue,epilogue}. ! (arm_output_llc, arithmetic_instr, ! output_arithmetic_with_immediate_mulitply, ! output_arithmetic_with_shift, shift_instr): Delete function ! definitions. ! (ASM_OUTPUT_OPCODE): Delete. ! (PRINT_OPERAND): Call arm_print_operand, instead of doing it directly. ! (ARM_COMMENT_CHAR): New macro. ! (ARM_REG_PREFIX): New macro. ! (ARM_SIGN_EXTEND): New macro. ! (PRINT_OPERAND_ADDRESS): Delete variable 'shift'. Change type of ! variable 'offset' to HOST_WIDE_INT. Use arm_print_operand to handle ! shifts in addresses. ! * arm.md (all output patterns): Use new capabilities of ! arm_print_operand to simplify output sequences. Mark position of ! condition code with '%?'. ! ! * riscix.h (ASM_FINAL_SPEC [CROSS_COMPILE]): Correct typo. ! ! Thu Jun 2 08:14:00 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-common.c (c_build_type_variant): Don't change TYPE_MAIN_VARIANT ! of new type. ! ! * expr.c (expand_expr, case ADDR_EXPR): If result is ignored, ! just return const0_rtx. ! ! Wed Jun 1 13:52:01 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * i386/sco4.h: #define NO_IMPLICIT_EXTERN_C. ! ! Wed Jun 1 04:55:06 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! ! * arm.c: General tidy up. ! #include . ! Declare some prototypes. ! (output_memory_reference_mode): Change type to enum machine_mode. ! (arm_const_nmoves): Delete. ! (adjacent_mem_locations, {load,store}_multiple_operation): Explicitly ! declare to return int. ! ({load,store}_multiple_operation): Change type of 'count', 'base' and ! 'i' to HOST_WIDE_INT. ! (output_add_immediate): Change type of 'n' to HOST_WIDE_INT. ! (output_multi_immediate): Change type of Argument 'n' to ! HOST_WIDE_INT, if wider than 32 bits, mask out the high bits. ! (output_arithmetic_with_immediate_multiply): Change type of 'shift' ! to HOST_WIDE_INT. ! (output_func_{prologue,epilogue}): Renamed from ! output_{prologue,epilogue}. Check all registers to see if they are ! live, but only push/pop them if they are not in call_used_regs. ! * arm.h: Delete some dead code. ! (FUNCTION_{PROLOGUE,EPILOGUE}): Call output_func_{prologue,epilogue}. ! (INITIAL_ELIMINATION_OFFSET): Inspect all registers, but only add ! those that are not in call_used_regs. ! (GO_IF_LEGITIMATE_INDEX): Change type of variable 'range' to ! HOST_WIDE_INT; change type of variable 'code' to enum rtx_code. ! (REVERSIBLE_CC_MODE): New macro. ! ! * arm.c (const_pool_offset): New function. ! (get_prologue_size): New function. ! (output_func_prologue): Eliminate variable code_size. ! (output_func_epilogue): Only call arm_increase_location when ! optimizing; also add the size of the function just compiled, and the ! size of the prologue. ! (arm_output_asm_insn): Delete. All callers changed to use ! output_asm_insn. ! (arm_output_llc): Delete. ! (output_load_symbol): New first parameter 'insn'. Rewrite so that ! assembler can detect whether we made a mistake. ! * arm.h (arm_output_asm_insn): Delete declaration. ! (EXTRA_CONSTAINT): New constraint 'R' to match a constant pool label. ! Make constraint 'S' never match when not optimizing. ! (CONSTANT_ADDRESS_P): Only accept symbols marked with SYMBOL_REF_FLAG ! when optimizing. ! (ENCODE_SECTION_INFO): Don't mark any symbols when not optimizing. ! (ASM_OUTPUT_REG_{PUSH,POP}: Don't call arm_increase_location. ! (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. ! * arm.md (all insn and peephole patterns): Rewrite without using ! arm_output_asm_insn. ! (matcher for movsi): New alternative to load symbol directly into a ! register. Add new parameter in call to output_load_symbol. ! ! * arm.md (all patterns): Length attribute now describes length in ! bytes. ! * arm.c (short_branch): Convert length calculations to bytes. ! ! Tue May 31 20:35:39 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! ! * pa.c (emit_move_sequence): Add missing argument to symbolic_operand. ! (output_block_move): Prefer addl to add. ! (print_operand): Print fp regs with L suffix when appropriate. ! (output_arg_descriptor): Rewrite to accomodate new convention for ! USE information. ! ! * pa.h (SECONDARY_MEMORY_NEEDED): Simplify. ! (ADDITIONAL_REGISTER_NAMES): Define. ! (CONDITIONAL_REGISTER_USAGE): Make PIC_OFFSET_TABLE_REGNUM fixed ! again. ! ! Changes to combine fp registers for 1.0 and 1.1 architectures. ! (Make explicit clobbers of fp registers work.) ! * pa.h (FIRST_PSEUDO_REGISTER): Now 89. ! (FIXED_REGISTERS): Delete 1.0 fp registers, ! (CALL_USED_REGISTERS): Likewise. ! (CONDITIONAL_REGISTER_USAGE): Almost deleted. ! (REG_ALLOC_ORDER): Update register numbers. ! (HARD_REGNO_NREGS): Delete special case for 1.0 fp registers. ! (HARD_REGNO_MODE_OK): Rewrite. Don't allow use of odd fp registers ! (enum reg_class): Delete HI_SNAKE_FP_REGS and FP_OR_SNAKE_FP_REGS. ! (REG_CLASS_NAMES): Corresponding change. ! (REG_CLASS_CONTENTS): Delete HI_SNAKE_FP_REGS and ! FP_OR_SNAKE_FP_REGS. Make SNAKE_FP_REGS class contain all fp ! registers. Update all values for changed register numbering. ! (REGNO_REG_CLASS): Corresponding changes. ! (REG_CLASS_FROM_LETTER): Delete 'y'. ! (FP_REG_CLASS_P): No longer test HI_SNAKE_FP_REGS. ! (CLASS_MAX_NREGS): Delete special case for 1.1 fp registers. ! (FUNCTION_VALUE): Remove TARGET_SNAKE conditionals. ! (LIBCALL_VALUE): Likewise. ! (FUNCTION_ARG_REGNO_P): Likewise. ! (FUNCTION_VALUE_REGNO_P): Likewise. Add registers 29 and 33. ! (FUNCTION_ARG): Remove TARGET_SNAKE conditionals. Update register ! numbers. ! (REGNO_OK_FOR_FP_P): Update register number. ! (REGISTER_NAMES): Delete special entries for 1.0 fp registers. ! (DBX_REGISTER_NUMBER): Likewise. ! * pa.c (compute_frame_size): Update for changed register numbers. ! Simplify loops over general registers to stop at register 4. ! (hppa_expand_prologue): Likewise. ! (hppa_expand_epilogue): Likewise. ! ! Tue May 31 19:32:18 1994 Jim Wilson (wilson@cygnus.com) ! ! * mips.md (movesi_unaligned, movsi_ulw, movsi_usw): Delete. ! (extv, extzv, insv, movsi_ulw, movsi_usw): New patterns. ! ! * dbxout.c (dbxout_type): Always emit cross-references if ! use_gnu_debug_info_extensions set. ! ! * final.c (output_source_line): Call xcoffout_source_line. ! * xcoffout.c (xcoff_lastfile): New variable. ! (ABS_OR_RELATIVE_LINENO, ASM_OUTPUT_SOURCE_LINE): Define here. ! (xcoffout_source_file, xcoffout_source_line): New functions. ! (xcoffout_declare_function): Use xcoffout_source_file. ! * xcoffout.h (xcoff_lastfile): Declare. ! (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Clean up. Set xcoff_lastfile. ! (ABS_OR_RELATIVE_LINENO, ASM_OUTPUT_SOURCE_LINE): Delete here. ! (DBX_OUTPUT_SOURCE_FILENAME): Delete. ! ! * unroll.c (copy_loop_body): Copy CALL_INSN_FUNCTION_USAGE field. ! ! * sparc.h (ASM_SPEC): Don't pass -k when -pg or -p given. ! (OVERRIDE_OPTIONS): Warn when disabling -fpic. ! ! * mips-tdump.c (print_global_hdr): Remove "l" from printf format ! for flags. ! (print_sym_hdr): Add missing "l" to printf formats. ! (print_symbol, print_file_desc): Likewise. ! ! * i960.h (PUT_SDB_TYPE): Adjust value for compatibility with GNU960 ! toolchain. ! ! * sparc.h (LIB_SPEC): Don't link in /usr/lib/bb_link.o with -a. ! (CONDITIONAL_REGISTER_USAGE): When -a, make %g1 and %g2 fixed. ! ! * mips/iris5gas.h, mips/iris5gdb.h: New files. ! * configure (mips-sgi-irix5): Use iris5gas.h and iris5gdb.h. ! ! Tue May 31 19:21:44 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! ! * pa.md (movsi matcher): Use ldi for moving of 0 to a reg. ! (movhi matcher): Likewise. ! (movqi matcher): Likewise. ! (many patterns): Prefer addl to add, and shNaddl to shNadd. ! (define_split for (plus (reg) (large_constant))): Cleanup. ! (divsi3): Use match_dup for operand 3, not match_operand. ! (udivsi3): Likewise. ! (modsi3): Likewise. ! (umodsi3): Likewise. ! ! Tue May 31 19:15:31 1994 Doug Evans (dje@cygnus.com) ! ! * toplev.c (v_pedwarn_with_decl): Don't even issue warnings from ! pedantic errors in system header files. ! ! Tue May 31 17:16:41 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.md (extendqidi2, extendqisi2, extendqihi2): Remove ! non-existent lba instruction. ! (ashrdi3): Undo previous change. ! ! Tue May 31 12:30:00 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * toplev.c (lang_options): Add -f{no-,}implicit-templates. ! (compile_file): Don't output SDB debugging info for ! externals. ! ! Tue May 31 07:20:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * stmt.c (expand_asm_operands): Make MEM with BLKmode for clobber ! of "memory". ! * loop.c (note_addr_stored): A SET or CLOBBER of a BLKmode MEM means ! that all memory is clobbered. ! ! Mon May 30 14:01:48 1994 Doug Evans (dje@cygnus.com) ! ! * gcc.c (default_compilers): Pass -MG to cpp if present. ! (option_map): New option --print-missing-file-dependencies/-MG. ! * cccp.c (print_deps_missing_files): New global. ! (main): New argument -MG. Treat missing include files as ! generated files and output dependencies for them. ! ! Mon May 30 10:42:14 1994 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) ! ! * m68k/dpx2cdbx.h (PREFERRED_DEBUGGING_TYPE): Define as SDB_DEBUG. ! * m68k/dpx2g.h: Disable code that manages gcc.ifile. ! ! Mon May 30 10:35:49 1994 Stephen L Moshier (moshier@world.std.com) ! ! * optabs.c (expand_float): Avoid double-rounding when float is ! is narrower than int. ! * real.c (significand_size): New function. ! * real.h (significand_size): Declare. ! ! Sun May 29 15:58:21 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * jump.c (jump_optimize): When deleting unneeded stack adjusts ! or mem-mem copies, use delete_computation. ! ! * combine.c (force_to_mode): NEXT_SELECT is true for NEG. ! Only exit quickly if X is narrower than MODE and MASK has all ! bits in X's mode set. ! (force_to_mode, case SUBREG): Don't check for WORD_REGISTER_OPERATIONS. ! (force_to_mode, case NEG): Special-case test for low-order bit. ! ! * rtlanal.c (volatile_insn_p): Call ourselves in recursive scan. ! ! Sat May 28 19:03:23 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-parse.in (init, compstmt, stmt, all_iter_stmt_with_decl): ! If the lookahead token is a constant and we need to pop the ! momentary obstack, don't free it. ! ! * stmt.c (expand_end_case): Have INDEX_TYPE track conversions done ! to INDEX_EXPR. ! ! Sat May 28 06:25:40 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! ! * pa.md (call): Force address into register in non-symbol case. ! (call_value): Likewise. ! ! Fri May 27 19:29:30 1994 Doug Evans (dje@cygnus.com) ! ! * toplev.c (compile_file): Call init_regs after `word_mode' is valid. ! * regclass.c (init_reg_modes): If choose_hard_reg_mode can't find a ! valid mode, fall back to word_mode. ! ! * expr.c (use_reg): Fix recording of USE information. ! (use_regs): Likewise. ! Delete argument `reg'. All callers changed. ! * expr.h (use_regs): Update prototype. ! * calls.c (expand_call): Update call to use_regs. Call use_reg ! if parm is wholly in registers. ! ! * configure: If compiling in separate dir, add subdirs to .gdbinit. ! ! Fri May 27 18:18:23 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.md (zero_extendqidi2, zero_extendhidi2): Use rldicl ! instruction. ! * rs6000.h (RTX_COSTS): Update PPC603 and PPC604 values. ! ! Fri May 27 17:56:07 1994 Douglas Rupp (drupp@cs.washington.edu) ! ! * i386/xm-dos.h (DIR_SEPARATOR): New macro. ! ! Fri May 27 17:45:08 1994 Holger Teutsch (teutsch@ffm-iw.Degussa.DE) ! ! * clipper.h (PCC_STATIC_STRUCT_RETURN): No longer defined. ! ! Fri May 27 17:36:53 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * make-l2.com: Update to handle `ginclude' subdirectory ! when compiling libgcc2. ! ! Fri May 27 17:30:37 1994 Matthias Pfaller (leo@marco.de) ! ! * ns32k.c (print_operand_address): print_operand_address ! creates PLUS-rtls for internal use, so it has to handle them. ! ! Fri May 27 16:13:53 1994 Chris Torek (torek@elf.bsdi.com) ! ! * function.c (assign_parms): Set REG_USERVAR_P when parm ! is passed by invisible reference but can live in register. ! ! Fri May 27 06:03:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload.c (find_reloads): Revert to old code and change secondary ! reloads to RELOAD_FOR_OPERAND_ADDRESS too. ! ! * combine.c (try_combine): Don't make complemented XOR for ! constant out of range. ! ! * alpha.c (or_operand): Renamed from ior_operand. ! * alpha.h (PREDICATE_CODES): Likewise. ! * alpha.md (iordi3): Likewise. ! (xordi3): Use or_operand and add second alternative. ! (eqv): Only accept registers. ! ! * expr.c (expand_expr, case CONSTRUCTOR): If constant and large ! enough for memcpy to be used, build constructor into static memory. ! ! * alpha.md: Add define_split for sign-extended PLUS of a MULT ! of an SImode comparison. ! ! * combine.c (simplify_comparison): Narrow comparison for AND's ! that are ZERO_EXTENDs. ! Can widen for all comparisons if inputs are both sign extended. ! ! * reload1.c (reload_as_needed): Update spill_reg_order once we sort ! spill_regs. ! ! * alpha.md: Add define_split for sign-extended PLUS of an SImode ! comparison; change comparison to DImode. ! ! * stmt.c (expand_end_case): Use old type of INDEX_EXPR when making ! a constant. ! ! * local-alloc.c (requires_inout): Renamed from requires_inout_p and ! returns number of alternatives that require a match. ! (block_alloc): Use new function and handle case where all ! alternatives have some operand that must match operand 0. ! ! * local-alloc.c (qty_phys_num{,_copy}_sugg): New variables. ! (qty_phys_has{,_copy}_sugg): Deleted. ! (qty_sugg_compare{,_1}): New functions. ! (local_alloc): Allocate and init new vars instead of deleted ones. ! (block_alloc): Update and use new vars. ! Order quantities using new functions when allocating quantities ! with suggested registers. ! (combine_regs, find_free_reg): Use new vars to count number ! of suggestions. ! ! Thu May 26 11:55:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * jump.c (jump_optimize): When looking for an `if' statement ! that takes two insns to compute a result using a temporary, ! allow the temporary to be a SUBREG. ! ! * combine.c (simplify_comparison): Call CANONICALIZE_COMPARISON, ! if defined. ! * alpha.h (CANONICALIZE_COMPARISON): New macro. ! ! * combine.c (simplify_if_then_else): Don't make (mult (cond)) ! in simple case; leave as IF_THEN_ELSE instead. ! ! * expmed.c (expand_divmod): Correctly set CAN_CLOBBER_OP0 when we've ! converted OP0 to COMPUTE_MODE. ! ! Thu May 26 11:41:58 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Protect bool in curses.h with #ifndef __cplusplus, ! since g++ now defines bool as a basic type. ! ! * fixinc.svr4: Protect definition of __P used in Solaris math.h ! and floatingpoint.h to avoid future fixproto conflicts. ! ! * Makefile.in (stmp-fixinc): Don't pass ${srcdir} argument to ! $(FIXINCLUDES); no longer needed, and always problematical for ! binary only installations. ! * fixincludes: Remove initialization of ${SRCDIR}. Don't ! explicitly copy over multimedia/audio_errno.h; should be handled ! by Oct 11, 1993 change. ! * fixinc.svr4: Remove initialization of ${SRCDIR}. ! * fixinc.sco, fixinc.dgux: Likewise. ! ! Fri May 20 12:48:24 1994 Jim Wilson (wilson@cygnus.com) ! ! * stmt.c (expand_exit_loop_if_false): Emit conditional jump around ! unconditional loop exit instead of conditional loop exit. ! ! * rs6000.c (output_prolog): Use multiple fputs calls instead of ! one call with multiple strings. ! ! * iris4.h (STARTFILE_SPEC, LIB_SPEC): Define. ! ! * xcoffout.c (MAKE_LINE_SAFE): Delete. ! (ASM_OUTPUT_LBB, ASM_OUTPUT_LBE): Don't use MAKE_LINE_SAFE. ! ! Fri May 20 01:18:30 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) ! ! * config.sub (basic_machine): Accept cxux*. ! ! Thu May 19 19:12:41 1994 Mike Stump (mrs@cygnus.com) ! ! * calls.c (expand_call): Only destroy temps here, if -fshort-temps ! is given. ! ! Thu May 19 19:07:59 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) ! ! * config.sub: Fix unrecognized os error message. ! ! Thu May 19 17:46:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (emit_reload_insns): When seeing if an equivalent ! register can have it's output reload deleted, check for REG_DEAD ! notes for reload_in instead of calling dead_or_set_p. ! ! Thu May 19 16:38:32 1994 Stephen L Moshier (moshier@world.std.com) ! ! * emit-rtl.c (operand_subword): Fix arg of REAL_VALUE_TO_TARGET_SINGLE ! and .._DOUBLE. Permit float subword extraction when host's word ! width is wider than target's. ! ! Thu May 19 15:09:21 1994 Ian Lance Taylor (ian@cygnus.com) ! ! * fixincludes: Make OSF/1 getopt.h fix work on AIX also. ! ! Wed May 18 15:34:10 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * fixincludes: Add forward declaration of struct exception to ! SunOS 4 math.h. ! ! Wed May 18 12:46:46 1994 Per Bothner (bothner@kalessin.cygnus.com) ! ! * stor-layout.c (layout_decl): Allow any integral types ! for bit fields. (Specifically, C++ now has a 'bool' type.) ! ! Wed May 18 16:32:40 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload1.c (compare_spill_regs): Fix typo in declaration. ! Wed May 18 10:39:00 1994 Brendan Kehoe (brendan@lisa.cygnus.com) ! * fixinc.svr4: Avoid the SVR4 typedef of bool in curses.h when ! compiling for C++, since g++ now supports it as an official typename. ! Tue May 17 18:06:32 1994 Matthias Pfaller (leo@marco.de) ! * ns32k.md: Don't use the extsd/extd instructions on the ns32532. ! Tue May 17 17:44:38 1994 Pat Rankin (rankin@eql.caltech.edu) ! * make-cc1.com (CFLAGS): Separate include file handling; for ! stage 1, CFLAGS1 is appended to CFLAGS, otherwise CFLAGS2. ! Tue May 17 16:35:22 1994 Jason Merrill (jason@deneb.cygnus.com) ! * convert.c (convert_to_real): Accept boolean values. ! * config/m68k/hp320.h: #define NO_IMPLICIT_EXTERN_C ! Tue May 17 15:52:05 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * libgcc2.c (__umoddi3): Correct type of variable `w'. ! * combine.c (simplify_set): Move call to make_field_assignment ! to end; if SRC or DEST is a (clobber (const_int 0)), return it. ! (force_to_mode): If X is a CALL, just return it. ! * reload.c (find_reloads): Properly account for cost when ! constant is forced to memory to ensure same alternative chosen later. ! Tue May 17 11:30:19 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * combine.c (simplify_set): Use rtx_equal_p to compare cc_use and its ! setter. ! (make_extraction): Don't put a subreg around a register if it is ! already in the correct mode. ! * reload1.c (compare_spill_regs): New function. ! (reload_as_needed): Sort the spilled regs. ! (allocate_reload_reg): If we have group needs and failure would be ! fatal, do not try to do round-robin allocation of the spill regs. ! Mon May 16 18:58:10 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.md (zero_extendqidi2): Fix omission of TARGET_POWERPC64 ! test in previous change. ! Mon May 16 14:59:25 1994 Per Bothner (bothner@cygnus.com) ! * dbxout.c (dbxout_type): When emitting an ENUMERAL_TYPE, if ! the precision is different from the default precision (perhaps ! because of -fshort-enums), write out the precision. ! Mon May 16 17:44:49 1994 Stephen L Moshier (moshier@world.std.com) ! * real.c (ereal_from_int, ereal_to_int, etarsingle): Correct ! signed/unsigned discrepancies. ! (ereal_from_double): Avoid "right shift count too big" warning ! in previous change. ! * final.c (split_double): Fix arg of REAL_VALUE_TO_TARGET_DOUBLE. ! * real.h (REAL_VALUE_FROM_TARGET_SINGLE, .._DOUBLE): Change ! arg from long to HOST_WIDE_INT. ! * real.c (ereal_from_float, .._double): Likewise, and unpack ! the HOST_WIDE_INTs. ! Mon May 16 16:16:32 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * flow.c (try_pre_increment_1): Don't try to create a pre-increment ! expression if the register dies in the succeeding insn. ! * expr.c: Use #ifdef TARGET_EDOM, not #if. ! * expr.c (convert_move): When {zero,sign}_extending, allow a wider ! intermediate than to_mode if truncation is a no-op. ! Mon May 16 11:49:28 1994 Doug Evans (dje@cygnus.com) ! * m68k/apollo68.h (REGISTER_PREFIX_MD): Delete. ! Mon May 16 08:11:57 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * rs6000.c (rs6000_convert_preincs): Delete. ! * rs6000.h (FINAL_PRESCAN_INSN): Delete. ! * c-typeck.c (initializer_constant_valid_p): Rework to use ! precision, not size. ! Allow conversions from integer to pointer if int is wide enough. ! * c-decl.c (finish_enum): Handle VALUES being an ERROR_MARK. ! * rs6000.md: Replace bogus "andil" opcode with rlinm. ! Sat May 14 21:26:05 1994 Doug Evans (dje@cygnus.com) ! * hard-reg-set.h (GO_IF_HARD_REG_EQUAL): Fix typo. ! * jump.c (find_cross_jump): Two CALL_INSNs only compare equal if ! their CALL_INSN_FUNCTION_USAGEs are the same as well. ! * stupid.c (stupid_life_analysis): Make sure a function result reg ! is still live if it contains an argument. ! Fri May 13 22:17:48 1994 Doug Evans (dje@cygnus.com) ! * reorg.c (mark_referenced_resources): Fix typo. ! Fri May 13 18:54:38 1994 Jason Merrill (jason@deneb.cygnus.com) ! * integrate.c (integrate_decl_tree): Use copy_node to make a copy ! of the decl. Also call copy_lang_decl to copy the ! language-specific bits. ! * tree.h: Declare copy_lang_decl. ! * c-decl.c (copy_lang_decl): No-op function that will never ! actually be called. ! Fri May 13 15:12:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (cse_insn): Correctly check for two modes being the ! same number of words. ! Fri May 13 05:03:51 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) ! * c-parse.in (enumlist): Add error alternative. ! Thu May 12 23:25:38 1994 Jason Merrill (jason@deneb.cygnus.com) ! * c-common.c (truthvalue_conversion): If expr is a BIT_AND_EXPR ! where one of the operands is integer_onep, just return expr. ! Thu May 12 20:08:49 1994 Mike Stump (mrs@cygnus.com) ! Fixup lifetime of temporaries. ! * calls.c (expand_call): Only destroy temporaries at the end ! of function calls, if flag_short_temps is set. ! * expr.c (safe_from_p, expand_expr): Handle CLEANUP_POINT_EXPRs. ! * expr.c (expand_expr): Improve handling of temporaries inside ! COND_EXPRs, cures call to sorry. ! * expr.c (defer_cleanups_to): New routine to handle the deferral ! of cleanups. ! * flags.h (flag_short_temps): New flag, to allow better control ! over the lifetime of temporaries. ! * toplev.c (flag_short_temps, lang_options): Ditto. ! * tree.def (CLEANUP_POINT_EXPR): Add, to allow better control over ! the lifetime of temporaries. ! Thu May 12 19:33:54 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.md (function units): Numerous cycle count change. ! (zero_extendqidi2, extendqidi2, zero_extendhidi2): New patterns. ! (extendhidi2, zero_extendsidi2, extendsidi2): Likewise. ! (zero_extendqisi2, zero_extendqihi2, zero_extendhisi2): Use ! andil/andi instead of rlinm/rlwinm. ! (zero_extendqihi2): Add condition register variants. ! (extendqisi2, extendqihi2): Use extsb for PowerPC. ! (adddi3, subdi3, negdi2, ashrdi3): Emulate only if !TARGET_POWERPC64. ! (movdf, movdi, movti): New PowerPC64 versions. ! (load/store with update): New PowerPC64 patterns. ! Thu May 12 18:50:55 1994 Stephen L Moshier (moshier@world.std.com) ! * real.c (m16m): Change first arg to int; all callers changed. ! Thu May 12 18:46:26 1994 Bill Cox (bill@cygnus.com) ! * fixincludes: Add definition of DBL_MAX to math.h for Lynx math.h. ! Correct return type of strlen in Lynx string.h. ! Delete definition of 'void' as 'int' from Lynx curses.h. ! Thu May 12 18:11:33 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload.c (find_reloads): Don't change a secondary reload ! to RELOAD_FOR_OPERAND_ADDRESS. ! * function.c (assign_parms): Fix typo in previous change. ! Thu May 12 15:48:54 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * c-common.c (decl_attributes): Revert to identifiers for ! mode attributes. ! * libgcc2.c: Likewise. ! Thu May 12 15:41:38 1994 Pat Rankin (rankin@eql.caltech.edu) ! * vax/xm-vms.h (lookup_name_current_level_global): New macro. ! Wed May 11 17:44:47 1994 Jim Wilson (wilson@cygnus.com) ! * cse.c (cse_insn): Set src_eqv if the dest is a STRICT_LOW_PART. ! * expmed.c (store_fixed_bit_field): Delete code to handle ! MODE_FLOAT values here. ! (store_bit_field): Put it here instead. ! Wed May 11 16:18:21 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * a29k.c (a29k_clobbers_to): New function. ! * a29k.md (clobbers_to): Deleted. ! (call_internal, call_value_internal): New patterns. ! (call, call_value): Just call new patterns and a29k_clobbers_to. ! * stor-layout.c (layout_type): Use POINTER_SIZE, instead of width ! of Pmode, when appropriate. ! * calls.c (emit_call_1): Put new function usage data at end of ! any data already there. ! * expr.c (expand_builtin_apply): Likewise. ! * sched.c (sched_analyze_insn): Fix typo in last change. ! Wed May 11 14:45:12 1994 Doug Evans (dje@cygnus.com) ! * configure: Fix handing case of no language subdirs. ! Wed May 11 12:11:40 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixincludes: Don't recursively search symlinks to `.'. ! Tue May 10 17:49:57 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * configure: Include stage4 in the list. ! * gcc.c (process_command): Kludge in stageN/../include instead of ! include. ! Mon May 9 21:04:19 1994 Jim Wilson (wilson@cygnus.com) ! * sparc.h (*TF*_LIBCALL): Delete `*' from libcall name. ! Mon May 9 18:42:10 1994 Matthias Pfaller (leo@marco.de) ! * ns32k.c (output_move_dconst): Fix errors on ranges. ! Mon May 9 18:33:16 1994 Chris Torek (torek@bsdi.com) ! * gcc.c (delete_if_ordinary): New function. ! (delete_temp_files, delete_failure_queue): Call it. ! Sat May 7 12:12:58 1994 Andreas Neubacher (aneubach@risc.uni-linz.ac.at) ! * i386/seq-sysv3.h (LIB_SPEC): Support -fshared-data. ! (CPP_SPEC): Set _SEQUENT_ to 1. ! (SHARED_SECTION_ASM_OP, ASM_OUTPUT_SHARED_COMMON): Supply new macros. ! (SHARED_BSS_SECTION_ASM_OP, BSS_SECTION_FUNCTION): Likewise. ! Sat May 7 10:09:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reorg.c (mark_{referenced,set}_resources): Fix typos in last change. ! * reload1.c (emit_reload_insns): Don't try to delete output reload ! if there isn't one. ! * i386.h (REG_ALLOC_ORDER): New macro. ! * sched.c (sched_analyze_insn, attach_deaths_insn): Look at ! CALL_INSN_FUNCTION_USAGE. ! * reload1.c (choose_reload_regs): Remove previous change. ! Fri May 6 20:32:22 1994 Doug Evans (dje@canuck.cygnus.com) ! * sparc.c (leaf_reg_backmap): Delete. ! (sparc_flat_compute_frame_size): Renamed from ! sparc_frw_compute_frame_size. All callers changed. ! (sparc_flat_save_restore): Likewise. ! (sparc_flat_output_function_prologue): Likewise. ! Delete decl of call_used_regs. ! Delete reference to frame_base_name, use frame pointer explicitly. ! Print prologue end marker. ! (sparc_flat_output_function_epilogue): Likewise (renaming). ! Delete decls of asm_out_data_file, asm_out_file, call_used_regs. ! Print epilogue start marker. ! (sparc_flat_epilogue_delay_slots): Likewise (renaming). ! (sparc_flat_eligible_for_epilogue_delay): Likewise. ! * sparc.h (TARGET_FRW): Add note saying this option is deprecated. ! (TARGET_FLAT): Renamed from TARGET_FRW_COMPAT. ! (TARGET_SWITCHES): Delete references to -mfrw, -mfrw-compat. ! Add -mflat. ! (CONDITIONAL_REGISTER_USAGE): If -mflat, fix %i7, rename "%fp" ! to "%i7", and make %g7 a global_reg. ! (FRAME_POINTER_REQUIRED): Handle -mflat. ! (INITIAL_FRAME_POINTER_OFFSET): Likewise. ! (ARG_POINTER_REGNUM): Explicitly say it's the frame pointer. ! (LEAF_REGISTERS): Make %g7 not a leaf register. ! (leaf_reg_backmap): Delete. ! (LEAF_REG_BACKMAP): Likewise. ! (FUNCTION_PROLOGUE): Handle -mflat. ! (FUNCTION_EPILOGUE): Likewise. ! (DELAY_SLOTS_FOR_EPILOGUE): Likewise. ! (ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise. ! Fri May 6 14:05:00 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * tree.h (TYPE_ATTRIBUTES): New macro. ! (struct tree_type): attributes, new field. ! (precision): Move this field up for better alignment. ! (attribute_list_{equal,contained}): Prototype for new functions. ! (build_type_attribute_variant): Prototype for new function. ! * c-parse.in: Rewrite attribute parsing; update the expected ! conflicts and state numbers. ! * tree.c (TYPE_HASH): Move definition to top of file. ! (make_node): Add support for SET_DEFAULT_TYPE_ATTRIBUTES. ! (build_type_attribute_variant): New function. ! (type_hash_lookup): Check if the attributes match. ! (attribute_list_{equal,contained}): New functions. ! * c-typeck.c (common_type): Add attribute merging. ! (comp_types): Use COMP_TYPE_ATTRIBUTES macro. ! * print-tree.c (print_node): Print attributes. ! * c-common.c (decl_attributes): Move the attribute ! recognition and rejection here from c-parse.in. ! (decl_attributes): Use VALID_MACHINE_ATTRIBUTE macro. ! * regclass.c (init_reg_sets_1): Eliminate several permanent ! call_fixed_regs. ! * rtl.def (CALL_INSN): Define new CALL_INSN_FUNCTION_USAGE field. ! * rtl.h (CALL_INSN_FUNCTION_USAGE): New macro. ! (find_reg{,no}_fusage): Prototype for new function. ! * rtlanal.c (reg_used_between_p): Check usage exprs on CALL_INSNs. ! (reg_referenced_between_p, reg_set_p, dead_or_set_regno_p): Likewise. ! (find_reg{,no}_fusage): New functions. ! * combine.c (try_combine): Restrict combining on CALL_INSNs. ! (distribute_{notes,links}): Look at CALL_INSN_FUNCTION_USAGE. ! * cse.c (cse_insn): Invalidate CLOBBERed registers. ! (count_reg_usage): Count registers in USE rtls on CALL_INSNs. ! * emit-rtl.c (make_call_insn_raw): New function. ! (emit_call_insn{,_before}): Use make_call_insn_raw. ! * calls.c (prepare_call_address, emit_call_1, expand_call): Change ! from USE and CLOBBER insns to using CALL_INSN_FUNCTION_USAGE. ! (emit_library_call{,_value}): Likewise. ! * expr.c (use_regs, expand_builtin_apply): Likewise. ! * expr.h (use_regs): Likewise. ! * flow.c (flow_analysis, find_basic_blocks): Likewise. ! * caller-save.c (insert_save_restore): Likewise. ! * function.c (fixup_var_refs_insns): Likewise. ! * jump.c (find_cross_jump, get_label_{before,after}): Likewise. ! * reload1.c (emit_reload_insns): Likewise. ! * reorg.c (mark_referenced_resources, mark_set_resources): Likewise. ! * integrate.c (save_for_inline_copying, expand_inline_function): ! Copy CALL_INSN_FUNCTION_USAGE field. ! * reload1.c (choose_reload_regs): Ban filled argument registers. ! * caller-save.c (save_call_clobbered_regs): CALL_INSN_FUNCTION_USAGE ! requires a sharper liveliness check. ! * flow.c (propagate_block): Mark all registers mentioned in USE ! usage expressions on a CALL_INSN as used. ! * jump.c (find_cross_jump): If STACK_REGS is defined two ! CALL_INSNs only compare equal if their USE usage rtls are ! the same as well. ! * stupid.c (stupid_life_analysis): Check the usage information ! on CALL_INSNs. ! * function.c (assign_parms): Spread out the REG_EQUIV notes ! on CONCATs. ! Fri May 6 12:43:10 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload.c (find_reloads): Ignore alternatives that will ! not be reloadable due to PREFERRED_RELOAD_CLASS. ! * explow.c (allocate_dynamic_stack_space): Just return ! virtual_stack_dynamic_rtx if asking for zero bytes. ! Set current_function_calls_alloca here and also record new ! stack level for nonlocal gotos. ! * expr.c (expand_builtin, case BUILT_IN_ALLOCA): Don't ! set current_function_calls_alloca here nor record new ! stack level for nonlocal gotos. ! * stmt.c (expand_decl): Likewise. ! * function.c (assign_parms): Use expr_size when appropriate. ! * c-typeck.c (comptypes): An enum type is compatible with type of ! same signedness as well as precision. ! * alpha.h (CONST_COSTS): Revise all costs. ! * alpha.md (addsi3, subsi3): Add define_expand to make ! adddi3/subdi3; old pattern is now anonymous. ! * combine.c (simplify_rtx, case MULT): Don't convert MULT to ! shift here. ! (simplify_logical, case IOR): Convert back to PLUS if valid and ! it will combine with another PLUS. ! (extract_left_shift): New function. ! (make_compound_operation, case ASHIFTRT): Simplify by calling it. ! (force_to_mode): Don't ignore if X is a SUBREG. ! (force_to_mode, case AND): Try to turn unchecked bits on ! instead of just off and see which is cheaper. ! Fri May 6 11:22:23 1994 Ian Lance Taylor (ian@cygnus.com) ! * Makefile.in (libgcc1.a, libgcc2.a): Don't ignore errors in for ! loops over $(LIB[12]FUNCS_EXTRA). ! Fri May 6 06:14:56 1994 Mike Stump (mrs@cygnus.com) ! * expr.c (expand_cleanups_to): Tell expand_expr that we are going ! to ignore the result of the cleanup. ! Thu May 5 17:45:02 1994 Stan Shebs (shebs@andros.cygnus.com) ! * gcc.c (do_spec_1): If -save-temps, always clear the deletion flag. ! Thu May 5 13:39:35 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * combine.c (simplify_rtx, case SUBREG): Don't call force_to_mode. ! (simplify_set): Call force_to_mode here. ! * m68k.md (movhi): Simplify code involving jump-table ! reference. ! (load_address): Handle case of jump-table reference; output ! required label. ! Thu May 5 12:28:16 1994 Ian Lance Taylor (ian@cygnus.com) ! * cccp.c (main): Include source file name in dependency output. ! Wed May 4 18:45:07 1994 Doug Evans (dje@cygnus.com) ! * config.sub: Remove duplicate -freebsd* entry. ! Wed May 4 18:03:34 1994 Jason Merrill (jason@deneb.cygnus.com) ! * cccp.c (special_symbol): Don't copy simple strings, use wchar_type. ! (main): Setup wchar_type for C++ if needed. ! (initialize_builtins): Use wchar_type. ! Wed May 4 17:19:34 1994 Mike Collison (collison@sw.stratus.com) ! * reload.c (push_secondary_reload): Use TYPE for secondary type ! if it is RELOAD_FOR_{INPUT,OUTPUT}_ADDRESS. ! Wed May 4 16:35:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * configure (i386-gnu): New, same as i386-mach. ! * global.c (find_reg): When looking for locally-allocated hard ! regs to reclaim, use REG_ALLOC_ORDER to find least used. ! * reload1.c (emit_reload_insns): Add another way to delete an ! output reload. ! * reload1.c (reload, reload_as_needed): Check for use of return ! register with reg_referenced_p, not reg_mentioned_p. ! Wed May 4 14:23:51 1994 Jim Wilson (wilson@cygnus.com) ! * mips.c (override_options): Delete TARGET_LLONG128 references. ! * mips.h (MASK_LLONG128, TARGET_LLONG128): Delete. ! (TARGET_SWITCHES): Delete -mlonglong128 option. ! (LONG_LONG_TYPE_SIZE): Delete TARGET_LLONG128 reference. ! * mips/bsd-4.h, mips/bsd-5.h, mips/news4.h, mips/news5.h, ! mips/nws3250v4.h, mips/svr3-4.h, mips/svr3-5.h, mips/svr4-4.h, ! mips/svr4-5.h (CPP_SPEC): Delete. ! * mips/dec-bsd.h (CPP_SPEC): Define __SIZE_TYPE__, ! __PTRDIFF_TYPE__, and __mips. ! (SIZE_TYPE): Delete. ! * mips/dec-osf1.h (PTRDIFF_TYPE): Delete. ! (CPP_SPEC): Define, overriding ultrix.h version. ! * mips/iris5.h (CPP_SPEC): Define __SIZE_TYPE__, __PTRDIFF_TYPE__, ! and __mips. ! * mips/osfrose.h (CPP_SPEC): Define __PTRDIFF_TYPE__ and __mips. ! (PTRDIFF_TYPE): Delete. ! (SIZE_TYPE): Define. ! (SET_ASM_OP): Define. ! * config/mips/ultrix.h (CPP_SPEC): Delete. ! (SIZE_TYPE): Delete. ! Tue May 3 19:04:43 1994 Jason Merrill (jason@deneb.cygnus.com) ! * Makefile.in (stamp-objlist): Depend on OBJS and BC_OBJS so that ! subdir makes will know to re-link. ! Mon May 2 16:05:05 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * toplev.c (compile_file): If static consts haven't been written ! out yet, don't do it just because TREE_USED is set (if we're ! optimizing). (This wins for C++, which uses static consts a lot.) ! Mon May 2 16:42:59 1994 Jim Wilson (wilson@cygnus.com) ! * stmt.c (expand_end_case): Make sure gen_casesi operands are ! valid by passing them through copy_to_mode_reg if necessary. ! * mips.md (casesi): Delete force_reg calls. ! * ns32k.c (output_move_double): Always use split_double for the ! CNSTOP case. ! * gcc.c (translate_options): For options that take an argument, ! don't skip the argument if it doesn't exist. ! * c-decl.c (pushdecl): Use lookup_name_current_level_global instead ! of lookup_name for extern references. Don't return duplicate decl ! if it came from the global binding level, and there exists a ! conflicting decl in an intervening block. ! (lookup_name_current_level_global); New function. ! * c-tree.h (lookup_name_current_level_global): Declare. ! * sys-protos.h (read, write): Last parm is size_t not unsigned int. ! * unroll.c (remap_split_bivs): New function. ! (unroll_loop): When remapping split bivs in the last instruction, ! handle JUMP_INSNs in addition to INSNs. ! Mon May 2 12:53:57 1994 Jason Merrill (jason@deneb.cygnus.com) ! * config/nextstep.h (INCLUDE_DEFAULTS): Add cxx_aware field. ! * config/vax/xm-vms.h (INCLUDE_DEFAULTS): Ditto. ! Fri Apr 29 18:30:38 1994 Kung Hsu (kung@cygnus.com) ! * tree.h (TYPE_DECL_SUPPRESS_DEBUG): new macro to support ! suppressing of detail type infos into stabs. ! * dbxout.c (dbxout_type): check the above flag to generate cross ! reference in stabs. ! Fri Apr 29 01:01:45 1994 Doug Evans (dje@cygnus.com) ! * Makefile.in (stamp-objlist): New target. ! Thu Apr 28 22:17:15 1994 Doug Evans (dje@cygnus.com) ! * Makefile.in (USE_ALLOCA): Rearrange "'s. ! (FLAGS_TO_PASS): Delete CLIB, MALLOC, OBSTACK. ! Thu Apr 28 19:04:17 1994 Jim Wilson (wilson@cygnus.com) ! * stmt.c (expand_end_case): Correct test for sign extending ! unsigned constant index when creating index_expr. ! * cccp.c (macroexpand): Use start_line for line number of the new ! instack level pushed at the end. ! Thu Apr 28 18:59:17 1994 Mike Stump (mrs@cygnus.com) ! * stmt.c: Remove old exception handling support from the backend. ! Thu Apr 28 18:59:53 1994 Torbjorn Granlund (tege@adder.cygnus.com) ! * sparc.c (arith_double_operand): Modify to accept all possible constants. ! * sparc.md (adddi3, subdi3, anddi3, iordi3, xordi3): Corresponding changes. ! (one_cmpldi3): Don't allow constants for operand 1. ! Thu Apr 28 18:10:18 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.md (addsi3): Prefer add without carry instructions and ! flag input operands as commutative for condition register variant. ! (subsi3): Define PowerPC patterns using subtract without carry. ! (numerous): Flag input operands as commutative for condition ! register variant. ! (mov* matchers): Use mr instruction in ! TARGET_POWERPC case as ! well and mr. in condition register variant. ! * rs6000.c (output_prolog): Use mr, lis, and li instructions. ! Use subf instruction if TARGET_POWERPC. ! (output_epilog): Use cal/addi instruction. ! ! Thu Apr 28 12:48:59 1994 Andreas Neubacher (aneubach@risc.uni-linz.ac.at) ! ! * i386/seq-sysv3.h (SHARED_SECTION_ASM_OP): Defined. ! ! Thu Apr 28 12:40:28 1994 Doug Evans (dje@cygnus.com) ! ! * expr.c (expand_builtin): Fix typo in previous patch ! (allow __builtin_next_arg in varargs functions). ! ! Tue Apr 26 16:31:44 1994 Per Bothner (bothner@cygnus.com) ! ! * tree.h (AGGREGATE_TYPE_P): New macro. ! * calls.c, expr.c, function.c, stmt.c, varasm.c: Use ! new macro AGGREGATE_TYPE_P. ! ! Mon Apr 25 18:45:28 1994 John Hassey (hassey@dg-rtp.dg.com) ! ! * varasm.c (copy_constant, case CONSTRUCTOR): Fix typo; copied list ! was placed on old CONSTRUCTOR, not new one. ! ! Mon Apr 25 15:04:53 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-decl.c (grokdeclarator): Never warn about `long long' in ! system header. ! ! * c-decl.c (finish_decl): Redo last change. ! ! * Makefile.in (*compare*): Add missing semicolons. ! ! Mon Apr 25 15:02:31 1994 Doug Evans (dje@cygnus.com) ! ! * configure (m68k-hp-hpux): t-hp320g no longer needed as of gas 2.1. ! * m68k/t-hp320g: Deleted. ! ! Mon Apr 25 14:23:18 1994 Poul-Henning Kamp (phk@login.dkuug.dk) ! ! * config.sub, configure: Recognize FreeBSD. ! * i386/freebsd.h, x-freebsd: New files. ! * i386/x-freebsd: New file. ! * i386.h (TARGET_NO_FANCY_MATH_387): New option. ! * i386.md (TARGET_NO_FANCY_MATH_387): Implement new option. ! * ginclude/stdarg.h, ginclude/stddef.h, ginclude/varargs.h: ! Recognize __FreeBSD__. ! * gcc.c (link_command_spec): Add -Z argument for ZMAGIC's on FreeBSD. ! ! Mon Apr 25 14:08:26 1994 Doug Evans (dje@cygnus.com) ! ! * configure (language search loop): Correct test for no languages. ! (CC): Use single quotes to avoid shell expansion of $(CC). ! ! Mon Apr 25 13:10:07 1994 Andreas Stolcke (stolcke@icsi.berkeley.edu) ! ! * Makefile.in (install-common): Install EXTRA_PARTS with ! INSTALL_DATA, not INSTALL_PROGRAM. ! ! Mon Apr 25 06:34:00 1994 Stephen L Moshier (moshier@world.std.com) ! ! * fold-const.c (fold-convert): Use assignment, instead of ! initializing, aggregate local variable REAL_VALUE_TYPE. ! ! Sun Apr 24 11:17:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reorg.c (redirect_with_delay_list_safe_p): Fix off-by-one error. ! ! * real.c (etoe53, etoe24): Make all occurrences static. ! ! * emit-rtl.c (try_split): Don't try to recursively split deleted insn. ! ! * rs6000.md (movti): Adjust constraints to avoid impossible reload. ! ! * expr.c (expand_expr, case SAVE_EXPR): Fix error in last change. ! ! Sat Apr 23 06:45:50 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload1.c (reloads_conflict, case RELOAD_FOR_OUTPUT): Fix typo. ! ! Fri Apr 22 18:43:08 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * configure (alpha-dec-osf): Fix typo. ! ! Fri Apr 22 15:02:22 1994 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) ! ! * gcc.c (handle_braces, check_live_switch): Refine previous change. ! ! Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com) ! ! * configure: Sort machines. ! ! * Language directory reorganization. ! * configure: Auto-configure each language subdirectory by looking ! for */config-lang.in. ! Add language makefile fragments (Make-lang.in) to top level makefile, ! and hook them in via lang.* targets. ! Configure each language subdirectory. On hosts that support them, ! create stage[123] symlinks in each subdirectory. ! If there is a configure script in the subdirectory, run it. ! * Makefile.in (LANGUAGES): Remove c++. ! (SUBDIRS): New variable. ! (LEX, LEXFLAGS): Ditto. ! (MAKEOVERRIDES): Ditto. ! (COMPILERS): Remove cc1plus. ! (LANG_MAKEFILES, LANG_STAGESTUFF, LANG_DIFF_EXCLUDES, FLAGS_TO_PASS): ! New variables. ! (CPLUS_OBJS, CPLUS_TREE_H, C++, c++, g++, g++-cross, cc1plus, ! cp-*.o, g++.o, gplus.info): Deleted. ! (STAGESTUFF): Remove g++, g++-cross, cc1plus. Add $(LANG_STAGESTUFF). ! (Makefile): Depend on $(LANG_MAKEFILES). ! (####language hooks, ####language fragments): New spots for sed ! to insert things. ! (all.cross, all.build, start.encap, rest.encap, info, dvi, ! install-normal, install-common, install-info, install-man, ! uninstall, distdir, mostlyclean, clean, distclean, extraclean, ! realclean, stage1, stage2, stage3, stage4): Depend on lang.foo. ! (mostlyclean, clean, distclean, extraclean, realclean): Clean as ! much of the language subdirectories as we can. ! (install-common): Remove g++ installation. ! (install-man): Remove g++.1 installation. ! (uninstall): Remove g++ reference. ! (TAGS): Remove cp-parse.? reference. ! (distdir): Ditto. ! (distdir-start, distdir-finish): New targets. ! (diff): Remove cp-parse.? reference. Add $(LANG_DIFF_EXCLUDES). ! (compare, compare3, gnucompare, gnucompare3): Compare language ! subdirectories too. ! (stage1-start, stage2-start, stage3-start, stage4-start): New targets. ! Ensure stage subdirectory exists before processing language ! dependent part. ! * cp/Makefile.in: New file, makefile for c++ subdirectory. ! * cp/Make-lang.in: New file, c++ language makefile fragment. ! This file provides c++ specific support to the top level makefile via ! several well defined targets: c++.all.build, c++.all.cross, ! c++.start.encap, c++.rest.encap, c++.info, c++.dvi, ! c++.install-normal, c++.install-common, c++.install-info, ! c++.install-man, c++.uninstall, c++.distdir, c++.mostlyclean, ! c++.clean, c++.distclean, c++.extraclean, c++.realclean, ! c++.stage1, c++.stage2, c++.stage3, c++.stage4. ! * cp/config-lang.in: New file, defines language name and other ! configuration parameters for the c++ language: compilers, stagestuff, ! and diff_excludes. ! * g++.c: Move into cp subdirectory. ! * g++.1: Ditto. ! * g++int.texi: Ditto. ! * cp-*: Ditto, remove "cp-" prefix except for cp-tree.h. ! ! Thu Apr 21 15:47:01 1994 Jim Wilson (wilson@cygnus.com) ! ! * sparc.c (mem_aligned_8): Don't assume addresses with ! MEM_IN_STRUCT_P set are 8 byte aligned. ! ! * iris5.h (CPP_SPEC): Define _LANGUAGE_C for Objective C also. ! ! * unroll.c (find_splittable_givs): Share dest_reg for multiple ! address givs within a single instruction. ! (copy_loop_body): Only update psuedo-reg for shared giv once. ! ! * sparc.c (sparc_type_code): Don't put more than 30 bits of info ! into the variable qualifiers. ! ! * expr.c (store_expr): Don't check the TYPE_MODE of an ERROR_MARK. ! ! Thu Apr 21 15:34:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * calls.c (calls_function_1): A language-specific code must ! be assumed to call a function and also call alloca. ! Check for inlined functions that call alloca. ! ! * reload1.c (reload): Clear forbidden_regs earlier. ! (new_spill_reg): Mention in error message that asm clauses can also ! cause the compiler to run out of spill regs. ! (scan_paradoxical_regs): If SMALL_REGISTER_CLASSES, forbid ! hard regs used in explicit user variables. ! ! * combine.c (can_combine_p, combinable_i3pat, try_combine): Allow ! combination involving hard regs if the hard reg is a user variable. ! ! * gcc.c (default_compilers): If -E and the file is (e.g.) x.s, ! don't run the assembler; similarly for .i, .ii, .adb, etc. ! ! * Cleanups related to adding prototypes to many declarations. ! * rtl.h: If TREE_CODE undefined, make an incomplete union for tree. ! (STDIO_PROTO): Define here if not already defined. ! (read_rtx): Use STDIO_PROTO. ! (output_constant_def, immed_real_const): Use "union tree_node *". ! (immed_real_const_1): Move declaration to real.h. ! (rtx_to_tree_code): Supply prototype. ! * tree.h: If RTX_CODE undefined, make an incomplete struct for rtx. ! Add some missing declarations of functions in stmt.c. ! (STDIO_PROTO): Define here if not already defined. ! * real.h: Add prototypes to declarations of functions in real.c. ! (immed_real_const_1): Move declaration from rtl.h. ! * output.h: Add missing declarations of functions in final.c. ! (STDIO_PROTO): Don't define here. ! * c-tree.h (STDIO_PROTO): Likewise. ! * reload.h (PROTO, STDIO_PROTO): Likewise. ! * bi-opcode.c (main): Don't write overly-long line. ! * cse.c, emit-rtl.c: Use CONST_DOUBLE_FROM_REAL_VALUE macro for immed ! real_const_1. ! * expmed.c: Add prototypes for static functions. ! * expr.c (bc_expand_expr): Call expand_decl and expand_decl_init, ! not the bc_ versions. ! * final.c: Include stdio.h and ctype.h early. ! Add prototypes for static functions. ! * function.c: Add prototypes for static functions. ! (bc_expand_function_end, expand_function_end): Call new ! expand_fixups instead of old fixup_gotos. ! * global.c, local-alloc.c: Add prototypes for static functions. ! * integrate.c: Likewise. ! Use CONST_DOUBLE_FROM_REAL_VALUE macro for immed_real_const_1. ! * optabs.c: Likewise. ! * real.c: Make most functions static and add prototypes for ! all static functions. ! (GET_REAL, PUT_REAL): Cast parameter to proper pointer type in ! some cases; use unsigned array. ! * stmt.c: Add prototypes for static functions. ! (expand_fixups): New function. ! (fixup_gotos): Now static. ! Don't call bc_fixup_gotos with wrong type (but now probably wrong ! value). ! (bc_*): Now static. ! (expand_exit_loop_if_false): Call bc_expand_goto_internal with ! proper null pointer. ! (expand_decl_init): Call bc_expand_decl_init if writing bytecode. ! Thu Apr 21 14:21:56 1994 Ian Lance Taylor (ian@cygnus.com) ! ! Support taking the address of a text segment symbol when using ! MIPS -membedded-pic. ! * mips.h (embedded_pic_fnaddr_rtx): Declare. ! (embedded_pic_offset): Declare. ! (mips_finalize_pic): Declare. ! (FINALIZE_PIC): Define. ! (GO_IF_LEGITIMATE_ADDRESS): When using -membedded-pic, reject ! combining an embedded PIC text reference with a register. ! (ENCODE_SECTION_INFO): Under -membedded-pic set SYMBOL_REF_FLAG to ! 0 for text segment symbols, 1 for data segment symbols. ! * mips.c (embedded_pic_fnaddr_rtx): New variable. ! (embedded_pic_offset): New function. ! (mips_finalize_pic): New function. ! (mips_select_section): When using -membedded-pic and not using ! -fwritable-strings, put strings in the text section, not the read ! only data section. ! * mips.md (movsi): When using -membedded-pic, add special code ! when loading a symbol directly to use an offset from the start of ! the current function. ! (get_fnaddr): New insn to get address of current function. ! ! Wed Apr 20 19:38:38 1994 Doug Evans (dje@cygnus.com) ! ! * regclass.c (init_reg_sets_1): Make static. ! (init_reg_modes): New function. ! (init_regs): Likewise. ! * toplev.c (compile_file): Call init_regs after init_rtl. ! (main): Delete call to init_reg_sets_1. ! ! Wed Apr 20 15:06:35 1994 Steve Chamberlain (sac@cygnus.com) ! ! * sh.c (REG_ODD): Allow DIs and DFs into odd registers. ! (print_operand): New command char '@', change nop insn. ! (synth_constant): Don't allocate temp reg during reload. ! (expand_block_move): Don't expand if TARGET_SMALLCODE. ! (prepare_split_double_ops): Deleted. ! (howshift, multcosts): Work out costs exactly. ! (dump_table): Emit a label before the align. ! (hi_const): TARGET_SHORTADDR makes more things HI consts. ! (machine_dependent_reorg): Look through SUBREGS. ! (from_compare): Get better code when relational args are loaded ! into regs now. ! (expand_acall): Cope with TARGET_BSR. ! (general_movdst_operand): Don't allow illegal autoincs. ! (mac_operand): New function. ! (sh_function_arg, sh_function_partial_nregs): From sh.h ! * sh.h (PARANOID_BIT, RETR2_BIT, CONSTLEN0_BIT, BSR_BIT, ! SHORTADDR_BIT, TARGET_PARANOID, TARGET_RETR2, TARGET_CONSTLEN0, ! TARGET_BSR, TARGET_SHORTADDR, TARGET_SWITCHES): New options. ! (OVERRIDE_OPTIONS): No function_cse when TARGET_BSR. ! (FIRST_RET_REG): Depends on TARGET_RETR2. ! (FUNCTION_ARG, FUNCTION_ARG_PARTIAL_NREGS): Moved to sh.c ! (HAVE_POST_INCREMENT, HAVE_PRE_DECREMENT): Define. ! (MODE_DISP_OK_8): Define. ! (REG_OK_FOR_PRE_POST_P): Allow a pseudoreg. ! (GO_IF_LEGITIMATE_ADDRESS): Allow DI addressing modes. ! (MOVE_RATIO): Depends on TARGET_SMALLCODE. ! * sh.md (interrupt_function): New attr. ! (define_delay): Account for interrupt functions. ! (addc): Describe pattern better. ! (adddi3): Expanded better. ! (peepholes): Deleted many obsolete patterns. ! ! Wed Apr 20 13:37:58 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * expr.c (expand_expr): Don't force ignore when expanding the ! subexpression of a WITH_CLEANUP_EXPR. Don't check ignore when ! deciding whether or not to expand the cleanup for a TARGET_EXPR. ! ! Wed Apr 20 12:20:16 1994 Doug Evans (dje@cygnus.com) ! ! * h8300/h8300.h (RTX_COSTS): Remove LSHIFT. ! * h8300/h8300.md (lshrhi3_eight): Fix name. ! (lshrhi3): Use it. ! * i860/i860.c (safe_insn_src_p): Remove LSHIFT. ! (single_insn_src_p): Likewise. ! * i960/i960.c (i960_expr_alignment): Remove LSHIFT. ! * sh/sh.c (output_shift, ASHIFTRT case): Do opposite shift as ASHIFT. ! Delete LSHIFT case. ! * sh/sh.h (RTX_COSTS): Remove LSHIFT, add LSHIFTRT. ! * spur/spur.md (lshlsi3): Delete. ! ! Wed Apr 20 06:40:15 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * c-lex.c (check_newline): Avoid unreachable statement when ! HANDLE_SYSV_PRAGMA defined. ! ! Wed Apr 20 01:52:24 1994 Steve Chamberlain (sac@mole.gnu.ai.mit.edu) ! ! * flow.c (find_auto_inc, try_pre_increment): Make sure ! that insertion of autoinc addressing mode would yield a valid ! instructon. ! ! Tue Apr 19 23:41:14 1994 Doug Evans (dje@cygnus.com) ! ! * Makefile.in (expr.o): Depend on regs.h. ! * rtl.h (choose_hard_reg_mode): Declare. ! * regs.h (reg_raw_mode): Declare. ! * caller-save.c (choose_hard_reg_mode): Delete from here. ! * regclass.c (choose_hard_reg_mode): Define here. ! (reg_raw_mode): Define. ! (init_reg_sets_1): Initialize reg_raw_mode. ! * expr.c: #include regs.h. ! (use_regs): Use reg_raw_mode. ! * reload1.c (emit_reload_insns): Record additional spill registers ! in their intrinsic mode. ! * combine.c (move_deaths): Record death information of remaining ! registers in their intrinsic mode. ! * sched.c (attach_deaths): Create partial register dead notes using ! register's intrinsic mode. ! ! Tue Apr 19 21:40:57 1994 Mike Stump (mrs@cygnus.com) ! ! * toplev.c (lang_options): Add -fhandle-signatures for C++ ! frontend. ! ! Tue Apr 19 19:00:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * cccp.c (do_error): Don't terminate. ! ! Tue Apr 19 17:48:41 1994 Hallvard B Furuseth (hbf@durin.uio.no) ! ! * gcc.c: Add new options -print-file-name= and -print-prog-name=. ! ! * gcc.c (struct switchstr): New field LIVE_COND. ! (process_command): Initialize it. ! (check_live_switch): New function. ! (handle_braces): Call it. ! ! Mon Apr 18 19:22:25 1994 Lee Iverson (leei@ai.sri.com) ! ! * mips.h (RTX_COSTS): Remove LSHIFT. ! ! Mon Apr 18 17:56:22 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * c-decl.c (duplicate_decls): Always warn when const declaration ! follows non-const one for variables. ! ! Mon Apr 18 16:38:30 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! ! * calls.c (prepare_call_address): New arg REG_PARM_SEEN. ! All callers changed. ! (expand_call): Pre-load args if small reg classes and reg parms. ! * expr.h (prepare_call_address): Extend prototype. ! * expr.c (expand_builtin_apply): Pass new arg to prepare_call_address. ! ! Mon Apr 18 14:53:14 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * fold-const.c (const_binop): If arg is NaN, just return it ! (fold_convert): Handle NaN in real->int and real->real cases. ! ! * c-lex.c (yylex): If FP value is NaN, use value of zero. ! ! * expr.h (PROMOTE_MODE): Don't supply default here. ! (promote_mode): Add declaration. ! * explow.c (promote_mode): New function. ! * calls.c (expand_call): Use it. ! * function.c (assign_parms, promoted_input_arg, expand_function_start): ! Likewise. ! * expr.c (expand_expr, case VAR_DECL, SAVE_EXPR): Likewise. ! * stmt.c (expand_value_return, expand_decl): Likewise. ! ! Mon Apr 18 11:36:04 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * Makefile.in (LIB2FUNCS): Change _op_vec_delete to _op_vec_del. ! * libgcc2.c: Ditto. ! ! Mon Apr 18 11:19:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * reorg.c (redirect_with_delay_list_safe_p): New function, ! similar to redirect_with_delay_slots_safe_p. ! (fill_slots_from_thread): Do not redirect a jump if doing ! so would invalidate the delay list for the jump. ! ! Mon Apr 18 03:09:30 1994 Doug Evans (dje@cygnus.com) ! ! * scan-types.sh: Fix program's name in error message. ! Rename dummy.c to avoid collisions in parallel makes. ! ! Sun Apr 17 18:29:00 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.h (PROCESSOR_COMMON, PROCESSOR_POWER, PROCESSOR_POWERPC): ! New macros. ! * rs6000.c (processor_target_table): Change "all" to "common". ! Add "power" and "powerpc" generic processors. Explicitly turn off ! new mnemonics for all members of the POWER architecture family. ! ! Sun Apr 17 10:04:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * tree.h (DECL_PRINT_NAME): Deleted. ! (struct tree_decl): Field print_name deleted. ! ! Sun Apr 17 06:59:58 1994 Pat Rankin (rankin@eql.caltech.edu) ! ! * vax.h (RTX_COSTS), vax.c (vax_rtx_cost): Remove LSHIFT case. ! ! Sun Apr 17 01:15:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! ! * function.c (locate_and_pad_parm): For ARGS_GROW_DOWNWARD, ! Round sizetree for both upward and downward padding, nuke ! the (now unnecessary) call to pad_below for arg_size_ptr. ! ! Sat Apr 16 21:05:40 1994 David Edelsohn (edelsohn@npac.syr.edu) ! ! * rs6000.md (one_cmplsi2): Always use nor instruction; ! remove extraneous minus sign from condition register set constraint. ! ! Sat Apr 16 17:12:40 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * m68k.c (print_operand): 'x' and 'y' mode letters only ! if SUPPORT_SUN_FPA. ! (print_operand_address): If (new) ASM_OUTPUT_CASE_FETCH defined, ! use it to emit the address for the insn before a tablejump. ! * m68k/mot3300.h (FUNCTION_ARG_PADDING, FUNCTION_PROLOGUE): Deleted. ! (FUNCTION_EPILOGUE, PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Deleted. ! (SGS_SWITCH_TABLES, ASM_OUTPUT_CASE_END): Deleted. ! (ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Deleted. ! (SGS_NO_LI, ASM_OUTPUT_CASE_FETCH, ASM_RETURN_CASE_JUMP): Defined. ! ! * configure (header_files): Use ${srcdir} instead of $(srcdir). ! ! Sat Apr 16 16:51:15 1994 DJ Delorie (dj@ctron.com) ! ! * objc/makefile.dos (OBJC_O): Add encoding.o. ! ! Sat Apr 16 16:38:32 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-lex.c (yylex): Turn off overflow flag when fixing up large ! traditional hex constants. ! ! * c-decl.c (finish_decl): If asmspec_tree, clear DECL_BUILT_IN ! for function and DECL_RTL always. ! Wed Apr 13 13:08:10 1994 Per Bothner (bothner@cygnus.com) ! * toplev.c (compile_file): Never warn about unused static consts, ! since it is reasonable to have those in header files. ! Wed Apr 13 12:25:21 1994 Jason Merrill (jason@deneb.cygnus.com) ! * varasm.c (contains_pointers_p): When examining a RECORD_TYPE, ! only look at the FIELD_DECLs. ! Tue Apr 12 18:14:42 1994 Jason Merrill (jason@deneb.cygnus.com) ! * Makefile.in (LIB2FUNCS): Add _op_vec_{delete,new}. ! * libgcc2.c (__builtin_vec_{delete,new}): New functions per the ! latest C++ working paper. ! (__default_new_handler): No longer static. ! (__set_new_handler): Lose. ! ! * cccp.c: Don't implicitly wrap LOCAL_INCLUDE_DIR. ! (struct default_include): Add cxx_aware field. ! (include_defaults_array): Ditto. ! (main): Use cxx_aware field. ! ! Tue Apr 12 16:13:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) ! ! * config.sub (next): Fix typo in m68k-next-ns3 alternative. ! ! Tue Apr 12 07:41:17 1994 Michael Meissner (meissner@osf.org) ! ! * i386/i386.c (notice_update_cc): Remove LSHIFT case, since there ! is no LSHIFT rtl code any more. ! ! * halfpic.h (NO_STDIO_H): Do not include stdio.h if this is defined. ! Mon Apr 11 17:24:46 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! * scan.c (get_token): Correctly increment lineno after ! encountering #ident (or other #-directive). ! Mon Apr 11 13:22:51 1994 Jim Wilson (wilson@cygnus.com) ! * reorg.c (try_merge_delay_insns): Account for resources set/used ! by a filled insn before trying to simplify insns in delay slots. ! * x-iris, x-iris3, x-mips, x-sony, x-sysv (OLDCC): Change -XNh1500 ! to -XNh2000. ! * c-decl.c (finish_decl): Don't preserve initializer if it is ! error_mark_node. ! * reorg.c (try_merge_delay_insns): Move next_trial update ! immediately after the try_split call. ! * mips.c (mips_select_rtx_section, mips_select_section): New ! functions. Prefer rdata when TARGET_EMBEDDED_DATA, and prefer ! sdata otherwise. ! * mips.h (MASK_EMBEDDED_DATA, TARGET_EMBEDDED_DATA): New macros. ! (TARGET_SWITCHED): Add new option -membedded-data. ! (SELECT_RTX_SECTION, SELECT_SECTION): Call function in mips.c. ! * Makefile.in (all.cross, rest.encap): Delete objc-runtime and ! SYSCALLS.c.X. ! (OBJC, OBJECTIVE-C): Add objc-runtime. ! (proto): Add SYSCALLS.c.X. ! (libgcc2.ready, libobjc.a, sublibobjc.a, SYSCALLS.c.X): Add ! dependence on stmp-int-hdrs. ! * cccp.c (rescan): Don't look for C++ // comment before directive. ! Handle \-newline inside a C++ // comment. ! (skip_if_group): Likewise. ! (handle_directive): Also handle C++ // comment after #. Point ! ip->bufp after the comment start before calling ! skip_to_end_of_comment. ! (validate_else): Handle \-newline inside a C++ // comment. ! (skip_to_end_of_comment, macarg1, discard_comments): Likewise. ! * varasm.c (immed_double_const): Sign-extend constants when they ! have the most significant bit set for the target. ! Mon Apr 11 06:20:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload1.c (reload): When accumulating needs, use nested ! structures to simplify and speed up the code. ! * alpha.md (compare define_split): Fix bugs in last addition. ! * calls.c (expand_call, emit_library_call{,_value}, store_one_arg): ! Use convert_modes instead of convert_to_mode. ! * tree.h (frame_size): Now a union. ! (DECL_ALIGN, DECL_FRAME_SIZE, DECL_FUNCTION_CODE): Access proper ! field of frame_size union. ! (DECL_SET_FUNCTION_CODE): Simplified; retained for compatibility. ! * c-decl.c (duplicate_decls, pushdecl, builtin_function): ! Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE. ! ! Mon Apr 11 05:50:26 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) ! ! * mips-tfile.c (update_headers): Do not copy stStatic symbols that ! result from internal labels. ! ! Sun Apr 10 07:13:24 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * rtl.def (LSHIFT): Deleted. ! * combine.c, cse.c, function.c: No longer handle LSHIFT. ! * genattrtab.c, loop.c, reload1.c: Likewise. ! * expr.h (lshl_optab): Deleted. ! * optabs.c (lshl_optab): Deleted. ! (expand_binop, init_optabs): No longer reference it. ! * genopinit.c, expmed.c (expand_shift): Likewise. ! * arm.c, arm.h, arm.md: Remove references to LSHIFT and lshlsi3. ! * clipper.h, clipper.md, convex.h, convex.md, elxsi.md: Likewise. ! * fx80.h, fx80.md, gmicro.md, i370.md: Likewise. ! * m68k.c, m68k.h, m68k.md, m88k.c, m88k.md, ns32k.md: Likewise. ! * rs6000.md, tahoe.md: Likewise. ! * combine.c (simplify_shift_count, case EQ): LSHIFT should be ! LSHIFTRT. ! Sun Apr 10 04:48:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa-ghiux.h (LIB_SPEC): Remove last change until we've got the ! go ahead from HP to distribute /usr/lib/end.o. ! * pa-ghpux.h, pa-hiux.h, pa-ghiux.h: Likewise. ! Sat Apr 9 15:06:22 1994 Christian Kranz (kranz@sent5.uni-duisburg.de) ! * config.sub: Add ns* as operating systems; default to ns2 for NeXT. ! * configure (m68k-next-ns2*): New configuration. ! * libgcc2.c: Include , not for NeXTStep 2.1. ! * config/nextstep21.h, m68k/next21.h: New files. ! Sat Apr 9 10:56:06 1994 Randy Wright (rwright@convex.com) ! * combine.c (force_to_mode, case ROTATE): Don't assume ! simplify_binary_operation always returns CONST_INT. ! (simplify_shift_const, case IOR, PLUS): Likewise. ! Sat Apr 9 09:13:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) ! * i386/sequent.h (STRUCT_VALUE{,_INCOMING,_REGNUM}): ! Redefine for calling conventions of native cc. ! Sat Apr 9 08:25:43 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * rs6000.h (FINAL_PRESCAN_INSN): Define. ! * rs6000.c (rs6000_convert_preincs): New function. ! * i386.md (mulhi3): Use SImode for MULT RTL. ! * fold-const.c (fold): Avoid exponential work when simplifying ! conditional expressions; don't recurse twice if ARG1 is constant. ! * function.c (unitialized_vars_warning, setjmp_args_warning): ! Reword warning to be less ambiguous. ! * c-typeck.c (convert_arguments): Truncate and reextend ! for PROMOTE_PROTOTYPES so we can give error on overflow. ! * reload1.c (reload_conflicts): Rewrite to clean up and fix ! numerous bugs; move to later in file. ! * c-decl.c (duplicate_decls): Put new type in same obstack as ! old ones, or permanent if old ones in different obstacks. ! Fri Apr 8 18:18:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * fold-const.c (fold, case GT_EXPR): Simplify X < (1 << Y) ! into X >> Y == 0. ! Fri Apr 8 11:23:51 1994 Ian Lance Taylor (ian@cygnus.com) ! Add support for -membedded-pic to MIPS backend, to create ! genuinely position independent code without using a global offset ! table. Requires GNU as and ld. ! * mips.h (MASK_EMBEDDED_PIC): Define. ! (TARGET_EMBEDDED_PIC): Define. ! (TARGET_SWITCHES): Add embedded-pic and no-embedded-pic. ! (ASM_SPEC): Pass -membedded-pic to assembler. ! (ASM_OUTPUT_ADDR_DIFF_ELT): If TARGET_EMBEDDED_PIC output a ! difference, rather than using .gpword. ! (ASM_OUTPUT_CASE_LABEL): Define. ! * mips.md (casesi, casesi_internal): New instructions, used only ! for TARGET_EMBEDDED_PIC. ! * mips.c (override_options): For TARGET_EMBEDDED_PIC warn ! if -mabicalls or -G were used, and set flag_pic and ! mips_section_threshold. ! (print_operand): Handle 'S' by printing a label with a leading LS. ! Thu Apr 7 22:20:09 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! * calls.c (emit_library_call_value): Move is_const set after ifdef. ! Wed Apr 6 21:34:17 1994 Pat Rankin (rankin@eql.caltech.edu) ! * expr.c (expand_builtin, case BUILT_IN_NEXT_ARG): Test whether ! an argunment has been passed to __builtin_next_arg; warn if not. ! Wed Apr 6 17:28:44 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * toplev.c (lang_options): Add -f[no-]vtable-thunks (for C++). ! Wed Apr 6 15:35:42 1994 Jim Wilson (wilson@cygnus.com) ! * cccp.c (discard_comments): Replace comments with a single space. ! * Makefile.in (USER_H): Add $(srcdir)/ before every ginclude use. ! * calls.c (emit_library_call_value): New variable is_const. Clear ! it for functions that return an aggregate in memory. ! * configure (header_files): Prepend $(srcdir)/ginclude/ to each ! element before substituting into the Makefile. Delete ginclude/ ! at each point where we set header_files. ! * c-decl.c (finish_decl): Correct typo in use of tree_int_cst_sgn. ! Wed Apr 6 07:39:47 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.md: Add define_split to simplify "(unsigned) x > 0xffffff". ! * toplev.c (lang_options): Group and alphabetize some options. ! Wed Apr 6 07:03:13 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * function.c (push_function_context): Use current_function_varargs. ! (pop_function_context): Likewise. ! (assign_parms): Respect current_function_varargs. ! Save args_so_far in any case. ! * expr.c (expand_builtin): Allow builtin_next_arg for varargs ! functions as well. ! * function.h (struct function): New field for current_function_varargs. ! * integrate.c (function_cannot_inline_p): Use current_function_varargs. ! * va-alpha.h, va-m88k.h, va-sparc.h (va_dcl): Add ... to ! set current_function_varargs. ! * c-decl.c (warn_missing_declarations): New variable. ! (c_decode_option): -Wmissing-declarations. ! (start_function): Actually do the checking. ! * toplev.c (lang_options): Add -Wmissing-declarations. ! * function.c (expand_function_start): Delay copying static chain. ! * calls.c (emit_library_call): Move the invocation of ! prepare_call_address before the assignments of the function arguments. ! (emit_library_call_value): Likewise. ! * i386.h (DEBUG_PRINT_REG): Fix printing of coprocessor regs in QImode. ! Wed Apr 6 06:42:50 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) ! * mips-tfile.c (update_headers): Copy stStatic symbols from the old ! local symbol table to the new local symbol table if they did not get ! added via debugging psuedo ops. ! Wed Apr 6 06:36:05 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! * stdarg.h, varargs.h (__va_rounded_size): Round to multiple ! of sizeof (short) on sysV68. ! * m68k.c (output_function_prologue): pea/move: Fix typos. ! asm_fprintf("add%.[wl] ...): Undo previous change. ! Tue Apr 5 20:05:10 1994 Doug Evans (dje@cygnus.com) ! * gcc.c (process_command): Add "include" prefix for [foo/]stageN. ! Tue Apr 5 01:22:08 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa-ghiux.h (LIB_SPEC): Link in /usr/lib/end.o ! * pa-ghpux.h, pa-hiux.h, pa-hpux.h (LIB_SPEC): Likewise. ! Mon Apr 4 17:36:55 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! * final.c (final_scan_insn): Pass new arg, block num, to ! sdbout_end_block. ! * sdbout.c (sdbout_begin_block): Don't output block for function ! level scope unless MIPS_DEBUGGING_INFO is defined. ! (sdbout_end_block): Likewise. Add new parameter n for the block ! number. ! * calls.c (expand_call): If PCC_STATIC_STRUCT_RETURN defined, mark ! function as addressable same time as we clear is_integrable. ! Mon Apr 4 17:11:17 1994 Jason Merrill (jason@deneb.cygnus.com) ! * Makefile.in (xsys-protos.h): Undefine __*_TYPE when ! preprocessing fixtmp.c. ! * fixincludes: Fix ptrdiff_t and wchar_t in system headers like we ! do size_t. ! * scan-types.sh: Use __WCHAR_TYPE__, __PTRDIFF_TYPE__, and ! __SIZE_TYPE__. Still deduce size_t so that it can be used for ! ssize_t if necessary. ! * stddef.h (wchar_t): Always define as __WCHAR_TYPE__. ! * cccp.c (special_symbol, case T_WCHAR_TYPE): Output "__wchar_t" ! for C++. ! Sat Apr 2 08:14:02 1994 Michael Meissner (meissner@osf.org) ! * i386/osfrose.h (FUNCTION_PROLOGUE, FUNCTION_PROFILER): Correct ! code for -fpic ELF case. ! Fri Apr 1 17:33:35 1994 Jason Merrill (jason@deneb.cygnus.com) ! * fixproto: Add strncpy, strpbrk, strrchr, strspn, strstr, strtok ! and strxfrm to the required list for string.h. ! Fri Apr 1 01:05:53 1994 Jim Wilson (wilson@cygnus.com) ! * configure: Change math-68881.h to ginclude/math-68881.h. ! (EXTRA_HEADERS): Use | not / in sed command. ! * math-68881.h, math-3300.h: Move to ginclude directory. ! * libgcc2.c: Modify all uses of __attribute__ mode to use new ! syntax. ! * Makefile.in (USER_H): Files in ginclude now. Add stdarg.h, ! stddef.h, varargs.h. ! (all.cross, rest.encap): Move LIBGCC after stmp-headers. Add ! objc-runtime, and SYSCALLS.c.X. ! (for-bootstrap): Delete. ! (OBJC, OBJECTIVE-C): Delete objc-runtime. ! (proto): Delete SYSCALLS.c.X. ! (*.o): Delete gvarargs.h dependencies. ! (stmp-int-hdrs): Delete gvarargs.h, gstdarg.h, gstddef.h deps, and ! code to copy them. ! * bc-emit.c: Change to . ! * enquire.c, libgcc2.c, sys-types.h: Change "gstddef.h" to . ! * gcc.c: Change "gstdarg.h" to and "gvarargs.h" to ! . ! * objc/Object.m: Change "gstdarg.h" to . ! * objc/runtime.h, scan-types.sh: Change "gstddef.h" to . ! Change "gstdarg.h" to . ! * objc/hash.h, objc/objc.h, objc/sarry.h: Delete use of IN_GCC to ! control stddef.h/gstddef.h include. ! * cccp.c (pcfinclude): Modify comment referring to gstddef.h. ! * sparc/sparc.h (CPP_PREDEFINES): Update GCC_NEW_VARARGS comment. ! * i386/x-next, m68k/x-next (libgcc2.a, stdarg.h): Delete rules. ! * fixincludes: Modify comment referring to gvarargs.h. ! * cp/Makefile.in: Modify comments that refer to gvarargs.h and ! gstddef.h. ! * gstdarg.h, gstddef.h, gvarargs.h: Move to ginclude directory ! and strip off initial `g'. ! * va-*.h, proto.h: Move to ginclude directory. ! Thu Mar 31 19:49:17 1994 Jim Wilson (wilson@cygnus.com) ! * sparc.h (SPARC_STACK_ALIGN): Use ~7 not 0xfffffff8 for portability. ! * xcoffout.h (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Disable. ! * sol2.h: Delete ifdefed out section defining *_SECTION_ASM_OP ! macros. ! ({CTORS,DTORS}_SECTION_ASM_OP) Delete definitions. ! * sysv4.h (INIT_SECTION_ASM_OP): Don't set the alloc flag. ! ({CTORS,DTORS}_SECTION_ASM_OP): Set execinstr flag. ! * dbxout.c (dbxout_type): Re-enable debugging output for anonymous ! structures. Change all three places that refer to xrefs to use ! exactly the same condition. ! * c-typeck.c (pop_init_level): Correct typo in use of ! tree_int_cst_sgn. ! * mips.c (mips_rtx_classify, md_register_operand, ! fpsw_register_operand, cmp2_op, uns_cmp_op, fcmp_op): Delete. ! (mips_const_double_ok, mips_fill_delay_slot, output_block_move, ! print_operand, function_epilogue): Don't treat gas differently ! than native assembler. ! (equality_op, cmp_op): Delete use of classify_op. ! (override_options): Delete uses of mips_rtx_classify. ! (final_prescan_insn): Simplify based on other changes. ! * mips.h (mips_rtx_classify, cmp2_op, fcmp_op, ! fpsw_register_operand, md_register_operand, uns_cmp_op, ! classify_op, additive_op, divmod_op, unsigned_op, CLASS_*_OP, ! NOTICE_UPDATE_CC): Delete. ! (RTX_COSTS): Use different numbers for R3000/R6000/R4000. ! (REGISTER_MOVE_COST): Use cost of 2 within same register class, 4 ! for FP to GR copy, 6 otherwise. ! (ADJUST_COST): Give anti and output dependencies zero cost. ! (PREDICATE_CODES): Delete obsolete functions from list. ! * mips.md (addsi3_internal): Don't output subtract. ! (subsi3_internal): Don't output add. ! (smulsi3_highpart, umulsi3_highpart): Add missing third operand to ! mips_move_1word call. ! Thu Mar 31 12:09:42 1994 Ian Lance Taylor (ian@cygnus.com) ! * longlong.h: Change RS/6000 macros to use PowerPC mnemonics when ! using -mnew-mnemonics. ! Wed Mar 30 17:37:16 1994 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) ! * m68k/dpx2.h (NO_ASM_FMOVECR): Defined. ! * m68k.c (standard_68881_constant_p): Return 0 if NO_ASM_FMOVECR ! defined. ! * configure: Add case for rs6000-bull-bosx. ! Wed Mar 30 17:31:24 1994 Matthias Pfaller (leo@marco.de) ! * ns32k.c (global_symbolic_reference_mentioned_p): New parameter F. ! (print_operand_address): When generating pic baseregisters are ! only allowed if offset is CONST_INT. For {SYMBOL,LABEL}_REF ! a indexregister has to be used instead. (sb) is no longer ! emitted for constant absolute addresses. ! (output_move_double): Use CONSTANT_P instead of CONSTANT_ADDRESS_P. ! * ns32k.h (FUNCTION_PROLOGUE): use __GLOBAL_OFFSET_TABLE_, ! not _GLOBAL_OFFSET_TABLE_. ! (LEGITIMATE_CONSTANT_P, LEGITIMATE_PIC_OPERAND_P): Use ! LEGITIMATE_PIC_OPERAND_P, not LEGITIMATE_CONSTANT_P, ! to set current_function_uses_pic_offset_table. ! (INDIRECTABLE_1_ADDRESS_P): Baseregisters are not legal ! for {LABEL,SYMBOL}_REFS when emitting pic. ! (GO_IF_INDEXABLE_ADDRESS): INDIRECTABLE_1_ADDRESSes are indexable too. ! * ns32k/netbsd.h, ns32k/xm-netbsd.h: New files. ! * configure (ns32k-pc532-netbsd*): New case, to use new files. ! Wed Mar 30 16:39:24 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload1.c (reload): Fix typo in previous change. ! * gcc.c (process_command, case 'B'): If name is "stageN/", ! add "include" to system include prefix. ! * bc-emit.c, calls.c, combine.c, emit-rtl.c, final.c, g++.c: ! Include instead of "gstdarg.h"; similarly for varargs. ! * genattrtab.c, mips-tfile.c, protoize.c, toplev.c, tree.c: Likewise. ! * fold-const.c (strip_compound_expr): New function. ! (fold): Call it; avoid exponential work when simplifying ! binary op over a COND_EXPR. ! * cse.c (cse_insn): Add missing definition of var TEM; clean up ! shadowed uses. ! * sparc.c (sparc_type_code): Revise so it supports non-C types. ! Wed Mar 30 14:52:26 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) ! * xm-alpha.h (string.h): Don't include when inhibit_libc is defined. ! Wed Mar 30 10:37:51 1994 Stan Coxs (coxs@dg-rtp.dg.com) ! * m88k.md (movdf): Do not consider extended registers when doing ! define_split. ! Wed Mar 30 01:49:06 1994 Torbjorn Granlund (tege@cygnus.com) ! * config/m68k/m68k.c (output_move_double): Use `%.' where appropriate. ! Tue Mar 29 10:46:18 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa.h (ASM_OUTPUT_LABEL): TARGET_GAS no longer needs trailing colons. ! (ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_COMMON): Likewise. ! * pa.h (TARGET_PORTABLE_RUNTIME): Define. ! (TARGET_SWITCHES): Add -mportable-runtime and -mno-portable-runtime. ! (CUMULATIVE_ARGS): Now a "struct hppa_args" rathern than an int. ! All references changed. ! (INIT_CUMULATIVE_ARGS): Also initialize nargs_prototype. ! (INIT_CUMULATIVE_INCOMING_ARGS): Define. ! (FUNCTION_ARG_ADVANCE): Decrement nargs_prototype for each arg seen. ! (FUNCTION_ARG): Handle TARGET_PORTABLE_RUNTIME. ! (ASM_DECLARE_FUNCTION_NAME): Explicitly disallow argument relocations ! for TARGET_PORTABLE_RUNTIME. ! (ASM_OUTPUT_INT): Do not use a P% prefix for function references ! if TARGET_PORTABLE_RUNTIME. ! * pa.md (high and lo_sum for function addresses): Provide alternate ! definitions for TARGET_PORTABLE_RUNTIME. ! * pa.c (output_arg_descriptor): Explicitly disallow argument ! relocations for TARGET_PORTABLE_RUNTIME. ! Tue Mar 29 07:45:44 1994 Chris Smith (csmith@convex.com) ! * convex.h (check_float_value): fix return type in extern. ! Mon Mar 28 18:36:56 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k/mot3300.h (ASM_IDENTIFY_GCC): Define to be non-null. ! Sun Mar 27 20:26:36 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) ! * c-parse.in (attrib): Handle string args as expressions, ! merging the two rules. `mode' attribute now takes a string arg. ! Delete the rule for an identifier as arg. ! * c-common.c (decl_attributes): `mode' attribute now takes string arg. ! Sun Mar 27 14:42:39 1994 Doug Evans (dje@cygnus.com) ! * c-parse.in (attrib): Back out last patch. ! Fri Mar 25 17:52:44 1994 Walter Misar (misar@rbg.informatik.th-darmstadt.de) ! * m68k.md (movsi): New strategy for moving small constants into dregs, ! if it can't be done with moveq. ! * m68k.h (CONST_COSTS): Reflect the change in m68k.md. ! Fri Mar 25 14:30:47 1994 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k.md (call): If (new) MOTOROLA_BSR defined, try to emit 'bsr'. ! * m68k/mot3300.h (MOTOROLA_BSR): Defined. ! * m68k.c (output_function_prologue): Use link.w on 68040; ! emit pea fp + movl sp,fp instead of linkw 0 for 68040. ! Fri Mar 25 14:21:06 1994 Jim Meyering (meyering@idefix.comco.com) ! * bc-emit.c (bc_emit_bytecode): Remove decl of unused variable NPUSHES. ! (bc_emit_instruction): Remove decl of unused variable LITERAL. ! * c-aux-info.c (gen_decl): Remove decl of unused variable. ! * c-common.c (truthvalue_conversion): Remove decl of unused CODE. ! * c-decl.c (push_parm_decl): Move decl of unused variable OLDDECL ! into #if 0 block. ! (finish_enum): Remove decls of unused variables I and TEMPORARY. ! * c-parse.in (primary): Remove decl of unused variable CONTEXT. ! * c-typeck.c (convert_arguments): Remove decls of unused variables. ! * collect2.c (putenv): Remove decl of unused variable STR_LEN. ! (main): Remove decls of unused variables LEN and CLEN. ! * combine.c (try_combine): Remove decls of unused variables. ! (subst): Remove decls of unused variables ORIG_CODE. ! (simplify_if_then_else): Remove decl of unused variable C2. ! (make_compound_operation): Remove decl of unused variable COUNT. ! (known_cond): Remove decl of unused variable NEW. ! (make_field_assignment): Remove decl of unused variable OURDEST. ! (simplify_and_const_int): Remove decls of unused variables. ! (simplify_shift_const): Remove decl of unused variable INNER. ! * cse.c (cse_insn): Remove decl of unused variable TEM. ! * dbxout.c (dbxout_symbol): Remove decls of unused variables. ! * emit-rtl.c (reset_used_flags): Remove decl of unused variable. ! (gen_sequence): Remove decl of unused variable NEWVEC. ! * enquire.c (f_rep): Remove decl of unused variable F1. ! * final.c (output_source_line): Remove decl of unused variable. ! * fix-header.c (read_scan_file): Remove decl of unused variable RPTR. ! (write_rbrac): Remove decl of unused variable PARTIAL. ! (main): Likewise. ! * g++.c (main): Remove decl of unused variable FN. ! * genattr.c (main): Remove decl of unused variable MAX_ISSUE_TIME. ! * genattrtab.c (expand_units): Remove decl of unused variable. ! * genrecog.c (break_out_subroutines): Remove decl of unused variable. ! * global.c (global_conflicts): Move decl of unused variable I into ! #if 0 block. ! * integrate.c (save_for_inline_nocopy): Remove decls of unused vars. ! (expand_inline_function): Remove two block-scope decls of unused ! variable COPY. ! * jump.c (invert_jump): Remove decl of unused variable OLABEL. ! * loop.c (init_loop): Remove decls of unused variables. ! (loop_optimize): Remove decl of unused variable END. ! (combine_movables): Remove decls of unused variables. ! (check_final_value): Remove decl of unused variable TEM. ! (check_dbra_loop): Remove decls of unused variables. ! (maybe_eliminate_biv): Remove decls of unused variables SET and V. ! * reload.c (find_reloads_address): Remove two block-scope decls of ! unused variable OLDREF. ! * rtl.c (read_rtx): Remove decl of unused variable STRINGBUFSIZE. ! * scan.c (get_token): Remove decl of unused variable QUOTE. ! (get_token): Remove unused label AGAIN. ! * sched.c (clear_units): Remove decl of unused variable UNIT. ! (actual_hazard_this_instance): Remove decl of unused variable I. ! (actual_hazard): Remove two block-scope decls of unused variable BEST. ! (sched_analyze_1): Remove decls of unused variables OFFSET and BIT. ! (sched_analyze): Remove decl of unused variable DEST. ! (sched_note_set): Remove decl of unused variable J. ! (create_reg_dead_note): Remove decl of unused variable BACKLINK. ! (new_sometimes_live): Remove decl of unused variable I. ! (schedule_block): Remove decls of unused variables LAST_NOTE and REGNO. ! (schedule_insns): Remove decls of unused variables I and INSNS. ! * sdbout.c (sdbout_symbol): Remove decl of unused variable LETTER. ! (sdbout_type): Remove decl of unused variable TEM. ! * toplev.c (compile_file): Remove unused label. ! * tree.c (stabilize_reference_1): Remove decl of unused variable. ! * unroll.c (unroll_loop): Remove decl of unused variable V. ! (precondition_loop_p): Remove decls of unused variables. ! (final_giv_value): Remove decl of unused variable CODE. ! Fri Mar 25 13:40:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa.h (DBX_REGISTER_NUMBER): Fix numerous bugs in handling ! of FP registers and the SAR register. ! Fri Mar 25 12:46:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * i386.md (movhi, movqi): Properly recognize unsigned forms of -1 ! for dec[bw] insns. ! * expr.c (expand_expr, case ADDR_EXPR): Return const0_rtx if ! taking address of an ERROR_MARK; also do some minor cleanup. ! * calls.c (expand_call): Don't require both -W and -Winline to say ! that call can't be inlined. ! Warn if inlining is tried but fails. ! * cccp.c (for_lint): Variable renamed from `lint'. ! * expr.c (expand_expr, case ABS_EXPR): Compare with 0 of proper mode. ! * fold-const.c (fold, case *_DIV_EXPR): Correct result when ! product of constants overflows. ! * alpha.c (output_prolog): Correctly compute floating-reg save ! area offset. ! * stmt.c (init_stmt_for_function): Clear stack_block_stack. ! * reload1.c (reload): Fix error in last change; only check ! against group reloads and check all reloads. ! Thu Mar 24 13:19:43 1994 Doug Evans (dje@cygnus.com) ! * toplev.c (v_pedwarn_with_decl): Don't cause compilation to fail ! from pedantic errors in system header files. ! Thu Mar 24 03:01:05 1994 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) ! * config.sub: Add case for Bull dpx20. ! * config/m68k/dpx2.h (CPP_PREDEFINES): Fix typo. ! Wed Mar 23 17:29:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * reload1.c (reload): Fix error in last change; compute MODE before ! it's used. ! * loop.c (get_condition): Exit if we don't recognize SET_SRC of ! a SET that modifies OP0. ! * combine.c (simplify_rtx, case FLOAT_TRUNCATE): Simplify ! case of (float_truncate (abs (float_extend X))). ! Wed Mar 23 17:20:54 1994 Jim Wilson (wilson@cygnus.com) ! * dbxout.c (dbxout_parms): For parameter living in psuedo-reg that ! was optimized away, use declared type instead of passed type. ! * mips.c (mips_asm_file_start): Add comment on TARGET_GP_OPT code. ! * c-decl.c (init_decl_processing): Change builtin_next_arg type so ! that it accepts any parameter instead of none. ! * cp/decl.c (init_decl_processing): Likewise. ! * expr.c (expand_builtin, BUILT_IN_NEXT_ARG case): Verify that ! parameter is last named argument. ! * gstdarg.h (va_start): Pass LASTARG as a parameter to ! builtin_next_arg. ! * va-h8300.h, va-i860.h, va-i960.h, va-mips.h, va-sparc.h ! (va_start): Likewise. ! * va-alpha.h (va_start): Add call to builtin_next_arg. ! * va-clipper.h, va-m88k.h, va-pa.h, va-sparc.h (va_start): ! Likewise. ! Tue Mar 22 18:57:54 1994 Jim Wilson (wilson@cygnus.com) ! * iris5.h (MIPS_DEFAULT_GVALUE): Define to zero. ! * mips.c (pic_address_needs_scratch): New function. ! (override_options): Set flag_pic when TARGET_ABICALLS. ! * mips.h (GO_IF_LEGITIMATE_ADDRESS): Also pretend that we have REG ! plus CONST_INT addresses by deleting an else. ! (CONSTANT_ADDRESS_P): When pic, don't accept addresses which are ! symbol_ref plus a large integer. ! (LEGITIMATE_PIC_OPERAND_P): Likewise. ! (LEGITIMIZE_ADDRESS): When pic, convert addresses which are ! symbol_reg plus a large integer, to reg plus a large integer. ! (ASM_OUTPUT_ADDR_DIFF_ELT): Use .gpword instead of subtracting ! labels. ! * mips.md (movsi): Add special handling for constants which are ! illegal addresses when pic. ! (tablejump_internal1, tablejump_internal2): Emit .cpadd when ! TARGET_ABICALLS. Adjust length to include .cpadd. ! * mips.h (TRAMPOLINE_TEMPLATE): Add `move $25,$3' for when ! TARGET_ABICALLS. Delete padding for 64 bit case. Adjust offsets. ! (TRAMPOLINE_SIZE): Increase from 9 to 10 words for 32 bit case. ! (INITIALIZE_TRAMPOLINE): Increase offsets by 4 bytes for 32 bit case. ! Tue Mar 22 15:46:42 1994 Michael Meissner (meissner@osf.org) ! * i386/osfrose.h (HANDLE_PRAGMA_WEAK): Define in terms of ! TARGET_ELF. ! (ASM_OUTPUT_DEF): Provide a definition. ! Mon Mar 21 15:56:58 1994 Per Bothner (bothner@cygnus.com) ! * fix-header.c: Make sstring buf extern (rather than "common"). ! ! Mon Mar 21 17:45:56 1994 Doug Evans (dje@cygnus.com) ! * configure: Accept and ignore --without-*. ! Mon Mar 21 17:05:25 1994 Jim Wilson (wilson@cygnus.com) ! * dbxout.c (source_label_number): New variable. ! (dbxout_source_file): Use it. Output an Ltext label. ! * c-decl.c (duplicate_decls): When pedantic, warn when any static ! declaraction follows a non-static. ! * sparc.md (seq, sne, sgt, slt, sge, sle): Add support ! for !TARGET_HARD_QUAD. ! Mon Mar 21 16:59:02 1994 Mike Collison (collison@chianti.sw.stratus.com) ! * reload1.c (reload): More accurately compute nongroup needs. ! (reloads_conflict): New function. ! Mon Mar 21 16:21:07 1994 Doug Evans (dje@cygnus.com) ! * libgcc2.c (__builtin_saveregs): Fix return type. ! Mon Mar 21 07:37:13 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * function.c (preserve_temp_slots): If argument is REG, see if it ! is address of a temp slot we know about. ! * expr.c (expand_expr, case ADDR_EXPR): Update temp slot address ! if we put it in a register; mark result as pointer. ! * cse.c (FIXED_REGNO_P): Treate global regs as fixed. ! (CHEAP_REGNO): Renamed from CHEAP_REG. ! (CHEAP_REG): New macro; user var in hard reg is cheap. ! (COST): Pass RTL to CHEAP_REG, not regno. ! (rtx_cost, case REG): Likewise. ! Sun Mar 20 19:38:44 1994 Stephen L Moshier (moshier@world.std.com) ! * m68k/news.h (PRINT_OPERAND): Print float infinity ! and NaN's as +/-99e999. ! Sun Mar 20 17:42:09 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) ! * mips-tfile.c (update_headers): Align symbol table sections, ! using ALIGN_SYMTABLE_OFFSET. Provide a default definition which ! does no alignment. ! * alpha.h (ALIGN_SYMTABLE_OFFSET): New macro. ! Sun Mar 20 06:38:41 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * emit_rtl.c (try_split): Rename third parameter as LAST. ! Recursively call try_split for each new insn created. ! * combine.c (mark_used_regs_combine): Correct typo. ! Sun Mar 20 06:28:23 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * vax.h (CHECK_FLOAT_VALUE): Add missing continuation character. ! * tree.c (build_real): Add `overflow' var; pass to CHECK_FLOAT_VALUE. ! Sat Mar 19 17:44:14 1994 Jim Wilson (wilson@cygnus.com) ! * expr.c (expand_expr, case ABS_EXPR): Fix typo in last change. ! Sat Mar 19 17:13:47 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * combine.c (newpat_used_regs): New variable. ! (mark_used_regs_combine): New function. ! (try_combine): Use them. ! (reg_dead_at_p): Registers marked in newpat_used_regs must always be ! considered to be live. ! Sat Mar 19 06:29:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-parse.in (attrib): Use `identifier' instead of `IDENTIFIER' ! since names that are (e.g.) typedef names are still OK. ! * m68k/next.h (GO_IF_INDEXABLE_BASE): Make compatible with m68k.h. ! * genoutput.c (output_epilogue, insn_names): Write correct names ! for patterns before first named pattern. ! * nextstep.h (SELECT_SECTION): Fix typo (arg names) in last change. ! * c-decl.c (grokdeclarator): Use signed version of `sizetype' for ! type of array index. ! Sat Mar 19 06:25:39 1994 Stephen L Moshier (moshier@world.std.com) ! * fold-const.c (const_binop): Avoid initialized aggregate ! local variables, for antique compilers. ! Fri Mar 18 18:43:28 1994 Jim Wilson (wilson@cygnus.com) ! * i386/osfrose.h (SELECT_SECTION): Variables go in readonly data ! only if the initializer is constant. ! * i386/svr3gas.h, m88k/m88k.h, mips/mips.h, nexstep.h, ! rs6000/rs6000.h, sparc/sparc.h, svr3.h, svr4.h, vax/vms.h ! (SELECT_SECTION): Likewise. ! * varasm.c (assemble_variable): Likewise. ! Fri Mar 18 17:54:12 1994 David Edelsohn (edelsohn@npac.syr.edu) ! * rs6000.md (divmodsi4, udivsi3, divsi3, udivmodsi4): Add AIX ! common-mode cases. ! (mulh_call, mull_call, divss_call, divus_call, quoss_call, quous_call): ! AIX common-mode call patterns. ! (ashlsi3): More TARGET_POWERPC to ! TARGET_POWER changes. ! (addsf3, subsf3, mulsf3, divsf3, etc.): Change TARGET_POWER ! to ! TARGET_POWERPC. ! (fix_truncdfsi2): Use POWER/2 and PowerPC FP convert instruction. ! (fpcvtsi): New pattern. ! (mulsidi3): Add AIX common-mode case, add imul attribute to POWER ! pattern, add PowerPC pattern, flag input operands as commutative. ! (smulsi3_highpart): Add AIX common-mode case. ! (movsi matcher): Add mtjmpr attribute to ! TARGET_POWER case. ! (movsf): Clean up load from memory or integer register test. ! (movdi matcher): Add FP register support. ! * rs6000.c (common_mode_defined): New variable. ! (output_prolog): Define external common-mode calls. ! * rs6000.h (HARD_REGNO_MODE_OK): Allow DImode in FP registers. ! (CONDITIONAL_REGISTER_USAGE): Delete ppcas mention from comment. ! (RTX_COSTS): Costs based upon processor_type enum. ! Fri Mar 18 17:53:35 1994 Torbjorn Granlund (tege@cygnus.com) ! * rs6000.md (smulsi3_highpart): New patterns. ! (umulsi3_highpart_power): New pattern. ! Fri Mar 18 15:26:56 1994 Jim Wilson (wilson@cygnus.com) ! * sol2.h (SELECT_RTX_SECTION): Delete. ! * sysv4.h (SELECT_RTX_SECTION): Add. ! (ASM_SPEC): Pass -K to assembler when PIC. ! * cccp.c (before_system, last_before_system): New variables. ! (main): Handle -isystem option. Insert -isystem directories in ! search chain at first_system_include. ! * gcc.c (include_prefix): New variable. ! (process_command): Add path/include to include_prefix when see a ! -Bpath option. ! (do_spec_1, case 'I'): Pass include_prefix directories to cpp with ! the -isystem option. ! * loop.c (scan_loop): New variable loop_depth. Increment and ! decrement on LOOP_BEG and LOOP_END notes. Only use LOOP_VTOP note ! if loop_depth is zero. ! (strength_reduce): Likewise. ! * sparc/sparc.h (FIXUNS_TRUNCTFSI2_LIBCALL): Define. ! * optabs.c (init_optabs): Use FIXUNS_TRUNCTFSI2_LIBCALL macro. ! Thu Mar 17 13:13:46 1994 Per Bothner (bothner@kalessin.cygnus.com) ! * stor-layout.c (layout_type, case BOOLEAN_TYPE): ! Set TREE_UNSIGNED unless TYPE_MIN_VALUE is negative. ! Thu Mar 17 18:36:34 1994 Jim Wilson (wilson@cygnus.com) ! * c-common.c (shorten_compare): When simplify compare against ! zero, check for restype_ptr unsigned instead of primop0 unsigned. ! * calls.c (expand_call): Undo Feb 27 change. Set nregs to -1 for ! normal case. ! Thu Mar 17 17:43:28 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixinc.svr4: Define BYTE_ORDER in as on ! UnixWare 1.1. ! Thu Mar 17 06:02:24 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * stor-layout.c (layout_type, case INTEGER_TYPE): Properly test for ! nonnegative lower bound. ! Wed Mar 16 12:41:19 1994 Ian Lance Taylor (ian@cygnus.com) ! * tree.c (build_nt, build_parse_node): Don't declare last ! parameter to be register, since it is used in VA_START, which ! may take its address. ! * genattrtab.c (attr_printf): Likewise. ! Wed Mar 16 12:00:40 1994 Jeffrey A. Law (law@snake.cs.utah.edu) ! * pa.h (INITIALIZE_TRAMPOLINE): Do not mask off high ! bits of address passed to icacheflush. ! * pa.h (WCHAR_TYPE): Use "unsigned int" by default. ! (WCHAR_TYPE_SIZE): Change appropriately. ! * pa-ghiux.h, pa-ghpux.h, pa-gux7.h, pa-hiux.h, pa-hpux.h, ! pa-hpux7.h (WCHAR_TYPE): Delete definition. ! (WCHAR_TYPE_SIZE): Likewise. ! * pa-osf.h (WCHAR_TYPE): Override appropriately for OSF1. ! (WCHAR_TYPE_SIZE): Likewise. ! * pa.md (DImode lo_sum): Add earlyclobber for alternative one. ! * pa.h (ASM_OUTPUT_ADDR_DIFF_ELT): Rewrite to match ! ASM_OUTPUT_ADDR_VEC_ELT which is PIC-safe. ! Wed Mar 16 09:07:34 1994 Matthias Pfaller (leo@marco.de) ! * ns32k.c (global_symbolic_reference_mentioned_p): Recurse only ! if GET_CODE (op) == CONST. ! * ns32k.h (FUNCTION_PROLOGUE): Load sb through r0 if TARGET_REGPARM ! is false. ! Wed Mar 16 06:57:45 1994 Richard Kenner (kenner@vlsi1.ultra.nyu) ! * emit-rtl.c (gen_lowpart_common, gen_highpart, operand_subword): ! Test input against RTX for FP, AP, and SP, not same register number. ! * expr.c (expand_expr): Update comments and fix formatting. ! (expand_expr, case VAR_DECL, STRING_CST, CONSTRUCTOR): If ! flag_force_addr, put address in register unless REG. ! (expand_expr, case CONSTRUCTOR, CONVERT_EXPR): Make TARGET with ! TMODE, if specified. ! (expand_expr, case IN_EXPR): Clean up. Allow INDEX to be an ! unsigned type. Always evaluate SET and INDEX in case of side effects. ! (expand_expr, case CONVERT_EXPR): Use convert_modes to handle consts. ! (expand_expr, case ABS_EXPR): Simplify processing of COMPLEX. ! Compare with zero word-by-word if required. ! (expand_expr, case ABS_EXPR, MIN_EXPR, COND_EXPR): Don't use TARGET ! if not MODE. ! (expand_expr, case TRUTH_*_EXPR): Modes of input and output must agree. ! (expand_expr, case CONJ_EXPR): Remove redundant def of MODE. ! * stor-layout.c (layout_record): If the place where we were going ! to put a field changed, lay it out again. ! Tue Mar 15 07:53:36 1994 Paul A Vixie (paul@vix.com) ! * Makefile.in (stmp-fixproto): Add missing "-" in front of "if". ! (install-headers-tar, gcc.xtar): Use "-" in front of tar options. ! Mon Mar 14 16:28:16 1994 Paul Eggert (eggert@twinsun.com) ! * fixincludes: Insert newlines just before the end of 'sed' ! command strings if the last 'sed' command is 'a' or 'i'; ! BSDI 1.1 'sed' needs this. ! Mon Mar 14 15:46:29 1994 Ian Lance Taylor (ian@cygnus.com) ! * fixinc.svr4: Don't name variables in mmap prototype. ! Mon Mar 14 15:16:38 1994 Doug Evans (dje@cygnus.com) ! * objc/Makefile (*.o): Add explicit dependencies for Sun's VPATH. ! Mon Mar 14 05:11:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * function.c (assign_parms, expand_function_start): Properly ! set MEM_IN_STRUCT_P for DECL_RTL of function result. ! * c-decl.c (grokdeclarator): Convert to sizetype when manipulating ! size of array and use care to avoid mixed-type operations. ! * expr.c (expand_expr): Don't call bc_expand_expr ! if EXPAND_INITIALIZER. ! * bc-optab.c (bc_expand_{binary,unary}_operation): Add missing ! args to call to expand_expr. ! * stmt.c (bc_expand_start_cond): Set exit_label if not EXITFLAG. ! (bc_expand_end_bindings): Only define exit_label if set. ! Don't pop nesting_stack. ! * varasm.c (output_constant_def): Do hashing and make label ! even if bytecode. ! * bc-emit.c (bc_seg_write): Don't make unaligned reference to ! seg->data. ! * toplev.c (compile_file): Call bc_write_file here and pass ! asm_out_file, not stdout. ! (main): Don't call bc_write_file here. ! Fix wording on error if -fbytecode specified on unsupported target. ! * fold-const.c (fold, associate): If -ffast-math, associate FP mults. ! (fold, case RDIV_EXPR): Split case; ignore division by 1. ! If -ffast-math, convert to multply by reciprocal. ! (fold, case *_DIV_EXPR): Simplify A/C1/C2. ! * tree.h (tree_int_cst_sgn): New declaration. ! * tree.c (tree_int_cst_sgn): New function. ! * c-decl.c (finish_{decl,struct,enum}): Call it. ! * c-typeck.c (build_binary_op, pop_init_level): Likewise. ! (output_pending_init_elements): Likewise. ! * expr.c (expand_builtin, case BUILT_IN_RETURN_ADDRESS): Likewise. ! * fold-const.c (fold): Likewise. ! (fold, case *_DIV_EXPR): Add missing conversion. ! * convert.c (convert_to_integer): Convert integer_one_node to ! proper type before tree_int_cst_lt call. ! Sun Mar 13 06:46:13 1994 Wolfgang Stukenbrock (wgstuken@immd4.informatik.uni-erlangen.de) ! * gcc.c (do_spec_1): Don't duplicate a macro starting with '__'. ! Sun Mar 13 05:54:00 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * convert.c (convert_to_integer): When changing type of truthvalue ! operation, change types of inputs too. ! * c-common.c (TRUTH_*_EXPR): Convert to integer_type_node. ! * tree.c: Include setjmp.h. ! (build_real_from_int_cst): Propagate overflow flags and ! establish float handler. ! (build_complex): Propagate overflow flags. ! * cse.c (simplify_binary_operation): Protect real_value_truncate ! inside handler. ! * fold-const.c (force_fit_value): Operate on REAL_CST as well. ! (real_value_truncate): Don't use its own handler. ! (const_binop): Set overflow on FP error and call force_fit_type. ! (fold_convert): Likewise. ! * c-common.c (constant_expression_warning, overflow_warning): ! Handle REAL_CST and COMPLEX_CST. ! * convex.h, convex.c, fx80.h, tahoe.h, vax.h, vax.c: Add OVERFLOW ! operand to CHECK_FLOAT_VALUE. ! * jump.c (rtx_equal_for_thread_p): Correct error in previous ! change; add missing arg in recursive call. ! Sat Mar 12 19:42:03 1994 H.J. Lu (hjl@nynexst.com) ! * configure (gxx-include-dir): Replacement for gxx-prefix. ! * Makefile.in (gxx_include_dir): Likewise, for gxx_prefix. ! * i386/linux.h (NO_IMPLICIT_EXTERN_C): Defined. ! Sat Mar 12 07:42:12 1994 Paul Eggert (eggert@twinsun.com) ! * Makefile.in (stmp-fixproto): Work around a `make' bug in BSDI 1.1. ! Sat Mar 12 07:38:08 1994 Klaus Kaempf (kkaempf@didymus.rmi.de) ! * bi-run.h: Properly test BYTES_BIG_ENDIAN. ! * bytecode.h: Likewise for WORDS_BIG_ENDIAN. ! * cccp.c (do_include, hack-vms_include_specification): Change handling ! of '#include filename' to be compatible with VAX-C. ! * genemit.c (gen_exp): Added \n to printf to shorten line for VAX-C. ! Sat Mar 12 06:42:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expr.h (emit_float_lib_cmp): Add declaration here. ! * optabs.c: Don't define emit_float_lib_cmp now that no longer static. ! * jump.c: Add prototypes for static functions. ! (jump_optimize, delete_insn): Use GET_RTX_CLASS to test for insns. ! (mark_jump_label): Delete dead code. ! (delete_computation, redirect_tablejump): No longer static. ! Fri Mar 11 14:40:40 1994 Jim Wilson (wilson@cygnus.com) ! * lite.h (TARGET_DEFAULT): Use parentheses. ! * sparc.h (TARGET_HARD_QUAD): New macro. ! (TARGET_SWITCHES): Add hard-quad-float, soft-quad-float. ! (TARGET_DEFAULT): Use parentheses. ! ({ADDTF3,SUBTF3,MULTF3,DIVTF3,SQRTTF2,FLOATSITF2,FIX_TRUNCTFSI2, ! EXTENDSFTF2,TRUNCTFSF2,EXTENDDFTF2,TRUNCTFDF2,EQTF2,NETF2,GTTF2, ! GETF2,LTTF2,LETF2}_LIBCALL): New macros. ! * sparc.md (sleu+4, sleu+7, extendsftf2, extenddftf2, trunctfsf2, ! trunctfdf2, floatsitf2, fix_trunctfsi2, addtf3, subtf3, multf3, ! divtf3, sqrttf2): Disable when -msoft-quad-float. ! (beq, bne, bgt, blt, bge, ble): When -msoft-quad-float, account ! for return value of SPARC ABI routines that differs from libgcc. ! * flow.c (libcall_dead_p): Fail not abort for libcall that returns ! value via invisible pointer. ! * optabs.c (emit_float_lib_cmp): Make non static. ! (init_optabs): Use {ADDTF3,SUBTF3,MULTF3,DIVTF3,SQRTTF2,FLOATSITF2, ! FIX_TRUNCTFSI2,EXTENDSFTF2,TRUNCTFSF2,EXTENDDFTF2,TRUNCTFDF2,EQTF2, ! NETF2,GTTF2,GETF2,LTTF2,LETF2}_LIBCALL macros. ! * sparc/sparc.h (STARTING_FRAME_OFFSET): Depend on ! LONG_DOUBLE_TYPE_SIZE. ! Fri Mar 11 08:01:54 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * rtl.h, tree.h, g++.c, gcc.c (PVPROTO): New macro. ! * combine.c, expr.h, rtl.h, tree.h, gcc.c: Use it for varargs protos.. ! * genattrtab.c, mips-tfile.c, output.h, toplev.c: Likewise. ! Fri Mar 11 07:21:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * emit-rtl.c (copy_rtx_if_shared, case LABEL_REF): Can't share. ! * jump.c (jump_optimize): Delete REG_LABEL note if label no ! longer in insn. ! * c-decl.c (finish_decl): When preserving an initializer, ensure ! its type is on a good obstack. ! Thu Mar 10 15:32:42 1994 Mike Collison (collison@sw.stratus.com) ! * reload1.c (emit_reload_insns): When clearing reg_last_reload_reg, ! clear all hard regs in reload_out. ! Thu Mar 10 15:23:10 1994 Hallvard B Furuseth (hbf@durin.uio.no) ! * collect2.c (dup2): Catch `dup' failure. Return correct value. ! Thu Mar 10 15:18:08 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * gcc.c ([__MSDOS__]): Use #ifdef, not #if. ! * collect2.c ([__MSDOS__]): Likewise. ! Thu Mar 10 15:03:01 1994 Paul Eggert (eggert@twinsun.com) ! * cccp.c (main, finclude, check_precompiled): When safe_read ! returns a partial buffer, this means EOF has been reached; ! don't try to read any more. ! Wed Mar 9 18:47:29 1994 Paul Eggert (eggert@twinsun.com) ! * real.c (target_negative): -0 counts as negative. ! Wed Mar 9 15:32:01 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * m68k.md (movqi): Disable special-case of stack push if operand ! one is an address register. ! * c-typeck.c (pointer_int_sum): Multiplication should be ! done signed. ! (pointer_diff): Likewise the division. ! * fold-const.c (fold, case MULT_EXPR): Simplify MULT_EXPR of an ! EXACT_DIV_EXPR with the same divisor as our multiplicand. ! * jump.c (rtx_equal_for_thread_p): Commutative operations ! are identical if the operands match in the opposite order. ! * sched.c (rtx_equal_for_memref_p): Likewise. ! Wed Mar 9 12:07:29 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) ! * cse.c (simplify_relational_operation): Fix typos; use ! ARG_POINTER_REGNUM and FRAME_POINTER_REGNUM in condtionals. ! Tue Mar 8 16:12:07 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * explow.c (break_out_memory_refs): Don't call mark_reg_pointer ! here. ! (memory_address): Call it here if X changed and is now a REG ! or REG + CONST_INT. ! Tue Mar 8 15:57:29 1994 Jim Wilson (wilson@cygnus.com) ! * c-decl.c (finish_decl): When saving/discarding initializers, ! don't check TREE_PERMANENT and TREE_STATIC. ! (finish_decl, finish_function): Pass new argument to ! permanent_allocation. ! * cp/decl.c (finish_function): Likewise. ! * cp/decl2.c (write_vtable_entries, finish_file): Likewise. ! * toplev.c (compile_file): Likewise. ! * function.h (struct function): Add momentary_function_firstobj ! field. ! * tree.c (momentary_function_firstobj): New variable. ! (init_obstack): Set it. ! (save_tree_status): Save it and set it. ! (restore_tree_status): Use it and restore it. ! (permanent_allocation): New parameter function_end. Clear ! momentary_obstack to momentary_function_firstobj if true. ! (preserve_initializer): Set base field of every momentary ! level on the momentary stack to new momentary_firstobj. ! (pop_momentary): Only free back to previous base. ! * tree.h (permanent_allocation): Add prototype. ! Mon Mar 7 20:10:56 1994 Jim Wilson (wilson@cygnus.com) ! * iris4gl.h: Rewrite. Include iris4loser.h not iris4-gdb.h. ! Define PREFERRED_DEBUGGING_TYPE not ASM_SPEC. ! * bsd-4.h (LINK_SPEC): Do not depend on gas. Don't interpret -EB ! and -EL options, but do pass them. ! * bsd-5.h (LINK_SPEC): Likewise. ! * decl-osf1.h (LINK_SPEC): Likewise. ! * iris5.h (LINK_SPEC): Likewise. ! * mips-5.h (LINK_SPEC): Likewise. ! * mips.h (LINK_SPEC): Likewise. ! * svr3-4.h (LINK_SPEC): Likewise. ! * svr3-5.h (LINK_SPEC): Likewise. ! * svr4-4.h (LINK_SPEC): Likewise. ! * svr4-5.h (LINK_SPEC): Likewise. ! * dec-bsd.h (LINK_SPEC): Pass all normal linker options to gld. ! (ASM_SPEC): Pass all normal assembler options to gas. ! * osfrose.h (LINK_SPEC): Likewise. ! (ASM_SPEC): Likewise. ! * mips.h (ASM_SPEC): Make definition depend on whether or ! not the default assembler is gas. Pass all normal assembler ! options to gas. ! * iris4loser.h (ASM_SPEC): Likewise. Pass -O0 if the assembler is ! not gas. ! * iris3.h (ASM_SPEC, LINK_SPEC): Delete. ! * news4.h (ASM_SPEC, LINK_SPEC): Delete. ! * news5.h (LINK_SPEC): Delete. ! * nws3250v4.h (ASM_SPEC, LINK_SPEC): Delete. ! * ultrix.h (ASM_SPEC, LINK_SPEC): Delete. ! * mips.h (ASM_FINAL_SPEC): Cross compiling does not presume gas. ! * osfrose.h (SIZE_TYPE): Delete. ! (MAX_WCHAR_TYPE_SIZE): Define. ! * calls.c (expand_call): For pcc_struct_value case, set ! MEM_IN_STRUCT_P correctly on target. ! * Makefile.in (mostlyclean): Don't explicitly delete ld. ! Mon Mar 7 20:06:38 1994 Ian Lance Taylor (ian@cygnus.com) ! * mips-tdump.c (print_symbol): The index field of a global symbol ! is the symbol table index of the corresponding local symbol, not ! an index into the aux table. ! (print_file_desc): Print out size of line number information ! rather than repeating line number count. The cbLineOffset field ! of a PDR is relative to the cbLineOffset field of the FDR. Also, ! when computing line_end of the last PDR, use cbLineOffset, not ! ilineBase. ! Mon Mar 7 17:42:35 1994 H.J. Lu (hjl@nynexst.com) ! * Makefile.in (gxx_prefix): New; default to $(libdir). ! (GPLUSPLUS_INCLUDE_DIR): Change to $(gxx_prefix)/g++-include. ! * configure (gxx_prefix): New; default to $(libdir). ! * i386/linux.h (GPLUSPLUS_INCLUDE_DIR): Deleted. ! (STARTFILE_SPEC): Remove "-nojump". ! Mon Mar 7 17:06:08 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * i386/xm-linux.h (malloc): Remove disabled code. ! Mon Mar 7 13:27:09 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cccp.c (no_record_file): New variable. ! (main): Set it for -imacros and -include files. ! (do_endif): Don't call record_control_macro for -include or -imacros ! files or files included from -imacros. ! Sun Mar 6 21:48:51 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) ! * config.sub: Accept freebsd as OS. ! Sun Mar 6 14:40:00 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * stupid.c: Add prototypes for static functions. ! (last_{jump,label}_suid): Deleted; all uses deleted. ! (reg_crosses_blocks): Likewise. ! (stupid_life_analysis): Only allocate MAX_SUID entries ! of after_insn_hard_regs. ! Use GET_RTX_CLASS when possible. ! Initialize all of reg_renumber. ! Use reg_alternate_class when reg not available in preferred class. ! (stupid_find_reg): Delete argument CROSSES_BLOCKS. ! * stupid.c (stupid_mark_refs): If setting reg_where_dead, set ! regs_live so we don't later clobber it. ! * recog.c (constrain_operands): Properly handle '#' in constraint. ! * combine.c (subst): Split into five functions. ! (simplify_{rtx,if_then_else,set,logical}): New functions. ! Sun Mar 6 13:12:48 1994 James Van Artsdalen (james at bigtex.cactus.org) ! * reg-stack.c (find_blocks): Undo previous change to block ! delineation algorithm. ! (reg_to_stack): Make algorithm identical to that in find_blocks. ! Sat Mar 5 16:27:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * genattrtab.c (attr_printf): Remove `register' from decl of FMT. ! * tree.c (build_nt, build_parse_node): Remove `register' from decl ! of CODE. ! * reload.c (get_secondary_mem): Call SECONDARY_MEMORY_NEEDED_MODE ! if it is defined. ! * alpha.h (SECONDARY_MEMORY_NEEDED_MODE): New macro. ! * alpha.c (output_{pro,epi}log): Round var size to quadword boundary. ! * alpha.md (unaligned_{load,store}hi): Clear low bit of ! address before using as operand to extwl, mskwl, and inswl. ! (movhi, reload_inhi, reload_outhi): Pass extra scratch value. ! Fri Mar 4 17:16:23 1994 Leonard Norrgard (vinsci@nic.funet.fi) ! * c-lex.c: Delete gperf-generated source from here. ! * c-gperf.h: New file; contains just gperf output. ! * Makefile.in (c-gperf.h): New rule. ! (c-lex.o): Depends on c-gperf.h. ! (realclean): Delete c-gperf.h. ! (distdir): Build c-gperf.h. ! (diff): Omit differences in c-gperf.h. ! Fri Mar 4 06:35:26 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * svr4.h, m88k.h (ASM_FINISH_DECLARE_OBJECT): Set ! size_directive_output to 1. ! * reload1.c (emit_reload_insns): Don't call gen_input_reload if ! src and dest are identical. ! Thu Mar 3 15:32:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.md (mskXl): Add missing NOT in patterns. ! * t-m88k: Remove added realclean rule. ! See ChangeLog.8 for earlier changes. --- 1,3637 ---- ! Fri Jun 16 06:54:03 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.c (alpha_builtin_saveregs): Use ptr_mode and conversions ! when need so works for both OSF and NT. ! * va-alpha.h (__va_tsize): Round to long long not long. ! Thu Jun 15 17:54:52 1995 Bdale Garbee ! * configure (a29k-*-coff): Synonym for a29k-*-udi. ! Thu Jun 15 17:51:21 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * function.c (assign_parms): Do all conversions in CONVERSION_INSNS. ! Thu Jun 15 17:36:49 1995 Michael Meissner ! * reg-stack.c (record_reg_life): Call record_reg_life_pat with 0 ! for douse argument so that USE's created to mark variables within ! blocks don't get marked as set. ! Thu Jun 15 06:28:15 1995 Dennis Glatting (dennisg@CyberSAFE.COM) ! * configure: Change one sed command to work around m68k-next bug. ! Wed Jun 14 22:14:39 1995 Jason Merrill ! * collect2.c (main): Don't turn off auto_export because of -g. ! (main): Ignore the argument to -o. ! * alpha.h (LINK_SPEC): Don't pass -init __main anymore. * alpha/osf12.h (LINK_SPEC): Ditto. ! * mips/iris5.h (LINK_SPEC): Ditto. ! * collect2.c (main): Place o_file after an initial .o (like crt0.o). ! If we have LD_INIT_SWITCH, use init and fini functions for ! executables, too. Specify the unique function names. ! (write_c_file_stat): Fix the case of destructors but no constructors. ! Don't include the generic-named functions for executables. ! (write_c_file): If we have LD_INIT_SWITCH, always use ! write_c_file_stat. ! * collect2.c (main): Also add _GLOBAL__D? to export list. ! * ginclude/iso646.h: Do nothing if compiled as C++. ! Wed Jun 14 17:39:10 1995 Roland McGrath (roland@gnu.ai.mit.edu) ! * c-common.c (format_char_info, case 'm'): Set type to void. ! (check_format_info): If type is void, ignore operand. ! Wed Jun 14 17:04:10 1995 Paul F. Kunz (Paul_Kunz@SLAC.Stanford.EDU) ! * expr.c (expand_builtin_apply_args): Put back original ! register save and restore order. ! Wed Jun 14 16:56:22 1995 Michael Meissner ! * rs6000/eabi.h (INVOKE__main): Define, so __eabi is called after ! main's arguments are saved. ! * rs6000.c (output_prolog): Don't call __eabi here, let ! compiler call it after the arguments to main are saved. ! (output_{prolog,epilog}): Don't use functions under V.4 to save ! and restore floating point registers. ! Wed Jun 14 16:52:12 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k/mot3300.h (PCC_BITFIELD_TYPE_MATTERS): Defined. ! Wed Jun 14 16:48:53 1995 Jerry Frain (jerry@tivoli.com) ! * Makefile.in (stage[1-4]): Correctly link `as', `ld', and `collect2'. ! Wed Jun 14 05:52:04 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * objc-act.c (hack_method_prototype): Set DECL_CONTEXT of parms. ! * expmed.c (emit_store_flag): Always set LAST. ! * c-decl.c (start_function): New parameter for attributes. ! * c-tree.h (start_function): Likewise. ! * c-lang.c (finish_file): Pass extra parm to start_function. ! * objc-act.c (build_module_descriptor, really_start_method): Likewise. ! * c-parse.in (fndef, nested_function, notype_nested_function): ! Likewise. ! * function.c (assign_parms): Use convert_to_mode instead of ! gen_lowpart when converting incoming parm. ! Tue Jun 13 19:10:32 1995 Richard Kenner ! * rs6000.md (decrement_and_branch): Finish last fix; update matching ! constraint. ! Tue Jun 13 18:32:51 1995 Torbjorn Granlund ! * fold-const.c (fold): When converting a COND_EXPR to an ABS_EXPR, ! get the types right for ABS_EXPR to work. ! Mon Jun 12 17:09:55 1995 Michael Tiemann (tiemann@axon.cygnus.com) ! * reorg.c (fill_simple_delay_slots): Set MAYBE_NEVER according to ! code of TRIAL_DELAY, not TRIAL. ! Mon Jun 12 15:02:37 1995 Doug Evans ! * configure: Restore code to make ld symlink if ! use_collect2. ! * gcc.c (link_command_spec): Undo patch of May 11. ! -nostdlib implies -nostartfiles again. ! * dsp16xx.h (CROSS_LINK_SPEC): Likewise. ! * i386/freebsd.h (LINK_SPEC): Undo patch of May 24. ! Don't pass "-e start" if nostdlib. ! * i386/sun.h (LINK_SPEC): Likewise. ! * m68k/sun2o4.h (LINK_SPEC): Likewise. ! * m68k/sun3.h (LINK_SPEC): Likewise. ! * m68k/vxm68k.h (LINK_SPEC): Likewise. ! * mips/netbsd.h (LINK_SPEC): Likewise. ! * config/netbsd.h (LINK_SPEC): Likewise. ! * rs6000/mach.h (LINK_SPEC): Likewise. ! * sparc.h (LINK_SPEC): Likewise. ! * sparc/vxsparc.h (LINK_SPEC): Likewise. ! * gcc.c (link_command_spec): New argument -nodefaultlibs. ! Sun Jun 11 20:47:53 1995 Stephen L Moshier (moshier@world.std.com) ! * Makefile.in (fix-header.o): Depends on xsys-protos.h. ! Sun Jun 11 15:07:58 1995 Tim Carver (timc@ibeam.intel.com) ! * reload1.c (emit_reload_insns): Don't call HARD_REGNO_NREGS ! on psuedo when clearing reg_last_reload_reg. ! Sun Jun 11 14:07:05 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k.md ({add,sub}di{_mem,3}): Patterns merged. ! Sun Jun 11 13:43:26 1995 Torbjorn Granlund ! * m68k.md (cmpdi matcher): Set cc_status before returning. ! * config/xm-freebsd.h (DONT_DECLARE_SYS_SIGLIST): Define. ! Sun Jun 11 13:38:49 1995 Jason Merrill ! * fixincludes (math.h): Keep declaration of abs on HPUX. ! Sun Jun 11 12:31:42 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * stor-layout.c (variable_size): Do nothing if SIZE is constant. ! * stmt.c (expand_asm_operands): See if output operand permits ! register. If not, mark output addressable, call expand_operand ! on it, and give error if not MEM. ! * function.c (assign_parms): Handle promotions of both ! passed and nominal modes separately and insert needed conversions. ! (promoted_input_arg): Return 0 if nominal and passed modes differ. ! * stmt.c (all_cases_count, case INTEGER_TYPE): Fix typo in checking ! for integer bounds. ! Sat Jun 10 08:55:25 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * libgcc2.c (_floatdidf): Correctly set float sizes. ! * c-decl.c (c_decode_option, case "-Wall"): Don't set extra_warnings. ! * Makefile.in (cpplib.o, fix-header.o): Update dependencies. ! (cpperror.o, cppexp.o, cpphash.o): New rules, to show .h dependencies. ! Fri Jun 9 18:06:10 1995 Doug Evans ! * cse.c (cse_basic_block): Fix test for whether block ends with a ! barrier. Return next insn, not 0, if block ends in a barrier. ! Fri Jun 9 17:58:29 1995 Paul Eggert ! * fold-const.c (lshift_double): Replace `&' with `%' to fix typo. ! ([lr]shift_double): Truncate shift count only if SHIFT_COUNT_TRUNCATED. ! Remove unnecessary `count >= prec' test. ! * cexp.y (left_shift): Ignore integer overflow. ! * cexp.y (skip_evaluation): New variable. ! (&&, ||, ?:): Increment it in unevaluated subexpressions. ! (/, %, integer_overflow): Suppress diagnostics if skip_evaluation != 0. ! (yyerror): Clear skip_evaluation. ! Fri Jun 9 17:49:05 1995 Torbjorn Granlund ! * m68k.md (tstdi): Rewrite. ! Fri Jun 9 17:28:55 1995 Per Bothner ! * scan-decls.c (scan_decls): Handle declarations with ! multiple comma-separated declarators. ! Thu Jun 8 19:16:12 1995 Richard Earnshaw (rearnsha@armltd.co.uk) ! * arm.md (mov[sd]f expands): Don't allow fp constants in pseudos ! when TARGET_SOFT_FLOAT. ! Thu Jun 8 19:11:43 1995 Jim Wilson ! * expmed.c (store_split_bit_field): When adjust arg in ! BYTES_BIT_ENDIAN case, use number of bits in arg for MEM operands ! and BITS_PER_WORD for other operands. ! (extract_fixed_bit_field): Undo last change. ! * unroll.c (verify_addresses): New function. ! (find_splittable_givs): Use it instead of memory_address_p. ! Thu Jun 8 18:58:18 1995 Torbjorn Granlund ! * expmed.c (expand_divmod): Always check result of emit_store_flag. ! Thu Jun 8 12:02:34 1995 David D Zuhn (zoo@armadillo.com) ! * cpplib.c (cpp_push_buffer): Include filename in error message. ! Thu Jun 8 11:53:45 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * function.c (assign_parms): Don't call promote_mode on arg ! unless PROMOTE_FUNCTION_ARGS defined. ! * rs6000.md (decrement_and_branch): Ensure label is operand 0. ! * rs6000.md (aux_truncdfsf2): New pattern. ! (movsf): Use it instead of invalid SUBREG and truncdfsf2. ! * varasm.c (assemble_name): Disable warn_id_clash around ! get_identifier call. ! Wed Jun 7 17:22:25 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * configure (gdb_needs_out_file_path): New variable. ! (m68k-motorola-sysv): Set gdb_needs_out_file_path if not using gas. ! (.gdbinit): If gdb_needs_out_file_path is set, add a 'dir' command ! for $(out_file). ! Wed Jun 7 17:17:19 1995 Torbjorn Granlund ! * fold-const.c (fold): When folding `<' type nodes, make true_value ! and false_value have correct types. ! Wed Jun 7 05:06:42 1995 Jason Merrill ! * collect2.c (COFF scan_prog_file): Use the AIX duplicate entry. ! Tue Jun 6 18:43:09 1995 Jeffrey A Law (law@snake.cs.utah.edu) ! * pa.h (FUNCTION_ARG_CALLEE_COPIES): Define. ! Tue Jun 6 18:21:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expr.c (expand_expr, case PLACEHOLDER_EXPR): Consider two types ! identical if their TYPE_MAIN_VARIANTs are the same. ! * c-decl.c (start_decl): Set DECL_COMMON before calling ! decl_attributes. ! * a29k.c (print_operands): Cast args to bcopy to char *. ! * c-decl.c (duplicate_decls): Don't clear DECL_CONTEXT of ! new decl if it is a function. ! Tue Jun 6 17:57:44 1995 Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) ! * gcc.c (do_spec_1, case 'g'): Handle %O as suffix if MKTEMP_EACH_FILE. ! Tue Jun 6 17:53:05 1995 Michael Meissner ! * rs6000.c (expand_block_move): Update source and destination pointers ! inside the loop moving the bytes, not outside. ! Tue Jun 6 14:58:37 1995 Andreas Schwab ! * m68k.h (CONDITIONAL_REGISTER_USAGE): Don't mark pic reg as fixed. ! * m68k.c (finalize_pic): Emit USE insn at start and end of function. ! Tue Jun 6 13:46:57 1995 Jim Wilson ! * sh.c (print_operand): Check for annulled branches. ! (output_movedouble): Handle SUBREG addresses. ! (output_branch): Handle annulled branches. ! (sh_expand_prologue): Correct number of saved registers for ! varargs functions. ! * sh.h: Add some comments. ! * sh.md: Add some comments. Cleanup formatting. ! (type attribute): Add pstore and call. ! (return define_delay): Reorganize to make clearer. ! (call/sfunc define_delay): Define. ! (cbranch define_delay): Define to have annul-true delay slot. ! (subsi3): Use arith_reg_operand for operand 2. ! (shift patterns): Use const_int_operand instead of immediate_operand ! for shift counts. ! (push): Add pstore constraint case. ! (movsi_i): Move t/z constraint pair to the front of the list. ! (calli, call_valuei): Add "call" attribute. ! ! Mon Jun 5 19:23:13 1995 Jim Wilson ! * sched.c (attach_deaths): In last change, use find_reg_note instead ! of find_regno_note. ! Mon Jun 5 19:17:31 1995 Tom Quiggle (quiggle@lovelace.engr.sgi.com) ! * mips/iris5.h (MACHINE_TYPE): Say "IRIX 5.x", not "5.0". ! (NO_DOLLAR_IN_LABEL): Undefine. ! * mips.h (sdb_begin_function_line): New declaration. ! (PUT_SDB_FUNCTION_END): New definition. ! Mon Jun 5 18:56:10 1995 Michael Meissner ! * rs6000.c (expand_block_move): Don't do block moves where we clobber ! fixed numbers of regs, instead move just 1-8 bytes at a time. ! * Makefile.in (STAGESTUFF): Copy files produced by -da and ! -save-temps to the stage subdirectories. ! Mon Jun 5 08:18:46 1995 Torbjorn Granlund ! * combine.c (reg_dead_at_p): When scanning backwards, stop at BARRIER. ! * m68k.c (print_operand): Handle 'R' for registers. ! * m68k.md (cmpdi): Rewrite to avoid bogus matching constraints. ! * optabs.c (expand_binop): In last change, don't defererence TARGET ! if it is 0. ! * pa.md (movsicc): Use MATCH_DUP for operand 4 and 5. ! Mon Jun 5 08:14:56 1995 Jeffrey A Law (law@cs.utah.edu) ! * pa.c (hppa_encode_label): Allocate stuff on permanent_obstack ! rather than via malloc. ! * c-common.c (decl_attributes): Fix typo in size passed to alloca. ! Mon Jun 5 08:10:55 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.md: Use "some_operand" for patterns valid only during ! reload and meant to handle adding more PLUS operators during ! register elimination. ! Mon Jun 5 07:31:53 1995 Stephen L Moshier (moshier@world.std.com) ! * cse.c (simplify_unary_operation, case FLOAT, UNSIGNED_FLOAT): ! Truncate to requested mode. ! Sat Jun 3 22:08:51 1995 Jim Wilson ! * sched.c (attach_deaths): Don't add a REG_DEAD note if a REG_UNUSED ! note is already present. ! Sat Jun 3 18:36:57 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * pa.h (hppa_builtin_saveregs): Add declaration. ! Sat Jun 3 18:11:26 1995 Jason Merrill ! * Makefile.in (scan-decls.o): Depends on cpplib.h. ! Fri Jun 2 19:23:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * optabs.c (expand_binop): Don't use non-REG TARGET in 2-word case. ! Thu Jun 1 19:30:30 1995 Tor Egge (tegge@flipper.pvv.unit.no) ! * m88k.h (RETURN_POPS_ARGS): New argument. ! * m88k/dolphin.ld: Added start of comment. ! Thu Jun 1 19:12:28 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * configure (a29k-*-bsd*): Fix typo in last change. ! Thu Jun 1 18:51:53 1995 Jim Wilson ! * expmed.c (extract_fixed_bit_field): For REG case, compute total_bits ! from mode instead of assuming BITS_PER_WORD. ! Thu Jun 1 18:34:31 1995 Michael Meissner ! * rs6000.h (FIXED_R13): Default to 0. ! ({FIXED,CALL_USED}_REGISTERS): Use FIXED_R13 for register 13. ! * sysv4.h (FIXED_R13): Define to be 1. ! Wed May 31 20:57:26 1995 Torbjorn Granlund ! * m68k.md ([su]mulsi3_highpart): Pass correct number of arguments to ! const_uint32_operand. ! * m68k.c (const_uint32_operand): Reject negative numbers. ! * expmed.c (expand_mult_highpart): Use wide_op1 for all multiplies. ! (expand_divmod): Undo Nov 12 change. Instead, add special case ! for division by MIN_INT in signed TRUNC_DIV_EXPR case. ! Wed May 31 20:44:21 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k.md (one_cmpldi2): New pattern. ! ({a,l}shrdi{3,_const}): Allow 63 as shift count. ! Wed May 31 14:56:31 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * varasm.c (assemble_start_function, assemble_variable): ! Make sure first_global_object_name is in permanent obstack. ! * reload1.c (alter_reg): Clean up setting of RTX_UNCHANGING_P ! when making a MEM. ! * reorg.c (struct resources): New field unch_memory. ! (CLEAR_RESOURCES, mark_target_live_regs, dbr_schedule): Clear it. ! (mark_{referenced,set}_resources, redundant_insn): Set it. ! (fill_simple_delay_slots): Likewise. ! (resource_conflicts_p): Test it. ! * unroll.c (copy_loop_body): Fix typo in call to sets_cc0_p. ! * integrate.c (output_inline_function): Don't call expand_function_end. ! * calls.c (prepare_call_address): Only call use_reg on ! static_chain_rtx if it is a REG. ! * configure (a29k-*-bsd*): Use t-a29k. ! * t-a29k: New file. ! * a29k/t-a29kbare (LIBGCC1_TEST): New null definition. ! * a29k/t-vx29k (LIBGCC1_TEST): Likewise. ! Wed May 31 14:17:42 1995 Jeffrey A Law (law@snake.cs.utah.edu) ! * configure (hppa*-*-bsd*): Do not run fixincludes. ! (hppa*-*-osf*): Likewise. ! (hppa*-*-lites*): Likewise. ! * pa.h (PRINT_OPERAND_ADDRESS): Use "RR'" rather than "R'" for ! symbolic addresses. ! * pa.md (symbolic HIGH patterns): Likewise. ! (symbolic LO_SUM pattern): Likewise. ! Wed May 31 14:11:53 1995 Michael Meissner ! * rs6000.md (all movstri recognizers): Eliminate updating the pointers. ! * rs6000.c (expand_block_move): Don't pass argument of # bytes to ! increment pointers by to movstrsi expanders. ! * rs6000.c (rs6000_override_options): Fix typo with -mstring handling. ! * rs6000.h (TARGET_SWITCHES): Set MASK_STRING_SET explicitly ! if -mno-string, so that it can override the processor default. ! Wed May 31 07:31:53 1995 Jason Merrill ! * c-common.c (truthvalue_conversion, BIT_AND_EXPR): Make sure that ! the result has boolean_type_node. ! Tue May 30 19:03:21 1995 J.T. Conklin ! * stddef.h: Undefine _BSD_XXX_T_ if _GCC_XXX_T is defined on BSD ! Net/2 derived systems. ! Tue May 30 08:17:37 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k.md (decrement_and_branch_until_zero): Operand 0 constraint ! changed from "+g" to "+d*am". ! (similar anonymous HImode pattern): Likewise. ! * m68k.md (tstdi): Use tst/subx #0 instead of neg/negx. ! Allow "a" and ">" for operand 0. ! Mon May 29 19:24:43 1995 Niklas Hallqvist (niklas@appli.se) ! * m68k.md (addsi_lshrsi_31): Use match_dup, not constraint "1", ! for matching inputs. ! Mon May 29 12:39:58 1995 Allen Briggs ! * i386/isc.h ({STARTFILE,LIB,CPP}_SPEC): Handle -Xp like -posix. ! * i386/x-isc3 (X_CFLAGS): Add -Xp. ! Mon May 29 12:28:41 1995 J.T. Conklin (jtc@cygnus.com) ! * configure (sparc-*-netbsd): Add missing asterisk at end. ! Mon May 29 08:55:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * combine.c (recog_for_combine): New parm PADDED_SCRATCHES; set it. ! (try_combine): Accumulate number of scratches and update max_scratch. ! (simplify_set): Add extra parm to recog_for_combine. ! * romp.md (call): Put USE for r0 in CALL_INSN; call call_internal ! to emit insn. ! (call_internal): New name for anonymous call. ! (call_value, call_value_internal): Likewise. ! * winnt/xm-winnt.h: Protect most definitions with #ifndef. ! * alpha/xm-winnt.h: Include alpha/xm-alpha.h, then winnt/xm-winnt.h. ! (POSIX): Undefine. ! * xm-alpha.h: Don't include alloca.h for winnt. ! Sun May 28 18:34:01 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * configure: Make sed commands more uniform. ! * Makefile.in: Properly use $(srcdir) for files that have it ! in their reference as a target of a rule. ! (libgcc1.a): Add missing RANLIB_TEST use. ! * stmt.c (expand_computed_goto): Call do_pending_stack_adjust. ! Sun May 28 18:08:41 1995 Torbjorn Granlund ! * m68k.md (divmodhi4, udivmodhi4): Use "dmsK" for operand 2. ! Fri May 26 17:01:22 1995 Paul Eggert ! * fixincludes: Fix bogus recursive in NEWS-OS 4.0C. ! Fri May 26 08:02:14 1995 Michael Meissner (meissner@cygnus.com) ! * c-typeck.c (initializer_constant_valid_p): For the CONSTRUCTOR ! case, if the type is a record, recurse, just like for unions. ! Thu May 25 07:56:14 1995 Paul Eggert ! * fixincludes: Add `sel', `tahoe', `r3000', `r4000' to the ! list of pre-ANSI symbols that need to be surrounded with __ __. ! Allow white space between `#' and `if' when looking for lines to patch. ! * objc/sarray.h (PRECOMPUTE_SELECTORS, struct soffset): ! Use #ifdef __sparc__, not sparc. ! * m68k.md (addsi_lshrsi_31, ashldi_const, ashrdi_const, lshrdi_const): ! Replace `mov' with `move'. ! Thu May 25 07:35:37 1995 Allen Briggs ! * libgcc2.c (L_eh, i386): Remove in-line comments in assembly ! code--the '#' character is not valid for the SYSV as. ! Thu May 25 07:28:54 1995 Pat Rankin (rankin@eql.caltech.edu) ! * Makefile.in (BC_ALL): Restore it from May 22 change; vms uses it. ! (STAGESTUFF): Use it. ! Thu May 25 07:11:56 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.c (alpha_emit_set_const): Don't call expand_binop for ! other than add if SImode and can't create pseudos. ! Wed May 24 21:38:24 1995 Jim Wilson ! * sched.c (reemit_notes): New function. ! (schedule_block): Call reemit_notes twice. Reorganize code for ! handling SCHED_GROUP_P insns, so that reemit_notes works. ! * sh/sh.c (shiftcosts, genshifty_op): Add SH3 support. ! * sh/sh.md (ashlsi3, lshrsi3): Add SH3 support. ! (ashlsi3_d, ashrsi3_d, lshrsi3_d): New patterns for SH3. ! (ashrsi2_31): Remove r/!r constraint. ! Wed May 24 17:00:47 1995 Jason Merrill ! * tree.c (type_list_equal): Call simple_cst_equal before checking ! types. ! Wed May 24 16:49:49 1995 Douglas Rupp (drupp@cs.washington.edu) ! * Makefile.in (libgcc2.a): Handle case of separate srcdir. ! Wed May 24 16:22:01 1995 Paul Eggert ! * configure: Define $(MAKE) if `make' doesn't. ! Wed May 24 15:50:51 1995 Doug Evans ! * dsp16xx.h (CROSS_LINK_SPEC): ENDFILE_SPEC moved to -nostartfiles. ! * i386/freebsd.h (LINK_SPEC): Don't pass "-e start" if nostartfiles ! rather than nostdlib. ! * i386/sun.h (LINK_SPEC): Likewise. ! * m68k/sun2o4.h (LINK_SPEC): Likewise. ! * m68k/sun3.h (LINK_SPEC): Likewise. ! * m68k/vxm68k.h (LINK_SPEC): Likewise. ! * mips/netbsd.h (LINK_SPEC): Likewise. ! * config/netbsd.h (LINK_SPEC): Likewise. ! * rs6000/mach.h (LINK_SPEC): Likewise. ! * sparc.h (LINK_SPEC): Likewise. ! * sparc/vxsparc.h (LINK_SPEC): Likewise. ! * m88k/m88k.h (FUNCTION_ARG_BOUNDARY): Use GET_MODE_BITSIZE. ! Wed May 24 15:44:04 1995 Jason Merrill ! * fold-const.c (fold): Make sure that a folded TRUTH_NOT_EXPR ! retains the same type. ! * c-common.c (truthvalue_conversion): Also accept TRUTH_NOT_EXPR. ! Wed May 24 15:41:51 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cplus-dem.c (strstr, strncmp, strlen): Remove declarations. ! * tree.c (type_list_equal, simple_cst_list_equal, index_type_equal): ! Check for simple_cst_equal return value of -1. ! Wed May 24 10:05:24 1995 Michael Meissner ! * libgcc1-test.c (start, _start): Provide declarations, so that ! the GNU linker doesn't give a warning message about defaulting the ! start address. ! * rs6000/sysv4.h (STRIP_NAME_ENCODING): Redefine back to the ! original defination, rather than the defination used in rs6000.h. ! (ASM_OUTPUT_SOURCE_LINE): Use STRIP_NAME_ENCODING. ! * rs6000.h (STRIP_NAME_ENCODING): Skip leading '*'. ! * rs6000.h (MASK_STRING_SET, TARGET_STRING_SET): Add target ! flags bit for whether -mstring was actually used. ! (TARGET_SWITCHES): Add MASK_STRING to all power targets. Set ! MASK_STRING_SET for -mstring and -mno-string. ! (TARGET_DEFAULT): Add MASK_STRING. ! * rs6000.c (rs6000_override_options): Add MASK_STRING to ! all power targets. Make an explicit -mstring/-mno-string override ! the -mcpu=processor default. ! * rs6000/eabile.h (CPP_SPEC): Copy from sysvle.h to provide the ! appropriate little endian defaults. ! * rs6000/sysv4.h (ASM_OUTPUT_SOURCE_LINE): Use assemble_name to ! output the canonical name. ! Wed May 24 01:21:15 1995 Jason Merrill ! * rs6000.h (STRIP_NAME_ENCODING): Define. ! (RS6000_OUTPUT_BASENAME): Use it. ! Tue May 23 19:54:21 1995 Doug Evans ! * gcc.c (link_command_spec): Move ENDFILE_SPEC from -nostdlib ! to -nostartfiles. ! Tue May 23 17:01:50 1995 Jim Wilson ! * alpha.md (negsi2-2): Change output pattern to #. ! * mips.c (embedded_pic_offset): Output RTL to initialize ! embedded_pic_fnaddr_rtx. ! (mips_finalize_pic): Delete. ! * mips.h (mips_finalize_pic): Delete declaration. ! (FINALIZE_PIC): Delete. ! (INIT_EXPANDERS): Clear embedded_pic_fnaddr_rtx. ! * mips.md (get_fnaddr): Add = to output contraint. ! * sh.c (shift_amounts): Correct entry for shifts by 29. ! * sh.md (sett): New pattern. ! (movsi_i): Change source constraint for move to T reg to be 'z'. ! * mips/ecoff.h (STARTFILE_SPEC): Define to null string. ! * mips/elfl.h, mips/elfl64.h: Correct typo in comment. ! * mips/elflorion.h, mips/elforion.h (MIPS_CPU_DEFAULT): Delete. ! * mips.c (override_options): Delete #ifdef MIPS_CPU_DEFAULT code. ! Add #ifdef MIPS_CPU_DEFAULT_STRING code before the first ! mips_cpu_string test. ! Tue May 23 07:22:36 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * romp.c (hash_rtx): Avoid warning on int-to-pointer conversion. ! (output_fpops): Cast args to bcopy to char *. ! * cpplib.c (initialize_builtins): Add missing parm to timestamp call. ! * Makefile.in (install-libobjc): Don't depend on libobjc.a. ! * c-parse.in: Objc shift/reduce conflicts now 48. ! (parm): Use setspecs/restore here. ! (parmlist_or_identifiers): Not here. ! Mon May 22 19:30:30 1995 Doug Evans ! * h8300.md (movsf_h8300h): Add missing post-inc case to constraints. ! Mon May 22 14:38:36 1995 Michael Meissner ! * rs6000.c (rs6000_override_options): Do SUBTARGET_OVERRIDE_OPTIONS ! here. ! * rs6000.h (OVERRIDE_OPTIONS): Not here. ! * rs6000.c (expand_block_move): Handle moves without string ! instructions by generating a series of loads and stores. ! (output_prolog): Support -mno-toc on V.4 and eabi systems. ! ! * rs6000/sysv4.h (TARGET_SWITCHES): Add -mtoc and -mno-toc. ! (SUBTARGET_OVERRIDE_OPTIONS): Add some warnings for incompatible ! switches. ! (TOC_SECTION_FUNCTION): Make -mno-toc like -mrelocatable in that ! we don't put the minimal toc pointer in the global toc section. ! (LINK_SPEC): Use -oformat to set link output format, not -m. ! ! * rs6000/t-eabigas (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Build ! libgcc.a variants with -mno-toc support. ! * rs6000/t-ppcgas (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Ditto. ! ! Mon May 22 07:10:52 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * cplus-dem.c (mystrstr): Replacement for strstr. ! ! * configure: Split up long sed command. ! * Makefile.in (SYMLINK): Deleted; unused. ! (oldobjext): Deleted; no longer used. ! (FLAGS_TO_PASS): Include objext and exeext. ! (STAGESTUFF, protoize.o, unprotoize.o): Use $(objext), not .o. ! (test_protoize_simple, compare{,3}, gnucompare{,3}): Likewise. ! (STAGESTUFF, specs, gcc-cross, collect2): Add missing $(exeext). ! (libgcc1.null, libgcc[12].a, stage[1-4]): Likewise. ! (xgcc, cc1, cc1obj, enquire): Use $@ instead of filename for -o value. ! (collect2, mips-tfile, mips-tdump, gen*): Likewise. ! (bi-arity, bi-opcode, bi-opname, cccp, cppmain): Likewise. ! (protoize, unprotoize, gen-protos, fix-header): Likewise. ! (crtbegin.o, crtend.o): Don't use -o; move output to proper ! filename (using objext) instead. ! (BI_ALL, BC_ALL, bytecode): Deleted; unused. ! (bi-*.o, cexp.o, stamp-{proto,fixinc}): Remove unneeded $(srcdir). ! (getopt{,1}.o, SYSCALLS.c.X): Likewise. ! (install-driver): New target. ! (install-normal): Depend on it. ! (install-common): Don't depend on xgcc. ! (maketest): Deleted; no longer used. ! (stage[1-4]): Use name collect-ld, not real-ld. ! (risky-stage[1-4]): Use stage[1-4] as dependencies; don't copy. ! * alpha/config-nt.bat, i386/config-nt.bat: Make {,h,t}config.h ! and tm.h by writing a single #include line. ! Update way specs.h and options.h are written. ! * alpha/config-nt.sed, i386/config-nt.sed: Set new variables ! into Makefile. ! Build winnt.obj. ! Edit CCCP definition. ! * alpha/x-winnt, i386/x-winnt (oldobjext): Deleted. ! Add rules for .c.obj, .adb.obj, and .ads.obj. ! (LIB2FUNCS_EXTRA, spawnv.o): New rules. ! * i386/x-winnt (objext): Now .obj, not .o. ! ! * gcc.c (HAVE_OBJECT_SUFFIX): New macro. ! (process_command): Convert x.o to x.foo for OBJECT_SUFFIX of ".foo". ! (do_spec_1): Avoid shadow variable "i" and always use for loop var. ! ! * c-decl.c (finish_decl_top_level): Removed; no longer used. ! * objc-act.c: Numerous formatting changes. ! (NULLT): Deleted; all uses changed to NULL_TREE. ! (get_{static,object}_reference, objc_add_static_instance): ! Use push_obstacks instead of saving obstacks manually. ! (build_{selector,class}_reference_decl): Likewise. ! (build_objc_string_decl, build_protocol_reference): Likewise. ! (comp_{method,proto}_with_proto): Likewise. ! (create_builtin_decl, synth_module_prologue): Set DECL_ARTIFICIAL ! for internal objects. ! (build_{selector,class}_reference_decl, add_objc_decls): Likewise. ! (generate_objc_symtab_decl, build_module_descriptor): Likewise. ! (build_protocol_reference): Likewise. ! (build_objc_string_decl, synch_forward_declarations): Likewise. ! Delete call to end_temporary_allocation. ! (generate_static_references, generate_strings): Likewise. ! (build_selector_translation_table, generate_category): Likewise. ! (generate_{ivars,protocol}_list, build_protocol_reference): Likewise. ! (build_objc_string_object): If next_runtime, put everything in ! permanent obstack. ! (objc_add_static_instance): Use build_decl instead of start_decl ! and finish_decl_top_level. ! (build_{class_reference,objc_string}_decl): Clear DECL_CONTEXT. ! (start_class): Exit with FATAL_EXIT_CODE, not 1. ! (add_objc_decls): Don't set DECL_IN_SYSTEM_HEADER. ! ! * tree.c (valid_machine_attribute): Handle attribute on ! pointer-to-function types. ! ! Sun May 21 17:16:37 1995 J. T. Conklin ! ! * mips/netbsd.h (HAVE_STRERROR): Remove. ! * mips/xm-netbsd.h: New file. ! * mips/t-mips-netbsd: Deleted. ! * configure (mips-dec-netbsd): Use xm-netbsd.h and t-libc-ok. ! ! Sun May 21 17:16:37 1995 Arne H. Juul (arnej@pvv.unit.no) ! ! * mips/netbsd.h: Use __start as entry point. Ifdef some ! paths on CROSS_COMPILE. ! ! Sun May 21 08:39:26 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-parse.in (datadef, fndef, ivar_decl, mydecls): ! Restore declspec_stack since setspecs is used. ! (parmlist_or_identifiers): Use setspecs before parsing parms ! and restore after parsing parms. ! ! Sun May 21 01:04:52 1995 Jeffrey A. Law ! ! * pa.c (hppa_encode_label): New variable "permanent" to ! where/how memory is allocated for the new label. All ! callers changed. ! ! Sat May 20 16:53:30 1995 Mike Meissner ! ! * rs6000.md (insv, extz): Fail if the structure is QI or HI reg to ! avoid paradoxical subreg's being created in RTL phase, which uses ! SImode to load from memory if structure is later moved to stack. ! ! Sat May 20 06:44:59 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * m68k.md (udivmodhi4): Output "divu" instead of "divs". ! ! Sat May 20 06:11:32 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * reload.c (push_reload): Don't reload inside a SUBREG ! when SUBREG_WORD is nonzero. ! ! * c-decl.c (shadow_tag_warned): Don't warn about useless keyword ! if in system header file. ! ! * tree.c (simple_cst_equal): Don't look at language-specific ! nodes since we don't know what's in them. ! ! * cpperror.c: #include config.h before any other .h file. ! * collect2.c: Likewise. ! ! * i386/config-nt.bat: Add missing ^M on two lines. ! Add case for Fortran; fix typo in Ada case. ! * alpha/config-nt.bat: Add case for Fortran; fix typo in Ada case. ! ! * m68k/t-next (LIBGCC1, CROSS_LIBGCC1): Make not, not "libgcc1.null". ! (OTHER_FIXINCLUDES_DIRS, LIMITS_H_TEST): Delete from here. ! * m68k/x-next (OTHER_FIXINCLUDES_DIR, LIMITS_H_TEST): Move to here. ! ! Fri May 19 19:30:20 1995 Stan Cox (gcc@dg-rtp.dg.com) ! ! * crtstuff.c: Added reference to INIT_SECTION_PREAMBLE for systems that ! do something which must be undone prior to __do_global_ctors. ! ! Fri May 19 19:27:08 1995 Alan Modra ! ! * i386/linux-aout.h (CPP_SPEC): Add defines for -fPIC. ! * i386/linux-oldld.h (CPP_SPEC): Likewise. ! ! Fri May 19 17:46:28 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! ! * collect2.c (strstr): Deleted. ! * cplus-dem.c (strstr): Define ifndef POSIX. ! ! Fri May 19 11:16:51 1995 Per Bothner ! ! * cpplib.c (collect_expansion): Don't escape '@' inside string. ! ! Fri May 19 06:59:21 1995 Pat Rankin (rankin@eql.caltech.edu) ! ! * vmsconfig.com (process_objc_lib, configure_makefile): New routines. ! (bc_all.list, ./vax.md, objc-objs.opt, objc-hdrs.list): New files ! created at config time. ! (bc_all.opt, ./md.): No longer created. ! * make-cc1.com: Handle revised filenames from vmsconfig.com; ! (DO_OBJCLIB): New variable, plus code to compile objc/*.{c,m}. ! ! Wed May 17 16:15:31 1995 Torbjorn Granlund ! ! * i960.c (i960_output_ldconst): New code for XFmode. ! Also, move SFmode code to immediately after DFmode code. ! (S_MODES, D_MODES): Handle XFmode. ! (XF_MODES): Was TF_MODES, handle XFmode instead of TFmode. ! (hard_regno_mode_ok): Replace TFmode with XFmode. ! (i960_output_long_double): New function. ! ! * i960.h (DATA_ALIGNMENT): Define. ! (ROUND_TYPE_ALIGN): Align XFmode scalars at 128 bit boundaries. ! (ROUND_TYPE_SIZE): Round up the size of XFmode objects to 128 bits. ! (CONST_DOUBLE_OK_FOR_LETTER_P): Use CONST0_RTX and CONST1_RTX ! so that all FP modes are recognized. ! (ASM_OUTPUT_LONG_DOUBLE): Define. ! ! * i960.md: Change all TFmode patterns to have XFmode. ! (movxf recognizer, frame version): Use movt, ldt, and stt. ! (movxf recognizer, non-frame version): Delete. ! (extenddfxf2): Delete * before f constraint. ! (extendsfxf2): Likewise. ! ! Wed May 17 17:53:35 1995 Jim Wilson ! ! * unroll.c (unroll_loop): Increment copy_start_luid if copy_start ! is loop_start. ! ! Wed May 17 17:44:57 1995 Lee Iverson ! ! * fold-const.c (invert_truthvalue, case CLEANUP_POINT_EXPR): New case. ! ! Tue May 16 18:51:16 1995 Michael Meissner ! ! * rs6000/rs6000.h (TARGET_SWITCHES): Add -mstring to enable string ! instructions, and -mno-string to disable them. ! (MOVE_MAX): Don't test TARGET_MULTIPLE anymore. ! (MAX_MOVE_MAX): Set to 8, not 16. ! (expand_block_move): Add declaration. ! ! * rs6000/rs6000.c (expand_block_move): New function to expand ! block moves when -mstring is used. ! ! * rs6000/rs6000.md (movti): Use TARGET_STRING, not TARGET_MULTIPLE. ! (load_multiple, store_multiple): Ditto. ! (string insns): Add 8, 6, 4, 2, and 1 register variants for using ! the native string instructions if -mstring. ! ! * rs6000/sysv4.h (CPP_SPEC): If little endian, define ! _LITTLE_ENDIAN and set littleendian assertion. If big endian, ! define _BIG_ENDIAN and set bigendian assertion. ! * rs6000/sysv4le.h (CPP_SPEC): Copy from sysv4.h, and change ! default to little endian. ! ! * rs6000/rs6000.c (override_options): Check for -mmultiple and ! -mstring on little endian systems here. ! * rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Don't do the check ! here. ! Tue May 16 18:36:41 1995 Douglas Rupp (drupp@cs.washington.edu) ! * alpha.c: Changed WINNT to _WIN32. ! * alpha/config-nt.bat, i386/config-nt.bat: Added commands to ! generate specs.h and options.h. ! * i386/config-nt.sed: Changed link32 to link. ! * winnt/ld.c (main): Removed call to free. ! * configure.bat: Added line to echo usage on invalid input. ! * gcc.c (fix_argv): Removed call to free. ! * gcc.c, getpwd.c, protoize.c, sdbout.c: Changed WINNT to _WIN32. ! * toplev.c: Likewise. ! Tue May 16 18:04:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * toplev.c (pfatal_with_name, fatal_io_error, vfatal): ! Use FATAL_EXIT_CODE instead of magic number. ! * cccp.c, cpplib.c, cpplib.h: Use FATAL_EXIT_CODE instead ! of FAILURE_EXIT_CODE. ! * fix-header.c, gen-protos.c: Likewise. ! * cpperror.c, cppmain.c: Likewise. ! Include config.h #ifndef EMACS. ! * xm-alpha.h, xm-rs6000.h, xm-vms.h (FAILURE_EXIT_CODE): Remove. ! Tue May 16 17:46:57 1995 Adam Fedor ! * objc/archive.c (__objc_write_class): Write class version. ! (__objc_write_selector, objc_{write,read}_selector): Handle null ! selector. ! * objc/sarray.h (struct sarray): Make capacity size_t. ! * objc/sarray.c (sarray_realloc): Make array index variables size_t. ! Tue May 16 06:59:08 1995 Paul Eggert ! * dsp16xx.c (print_operand_address): Fix misspellings in messages. ! * i370/mvs.h (FUNCTION_PROFILER): Likewise. ! * mips-tdump.c (type_to_string): Likewise. ! * print-tree.c (print_node): Likewise. ! * protoize.c (edit_fn_definition): Fix mispelled local `have_flotsam'. ! * objc/sendmsg.c (__objc_init_install_dtable): Fix misspelling ! in name of local label `already_initialized'. ! * winnt/winnt.h (STDC_VALUE): Was misspelled. ! * m68k/ccur-GAS.h (FUNCTION_BOUNDARY): Was misspelled. ! * 1750a.h (DEFAULT_PCC_STRUCT_RETURN): Was misspelled. ! Mon May 15 23:41:25 1995 Jeffrey A. Law ! * pa.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Make sure to encode section ! info for all libcalls. ! Mon May 15 20:58:00 1995 Jason Merrill ! * collect2.c (strstr): Define ifndef POSIX. ! * defaults.h (SUPPORTS_WEAK): Provide default. ! * aoutos.h, sparc/sunos4.h: Don't support weak symbols. ! * netbsd.h, svr4.h, i386/freebsd.h, i386/osfrose.h, ! m88k/m88k.h: Define ASM_WEAKEN_LABEL instead of WEAK_ASM_OP. ! * c-pragma.h: Check ASM_WEAKEN_LABEL instead of WEAK_ASM_OP. ! HANDLE_PRAGMA_WEAK is never defined in a tm.h file. ! * c-decl.c (duplicate_decls): Propagate DECL_WEAK. ! * tree.h (DECL_WEAK): New macro. ! (tree_decl): Add weak_flag. ! * varasm.c (assemble_start_function): Declare the symbol weak if appropriate. ! (assemble_variable): Ditto. ! (assemble_alias): Ditto. Mark the decl as written. ! (declare_weak): Check for weak declaration after definition. ! Set DECL_WEAK. ! (weak_finish): Use ASM_WEAKEN_LABEL. ! * libgcc2.c: The C++ free-store management functions are weak ! aliases on targets that always support them. ! Mon May 15 19:01:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * configure (out_object_file): New variable; put value in Makefile. ! * Makefile.in (out_object_file): Use in place of aux-output.o. ! * fold-const.c (const_binop): Don't pass OVERFLOW to force_fit_type ! if type is unsigned. ! Mon May 15 18:48:26 1995 Paul Eggert ! * install.sh (transformbasename): Fix misspelling. ! * tahoe.h (CHECK_FLOAT_VALUE): Fix misspelling of OVERFLOW parameter. ! * i386.h (VALID_MACHINE_{DECL,TYPE_ATTRIBUTE): Fix typo. ! * fx80.h (CHECK_FLOAT_VALUE): Fix misspelled use of parameter. ! * a29k.c (spec_reg_operand): Fix misspelling of `default:'. ! Mon May 15 18:36:41 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k.md (b{eq,ne,ge,lt}0_di): Fixed for non-MOTOROLA syntax. ! * m68k/xm-mot3300.h (alloca): Extern decl added for non-GNU compiler. ! Mon May 15 13:14:29 1995 Per Bothner ! * cppexp.c (cpp_reader): Test for '#' (start of assertion) *after* ! skipping hspace, not before. ! Mon May 15 08:13:54 1995 Pat Rankin (rankin@eql.caltech.edu) ! * vmsconfig.com: Construct options.h and specs.h to #include ! all "*/lang-{options|specs}.h" files found. ! Sun May 14 21:32:49 1995 Doug Evans ! * alpha/alpha.md (movsicc, case NE): Don't generate unrecognizable ! insn. ! (movdicc, case NE): Likewise. ! Sun May 14 15:44:54 1995 Jim Wilson ! * unroll.c (unroll_loop): Make local_regno have size ! max_reg_before_loop. Don't do local register optimization if ! copy_end has no INSN_LUID. ! Sun May 14 10:38:23 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * objc-act.c (start_method_def): Mark _self as possibly unused. ! * configure: Create specs.h and options.h from */lang-specs.h ! and */lang-options.h. ! Set lang_specs_files and lang_options_file variables in Makefile. ! * Makefile.in (lang_{specs,options}_files): New variables. ! (gcc.o): Depends on $(lang_specs_files). ! (toplev.o): Depends on $(lang_options_file); merge two dep lists. ! (distclean): Remove spes.h and options. ! * gcc.c (default_compilers): Remove entries for Ada, C++, Chill, ! and Fortran; #include specs.h instead. ! * toplev.c (lang_options): Remove entries for Ada, C++, and Fortran; ! include options.h instead. ! Sat May 13 23:11:21 1995 DJ Delorie ! * configure (i[345]86-go32-msdos, i[345]86-*-go32): New targets. ! Sat May 13 10:58:38 1995 Jim Wilson ! * loop.c (record_giv): When computing replaceable, use ! back_branch_in_range_p instead of looking for branches to named ! labels. ! * loop.h (back_branch_in_range_p): Declare. ! * unroll.c (back_branch_in_range_p): No longer static. ! Sat May 13 06:47:11 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * combine.c (simplify_shift_count, case LSHIFTRT): Don't merge ! shifts of different modes if first is any right shift. ! Sat May 13 05:39:09 1995 Richard Earnshaw (rearnsha@armltd.co.uk) ! * configure (arm-semi-aout): New configuration. ! * config.sub: Add support for semi-hosted ARM. ! * arm/t-semi, arm/semi.h: New files. ! Fri May 12 21:51:22 1995 Doug Evans ! * flow.c (find_basic_blocks): Only perform n_basic_blocks sanity ! check on first pass, and on second pass ensure it has the correct ! value. ! Fri May 12 19:23:11 1995 Jim Wilson ! * c-typeck.c (build_binary_op): Warn when ~unsigned is compared ! against unsigned, and type promotions result in an unexpected ! answer. ! Fri May 12 19:10:21 1995 Roland McGrath ! * configure (*-*-gnu*): Always use ELF; set tm_file=${cpu_type}/gnu.h. ! * config/i386/gnu.h: Contents replaced with old i386/gnuelf.h. ! * config/i386/gnuelf.h: File removed. ! Fri May 12 17:29:57 1995 Ken Raeburn (raeburn@cygnus.com) ! * m68k/lb1sf68.asm (__IMMEDIATE_PREFIX__): Default to #. ! (IMM): New macro. ! (all code): Use IMM macro instead of hardcoding # for immediate ! operands. ! Fri May 12 16:52:10 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * m68k.c (output_scc_di): New function. ! (extend_operator) : Allow DImode target. ! * m68k.h (HARD_REGNO_MODE_OK): Don't allow d7/a0 as DImode reg pair. ! * m68k.md (tstdi, cmpdi, addsi_lshrsi_31, ashldi_extsi): New patterns. ! (extendqidi2, extendhidi2, extendsidi2): Allow "general_operand" ! instead of "register_operand" 0. ! (adddid_sexthishl32, subdid_sexthishl32, subdi_dishl32): Likewise. ! (adddi_dilshr32): Operand 0 constraint changed from "ro" to "do"; ! Code generation fixed. ! (adddi_mem, subdi_mem): Fixed for "<" and ">" operand 0. ! (adddi3, subdi3): Operand 2 constraint changed from "ao" to "*ao" ! (ashldi_sexthi, ashrdi_const32): Allow only "register_operand" ! instead of "general_operand" 0. ! (ash[lr]di_const, ash[lr]di3): Allow also 8 and 16 as shift count. ! (subreg1ashrdi_const32): Pattern deleted. ! (subreghi1ashrdi_const32, subregsi1ashrdi_const32): New pattern. ! (lshrsi_31): New implementation. ! (scc0_di, scc_di, beq0_di, bne0_di, bge0_di, blt0_di): New patterns. ! ! Fri May 12 16:50:49 1995 Jeffrey A. Law ! * pa.md (bb patterns): Fix bugs in length computation exposed by ! recent branch shortening and genattrtab changes. ! Fri May 12 16:22:27 1995 Ken Raeburn ! * cccp.c (enum node_type): Add T_IMMEDIATE_PREFIX_TYPE. ! (special_symbol): Handle it; emit value of IMMEDIATE_PREFIX. ! (IMMEDIATE_PREFIX): Default to empty string. ! (initialize_builtins): Install __IMMEDIATE_PREFIX__ builtin, ! parallel to __REGISTER_PREFIX__. ! Fri May 12 14:40:03 1995 Pat Rankin (rankin@eql.caltech.edu) ! * cccp.c: #if VMS, don't define `stat' macro to be VMS_stat. ! Compare enums explicitly to 0 to work around VAX C bug. ! (do_include): Cast alloca's value. ! * make-cc1.com (bc_loop): Process comma-separated list rather ! than space-separated one; restore .h suffix stripped by vmsconfig; ! (loop1): More robust handling of directory prefix on file names. ! * vmsconfig.com (TPU makefile.in): Reorganize and reformat code. ! Make generated .opt files have more consistent format (all comma ! separated, excess whitespace eliminated); ! (additional_compiler): New routine. ! (process_makefile): Use it to handle cc1plus via cp/Make-lang.in. ! Fri May 12 13:35:07 1995 Doug Evans ! * arm.h: Replace ARM_REG_PREFIX with REGISTER_PREFIX. ! Replace ARM_COMMENT_CHAR with ASM_COMMENT_START. ! (REGISTER_PREFIX): Define. ! (USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX): Define. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Handle DFmodes only if ! TARGET_HARD_FLOAT. ! (PREDICATE_CODES): Add soft_df_operand. ! * arm.c: Replace ARM_REG_PREFIX with REGISTER_PREFIX. ! Replace ARM_COMMENT_CHAR with ASM_COMMENT_START. ! (arm_asm_output_label): Use USER_LABEL_PREFIX. ! (soft_df_operand): New function. ! * arm.md (movsicc): New pattern. ! (movsfcc, movdfcc, *movsicc_insn, *movsfcc_hard_insn): Likewise. ! (*movsfcc_soft_insn, *movdfcc_insn): Likewise. ! (*movdf_soft_insn): Rewrite. ! (movsi matcher): Fix typo in type attribute. ! Fri May 12 10:25:40 1995 Michael Meissner (meissner@cygnus.com) ! * i386.h (TARGET_RTD): Use MASK_RTD, not MASK_REGPARM. ! (TARGET_SWITCHES): Add -m{,no-}align-double switch. ! (TARGET_OPTIONS): Add -mregparm= switch to set number of registers ! to use for passing arguments. Add -malign-loops= switch to set ! the alignment for loops. Add -malign-jumps= switch to set the ! alignment for code that is jumped to. Add -malign-functions= ! switch to set the initial alignment of functions. ! (TARGET_REGPARM): Delete, in favor of -mregparm= ! (TARGET_SWITCHES): Delete -mregparm, add -mdebug-arg switches. ! (RETURN_POPS_ARGS): Call i386_return_pops_args to do the real work. ! (VALID_MACHINE_DECL_ATTRIBUTE): Define as function call. ! (VALID_MACHINE_TYPE_ATTRIBUTE): Define as function call. ! (COMP_TYPE_ATTRIBUTES): Define as function call. ! (REGPARM_MAX): Maximum number of regs to use for passing arguments. ! (CUMULATIVE_ARGS): Make this a structure, not an int. ! (INIT_CUMULATIVE_ARGS, FUNCTION_ARG{,_ADVANCE}): Call function. ! (FUNCTION_ARG_PARTIAL_NREGS): Likewise. ! (MAX_CODE_ALIGN): Maximum value to align loops/jumps to. ! (BIGGEST_ALIGNMENT): Return 64 if -malign-double, 32 otherwise. ! (ASM_OUTPUT_ALIGN_CODE): Use value of -malign-jumps= switch. ! (ASM_OUTPUT_LOOP_ALIGN): Use value of -malign-loops= switch. ! (toplevel): Declare all new functions and external variables added ! in i386.c. ! * i386.c (i386_regparm_string, i386_regparm): New variables ! for -mregparm= switch to set the number of registers to use for ! passing arguments. ! (i386_align_loops_string, i386_align_loops): New variables for ! -malign-loops= switch to set alignment to use for loops. ! (i386_align_jumps_string, i386_align_jumps): New variables for ! -malign-jumps= switch to set alignment to use for labels that are ! jumped to. ! (override_options): Support new switches. ! (i386_valid_decl_attribute_p): New function to validate decl ! specific attributes. Presently returns 0. ! (i386_valid_type_attribute_p): New function to validate type ! specific attributes. Recognize "stdcall", which says function ! with fixed numbers of arguments is responsible for popping stack, ! "cdecl", which says to use the normal C calling sequence, even if ! -mrtd is used, and "regparm", which specifies the number of ! registers to use for passing arguments. ! (i386_comp_type_attributes): New function, to validate whether ! attributes are compatible. ! (i386_return_pops_args): New function, to return whether or not ! the function pops its argument list or not, taking into account ! -mrtd, and the stdcall/cdecl attributes. ! (init_cumulative_args): Rewrite as a function, taking variable ! argument functions, and regparm support into account. ! (function_arg{,_advance,_partial_nreg}): Likewise. ! (print_operand): Support %J, to print appropriate jump insn. ! * i386.md (decrement_and_branch_until_zero): Define pattern, ! so that loops that count down to zero, don't have an unneeded ! compare after the decrement. Add a general insn recognizer for ! add to a value and compare against zero. ! * i386/go32.h, i386/winnt.h (VALID_MACHINE_DECL_ATTRIBUTE): ! Delete, code folded into the mainline. ! (RETURN_POPS_ARGS): Likewise. ! * i386/winnt.h (ENCODE_SECTION_INFO): The stdcall attribute is now ! stored on the type field, rather than the decl. ! * i386/gas.h (ASM_OUTPUT_ALIGN_CODE, ASM_OUTPUT_LOOP_ALIGN): Use ! i386_align_{loops,jumps} variables to do alignment. ! * i386/osfrose.h, i386/svr3dbx.h: Likewise. ! Fri May 12 12:48:19 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * stor-layout.c (layout_type, case ARRAY_TYPE): Compute length using ! MAX of length and zero if sizetype signed and neither bound constant. ! * i386/gnuelf.h, i386/linux-oldld.h, i386/lynx-ng.h, i386/v3gas.h: ! Use <...> in #include instead of "...". ! * m68k/lynx-ng.h, sparc/lynx-ng.h: Likewise. ! * c-parse.in (myparm): Handle attributes. ! * objc-act.c (unused_list): New variable. ! (build_tmp_function_decl): Call push_parm_decl with new format. ! (start_class): Initialize unused_list. ! (start_method_def): Call push_parm_decl with new format and ! mark _cmp as possibly unused. ! * combine.c (simplify_shift_const): Don't change SHIFT_MODE ! for LSHIFTRT either. ! * unroll.c (unroll_loop): Don't move reg if used in copy_end and ! that is a JUMP_INSN. ! Fri May 12 12:31:37 1995 Doug Evans ! * arm/lib1funcs.asm: New file. ! Fri May 12 11:52:03 1995 Kung Hsu ! * configure (a29k-*-vxworks*): New target. ! * config.sub (vxworks29k): New alias. ! * a29k/t-vx29k: New file. ! * a29k/vx29k.h: New file. ! Fri May 12 11:17:28 1995 Jim Wilson ! * loop.c (check_dbra_loop): When reversing loop when ! no_use_except_counting is false, there must be only one biv. ! Fri May 12 07:10:00 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * unroll.c (unroll_loop): Only use local_regno for pseudos. ! * genattrtab.c (write_test_expr, case MATCH_DUP): Use operands[N] ! instead of JUMP_LABEL (which may not be set). ! (walk_attr_value, case MATCH_DUP): Set must_extract. ! * c-parse.in: Adjust number of shift/reduce conflicts. ! (parm): Support attributes. ! * c-decl.c (push_parm_decl): Pass any attributes to decl_attributes. ! Fri May 12 00:36:26 1995 Per Bothner ! * cpplib.c (skip_quoted_string): Removed - no longer needed. ! (skip_if_group): Use cpp_get_token instead of skip_quoted_string. ! * cpplib.h (struct cpp_reader): Remove start_line field. ! Add multiline_string_line field. ! * cpplib.c (cpp_error_with_line, cpp_warning_with_line, ! cpp_pedwarn_with_line): Take extra column number parameter. ! (macroexpand, cpp_get_token): Fix reporting of unterminated strings. ! (line_for_error): Removed - no longer needed. ! Fri May 12 02:21:34 1995 Jim Wilson ! * mips/svr4-t.h (MD_STARTFILE_PREFIX, MD_EXEC_PREFIX, ! STARTFILE_SPEC, LINK_SPEC): Define. ! * configure (mips-tandem-sysv4): Use t-mips not t-svr4. ! Thu May 11 19:18:54 1995 Per Bothner ! * cpplib.c (line_for_error): Make it work; add extra parameter. ! (skip_quoted_string, cpp_get_token): Update calls to line_for_error. ! (macroexpand): Remember initial line so we can report it if the ! call is unterminated. Also, simplify error logic slightly. ! (do_include): Cast alloca return value, to avoid pcc warning. ! * cppexp.c (parse_number): Cleanup some Cygnus crud for MPW. ! Thu May 11 21:35:23 1995 Torbjorn Granlund ! From Moshier: ! * i960.c (i960_output_ldconst): Let split_double handle DImode. ! (i960_print_operand): Use REAL_VALUE_TO_DECIMAL for decimal strings. ! (i960_output_double, i960_output_float): Likewise; also change arg ! VALUE from `double' to `REAL_VALUE_TYPE'. ! Thu May 11 21:09:25 1995 Per Bothner (bothner@wombat.gnu.ai.mit.edu) ! * cpperror.c (cpp_print_containing_files): Remove some ! Cygnus-local stuff. ! Thu May 11 21:06:47 1995 Doug Evans ! * gcc.c (link_command_spec): Make -nostdlib no longer imply ! -nostartfiles. ! Thu May 11 18:48:57 1995 Paul Eggert ! * c-common.c (convert_and_check): Don't diagnose overflow in constant ! expression merely because conversion overflowed. ! Thu May 11 18:43:59 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-decl.c (grokdeclarator): Use PARM_FLAG to see if should ! make PARM_DECL. ! * c-parse.in (nested_function, notype_nested_function): ! Allow old-style arg definitions (use xdecls). ! * c-decl.c (finish_struct): Properly update DECL_PACKED. ! Thu May 11 15:24:15 1995 Jason Merrill ! * fold-const.c (fold): Also fold CLEANUP_POINT_EXPRs into ! TRUTH_*_EXPRs and into the first operand. ! (operand_equal_for_comparison_p): Also make sure the second operand ! is integral. ! Thu May 11 14:22:03 1995 Ted Lemon ! * config/mips/netbsd.h: New file. ! * config/mips/t-mips-netbsd: New file. ! * config/mips/x-netbsd: New file. ! * configure (mips-dec-netbsd*): Add entry. ! * mips.h (LOCAL_LABEL_PREFIX, USER_LABEL_PREFIX): Define. ! (PUT_SDB_BLOCK_START, PUT_SDB_BLOCK_END, ASM_OUTPUT_LABEL_REF, ! ASM_OUTPUT_INTERNAL_LABEL, ASM_GENERATE_INTERNAL_LABEL, ! ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use them. ! * mips.c (mips_output_lineno): Use LOCAL_LABEL_PREFIX. ! Thu May 11 14:22:03 1995 Stan Cox (gcc@dg-rtp.dg.com) ! * dwarfout.c (output_decl): Don't output DIE for struct or union type ! with no name or with ERROR_MARK for the fields. ! Thu May 11 06:36:34 1995 Michael Meissner (meissner@cygnus.com) ! * flow.c (mark_used_regs): If a SUBREG does not have a REG in the ! SUBREG_REG position, recursively call mark_used_regs, instead of ! segfaulting. ! Thu May 11 06:44:34 1995 Pat Rankin (rankin@eql.caltech.edu) ! * expr.c (do_jump, case EQ_EXPR, NE_EXPR): Fix typo for complex. ! Wed May 10 12:34:46 1995 Michael Meissner ! * configure: Add support for the little endian variant of the ! PowerPC System V.4 and Eabi targets. If the GNU assembler was not ! specified, don't build libgcc.a variants on the PowerPC systems ! that use -mrelocatable, -mlittle, and -mbig. ! * genmultilib: For MULTILIB_MATCHES arguments, map question marks ! into equal signs after spliting the left and right side of ! equivalent options, to all support for options like: -mcpu=403. ! * rs6000/rs6000.md (rs6000_immed_double_const): New function that ! is like immed_double_const, except that it reverses the two words ! in the constant if the target is little endian. ! * rs6000/rs6000.md (floatsidf2): Use rs6000_immed_double_const, ! not immed_double_const. ! (floatunssidf2): Ditto. ! * rs6000/rs6000.h: Add declarations for all functions in rs6000.c. ! * rs6000/sysv4.h (TARGET_SWITCHES): Add -mlittle, -mlittle-endian, ! -mbig, and -mbig-endian for bi-endian support. ! (ASM_SPEC): Pass -mlittle/-mbig to the assembler if it was passed ! to us. ! (LINK_SPEC): If explicit little or big endian support was ! requested, tell the GNU linker to use the appropriate target ! format. ! * rs6000/t-eabi (MULTILIB_*): Build libgcc.a variants for software ! floating point. Remove mrelocatable libgcc.a variant. ! * rs6000/t-eabigas: New file, cloned from t-eabi. Build ! mrelocatable libgcc.a variant in addition to the other variants. ! * rs6000/t-ppc: New file, for PowerPC System V.4 support without ! the GNU assembler. ! * rs6000/t-ppcgas: New file, for PowerPC System V.4 support with ! the GNU assembler. ! * rs6000/eabile.h: New file, little endian eabi config file. ! * rs6000/sysv4le.h: New file, little endian V.4 config file. ! Wed May 10 14:22:28 1995 Doug Evans ! * libgcc1-test.c (main_without__main): Renamed from `main'. ! * Makefile.in (libgcc1-test): Tell the user to ignore warnings. ! * configure: Support --enable-foo, --disable-foo. ! Wed May 10 10:34:00 1995 Lee Iverson ! * unroll.c: Add declarations of static functions. ! (unroll_loop): Renumber regs local to loop for each unrolled iteration. ! Wed May 10 08:27:03 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.c (alpha_set_emit_const): Cleanups to work properly ! when run on 32-bit host. ! * configure: Instead of symlinking tm.h and {h,t,}config.h, ! make them files that #include the proper file; pass to Makefile. ! Pass out_file and md_file to Makefile instead of making symlinks. ! * Makefile.in (out_file, md_file, tm_file, {build,host}_xm_file): ! New symbols, to be overridden by configure. ! (insn-*): Use $(md_file), not md. ! (aux-output.o): Use $(out_file), not aux-output.c. ! ($(MD_FILE)): Rework to use new conventions. ! (gen*.o, bi-*.o): Depend on $(build_xm_file), not hconfig.h. ! (scan.o, fix-header.o, scan-decls.o): Likewise. ! (distclean): Adjust files removed for new convention. ! Tue May 9 19:26:42 1995 Jason Merrill ! * rs6000/rs6000.h (LIBGCC_SPEC): Do link with libgcc when -shared. ! * Makefile.in (STAGESTUFF): Add underscore.c. ! (underscore.c): Rename temporary files to begin with 'tmp-' so that ! they will be removed by 'make mostlyclean'. ! Tue May 9 19:19:55 1995 Mike Stump ! * toplev.c (lang_options): Add new flag -ffor-scope. ! Tue May 9 19:11:47 1995 Lee Iverson (leei@ai.sri.com) ! * objc/init.c (objc_init_statics): Fix missing part of last change. ! Tue May 9 18:25:34 1995 Richard Kenner ! * i386/gnu.h, i386/linux.h, i386/linux-aout.h, i386/lynx.h: ! Use <...> in #include instead of "..." to avoid recursion. ! * i386/netbsd.h, i386/xm-gnu.h, i386/xm-linux.h: Likewise. ! * i386/xm-lynx.h, i386/xm-freebsd.h, i386/xm-netbsd.h: Likewise. ! * m68k/lynx.h, m68k/netbsd.h, m68k/xm-lynx.h: Likewise. ! * m68k/xm-netbsd.h, mips/gnu.h, ns32k/netbsd.h: Likewise. ! * ns32k/xm-netbsd.h, rs6000/lynx.h, rs6000/xm-lynx.h: Likewise. ! * sparc/lynx.h, sparc/netbsd.h, sparc/xm-lynx.h: Likewise. ! * sparc/xm-netbsd.h, vax/netbsd.h, vax/xm-netbsd.h: Likewise. ! Tue May 9 15:52:05 1995 Michael Meissner ! * config.sub: Recognize powerpcle as the little endian varient of ! the PowerPC. Recgonize ppc as a PowerPC variant, and ppcle as a ! powerpcle variant. Convert pentium into i586, not i486. Add p5 ! alias for i586. Map new x86 variants p6, k5, nexgen into i586 ! temporarily. ! Tue May 9 15:43:27 1995 Jason Merrill ! * rs6000/rs6000.h (LINK_SPEC, LIB_SPEC): Don't mess with libg ! if -shared. ! * rs6000/aix41ppc.h (LINK_SPEC): Ditto. ! * rs6000/powerpc.h: Don't emit .extern directives. ! Tue May 9 14:08:09 1995 Jim Wilson ! * sh/lib1funcs.asm (__ashrsi3, __ashlsi3, __lshrsi3): Use .byte ! instead of .word offsets in switch table. ! Tue May 9 11:44:47 1995 Jeremy Bettis ! * objc/sendmsg.c (__objc_send_initialize): Call superclass if object ! does not implement +initialize. ! Tue May 9 02:44:16 1995 Jason Merrill ! * rs6000/xm-rs6000.h (COLLECT_EXPORT_LIST): Define if not ! cross-compiling. ! * rs6000/xm-mach.h: #undef COLLECT_EXPORT_LIST. ! * rs6000/rs6000.h (COLLECT_SCAN_OBJECTS): Lose. ! * collect2.c (collect_exit): Unlink export_file. ! (prefix_from_string): Broken out from prefix_from_env. ! (prefix_from_env): Call it. ! (main): Under AIX, recognize -bE: and -bexport:, and don't ! automatically export everything if we see one. Otherwise, scan the ! objects individually and add all their symbols to an export file to be ! passed to the linker. ! (write_export_file): New function. ! (scan_prog_file): Ignore symbols starting with '.' ! * c-common.c (declare_hidden_char_array): Mark decl artificial. ! Mon May 8 18:13:57 1995 Adam Fedor ! * objc/init.c (_objc_load_callback): Add declaration. ! (__objc_exec_class): Call _objc_load_callback after every Class ! or Category is added. ! * objc/objc-api.h (_objc_load_callback): Add declaration. ! Mon May 8 17:56:28 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expr.c (expand_expr, case INDIRECT_REF): Set RTX_UNCHANGING_P ! if both TREE_READONLY and TREE_STATIC set. ! * c-typeck.c (convert_for_assignment): Don't give errors about ! adding const or volatile unless both sides point to functions. ! Mon May 8 11:48:23 1995 Michael Meissner ! * configure: If ../ld/Makefile, symlink ../ld/ld.new to collect-ld, ! not real-ld. Don't test for $use_collect2 any more. ! Sun May 7 17:52:23 1995 Jason Merrill ! * calls.c (expand_call): Improve -Winline warnings. ! Sun May 7 17:28:27 1995 DJ Delorie (dj@delorie.com) ! * configure.bat: Use "go32" instead of "msdos" for future expansion. ! * i386/go32.h: Add support for win32's stdcall functions. ! * configure.bat: Add ^M to end of each line. ! * i386/config-nt.bat, alpha/config-nt.bat: Likewise. ! Sun May 7 02:12:26 1995 Jason Merrill ! * tree.h (DECL_ARTIFICIAL): New macro. ! * function.c (expand_function_end): Don't warn about unused ! anonymous or artificial parms. ! Fri May 5 18:41:22 1995 Jim Meyering (meyering@comco.com) ! * configure: Fix typo in name of "maintainer-clean". ! Fri May 5 14:58:01 1995 Jeffrey A. Law ! * pa.c (emit_move_sequence): Force problematical constants ! into memory during the reload pass when generating PIC. ! Fri May 5 13:30:33 1995 Doug Evans ! * objc/NXConstStr.m: NXConstantString.h renamed to NXConststr.h. ! Fri May 5 07:10:15 1995 Stephen L Moshier (moshier@world.std.com) ! * real.c (emdnorm, toe64, etoe64): Significand of Intel long double ! denormals is shifted down one bit. ! Fri May 5 07:04:12 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-typeck.c (process_init_element): Don't clear_momentary if ! constructor_stack is not empty. ! * objc/Makefile (SHELL): Now /bin/sh. ! * c-typeck.c (build_binary_op): Also warn about ordered ! comparison of pointer with zero if -Wall. ! * expr.c (do_jump, case EQ_EXPR, NE_EXPR): Properly compare complex. ! Thu May 4 18:01:25 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * objc/Makefile: NXConstantString renamed to NXConstStr. ! * objc/NXConstStr.m: Renamed from objc/NXConstantString.m. ! * objc/NXConstStr.h: Renamed from objc/NXConstantString.h. ! Thu May 4 17:38:21 1995 J.T. Conklin ! * configure (vax-*-netbsd*): New configuration. ! * vax/netbsd.h, vax/xm-netbsd.h: New files. ! Thu May 4 16:39:05 1995 Jason Merrill ! * collect2.c (main): Add check for 'collect-ld', just like ! 'real-ld', except that old versions won't be looking for it in the ! path. Don't look for 'real-ld' in the path anymore. Sigh. ! * collect2.c: #include demangle.h and obstack.h. ! (obstack_chunk_alloc): Define. ! (obstack_chunk_free): Define. ! (generic): Don't define. Don't use. ! (main): Initialize obstacks and demangling. ! * collect2.c (dump_file): Adjust space padding in output to ! maintain tabulation with Solaris ld. Don't demangle if the ! environment variable COLLECT_NO_DEMANGLE is set. ! * collect2.c (main): Redirect the output of the first link and ! demangle it. Don't collect static c/dtors unless USE_COLLECT2 is ! defined. Null-terminate the list of objects. ! (dump_file): New function. ! (file_exists): New function. ! (collect_exit): Renamed from my_exit. Dump and remove the temporary ! ld output file. ! (collect_execute): Break out from fork_execute. Support redirection. ! (fork_execute): Call it. ! (fatal_perror, fatal, error): Make non-static. ! (xcalloc, xmalloc): Don't use generic. ! (xrealloc): Define. ! (collect_wait): Break out for do_wait. Just return the exit status. ! (do_wait): Call it. ! * collect2.c: Check SUNOS4_SHARED_LIBRARIES using #if, not #ifdef. ! * Makefile.in (collect2): Now uses cplus-dem.o and underscore.o. ! (collect2.o): Pass MAYBE_USE_COLLECT2 to compile. ! (underscore.c): Rules for creation. ! * cplus-dem.c, demangle.h: Copy from libiberty. ! Thu May 4 14:12:35 1995 Jim Wilson ! * sdbout.c (plain_type): Pass additional argument to plain_type_1. ! (plain_type_1): New parameter level. Increment it when making ! recursive calls. Force the type to void_type_mode before starting ! a 7th level of recursion. ! * sh.c (general_movsrc_operand, general_movdst_operand): Delete ! references to POST_DEC and PRE_INC. ! * sh.h: Clean up whitespace, comments, etc. ! (TARGET_SH, RTL_BIT, DT_BIT, C_BIT, R_BIT, TARGET_DUMP_RTL, ! TARGET_DUMP_R, TARGET_CDUMP): Delete. ! (TARGET_SWITCHES): Delete -mR, -mc, -mr options. ! (CONST_DOUBLE_OK_FOR_LETTER_P): Delete 'G' contraint. ! (FUNCTION_VALUE): Simplify. ! (REG_OK_FOR_PRE_POST_P, IS_INDEX): Delete. ! (BASE_REGISTER_RTX_P, INDEX_REGISTER_RTX_P): Rewrite to allow ! SUBREGs. ! (GO_IF_LEGITIMATE_INDEX): Delete unused REGNO argument. ! (GO_IF_LEGITIMATE_ADDRESS): Use BASE_REGISTER_RTX_P instead of ! REG_OK_FOR_PRE_POST_P. Don't accept PRE_INC or POST_DEC addresses. ! (PREDICATE_CODES, PROMOTE_MODE): Define. ! Wed May 3 09:57:55 1995 Michael Meissner ! * rs6000/rs6000.md (non power abs insns): If not powerpc, use ! sf/subfc instructions, not subf. ! Wed May 3 08:49:06 1995 Alan Modra ! * protoize.c (gen_aux_info_file): Use strerror #ifdef HAVE_STRERROR. ! Wed May 3 01:06:01 1995 Jeffrey A. Law ! * pa.c (output_call): Fix typo/thinko in last change. ! (output_function_epilogue): Align the data section before ! emitting deferred plabels. ! From Torbjorn: ! * pa.c (before functions): Declare deferred_plabels and ! n_deferred_plabels. ! (output_call): When generating pic, don't use LP and RP. Use 32 bit ! plabel instead. ! (output_function_epilogue): Output plabels accumulated in output_call. ! Tue May 2 17:15:08 1995 Jeffrey A. Law ! * pa.c (hppa_expand_epilogue): Fix thinko in last change. ! Tue May 2 16:54:35 1995 Doug Evans ! * jump.c (jump_optimize, can_reach_end determination): A barrier can ! follow the return insn. ! Tue May 2 12:39:55 1995 Mike Stump ! * fold-const.c (fold): Ensure that we don't alter the expression's ! type when folding CLEANUP_POINT_EXPRs. ! Tue May 2 13:36:08 1995 Michael Meissner ! * expmed.c (emit_store_flag): When creating store flag ! instructions from simpler parts, such as XOR, ABS, etc. do not ! reuse pseudo registers if expensive optimizations, instead create new ! pseudos for each insn result. ! Tue May 2 01:25:29 1995 Jeffrey A. Law ! * pa.c (hppa_expand_epilogue): Correctly handle restore of %rp ! for functions with a stack size of exactly 8kbytes and no frame ! pointer. ! Mon May 1 19:27:08 1995 Jim Wilson ! * sdbout.c (sdbout_one_type): Don't switch to text section if ! in function with section attribute. ! * combine.c (combine_instrutions): Set subst_prev_insn to zero. ! (try_combine, undo_all): Likewise. ! (get_last_value): Return zero if subst_prev_insn set. ! * sparc.h (INIT_TARGET_OPTABS): Move INIT_SUBTARGET_OPTABS to end. ! * Makefile.in (install-dir): chmod a+rx all newly created directories. ! * expr.c (expand_expr, case SAVE_EXPR): Handle the case where ! mode is VOIDmode. ! Fri Apr 28 15:39:38 1995 Per Bothner ! * cpplib.h (cpp_buffer): Note new escape combination "@ ". ! * cpplib.c (macroexpand): Delete "@ " if stringifying. ! (cpp_skip_hspace): Also skip "@ " if input buffer has_escapes. ! (collect_expansion): Cleanup white-space handling. ! (create_definition): Remove all leading spaces, not just first one. ! (cpp_expand_to_buffer): Set has_escapes on resulting input buffer. ! (macroexpand): Set output_escapes during whole function (and ! specifically during calls of macarg). ! (macroexpand): Set "@ " before and after expansion result. ! (push_macro_expansion): Remove unneeded initial "@ ", not " ". ! (cpp_get_token): Remove unneeded "@ " (not " ") at end of expansion. ! (cpp_get_token): Handle "@ ". ! * cpplib.c (read_name_map): Add cpp_reader parameter. Access ! map_list from former (instead of having it be static). ! (open_include_file): Extra parameter (because of above changes). ! (do_include, lookup_import): Update calls of open_include_file. ! * cpplib.c (do_include): Fix memory leak. ! * cpplib.c (delete_assertion): Also delete tokenlist. ! (do_unassert): Don't delete tokenlist (handled by delete_assertion). ! (cpp_cleanup): New function. Frees resources used by a cpp_reader. ! * cpphash.c (cpp_hash_cleanup): New function. ! (delete_macro): Enable commented-out code. ! (file_cleanup): Free actual buffer. ! * cpplib.c (cpp_options): Add map_list. ! * cpplib.h (PARSE_GETC): Removed. Bogus and unused. ! * cppmain.c (main): Remove commented-out code that used PARSE_GETC. ! * cpplib.c: Don't #include . Causes clashes ! on Nextstep (when index/rindex are macros). ! (cpp_grow_buffer, int_parse_file): Cast to U_CHAR*, rather than char*. ! Sun Apr 30 08:11:23 1995 Alan Modra (alan@spri.levels.unisa.edu.au) ! * stdarg.h, varargs.h (va_arg): Don't assume __va_rounded_size (char) ! has the value of 4. ! Sun Apr 30 07:13:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * vax.h (NOTICE_UPDATE_CC): Correctly handle aob insns. ! * expr.c (expand_expr, case CONSTRUCTOR): Don't set target to ! zero if more then one word. ! Pass size and alignment to move_by_pieces_ninsns in bytes, not bits. ! * cse.c (cse_insn): Properly set IN_MEMORY for SET_DEST. ! * tree.c (substitute_in_expr): Preserve TREE_READONLY. ! * c-common.c (enum attrs): Add A_UNUSED. ! (init_attributes): Initialize it. ! (decl_attributes, case A_UNUSED): New case. ! Sat Apr 29 15:42:03 1995 Paul Eggert ! * cccp.c (do_include): Re-fix minor memory leak by using ! alloca instead of xmalloc and free. ! * cccp.c (macarg): Except for reporting error, treat unterminated ! macro call as if it were terminated, since `macroexpand' relies ! on *argptr being filled in. ! Sat Apr 29 06:09:35 1995 Torbjorn Granlund ! * pa.c (output_mul_insn): Simplify, it is never called with ! UNSIGNEDP set. ! * pa.md (divsi3, udivsi3, modsi3, umodsi3): Simplify. ! (ashlsi3): Clean up indentation and commentary. ! Fri Apr 28 12:48:01 1995 Jason Merrill ! * integrate.c (expand_inline_function): Don't emit any notes until ! after we've expanded the actual parameters. ! Fri Apr 28 11:51:06 1995 Stan Cox (gcc@dg-rtp.dg.com) ! * m88k/dgux.h: (ENDFILE_SPEC, LIB_SPEC) Fix crtbegin and crtend ! (SELECT_RTX_SECTION) Put relocatable pic constants in data section ! * m88k/dguxbcs.h: (LIB_SPEC) Likewise ! * m88k/m88k.c: (symbolic_operand) Put relocatable pic constants in data ! * m88k/m88k.h: (FRAME_POINTER_REQUIRED) Add -momit-leaf-frame-pointer ! * m88k/m88k.md: (umulsidi3) Doesn't work for 88110 with mod/div changes ! * m88k/x-dgux: (GCC_FOR_TARGET) tdesc gets mixed up for crtbegin/crtend ! Fri Apr 28 06:36:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-typeck.c (pop_init_level, output_init_element): Pass ! require_constant_* to digest_init. ! * alpha.c (alpha_emit_set_const): Now returns rtx and take MODE arg. ! Rework to use a new pseudo for intermediate values if high opt level. ! Also use expand_{bin,un}op. ! * alpha.h (alpha_emit_set_const): Add declaration. ! * alpha.md (mov[sd]i and splits): Change call to alpha_emit_set_const. ! * reg-stack.c (stack_result): Fix bug in last change. ! Fri Apr 28 01:08:43 1995 Doug Evans ! * objc-act.c: Update calls to start_decl, finish_struct, ! pass NULLs for attributes. ! Thu Apr 27 21:13:14 1995 Doug Evans ! * sparc.md (tablejump): Only if ! TARGET_MEDANY. ! (casesi): New pattern for TARGET_MEDANY case. ! * c-common.c (decl_attributes): Always continue if attribute not found. ! * c-typeck.c (common_type): Call lookup_attribute instead of ! value_member. ! * tree.c (attribute_hash_list): New function. ! (build_type_attribute_variant): Call it. ! (valid_machine_attribute): Handle attributes with arguments. ! (is_attribute_p): New function. ! (lookup_attribute): New function. ! (attribute_in_list): Deleted. ! (attribute_list_contained): Check TREE_PURPOSE and TREE_VALUE. ! * tree.h (valid_machine_attribute): Add prototype. ! (is_attribute_p, lookup_attribute): Likewise. ! * i386/winnt.h (RETURN_POPS_ARGS): Call lookup_attribute. ! (ENCODE_SECTION_INFO): Likewise. ! (CPP_PREDEFINES): Use __stdcall__, __cdecl__. ! (VALID_MACHINE_DECL_ATTRIBUTE): Call is_attribute_p. ! `args' must be NULL. ! Thu Apr 27 21:10:41 1995 David Edelsohn ! * rs6000.md (insv): New anonymous patterns to combine insert with ! arbitrary ashift, ashiftrt, lshiftrt, or zero_extract. (Based on ! patch from John Brooks .) ! (ashlsi3): Remove extraneous operand processing. ! Thu Apr 27 18:47:24 1995 Jim Wilson ! * sh/ashlsi3.c, sh/ashrsi3.c, sh/lshrsi3.c: Delete. ! * sh/lib1funcs.asm (ashiftrt_r4_*): Rewrite for efficiency. ! (ashrsi3, lshrsi3, lshrsi3): Add. ! * t-sh (LIB1ASMFUNCS): Add new functions. ! (LIBGCC2_CFLAGS): Delete. ! (LIB2FUNCS_EXTRA): Remove deleted files. ! (ashlsi3.c, ashrsi3.c, lshrsi3.c): Remove rules for deleted files. ! * stmt.c (expand_return): When returning BLKmode structure, use ! operand_subword instead of doing arithmetic on the register number. ! Also, for structures smaller than word_mode, copy it into a word_mode ! temporary and then subreg it. ! * sparc.md: Delete two define_peepholes which print `bad peephole'. ! Thu Apr 27 16:17:01 1995 Torbjorn Granlund ! * toplev.c (rest_of_compilation): Call shorten_branches even when ! !optimize. ! * final.c (shorten_branches): For non-optimizing compiles, break ! after first pass. ! Thu Apr 27 14:22:50 1995 Michael Meissner ! * i386/linux-oldld.h: New file, that is cloned from linux-aout.h, ! except that it does not pass -m i386linux to the linker. This is ! to support the original Linux ld that is on most distributions. ! * configure (i[345]86-*-linux*oldld*): Use i386/linux-oldld.h as ! the target file. ! Thu Apr 27 08:56:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * tree.c (valid_machine_attribute): Update last change. ! Thu Apr 27 08:06:33 1995 Philippe De Muyter (phdm@info.ucl.ac.be) ! * fix-header.c, cpplib.c: Don't include twice. ! * cpplib.c (cpp_grow_buffer, init_parse_file): Cast {xmalloc,xrealloc} ! for token_buffer to U_CHAR* instead of char*. ! * m68k/x-mot3300: New file. ! * configure (m68k-motorola-sysv*): Use x-mot3300 instead of x-alloca. ! Thu Apr 27 07:04:09 1995 Paul Eggert ! * cccp.c (do_include): Fix minor memory leak. ! * cccp.c (struct argdata): Remove unused `comments' member. ! (macarg): Don't set `comments' member. ! * cccp.c (collect_expansion): Assume leading white space ! already removed. ! Don't allocate unnecessary space for expansion. ! * cccp.c (deps_output): Don't generate overly long output lines. ! Do not invoke self recursively with spacer == 0; this simplifies ! the code a bit. ! Wed Apr 26 19:20:02 1995 Andrew McCallum ! * objc/Object.h: Changed Class * to Class in order to match NEXTSTEP ! and OpenStep runtime. ! * objc/Object.m, objc/Object.h, objc/archive.c, objc/class.c: Likewise. ! * objc/encoding.c, objc/init.c, objc/objc-api.h, objc/objc.h: Likewise. ! * objc/objects.c, objc/runtime.h, objc/selector.c: Likewise. ! * objc/sendmsg.c, objc/typedstream.h: Likewise. ! Wed Apr 26 19:18:52 1995 Pieter Schoenmakers ! * objc/objc-api.h (objc_static_instances): New struct to record ! static instances of a certain class. ! (objc_module): New tag STATICS to point to the table of ! objc_statics_instances. ! * objc/init.c (OBJC_VERSION): Version 7. ! (objc_init_statics): New function. ! (__objc_exec_class): Invoke objc_init_statics if needed. ! * objc/NXConstantString.m, objc/NXConstantString.h: New files. ! * objc/Makefile (OBJC_O): Added bare-bones implementation of ! NXConstantString. ! * objc-act.c (OBJC_VERSION): Version 7. ! (build_objc_string_object): Build a full declaration if not using ! the next runtime. ! (objc_add_static_instance): New function. ! (init_module_descriptor): Add reference to static instances table. ! (build_module_descriptor): Add field for static instances table. ! (get_objc_string_decl): New function. ! (generate_static_references): New function. ! (finish_objc): Call generate_static_references if needed. ! * c-tree.h (finish_decl_top_level): New declaration. ! * c-decl.c (finish_decl_top_level): New function. ! Wed Apr 26 18:04:32 1995 Dirk Steinberg (Dirk.Steinberg@gmd.de) ! * stddef.h: Treat _MACHINE_ANSI_H_ like _ANSI_H_. ! Wed Apr 26 14:09:59 1995 Jim Wilson ! * sparc.h (NEGTF2_LIBCALL): Define. ! (INIT_TARGET_OPTABS): Add support for all TFmode *_LIBCALL macros. ! * optabs.c (init_optabs): Delete all uses of undocumented TImode and ! TFmode *_LIBCALL macros. ! * combine.c (simplify_rtx, case TRUNCATE): Add. Use force_to_mode. ! (force_to_mode, case AND): Allow some simplifications when GET_MODE (x) ! has more bits than HOST_BITS_PER_WIDE_INT. ! * mips/mips.md (truncdiqi2+[456]): Add patterns to simplify ZERO_EXTEND ! of a TRUNCATE. ! Wed Apr 26 13:01:22 1995 Doug Evans ! * sparc.md (memop define_splits): Rewrite to not use memop. ! Preserve MEM_IN_STRUCT_P, MEM_VOLATILE_P, RTX_UNCHANGING_P bits. ! * sparc.c (memop): Deleted. ! (splittable_symbolic_memory_operand): New function. ! (splittable_immediate_memory_operand): New function. ! Wed Apr 26 12:54:26 1995 Jeffrey A. Law ! * configure: Add hppa1.1-hp-lites support. ! Wed Apr 26 08:04:46 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * sh.md (ashrsi2_31): Don't use dead_or_set_p after reload. ! * pyr.md: Remove bad peepholes that improperly use dead_or_set_p. ! * function.c (expand_function_end): Warn about unused parms ! if both -Wunused and -W. ! * tree.h (TYPE_PARSE_INFO): Delete unused field. ! (TYPE_PACKED): Add new macro. ! (struct tree_type): Delete unused field `parse_info'. ! Add new field `packed_flag'. ! * c-tree.h (finish_enum, finish_struct): Add ATTRIBUTES argument. ! * c-common.c (init_attributes): Don't require decl for A_PACKED. ! (decl_attributes, case A_PACKED): Set TYPE_PACKED for type. ! * c-parse.in: Update number of shift/reduce conflicts. ! (structsp): Pass attribute arg to finish_struct. ! Support attributes on enums and pass to finish_enum. ! * c-decl.c (finish_struct): Add ATTRIBUTES argument, call ! decl_attributes and set DECL_PACKED from TYPE_PACKED. ! (finish_enum): Add ATTRIBUTES argument, call decl_attributes, ! and make enum narrow if TYPE_PACKED. ! * print-tree.c (print_node): Print TYPE_PACKED. ! * c-decl.c (init_decl_processing): Don't give builtin__constant_p an ! argument type. ! * expr.c (expand_builtin, case BUILT_IN_CONSTANT_P): A pointer to a ! string constant is a constant. ! * c-typeck.c (output_init_element): Constructor is not simple if ! a bitfield is being assigned a non-integer. ! * c-typeck.c (push_init_level): Update constructor_depth when we ! push spelling level. ! Tue Apr 25 19:50:06 1995 Jeffrey A. Law ! * pa.c (emit_move_sequence): Handle function label arithmetic for ! PIC code generation too. ! Tue Apr 25 18:52:43 1995 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) ! * reg-stack.c (current_function_returns_real): Deleted (unused). ! (FP_mode_reg): Trimmed to a smaller size, less overhead. ! (FP_MODE_REG): New macro over which FP_mode_reg will be accessed. ! (mark_regs_pat, straighten_stack): New functions. ! (reg_to_stack): Amend initialisation of FP_mode_reg. ! Mark FP registers mentioned in USE insns before NOTE_INSN_FUNCTION_BEG. ! (get_true_reg): Eliminate FP subreg accesses in favour of the ! actual FP register in use. ! (record_reg_life_pat): Make it work on SUBREGs as well. Make use of ! the new mark_regs_pat function. Handle USE insns if called unnested. ! (record_reg_life): Don't check for QImode again, we know that it ! is there. Process CALL_INSNs like all other insns, they might `use' ! some FP argument registers if register passing. ! (stack_result_p): Changed in stack_result and returning an rtx. ! (stack_reg_life_analysis): Take a new stackentry state argument. ! Use stack_result and the rtx to mark using mark_regs_pat. This ensures ! that types that need multiple FP registers are handled correctly. ! Delete the no_live_regs shortcut to save space. ! Use stackentry state to determine filled registers. ! (replace_reg): Accept COMPLEX_FLOAT as well. ! (move_for_stack_reg): Optimise away some pointer dereferencing. ! (subst_stack_regs): Make sure the stack is in the right order ! and of the right size for register passing. ! (goto_block_pat): Make sure the stack is in the right order ! to return possible multi-register values from the function. ! (convert_regs): Fix comment about CALL_INSN, it's no longer valid. ! Make sure the stack is of the right size and in the right order ! to return possible multi-register values from the function. ! * function.c (assign_parms): If STACK_REGS is defined, generate USE ! insns before the function body, thus showing which registers are filled ! with parameters. ! * expr.c (expand_builtin_apply_args): Likewise. ! Reverse order of saving registers, more compact code for i387. ! (expand_builtin_apply): Likewise. ! * emit-rtl.c (gen_highpart): Add comment about broken implementation. ! * i386.md (untyped_call): Make it return a complex double. ! * c-parse.in (attrib): Permit null-length argument list to attributes. ! * tree.c (valid_machine_attribute): Use new function attribute_in_list, ! makes sure type_attribute_variants are reused even when attributes have ! parameters. ! Assign any new type to TREE_TYPE (decl). ! (attribute_in_list): New function. ! (attribute_list_contained): Use it. ! * tree.h (attribute_in_list): New declaration. ! Tue Apr 25 18:25:53 1995 Jim Wilson ! * expr.c (struct move_by_pieces): Add to_struct and from_struct fields. ! (move_by_pieces): Set to_struct and from_struct fields. ! (move_by_pieces_1): Set MEM_IN_STRUCT_P of to1 and from1. ! (expand_builtin, case BUILT_IN_MEMCPY): New variable type. ! Set MEM_IN_STRUCT_P of src_mem and dest_mem. ! * Makefile.in (clean): Delete libgcc1-asm.a. ! * m68k/vxm68k.h (CPP_SPEC): Define. ! * c-decl.c (pushdecl): Don't test DECL_EXTERNAL when deciding whether ! to register a duplicate decl in the current block. ! * cross64.h (INIT_ENVIRONMENT): Define as string not putenv call. ! * gcc.c (main): Pass INIT_ENVIRONMENT to putenv. ! * stmt.c (expand_return): When returning BLKmode structure in ! registers, copy it to a psuedo-reg instead of to hard registers. ! Tue Apr 25 15:14:58 1995 Michael Meissner ! * rs6000.h (LEGITIMIZE_ADDRESS): Don't create a DF address using two ! regs if -msoft-float or -mcpu=403. ! Tue Apr 25 15:45:44 1995 Richard Henderson (richard@atheist.tamu.edu) ! * m68k.md (divhi3, udivhi3, modhi3, umodhi3): Deleted ! these insns plus some surrounding trash. ! (divmodhi4, udivmodhi4): Added these insns. ! Tue Apr 25 10:12:40 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.c (alpha_builtin_saveregs): Refine last change to work ! for both stdarg and varargs. ! * tree.c (chain_member_purpose): Make similar to chain_member_value. ! * Makefile.in, configure: Change "realclean" to "maintainer-clean". ! * protoize.c: Removed __NetBSD__ from conditional. ! Declare strerror if HAVE_STRERROR is defined; otherwise ! declare sys_errlist and sys_nerr. ! (my_strerror): New function. ! (errno): Don't define if already defined as a macro. ! * alpha.c (current_file_function_operand): Return false if profiling. ! * expr.c (convert_move): Don't access a hard reg in an invalid ! mode when doing a truncation. ! * alpha.c (add_operand): Test for exactly the constants allowed by ! the constraints. ! * alpha.h (CONST_OK_FOR_LETTER_P, case 'L'): Reject 0x80000000. ! * c-parse.in (initdcl, notype_initdcl): Pass attributes to ! start_decl; delete call to decl_attributes. ! * c-tree.h (start_decl): Two new tree parameters. ! * c-decl.c (start_decl): New args for attributes; call decl_attributes. ! * c-decl.c (duplicate_decls): Don't look at TYPE_ACTUAL_ARG_TYPES ! if it is not set. ! * xm-1750a.h: New file. ! * alpha.c (alpha_builtin_saveregs): Add to incoming args addr ! if less than 6 named args, not less than or equal to. ! Mon Apr 24 15:25:19 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * mips-tfile.c (fatal, error): Make first arg const to avoid warning. ! * stmt.c (expand_end_bindings): Write a BARRIER after call ! to abort in nonlocal handler. ! * stmt.c (expand_decl_init): Call preserve_temp_slots to keep ! around any temp whose address was taken. ! Fri Apr 21 16:26:15 1995 Torbjorn Granlund ! * pa.md (call_internal_reg): Fix typos in length calculation. ! (call_value_internal_reg): Likewise. ! Fri Apr 21 13:17:15 1995 Roland McGrath ! * config/gnu.h (STANDARD_INCLUDE_DIR): New macro. ! * config/mips/gnu.h (STANDARD_INCLUDE_DIR): Macro moved there. ! Fri Apr 21 08:23:58 1995 Tom Quiggle (quiggle@lovelace.engr.sgi.com) ! * toplev.c (lang_options): Add -I for GNAT. ! * gcc.c (default_compilers): Pass -I to gnat1. ! Fri Apr 21 07:58:06 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * tree.c (integer_all_onesp): Test to size of mode, not TYPE_PRECISION. ! * toplev.c (main): Turn on -fforce-mem for -O2. ! * fold-const.c ([lr]rotate_double): Replace; old versions were bogus. ! (fold, shift and rotate): Don't call tree_int_cst_sgn on non-integer. ! (fold, case LROTATE_EXPR): If constant count, convert to RROTATE_EXPR. ! (fold, case RROTATE_EXPR): Sometimes commute logical op with rotate. ! Delete pair of counteracting shifts. ! * combine.c (simplify_logical, case AND): If still an AND, get ! new values for op0 and op1. ! Thu Apr 20 17:52:10 1995 Jim Wilson ! * sh.c: Completely rewritten. ! * sh.h (FAST_BIT, CONSTLEN_2_BIT, CONSTLEN_3_BIT, CONSTLEN_0_BIT, ! TARGET_FASTCODE, TARGET_CLEN3, TARGET_CLEN0, TARGET_OPTIONS): Delete. ! (TARGET_SWITCHES): Delete -mclen3 and -mclen0 options. ! (TARGET_DEFAULT): Is zero. ! (OVERRIDE_OPTIONS): Delete code to set max_count_si and max_count_hi. ! (SPECIAL_REG): New macro. ! (HARD_REGNO_MODE_OK): Allow any mode in any general register. ! (GO_IF_LEGITIMATE_ADDRESS): Delete constant + reg address case. ! (MOVE_RATIO): Define to 2 when TARGET_SMALLCODE. ! (max_si, max_hi, max_count_si, max_count_hi): Delete. ! * sh.md: Delete spurious constraints from all define_expands. ! (rotlsi3_1): Set T reg instead of clobbering it. ! (ashrsi3): Use expand_ashiftrt instead of gen_shifty_op. ! (movsi_i, movhi_i, movsf_i): Add conditions to reject patterns ! needing a reload. ! (movdi-2, movdf_k): Correct conditions to reject patterns needing ! a reload. ! ([inverse_]branch_{true,false}): Pass operands to output_branch. ! (jump): Delete unnecessary braces. ! (call, call_value): Don't use expand_acall. Force operand0 into ! a register. ! Thu Apr 20 12:57:16 1995 Jason Merrill ! * function.c (assign_parms): Use TREE_ADDRESSABLE rather than ! TYPE_NEEDS_CONSTRUCTING to decide whether a parameter needs to be ! passed by invisible reference. ! * calls.c (expand_call): Ditto. Abort if we try to pre-evaluate a ! parameter of TREE_ADDRESSABLE type. ! Wed Apr 19 17:50:24 1995 Torbjorn Granlund ! * pa.h (TARGET_SWITCHES): Fix typo. ! Tue Apr 18 18:06:03 1995 Per Bothner ! * expr.c (store_constructor): Use BYTES_BIG_ENDIAN rather ! than BITS_BIG_ENDIAN to layout bits within bitstring. ! * tree.c (get_set_constructor_bytes): Likewise. ! Tue Apr 18 17:22:46 1995 Per Bothner (bothner@wombat.gnu.ai.mit.edu) ! * config/m68k/{x-hp320,x-hp320g} (FIXPROTO_DEFINES): ! Define _HPUX_SOURCE so putenv and other functions get seen. ! Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com) ! * varasm.c (weak_decls): Make this a unique structure, instead of ! a tree structure. ! (handle_pragma_weak): Don't redeclare asm_out_file. Use new weak ! structure to copy name and value to. Protect name and value by ! copying them to the permanent obstack. ! (declare_weak): Call handle_pragma_weak, instead of duplicating ! the code. ! (finish_weak): Rewrite to use new weak symbols list structure. ! * c-pragma.h: New file to define the c-pragma.c interfaces. ! * c-pragma.c: Include it. ! * varasm.c: Include it. ! * c-lex.c: Include it. ! * cp/lex.c: Include it. ! * varasm.c (handle_pragma_weak): No longer pass output file ! stream, since weak pragmas are delayed until the end of the ! compilation. ! * c-pragma.c (handle_pragma_token): Call handle_pragma_weak ! without file stream argument. ! * Makefile.in (varasm.o, c-lex.o, c-pragma.o): Add dependencies on ! c-pragma.h. ! * config/rs6000.md (movdf): If -msoft-float, do not generate ! memory to memory references, like is already done for the ! -mhard-float case. Remove an extra test for -mhard-float inside ! of -mhard-float code. ! Tue Apr 18 06:19:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * fold-const.c (size_int): Arg is unsigned HOST_WIDE_INT. ! * tree.h (size_int): Likewise. ! Mon Apr 17 23:36:57 1995 Jason Merrill ! * rs6000/aix41.h: Restore March 11th changes, plus ! (ASM_OUTPUT_EXTERNAL): Do add [DS] or [RW], just don't emit ! anything. ! * rs6000/aix3newas.h (ASM_OUTPUT_EXTERNAL): Ditto. ! Mon Apr 17 15:58:52 1995 Per Bothner ! * config/mips/x-iris (FIXPROTO_DEFINES): Add -D_LANGUAGE_C_PLUS_PLUS. ! * config/mips/x-iris6: Likewise. ! * cpplib.c: Rename make_definition to cpp_define. ! * cpplib.h (cpp_define): New declaration. ! * cpplib.c (special_symbol): For T_SPECLINE, calculate __LINE__ ! in enclosing file buffer, not current buffer (if macro expanding). ! (cpp_get_token): Fix thinko (in code for chopping unneeded space). ! Mon Apr 17 11:36:07 1995 Jim Wilson ! * abi64.h (CPP_SPECS): Define and use _ABI64 instead of ! _MIPS_SIM_ABI64. ! (SETUP_INCOMING_VARARGS): Set MEM_IN_STRUCT_P if big endian target. ! * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Define. ! * combine.c (get_last_value): Ignore BARRIER when scanning backwards. ! (move_deaths): New variables before_dead and after_dead. Set them ! to instructions that have valid INSN_CUID values and use in test. ! * combine.c (subst_prev_insn): New variable. ! (try_combine): Set it. ! (get_last_value): Use it. ! * reload.c (find_reloads): Recompute reg_equiv_address from ! reg_equiv_memory_loc before using it. ! (find_reloads_toplev, make_memloc): Likewise. ! * expr.c (expand_builtin, case BUILT_IN_MEMCPY): Call force_operand ! on dest_rtx before returning it. ! * function.c (instantiate_decls): Use temporary allocation if ! DECL_DEFER_OUTPUT is set. ! Sat Apr 15 23:19:03 1995 Jason Merrill ! * aoutos.h (ASM_OUTPUT_DEF): Define instead of SET_ASM_OP. ! * sparc/sunos4.h (ASM_OUTPUT_DEF): Ditto. ! * varasm.c (weak_finish): Don't handle aliases. ! (declare_weak): Ditto. ! (assemble_alias): Handle aliases. ! * c-common.c (enum attrs): Add A_ALIAS. ! (init_attributes): Ditto. ! (decl_attributes): Ditto. ! Sat Apr 15 13:26:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * calls.c (expand_call): Call preserve_temp_slots on temps ! made for BLKmode args returned in registers. ! * pa.c (override_options): Fix typo. ! Sat Apr 15 12:11:46 1995 Brendan Kehoe ! * alpha/alpha.c (output_epilog): Initialize fp_offset to 0, and ! make sure it's non-zero before we try to use it to restore the ! frame pointer. ! Fri Apr 14 19:45:05 1995 Jason Merrill ! * ginclude/va-{clipper,pa,pyr,sparc,spur}.h (va_arg): Reorganize ! to avoid BIND_EXPRs and COND_EXPRs of aggregate type. ! Fri Apr 14 19:31:14 1995 Roland McGrath ! * config/svr4.h (ASM_OUTPUT_SECTION_NAME): Make the section ! read-only executable "ax" if DECL is a FUNCTION_DECL; read-only ! "a" (previously the case always) if DECL is TREE_READONLY; ! otherwise writable "aw". ! Fri Apr 14 18:49:11 1995 Linus Torvalds ! * alpha.md (probe_stack): Probe with write, not read. ! (allocate_stack): Update and correct stack probe code. ! * alpha.c (output_prolog): Changed stack probe at function entry. ! Fri Apr 14 18:42:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * jump.c (delete_insn): When deleting after label, delete ! a BARRIER as well. ! Fri Apr 14 14:40:48 1995 Jason Merrill ! * toplev.c (compile_file): Call weak_finish. ! * c-common.c (enum attrs): Add A_WEAK. ! (init_attributes): Ditto. ! (decl_attributes): Support __attribute__ ((weak)) by ! calling declare_weak. ! * sparc/sunos4.h (HANDLE_PRAGMA_WEAK, WEAK_ASM_OP, SET_ASM_OP): ! Define to support weak symbols with -fgnu-linker. ! * aoutos.h: Ditto. ! * varasm.c (handle_pragma_weak): Add declared weak symbols to ! weak_decls rather than emitting them immediately. ! (declare_weak): Add the indicated declaration to weak_decls. ! (weak_finish): Emit .weak directives for any weak symbols. ! * libgcc2.c: The C++ free-store management functions are weak. ! Fri Apr 14 13:00:29 1995 Michael Meissner (meissner@cygnus.com) ! * rs6000/rs6000.c (output_prolog): For eabi systems, emit main's ! call to __eabi before setting up the minimal TOC used with the ! -mrelocatable support. ! * rs6000/eabi.h (INVOKE__main): Don't define any more, ! output_prolog will emit the call. ! Fri Apr 14 09:09:03 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * alpha.c (call_operand): Any reg is valid for NT. ! (output_prologue): Never need GP for Windows/NT. ! Set SYMBOL_REF_FLAG in current function decl. ! Thu Apr 13 20:19:30 1995 Jason Merrill ! * alpha/xm-alpha.h (HAVE_VPRINTF): Define. ! (HAVE_PUTENV): Define. ! (POSIX): Define. ! Thu Apr 13 19:57:44 1995 Doug Evans ! * emit-rtl.c (gen_sequence): If the insn has a non-null ! CALL_INSN_FUNCTION_USAGE field, output it as a sequence so the ! latter isn't discarded. ! * c-parse.in: Update expected conflict count. ! Thu Apr 13 08:10:20 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * configure.bat: Arg 2 is which machine (i386 or alpha). ! * configure (alpha-*-winnt3*): New configuration. ! * alpha.c: Don't #include stamp.h for WINNT. ! (input_operand, case CONST): Allow ptr_mode and DImode. ! * alpha.h (WINDOWS_NT): Provide default definition. ! (ASM_OUTPUT_INT): Use output_addr_const. ! (ASM_OUTPUT_ADDR_DIFF_ELT): Use .long for NT. ! * alpha.md (calll, tablejump, movsi): New variants for NT. ! * alpha/winnt.h, alpha/xm-winnt.h, alpha/x-winnt: New files. ! * alpha/config-nt.bat, alpha/config-nt.sed: New files. ! * i386/config-nt.bat: Add Ada fragments to Makefile. ! * i386/config-nt.sed: Adjust for deletion of config.run in Makefile.in ! Change version to 2.6.3. ! Add some missing tabs. ! * winnt/winnt.h (TARGET_MEM_FUNCTIONS): Define. ! (LINK_SPEC): Delete "align:0x1000". ! * winnt/xm-winnt.h (OBJECT_SUFFIX): Define. ! * ginclude/stdarg.h, ginclude/varargs.h: Clean up code that ! defines *DEFINED* symbols. ! * configure (a29k-*-sym1*): Same as a29k-*-bsd*. ! * a29k.h (ASM_OUTPUT_SECTION_NAME): New macro. ! Wed Apr 12 14:36:03 1995 Jim Wilson ! * dbxout.c (dbxout_type_fields): Correct arguments to CHARS macro ! in flag_minimal_debug case. ! (dbxout_symbol_name): Use DECL_ASSEMBLER_NAME unconditionally. ! * sdbout.c (sdbout_record_type_name): Correct indentation. ! (sdbout_symbol): Use DECL_ASSEMBLER_NAME unconditionally. ! (sdbout_one_type): Likewise. ! Tue Apr 11 13:24:13 1995 Per Bothner ! * fix-header.c (main): Fix loop over required_functions_list. ! (fatal): Also print inc_filename. ! * cpplib.c (cpp_push_buffer): Added missing initializatuon of buf. ! (cpp_file_buffer): Compare against CPP_NULL_BUFFER, not NULL. ! (finclude): No longer call cpp_push_buffer - let callers do it. ! (do_include): Add call to cpp_push_buffer. ! (push_parse_file): Call cpp_push_buffer early, so initial ! defines can use file and line from a valid cpp_buffer. ! (nreverse_pending): New function. ! (push_parse_file): Use nreverse_pending. ! (push_parse_file): For -include files, just push them in reverse ! order - we don't need to scan them now. ! (cpp_error_from_errno, cpp_perror_with_name): Don't emit extra '\n'. ! Tue Apr 11 13:36:44 1995 Jim Wilson ! * configure (mips-dec-mach3): Add. ! * sh.c (shiftby_operand): Delete. ! * sh.h (TARGET_SWITCHES): -m3 and -m3l also set SH2_BIT. ! (OVERRIDE_OPTIONS): Don't add CPU_SH2 to CPU_SH3 when TARGET_SH3. ! * sh.md (ashlsi3): Use nonmemory_operand as a predicate instead of ! shiftby_operand. Don't use shiftby_operand in the output statement. ! (lshrsi3): Likewise. ! * c-decl.c (poplevel): Do output inline function if ! DECL_ABSTRACT_ORIGIN points to itself. ! * varasm.c (output_constant): Cast assemble_string argument to char *. ! Mon Apr 10 14:29:28 1995 Torbjorn Granlund ! * recog.c (constrain_operands, case 'E'): Make this work like ! constraint character `F' when REAL_ARITHMETIC is defined. ! * regclass.c (record_reg_classes, case 'E'): Likewise. ! * reload.c (find_reloads, case 'E'): Likewise. ! Mon Apr 10 14:30:31 1995 Michael Meissner ! * rs6000/aix3newas.h, rs6000/aix41.h: Eliminate March 11th changes ! to undefine ASM_OUTPUT_EXTERNAL{,_LIBCALL}, since this causes the ! compiler not to bootstrap. ! Mon Apr 10 07:17:39 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cppalloc.c: #include config.h. ! * cppexp.c: Add declarations of xmalloc and xrealloc. ! (cpp_parse_expr): Cast args to bcopy to char *. ! * cpphash.c: Add declaration of xmalloc. ! * cpplib.c (init_parse_options, cpp_reader): Cast args to bcopy, ! bcmp, and bzero to char *. ! (add_import, push_parse_file, init_parse_file): Likewise. ! * c-common.c (enum attrs): New attribute, A_NOCOMMON. ! (init_attribute): Initialize it. ! (decl_attributes): Implement it. ! * varasm.c (make_decl_rtl): Allow section attribute if -fno-common ! or variable is not to be placed in common for some other reason. ! * combine.c (simplify_set): Don't move a SUBREG to dest if it ! is changing the size of a hard reg in CLASS_CANNOT_CHANGE_SIZE. ! * reload.c (find_equiv_reg): If goal is a pseudo that got memory, ! a store into memory makes it invalid. ! * reload1.c (reload_as_needed): Call forget_old_reloads_1 on ! pattern before reg elimination. ! Mon Apr 10 00:26:14 1995 Jeffrey A. Law ! * pa.c (pa_reorg): Bump label use count for each entry in an ! exploded ADDR_VEC. ! Sun Apr 9 09:22:51 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * i386.md (adddi3, subdi3): Need scratch reg whenever operand 0 in ! mem and operands 1 not '0'. ! (subdi3): Don't treat two non-equal MEMs as non-aliasing. ! Sat Apr 8 22:53:38 1995 Jeffrey A. Law ! * pa.c (pa_reorg): Fix typo. ! Sat Apr 8 19:36:36 1995 Michael Meissner ! * rs6000/rs6000.h (SELECT_SECTION): TREE_CODE_CLASS must be called ! with a tree code, not a tree value. ! Sat Apr 8 12:41:01 1995 Mike Stump ! * cpphash.c: Don't use const on compilers that don't support it. ! Sat Apr 8 16:32:22 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * expr.c (expand_increment): Handle case where INCREMENTED ! has a non-trivial conversion. ! Fri Apr 7 19:33:21 1995 Phil Nelson (phil@cs.wwu.edu) ! * ns32k.h (TRAMPOLINE_TEMPLATE, TRANSFER_FROM_TRAMPOLINE): ! Fix assembler syntax errors. ! Fri Apr 7 19:27:23 1995 Pat Rankin (rankin@eql.caltech.edu) ! * cccp.c (VMS_fstat, VMS_stat): New functions. ! Fri Apr 7 19:25:21 1995 Paul Eggert ! * cccp.c (collect_expansion): If traditional, set stringify ! member to SHARP_TOKEN regardless of the value of ! stringify_sharp_token_type. ! Fri Apr 7 07:48:35 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (simplify_unary_operation): #ifdef POINTERS_EXTEND_UNSIGNED, ! handle sign- or zero-extending addresses. ! * optabs.c (init{,_integral,_floating,_complex}_libfuncs): ! Change SUFFIX to "char" to avoid confusion with prototype. ! * explow.c (convert_memory_address): No longer static. ! New arg, TO_MODE. ! Do something special for SYMBOL_REF, LABEL_REF, and CONST. ! (memory_address): Add extra arg to call to convert_memory_address. ! * rtl.h (convert_memory_address): Add extra arg. ! * expr.c (expand_expr, case ADDR_EXPR): Always call ! convert_memory_address when converting; add extra arg. ! * stmt.c (expand_computed_goto): Convert from ptr_mode to Pmode. ! * gcc.c (OBJECT_SUFFIX): Default now ".o", not "o". ! (all specs): Remove "." before %O; use %O in a few missing cases. ! * i386/os2.h (OBJECT_SUFFIX): Delete from here. ! * i386/xm-os2.h (OBJECT_SUFFIX): Move to here; now has period. ! * Makefile.in (STAGESTUFF): Use $(exeext) for executables. ! Fri Apr 7 03:32:29 1995 Richard Stallman ! * config.sub: Accept -lites* as op sys. ! Thu Apr 6 23:08:50 1995 Per Bothner ! * cpplib.c (bcopy, bzero, bcmp): Remove #undefs. ! * cppalloc.c (xcalloc): Re-implement using calloc, ! rather than malloc+bzero. ! * cpplib.c (SELF_DIR_DUMMY): New macro. ! (do_include): Don't pass searchptr to finclude if it is dsp, ! since that is on the stack, and would cause a dangling pointer. ! If handling #include_next, recognize SELF_DIR_DUMMY. ! Fri Apr 7 00:54:24 1995 Jeffrey A. Law ! * pa.h (MACHINE_DEPENDENT_REORG): Define. ! * pa.md (switch_jump): New pattern for jumps which implement ! a switch table. ! * pa.c (pa_reorg): New function to explode jump tables. ! (pa_adjust_insn_length): Account for jumps in switch tables with ! unfilled delay slots. ! Thu Apr 6 14:31:10 1995 Jason Merrill ! * c-typeck.c (build_binary_op): Don't call common_type for ! uncommon pointer types. ! Wed Apr 5 13:53:17 1995 Per Bothner ! Re-write fixproto/fix-header/etc to use cpplib: ! * fix-header.c: Comment out support for adding missing extern "C" ! using #ifdef ADD_MISSING_EXTERN_C instead of #if 0. ! * fixproto: Removed case of required functions. Instead use ... ! * fix-header.c (std_include_table): ... new required-functions table. ! (cpp_file_line_for_message, cpp_print_containing_files, cpp_message): ! New stub functions, to intercept cpplib error message. ! * fixproto: Don't call $CPP, since fix-header now incorporates cpplib. ! * gen-protos.c (fatal, hashf): New functions. ! (main): Use hashf, instead of hash. ! * scan-decls.c (scan_decls, skip_to_closing_brace): Re-write to ! take a cpp_reader* as argument, not a FILE*. ! * scan.h (hash): Make parameter const. ! * scan.c (hash): Removed. ! * scan.c (memory_full, xmalloc, xrealloc): Removed. ! Use functions from cppalloc.c instead. ! * Makefile.in (gen-prtos, fix-header, stmp-fixproto): Update. ! Wed Apr 5 13:24:14 1995 Per Bothner ! * cpplib.c (cpp_get_token): If traditional, return after comment, ! instead of reading more, so end-of-line can be peeked at. ! * cpperror.c (cpp_file_line_for_message, cpp_message): New ! functions, that do the actual printing of error messages. ! (cpp_print_file_and_line, cpp_error, cpp_warning, cpp_pedwarn, ! cpp_error_with_line, cpp_warning_with_line, cpp_pedwarn_with_line, ! cpp_pedwarn_with_file_and_line, cpp_error_from_errno, my_strerror, ! cpp_perror_with_name): Re-write to use cpp_file_line_for_message ! and cpp_message, and move to cpplib.c. ! Tue Apr 4 23:35:49 1995 Roland McGrath ! * config/gnu.h (GNU_CPP_PREDEFINES): Remove -D__HURD__. ! Tue Apr 4 17:15:54 1995 Jeffrey A. Law ! * pa.h (DO_GLOBAL_DTORS_BODY): Fix pointer -> integer assignment ! problem. ! * reorg.c (fill_simple_delay_slots): Don't use a JUMP_INSN ! a the target of another JUMP_INSN to fill a delay slot. ! Mon Apr 3 19:03:48 1995 Torbjorn Granlund ! * cse.c (simplify_unary_operation): Sign-extend constants when ! they have the most significant bit set for the target. ! * m68k.md (umulsi3_highpart): Test for CONST_INT and CONST_DOUBLE, ! not CONSTANT_P. ! (smulsi3_highpart): Likewise. ! * m68k.c (const_uint32_operand): New function. ! (const_sint32_operand): New function. ! * m68k.md (const_umulsi3_highpart): Use const_uint32_operand instead ! of immediate_operand for op3. Delete mode. ! (const_smulsi3_highpart): Analogous change. ! Mon Apr 3 19:03:48 1995 Jim Wilson ! * cse.c (simplify_binary_operation): Sign-extend constants when ! they have the most significant bit set for the target. ! * combine.c (force_to_mode, case PLUS): Sign extend masks that are ! negative in OP_MODE. ! (simplify_and_const_int): Sign-extend constants when they have the ! most significant bit set for the target. ! (merge_outer_ops): Likewise. ! (simplify_shift_const): Likewise. ! Mon Apr 3 18:23:48 1995 Jason Merrill ! * toplev.c (lang_options): Add -f{no-,}repo. ! Mon Apr 3 18:13:15 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * combine.c (nonzero_bits, case REG): Check POINTERS_EXTEND_UNSIGNED. ! (num_sign_bit_copies, case REG): Likewise. ! * explow.c (convert_memory_address): New function. ! (memory_address): Call if it needed. ! (promote_mode, case POINTER_TYPE): Use Pmode and pointer extension. ! (allocate_dynamic_stack_space): Convert size from ptr_mode. ! * expr.c (clear_storage, expand_assignment, store_{expr,constructor}): ! Use ptr_mode instead of Pmode in some places. ! (expand_expr, expand_builtin): Likewise. ! (push_block, store_expr): Convert size to Pmode. ! (expand_expr, case ADDR_EXPR): Convert from Pmode to ptr_mode. ! Mon Apr 3 18:00:52 1995 Jim Wilson ! * explow.c (allocate_dynamic_stack_space): Correct typo in last ! change. ! * sh.c (gen_shifty_op, case ASHIFTRT): Return 0 if shift count is not ! a constant. ! Mon Apr 3 12:17:10 1995 Michael Meissner (meissner@cygnus.com) ! * expmed.c (extract_bit_field): When converting a SUBREG into a ! REG, if the system is big endian, adjust the bit offset ! appropriately. ! Mon Apr 3 00:08:45 1995 Roland McGrath ! * config/i386/linux.h: Include "config/linux.h" instead of ! "linux.h", to avoid recursion. ! Sun Apr 2 23:50:27 1995 Roland McGrath ! * config/i386/gnuelf.h: Include i386/linux.h instead of ! i386/linuxelf.h. ! Sun Apr 2 17:35:10 1995 Jim Wilson ! * cse.c (simplify_relational_operation): Don't simplify A-B for ! compare of A and B when the compare is unsigned. ! Sun Apr 2 08:23:38 1995 Paul Eggert ! * fixincludes (stdio.h): BSDI 2.0 changed the spelling of _VA_LIST_ ! to _BSD_VA_LIST_. ! Sun Apr 2 07:57:28 1995 Richard Kenner ! * i386/xm-bsd386.h: New file. ! * configure (i[345]86-*-bsd*): Add xm_file. ! * gcc.c (default_compilers): Pass -W and -w to gnat1. ! * winnt/winnt.h (STDC_VALUE): Add #undef. ! * i386/winnt.h (LIB_SPEC): Likewise. ! Sun Apr 2 07:55:25 1995 Douglas Rupp (drupp@cs.washington.edu) ! * i386/winnt.h (RETURN_POPS_ARGS, ENCODE_SECTION_INFO): Call ! chain_member_purpose, not chain_member_value. ! (ASM_FILE_START, LIB_SPEC): Move to here. ! * winnt/winnt.h (ASM_FILE_START, LIB_SPEC): Delete from here. ! * tree.c (chain_member_purpose): New function. ! Sat Apr 1 12:19:14 1995 Jason Merrill ! * c-typeck.c (build_binary_op): New variable build_type controls ! type given to expression when created. Set to integer_type_node for ! comparison ops instead of result_type so result_type still holds type ! in which comparison is done. When checking for comparison between ! signed and unsigned, use result_type rather than (possibly shortened) ! type of op0. Don't warn about equality comparison of signed operand ! to unsigned constant that fits in signed type. ! Sat Apr 1 09:47:02 1995 Douglas Rupp (drupp@cs.washington.edu) ! * i386/winnt.h (CPP_PREDEFINES): Add definitions for __stdcall ! and __cdecl. ! * winnt/winnt.h (LIB_SPEC): Add OLDNAMES.LIB. ! * winnt/xm-winnt.h: Remove unneeded #define's for non-ANSI functions. ! * fixinc.winnt: Remove unneeded fixes relating to __stdcall. ! * objc/Makefile (SHELL): New definition. ! Sat Apr 1 08:25:26 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * cse.c (cse_insn): When emitting a BARRIER, don't put it after ! a deleted insn. ! * reload.c (push_reload): Initialize secondary_{in,out}_icode. ! * gcc.c (print_multilib_info): Don't use LAST_PATH if not set. ! Sat Apr 1 08:15:59 1995 Pat Rankin (rankin@eql.caltech.edu) ! * vax.md (extv, extzv): Don't use immediate value for operand 1. ! Sat Apr 1 07:48:29 1995 Yury Shevchuk (sizif@botik.yaroslavl.su) ! * stmt.c (expand_asm_operands): Properly ignore invalid reg in clobber. ! Sat Apr 1 07:02:24 1995 Paul Eggert ! * cccp.c: General code cleanup. ! Add prototypes for static functions. ! Remove unnecessary casts to (char *); add casts to (U_CHAR *). ! Add parentheses suggested by `gcc -Wparentheses'. ! Rename local variables as suggested by `gcc -Wshadow'. ! , , , : New includes. ! , : Include only if defined(RLIMIT_STACK). ! : Include, unless already does. ! (HAVE_FCNTL_H, HAVE_STDLIB_H, HAVE_SYS_TIME_H): New symbols. ! (HAVE_UNISTD_H, STDC_HEADERS, TIME_WITH_SYS_TIME): Likewise. ! (__attribute__, PROTO, VA_START, PRINTF_ALIST, PRINTF_DCL): New macros. ! (PRINTF_PROTO{,_1,_2,_3}, DO_PROTO): Likewise. ! (bcopy, bzero, bcmp): If #defined by configuration file, use that. ! If STDC_HEADERS is defined, use standard C functions. ! If BSTRING is defined, or USG and VMS are not defined, use ! the C library. Otherwise, use my_bcopy, my_bzero, my_bcmp. ! (localtime): Remove no-longer-necessary explicit declaration. ! (getenv, index, rindex): Don't declare explicitly if the ! appropriate system header should declare it. ! (fdopen): Remove no-longer-used declaration. ! (vprintf): Define a subsitute macro if !defined(HAVE_VPRINTF). ! (main): Replace `fdopen (dup (fileno (stdout)), "w"))' ! with `stdout'. ! (get_lintcmd, rescan, create_definition): Use bcmp instead of strncmp ! when both operands are known to be free of null bytes. ! (check_macro_name, compare_defs, collect_expansion): Likewise. ! (do_assert, compare_token_lists, assertion_lookup, do_line): Likewise. ! (skip_if_group, lookup): Likewise. ! (rescan): Remove unused label `startagain'. ! Abort instead of printing nonsense if the stack is corrupted ! when there was an unterminated successful conditional. ! (pcfinclude): Include explicit double-cast through GENERICPTR ! to identify particularly egregious type puns. ! (create_definition, do_define, check_macro_name): Use %.*s ! printf format to avoid painful copying-and-casting. ! (do_once): Return void, not (unused) int. ! (do_ident, do_pragma, do_sccs): Accept extra arguments so that ! all directive-handler's types match. ! (do_sccs): Define only if SCCS_DIRECTIVE is defined. ! (skip_if_group, dump_single_macro): Add `default: break;' to ! keep -Wswitch happy. ! (error, warning, error_with_line, vwarning_with_line, pedwarn): Use ! stdarg/vararg/vfprintf instead of passing bogus char * args around. ! (pedwarn_with_line, pedwarn_with_file_and_line, fatal): Likewise. ! (verror, vwarning, verror_with_line, vwarning_with_line): New fcns. ! (dump_single_macro): Abort if ap points to garbage. ! (make_definition, make_undef, make_assertion): Parameter now char *. ! (xmalloc, xrealloc, xcalloc, savestring, index0): Make sizes size_t ! instead of unsigned; make pointer parameters GENERICPTR, not char *. ! (xcalloc): Use bzero to clear memory instead of using own loop. ! ! Fri Mar 31 08:33:07 1995 Ken Raeburn (raeburn@wombat.gnu.ai.mit.edu) ! ! * longlong.h (umul_ppmm mc68000): Use %# instead of #. ! ! Fri Mar 31 06:37:54 1995 Michael Meissner (meissner@cygnus.com) ! ! * stor-layout.c (layout_decl): Implment -fpack-struct. ! (layout_record): Ditto. ! ! * flags.h (flag_pack_struct): New flag variable. ! ! * toplev.c (flag_pack_struct): New flag variable. ! (f_options): Add -fpack-struct support. ! ! * Makefile.in (stor-layout.o): Add flags.h dependency. ! ! Fri Mar 31 08:40:16 1995 Douglas Rupp (drupp@cs.washington.edu) ! ! * configure (i[345]86-*-winnt3*): Add tmake_file. ! * i386/x-winnt (winnt.o): Deleted. ! * i386/t-winnt: New file. ! ! Fri Mar 31 07:26:37 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * m68k/netbsd.h, m68k/hp3bsd44.h: Remove #include of machine/ansi.h. ! ! * configure (a29k-*-bsd): Set tmake_file to t-libc-ok. ! ! * stmt.c (expand_asm_operands): Properly handle output that can't ! be directly written into. ! ! * c-parse.in (structsp): Correct error in last change. ! * c-common.c (init_attributes): A_FORMAT is only for decls. ! ! Thu Mar 30 18:27:34 1995 Jason Merrill ! ! * libgcc2.c: Remove explicit 0-initializations of static variables. ! ! Thu Mar 30 18:22:39 1995 Fergus Henderson ! ! * c-typeck.c (internal_build_compound_expr): Warn if LHS of comma ! expression has no side effects, or computes value which is not used. ! * stmt.c (make warn_if_unused_value): No longer static. ! * tree.h (warn_if_unused_value): Add declaration. ! ! Thu Mar 30 18:15:11 1995 Jim Wilson ! ! * combine.c (get_last_value): Revert back to use prev_nonnote_insn ! instead of prev_real_insn. Modify test that ignores USE insns. ! ! * rs6000.h (SELECT_SECTION): Apply constant DECL_INITIAL test ! only to DECLs. ! ! * explow.c (allocate_dynamic_stack_space): Test STACK_BOUNDARY against ! BIGGEST_ALIGNMENT at run time instead of at compile time. ! Give MUST_ALIGN macro a value, and test this value in if statements. ! ! Thu Mar 30 08:59:56 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-parse.in: Now have 27 shift/reduce conflicts. ! (attribute_list): Just make chain of all attributes. ! (attrib): Consistently put name as PURPOSE, args, if any, as VALUE. ! (structsp): Allow attributes on any struct or union. ! * c-common.c (enum attrs): New enum class. ! (attrtab, attrtab_idx): New variables. ! (add_attribute, init_attributes): New functions. ! (decl_attributes): Major rewrite. ! * tree.c (valid_machine_attribute): Now receive name and args. ! ! Thu Mar 30 07:20:14 1995 Paul Eggert ! ! * protoize.c: Use the phrase `preprocessing directive' consistently. ! * cccp.c (handle_directive, do_line, skip_if_group): Likewise. ! (output_line_directive): Renamed from output_line_command. ! (no_line_directives): Renamed from no_line_commands. ! ! * cccp.c (rescan): Don't recognize preprocessing directives ! within macro args. Warn if one is found. ! ! Thu Mar 30 06:20:36 1995 H.J. Lu (hjl@nynexst.com) ! ! * configure (i[345]86-*-linux*): Set xmake_file=x-linux, ! tm_file=i386/linux.h, and don't set extra_parts. ! (i[345]86-*-linux*aout*): New configuration. ! (i[345]86-*-linuxelf): Deleted. ! * config/linux{,-aout}.h, config/x-linux, config/xm-linux.h: New files. ! * config/i386/linux-aout.h: New file. ! * config/i386/linux.h: Extensive modifications to use ELF format ! as default. ! (LIB_SPEC): Don't use libc_p.a for -p. don't use libg.a ! unless for -ggdb. ! (LINUX_DEFAULT_ELF): Defined. ! * config/i386/linuxelf.h,config/i386/x-linux: Files deleted. ! * config/i386/xm-linux.h: Just include xm-i386.h and xm-linux.h. ! ! Wed Mar 29 19:09:36 1995 Mike Stump ! ! * libgcc2.c (__throw_type_match): Update to use new calling convention. ! ! Wed Mar 29 14:53:23 1995 Jim Wilson ! ! * gcc.c (process_command): Delete code modifying gcc_exec_prefix. ! (main): Put it here after last use of gcc_exec_prefix. For cross ! compiler, set startfile_prefixes if gcc_exec_prefix is set and ! standard_startfile_prefix is a relative path. ! * combine.c (make_compound_operation, AND case): Undo July 7, 1994 ! change. ! * mips/mips.md (call_internal1, call_value_internal1): Move %* from ! start of assembler output to immediately before the jal. ! * mips/mips.c (function_prologue): Put SDB_DEBUGGING_INFO ifdef around ! code for SDB_DEBUG support. ! (mips_select_rtx_section, mips_select_section): Change rdata_section ! to READONLY_DATA_SECTION and sdata_section to SMALL_DATA_SECTION. ! * mips/mips.h (SMALL_DATA_SECTION): Define. ! ! * reorg.c (mark_referenced_resources): Make setjmp use all registers. ! ! * flow.c (mark_used_regs, case SUBREG): Only fall through to REG case ! if operand is a REG. ! ! * i960/i960.h (TARGET_SWITCHES): Make -mold-align set ! TARGET_FLAG_STRICT_ALIGN. ! (STRICT_ALIGNMENT): Test TARGET_STRICT_ALIGN. ! ! * sh/sh.c (andcosts): Modify costs to match the hardware, and add ! explanatory comments. ! ! * sparc/sol2.h (CPP_PREDEFINES): Add -D__SVR4. ! ! Wed Mar 29 14:30:30 1995 Michael Meissner ! ! * rs6000/rs6000.md (movsf): When moving to/from integer registers, ! don't move floating point to memory if it is being simulated with ! -msoft-float. ! ! Wed Mar 29 06:47:36 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * c-parse.in (initdcl): Only call decl_attributes once. ! * c-common.c (decl_attributes): Clean up test for __mode__. ! ! Tue Mar 28 08:34:37 1995 John Hassey (hassey@dg-rtp.dg.com) ! ! * i386.md (adddi3): Don't treat two non-equal MEMs as non-aliasing. ! ! Tue Mar 28 08:20:49 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * a29k.h (CONSTANT_ADDRESS_P): Provide consistent definition. ! ! Tue Mar 28 07:26:41 1995 Paul Eggert ! ! * cccp.c (do_xifdef, do_endif): Remove unnecessary pointer comparisons. ! ! Mon Mar 27 20:45:15 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! ! * calls.c (expand_call, store_one_arg): Don't set KEEP in calls ! to assign_stack_temp. ! * function.c (preserve_temp_slots): Clear ADDR_TAKEN on item ! that we are preserving. ! ! Mon Mar 27 14:39:35 1995 Ian Lance Taylor ! ! * mips/mips.h (FIRST_PSEUDO_REGISTER): Increment. ! (FIXED_REGISTERS, CALL_USED_REGISTERS): Add new register. ! (MD_REG_LAST): Increment. ! (ST_REG_FIRST, ST_REG_LAST): Increment. ! (HILO_REGNUM): Define. ! (enum reg_class): Add HILO_REG. ! (REG_CLASS_NAMES): Add "HILO_REG". ! (REG_CLASS_CONTENTS): Add HILO_REG initializer, and adjust ST_REGS ! and ALL_REGS initializers. ! (SECONDARY_RELOAD_CLASS): Remove. ! (SECONDARY_INPUT_RELOAD_CLASS): Define. ! (SECONDARY_OUTPUT_RELOAD_CLASS): Define. ! (REGISTER_MOVE_COST): Treat HILO_REG as MD_REGS. ! (REGISTER_NAMES): Add initialization line. ! (DEBUG_REGISTER_NAMES): Add "accum". ! * mips/mips.md: For each instruction which sets HI or LO, clobber ! HILO_REGNUM with (clobber (match_scratch:MODE N "=a")). Change ! each explicit reference to register 66 to register 67. ! (mulsidi3): Change to define_expand. ! (mulsidi3_internal): New name of old mulsidi3. ! (mulsidi3_64bit): New insn. ! (umulsidi3): Change to define_expand. ! (umulsidi3_internal): New name of old umulsidi3. ! (umulsidi3_64bit): New insn. ! (madddi_64bit, umaddi_64bit): New insns. ! (movdi_internal2): Add case for setting HILO_REG to zero. ! (reload_indi, reload_outdi): New define_expands. ! (movsi_internal1, movsi_internal2): Add cases for setting MD_REGS ! to zero, and for setting a general reg to HILO_REG. ! (reload_outsi): New define_expand. ! * mips/mips.c (mips_reg_names): Add "accum". ! (mips_sw_reg_names): Likewise. ! (mips_regno_to_class): Map HILO_REGNUM to HILO_REG. ! (mips_move_1word): Handle moving HILO_REGNUM to a general ! register. Make sure that the normal MD_REG cases aren't used for ! HILO_REGNUM. Handle moving zero to a MD_REG. ! (mips_move_2words): Make sure that the normal MD_REG cases aren't ! used for HILO_REGNUM. Handle moving zero to a MD_REG. ! (override_options): Set mips_char_to_class for 'a' and 'b'. ! (mips_secondary_reload_class): Add in_p argument. Handle ! HILO_REGNUM. ! ! Mon Mar 27 07:16:05 1995 Warner Losh ! ! * gcc.c: Removed __NetBSD__ from conditional. ! Declare strerror if HAVE_STRERROR is defined; otherwise ! declare sys_errlist and sys_nerr. ! (my_strerror): New function. ! ! Fri Mar 24 18:08:14 1995 Jason Merrill ! ! * i386/linux.h (LIB_SPEC): Don't try to link with libraries we ! know only exist in archive form unless -static. ! ! Fri Mar 24 16:12:16 1995 Doug Evans ! ! * Makefile.in (multilib.h): Depend on Makefile, not config.status. ! ! Fri Mar 24 15:01:17 1995 Michael Meissner ! ! * rs6000/rs6000.h (TARGET_MULTIPLE_SET): New target_flags bit that ! indicates -mmultiple or -mno-multiple was explicitly passed by the ! user, and not set as part of the cpu defaults. ! (TARGET_SWITCHES): Set TARGET_MULTIPLE_SET bit for both -mmultiple ! and -mno-multiple. ! ! * rs6000/rs6000.c (rs6000_override_options): If -mmultiple or ! -mno-multiple was explicitly used, don't override the setting with ! the processor default. ! ! Wed Mar 22 21:42:13 1995 Doug Evans ! ! * i960/i960.c (i960_function_arg_advance): Ensure all regs marked ! as used if stack is also used (for va_start). ! (i960_setup_incoming_varargs): Rewrite to be similar to Intel's ! version, but don't allocate reg block unless necessary. ! * ginclude/va-i960.h (varargs va_start): Save g14 explicitly. ! Account for arguments preceding va_alist. ! ! Wed Mar 22 13:24:55 1995 Torbjorn Granlund ! ! * pa.c (singlemove_string): Handle SFmode constants again. Simplify. ! (zdepi_cint_p): Make some variables HOST_WIDE_INT. ! (lhs_lshift_cint_operand): Likewise. ! (output_and): Likewise. ! (output_ior): Likewise. ! ! Wed Mar 22 12:40:09 1995 Jim Wilson ! ! * sh.md (udivsi3): Don't clobber register 6. ! (udivsi3, divsi3, mulsi3_call): Use a pseudo-reg with regclass 'z' ! for output rather than hard register 0. ! (block_move_real): Don't clobber registers 4 and 5. ! ! * mips.c (mips_select_section): Apply constant DEC_INITIAL tests ! only to VAR_DECLs. ! ! Wed Mar 22 03:53:17 1995 Richard Stallman ! ! * config.sub (rm400, rm600): New machine names. ! (sinix5.*, sinix): New os aliases. ! (mips-siemens): Default os to sysv4. ! Mon Mar 20 21:56:47 1995 Per Bothner ! Merged Paul Eggert's patch to cccp.c of Wed Mar 8 18:21:51 1995: ! * cpplib.c (do_include): Fix type typo: pcfbuflimit is char *, not int. ! ! Merged Doug Evans' patch to cccp.c of Mon Feb 27 17:06:47 1995: ! * cpplib.c (do_include): Check for redundant file before opening in ! relative path case. Don't call fstat unnecessarily. ! Merged J.T. Conklin's patch to cccp.c of Wed Feb 22 20:29:31 1995: ! * cpperror.c: Removed __NetBSD__ from conditional. ! Merged Kenner's patch to cccp.c & cexp.y of Tue Sep 20 17:49:47 1994: ! * cppexp.c (struct operation): Make value by HOST_WIDE_INT. ! (cpp_parse_expr): Change return type to HOST_WIDE_INT. ! * cpplib (eval_if_expr): Likewise. ! (do_if, do_elif): Update appropriately. ! * cpplib.h (cpp_parse_expr): Removed, to avoid defining HOST_WIDE_INT. ! Merged Paul Eggert's patch to cccp.c of Mon Aug 8 19:42:09 1994: ! * cpplib.c (create_definition): Warn about `#define a@', since a ! diagnostic is now required (see ISO TC1's addition to subclause 6.8). ! Also warn about `#define is-empty(x) (!x)'. ! Tue Mar 21 00:10:50 1995 Jeffrey A. Law ! * x-pa (CC): Add "-Dbsd4_4". ! Mon Mar 20 18:40:31 1995 Per Bothner ! * toplev.c (print_error_function): New function hook. ! (default_print_error_function): New function. Default value ! of print_error_function. Code moved here from report_error_function. ! (report_error_function): Use print_error_function hook. ! Mon Mar 20 20:27:43 1995 Doug Evans ! * cccp.c (do_xifdef): Handle c++ comments. ! (do_endif): Likewise. ! Mon Mar 20 15:31:45 1995 Jason Merrill ! * configure (i386 configurations): Prepend i386/ to t-crt*. ! Mon Mar 20 07:58:04 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * stmt.c (fixup_gotos): Add missing call from last change. ! * objc/misc.c: Put Alpha-specific decls before #include of runtime.h. ! * alpha.h (EXTRA_SECTIONS): Write zeros first time in .rdata. ! Sat Mar 18 16:37:24 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * flow.c (mark_used_regs, case SUBREG): Set reg_changes_size even ! for integer modes. ! (mark_used_regs): Set reg_changes_size for RHS, if necessary. ! * combine.c (gen_lowpart_for_combine): Set reg_changes_size, if needed. ! * reload.c (push_reload): Reload a SUBREG if paradoxical and ! class is CLASS_CANNOT_CHANGE_SIZE. ! * reload1.c (gen_reload): Handle paradoxical SUBREGs. ! * alpha.h (SECONDARY_{INPUT,OUTPUT}_RELOAD_CLASS): Need GENERAL_REGS ! for paradoxical SUBREG and FLOAT_REGS. ! (SECONDARY_NEEDED_MODE): Use actual mode for 4 bytes or wider. ! * alpha.md (movsi): Allow FP regs and add case for store of FP reg. ! Remove cvtlq from MEM to FP reg case. ! * rtl.h (emit_insns_after): Add declaration. ! * stmt.c (fixup_gotos): Do a cleanup for a block when it is exited ! even if label if not defined yet. ! * function.c (pop_function_context): Fix error in last change; ! reference old value of current_function_decl before we modify it. ! Fri Mar 17 21:57:44 1995 Jason Merrill ! * toplev.c (rest_of_compilation): Handle -Wreturn-type properly ! for inlines we aren't compiling yet. ! Fri Mar 17 21:26:48 1995 Mike Stump ! * libgcc2.c (__register_exceptions): Handle empty tables. ! Fri Mar 17 11:48:31 1995 Douglas Rupp (drupp@cs.washington.edu) ! * i386/winnt.c (winnt_function_prologue): Deleted. ! (gen_stdcall_suffix): New function. ! Thu Mar 16 17:36:52 1995 Jason Merrill ! * svr4.h (LINK_SPEC): If the user did not specify -h name, use the ! output file name, if any. ! * sparc/sol2.h (LINK_SPEC): Ditto. Also, if the user did not ! specify -R path, add an -R for each -L. ! Move SunOS 4-specific assembler switches into the appropriate place. ! * m68k/sun[23].h (ASM_SPEC): Add %{R} %{j} %{J} %{h} %{d2} ! %{keep-local-as-symbols:-L}. ! * i386/sun.h (ASM_SPEC): Add %{R} %{keep-local-as-symbols:-L}. ! * sparc/sparc.h (ASM_SPEC): Ditto. ! * gcc.c (default_compilers): Remove %{R} %{j} %{J} %{h} %{d2} ! %{keep-local-as-symbols:-L} from assembler rules. ! Thu Mar 16 16:58:09 1995 Michael Meissner ! * rs6000/eabi-ctors.c: New file, handle C++ static constructors ! and destructors without requiring anything else from a libc. ! * rs6000/t-eabi (LIB2FUNCS_EXTRA): Build eabi-ctors.c. ! * rs6000/eabi.asm: Do not load up register 2 if there is no .got ! section. Jump to the __do_global_ctors function at the end of ! processing to call C++ static constructors, and it will return to ! __eabi's caller. Use normal volatile registers, instead of saving ! and restoring registers 30 and 31. ! * rs6000/eabi.h (STARTFILE_SPEC): Define as null. ! (LIB_SPEC): Ditto. ! (ENDFILE_SPEC): Ditto. ! (LIBGCC_SPEC): Always look for libgcc.a. ! Thu Mar 16 17:05:14 1995 Richard Kenner ! * stmt.c (warn_if_unused_value, case SAVE_EXPR): New case. ! (warn_if_unused_value, case NOP_EXPR): OK if CALL_EXPR inside. ! * c-common.c (decl_attributes): Allow alignment for TYPE_DECLs. ! * Makefile.in (xsys-protos.h): Fix typo in -U operand. ! Thu Mar 16 13:49:10 1995 Per Bothner ! * cpplib.c, cpplib.h: New files - a C PreProcessor library. ! * cpphash.c, cpphash.h, cppalloc.c, cpperror.c, cppexp.c: ! New files - utility features used by cpplib. ! * cppmain.c: New file - cpp replacement main program for cpplib. ! * Makefile.in: New rules to build cppmain. ! Thu Mar 16 16:11:05 1995 Douglas Rupp (drupp@cs.washington.edu) ! * i386/winnt.h (FUNCTION_PROLOGUE, HAVE_probe, gen_probe): Deleted. ! (ENCODE_SECTION_INFO, VALID_MACHINE_DECL_ATTRIBUTE): New macro. ! Thu Mar 16 15:58:24 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * combine.c (apply_distributive_law, case SUBREG): Fix typo when ! checking for paradoxical SUBREG. ! Wed Mar 15 18:45:08 1995 Doug Evans ! * libgcc1-test.c: Renamed from cross-test.c. ! * Makefile.in (LIBGCC1_TEST): Renamed from CROSS_TEST. ! (all.cross): Delete $(ENQUIRE) dependency. ! (libgcc1-test): Renamed from cross-test. ! Delete unnecessary gcc-cross and $(LIBGCC) dependencies. ! Link with -nostartfiles -nostdlib ! `$(GCC_FOR_TARGET) --print-libgcc-file-name`. ! (libgcc1-test.o): Renamed from cross-test.o. ! Change gcc-cross dependency to xgcc since the latter is used. ! Wed Mar 15 13:49:21 1995 Jason Merrill ! * tree.c (save_tree_status): Now takes a tree 'context' instead of ! a boolean 'toplevel' as an argument. If 'context' is not ! current_function_decl, create a new obstack for the new function. ! Also save inline_obstacks. ! (restore_tree_status): No longer takes a second argument. Also ! restore inline_obstacks. ! (temporary_allocation): Clear inline_obstacks. ! (permanent_allocation): Free up the obstacks in inline_obstacks. ! * function.h (struct function): New fields contains_functions and ! inline_obstacks. ! * function.c (push_function_context_to): Now takes a tree ! 'context' instead of a boolean 'toplevel' as an argument. ! Also save current_function_contains_functions. ! (push_function_context): Pass current_function_decl to it. ! (pop_function_context_from): Takes 'context' instead of 'toplevel'. ! Set current_function_contains_functions properly. ! (pop_function_context): Pass current_function_decl to it. ! Wed Mar 15 14:53:09 1995 Michael Meissner ! * rs6000/rs6000.md (abssi2): Turn into a define_expand. If ! TARGET_POWER, do old code that uses the abs instruction. If not, ! do abs in three instructions, using a temporary register, which ! enables generating more reasonable code for sne. Add a recognizer ! for negative of the absolute value. Add define_splits for the ! PowerPC. ! (sne insn): Add a recognizer for sne on the PowerPc to use two ! instructions, compared to the four generated using the absolute ! value insn. ! Tue Mar 14 18:38:40 1995 J.T. Conklin ! * m68k.md ({add,sub,mul,div}[sdx]f3): Add new patterns for recognizing ! SImode, HImode, and QImode operands. ! Mon Mar 13 18:59:36 EST 1995 David Edelsohn ! * rs6000.h (CPP_SPEC): Add PPC403. ! (processor_type): Add PPC403. ! (RTX_COSTS): Add PPC403. ! * powerpc.h (CPP_SPEC): Add PPC403. ! * sysv4.h (CPP_SPEC): Add PPC403. ! * rs6000.c (processor_target_table): Add PPC403. ! * rs6000.md (define_attr cpu and function units): Add PPC403. ! Mon Mar 13 14:40:23 1995 Michael Meissner ! * rs6000/rs6000.md (call, call_value insns): Do not put a nop ! after a bl instruction on System V.4 and eABI. ! * rs6000/sysv.4 (SUBTARGET_SWITCHES): Add support for ! -mno-traceback to suppress the V.4 traceback word. ! (ASM_DECLARE_FUNCTION_NAME): Don't put out a traceback work if ! -mno-traceback. ! Mon Mar 13 13:36:37 1995 Jason Merrill ! * t-svr4, i386/t-{crtpic,sol2}, m88k/t-svr4, sparc/t-sol2: ! Use -fPIC, rather than -fpic, for building crtstuff. ! Sat Mar 11 17:27:08 1995 Jason Merrill ! * configure: Use aix3newas.h for AIX 3.2.4 and 5. ! * rs6000/aix41.h: Undefine ASM_OUTPUT_EXTERNAL{,_LIBCALL}. ! * rs6000/aix3newas.h: New file. Define ASM_SPEC to -u, and ! undefine ASM_OUTPUT_EXTERNAL{,_LIBCALL}. ! Sat Mar 11 06:42:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * dbxout.c (dbxout_symbol): Properly handle decl whose DECL_NAME ! points to a TYPE_DECL with a zero TYPE_NAME. ! Fri Mar 10 18:18:33 1995 Torbjorn Granlund ! * pa.h (PROMOTE_MODE): Define. ! Fri Mar 10 14:37:58 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * sdbout.c (sdbout_record_type_name): If TYPE_NAME is ! a TYPE_DECL, get name from DECL_NAME. ! Fri Mar 10 14:09:26 1995 Doug Evans ! * arm/riscix.h (SUBTARGET_SWITCHES): Renamed from ! ARM_EXTRA_TARGET_SWITCHES. ! * arm/riscix1-1.h (SUBTARGET_SWITCHES): Likewise. ! * arm.h (SUBTARGET_SWITCHES): Likewise. ! (TARGET_HARD_FLOAT, TARGET_SOFT_FLOAT): Define. ! (TARGET_SWITCHES): Add -msoft-float, -mhard-float. ! (BYTES_BIG_ENDIAN): Delete #ifndef/#endif. ! (CONDITIONAL_REGISTER_USAGE): If -msoft-float, disable fp regs. ! (FUNCTION_VALUE): R16 is return reg only if !-msoft-float. ! (LIBCALL_VALUE): Likewise. ! * arm.md (all fp patterns): Conditionalize on TARGET_HARD_FLOAT. ! (*movsf_soft_insn, *movdf_soft_insn): New patterns. ! Fri Mar 10 13:53:46 1995 Jim Wilson ! * reorg.c (steal_delay_list_from_target): Exit at the top if the ! branch in SEQ is not a single set. ! * sh.md (movdi define_split, movdf define_split): Correct indentation ! and formatting. Make the condition fail if an operand is a MEM ! with an auto-inc address. ! * varasm.c (copy_constant): Copy operand of ADDR_EXPR if it is a ! constant. ! * mips/abi64.h (SETUP_INCOMING_VARARGS): Correct arguments to ! move_block_from_reg call. ! * expr.c (expand_assignment): When offset is zero, make new MEM ! before setting MEM_VOLATILE_P. ! * reload.c (find_reloads, case 'o'): Accept a fully reloaded ! auto-increment address. ! * combine.c (max_uid_cuid): New static variable. ! (INSN_CUID): Call abort if INSN is out of range. ! (combine_instructions): Set max_uid_cuid. Set uid_cuid directly ! instead of through INSN_CUID. ! (get_last_value): Use prev_real_insn instead of prev_nonnote_insn. ! Ignore USE insns generated by combine. ! Fri Mar 10 13:47:08 1995 Rod Barman ! * m68k/fpgnulib.c (__fixdfsi): Catch values < 0.5 in magnitude. ! Fri Mar 10 12:02:33 1995 Ian Lance Taylor ! * fixincludes: Fix `typedef struct term;' on hppa1.1-hp-hpux9. ! Fri Mar 10 05:50:11 1995 Oliver Kellogg (Oliver.Kellogg@RST13.DASA.DBMAIL.d400.de) ! * 1750a.c (sectname): Reverse Init and Normal. ! (print_operand_address, case PLUS): Add case for LABEL_REF. ! (print_operand_address, case LABEL_REF): Split fom SYMBOL_REF. ! (print_operand_address, case CODE_LABEL): New case. ! (ASM_FILE_END): Delete. ! * 1750a.h (FUNCTION_EPILOGUE): Restore stack before freeing local vars. ! (DEFAULT_SIGNED_CHAR): Now 1. ! (DATA_SECTION_ASM_OP): Use pseudo-op for read-only data (later copied). ! (JUMP_TABLES_IN_TEXT_SECTION): Define. ! (ASM_OUTPUT_ASCII): Split into multiple lines if long. ! (ASM_OUTPUT_{CHAR,SHORT,INT,LONG_INT}): Split up. ! (ASM_OUTPUT_COMMON): Call check_section. ! Thu Mar 9 12:46:53 1995 Michael Meissner ! * rs6000.md (movsf): Do not call truncdfsf2 for non PowerPC ! when expanding a store to memory and -msoft-float was used. ! Thu Mar 9 08:51:35 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * c-decl.c (start_function): Handle new parameter ATTRIBUTES. ! * c-tree.h (start_function): Add new parameter. ! * c-lang.c (finish_file): Pass new parm to start_function. ! * objc-act.c (build_module_descriptor, really_start_method): Likewise. ! * c-parse.in (fndef, nested_function): Pass prefix_attributes ! to start_function. ! (setspecs): Save prefix_attributes in declspec_stack. ! (decl rules): Restore prefix_attributes along with current_declspecs. ! (setattrs): Concatenate prefix_attributes to previous value. ! * c-common.c (decl_attributes): Handle prefix and suffix attributes ! the same way. ! * print-tree.c (print_node): Fix typo in printing large INTEGER_CST. ! * varasm.c (assemble_variable): Consistently use DECL_SIZE for ! everything. ! * c-typeck.c (convert_for_assignment): Fix typo in testing for ! pointer to function type. ! * varasm.c (record_constant_1): Handle NON_LVALUE_EXPR. ! Rewrite to use switch instead of if/then/elseif/else. ! Wed Mar 8 18:21:51 1995 Paul Eggert ! * cccp.c (do_include): Fix type typo: pcfbuflimit is char *, not int. ! Wed Mar 8 17:30:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * fold-const.c (force_fit_type): Always propagate OVERFLOW. ! * rtl.def (INLINE_HEADER): Add new "e" field. ! * rtl.h (FORCED_LABELS): New field; other fields adjusted. ! (gen_inline_header_rtx): New parm FORCED_LABELS. ! * emit-rtl.c (gen_inline_header): Add new parm FORCED_LABELS. ! * integrate.c (initialize_for_inline, output_inline_function): ! Handle FORCED_LABELS. ! Wed Mar 8 13:47:20 1995 Jason Merrill (jason@cygnus.com) ! * alpha.h (WORD_SWITCH_TAKES_ARG): Add -rpath. ! (LINK_SPEC): Pass through -taso and -rpath. ! * alpha/osf12.h (LINK_SPEC): Ditto. ! Wed Mar 8 09:59:56 1995 Michael Meissner ! * rs6000/eabi.asm: Rewrite so that the initialized pointers go ! into the .got2 section, which allows eabi.asm to be assembled with ! the -mrelocatable option. Move the data picked up from the bl ! instruction to before the traceback tag. ! * rs6000/sysv4.h (CPP_SPEC): Define _RELOCATABLE if -mrelocatable ! switch is used. ! * libgcc2.c (__new_handler): Don't initialize the pointer variable ! with the address of __default_new_handler, which may not work in ! some shared library mechanisms. ! (__builtin_new): If __new_handler is NULL, call the function ! __default_new_handler. ! Tue Mar 7 17:34:59 1995 Ian Lance Taylor ! * i960.h (PROCESS_PRAGMA): Define. ! (ROUND_TYPE_ALIGN): Pass maximum of COMPUTED and SPECIFIED to ! i960_round_align. ! (ROUND_TYPE_SIZE): Delete. ! * i960.c (process_pragma): Uncomment, and rewrite for gcc 2. ! (i960_round_size): Delete. ! (i960_round_align): Don't adjust suggested alignment downward. ! Restrict alignment to value set by #pragma align. ! Tue Mar 7 12:14:46 1995 Doug Evans ! * configure (sparc64-*-elf): Add crtbegin.o, crtend.o to extra_parts. ! * sparc/sp64-elf.h (TARGET_VERSION): Define. ! (CPP_PREDEFINES): Delete sun, sparc, unix. Delete OS assertions. ! (ASM_SPEC): Define. ! (LINK_SPEC): Delete solaris stuff, this is an embedded target. ! (STARTFILE_SPEC, ENDFILE_SPEC): Define. ! Mon Mar 6 17:54:01 1995 Doug Evans ! * Makefile.in (install-common): Fix typo in installation of cpp. ! Likewise with gcc-cross. ! Mon Mar 6 02:29:05 1995 Jeffrey A. Law ! * pa.md (movsicc): New expander. ! Fri Mar 3 13:34:20 1995 Michael Meissner (meissner@cygnus.com) ! * rs6000/sysv4.h (ASM_SPEC): If -mrelocatable was passed to ! compiler, pass it on to the assembler. ! Fri Mar 3 12:11:28 1995 Ian Lance Taylor ! * fixincludes: Add fixes for VxWorks header files. ! * ginclude/stddef.h: If VxWorks typedef macros are defined, invoke ! them as appropriate. ! Fri Mar 3 05:48:54 1995 Paul Eggert ! * cccp.c (dump_single_macro): Fix typo: % wasn't properly ! doubled in printf formats. ! Thu Mar 2 19:44:02 1995 Jason Merrill ! * expr.c (expand_expr, CLEANUP_POINT_EXPR): Force the operand out ! of memory before running cleanups. ! Thu Mar 2 19:15:24 1995 Paul Eggert ! * cccp.c (rescan): Prevent accidental token-pasting to ! get !=, *=, /=, ==, or ^=. ! Thu Mar 2 15:37:13 1995 Jason Merrill ! * c-typeck.c (build_binary_op): Avoid spurious warning ! comparing enumerator to unsigned variable. ! Thu Mar 2 18:18:38 1995 J.T. Conklin ! * m68k.md (sqrtsf2,sqrtdf2): Use fp precision specifiers. ! Thu Mar 2 18:09:01 1995 Stephen L Moshier (moshier@world.std.com) ! * c-lex.c (yylex, case !NOT_FLOAT): Remove previous change. ! Thu Mar 2 15:26:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * Makefile.in (bootstrap*): Pass new STAGE_PREFIX to recursive makes. ! Wed Mar 1 14:52:16 1995 Ian Lance Taylor ! * i960/i960-coff.h (ASM_FILE_START): Define. ! (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Define. ! (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Define. ! (CTORS_SECTION_FUNCTION, DTORS_SECTION_FUNCTION): Define. ! (INT_ASM_OP): Define. ! (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define. ! * i960/vx960-coff.h (CPP_PREDEFINES): Define. ! (CPP_SPEC): Define. ! (CC1_SPEC): Default to -mca. ! Wed Mar 1 11:10:54 1995 Michael Meissner (meissner@cygnus.com) ! * rs6000/rs6000.c (output_prologue): Do not emit the word that ! gives the PC relative location to the local GOT table for the ! -mrelocatable option here. ! * rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Emit it here. ! * t-eabi (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Build -msoft-float ! and -mrelocatable versions of the library. ! * rs6000/powerpc.h (CPP_PREDEFINES): Define the cpu and machine as ! powerpc, not rs6000. ! * libgcc2.c (_unwind_function): Clone for powerpc, using the ! PowerPC mnemonics. ! * rs6000/rs6000.md (uminsi3, umaxsi3): Silence warnings that ! -2147483648 is too large to fit in a signed integer on 32-bit ! hosts. ! Wed Mar 1 06:48:31 1995 Richard Kenner ! * fold-const.c (decode_field_reference): Don't check TREE_CODE ! of EXP; let get_inner_reference decide if have reference. ! Allow no bit reference if have AND_MASK. ! (all_ones_mask_p): Use tree_int_cst_equal, not operand_equal_p. ! (unextend): New function. ! (fold_truthop): For constant cases, use new function, rework ! conversion, and warn if comparison can never be true. ! * expr.c (store_expr): Do conversion in two steps for promoted lhs. ! See ChangeLog.9 for earlier changes. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ChangeLog.9 gcc-2.7.0/ChangeLog.9 *** gcc-2.6.3/ChangeLog.9 --- gcc-2.7.0/ChangeLog.9 Sun Mar 12 07:49:23 1995 *************** *** 0 **** --- 1,9968 ---- + Tue Feb 28 16:36:58 1995 Michael Meissner + + * rs6000/eabi.asm (__eabi): Correctly reload r30 in the case where + the GOT pointers have to be relocated. + + * rs6000/rs6000.md (floatsidf2, floatunssidf2): Add + TARGET_SOFT_FLOAT conditional dropped in the last change. + (movdf insns): Add -msoft-float varients that do not use 'f' register + constraints. + (movti): On PowerPC, don't clobber the MQ register, since it doesn't + exist. Add abort to default switch case. + (store_multiple, load_multiple): Test for TARGET_POWER instead + of !TARGET_POWERPC to determine whether the MQ register exists. + + Tue Feb 28 14:46:48 1995 Doug Evans + + * configure (extra_headers): Renamed from header_files. + + * toplev.c (rest_of_compilation): Defer output of static inlines + even if not optimizing, they may never be referenced. + + Mon Feb 27 17:06:47 1995 Doug Evans + + * cccp.c (do_include): Check for redundant file before opening in + relative path case. Don't call fstat unnecessarily. + + Mon Feb 27 11:20:29 1995 Jim Wilson + + * mips.md (muldi3_internal): Change dmul to dmult. + + Mon Feb 27 02:30:54 1995 Jeffrey A. Law + + * pa.c (hppa_expand_prologue): Don't save the PIC register into + the stack for functions which have no stack of their own. + + Mon Feb 27 00:43:32 1995 Roland McGrath + + * config/gnu.h (ASM_SPEC): Macro removed. + + Sun Feb 26 20:21:52 1995 Doug Evans + + * reload.c (find_reloads_address): Fix typo in reg+const case. + + Sat Feb 25 10:21:13 1995 Doug Evans + + * gcc.c (print_search_dirs): New variable. + (build_search_list): New function. + (putenv_from_prefixes): Call it. + (option_map): New option --print-search-dirs. + (process_command): Handle it. + (main): Print installation directory and exec/startfile_prefixes if + --print-search-dirs given. + + * Makefile.in (Makefile): Delete config.run afterwards. + (distclean): Delete config.run. + + Sat Feb 25 08:36:40 1995 David Mosberger-Tang (davidm@cs.arizona.edu) + + * alpha.h (ASM_SPEC): Pass -pg to assembler. + (FUNCTION_PROFILER): Do nothing; the assembler does it for us. + + Sat Feb 25 08:24:27 1995 H.J. Lu (hjl@nynexst.com) + + * configure (native_prefix): New; lets some hosts put + files in /usr instead of /usr/local if no --prefix specified. + + Sat Feb 25 08:07:56 1995 David Edelsohn + + * rs6000.h (RTX_COSTS): Add cost of FFS. + + Sat Feb 25 06:52:22 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * mips.c (mips_fill_delay_slot): Fix typo in call to FP_REG_P. + + * cse.c (simplify_unary_operation): If operand mode is VOIDmode + for UNSIGNED_FLOAT and operand looks negative, can't simplify. + + * rs6000.c (low_32_bit_operand): New function. + * rs6000.h (PREDICATE_CODES): Add low_32_bit_operand. + * rs6000.md: Remove unneeded tests on HOST_BITS_PER_INT from + some extra conditions. + Use low_32_bit_operand for (plus:DI (zero_extend:DI ..) ..) cases. + + Sat Feb 25 00:49:29 1995 Roland McGrath + + * config/xm-gnu.h (POSIX): Define this macro. + + * config/gnu.h (GNU_CPP_PREDEFINES): Add missing backslash. + + Fri Feb 24 19:17:29 1995 Jeffrey A. Law + + * configure (hppa1.?-hp-hpux9*): Use hpux9 configuration files. + * pa-hpux9.h, pa-ghpux9.h, pa1-hpux9.h, pa1-ghpux9.h: New + configuration files. + + Fri Feb 24 15:55:33 1995 Jim Wilson + + * reorg.c (relax_delay_slots): When searching for next CODE_LABEL, + use next_real_insn not next_active_insn. + + * stdarg.h, va-*.h, varargs.h (va_end): Expand to a void expression + instead of nothing. + + * sh.h (PACKSTRUCT_BIT, TARGET_PACKSTRUCT): Change to PADSTRUCT. + Add comment saying that the option is not useful. + (TARGET_SWITCHES): Change -mpackstruct option to -mpadstruct. + (STRUCTURE_SIZE_BOUNDARY): Change PACKSTRUCT to PADSTRUCT changing + default value from 32 to 8. + + * dwarfout.c (PUSHSECTION_FORMAT): Add a leading tab. + + * expr.c (expand_expr, case COMPONENT_REF): Don't fetch unaligned + field if we only want its address. + + * i960.c (fp_literal_one, fp_literal_zero): Don't accept VOIDmode. + (i960_output_ldconst): In DFmode code, delete code to handle FP_REG_P + target. In DFmode and SFmode code, delete test for HOST_FLOAT_FORMAT + == TARGET_FLOAT_FORMAT. + * i960.h (REAL_ARITHMETIC): Define. + (LEGITIMATE_CONSTANT_P): Pass argument mode not VOIDmode to fp_literal. + + * i960.h (CC1_SPEC): Don't output implicit -gstabs or -gcoff option + if user gave an explicit one. + * vx960-coff.h (CC1_SPEC): Likewise. + + * dbxout.c (GDB_INV_REF_REGPARM_STABS_LETTER): New macro. + (dbxout_parms): For gdb, output use GDB_INV_REF_REGPARM_STABS_LETTER + for parameters passed by invisible reference in registers. + + * mips.c (mips_secondary_reload_class): Also handle SUBREGs. + * mips.md (madsi): Don't use '+' constraint in a clobber. + (madsi_highpart, umadsi_highpart): Delete. + + * dbxout.c (dbxout_parms): For parameters passed in memory, delete + obsolete code to handle parameters converted and stored back to + the stack slot where they were passed in. + (dbxout_reg_parms): Delete obsolete ifdefed out code. Combine + redundant PARM_PASSED_IN_MEMORY tests. For case where parameter + lives in memory, output stab if it doesn't live where it was passed. + + * sh.c: Correct typos and formatting problems. + (add_constant, current_function_pretend_args_size, + flag_traditional, table_lab): Delete unnecessary declarations. + (sh_cpu): Change type from attr_cpu to processor_type. + (need_slot, output_shift, lshiftrt_insns, howshift, + pop_operand): Delete. + (print_operand, output_branch): Delete calls to need_slot. + (synth_constant): Comment that it doesn't work. + (output_movedouble): Handle PRE_DEC dest not POST_INC dest. + (output_options): Don't use flag_traditional. + (shift_insns): Correct numbers to optimal sequences. + (shift_amounts): New table. + (shift_insns_rtx): New function. + (shiftinsns): Combine LSHIFTRT and ASHIFT cases. + (shiftcosts): Return true costs of shifts instead of estimate of 1. + (gen_ashift): Handle negative shift amounts. Call gen_lshrsi3_m + for single bit LSHIFTRT, and gen_lshrisi3_k for multiple bit shifts. + (gen_shifty_op): Handle negative shift amounts at top. Generate + optimal sequences for ASHIFT and LSHIFTRT. + (find_barrier): Correct pattern for matching mova instructions. + (general_movsrc_operand): Delete redundant test for (MEM LABEL_REF). + Don't reject POST_INC address for size > 4. + (general_movdst_operand): Don't reject PRE_DEC address for size > 4. + * sh.h: Correct typos and formatting problems. + (MODE_DISP_OK_[12]): Delete. + (GO_IF_LEGITIMATE_INDEX): Delete uses of MODE_DISP_OK_[12]. + (RTX_COSTS): Add LSHIFTRT. + (table_lab): Delete declaration. + (enum processor_type): New enum. + (sh_cpu_attr): New macro. + (sh_cpu): Change type to enum processor_type to avoid incomplete + enum type. + * sh.md: Correct typos and formatting problems. + (cpu): Use sh_cpu_attr not sh_cpu. + (adddi3, subdi3, udivsi3-1, divsi3-1, mulsi3_call-1, ashrsi2_16, + ashrsi2_31, dect, casesi_worker): Use arith_reg_operand not + register_operand. + (ashlsi3_n, lshrsi3_n): Enable pattern. Set length correctly. + Use '#' to output it. + (ashlsi3_n+1, lshrsi3_n+1): New patterns to split shifts. + (ashlsi3, lshrsi3): Use shiftby_operand instead of gen_shifty_op. + (lshlsi3_m): New pattern for single bit shifts. + (lshlsi3_k): Only handle multiple bit shifts. + (negc): Use IOR not PLUS to set carry bit. + (push+2, pop+2, movsi_pi, movdi-2, movdf_k-1, movsf_i-1): Delete. + (movsi_i, movqi_i, movhi_i): Delete redundant < and > constraints. + (movsf_i): Delete incorrect < and > constraints. + + Fri Feb 24 13:07:55 1995 Stephen L Moshier + + * i386/i386.md (sinxf2, cosxf2): Define. + + Thu Feb 23 14:14:20 1995 Mike Stump + + * rs6000.h/rs6000.h (RETURN_ADDR_RTX): Add definition to support + __builtin_return_address and __builtin_frame_address on the + rs6000. This is necessary to support exception handling in g++ on + the rs6000. + + Thu Feb 23 15:23:26 1995 Michael Meissner + + * rs6000/rs6000.h (TARGET_SWITCHES): All -mpower switches set + -mmultiple by default. Rename -mno-fp-regs to -msoft-float and + -mfp-regs to -mhard-float. + (TARGET_NO_FPR): Rename all occurances of macro to be either + TARGET_HARD_FLOAT or TARGET_SOFT_FLOAT. + (FUNCTION_VALUE): If -msoft-float, floating point gets returned in + register 3. + (LIBCALL_VALUE): Ditto. + (USE_FP_FOR_ARG_P): Don't use floating point registers if + -msoft-float. + (MOVE_MAX): Use TARGET_MUTIPLE instead of TARGET_POWER to decide + to move 16 bytes at a time. + (GO_IF_LEGITIMATE_ADDRESS): Don't allow index + base register + addresses for DF's if -msoft-float. + + * rs6000/rs6000.c (POWER_MASKS): Or in MASK_MULTIPLE. + (processor_target_table): Set MASK_MULTIPLE for Power CPUs and + don't set it for PowerPC CPUs. + (output_prolog): If -mrelocatable and a GOT pool is used, mark the link + register as being live. Load the GOT address via a bl instruction. + (output_toc): If V.4 semantics, make the TOC label be the difference + from the start of the TOC section, rather a label the assembler has to + recognize as being an offset. + + * rs6000/rs6000.md (all floating point ops): For all operations, + check if floating point is allowed. + (movti): Use TARGET_MULTIPLE to decide whether to expand movti + instead of TARGET_POWER. + + * rs6000/sysv4.h (SUBTARGET_SWITCHES): Move here from eabi.h, so the + various macro overrides don't have to be recoded for eabi as well + as System V.4. Add -mstrict-align to set STRICT_ALIGNMENT to 1. + Add -mrelocatable to specify that that the data/text sections may + be copied elsewhere, but not true V.4 style PIC. + (TOC_SECTION_FUNCTION): Handle TARGET_RELOCATABLE. + (TOC_SECTION_ASM_OP): Put quotes around ".got". + (MINIMAL_TOC_SECTION_ASM_OP): Put quotes around ".got1". + + * rs6000/eabi.h (SUBTARGET_SWITCHES): Move to rs6000/sysv4.h. + (MINIMAL_TOC_SECTION_ASM_OP): Use ".got2" section if + -mrelocatable. + + * rs6000/eabi.asm: New file to load up register 2 or relocate the .got2 + addresses. Called from main. + + * rs6000/t-rs6000: Build two libgcc.a's, one for normal use, and one + used when compiling with -msoft-float. + + * rs6000/t-eabi: New file, build two libgcc.a's, one for normal use, + and one used when compiling with -msoft-float. Add support for eabi + module to relocate the .GOT2 section to support -mmultiple. + + * configure (powerpc-*-eabi*): Use t-eabi, not t-rs6000. + + Thu Feb 23 06:58:46 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Makefile.in (ld): Add missing backslash to make continuation line. + + * i386/winnt.c (gen_stdcall_suffix): Deleted. + * winnt/winnt.h (MODIFY_ASSEMBLER_NAME): Deleted. + (VALID_MACHINE_DECL_ATTRIBUTES): Deleted. + * varasm.c (make_decl_rtl): Remove reference to MODIFY_ASSEMBLER_NAME. + + * alpha.h (RTX_COSTS): Update costs for FP operations. + + Thu Feb 23 00:13:05 1995 Jason Merrill + + * c-typeck.c (build_binary_op): Warn if, in a comparison, a signed + operand that might be negative is converted to unsigned. + + Wed Feb 22 21:32:48 1995 Peter Schauer (Peter.Schauer@regent.e-technik.tu-muenchen.de) + + * config/svr4.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): New macro. + + Wed Feb 22 20:29:31 1995 J.T. Conklin + + * configure (*-*-netbsd*): Set tmake_file to t-libc-ok. + + * config/xm-netbsd.h, i386/xm-netbsd.h, m68k/xm-netbsd.h: New files. + * sparc/xm-netbsd.h: New file. + * ns32k/xm-netbsd.h: Changed to use config/xm-netbsd.h and + ns32k/xm-ns32k.h. + * configure (i386-*-netbsd*): Use i386/xm-netbsd.h. + (m68k-*-netbsd*): Use m68k/xm-netbsd.h. + (sparc-*-netbsd*): Use sparc/xm-netbsd.h. + + * cppp.c, collect2.c: Removed __NetBSD__ from conditional. + * collect2.c: Declare strerror if HAVE_STRERROR is defined; + otherwise declare sys_errlist and sys_nerr. + + Wed Feb 22 19:07:08 1995 Niklas Hallqvist (niklas@appli.se) + + * Makefile.in (libgcc1.a): Run ranlib. + + Wed Feb 22 18:46:50 1995 Yury Shevchuk (sizif@botik.yaroslavl.su) + + * explow.c (memory_address): Add missing "else". + + Wed Feb 22 15:29:58 1995 Jason Merrill + + * collect2.c (libselect): New function for passing to scandir. + (libcompare): Ditto. + (locatelib): Use scandir to look for libraries with matching version + numbers. + + Wed Feb 22 18:27:14 1995 Paul Eggert + + * cccp.c (enum sharp_token_type): New type. + (stringify, raw_before, raw_after): Use this type instead of char. + (collect_expansion, dump_single_macro): Keep track of white space + after # and around ## tokens, since the C Standard requires a + diagnostic if the white space doesn't match during a redefinition. + (sharp_token, sharp_sharp_token): Labels renamed from hash_token and + hash_hash_token for naming consistency. + + Wed Feb 22 17:37:12 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * gcc.c (SWITCH_TAKES_ARG): Add `x'. + (process_command): -Wl, -Xlinker, and -lm values always go to + linker even if -x was specified. + + Wed Feb 22 09:33:36 1995 Jason Merrill + + * fold-const.c (fold): Support folding CLEANUP_POINT_EXPRs into + arithmetic expressions. + + Wed Feb 22 08:40:30 1995 David Edelsohn + + * rs6000.c (print_operand, case 'H', 'S'): Delete unused. + + * rs6000.md (ffssi2): Use gpc_reg_operand predicate. + (Some maskir patterns): Likewise. + (ffsdi2): Likewise. + + * rs6000.md (movsfcc, movdfcc): New standard patterns. + (fselsfsf4, fseldfsf4, fseldfdf4, fselsfdf4): Name and create + variants of existing anonymous patterns for movsfcc and movdfcc. + + Wed Feb 22 08:10:36 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * final.c (output_asm_name): New function, using code taken + from output_asm_insn. + (output_asm_insn): If flag_print_asm_name, print the comment + after the first assembler instruction even in multi-instruction + templates. + + Wed Feb 22 07:04:25 1995 Ian Lance Taylor (ian@cygnus.com) + + * real.c (REAL_WORDS_BIG_ENDIAN): New macro. Define as either + FLOAT_WORDS_BIG_ENDIAN or HOST_FLOAT_WORDS_BIG_ENDIAN. Use it + instead of FLOAT_WORDS_BIG_ENDIAN. + + Wed Feb 22 07:03:39 1995 Stephen L Moshier (moshier@world.std.com) + + * final.c (split_double): Handle CONST_INT that holds both words. + * i386.c (output_move_double): Let split_double extract any + constant in op 1; take size from op 0. + + * real.c (m16m, edivm, emulm): Change `short' to `EMUSHORT', and `long' + to `EMULONG'. + Clean up comments. + + Wed Feb 22 00:52:40 1995 Jeffrey A. Law + + * pa.h (ASM_DECLARE_FUNCTION_NAME): Handle invisible reference + arguments passed in registers. + + Tue Feb 21 19:03:09 1995 Douglas Rupp (drupp@cs.washington.edu) + + * Makefile.in ($exeext, $objext, $oldobjext): New macros. + * Makefile.in: Copy config.status to config.run and then execute. + * configure, Makefile.in: Try a "cp" if "ln" fails. + * objc/Makefile: Added {} around file variable. + + * c-parse.in: New rules to allow attributes in a prefix position. + * c-tree.h (decl_attributes): Added argument. + * c-decl.c (grokdeclarator): Added code to support machine attributes. + * c-common.c (decl_attributes): Add third argument prefix_attributes. + (valid_machine_attribute): Deleted; moved to tree.c. + * tree.h (union tree_decl): New field MACHINE_ATTRIBUTES. + (DECL_MACHINE_ATTRIBUTES): New macro. + * c-decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to + descendent typedef; make duplicate typedefs that are identical + generate a warning if they are both in system header files. + (redeclaration_error_message): Make duplicate typedefs that + are identical not an error if they are both in system header files. + * print-tree.c (print_node{,_brief}): Print machine attributes. + + * calls.c (emit_call_1): Added function declaration node argument + passed to RETURN_POPS_ARGS; also effects calls to emit_call_1. + * function.c (assign_parms): Added arg to RETURN_POPS_ARGS. + * 1750a.h, a29k.h, alpha.h, arm.h, clipper.h, convex.h: Likewise. + * dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h, i370/mvs.h: Likewise. + * i386.h, i386/isc.h, i386/next.h, i386/sco.h: Likewise. + * i386/scodbx.h, i860.h, i960.h, m68k.h, m88k.h, mips.h: Likewise. + * ns32k.h, pa.h, pdp11.h, pyr.h, romp.h, rs6000.h, sh.h: Likewise. + * sparc.h, spur.h, tahoe.h, vax.h, we32k.h: Likewise. + + * cccp.c (main): Don't set "Include" environment variable for NT. + * protoize.c: Added #ifdef's WINNT. + * toplev.c (get_run_time): Return an approximate value for NT. + * gbl-ctors.h, libgcc2.c (atexit): Prototype now works with NT. + * gcc.c (fix_argv): Rewrite. + + * i386/winnt.c: New file + * winnt/ld.c (expand_lib): Look for both libfoo.a and foo.lib. + Modified to support linking with Windows NT graphics libraries. + * i386/winnt.h, x-winnt: Support NT Graphics programs; also bug fixes. + * winnt/winnt.h (CPP_SPEC): Accept c++ style comments. + * winnt/xm-winnt.h: Reflect features/functions available in NT. + + * fixinc.winnt: New file. + * configure (i[345]86-*-winnt): Add fixincludes and extra_objs. + * config-nt.bat: Deleted. + * configure.bat: Take arg specifying msdos or winnt batch file config. + * i386/config-nt.{bat,sed}: Updated to Windows NT 3.5. + + * ginclude/stdarg.h, ginclude/varasgs.h: Test _VA_LIST_DEFINED macro. + * ginclude/stddef.h: Test _SIZE_T_DEFINED and _WCHAR_T_DEFINED. + * ginclude/varargs.h: Modifed to work with Windows NT. Needed a + _VA_LIST_DEFINED macro. + + * tree.c: (chain_member_value, decl_attribute_variant): New functions. + (valid_machine_attribute): Moved here from c-common.c. + + * varasm.c (make_decl_rtl): Call MODIFY_ASSEMBLER_NAME if defined. + + Tue Feb 21 12:40:05 1995 Jeffrey A. Law + + * local-alloc.c (block_alloc): Stop looping over the input + operands once we find an input/output register pair which can + be combined into a single qty. + + * integrate.c (finish_inline): Don't set DECL_INLINE. + + Tue Feb 21 10:19:51 1995 Michael Meissner + + * toplev.c (lang_options): Move fortran switches here, fixing bad + patch. + + Tue Feb 21 07:30:11 1995 Stephen L Moshier (moshier@world.std.com) + + * rs6000.c (output_toc): Use REAL_VALUE_* macros. + * rs6000.h (REAL_ARITHMETIC): Define. + + Tue Feb 21 06:48:41 1995 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * stmt.c (expand_value_return): Make function static. + + Tue Feb 21 06:42:33 1995 Paul Eggert + + Add support for ISO Normative Addendum 1 to the C Standard. + * ginclude/iso646.h: New file. + * Makefile.in (USER_H): Add iso646.h. + * c-lex.c (yylex): Add support for <: :> <% %> digraphs. + * cccp.c (rescan): Add support for %: and %:%: digraphs. + (collect_expansion, skip_if_group, dump_single_macro): Likewise. + (union hashval): Remove ival member; it doesn't suffice for `199409L'. + (special_symbol): Use cpval instead of ival for T_CONST macros. + (install): Remove ivalue argument, since string value now suffices. + All callers changed. + (initialize_builtins): Switch from int to string values for T_CONST. + If not traditional, initialize __STDC_VERSION__ to 199409L. + (STDC_VALUE): Remove no-longer-used configuration macro. + + Tue Feb 21 06:16:37 1995 Franz Korntner (fkorntne@bazis.nl) + + * gcc.c (read_specs): Use length read when inserting zero. + + * c-lex.c (yylex): For float, build constant in long double. + + Tue Feb 21 05:57:42 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * toplev.c (lang_options): Add options for Fortran. + + * gcc.c (default_compilers): Add entries for .f and .F. + + Tue Feb 21 05:37:21 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * gcc.c (default_compilers): Remove rule for ".ada". + Pass .ads or .adb suffix to -dumpbase, depending on input filename. + + * toplev.c (compile_file): Initialize input_file_stack before + calling lang_init, not after. + * c-lex.c (check_newline): Give warning if unrecognized data on #line. + (yylex): Give error for unterminated string constant. + + Mon Feb 20 14:46:56 1995 Per Bothner + + * varasm.c (output_constant): Strip NOP_EXPRs for SET_TYPE too, + by using AGGREGATE_TYPE_P macro. + + Mon Feb 20 14:39:57 1995 Per Bothner + + * config/svr4.h (ASM_OUTPUT_SOURCE_LINE): Use assemble_name. + + Mon Feb 20 15:26:05 1995 Doug Evans + + * config.sub (sun4sol2): Alias for sparc-sun-solaris2. + + Sat Feb 18 16:15:33 1995 Mike Stump + + * libgcc2.c (__unwind_function): New function to support stack + unwinding on rs6000 for g++ exception handling. + + Sat Feb 18 13:55:02 1995 Per Bothner + + * tree.h (get_set_constructor_bytes): Fix prototype. + * varasm.c (output_constructor): Fix typo byte_size -> size. + + Sat Feb 18 12:36:12 1995 Doug Evans + + Lynx patches from various Cygnus people. + * config.sub: Recognize lynx* as lynxos. + * configure (i386-lynx): Set xm_file to i386/xm-lynx.h + Set tmake_file to i386/t-i386bare. + (m68k-lynx): Set xm_file to m68k/xm-lynx.h. + Set tmake_file to m68k/t-lynx. + (rs6000-lynxos*): New target. + (sparc-lynxos*): Set xm_file to sparc/xm-lynx.h. + Set tmake_file to sparc/t-sunos41. + * config/lynx.h (LIB_SPEC, STARTFILE_SPEC): Update to LynxOS 2.2.2. + (FUNCTION_PROFILE): Undef. + * config/xm-lynx.h (HOST_BITS_PER_CHAR): Delete. + (HOST_BITS_PER_{SHORT,INT,LONG,LONGLONG}): Likewise. + (mktemp): Provide our own, lynx's definition isn't standard. + * i386/t-i386bare (LIBGCC1): Define to empty instead of libgcc1.null. + (CROSS_LIBGCC1): Likewise. + * i386/xm-lynx.h: New file. + * m68k/lynx.h (FUNCTION_VALUE): Redefine. + (LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P, NEEDS_UNTYPED_CALL): Likewise. + * m68k/t-lynx: New file. + * m68k/xm-lynx.h: New file. + * rs6000/lynx.h: New file. + * rs6000/rs6000.h (SUBTARGET_OVERRIDE_OPTIONS): Define. + (OVERRIDE_OPTIONS): Call it. + * rs6000/x-lynx: New file. + * rs6000/xm-lynx.h: New file. + * sparc/xm-lynx.h: New file. + + Thu Feb 16 17:02:51 1995 Ian Lance Taylor + + * config/mips/mips.h (enum processor_type): Add PROCESSOR_R4650. + * config/mips/mips.c (override_options): Use PROCESSOR_R4650 for + the 4650, not PROCESSOR_R4600. Check for it when doublechecking + mips_isa level. + * config/mips/mips.md: Add r4650 to cpu attr. Update functional + units for r4650. + (mulsi3): If TARGET_MAD, generate mulsi3_r4650. + (mulsi3_r4650): New instruction, mul directly to register file, + supported on r4650. + + Thu Feb 16 11:44:51 1995 Michael Meissner + + * rs6000/eabi.h (SUBTARGET_SWITCHES): Add support for + -mstrict-align to control whether STRICT_ALIGNMENT is 1 or 0. + (STRICT_ALIGNMENT): Redefine, to be 1 if -mstrict-align used. + + Wed Feb 15 13:03:38 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc2.c: Repair botch in application of patch. + + Tue Feb 14 16:00:52 1995 Per Bothner + + * tree.c (get_set_constructor_bytes): New function. Replaces ... + (get_set_constructor_words): ... removed old function. + * tree.h: get_set_constructor_words -> get_set_constructor_bytes. + * expr.c (store_constructor): Don't use get_set_constructor_words. + * varasm.c (const_hash): Add support for SET_TYPE constructors. + (record_constant_1): Likewise. + (copy_constant): Likewise. + (output_constant): Likewise. (Also SET_TYPE INTEGER_CSTs.) + + Tue Feb 14 08:05:07 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (stabilize_reference_1): No longer static. + * tree.h (stabilize_reference_1): Add declaration. + + Mon Feb 13 19:37:15 1995 Roland McGrath + + * config/mips/gnu.h: Rewritten to use ELF object format. + * config/gnu.h (GNU_CPP_PREDEFINES): New macro. + * config/i386/gnu.h (CPP_PREDEFINES): Use GNU_CPP_PREDEFINES macro. + * config/i386/gnuelf.h: Likewise. + + Mon Feb 13 14:06:04 1995 Jason Merrill + + * libgcc2.c (__default_new_handler): Don't call write if + inhibit_libc is defined. + (__pure_virtual): Ditto. + + Mon Feb 13 16:42:38 1995 Doug Evans + + * a29k/a29k-udi.h (DBX_DEBUGGING_INFO): Define. + (PREFERRED_DEBUGGING_TYPE): Define. + + * expmed.c (store_split_bit_field): If value is VOIDmode, + pass word_mode to force_reg. + + * varasm.c (function_section): New function. + (assemble_start_function): Call it. + * output.h (function_section): Declare it. + * final.c (final_scan_insn): Call function_section instead of + text_section. + * dwarfout.c (dwarfout_begin_block): Likewise. + (dwarfout_end_block): Likewise. + (dwarfout_label): Likewise. + (dwarfout_begin_function): Likewise. + (dwarfout_end_function): Likewise. + (dwarfout_line): Likewise. + + * flow.c (find_basic_blocks): Revise calculation of when to + make another pass. + + * libgcc2.c (exit): Don't call __do_global_dtors if + INIT_SECTION_ASM_OP and OBJECT_FORMAT_ELF. + + * Makefile.in (libgcc1.S): New target. + + Mon Feb 13 12:45:11 1995 Per Bothner + + * tree.c (permanent_allocation): Pop function_maybepermanent_obstack, + not hardwired &maybepermanent_obstack. + + Mon Feb 13 12:10:31 1995 J.T. Conklin + + * config/netbsd.h: Changed so that macro definitions used when gcc + is integrated into the NetBSD source tree are not defined unless + NETBSD_NATIVE is defined too. + + * configure (*-netbsd-*): Rename netbsd config files so that they don't + have the machine type in them. + * i386/netbsd.h: Renamed from i386/netbsd-i386.h. + * m68k/netbsd.h: Renamed from m68k/netbsd-m68k.h. + * ns32k/netbsd.h: Renamed from ns32k/netbsd32k.h. + + Mon Feb 13 15:05:09 1995 Jason Merrill + + * collect2.c (main): Remember all the .o files specified on the + command line, and scan them directly if COLLECT_SCAN_OBJECTS. + * rs6000/rs6000.h (COLLECT_SCAN_OBJECTS): Define. + + * stmt.c (warn_if_unused_value): Don't warn about dereferenced + references. + + Mon Feb 13 14:00:51 1995 Jim Wilson + + * m68k.h (RTX_COSTS): Fix typo from last change. + + * reload1.c (last_spill_reg): Move definition to top of file. + Don't initialize here. + (reload): Intialize here to -1. + + Mon Feb 13 09:29:49 1995 Paul Eggert + + * fixinc.svr4 (longlong_t, u_longlong_t): + Work around bug in Solaris 2.4 . + + Mon Feb 13 08:31:18 1995 David Edelsohn + + * rs6000.h, powerpc.h (CPP_SPEC): Define _POSIX_SOURCE if -posix. + + * rs6000.md (extendsfdf2): Undo 30 Nov 94 change. Use float_extend + instead of SUBREG and restore fmr instruction for differing FPRs. + + Mon Feb 13 05:25:09 1995 Jason Merrill + + * convert.c (convert_to_{pointer,real,integer,complex}): + Handle references. + + Mon Feb 13 08:14:10 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (ALIGN): Remove unused token. + + * loop.c (mark_loop_jump): Remove bogus assignments to LABEL_ + fields in default case. + + Mon Feb 13 07:55:30 1995 Torbjorn Granlund (tege@tiny.cygnus.com) + + * a29k.h (TARGET_MULTM): New #define. + (TARGET_SWITCHES): Recognize "-mno-multm". + * a29k.md (smulsi3_highpart, umulsi3_highpart, mulsidi3, umulsidi3): + Make these conditional on TARGET_MULTM. + + * a29k.md (multm matcher): Delete. + (multmu matcher): Delete. + (mulsidi3 DEFINE_SPLIT): Generate RTL for smulsi3_highpart instead of + for deleted pattern. Fix typo in preparation code. + (umulsidi3 DEFINE_SPLIT): Analogous change. + + Mon Feb 13 07:09:02 1995 Peter Flass (FLASS@LBDRSCS.BITNET) + + * i370/mvs.h (ASM_OUTPUT_ASCII): Don't duplicate first char. + + Mon Feb 13 06:51:07 1995 Samuel A. Figueroa (figueroa@CS.NYU.EDU) + + * i386/os2.h (OBJECT_SUFFIX): New macro. + (LIB_SPEC, STARTFILE_SPEC): Adjust to include better set of libs. + + * i386/xm-os2.h (DIR_SEPARATOR): Define if not already. + (strcasecmp): New definition. + + * toplev.c (main): Look at DIR_SEPARATOR for finding last component. + * cccp.c (do_include, is_system_include, open_include_file): + Handle DIR_SEPARATOR. + + Sun Feb 12 20:20:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * config/sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): Check to make + sure DECL is non-null before trying to reference it. + * config/mips/elf64.h (ASM_OUTPUT_SECTION_NAME): Likewise. + + Sun Feb 12 19:55:45 1995 Roland McGrath + + * calls.c (expand_call): Add missing paren in last change. + + Sat Feb 11 18:09:27 1995 Jim Wilson + + * libgcc2.c (L_fixunsxfsi, L_fixunsdfsi, L_fixunssfsi): Undef + normal types before including limits.h. + + * calls.c (expand_call): When setting n_named_args, depend on new + macro STRICT_ARGUMENT_NAMING. + + * expr.c (expand_builtin, case BUILT_IN_NEXT_ARG): Don't warn when + no argument if this is a varargs routine. + + Sat Feb 11 16:08:13 1995 Samuel A. Figueroa (figueroa@CS.NYU.EDU) + + * gcc.c (specs): Use %O instead of "o" for object file suffix. + (do_spec_1, case 'O'): New option. + + Sat Feb 11 14:58:19 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k/mot3300.h (RETURN_IN_MEMORY): Fix error in last change. + + Sat Feb 11 13:09:28 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cexp.y (%union): Delete VOIDVAL and SVAL; unused. + + * c-decl.c (grokdeclarator): Use NAME, not IDENTIFIER_POINTER + of DECLARATOR for error messages; DECLARATOR might be null. + + * expmed.c (expand_divmod): Always call expand_twoval_binop with + psuedos as targets. + + Fri Feb 10 14:55:05 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * caller-save.c: Replace MAX_UNITS_PER_WORD with MIN_UNITS_PER_WORD. + * h8300.h, mips.h, rs6000.h, sparc.h: Likewise. + + * alpha.c (direct_return): Can't if have outgoing args. + + * expr.c (store_constructor, ARRAY_TYPE): Use code for + non-integer INDEX for non-integer ELTTYPE size. + Allow INDEX to be zero in code and divide size by BITS_PER_UNIT. + + * fold-const.c (fold): Don't modify tree with newly-allocated + nodes; instead make new tree in those cases. + + Wed Feb 8 15:13:49 1995 Doug Evans + + * sparc/sparc.c (v9_regcmp_p): New function. + (v9_regcmp_op): Call it. + * sparc/sparc.md (movsicc): New pattern. + (movdicc, movsfcc, movdfcc, movtfcc): Likewise. + + * sparc/sparc.c (sparc64_initialize_trampoline): Use gen_flush + instead of knowing what pattern looks like. + + * sparc/sparc.md (nonlocal_goto): Use Pmode instead of SImode. + + Wed Feb 8 10:05:11 1995 David J. MacKenzie + + * config.sub: Add a blank in the #! line for 4.2BSD, Dynix, etc. + + Wed Feb 8 02:52:21 1995 Jeffrey A. Law + + * pa.md (call, call_value): Emit save of the PIC register + with "emit_insn" before emitting the call insn itself. + + Tue Feb 7 15:19:40 1995 Jim Wilson + + * sh.c (prepare_scc_operands, from_compare): Force constant 0 into + register for unsigned comparisons. + + * sh.c: Correct errors in comments. + (calc_live_regs, expand_acall): Delete TARGET_SMALLCALL support. + (need_slot): Add comment. Delete test of INSN_ANNULLED_BRANCH_P. + (print_operand_address): Delete '*', '^', '!' support. + (synth_constant): Call zero_extend* instead of and*. Call ashlsi3_k + instead of ashlsi3_n. + (prepare_scc_operands): Abort for NE case. + (output_move_double, output_far_jump, output_branch): Delete commented + out code. Don't output assembler comments. + (gen_ashift): Don't call addsi3. + (fixit): Delete redundant test for QImode constants. + (hi_const): Delete TARGET_SHORTADDR support. + (find_barrier): Don't put constant pool between mova and its label. + (add_function, seen_function, bsr_operand, mac_operand, + fake_shift): Delete. + (sh_expand_prologue, expand_acall): Delete TARGET_BSR support. + (general_movsrc_operand): Don't reject non-I CONST_INT. + * sh.h: Correct errors in comments. + (CONDITIONAL_REGISTER_USAGE): Delete TARGET_NOSAVE support. + (TARGET_MAC, TARGET_TRYR0, TARGET_NOSAVE, TARGET_SMALLCALL, + TARGET_PARANOID, TARGET_RETR2, TARGET_SHORTADDR, TARGET_BSR): Delete. + (TARGET_SWITCHES): Delete above options. + (OVERRIDE_OPTIONS): Delete TARGET_BSR support. + (FUNCTION_BOUNDARY): Use 32 bit alignment when not TARGET_SMALLCODE. + (FIRST_RET_REG): Delete TARGET_RETR2 support. + (MODE_DISP_OK_[21]): Delete TARGET_TRYR0 support. + (EXTRA_CONSTRAINT_U): Delete. + (CONST_COSTS): For logical operations, give L constants cost 1. + (PRINT_OPERAND_PUNCT_VALID_P): Delete '*', '^', '!'. + * sh.md: Correct errors in comments. Delete all assembler comments. + Delete commented out patterns. Delete all peepholes but two. + Delete all define_splits but one. Delete all `combiner' patterns. + (mpy): Correct multiply latencies. + (needs_delay_slot, hit_stack, interrupt_function, in_delay_slot, + define_delay): Correct and/or simplify all reorg related definitions. + (addsi3_real): Delete. + (addsi3): Use arith_operand for argument 1. + (mulhisi3): Use arith_reg_operand not mac_operand. + (and_ffff, and_ff): Delete. + (andsi3): Handle constant 255 specially. + (rot*): Correct and/or simplify all rotate patterns. + (ashlsi3_k): Delete clobber of T bit. Output add for 1 bit shift. + (ashlsi3_n, lshrsi3_n): Delete use of fake_shift. + (negc): Correct pattern by adding set of T bit. + (extend*): Delete 'u' and 'U' constraint cases. + (pop): Separate 'l' and 'x' constraint cases. + (movsi-1): Better code for move to T bit case. + (bsr, bsr_value, mac): Delete. + + Tue Feb 7 14:23:52 1995 Doug Evans + + * sparc/sparc.md (*): Give names to all anonymous patterns. + + Mon Feb 6 23:41:09 1995 Stephen L Moshier + + * sparc/sysv4.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE): Remove + tests for host == target format and endianness. + + Mon Feb 6 16:52:38 1995 Torbjorn Granlund (tege@tiny.cygnus.com) + + * i386.h (RTX_COSTS): Rewrite. + + * m68k/lb1sf68.asm (__udivsi3, __divsi3, __umodsi3, __modsi3): + Rewrite to actually work for more than a few small operands, + and to be reasonably small. + (__mulsi3): Eliminate usage of link register (i.e. a6). + (shift patterns): Delete. + (__umulsi3): Delete. + * t-m68kbare (LIB1ASMFUNCS): Remove _umulsi3. + * t-vxworks68: Likewise. + + Mon Feb 6 15:22:39 1995 Jim Wilson + + * ginclude/va-i960.h (va_start): Add __builtin_next_arg call. + + * sh/sh.c (sh_function_arg): Don't reject unaligned structures. + (sh_function_arg_partial_nregs): Likewise. + + * sparc/sparc.md (movsf-1, movdf-1, movtf-1): Use 'F' not 'E'. + + * sparc/sol2.h (STARTFILE_SPEC): Delete explicit /usr/ccs/lib/ + pathnames. + + * reload1.c (alter_reg): New variable stack_slot. Apply anti + BYTES_BIG_ENDIAN correction to stack slot address stored in + spill_stack_slot. + + * jump.c (jump_optimize): When searching for a LOOP_END note to move, + stop if we find a LOOP_BEG note first. + + Mon Feb 6 15:03:35 1995 Doug Evans + + * i386/sysv3.h (DBX_DEBUGGING_INFO): Define. + (PREFERRED_DEBUGGING_TYPE): Define. + + Mon Feb 6 11:56:14 1995 Jeffrey A. Law + + * pa.md: Replace "misc" attribute with "multi" in recentlyadded + soft-float code. + + * pa-osf.h (TARGET_DEFAULT): Protect definition. + + Mon Feb 6 11:52:25 1995 Ian Lance Taylor + + * fixincludes: When changing to include or + , make it include them only for C++. + + Sun Feb 5 21:39:41 1995 Torbjorn Granlund + + * pa.c (globally): Use GEN_INT. + (emit_move_sequence): Use expand_inc instead of plus_constant + (generates less rtl). + * pa.md (globally): Use GEN_INT. + + * pa.h (PREDICATE_CODES): Fix many errors. Enable. + + * m68k.h (RTX_COSTS): Add special cases for a plain 68000. + + * expmed.c (mul_cost, div_cost): New variables. + (mul_widen_cost, mul_highpart_cost): New variables. + (init_expmed): Init new variables. + (expand_mult_highpart): New argument, MAX_COST. + Use new argument in several places. Simplify code that tries + widening multiply variants. + (expand_divmod): New variables MAX_COST, EXTRA_COST. + Initialize MAX_COST dependent on REM_FLAG. + Calculate and pass cost in all calls of expand_mult_highpart. + + Sat Feb 4 13:19:29 1995 Jim Wilson + + * mips/abi64.h, mips/cross64.h, mips/iris6.h: New files. + * mips/iris5.h (TARGET_DEFAULT): Add #ifndef/#endif around define. + * mips/mips.c (mips_isa_string): Add mips4 to comment. + (large_int): Delete code for handling 64 bit constants. + (mips_const_double_ok): For irix6, reject all floating point constants. + (mips_move_2words): Use dli not li for 64 bit constants. + Use dla not la for 64 bit addresses. + (output_block_move): Likewise. + (function_arg): Add support for 64bit ABI. + (override_options): Add support for mips4 and R8000. + (print_operand): Handle new modifiers 'B', 'b', 'T', 't'. + Make 'X' case work for 64 bit host. + (mips_output_filename): Use ASM_OUTPUT_FILENAME. + (mips_asm_file_start): Go to text section for 64bit ABI. + (compure_frame_size, save_restore_insns, function_prologue, + mips_expand_prologue, function_epilogue): Add support for 64 bit ABI. + (type_dependent_reg, mips_function_value): New functions. + * mips/mips.h (__PTR_TO_INT, __INT_TO_PTR): Delete. + (enum processor_type): Add R8000. + (mips_isa_string, CC1_SPEC): Add mips4 to comment. + (CONDITIONAL_REGISTER_USAGE): Use SUBTARGET_CONDITIONAL_REGISTER_USAGE. + (SUBTARGET_CONDITIONAL_REGISTER_USAGE): New macro. + (ASM_SPEC, LINK_SPEC, CPP_SPEC): Add mips4 support. + (MIPS_TEMP[12]_REGNUM): Change to avoid clobbering 64bit abi + parameter registers. + (SMALL_INT, SMALL_INT_UNSIGNED, CONST_OK_FOR_LETTER_P): Fix for 64 + bit host. + (ABI_64BIT): New macro. + (REG_PARM_STACK_SPACE): Use UNITS_PER_WORD not 4. + (GO_IF_LEGITIMATE_ADDRESS, CONSTANT_ADDRESS_P, LEGITIMATE_CONSTANT, + LEGITIMIZE_ADDRESS): Don't allow CONST addresses for Irix6. + (ASM_OUTPUT_FILENAME): New macro. + (ASM_OUTPUT_ADDR_DIFF_ELT): Add 64 bit ABI support. + * mips/mips.md (type attribute): Add fmadd. + (cpu attribute): Add r8000. + (umaddi+1, ..., umadddi+8): Add pattern for multiply accumulate. + (movdi): Legitimize addresses, just like movsi does. + (loadgp): New pattern for 64 bit ABI. + (shift patterns): Use INTVAL instead of XINT for constants. + (jump, tablejump_interal[12]): Add 64 bit ABI support. + (movsicc-8, ..., movsicc): Add patterns for conditional moves. + * mips/t-cross64, mips/t-iris6, mips/x-iris6, mips/xm-iris6.h: + New files. + * configure: Add irix6 and irix5cross64 configurations. + * ginclude/va-mips.h (*): Change __mips==3 to __mips>=3. + (sgidefs.h): Include if _MIPS_SIM is defined. + (va_start): Add support for 64 bit ABI. + + Sat Feb 4 10:31:37 1995 Doug Evans + + * dbxout.c (dbxout_source_file): Don't switch to text section if + in function with section attribute. Print Ltext label to correct + file (important on mips). + + Fri Feb 3 14:43:23 1995 Michael Meissner (meissner@cygnus.com) + + * rs6000/rs6000.md (call, call_value): If building for System V.4 + or eABI, function pointers are just pointers, not pointers to a + three word area. + + Thu Feb 2 15:50:26 1995 Ian Lance Taylor + + * fixincludes: When fixing bool in , permit whitespace + before the semicolon. Needed on AIX 3.2.5. + + Thu Feb 2 12:06:12 1995 David Edelsohn + + * rs6000.md (smax:SF define_split): Change match_operand typo to + match_dup. + (smin:SF define_split): Likewise. + (smax:DF define_split): Likewise. + (smin:DF define_split): Likewise. + + Wed Feb 1 16:50:18 1995 Michael Meissner (meissner@cygnus.com) + + * config.sub: Add support for powerpc-*-{elf,svr4,eabi}. + * configure: Ditto. + + * rs6000/xm-sysv4.h: New file, to support building GCC for a + System V.4 PowerPC system. + * rs6000/sysv4.h: Ditto. + * rs6000/x-sysv4: Ditto. + + * rs6000/eabi.h: New file, to support building GCC for an embedded + PowerPC system. + + * rs6000/rs6000.h (TARGET_SWITCHES): Add -mmultiple, -mno-multiple + to control emitting load/store multiple instructions. On the + power, this is on by default, and on the powerpc it is off. + (SUBTARGET_SWITCHES): New macro, which defaults to nothing to + allow a subtarget to add new switches. + (SAVE_FP_*, RESTORE_FP_*): New macros that give the prefix and + suffix to use for the functions that save and restore the floating + point registers. + + * rs6000/rs6000.c (output_prolog): Use TARGET_MULTIPLE instead of + TARGET_POWER to control whether to emitt load/store multiple + instructions. Use the SAVE_FP_*/RESTORE_FP_* macros instead of + using the hardwired AIX names for the functions to save and + restore the floating point registers. + (output_epilog): Likewise. + (print_operand_address): Do not prepend a '.' for %z when using + the ELF object file format. + (svr4_traceback): New function to emit the word before the + procedure prologue that System V.4 expects to do tracebacks. + (output_prolog): Call svr4_traceback under ELF systems. + (output_epilog): Omit AIX style traceback tables for ELF systems. + (output_function_profiler): Abort for now in the ELF case. + + * rs6000/rs6000.md (load_multiple, store_multiple): Test against + TARGET_MULTIPLE instead of TARGET_POWER. + + Tue Jan 31 19:27:43 1995 Torbjorn Granlund + + * pa.h (REAL_ARITHMETIC): Define. + (ASM_OUTPUT_DOUBLE): Rewrite. + (ASM_OUTPUT_FLOAT): Rewrite. + * pa.md (SF and DF move): Use constraint 'E' instead of 'F'. + * pa.c (singlemove_string): Make case with SFmode CONST_DOUBLE abort. + (print_operand): #ifdef out CONST_DOUBLE cases. + + Tue Jan 31 19:27:43 1995 Jim Wilson + + * pa/pa.h (TARGET_SOFT_FLOAT): New macro. + (TARGET_SWITCHES, CPP_SPEC, CONDITIONAL_REGISTER_USAGE, FUNCTION_VALUE, + LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P, FUNCTION_ARG_REGNO_P, + FUNCTION_ARG, ASM_DECLARE_FUNCTION_NAME, GO_IF_LEGITIMATE_ADDRESS, + RTX_COSTS): Use TARGET_SOFT_FLOAT. + * pa/pa.md (*sf*, *df*, etc): Make all floating point patterns depend + on ! TARGET_SOFT_FLOAT. + (movsi, movdi, movsf, movdf): Add patterns for TARGET_SOFT_FLOAT. + + Tue Jan 31 15:53:04 1995 Jason Merrill + + * toplev.c (lang_options): Add -f{no-,}check-new. + + Tue Jan 31 13:55:37 1995 Doug Evans + + * mips/mips.h (ASM_DECLARE_FUNCTION_NAME): Ensure section is .text if + no section attribute. + * mips/elf64.h (ASM_OUTPUT_SECTION_NAME): Use asm_out_text_file for + functions. + + Tue Jan 31 13:26:42 1995 Ian Lance Taylor + + * libgcc2.c: Include , not "glimits.h". + + Mon Jan 30 16:34:24 1995 Jason Merrill + + * c-common.c (type_for_size): Try to match on int before other + types (which might be the same size). + (type_for_mode): Ditto. + + Sat Jan 28 16:28:15 1995 Roland McGrath + + * config/sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): #undef before + defining. + + Sat Jan 28 13:54:23 1995 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.md (call, call_value): Always save the PIC register before + a call. + + Sat Jan 28 07:31:26 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c (c_expand_return): Refine check for returning pointer + to local variable to allow subtracting a pointer from it. + + * calls.c (expand_call): When emitting queue for each arg, + call protect_from_queue; put in initial_value so EXPR_LIST in + is_const case won't have QUEUED. + + Sat Jan 28 04:36:46 1995 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.md (call_internal_reg): Use an even faster sequence for + TARGET_FAST_INDIRECT_CALLS. + (call_value_internal_reg): Likewise. + + Fri Jan 27 21:28:51 1995 Ronald F. Guilmette (rfg@segfault.us.com) + + * config.sub (unixware, svr4): Treat as synonyms for sysv4. + + Fri Jan 27 19:36:13 1995 Roland McGrath + + * config/i386/gnuelf.h: New file. + + Fri Jan 27 16:55:05 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc1.c (perform_lshlsi3, __lshlsi3): Deleted. + * libgcc2.c (__lshldi3): Deleted. + * Makefile.in (LIB1FUNCS): Delete _lshlsi3. + (LIB2FUNCS): Delete _lshldi3. + + * expr.c (expand_expr, case MINUS_EXPR): Remove bogus operand swap. + + * optabs.c (expand_binop): Add missing test for VOIDmode + before calling convert_to_mode. + + * final.c (high_{block,function}_linenum): New variables. + (final_start_function): Initialize them. + (final_end_function): Pass highest line number to function end + debugging routines. + (final_scan_insn): Pass highest line number in block to block end + debugging function. + (output_source_line): Update highest line in block and function. + + Thu Jan 26 03:46:35 1995 Roland McGrath + + * configure (i[345]86-*linux*): Set $extra_parts if $elf. + (*-*-gnu*): Likewise. + + Wed Jan 25 18:11:19 1995 Jim Wilson + + * sh.c (prepare_scc_operands): Force sh_compare_op1 to a register if + it is an invalid constant. + (output_branch): Add cases for 4, 8, and 18. Correct branch offsets + in comments. + (find_barrier): Correct test for move instructions that need to be + fixed by verifying that the set source is a bad constant. + (arith_reg_or_0_operand): New function. + * sh.h (CONST_OK_FOR_LETTER_P): Add case for 'N'. Correct comment. + (ADJUST_INSN_LENGTH, SHORTEN_WITH_AJUST_INSN_LENGTH): New macros. + * sh.md (define_attr type): Combine pcloadsi and pcloadhi into pcload. + (*): Likewise for all patterns that use them. + (define_attr length): Delete cases for pcloadsi and pcloadhi. + Modify branch offsets and lengths to be correct. Correct comment. + (*): Correct length attributes for all patterns. + (in_delay_slot): Delete maybe value. Change default case from yes to + no. Delete case for lengths of 4, 6, 8, 10, and 12. + (cmpeq_0, cmpeq_0-1, cmpeq_0-2): Delete patterns. + (cmpeqsi_t): Delete case with constant as first operand. + (cmpgtsi_t, cmpgesi_t): Use arith_reg_or_0_operand not arith_operand. + Put register cases first. + (cmpgeusi_t, cmpgtusi_t): Delete cases for comparing against zero. + (jump): Call output_far_jump if insn length >= 14 instead of == 14. + (casesi): Use arith_reg_operand not arith_operand for operand 2. + + * fixincludes (strings.h): Fix return type of strlen. + + * expr.c (expand_expr, case MIN_EXPR): If must emit multiple + instructions, then don't allow a MEM target. + + Wed Jan 25 17:07:47 1995 Pat Rankin (rankin@eql.caltech.edu) + + * cccp.c (do_include): For VMS, don't attempt to + treat `#include X' as `#include ' unless `X' has already been + macro expanded. + (main): For VMS, do a better job of picking out the base name from + argv[0]'s absolute name. + * vax/xm-vms.h (FAILURE_EXIT_CODE): Define. + + Wed Jan 25 14:50:45 1995 David S. Miller (davem@nadzieja.rutgers.edu) + + * genattrtab.c (check_attr_value): Change error message text. + (simplify_test_exp): Likewise. + * stmt.c (expand_asm, expand_asm_operands): Likewise. + * mips.c (print_operand, print_operand_address): Likewise. + * dsp16xx.c (dsp16xx_reg_class_from_letter): Likewise. + (limit_reload_class, double_reg_to_memory): Likewise. + (print_operand_address, emit_1600_core_shift): Likewise. + (gen_tst_reg, gen_compare_reg): Likewise. + * dsp16xx.md (compare): Likewise. + * unroll.c (find_splittable_givs): Likewise. + + Wed Jan 25 13:21:10 1995 Matthias Pfaller (leo@marco.de) + + * configure (ns32k-pc532-netbsd): Use netbsd32k.h instead of netbsd.h. + * ns32k/netbsd32k.h: Renamed from netbsd.h. + Don't include ansi.h. + Include config/netbsd.h and delete definitions included from it. + * ns32k/xm-netbsd.h (HAVE_ATEXIT): Deleted. + + Wed Jan 25 12:53:40 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k/mot3300.h (DEFAULT_PCC_STRUCT_RETURN): Define as zero. + (RETURN_IN_MEMORY): Small aggregates are to be returned in d0. + + Wed Jan 25 12:48:43 1995 Paul Eggert + + * cccp.c (handle_directive): Fix typo: '\' caused next char to + be copied blindly, which was an error if !traditional and if + the next char was newline or one of <\'"/. + + Wed Jan 25 08:15:49 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * jump.c: Include expr.h after insn-config.h and insn-flags.h. + + Tue Jan 24 23:19:28 1995 Doug Evans + + Improved conditional move support from Richard Earnshaw. + * optabs.c (movcc_gen_code): New variable. + (init_optabs): Initialize it. + (emit_conditional_move): New function. + (can_conditionally_move_p): New function. + * combine.c (simplify_set): Call it. + * expr.h: (emit_conditional_move): Declare it. + (can_conditionally_move_p): Likewise. + (movcc_gen_code): Likewise. + * genopinit.c (optabs): Add entry for movcc_gen_code. + * genconfig.c (main): Delete #ifndef around HAVE_conditional_move. + * jump.c (jump_optimize): Try to emit a conditional move insn before + trying a store-flag insn. + * alpha.md (movsicc): New named pattern. + (movdicc, movsfcc, movdfcc): Likewise. + (SImode conditional move): New matcher. + * sparc.h (HAVE_conditional_move): Delete. + + * configure: Recognize and ignore --x-* options. + + Mon Jan 23 23:23:33 1995 Roland McGrath + + * config/svr4.h (ASM_OUTPUT_SECTION_NAME): Renamed from + ASM_OUTPUT_SECTION. The old name was a typo. + (ASM_OUTPUT_SECTION_NAME): Take proper number of args. + + Mon Jan 23 18:51:38 1995 Jason Merrill + + * collect2.c (main): Check LD_INIT_SWITCH and LD_FINI_SWITCH + separately. + (scan_prog_file): Don't add shared library initializers or + finalizers to list if LD_INIT_SWITCH or LD_FINI_SWITCH are + defined, respectively. + + Mon Jan 23 18:45:13 1995 Ian Lance Taylor + + * config/mips/mips.c (override_options): Permit any small integral + mode in the HI/LO registers. + + Mon Jan 23 15:41:10 1995 Steve Chamberlain + + * h8300.md (table_jump_h8300, table_jump_h8300h): Constrain + operand to use register. + + Sat Jan 21 00:01:08 1995 Roland McGrath + + * configure (*-*-gnuelf*): Set elf=yes. + (*-*-gnu*): Use ${cpu_type}/gnuelf.h under --with-elf. + + Fri Jan 20 20:11:17 1995 Jim Wilson + + * combine.c (num_sign_bit_copies): Can handle paradoxical subreg only + if LOAD_EXTEND_OP is defined to SIGN_EXTEND. + + * loop.c (record_giv): Initialize new field same_insn. + * loop.h (structure induction): Add new field same_insn. + * unroll.c (copy_loop_body): When check for shared address givs, use + new same_insn field. + (find_splittable_givs): New variable v2. Scan givs to set new + same_insn field. Use same_insn to indentify address givs to be + shared. + + * flow.c (find_basic_blocks): No longer need to check for deleted + nonlocal_labels. + * function.c (delete_handlers): When clear LABEL_PRESERVE_P, + also remove label from nonlocal_label list. + * integrate.c (save_for_inline_copying): Add comment that + nonlocal_label list should be updated if it ever can be nonzero. + + * sdbout.c (syms.h): Don't include under Linux. + + * loop.c (scan_loop): For the replace_rtx call, copy the rtx that is + being substituted in before the call. + + * sh.c (machine_dependent_reorg): When remove SUBREG, add in + SUBREG_WORD to new register number. + + * sh.c (multcosts): Do not compute cost of constant power-of-two + multiplies as if they were shifts. Reduce multiply cost from 5 to 3. + Delete variable insn_cost. + + Fri Jan 20 14:21:49 1995 Mike Stump + + * stmt.c (expand_cleanups): Add 4th argument to indicate if code + needs to be expanded for the cleanup. + (expand_goto_internal): Ditto. + (bc_expand_goto_internal): Ditto. + (fixup_gotos): Ditto. + (expand_end_bindings): Ditto. We now always call expand_cleanups, + even after BARRIERs, so that the call to the exception handling + routines is always done. + + Thu Jan 19 18:39:14 1995 Ian Lance Taylor + + * config/mips/mips.h (MASK_SINGLE_FLOAT): Define. + (MASK_MAD): Define. + (TARGET_SINGLE_FLOAT, TARGET_DOUBLE_FLOAT): Define. + (TARGET_MAD): Define. + (TARGET_SWITCHES): Add single-float, double-float, mad, no-mad, + 4650. + (ASM_SPEC): For gas, pass down -m4650, and pass -m4650 if -mmad is + used. + (CC1_SPEC): If -mips3 is used, only set -mfp64 if neither + -msingle-float nor -m4650 are used. Don't permit both -mfp64 and + -msingle-float, or both -mfp64 and -m4650. If -m4650 is used, + pass down -mcpu=r4650. + (FIXED_REGISTERS): Change HI and LO to not be fixed. + (HARD_REGNO_NREGS): If TARGET_SINGLE_FLOAT, use floating point + registers in 4 byte units, not 8 byte units. + (SECONDARY_RELOAD_CLASS): Define. + (mips_secondary_reload_class): Declare. + (LIBCALL_VALUE): If TARGET_SINGLE_FLOAT, only use FP_RETURN if the + mode size is <= 4. + (REGISTER_MOVE_COST): Use a cost of 12 when moving HI or LO to + anything other than a general register. + * config/mips/mips.c (function_arg): If TARGET_SINGLE_FLOAT, pass + DFmode arguments in general registers. + (override_options): Accept 4650 as a cpu type. If + TARGET_SINGLE_FLOAT, permit only small floating point modes in + floating point registers. Always permit SImode modes in HI/LO + registers. + (compute_frame_size): If TARGET_SINGLE_FLOAT, only save 4 bytes + per floating point register. Align the floating point register + save space to an eight byte boundary. + (save_restore_insns): If TARGET_SINGLE_FLOAT, save floating point + regisers in single precision. + (mips_secondary_reload_class): New function. + * config/mips/mips.md: Require TARGET_DOUBLE_FLOAT for all double + precision floating point insns. Change the multiplication insns + to be single instructions which set a register of class l or h or + x, as appropriate, rather than explicitly setting HI and/or LO. + Use define_expand to avoid generating a shift near a multiply on + the r4000. Use match_scratch in the division insns to clobber HI + and LO, rather than mentioning them explicitly. Add support for + r4650 mad and madu insns. + * config/mips/t-ecoff (MULTILIB_OPTIONS): Add mips1/mips3. + (MULTILIB_DIRNAMES): Add mips1 mips3. + + Wed Jan 18 07:43:53 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (stabilize_reference): Fix typo in last change. + * expr.c (get_inner_reference): Don't ignore CONVERT_EXPR from + non-UNION_TYPE to UNION_TYPE. + (expand_expr, case CONVERT_EXPR): Check for conversion to union + before checking for not changing mode. + + Tue Jan 17 22:33:27 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (stabilize_reference, case RTL_EXPR): New case. + + Tue Jan 17 18:42:44 1995 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.c (emit_move_sequence): Also handle displacements which + do not fit in 14 bits for fp load/store secondary reloads. + + Tue Jan 17 13:34:22 1995 Jason Merrill + + Avoid bogus errors for C++ lvalues. + * c-decl.c (init_decl_processing): Set pedantic_lvalues to pedantic. + * fold-const.c (pedantic_non_lvalue): Only force a non-lvalue if + pedantic_lvalues is set. + * tree.h: Declare pedantic_lvalues. + + Generalize shared truthvalue code to allow for C++ bool. + * c-tree.h: Declare boolean_{type,true,false}_node. + * c-decl.c (init_decl_processing): Set up + boolean_{type,true,false}_node to equal + integer_{type,one,zero}_node. + * c-common.c (truthvalue_conversion): Use + boolean_{type,true,false}_node instead of + integer_{type,one,zero}_node. + (shorten_compare): Ditto. + + Mon Jan 16 07:11:50 1995 Paul Eggert + + * cccp.c (rescan): Fix typo that caused tokens to be glued + together improperly. + + Sun Jan 15 21:00:24 1995 Doug Evans (dje@cygnus.com) + + * configure (vintmsg): Delete. + + Sat Jan 14 17:50:06 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (get_inner_reference): Only treat offset of PLUS_EXPR + as special if second arg is integer constant. + + Sat Jan 14 01:28:15 1995 Doug Evans (dje@cygnus.com) + + * expmed.c (extract_bit_field, fields bigger than word case): Count + subwords in target. Zero remaining upper bits if unsigned. + + * c-common.c (decl_attributes): Fix typo in packed ignored warning. + Fix unrecognized mode warning. Make string comparisons consistent. + Support machine attributes with arguments. Make noreturn/volatile + warnings consistent with others. + + * a29k.h (INIT_CUMULATIVE_INCOMING_ARGS): Reserve two regs for + caller's lr0,lr1. + * a29k.c (incoming_reg): Keep regstack aligned to even boundary. + + Fri Jan 13 20:29:30 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * sdbout.c (plain_type_1): For LONG_LONG_TYPE_SIZE, return T_[U]LONG + instead of 0 (i.e. T_VOID). + + * optabs.c (expand_binop): Do not force constant shift-count to + a register, to allow possible widening; do not convert_to_mode + mode{1,2} or copy_to_mode_reg if mode{1,2} is VOIDmode. + * m68k.md (zero_extendsidi2): New pattern. + (extendqidi2, extendhidi2, extendsidi2, extendplussidi): New patterns. + (adddia_sexthishl32, adddid_sexthishl32): New patterns. + (adddi_dilshr32, adddi_dishl32, adddi_mem): New patterns. + (adddi3, subdi3): Allow more alternatives. + (subdia_sexthishl32, subdid_sexthishl32): New patterns. + (subdi_dishl32, subdi_mem): New patterns. + (negdi2): New pattern. + (ashldi_sexthi, ashldi_const32, ashldi_const, ashldi3): New patterns. + (subreg1ashrdi_const32, ashrdi_const32): New patterns. + (ashrdi_const32_mem, ashrdi_const, ashrdi3): New patterns. + (subreg1lshrdi_const32, lshrdi_const32, lshrdi_const, lshrdi3): Ditto. + (lshrsi_31): New pattern. + (lshrsi_16, lshrsi_17_24): New names for old unnamed patterns. + + * m68k.c (use_movqi, const_method): New functions. + (const_int_cost, output_move_const_into_data_reg): Likewise. + (singlemove_string): Call output_move_const_into_data_reg. + * m68k.md (fullword move): Likewise. + * m68k.h (CONST_COSTS): Call const_int_cost. + + Fri Jan 13 20:17:55 1995 Oliver Kellogg (okellogg@salyko.cube.net) + + * 1750a.h, 1750a.c: Remove use of function prototypes. + + Fri Jan 13 15:53:33 1995 Jason Merrill + + * tree.h (DECL_STATIC_CONSTRUCTOR): New macro. + (DECL_STATIC_DESTRUCTOR): New macro. + (tree_decl): Add static_ctor_flag and static_dtor_flag. + + * objc-act.c (finish_file): Renamed from objc_finish. + + * c-parse.in (program): Call finish_file. + + * c-decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR. + (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR. + + * c-lang.c (finish_file): New function to emit code for calling + static constructor and destructor functions as necessary. + + * c-common.c (decl_attributes): Support __attribute__s + "constructor" and "destructor". + + Fri Jan 13 19:38:08 1995 Paul Eggert + + * gcc.c (execute): Don't wait for just any N subprocesses, + since we may have started with some subprocesses before we + started executing. Wait just for _our_ N subprocesses. + + Fri Jan 13 18:08:17 1995 John F Carr + + * gencodes.c, genemit.c, genflags.c (gen_insn): Ignore insns whose + names begin with '*'. + * genoutput.c (output_epilogue): Do not reference gen_ functions for + insns whose names begin with '*'. + + Fri Jan 13 17:54:42 1995 Wolfgang Formann (wolfi@exner.tgm.ac.at) + + * i386/isc.h (ASM_FILE_START): New macro. + + Fri Jan 13 15:01:59 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (unary_expr): If -pedantic, give error for &&. + + * fold-const.c (fold, case COND_EXPR): Properly swap args 1 and 2. + Strip nops from ARG2, just like ARG1. + Make {MIN,MAX}_EXPR properly when type of result different than args. + + * function.c (optimize_bit_field): Don't remove a SUBREG that + changes mode class. + + * Makefile.in (stmp-multilib*): Pass CC and CFLAGS to recursive make. + + * alpha/osf12.h (LINK_SPEC): Add missing "\". + + Thu Jan 12 13:37:13 1995 Jim Wilson + + * i960/t-* (LIBGCC1, CROSS_LIBGCC1): Define to empty instead of + to libgcc1.null. + * mips/t-*, sparc/t-*: Likewise. + + Thu Jan 12 08:13:55 1995 Steve Chamberlain (sac@wombat.gnu.ai.mit.edu) + + * libgcc2.c (__lshldi3, __lshrdi3, __ashldi3, __ashrdi3): + Shift count comes as a word, not as an SI. Keep temporary in + a word. + (__moddi3, __divdi3): Make negate flag `c' have word_type for + efficiency. + + Thu Jan 12 07:18:09 1995 Stephen L Moshier (moshier@world.std.com) + + * real.c (toe64): Use Intel bit pattern for little-endian XFmode Inf. + (e64toe): Likewise; also check the exponent field properly. + + Wed Jan 11 14:24:55 1995 Jason Merrill + + * toplev.c (lang_options): Add -f{no-,}gnu-keywords, + -f{no-,}operator-names. + + Tue Jan 10 19:16:07 1995 David Edelsohn + + * rs6000.h (REGISTER_MOVE_COST): Add LINK_OR_CTR_REGS class to + expensive moves. + + Tue Jan 10 19:07:36 1995 Jonathan Beimel (jbeimel@gomez.sc.intel.com) + + * combine.c (simplify_if_then_else): Fix typo: "|" should be "||". + + Tue Jan 10 05:49:25 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold): Avoid infinite recursion caused by last change. + + Mon Jan 9 17:08:56 1995 Michael Meissner (meissner@cygnus.com) + + * configure: All AIX versions [456789].* use the AIX 4.1 support. + + Mon Jan 9 13:21:07 1995 David Edelsohn + + * rs6000/aix41ppc.h: New file. + + * configure (powerpc-ibm-aix4.1*): Add support AIX version 4.1 on + the powerpc. + + Sat Jan 7 08:51:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sparc.c (order_regs_for_local_alloc): Add casts to bcopy call. + (print_operand, case 'f'): New case. + (sparc_initialize_trampoline): Use gen_flush instead of knowing + what pattern looks like. + Use MEM instead of address in flush insn, so virtual reg + instantiation can update. + Ensure address in flush insn is valid. + * sparc.md (flush): Change to using a MEM instead of address. + + * reorg.c (dbr_schedule): Add missing casts in bzero call. + + * fold-const.c (fold, case CONVERT_EXPR): Don't remove an + integer conversion when outer is FP unless it doesn't change + signedness; rework code in this area to be clearer. + + Sat Jan 7 02:58:21 1995 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (enum processor_type): New enumeration describing the + processor to schedule for (700, 7100, 7100LC). + (pa_cpu_attr, TARGET_OPTIONS, OVERRIDE_OPTIONS): Define. + (pa_cpu_string, pa_cpu): Provide extern decls. + * pa.c (pa_cpu, pa_cpu_string): Provide definitions. + (override_options): New function. + (pa_adjust_cost): Handle PROCESSOR_7100 and PROCESSOR_7100LC + scheduling. Handle anti-dependendy cases involving fp division + and sqrt. Handle output dependencies correctly. Break TYPE_FPMUL + into TYPE_FPMULSGL and TYPE_FPMULDBL. + * pa.md (cpu attribute): New attribute. + Clean up comments for PROCESSOR_700 scheduling info. Slightly + simplify. Make conditional on PROCESSOR_700. + Add comments and scheduling information for PROCESSOR_7100 and + PROCESSOR_7100LC. Set types for instructions which use the shifter + to "shift". Explicitly set lengths and types for all instructions. + Break type "fpmul" into "fmulsgl" and "fpmuldbl". + + Fri Jan 6 17:50:48 1995 Jim Wilson + + * sh/sh.h (DO_GLOBAL_CTORS_BODY): Run constructors from right to + left not left to right. + * h8300/h8300.h: Likewise. + + Thu Jan 5 12:37:26 1995 Doug Evans + + * loop.c (get_condition): Use CONST0_RTX instead of const0_rtx. + + Wed Jan 4 04:26:23 1995 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.md (call expander): Use emit_insn_before to emit an insn to + save the PIC register before a function call. + (call_value expander): Likewise. + + Tue Jan 3 15:23:49 1995 Jim Wilson + + * va-mips.h (va_arg, mips3 case): Use __PTRDIFF_TYPE__ not int in + casts. + + * c-decl.c (duplicate_decls): Push to correct obstack before + creating new function types. + + Fri Dec 30 16:12:52 1994 Ian Lance Taylor + + * fixinc.svr4: Remove special patch for . + + Fri Dec 30 08:00:53 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * varasm.c: Include output.h. + Add prototyes for all static functions; remove forward declarations + of non-static functions. + (assemble_variable): Add missing arg decl. + (bc_make_decl_rtl, const_hash, const_hash_rtx): Now static. + (output_addressed_constants, output_constructor): Likewise. + (bc_output_constructor): Add missing argument. + (output_byte_asm): Delete, unused. + * output.h: Add decls of functions in varasm.c. + Allow to be included when rtl.h is not. + * function.h ({save_restore}_varasm_status): Add decls. + * c-decl.c, c-typeck.c, toplev.c: Include output.h. + * Makefie.in (c-decl.o, c-typeck.o, toplev.o, varasm.o): Likewise. + + Thu Dec 29 21:48:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * calls.c (expand_call): Set MEM_IN_STRUCT_P as needed on return + value from assign_stack_temp. + (store_one_arg): Likewise. + * expr.c (save_noncopied_parts): Likewise. + (expand_expr): Likewise. + * function.c (assign_parms): Likewise. + * integrate.c (expand_inline_function): Likewise. + * stmt.c (expand_decl): Likewise. + + Thu Dec 29 14:06:34 1994 Jim Wilson + + * cse.c (simplify_unary_operation): Cast constant 1 to HOST_WIDE_INT + before shifting left to form mask. + * gcc.c (print_multilib_info): Initialize last_path_len to 0. + * varasm.c (output_constructor): Change type of variable value to + HOST_WIDE_INT. + + * expmed.c (expand_mult_highpart): Use convert_modes instead of + gen_lowpart to do conversions. + + Thu Dec 29 13:42:08 1994 Mike Stump + + * toplev.c (lang_options): Add -frtti flag for rtti support in C++. + + Wed Dec 28 22:04:42 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * config/pa/lib2funcs.asm: New file. + * config/pa/t-pa (LIB2FUNCS_EXTRA): Define. + * config/pa/pa.h (DO_GLOBAL_DTORS_BODY): Define. Include a + reference to __gcc_plt_call so __gcc_plt_call always appears in + executables which reference __main. + + Wed Dec 28 21:18:26 1994 Jim Wilson + + * mips.md (truncdiqi2+[123]): Add patterns to optimize DImode to + SImode truncation. + + * reorg.c (fill_simple_delay_slots): For the epilogue case, set needed + to include frame pointer and stack pointer, don't include all of + end_of_function_needs. Reject insn if it sets a previously set + resource. + + * sh.c (sh_expand_prologue): Clear extra_push at start. Clear + current_function_anonymous_args if set. Clear shiftsyms array. + (sh_expand_epilogue): Don't clear extra_push, + current_function_pretend_args_size, current_function_anonymous_args, + and shiftsyms array. + + * reload.c (find_equiv_reg): Exclude registers clobbered in the + CALL_INSN_FUNCTION_USAGE field of a CALL_INSN. + + Tue Dec 27 19:22:35 1994 Mike Stump + + * stmt.c (expand_cleanups): Add third parameter so that we can + avoid marking a cleanup region if this cleanup is part of a fixup + style goto. + (expand_goto_internal): Pass a 1 to expand_cleanups. + (bc_expand_goto_internal): Ditto. + (fixup_gotos): Ditto. + (expand_end_bindings): Pass a 0 to expand_cleanups. + + Tue Dec 27 15:45:18 1994 Jeffrey A. Law + + * pa.c (output_movb): Fix ttypo. + + Tue Dec 27 15:11:42 1994 Ian Lance Taylor + + * config/i960/i960.c (i960_output_double): Print hex constants if + REAL_VALUE_TO_TARGET_DOUBLE is defined. + (i960_output_float): Likewise with REAL_VALUE_TO_TARGET_SINGLE. + + Sun Dec 25 07:22:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * convert.c (convert_to_pointer): Eliminate ref to null_pointer_node. + + Thu Dec 22 12:51:31 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * limitx.h (syslimits.h): Find syslimits.h in the same directory. + + * limity.h (_GCC_NEXT_LIMITS_H): If macro defined, recurse down + to real limits.h. + + * gsyslimits.h (_GCC_NEXT_LIMITS_H): Define macro and start recursing + down to the real limits.h. + + Thu Dec 22 12:17:11 1994 Ian Lance Taylor + + * Makefile.in (LIMITS_H_TEST): New variable. + (xlimits.h): Use LIMITS_H_TEST. + * config/m68k/t-next (LIMITS_H_TEST): Define. + * config/i386/t-next (LIMITS_H_TEST): Define. + + Wed Dec 21 15:56:13 1994 Holger Teutsch (teutsch@sw017.ffm-iw.Degussa.DE) + + * clipper.h (TRAMPOLINE_TEMPLATE): Specify some code as explicit hex + words. Shorten template. + (TRAMPOLINE_SIZE,INITIALIZE_TRAMPOLINE): Update accordingly. + (FUNCTION_ARG,FUNCTION_ARG_ADVANCE): Aggregates are ALWAYS passed + on the stack. + * va-clipper.h (__va_rounded_size): Delete. + (__va_round): Args have at least PARM_BOUNDARY (=32) alignment. + + Wed Dec 21 15:36:46 1994 Stephen L Moshier (moshier@world.std.com) + + * m68k.md (sqrtsf2, sinsf2, sindf2, sinxf2): Define. + (cossf2, cosdf2, cosxf2): Likewise. + (sqrtxf2): Operand 1 now XFmode. + + Wed Dec 21 14:39:46 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (adddi3, subdi3): New patterns. + + Wed Dec 21 13:56:08 1994 Michael Gschwind + + * pdp11.md (mulhisi3): Add truncate to mulhisi3 to fix bug and + change from define_insn to define_expand to survive register + presssure. + + Wed Dec 21 12:51:10 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stmt.c (expand_asm_operands): Make sure input operands are + valid constants if they are constants. + + * toplev.c (rest_of_compilation): Adjust tests for when to + inline and when to defer. + * calls.c (expand_call): Only inline if DECL_INLINE; don't + call function_cannot_inline_p here. + + * stmt.c (expand_expr_stmt): If want values for statements, + convert function to address-of-function. + + Wed Dec 21 00:02:33 1994 Ian Lance Taylor + + * combine.c (simplify_shift_const): Always copy flags to new MEM. + + Tue Dec 20 14:15:58 1994 Richard Kenner + + * rs6000/aix41.h (LINK_SPEC): Add case for -shared, just like rs6000.h. + + Tue Dec 20 09:14:00 1994 DJ Delorie (dj@ctron.com) + + * i386/go32.h: support #pragma pack(). + + * msdos/configur.bat: add libgcc.a target. + * msdos/mklibgcc.c: new file, helps build libgcc.a. + * msdos/libgcc.mak: new file, makefile fragment for libgcc.a. + * msdos/top.sed: change Makefile to be able to build libgcc.a. + + Mon Dec 19 20:52:13 1994 Jim Wilson + + * mips/x-sysv (CLIB): Add -L/usr/lib/cmplrs/cc3.11. + + * dsp16xx/dsp16xx.h (HAVE_VPRINTF): Delete. + + * flow.c (mark_set_1): For multi-reg hard register, clear all + reg_next_use entries. + + Mon Dec 19 17:49:59 1994 Doug Evans + + * Makefile.in (stmp-multilib): Check recursive make's return code. + (.PHONY): Tell GNU make the various LANGUAGES are phony targets. + + Mon Dec 19 17:07:41 1994 Ian Lance Taylor + + * config/mips/mips.c (print_operand): Don't print a CONST_DOUBLE + as a floating point value if it is not MODE_FLOAT. + + Mon Dec 19 15:27:42 1994 Jim Wilson + + * fp-bit.c (fpadd_parts): Adding infinities with opposite signs + yields a NaN. + + * loop.c (invariant_p): Reject const volatile references. + + Sun Dec 18 21:55:26 1994 Jeffrey A. Law + + * pa.md (pic2_highpart): Accept readonly operands. + + Sun Dec 18 16:29:20 1994 Jim Wilson + + * mips/dec-bsd.h (CPP_PREDEFINES): Change _MIPSEB to _MIPSEL. + + * cccp.c (macarg1): Count newline at end of C++ comment. + + Sun Dec 18 06:54:34 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stor-layout.c (layout_decl): Allow DECL_BIT_FIELD for any type. + + Sat Dec 17 03:43:24 1994 Jeffrey A. Law + + * pa.h (readonly_section): During PIC code generation, put + readonly data into the standard data section. + + * pa.c (pic_label_operand): Disallow SYMBOL_REFs (constant data). + + Fri Dec 16 06:44:40 1994 Jim Wilson + + * sparc/litecoff.h (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_FUNCTION_FIRST, + DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define. + (ASM_OUTPUT_SOURCE_LINE): Modify it to output function relative stabs. + + * sh/lib1funcs.asm (ashiftrt_r4_1): Delete useless or instruction. + Add nop to rts delay slot. + + * combine.c (distribute_notes): When output an insn to hold a REG_DEAD + note, update basic_block_head if necessary. + + Thu Dec 15 15:22:46 1994 Jeffrey A. Law + + * fixincludes: Fix non const atof parameter on NEWS-OS 4.2R. + + Tue Dec 13 18:39:09 1994 Doug Evans + + * h8300.c (handle_pragma): Only print warning once. + + * function.c (instantiate_virtual_regs_1, case PLUS): If offset is + zero, make sure register replacement is still validated. + + Tue Dec 13 07:51:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tower-as.h (FUNCTION_EXTRA_EPILOGUE): Fix typo in mov.l opcode. + * tower.h (IMMEDIATE_PREFIX): Really define. + + * expr.c (expand_expr, case MINUS_EXPR): Properly handle case + when the NEGATE overflows. + + Mon Dec 12 17:22:19 1994 der Mouse (mouse@collatz.mcrcim.mcgill.edu) + + * reload.c (debug_reload): Use GET_MODE_NAME to avoid warning. + + Mon Dec 12 13:15:04 1994 Doug Evans + + * function.c (locate_and_pad_parm): Don't call pad_below for BLKmode + parms in regs. + + * expmed.c (emit_store_flag): Set mode after canonicalizing op0/op1 + so op1 is constant. + + Mon Dec 12 08:04:33 1994 Pat Rankin (rankin@eql.caltech.edu) + + * cccp.c, toplev.c (vms_fopen): Call `fopen' through an indirect + pointer to inhibit checking argument list against its prototype. + Increase RMS multi-block count from 16 to 32. + + Sat Dec 10 17:03:59 1994 H.J. Lu (hjl@nynexst.com) + + * cccp.c (do_include): Avoid dynamic initialization of aggregate. + + Sat Dec 10 16:57:50 1994 Andreas Luik (luik@isa.de) + + * m68k.md (cmpsi): Make this into a define_expand; legitimize + PIC addresses if necessary. + Old cmpsi code now unnamed define_insn pattern. + + Sat Dec 10 16:06:03 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (pedantic_omit_one_operand): New function. + (fold, case COND_EXPR): Use it instead of calling + pedantic_non_lvalue on the result of omit_one_operand. + + Fri Dec 9 15:53:35 1994 Steve Chamberlain (sac@wombat.gnu.ai.mit.edu) + + * reload.c (find_reloads_address_1): Handle TRUNCATE and + ZERO_EXTEND in same way as SIGN_EXTEND. + + Fri Dec 9 14:52:41 1994 Jason Merrill + + * rs6000/rs6000.h (LINK_SPEC): Add %{shared:-bM:SRE}. + (LINK_LIBGCC_SPECIAL_1): Use LIBGCC_SPEC instead. + + Fri Dec 9 14:24:02 1994 Per Bothner + + * gcc.c (default_compilers): Add support for Chill (.ch and .chi). + + Fri Dec 9 17:31:46 1994 Jason Merrill + + * fixinc.svr4 (sys/byteorder.h): Turn extern inlines back into + static inlines for targets (such as SPARC/Solaris) that don't + supply these functions in the C library. + + Fri Dec 9 17:19:44 1994 David Edelsohn + + * rs6000.h (MASK_NO_FPR, TARGET_NO_FPR): Define. + (TARGET_SWITCHES): Add "fp-regs" and "no-fp-regs". + (CONDITIONAL_REGISTER_USAGE): Set FPRs fixed and call_used if + TARGET_NO_FPR. + + Fri Dec 9 16:06:23 1994 Doug Evans + + * fold-const.c (fold): Call real_zerop for real constants. + + Thu Dec 8 17:28:57 1994 Jason Merrill + + * dbxout.c (dbxout_type_method_1): Don't try to look at the first + argument of non-methods (which might not have a first argument). + + Thu Dec 8 16:07:27 1994 Roland McGrath + + * configure (mips-*-gnu*): Recognize this configuration. + * config/mips/gnu.h: New file. + + Thu Dec 8 15:41:32 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.c (extend_operator): New predicate. + * m68k.md (bsetmemqi, bclrmemqi): New patterns to set bit in memory + byte with bit number dynamic (use bclr/bset instructions). + + Thu Dec 8 14:13:45 1994 Paul Eggert + + * cccp.c (do_include): Don't turn newline markers into spaces + when expanding an include file name. + + * cccp.c (discard_comments): If traditional, replace a comment + with nothing instead of with a space. + + * cccp.c (char_name): New var. + (initialize_char_syntax): Initialize it. + (handle_directive): Use it to simplify printing of diagnostics. + Warn about '\r' too. + (create_definition, do_pragma, do_endif, make_assertion): Be consistent + about skipping all horizontal white space, not just space and tab. + + Thu Dec 8 13:54:38 1994 H.J. Lu (hjl@nynexst.com) + + * i386/linuxelf.h: Modified for stabs-in-ELF. + (PREFERRED_DEBUGGING_TYPE): Defined as DBX_DEBUG. + (FUNCTION_PROFILER): Use mcount instead of _mount. + (CPP_PREDEFINES): Add -D__ELF__. + (CPP_SPEC): Add -D__PIC__ -D__pic__ for -fPIC or -fpic. + (LIB_SPEC): Don't use any default library if -shared. + (LIBGCC_SPEC, LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): New specs. + * configure (gxx_include_dir): Set default to '$(prefix)/include/g++' + (i[345]86-*-linuxelf): New platform for ELF. + * crtstuff.c (CRT_END): Add dummy refs to ___brk_addr, __environ + and atexit if __linux__ and __PIC__ defined. + + Thu Dec 8 12:58:34 1994 Richard Kenner + + * config/xm-freebsd.h, i386/xm-freebsd.h: New files. + * configure (i[345]86-*-freebsd*): Use i386/xm-freebsd.h. + + Wed Dec 7 16:51:56 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md: New pattern for ior between SImode target and zero_extended + value. + + Wed Dec 7 16:42:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (distribute_notes): If can't find place for REG_DEAD + note, add an INSN with a USE to hold it. + + * tree.c (preserve_momentary): New function. + + Wed Dec 7 15:59:00 1994 Doug Evans + + * function.c (locate_and_pad_parm): Do padding before rounding + so pad_below knows how much is needed. + + Tue Dec 6 17:53:37 1994 Steve Chamberlain (sac@wombat.gnu.ai.mit.edu) + + * sh.md (ashrsi2_16): New pattern doesn't clobber reg 18. + (ashrsi2_31): Fix. + + Tue Dec 6 19:11:36 1994 Stephen L Moshier (moshier@world.std.com) + + * c-decl.c (init_decl_processing): Implement built-in functions + fabsf, sqrtf, sinf, cosf, fabsl, sqrtl, sinl, cosl. + + Tue Dec 6 18:42:15 1994 Pat Rankin (rankin@eql.caltech.edu) + + * make-gcc.com: Eliminate `set symbol/scope=noGlobal'. + + * vax/vms.h (CPP_PREDEFINES): Set __GNUC_MINOR__ to 7. + + Tue Dec 6 15:10:37 1994 Jason Merrill + + * sparc/t-sol2 (CRTSTUFF_T_CFLAGS): Don't use PIC if + cross-compiling, use the native assembler otherwise. + + Tue Dec 6 05:48:32 1994 Roland McGrath + + * configure (i[345]86-*-gnu*): Just set cpu_type=i386 here. + (*-*-gnu*): Match this in second case stmt and set other vars based on + $cpu_type. + * config/gnu.h: New file. + * config/i386/gnu.h: Include "gnu.h". + + Mon Dec 5 16:59:39 1994 Doug Evans + + * sparc/t-sparcbare (LIB2FUNCS_EXTRA): Compile fp-bit.c. + + Mon Dec 5 14:48:53 1994 Jim Wilson + + * unroll.c (copy_loop_body): Reformat CODE_LABEL_NUMBER macro call + to avoid HPUX compiler bug. + + Mon Dec 5 13:53:45 1994 Doug Evans + + * m68k.md (negsf2): Flip sign bit if software floating point. + (negdf2,negxf2): Likewise. + (abssf2): Zero sign bit if software floating point. + (absdf2,absxf2): Likewise. + + Mon Dec 5 13:00:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.h (EXTRA_CONSTRAINT, case 'R'): Fix error in last change. + + Mon Dec 5 00:40:11 1994 Doug Evans + + * Makefile.in (c-parse.h): Split away from c-parse.c for parallel + makes. + (bi-parser.h): Likewise with bi-parser.c. + + Sun Dec 4 21:04:40 1994 Doug Evans + + Delete this patch: + * reorg.c (fill_slots_from_thread): Create a USE insn for any + redundant insn we pretend to fill a delay slot with. Continue + searching for a suitable delay slot insn at the new USE insn. + + Fri Dec 2 11:29:41 1994 Per Bothner + + * expr.c (store_constructor): Add support for SET_TYPE. + + Fri Dec 2 18:14:09 1994 David Edelsohn + + * rs6000.h (MASK_64BIT, TARGET_64BIT, SHORT_TYPE_SIZE): Define. + (INT_TYPE_SIZE, MAX_INT_TYPE_SIZE, LONG_TYPE_SIZE): Define. + (MAX_LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, CHAR_TYPE_SIZE): Define. + (FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Define. + (POINTER_SIZE, PARM_BOUNDARY): Depend on TARGET_64BIT. + (BIGGEST_ALIGNMENT, STARTING_FRAME_OFFSET): Likewise. + (FIRST_PARM_OFFSET, REG_PARM_STACK_SPACE): Likewise. + (STACK_POINTER_OFFSET, Pmode, FUNCTION_MODE): TARGET_64BIT dependent. + * xcoffout.c (xcoff_output_standard_types): Add TARGET_64BIT + dependencies. Add "wchar", "long long int", and "long long + unsigned int" built-in C types. + + Fri Dec 2 18:08:16 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * integrate.c (subst_constant): Don't treat all virtual regs as + constants, just those that are off FP and AP, but not SP. + (expand_inline_function): If called function calls alloca, save and + restore SP around its call. + + * rs6000.c (input_operand): Correctly check for SYMBOL_REF + referring to the TOC. + * rs6000.h (EXTRA_CONSTRAINT): Likewise. + + Wed Nov 30 20:42:57 1994 Jeffrey A. Law + + * combine.c (record_dead_and_set_regs_1): Handle SUBREGs. + + * expr.c (convert_move): When emit multiword conversion, force FROM + into a new pseudo-reg if it overlaps TO. + + * fold-const.c (fold_truthop): Delete BIT_AND_EXPR of constants + with masks. + + Wed Nov 30 18:22:31 1994 David Edelsohn + + * rs6000.h (BITS_PER_WORD): TARGET_POWERPC64 dependent. + (MAX_BITS_PER_WORD): Define. + (UNITS_PER_WORD): TARGET_POWERPC64 dependent. + (MAX_UNITS_PER_WORD): Define. + (UNITS_PER_FP_WORD): Define. + (HARD_REGNO_NREGS): Use MAX_UNITS_PER_FP_WORD. + (HARD_REGNO_MODE_OK): Likewise. + (CLASS_MAX_NREGS): Likewise. + (MOVE_MAX): TARGET_POWER and TARGET_POWERPC64 dependent. + (MAX_MOVE_MAX): Define. + * rs6000.md (floatsidf2): Test BITS_PER_WORD in pattern condition + not during build. Fail if TARGET_POWERPC64. + (floatunssidf2): Likewise. + + * rs6000.md (extendsidi2): Use lwa_operand predicate. + (sign_extend load with update): New PowerPC64 pattern. + * rs6000.c (lwa_operand): New predicate. + * rs6000.h (PREDICATE_CODES): Add lwa_operand. + + Wed Nov 30 18:19:08 1994 Will Athanasiou (will@westford.ccur.com) + + * rs6000.md (extendsfdf2): SFmode and DFmode register format + identical so use define_expand with paradoxical subreg no-op and + accompanying new define_split. + + Wed Nov 30 18:05:03 1994 Michael Collison (collison@sw.stratus.com) + + * reload.c (combine_reloads): If using reg dying in this insn as + reload reg, ensure it can't be a secondary output reload reg. + + Wed Nov 30 15:48:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (emit_block_move): Only use movstr if size is + small enough constant or MODE is at least BITS_PER_WORD. + + * c-common.c (decl_attribute): Allow special names (e.g, `word') + for mode attribute. + * libgcc2.c (word_type): Use __attribute__ ((mode (__word__))). + + Tue Nov 29 16:50:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (expand_shift): Open-code rotate even if by a variable. + * optabs.c (init_optabs): Don't set functions for rotl and rotr. + + Tue Nov 29 00:39:56 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (DEFAULT_PCC_STRUCT_RETURN): Define as zero. + (RETURN_IN_MEMORY): Only large structs (>8 bytes) and addressable + structs should be returned in memory. + * calls.c (expand_call): Handle returning BLKmode values in + registers. Do not try to promote BLKmode. + * expr.c (expand_assignment): For BLKmode structure returns, + copy the return value from registers into the target memory + locations. + * integrate.c (function_cannot_inline_p): Do not inline functions + which return a BLKmode value in registers. + * stmt.c (expand_return): For BLKmode structure returns, copy + the return value from memory into the return registers. Use + an integer mode rather than BLKmode for returning structures + in registers. + * explow.c (hard_function_value): Change a register in BLKmode + to a register in a sufficiently wide integer mode. + + * calls.c (expand_call): Do not set is_integrable if the + function is not inlineable according to function_cannot_inline_p. + + Mon Nov 28 18:53:06 1994 Dave Love (d.love@dl.ac.uk) + + * Makefile.in (FLAGS_TO_PASS): Fix typo in GCC_FOR_TARGET. + + Mon Nov 28 18:15:58 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * configure (lang): Really fix the quoting bug in bash 1.12. + + Mon Nov 28 18:03:48 1994 Jim Wilson (wilson@cygnus.com) + + * expmed.c (store_bit_field, extract_bit_field): Consistently use + SLOW_UNALIGNED_ACCESS instead of STRICT_ALIGNMENT. + * expr.c (move_by_pieces, move_by_pieces_ninsns, emit_push_insn, + expand_assignment, store_field, expand_expr): Likewise. + (SLOW_UNALIGNED_ACCESS): Default to STRICT_ALIGNMENT, not zero. + + * cccp.c (create_definition): Error if comma not followed by an + identifier. + (collect_expansion): Error if # used in macro with no arguments. + + * c-decl.c (finish_decl): Use DECL_CONTEXT instead of + current_binding_level to identify file-scope variables. + + Wed Nov 23 19:44:25 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * sh.c (MSW, LSW): New macros. + (print_operand_address): Added 'T' and 'S'. Modified + to support alternate endianness. + (output_movedouble): Support both byte orders. + (output_options): Tell assembler when in little endian mode. + (shiftinsns): New function to calculate shift cost more + accurately. + (gen_shifty_op): Use new function. + * sh.h (CPP_SPEC, ASM_SPEC, LINK_SPEC, LIBGCC2_WORDS_BIG_ENDIAN): New. + (TARGET_SWITCHES, WORDS_BIG_ENDIAN, BYTES_BIG_ENDIAN, ): Support + both byte orders. + * sh.md (addi3, subdi3, ashrdi3, ashldi3, extendsidi2, movdi, movdf): + Support both byte orders. + (ashrsi2_16, ashrsi2_31): New. + t-sh: Support both byte orders. + + Wed Nov 23 17:25:43 1994 Ian Dall (dall@hfrd.dsto.gov.au) + + * config/ns32k/{ns32k.c,ns32k.h}: Add -mhimem to + support linking above 0x20000000 boundary. + + * config/ns32k/{netbsd.h,pc532.h, ns32k.c}: Fix meaning + of BASE_REG_NEEDED. + + Wed Nov 23 17:24:24 1994 Matthias Pfaller (leo@marco.de) + + * configure (ns32k-pc532-netbsd): No need for fixincludes + and libgcc1. + * ns32k/ns32k.h (CONST_COSTS): Correct range is -0x1fff to 0x2000. + * ns32k/ns32k.md (everywhere): Correct range is -0x1fffffff + to 0x20000000, others have to be loaded with movd. + Shortcircuit with TARGET_32532 as early as possible. + (movsi): Use movd to load unknown symbol values. to allow + * ns32k/ns32k.c (print_operand): Removed dead code. + * ns32k/pc532.h (TARGET_DEFAULT): Forbid usage of bitfield + instructions. + + Wed Nov 23 14:09:42 1994 Jim Wilson (wilson@cygnus.com) + + * mips.c (mips_output_external): Exclude __builtin_next_arg from list + of used external functions. + + * sh.c (arith_reg_operand): Disallow MACH_REG and MACL_REG. + + * sparc.h (SECONDARY_MEMORY_NEEDED_RTX, SECONDARY_MEMORY_NEEDED_MODE): + Use MODE not mode. + + Wed Nov 23 13:30:52 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (emit_move_insn): If splitting up into individual words + and X is a push_operand, do the push and reference top of stack. + + Tue Nov 22 21:39:52 1994 Doug Evans (dje@cygnus.com) + + * mips/elf64.h (ASM_OUTPUT_SECTION_NAME): Define. + + Tue Nov 22 06:29:21 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold_convert): Don't fold conversion if it would + produce constant larger than we can support. + * emit-rtl.c (gen_lowpart_common): Do nothing if size is + greater than twice host wordsize, not just if equal. + + * optabs.c (emit_no_conflict_block): Just emit the insns if + the block contains something not an INSN or has an embedded block. + + * emit-rtl.c (init_emit): Set REGNO_POINTER_FLAG + for HARD_FRAME_POINTER_REGNUM. + + * machmode.h (ptr_mode): Add declaration. + * emit-rtl.c (ptr_mode): Add definition. + (init_emit_once): Initialize ptr_mode. + * stor-layout.c (layout_type): Use ptr_mode instead of equivalent + call to mode_for_size. + + Mon Nov 21 18:41:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * varasm.c (output_constant): When eliminating conversions, + treat ARRAY_TYPE like a record. + + * m68k.md (movqi): Fix typo in push/pop case. + + Mon Nov 21 18:11:55 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * genopinit.c (gen_insn): Use GET_MODE_WIDER_MODE macro instead of + directly accessing the array. + + Mon Nov 21 17:59:07 1994 David Edelsohn + + * aix41.h (LINK_SPEC): New overriding defintion. + + Mon Nov 21 17:44:01 1994 John F Carr (jfc@mit.edu) + + * rs6000.c (input_operand): Allow a SYMBOL_REF referring to a + symbol in the TOC. + + Mon Nov 21 14:39:13 1994 Doug Evans (dje@cygnus.com) + + * mips/t-ecoff (dp-bit.c): Fix typos. + + Mon Nov 21 14:06:29 1994 Jim Wilson (wilson@cygnus.com) + + * emit-rtl.c (operand_subword): For CONST_DOUBLE, add case to + handle BITS_PER_WORD of 16. + + * reload1.c (reload): When decrement max_groups of superclass, can + only do so if the group_size is smaller than the current group. + + * c-lex.c (yylex): Do warn about floating point out of range if + target floating-point format is IEEE. Use warning instead of + pedwarn to avoid getting errors. + + Mon Nov 21 13:37:03 1994 Doug Evans (dje@cygnus.com) + + * m88k/m88k-aout.h (CPP_PREDEFINES): Add -Acpu and -Amachine. + * m88k/m88k-coff.h (CPP_PREDEFINES): Likewise. + (DBX_DEBUGGING_INFO): Define. + + * m68k/t-m68kbare (MULTILIB_MATCHES): Treat m68302/m68332 like m68000. + + Mon Nov 21 00:58:36 1994 Jeffrey A. Law (law@mole.gnu.ai.mit.edu) + + * pa.c (output_call): When emitting an inline long-call, use LP% + and RP% prefixes to get the function's address. + + Sun Nov 20 07:00:25 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Makefile.in (objc-parse.y): Fix typo. + + * t-svr3: Deleted. + * t-svr4 (EXTRA_PARTS): Deleted. + * i386/t-crtstuff, i386/t-crtpic: New files. + * i386/t-svr3dbx (EXTRA_PARTS): Deleted. + * configure: Replace use of t-svr3 with extra_parts definition. + Add extra_parts to t-svr4 users; likewise for i386/t-svr3dbx. + (i386 configurations): Add t-crtstuff if can't build crtstuff.c + with -fomit-frame-pointer; use t-crtpic if also must build with -fpic. + + Sat Nov 19 17:14:54 1994 Jim Wilson (wilson@cygnus.com) + + * m68k/lb1sf68.asm (addsf3): After using swap for 16 bit rotate, + branch back only if count still greater than 0. + + * c-typeck.c (build_binary_op): Can shorten shift only if shift count + is less than size in bits of arg0. + * expmed.c (expand_shift): Re-enable truncation of immediate shift + count. + + * mips.c (mips_const_double_ok): Accept VOIDmode not DImode. + (mips_move_1word): Accept VOIDmode CONST_DOUBLE. + + Sat Nov 19 05:36:35 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (print_operand, case 'c', case 'd'): New cases. + * alpha.md (sign_extend): Disable pattern with explicit SUBREG. + (cmov): Allow first operand of comparison to be zero, 2nd reg. + + * a29k/unix.h (DEFAULT_PCC_STRUCT_RETURN): Define as 0. + * a29k/x-unix (CLIB): Remove -lsysv. + + Fri Nov 18 22:37:26 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * m88k/mot-sysv4.h: Remove, no longer needed. + * configure: Remove m88k-mot*-sysv4* special case. + + * collect2.c: Make various functions static. + + * sparc/sysv4.h ([CD]TORS_SECTION_ASM_OP): Remove #execinstr. + + * svr4.h, i386/sol2.h, m88k/dgux.h, sparc/sol2.h + (LINK_SPEC): Pass -z text when -shared or -symbolic. + * svr4.h (LIBGCC_SPEC): Don't pass -lgcc when -symbolic. + + * crtstuff.c: Fix comments. + + Fri Nov 18 22:36:26 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * pa/pa-hpux.h (LDD_SUFFIX): Move to pa.h. + (PARSE_LDD_OUTPUT): Ditto. + * pa/pa.h: (LDD_SUFFIX): Move from pa-hpux.h. + (PARSE_LDD_OUTPUT): Ditto. + (LINK_SPEC): Pass -b if -shared. Don't pass -u main if -shared. + * pa/pa1-osf.h: Reduce code duplication. + + Fri Nov 18 22:35:26 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * Makefile.in (crt{begin,end}.o): Pass $(CRTSTUFF_T_CFLAGS). + (CRTSTUFF_T_CFLAGS): New variable. + + * svr4.h, m88k/sysv4.h, sparc/sysv4.h (FINI_SECTION_ASM_OP): Define. + * i386/sol2.h (FORCE_FINI_SECTION_ALIGN): Define to + FORCE_INIT_SECTION_ALIGN. + * m88k/dgux.h, m88k/mot-sysv4.h, sparc/sysv4.h + (INIT_SECTION_PREAMBLE): Remove. + * svr4.h, sparc/sol2.h (STARTFILE_SPEC): Include crti.o and + values-X?.o when building a shared lib. + * svr4.h, i386/sol2.h, sparc/sol2.h (LIB_SPEC): Remove endfiles. + (ENDFILE_SPEC): Handle endfiles. + + * libgcc2.c (__do_global_dtors): Don't define if + INIT_SECTION_ASM_OP and OBJECT_FORMAT_ELF. + (L_[cd]tor_list): Lose unused pieces. + + * crtstuff.c (__[CD]TOR_{LIST,END}__): static if OBJECT_FORMAT_ELF. + (__do_global_ctors_aux): In .text if OBJECT_FORMAT_ELF. + (__do_global_dtors_aux): Ditto. + (init_dummy): Dummy function to stick a call to __do_global_ctors_aux + into the .init section if OBJECT_FORMAT_ELF. + (fini_dummy): Similarly. + Remove reference to INIT_SECTION_PREAMBLE. + + * mips/iris5.h (HAS_INIT_SECTION): Define. + (LINK_SPEC): Pass -u __main -init __main if not -shared. + (STARTFILE_SPEC): Don't include these when -shared. + (LIB_SPEC): Don't include these when -shared. + (ENDFILE_SPEC): Define. + (LD_INIT_SWITCH): Define. + (LD_FINI_SWITCH): Define. + + * alpha/alpha.h (LD_INIT_SWITCH): Define. + (LD_FINI_SWITCH): Define. + (INIT_NAME_FORMAT): Lose. + (FINI_NAME_FORMAT): Lose. + + Fri Nov 18 22:34:26 1994 Ronald F. Guilmette (rfg@segfault.us.com) + + * crtstuff.c, svr4.h, i860/sysv4.h, m88k/sysv4.h, sparc/sysv4.h + (CTORS_SECTION_ASM_OP): Remove @progbits, add SHF_WRITE. + (DTORS_SECTION_ASM_OP): Ditto. + + * t-svr4, i386/t-sol2, m88k/t-sysv4, sparc/t-sol2 + (CRTSTUFF_T_CFLAGS): Define to -fpic. + + Fri Nov 18 22:33:26 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * gcc.c (LIBGCC_SPEC): New spec. + (link_command_spec): Use LIBGCC_SPEC. + (set_spec): Handle LIBGCC_SPEC. + (process_command): Ditto. + (do_spec_1): %G is LIBGCC_SPEC. + (validate_all_switches): Also validate LIBGCC_SPEC. + + * alpha/alpha.h (LIBGCC_SPEC): Do include libgcc when + creating a shared library. + + Fri Nov 18 22:32:26 1994 Steve Dum (steve_dum@mentorg.com) + + * collect2.c (SUNOS4_SHARED_LIBRARIES): Support scanning the + _DYNAMIC field of SunOS 4 shared libraries directly. + + Fri Nov 18 22:31:26 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * collect2.c (main): For shared libraries, link in stubs even if + there are no constructors or destructors so that static objects + can be added without re-linking everything that uses the library. + (write_c_file_stat): Tweak. + + * configure: Use sunos4.h instead of sparc.h for SunOS 4 targets. + + * sparc/sunos4.h: New file for SunOS 4-specific things. + (SUNOS4_SHARED_LIBRARIES): Define to 1. + * sparc/sparc.h: (LINK_SPEC): Support -shared. + (LIB_SPEC): Ditto. + + * pa/pa-hpux.h (LDD_SUFFIX): New macro. + (PARSE_LDD_OUTPUT): New macro. + (LINK_SPEC): Pass -b if -shared. Don't pass -u main if -shared. + (LIB_SPEC): Don't include if -shared. + + * collect2.c (scan_prog_file): Ignore undefined symbols. + + Fri Nov 18 22:30:26 1994 Steve Dum (steve_dum@mentorg.com) + + * collect2.c (enum pass): Add PASS_LIB. + (is_ctor_dtor): Check for shared library constructor and destructor + functions, too. + (main): Add o_file after any link libraries, too. + Create a shared object if COLLECT_GCC_OPTIONS contains -shared. + Also scan shared libraries for constructors and destructors if + LDD_SUFFIX is defined. + (write_c_file_stat): New function to write out file for a shared + object. + (write_c_file_glob): Renamed from write_c_file. + (write_c_file): Calls one of write_c_file_{stat,glob}. + (scan_prog_file): Update to deal with shared libraries. + (scan_libraries): New function to scan shared libraries for + constructors and destructors. + + Fri Nov 18 19:16:19 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.c (addrs_ok_for_quad_peep): New function. + (output_prolog): Use liu mnemonic. + (registers_ok_for_quad_peep): New function. + * rs6000.md (peepholes for two DF load/store): New peepholes. + + Fri Nov 18 19:10:24 1994 Kresten Krab Thorup (krab@next.com) + + * objc/object.c (class_create_instance): Replace memchr + with memset. + + Fri Nov 18 19:06:15 1994 Doug Evans (dje@cygnus.com) + + * sparc/lite.h: #include "gofast.h" + (INIT_SUBTARGET_OPTABS): Define. + + Fri Nov 18 19:01:51 1994 Richard Kenner + + * Makefile.in (extraclean): Remove *.ps. + + Fri Nov 18 18:53:57 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * cccp.c (create_definition): Allow carriage-return ('\r') + as white space in simple or empty expansion. + + Fri Nov 18 18:30:40 1994 Douglas Rupp (drupp@cs.washington.edu) + + * winnt/ld.c (main): Fix off-by-one error allocating sdbuff. + + Fri Nov 18 18:23:54 1994 Mike Collison (collison@sw.stratus.com) + + * regclass.c (record_reg_classes): For single SET between hard reg + alone in a class and pseudo, ensure reg is the only member of class. + + Fri Nov 18 15:15:27 1994 Jim Wilson (wilson@cygnus.com) + + * sol2.h (MD_STARTFILE_PREFIX): Delete. + + Fri Nov 18 14:16:04 1994 Chris Huey (cah@tactix.rain.com) + + * Makefile.in (objc-parse.y, mostlyclean): Rename temp file + for objc-parse.y to be under 14 characters. + + Thu Nov 17 20:46:15 1994 Doug Evans + + VxWorks support from various people at Cygnus. + * config.sub: Vendor for vxworks is wrs. + * configure (i960-wrs-vxworks*): New target. + (m68k-wrs-vxworks*): New target. + (sparc-wrs-vxworks*, sparclite-wrs-vxworks*): New targets. + * i960/t-vxworks960, i960/vx960-coff.h, i960/vx960.h: New files. + * m68k/t-vxworks68, m68k/vxm68k.h: New files. + * sparc/t-vxsparc, sparc/vxsparc.h: New files. + + * h8300/h8300.h (DBX_DEBUGGING_INFO): Define. + (PREFERRED_DEBUGGING_TYPE): Define to SDB_DEBUG. + + * configure (--program-prefix, --program-suffix, + --program-transform-name, -v, -verbose): New arguments. + (as): If gas is in build tree, use it. + (ld, real-ld): Likewise but watch for use_collect. + (program_transform_name): Update Makefile if + --program-transform-name given. + (program_transform_cross_name): Likewise. + * Makefile.in (program_transform_name): Define. + (program_transform_cross_name): Define. + (GCC_INSTALL_NAME, GCC_CROSS_NAME): Define. + (install-common): Use them. + (install-man): Likewise. + (distclean): Delete *.asm. + (stage*, risky-stage*): If as/ld/real-ld exist, copy them to stage dir. + + Embedded target support from various Cygnus people. + * config.sub (sparc): Recognize as a cpu. + (ecoff*, vsta, udi): Recognize as os's. + (udi29k): New alias. + * configure: (a29k-*-udi): New target. + (i[345]86-*-aout*): New target. + (i[345]86-*-coff*): New target. + (i[345]86-*-vsta): New target. + (m68k-*-aout*): New target. + (m68k-*-coff*): New target. + (m88k-*-aout*): New target. + (m88k-*-coff*): New target. + (mipsel-*-ecoff*): New target. + (mips-*-ecoff*): New target. + (mipsel-*-elf*): New target. + (mips-*-elf*): New target. + (mips64el-*-elf*): New target. + (mips64orionel-*-elf*): New target. + (mips64-*-elf*): New target. + (mips64orion-*-elf*): New target. + (sparc-*-aout*): New target. + (sparclite-*-coff*): New target. + (sparclite-*-*): Set tmake_file to sparc/t-sparclite. + (mips*-*-*): Changed from mips-*-*. + * optabs.c (expand_unop): Try subtraction from zero if there isn't a + negate library function. + * config/gofast.h: New file. + * a29k/a29k-udi.h, a29k/t-a29kbare: New files. + * i386/i386-aout.h, i386/i386-coff.h, i386/t-i386bare: New files. + * i386/vsta.h, i386/t-vsta, i386/x-vsta, i386/xm-vsta.h: New files. + * m68k/coff.h: New file (renamed from m68k-coff.h). + * m68k/lynx-ng.h, m68k/lynx.h: Include it. + * m68k/fpgnulib.c, m68k/lb1sf68.asm, m68k/m68kemb.h: New files. + * m68k/m68k-aout.h, m68k/m68k-coff.h, m68k/m68k-none.h: New files. + * m68k/t-m68kbare: New file. + * m88k/m88k-aout.h, m88k/m88k-coff.h, m88k/t-bug: New files. + * mips/ecoff-gdb.h, mips/ecoff.h, mips/ecoffl-gdb.h: New files. + * mips/ecoffl.h, mips/elf.h, mips/elf64.h, mips/elfl.h: New files. + * mips/elfl64.h, mips/elflorion.h, mips/elforion.h: New files. + * mips/t-ecoff: New files. + * sparc/lb1spc.asm, sparc/lb1spl.asm, sparc/litecoff.h: New files. + * sparc/sparc-aout.h, sparc/t-sparcbare, sparc/t-sparclite: New files. + + Thu Nov 17 18:32:24 1994 Torbjorn Granlund (tege@tiny.cygnus.com) + + * cse.c (simplify_binary_operation): Do (x - (x & y)) -> (x & ~y). + + Thu Nov 17 17:26:02 1994 Mark P. Gooderum (mark@good.com) + + * stddef.h: Include on NetBSD. + Check for _BSD_XXX_T_ as well as _XXX_T_. + Add _BSD_XXX_T_ to list of defines to check and define for a given + type for SIZE_T, PTRDIFF_T, and WCHAR_T. + + Thu Nov 17 11:11:50 1994 Mike Collison (collison@sw.stratus.com) + + * dsp16xx.c (notice_update_cc): Removed reference to obsolete LSHIFT. + * dsp16xx.h (RTX_COSTS): Likewise. + + Thu Nov 17 11:06:43 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (some_operand): New function. + * alpha.h (PREDICATE_CODES): Add `some_operand'. + * alpha.md (addsi3, adddi3): For patterns valid only + during reload, allow operand 1 to be `some_operand'. + + * flow.c (find_auto_inc): Insert missing "return" statement. + + * c-common.c (print_char_table): Allow `L' for `u'. + + Thu Nov 17 10:15:50 1994 Richard Stallman + + * config.sub: Accept -domain as OS, and make it default for Apollo. + + Wed Nov 16 19:28:46 1994 Jim Wilson (wilson@chestnut.cygnus.com) + + * loop.c (move_movables): For move_insn case, skip notes when deleting + instructions. + + Wed Nov 16 16:13:48 1994 Ian Lance Taylor (ian@cygnus.com) + + * bi-run.h: Always check BITS_BIG_ENDIAN, BYTES_BIG_ENDIAN, and + WORDS_BIG_ENDIAN at run time, never at compile time. + * bytecode.h, combine.c, cse.c, dbxout.c, dwarfout.c: Likewise. + * expmed.c, expr.h, final.c, fold-const.c, function.c: Likewise. + * jump.c, objc-act.c, real.c, real.h, recog.c, reload.c: Likewise. + * reload1.c, sdbout.c, tree.c, varasm.c: Likewise. + * real.c: Replace uses of MIEEE and IBMPC with a compile time + check of IEEE and a runtime check of FLOAT_WORDS_BIG_ENDIAN. + * libgcc.2 (LIBGCC2_WORDS_BIG_ENDIAN): If not defined, define to + WORDS_BIG_ENDIAN. Use it instead of WORDS_BIG_ENDIAN. + * mips-tfile.c (init_file): Initialize fBigendian field based on + HOST_WORDS_BIG_ENDIAN, not BYTES_BIG_ENDIAN. + * config/mips/mips.h (MASK_BIG_ENDIAN): Define, replacing + MASK_UNUSED4. + (TARGET_BIG_ENDIAN): Define. + (TARGET_SWITCHES): Add eb and el. Include TARGET_ENDIAN_DEFAULT + in default value. + (TARGET_ENDIAN_DEFAULT): Define if not defined, based on + DECSTATION. + (CC1_SPEC): Convert -EB to -meb, convert -EL to -mel, and warn if + -EB and -EL are both used. + (CPP_SPEC): If -EB is seen, undefine MIPSEL, _MIPSEL, __MIPSEL and + __MIPSEL__, and define _MIPSEB, __MIPSEB, __MIPSEB__ and MIPSEB + (the last only if -ansi was not seen). Similarly if -EL is seen. + (REAL_ARITHMETIC): Define. + (BYTES_BIG_ENDIAN, WORDS_BIG_ENDIAN): Base on TARGET_BIG_ENDIAN. + (LIBGCC2_WORDS_BIG_ENDIAN): Define. + (CONST_COSTS): Use split_double in CONST_DOUBLE case. + * config/mips/mips.c (mips_move_2words): Use split_double rather + than CONST_DOUBLE_LOW and CONST_DOUBLE_HIGH. + (output_block_move): Check BYTES_BIG_ENDIAN at run time, not + compile time. + (print_operand): Check WORDS_BIG_ENDIAN, rather than using + MOST_SIGNIFICANT_WORD and LEAST_SIGNIFICANT_WORD. + * config/mips/t-mips (MULTILIB_OPTIONS, MULTILIB_DIRNAMES, + MULTILIB_MATCHES, LIBGCC, INSTALL_LIBGCC): Define to build both + big and little endian versions of libgcc.a. + * config/mips/t-mips-gas: LIkewise. + * config/mips/dec-bsd.h (CPP_SPEC): Same change as in mips.h. + * config/mips/dec-osf1.h (CPP_SPEC): Likewise. + * config/mips/iris3.h (CPP_SPEC): Likewise. + * config/mips/iris5.h (CPP_SPEC): Likewise. + * config/mips/osfrose.h (CPP_SPEC): Likewise. + (CC1_SPEC): Same change as in mips.h. + + Wed Nov 16 16:04:21 1994 Paul Eggert + + * cccp.c (rescan): Remove unnecessary comparisons of ibp to limit. + + Wed Nov 16 07:48:17 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * regclass.c (record_reg_classes): Handle case of single SET + between a hard register alone in a class and a pseudo. + + * tree.c (integer_{zero,one,all_ones,pow2}p): Handle COMPLEX_CST. + (real_{zero,one,two}p): Likewise. + + * gcc.c (main): For -V output, give both driver and compiler + versions, if they differ. + + * toplev.c (rest_of_compilation): Always rerun jump_optimize + after CSE if -O2. + + * fold-const.c (fold): If moved conversion into COND_EXPR, + leave it there if it is an integral conversion to word or narrower. + (fold, case NOP_EXPR): Ignore conversion to same type as operand. + (fold, case COND_EXPR): Make third operand the simplest. + + * expr.c (convert_move): Don't put FROM in a register if it + is a SUBREG. + (store_expr): If don't want a value and storing into promoted + variable, do conversion at tree level; don't copy volatile MEM + unless want value, as comment says. + + Tue Nov 15 20:02:34 1994 Doug Evans (dje@cygnus.com) + + * varasm.c (named_section): New argument decl, all callers changed. + * h8300/h8300.h, sh/sh.h, sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): + New arg DECL. + + Mon Nov 14 15:07:19 1994 Jason Merrill + + * tree.h (POINTER_TYPE_P): New macro. + * m68k/m68kv4.h, m68k/mot3300.h (FUNCTION_VALUE): Use + POINTER_TYPE_P rather than checking the type against + POINTER_TYPE (to include references). + * function.c (init_function_start): Ditto. + + * alpha/alpha.h (FUNCTION_VALUE): Use INTEGRAL_MODE_P rather than + checking the type against various integral and pointer types. + + * m68k/{3b1,3b1g,crds,mot3300}.h: Don't define __PTR_TO_INT and + __INT_TO_PTR. + * m68k/xm-{3b1,crds,mot3300}.h: Define __PTR_TO_INT and __INT_TO_PTR. + + Tue Nov 15 19:29:04 1994 Per Bothner + + * tree.c (staticp): A non-nested function is always static. + + Tue Nov 15 19:12:03 1994 Jim Meyering (meyering@comco.com) + + * Makefile.in (specs, float.h-cross, xlimits.h): Use temporary instead + of redirecting output directly to make target. + ($(MD_FILE), xsys-protos.h): Likewise. + (mostlyclean): Remove any of these temporaries. + (libgcc2.a): Add missing semicolon in commented code that could cause + a /bin/sh syntax error if uncommented. + + Tue Nov 15 19:07:00 1994 Warner Losh (imp@village.org) + + * i386/freebsd.h (NO_IMPLICIT_EXTERN_C): Define. + + Tue Nov 15 19:00:55 1994 Richard Kenner + + * reorg.c (redundant_insn): Renamed from redundant_insn_p; all + callers changed. + + Tue Nov 15 18:57:46 1994 Jim Wilson (wilson@chestnut.cygnus.com) + + * reorg.c (relax_delay_slots): When invert a conditional jump over a + single unconditional jump, invert the INSN_FROM_TARGET_P bit of insns + in the delay slots. + + * reorg.c (redundant_insn_p): Change return type to rtx. Return the + redundant insn instead of true. + (update_reg_unused_notes): New function. + (fill_slots_from_thread): Call update_reg_unused_notes after one of + the redundant_insn_p calls. + + Tue Nov 15 18:39:33 1994 Torbjorn Granlund (tege@tiny.cygnus.com) + + * expmed.c (expand_divmod, case ROUND_DIV_EXPR): Implement. + * expr.c (do_jump_by_parts_greater_rtx): No longer static. + (expand_expr): Delete code for plain `abs'. + * optabs.c (expand_abs): New function, code moved from expand_expr. + * expr.h: Declare expand_abs. + + Tue Nov 15 12:11:26 1994 Jeffrey A. Law (law@mole.gnu.ai.mit.edu) + + * pa.c (output_cbranch): Improve code for short backwards branch + with an unfilled delay slot. + (output_bb, output_dbra, output_movb): Likewise. + + Tue Nov 15 09:55:31 1994 Doug Evans (dje@cygnus.com) + + * jump.c (delete_insn): Delete labels in ADDR_VECs and + ADDR_DIFF_VECs if their use count becomes zero. + * flow.c (flow_delete_insn): New function. + (find_basic_blocks): Call it to physically delete insns in + unreachable blocks. When scanning blocks after dead ones, + start scanning after the dead one (not at the dead one). + If there are lots of unreachable blocks, make another pass to squeeze + them out (this reduces memory usage in some pathalogical cases by a + significant amount without resorting to sparse matrices). + (propagate_block): Make code a bit more efficient (for example, + no need to test `loop_depth' for each insn, just notes). + + Tue Nov 15 09:42:31 1994 Lynn Shumaker (shumaker@saifr00.ateng.az.honeywell.com) + + * function.c (assign_stack_temp): Compute size of slot after + assign_stack_local has accounted for alignment. + + Mon Nov 14 23:47:20 1994 Torbjorn Granlund (tege@tiny.cygnus.com) + + * pa.h (GO_IF_LEGITIMATE_ADDRESS): Allow + (lo_sum (reg) (unspec (symref))). + + * pa.md (pic2_lo_sum): New pattern matching when -fPIC using UNSPEC. + * pa.c (legitimize_pic_address): Generate an insn matching + pic2_lo_sum when -fPIC. + + * pa.md (pic_highpart): Add missing mode for PLUS. + (add_high_const): Likewise. + + * pa.md (matcher for plain lo_sum): Call abort if this happens + when generating pic or PIC. + + Mon Nov 14 23:47:20 1994 Jeffrey A. Law (snake.cs.utah.edu) + + * Automatic generation of inline long call sequences when needed. + * pa.h (TARGET_LONG_CALLS): Delete. Replace all uses of with + TARGET_PORTABLE_RUNTIME. + (TARGET_MILLICODE_LONG_CALLS): New target flag. + * pa.c (output_function_prologue): Keep track of the total number + of code bytes emitted for each source file. + (output_call): Handle TARGET_PORTABLE_RUNTIME and millicode calls + for TARGET_MILLICODE_LONG_CALLS. Emit an inline long-call if + needed. If emitting an inline long-call, perform argument relocations + before the call if they are needed, unfill the delay slot of the + call if necessary. + * pa.md (define_delay for millicode): Disable the delay slot if + TARGET_MILLICODE_LONG_CALLS. + (millicode insns and indirect calls): Properly compute length for + both TARGET_PORTABLE_RUNTIME and TARGET_MILLICODE_LONG_CALLS. + (call_internal_symref): Properly compute the length when more + than 240000 bytes of code have already been output. Take + TARGET_MILLICODE_LONG_CALLS into account in the length + computation. + + * pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define. + (ASM_FILE_END): Delete unneeded definition. + + * Fast indirect call support. + * pa.h (TARGET_FAST_INDIRECT_CALLS): New target switch. + (TARGET_SWITCHES): Add "fast-indirect-calls" and inverse. + * pa.md (call_internal_reg, call_value_internal_reg): Generate + appropriate code for TARGET_FAST_INDIRECT_CALLS. + + * PA PIC support. + * pa.c (secondary_reload_class): Refine. Readonly data needs a + secondary reload only during PIC generation. Loading a floating + point register with a constant requires a register from R1_REGS + during -fPIC code generation. + (read_only_operand): Constant pool entries are no longer read only + during PIC code generation. + (hppa_legitimize_address): If flag_pic is nonzero, then + immediately call legitimize_pic_address. + (emit_move_sequence): Call legitimize_pic_address to handle + constant data. Handle secondary reloads for PIC. Use + pic_label_operand rather than open coding the test. Handle + loading a LABEL_REF when generating PIC. + (legitimzie_pic_address): Handle constant data addressing for PIC + here. Fix loading of symbolic addresses for -fPIC generation. + (pic_label_operand): Renamed from pic_operand. Handle any read + only operand (such as constant data). Reject function addresses, + Accept SYMBOL_REF with the read-only bit set. Generalize to + handle (const (plus (reg) (int))). + (finalize_pic): Delete unused function. + (check_pic): Delete function. + (pic_pc_rtx): Delete variable definition. + (current_function_uses_pic_offset_table): Delete extern decl. + (force_reg, validize_mem): Likewise. + (output_global_address): Don't tack on "-$global$" when generating + PIC code. + (finalize_pic): Don't emit code for initialization of + hppa_save_pic_table_rtx here. Don't claim we USE + pic_offset_table_rtx at function end. + * pa.h (SELECT_RTX_SECTION): Define. During PIC generation + everything (in the constant pool) goes into the data space. + (PRINT_OPERAND_ADDRESS): Handle CONST_INTs during PIC + generation. Handle LO_SUM address during -fPIC generation. + (LEGITIMATE_CONSTANT_P): Reject function labels when generating + PIC code. + (GO_IF_LEGITIMATE_ADDRESS): Only accept pic_reg + SYMBOL_REF for + -fpic. + (EXTRA_SECTION_FUNCTIONS): For -fpic, use the TEXT section for + constants to avoid GAS lossage. + (OVERRIDE_OPTIONS): Delete. + (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED): Define. + (FINALIZE_PIC): Delete definition. + (INIT_EXPANDERS): Define. Clear hppa_save_pic_table_rtx here. + * pa.md: Use !flag_pic rather than calling check_pic. + (HImode high and lo_sum): Only accept const_int_operands. + (pic_load_label): Force output to be in %r1. + (pic_highpart): New pattern. Output must go into %r1. More + linker trickery. + (symbolic high and lo_sum): Disallow during PIC generation if + source is a symbolic operand. Handle CONST_INT LO_SUM during PIC + generation. Simplify. + (define_split for symbolic_operand load): Do not accept a symbolic + operand that is a pic_label_operand. + (pic_load_label): Name this pattern. Mask least significant bits + and optimize when a simple label is within reach of an ldo. + (call, call_value): Emit new-style USE information for + pic_offset_table_rtx. Emit code for initialization of + hppa_save_pic_table_rtx and wrap it into push_topmost_sequence() + and pop_topmost_sequence() calls. + + * Various PA configuration cleanups. + * configure (hppa*-*-h[pi]ux): Use xm-pahpux.h and x-pa-hpux instead + of the redundant hiux files. Likewise for t-pa instead of t-pa-hpux. + * config/pa/xm-pahiux.h: Delete. It's identical to xm-pahpux.h. + * config/pa/x-pa-hiux: Delete. It's idential to x-pa-hpux. + * config/pa/x-pa (TAROUTOPTS): Delete. It was an HPUX host + conditional, and x-pa is a BSD host target fragment. + (INSTALL_HEADERS): Define. + (STMP_FIXPROTO): Define. + * config/pa/t-pa (INSTALLED_H): Delete. + * config/pa/t-pa-hpux: Delete, it's identical to t-pa. + * config/pa/pa-hiux.h: Include "pa/pa-hpux.h" and just override + the CPP predefines. + (CPP_PREDEFINES): Add -A assertions. + * config/pa/{pa1-hiux.h, pa-ghiux.h, pa1-ghiux.h}: Likewise. + * config/pa/pa-ghpux.h: Simplify by including pa-hpux.h. + (DBX_DEBUGGING_INFO): Define. + (DEFAULT_GDB_EXTENSIONS): Define. + + Mon Nov 14 19:16:00 1994 Dennis Glatting + + * fixincludes: Fixes for NextStep 3.2. Remove ``__const__'' from + sin and cos prototypes in ansi/math.h. Remove keyword ``template'' + from bfd/libc.h. Remove ``volatile'' from abort in bsd/libc.h + and abort and exit in ansi/stdlib.h. + + Mon Nov 14 18:54:28 1994 Douglas Rupp (drupp@cs.washington.edu) + + * i386/x-winnt (EXTRA_PROGRAM): Match target name. + + Mon Nov 14 18:48:21 1994 Torbjorn Granlund (tege@tiny.cygnus.com) + + * freebsd.h (INCLUDE_DEFAULTS): Move definition beyond + FREEBSD_NATIVE conditional. + (FUNCTION_PROFILER): Move down to make file more similar to + netbsd-i386.h. + (DEFAULT_TARGET_MACHINE, etc): Comment our this braindamage! + + Mon Nov 14 18:46:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (expand_call): If IS_CONST and VALREG == 0, end our + sequence and emit the insns. + + Sat Nov 12 06:35:42 1994 Richard Kenner + + * Version 2.6.2 released. + + Sat Nov 12 06:35:21 1994 Torbjorn Granlund (tege@cygnus.com) + + * expmed.c (expand_divmod, case TRUNC_DIV_EXPR): Promote signed + division by 0x80000000 to unsigned. + + Fri Nov 11 17:07:35 1994 Michael Meissner (meissner@osf.org) + + * c-common.c (decl_attributes): Add double-underscore version of + printf and scanf for format type. + + Fri Nov 11 16:38:04 1994 Jim Wilson (wilson@chestnut.cygnus.com) + + * mips-tdump.c: Include . Delete ctime prototype. + + Fri Nov 11 14:16:00 1994 Holger Teutsch + + * clipper.md (movsi+1): Allow r->m move during reloading. + + Fri Nov 11 12:40:51 1994 Richard Kenner + + * c-decl.c (duplicate_decls): Properly merge decls with + differing DECL_CONTEXT. + + * function.c (preserve_rtl_expr_result): find_temp_slot_from_address + now used. + Don't bring the temp slot to an inner level than it was. + (assign_stack_temp): Always initialize p->rtl_expr. + + * m68k/mot3300g.h (SPACE_AFTER_L_OPTION): Deleted. + + Thu Nov 10 18:50:52 1994 Kresten Krab Thorup (krab@next.com) + + * objc/list.h: Add ifndef/define for repeated inclusion. + + Thu Nov 10 18:02:58 1994 Michael Meissner + + * c-common.c (decl_attributes): Check for attributes with leading + and trailing double underscores. + + Thu Nov 10 17:55:07 1994 Chris Metcalf (metcalf@catfish.lcs.mit.edu) + + * fixincludes: Make argument type const for popen and tempnam in + stdio.h and for strdup in string.h, for OSF/1 V3.0. + + * va-alpha.h (va_arg): Add cast to void * to suppress warning. + + Thu Nov 10 17:48:21 1994 Walter Misar (hrz.th-darmstadt.de) + + * m68k/hp320.h (FUNCTION_{PRO,EPI}LOGUE): Don't define. + (IMMEDIATE_PREFIX, REGISTER_PREFIX): Define. + + Thu Nov 10 15:04:57 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * m68k/crds.h (FUNCTION_{PRO,EPI}LOGUE): Add code to adjust stack + when no frame pointer. + * m68k.c (output_function_epilogue): Use a1 as scratch, not a0. + * m68k/tower-as.h (FUNCTION_{PRO,EPI}LOGUE): No longer defined. + (FUNCTION_EXTRA_EPILOGUE): Define. + * m68k/tower.h (REGISTER_PREFIX, IMMEDIATE_PREFIX): Define. + + * i386/x-sco, i386/x-sco4 (CLIB): Add -lPW. + (ALLOCA): Delete. + + * c-common.c ({print,scan}_char_table): Allow `L' modifier + for integer output formats. + (check_format_info): Treat `ll' like `q'. + + * rs6000.md (movsi): In TOC symbol case, use "la" for PowerPC. + (movdi): Handle TOC symbol just like movsi. + + * objc-act.c (init_objc): Add missing casts to args of bcopy. + (lang_init): Ensure line number is 0, not -1. + + Tue Nov 8 07:51:53 1994 Paul Eggert + + * cccp.c (dump_single_macro, dump_defn_1): If -traditional, + dump macros in traditional style. This also avoids a bogus error + message if the macro uses traditional stringizing. + + Mon Nov 7 21:28:13 1994 Michael I Bushnell + + * protoize.c [!POSIX]: Only define O_RDONLY and O_WRONLY if not + already defined. + + Mon Nov 7 19:33:31 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * combine.c (try_combine): Update split_code after converting MULT + to ASHIFT. + + Mon Nov 7 12:26:24 1994 Torbjorn Granlund + + * rs6000.md (DImode load-with-update matcher): Fix typo in MEM mode. + (compare patterns): Fix several typos, SImode => CCmode. + * sh.md (subdi3): Delete % from constraints. + * 1750a.md (subqi3): Likewise. + * clipper.md (subdi3): Likewise. + * i370.md (subqi3): Likewise. + (anonymous subqi3 matcher): Likewise. + * i860.md (subdi3): Likewise. + * dsp16xx.md (mulqi3): Fix typo in MULT mode. + * elxsi.md (one_cmplsi2): Fix typo in NOT mode. + + Mon Nov 7 12:47:37 1994 Ian Lance Taylor + + * m68kv4.h (ASM_IDENTIFY_GCC): Use proper definition for SGS assembler. + + Mon Nov 7 11:02:25 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * gcc.c (process_command): Ignore LIBRARY_PATH and LPATH if + cross-compiler. + + Sun Nov 6 07:23:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cross-test.c (foo): Return value for BU in range for shifts. + + Sat Nov 5 14:25:36 1994 Jim Wilson (wilson@chestnut.cygnus.com) + + * m68k.h (PREFERRED_RELOAD_CLASS): FP constants rejected by 'G' + are OK for class FP_REGS. + + Sat Nov 5 14:08:31 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (store_one_arg): Preserve any temp slots whose address + may have been taken. + + * real.c (GET_REAL, PUT_REAL): Cast args to bcopy to char *. + * reload1.c (reload): Likewise. + * i386.c ({save,restore}_386_machine_status): Likewise. + * reg-stack.c (subst_asm_stack_regs): Likewise. + (BLOCK_NUM): Rework to avoid cast of abort to int *. + (find_blocks): Don't use BLOCK_NUM on lhs. + (reg_to_stack, record_arg_reg_life): Cast arg to bzero to char *. + + Sat Nov 5 08:29:45 1994 Paul Eggert + + * cccp.c (rescan): Do not preserve newlines after macro name + if rescanning a macro expansion. Instead, preserve them if + not outputting marks. + + Fri Nov 4 17:25:29 1994 John David Anglin (dave@hiauly1.hia.nrc.ca) + + * vax.c: Include tree.h and VMS-specific functions #ifdef VMS_TARGET. + * vms.h (VMS_TARGET): Define. + + Fri Nov 4 17:19:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * bi-arity.c (main): Cast enum to char in output. + * bc-emit.c (bc_emit_bytecode): Add missing cast. + + Thu Nov 3 14:17:22 1994 Mike Stump + + * libgcc2.c (__register_exceptions): Find max ending of a segment for + end, not min. + * libgcc2.c (__unwind_function): New function to support stack + unwinding on i[34]86 for g++ exception handling. + + Thu Nov 3 18:55:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Makefile.in (c-parse.o, c-lex.o): c-parse.h is in $(srcdir). + + Thu Nov 3 18:11:56 1994 John F Carr (jfc@mit.edu) + + * rs6000.md (movsi): New alternative for SYMBOL_REF source operand. + * rs6000.c (print_operand): New code '*' to print TOC register number. + * rs6000.h (EXTRA_CONSTRAINT): 'R' matches a SYMBOL_REF for TOC entry. + (PRINT_OPERAND_PUNCT_VALID_P): Recognize '*'. + (PREDICATE_CODES): input_operand can now match SYMBOL_REF. + + Thu Nov 3 18:03:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * cccp.c: TOOL_INCLUDE_DIR is not C++-aware. + + Thu Nov 3 17:23:30 1994 Jim Wilson (wilson@chestnut.cygnus.com) + + * mips.c (mips_output_external): Exclude alloca from list of + used external functions. + + Tue Nov 1 19:19:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Version 2.6.1 released. + + Tue Nov 1 18:51:00 1994 Torbjorn Granlund (tege@cygnus.com) + + * pa.md (add_high_const): Add missing mode for PLUS. + + Tue Nov 1 18:39:53 1994 Stephen L Moshier (moshier@world.std.com) + + * cse.c (simplify_unary_operation, case TRUNCATE): Set LV and HV. + + Tue Nov 1 18:36:23 1994 Pat Rankin (rankin@eql.caltech.edu) + + * vax.c (struct extern_list): Put code back outside of #ifdef VMS. + (vms_check_external, vms_flush_pending_externals): Likewise. + + Mon Oct 31 16:18:12 1994 Michael Meissner + + * i386/i386.md (movsf, movdf, movxf): If we are moving floating + point constants to a non-memory location that aren't 0 or 1, + assume we need the pic register if -fpic. + + Mon Oct 31 13:26:45 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * sparc.h (GO_IF_LEGITIMATE_ADDRESS): Don't allow TFmode LO_SUM. + * sparc.md (movtf+3): Disable pattern. + + Mon Oct 31 08:11:47 1994 Doug Evans + + * expr.c (expand_expr, COND_EXPR case): Don't use original target as + a temp if it's a volatile mem ref. Finish previous patch (don't + expand "X ? A & 1 : A" as "A & (X != 0)"). + + Mon Oct 31 08:07:09 1994 Pat Rankin (rankin@eql.caltech.edu) + + * vax.c: Include tree.h #ifdef VMS. + (struct extern_list): Move inside #ifdef VMS; add SIZE and IN_CONST + fields; make `extern_head' static; add second list head. + (vms_check_external): Move inside #ifdef VMS; give new args; maintain + list of both pending external symbols and previously defined ones. + (vms_flush_pending_externals): New function. + * vax/vms.h (ASM_GLOBALIZE_LABEL): Pass new args to vms_check_external. + (ASM_OUTPUT_EXTERNAL): Just call vms_check_external. + (ASM_{,FINISH_}DECLARE_OBJECT_NAME, ASM_FILE_END): Define. + + Mon Oct 31 08:00:59 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at) + + * pdp11.h (TARGET_SWITCHES): Add -split and -no-split. + (TARGET_SPLIT, TARGET_NOSPLIT): New macros. + (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Abort if -split. + + Mon Oct 31 07:53:34 1994 Warner Losh + + * i386/x-freebsd (CLIB): Add definition. + + Mon Oct 31 07:49:17 1994 Jeffrey A Law + + * reorg.c (mark_set_resources): Properly handle SUBREGs. + + Mon Oct 31 07:24:32 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_expr, case COMPONENT_REF): Don't extract + field from a CONSTRUCTOR if it already has a TREE_CST_RTL. + (expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken + on the temporary made when operand needs to be stored into memory. + * function.c (preserve_temp_slots): Preserve anything whose + address was taken when X is zero. + + Sun Oct 30 15:11:51 1994 Richard Kenner + + * msdos/top.sed, i386/config-nt.sed: Update version to 2.6.1. + * pa/t-pa-hpux: Add missing newline at end. + + Sat Oct 29 21:16:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * emit-rtl.c (operand_subword): Fix typo: HOST_BITS_PER_INT + should be HOST_BITS_PER_WIDE_INT. + + Fri Oct 28 19:13:13 1994 Andrew McCallum (mccallum@vein.cs.rochester.edu) + + * objc/misc.c (__objc_xcalloc): Use calloc instead malloc/bzero. + + Fri Oct 28 19:07:53 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at) + + * pdp11.h (TRAMPOLINE_SIZE): Install real implementation. + (INITIALIZE_TRAMPOLINE, TRAMPOLINE_TEMPLATE): Likewise. + + Fri Oct 28 19:01:27 1994 Craig Burley (burley@gnu.ai.mit.edu) + + * Makefile.in (stage?-start): Add semicolon between fi and done. + + Fri Oct 28 17:12:26 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): Don't record a DEST if paradoxical SUBREG + and SRC is a SIGN_EXTEND or ZERO_EXTEND. + + * alpha.md (reload_outqi): Correctly handle scratch assignments + for unaligned case when ADDR is a REG. + + Fri Oct 28 07:55:40 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.md (adddi3): Fixup code in case operands[0] is equal + to operands[2]. + + Thu Oct 27 18:58:39 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (count_possible_groups): Fix typo in setting + counted_for_groups. + + Thu Oct 27 15:30:41 1994 Per Bothner + + * c-typeck.c (process_init_element): In the case of + [LO .. HI] = VALUE, use save_expr to only evaluate VALUE once. + + Thu Oct 27 15:15:25 1994 Torbjorn Granlund (tege@rtl.cygnus.com) + + * gcc.c (process_command): Don't forget to split -Wl arguments at + commas. + + * gcc.c (process_command): Handle -Wl, and -Xlinker similar to -l, + i.e., preserve their order with respect to linker input files. + + Thu Oct 27 13:11:16 1994 Douglas Rupp (drupp@cs.washington.edu) + + * configure (i[345]86-*-winnt3*): Allow any version 3.x. + Don't use a t-winnt file and move x-winnt to config/i386. + * i386/x-winnt: Build ld-winnt.exe only on host. + * winnt/t-winnt: Deleted. + + Thu Oct 27 13:05:16 1994 Mike Collison (collison@chianti.sw.stratus.com) + + * reload.c (debug_reload): New function to print reload info + set up by find_reloads. + + Wed Oct 26 18:27:03 1994 David Mosberger-Tang + + * alpha.h (FUNCTION_PROFILER): Use $28 instead of $27. + (LINK_SPEC): Pass -pg to linker. + (LIB_SPEC): Link in -lprof1 with -pg, not -lprof2. + (STARTFILE_SPEC): USe gcrt0.o if -pg, not mcrt0.o. + + Wed Oct 26 18:22:34 1994 Doug Evans (dje@cygnus.com) + + * expr.c (expand_expr, COND_EXPR case): Don't expand + "X ? A & 1 : A" as "A & (X != 0)". + + Wed Oct 26 18:06:52 1994 Douglas Rupp (drupp@cs.washington.edu) + + * winnt/ld.c (expand_lib, main): Fix off-by-one bugs in several + calls to malloc. + + Wed Oct 26 22:00:09 1994 Richard Kenner + + * winnt/t-winnt: Remove some spurious blank lines. + + Wed Oct 26 14:14:39 1994 Michael Meissner (meissner@osf.org) + + * i386/osfrose.h (REAL_NM_FILE_NAME): Use /usr/ccs/gcc/bfd-nm + instead of /usr/ccs/bin/nm, since the GNU nm does not output stab + symbols by default. + + Wed Oct 26 13:47:06 1994 Michael Gschwind (mike@vlsivie.tuwien.ac.at) + + * config.sub (pdp11): New machine name. + * configure (pdp11-*-*): New configuration. + * pdp11.c, pdp11.h, pdp11.md, xm-pdp11.h: New files. + + Wed Oct 26 07:33:40 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * flow.c (find_basic_blocks): Ensure each live basic block is + actually reachable. + (life_analysis): Clean up handling of basic_block_drops_in. + + Tue Oct 25 18:40:12 1994 Paul Eggert + + * cccp.c (rescan): ".." no longer terminates a preprocessing + number, since that's incompatible with the C standard. + + Tue Oct 25 16:16:40 1994 Michael Dobson (dobson@info.usuhs.mil) + + * we32k.h (CPP_PREDEFINES): Define u3b2, not u3b. + + Tue Oct 25 16:15:27 1994 Jim Wilson (wilson@cygnus.com) + + * reorg.c (fill_slots_from_thread): Update THREAD if it is split. + + Mon Oct 24 00:12:46 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * toplev.c (lang_options): Add -f{no-,}access-control. + + Mon Oct 24 06:14:03 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * arm/arm.md (peepholes for call followed by branch): Disable. + + Sun Oct 23 08:54:27 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * arm/x-riscix (INSTALL): Invoke install.sh with -c flag. + + Fri Oct 21 00:42:08 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * Makefile.in (LIB2FUNCS): Add _pure. + + * libgcc2.c (__pure_virtual): New function to go into vtable + entries for pure virtual methods instead of abort. + + Thu Oct 20 18:40:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.md (define_split comparison op with power of two minus 1): + Fix typo. + + Thu Oct 20 13:14:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * collect2.c (add_to_list): Check for duplicates. + + * alpha/alpha.h (LINK_SPEC): Pass -shared through; don't + pass -init __main if -shared. + (STARTFILE_SPEC): Wrap startfiles in %{!shared:}. + (INIT_NAME_FORMAT): Define. + (FINI_NAME_FORMAT): Define. + * alpha/osf12.h (LINK_SPEC): Ditto. + * alpha/gdb-osf12.h: #include osf12.h instead of alpha.h + + * gcc.c (STARTFILE_SPEC): Wrap startfiles in %{!shared:}. + + Thu Oct 20 16:07:46 1994 Jim Wilson (wilson@cygnus.com) + + * unroll.c (loop_iterations): Move all failure exits after the + computation of final_value. + + * mips.md (movdf_internal2+1): Disable when TARGET_64BIT. + + * i960.c (VARARGS_STDARG_FUNCTION): New macro. + (i960_function_name_declare, output_function_profiler, + i960_function_epilogue, i960_output_call_insn, i960_output_ret_insn, + i960_reg_parm_stack_space): Use it. + (compute_frame_size): Don't use current_function_pretend_args_size. + (i960_function_arg_advance, i960_function_arg): Don't use parameter + named. + (i960_setup_incoming_varargs): No need to adjust first_reg_offset + after setting it. Don't save last named argument to stack. + Don't set pretend_size. + * i960.h (SIGNED_CHAR_SPEC): Use #if instead of ?:. + * va-i960.h (va_start): Use builtin_arts_info instead of + builtin_next_arg. + + * cse.c (merge_equiv_classes, cse_insn): Call rehash_using_reg + after insert_regs. + (canon_hash): Don't use qty_const to compute hash code for a + register. + + Thu Oct 20 09:41:51 1994 Richard Kenner (kenner@vlsi1.ultra.nyu) + + * stor-layout.c (variable_size): Return SIZE if it contains + a PLACEHOLDER_EXPR. + + Tue Oct 18 19:51:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * collect2.c (main): Check REAL_*_FILE_NAME first. + + Wed Oct 19 15:55:15 1994 David J. MacKenzie + + * config.sub: Add licensing exception for Autoconf. + + Wed Oct 19 06:43:46 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.h (FUNCTION_BLOCK_PROFILER): Don't bother preserving + eax if -fpic, since it is a call clobbered register anyway. Fix -fpic + code so that it is correct. + + Tue Oct 18 18:00:23 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Move + macros here from osfrose, netbsd, and freebsd ports. Remove + assumptions that the assembler is gas. Rewrite and fix the + instructions produced with -fpic. + + * i386/osfrose.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Delete. + * i386/freebsd.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Delete. + * i386/netbsd-i386.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): + Delete. + + Tue Oct 18 20:27:29 1994 Doug Evans (dje@cygnus.com) + + * sparc.h (FRAME_POINTER_REQUIRED): Require frame pointer if + non-leaf flat function. + * sparc.c (sparc_frame_info): Combine members gp_sp_offset and + fp_sp_offset into reg_offset. All uses changed. + (RETURN_ADDR_REGNUM): New macro. + (RETURN_ADDR_MASK, FRAME_POINTER_MASK): New macros. + (sparc_flat_compute_frame_info): Rename local mask to gmask. + Only ensure reg save area is 8 byte aligned if necessary. + (sparc_flat_save_restore): New arguments base_reg, offset, gmask, + and fmask. All callers changed. No longer use %g2 to save regs + in big stack frames. + (sparc_flat_output_function_prologue): Delete local tsize. + Reorder storing of previous frame pointer and return address reg to + make it easier for gdb to identify flat functions. Decrement %sp + twice when saving call-saved regs in big frames. + Count fp regs as 4 bytes in assembler comment. + (sparc_flat_output_function_epilogue): Likewise when restoring + call-saved regs. + + Tue Oct 18 19:33:55 1994 Mike Collison (collison@sw.stratus.com) + + * reload1.c (reload): Correctly compute group additional needs when + the return register cannot be used as a spill register. + + Tue Oct 18 16:17:26 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * mips.h (ASM_SPEC): Pass -mcpu= option to GNU as. + + Tue Oct 18 08:39:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * flow.c (propagate_block): Call mark_used_regs to show global regs + used by call. + * combine.c (can_combine_p): Don't combine into CALL_INSN where + DEST is a global reg. + + * c-decl.c (start_function): Save immediate_size_expand + and initialize it to zero in case nested function. + + * pa.c (non_hard_reg_operand): New function. + * pa.md (reload_{in,out}*): Replace general_operand with + non_hard_reg_operand. + + Fri Oct 14 18:35:30 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * gcc.c (default_compilers): Treat files with an extension of .c++ + as C++ code. + + Mon Oct 17 19:21:57 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * configure (rs6000-ibm-aix4.1*): New configuration. + * rs6000/aix41.h: New file. + + Mon Oct 17 19:15:14 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * va-mips.h (va_arg): Add little endian mips3 support. + + * sparc.h (RETURN_IN_MEMORY): Return true for TCmode values. + + * README.IRIX5: Delete. + * install.texi: Update Irix 5 debugging info. + + * mips.c (function_prologue): Only emit line number when SDB_DEBUG. + + * configure: Delete new argument, --noguess. Default build from + host if host specified, otherwise guess build. Fix typo in + setting build from host. + + Mon Oct 17 15:54:56 1994 Per Bothner + + * calls.c (expand_call, emit_library_call, emit_library_call_value): + Allways adjust current_function_outgoing_args_size, even #ifndef + ACCUMULATE_OUTGOING_ARGS. (Useful for stack overflow checking.) + * function.c (current_function_outgoing_args_size): Update comment. + + Mon Oct 17 18:49:01 1994 Paul Eggert + + * cccp.c (rescan): Preserve newlines after macro names at the top level + since this is more likely to do the right thing with line numbers. + + Mon Oct 17 11:31:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (gen_reload): Renamed from gen_input_reload. + (emit_reload_insns): Delete SECONDARY_MEM_NEEDED case for input + reloads that can't happen and doesn't work. + Fix errors in use of reload_outxx insns. + Simplify output reload code by using gen_reload. + * reload.h (gen_reload): Renamed from gen_input_reload. + + Mon Oct 17 09:26:57 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * unroll.c (copy_loop_body, case JUMP_INSN): Don't abort if invert_exp + fails. Instead, redirect the jump around an unconditional branch. + + Sun Oct 16 05:02:23 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * emit-rtl.c (add_insn_{before,after}): Don't abort because AFTER was + deleted when not optimizing. + + Fri Oct 14 19:26:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.c (emit_move_sequence): Handle secondary reload when loading + a constant into SAR. + + Fri Oct 14 10:29:31 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * fixincludes: Fix X11/Intrinsic.h for RISCiX to remove ___type from + XtOffset. + Add all files that receive special attention to REQUIRED, so that + dependent copies are done if necessary. + + * getpwd.c: Always use getwd if HAVE_GETWD is defined. + * arm/xm-arm.h: Define HAVE_GETWD. + + * arm/x-riscix, arm/t-riscix: New files + * configure (arm-*-riscix*): Use them. + + Thu Oct 13 17:12:27 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * i960.md (call, call_internal, call_value, call_value_internal): + Use memory_operand not general_operand. + + * optabs.c (expand_fix): Correct typo with FIX/UNSIGNED_FIX + REG_NOTES. + + Thu Oct 13 10:44:32 1994 Ian Lance Taylor (ian@cygnus.com) + + * genattrtab.c (optimize_attrs): Don't do anything if + num_insn_ents is zero. + + Wed Oct 12 19:06:48 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * mips/mips.c (mips_expand_prologue): Handle types that need + constructing. Rename TYPE to PASSED_TYPE and use consistently. + + Wed Oct 12 11:32:05 1994 Ian Lance Taylor (ian@cygnus.com) + + * genattrtab.c (num_insn_ents): New static variable. + (remove_insn_ent): Decrement num_insn_ents. + (insert_insn_ent): Increment num_insn_ents. + (optimize_attrs): Use xmalloc to allocate all the attr_value_list + structures at once, rather than using alloca for each one. + + Wed Oct 12 09:17:34 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * optabs.c (??hf2_libfunc): Define like ??sf2_libfunc. + (emit_float_lib_cmp): Call HFmode library functions. + (init_optabs): Set names for HFmode comparison functions. + * expr.h (??hf2_libfunc): Add declarations, like ??sf2_libfunc. + + Tue Oct 11 19:20:48 1994 Douglas Rupp (drupp@cs.washington.edu) + + * winnt/ld.c (main): Pass -debug:full -debugtype:coff. + * winnt/t-winnt: Rework rules for ld. + * i386/config-nt.bat: Renamed from config/i386/config-winnt.bat. + Make specific for x86, not all winnt; change filenames. + * i386/config-nt.sed: Remove -g from CFLAGS. + Reflect changes to t-winnt and other minor changes. + * i386/x-winnt: Renamed from winnt/x-winnt. + * i386/config-nt.sed: Renamed from config/winnt/top.sed. + + Tue Oct 11 18:40:41 1994 Peter Schauer (Peter.Schauer@regent.e-technik.tu-muenchen.de) + + * rs6000.h (ASM_DECLARE_FUNCTION_NAME): Always put out .lglobl + for static functions. + + Mon Oct 10 19:19:51 1994 Alex T. Ramos (ramos@engr.latech.edu) + + * expr.c (convert_move): Add TImode conversions. + + Mon Oct 10 18:46:44 1994 Alex Dreyzen (alex@alex.jf.intel.com) + + * optabs.c (expand_float): Copy TEMP to TARGET when + making recursive call and adjusting. + + Mon Oct 10 07:10:25 1994 Michael Meissner (meissner@osf.org) + + * i386/linux.h (DEFAULT_PCC_STRUCT_RETURN): Do not define as 0 if + LINUX_ELF is defined. + (perform.h): Include perform.h to define asm statements to use for + libgcc1.a builds. + + * i386/linuxelf.h (DEFAULT_PCC_STRUCT_RETURN): Define as 1. + (RETURN_IN_MEMORY): Don't define. + + Sun Oct 9 11:49:20 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.md (movsf_mem): Add & constraint, so that the scratch + register does not clobber the destination address. + + Sun Oct 9 12:40:43 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * arm.md (reload_outdf): Don't call gen_addsi3 if the address is just + a register. + + Sat Oct 8 11:16:50 1994 Doug Evans (dje@cygnus.com) + + * objc/archive.c (__objc_free): New function. + (__objc_finish_read_root_object): Use it. + + Fri Oct 7 19:23:03 1994 J.T. Conklin (jtc@cygnus.com) + + * ginclude/stddef.h: Netware uses _SIZE_T_DEFINED_, _WCHAR_T_DEFINED_. + + Fri Oct 7 12:45:43 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.c (legitimate_address_p): Disable SUBREGs as either + the index or base register. + + Fri Oct 7 08:24:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * i386/gnu.h (CPP_PREDEFINES): Define __HURD__. + + * collect2.c (my_strerror): If HAVE_STRERROR defined, call strerror. + * xm-gnu.h (HAVE_STRERROR): Define. + + * function.c (preserve_temp_slots): If X cannot be a temp + slot, preserve all things whose address was taken at the + present level. + + * function.c (assign_stack_temp): Abort if SIZE == -1. + + * expr.c (safe_from_p): If EXP has a variable size, assume safe. + (preexpand_calls): Don't preexpand a call that returns a variable- + sized object. + + * emit-rtl.c (add_insn_{after,before}): Fix error in last change. + + Thu Oct 6 09:18:28 1994 Kresten Krab Thorup (krab@next.com) + + Adam Fedor (fedor@hopper.colorado.edu) + * objc/archive.c (__objc_finish_read_root_object): Delay freeing + of back-patch list. + + Andrew McCallum (mccallum@cs.rochester.edu) + * objc/objc.h (BOOL): Changed from char to unsigned char. + + Thu Oct 6 08:17:04 1994 Stan Cox (coxs@dg-rtp.dg.com) + + * m88k/m88k.c (emit_move_sequence): If operand1 is an invalid PIC + address, then legitimize it before doing anything else. + + Thu Oct 6 06:54:03 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): Don't call force_const_mem on (const (truncate)). + + * expr.c (store_expr): Don't clobber TEMP with address. + + * reorg.c (try_merge_delay_insns): Update THREAD if it is split. + + * function.c (struct temp_slot): New field addr_taken. + (assign_stack_temp): Initialize it. + (mark_temp_addr_taken): New function. + (preserve_temp_slots): Decrement level of things at same level + but whose address has been taken. + * expr.c (expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken. + + Wed Oct 5 14:17:39 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * fold-const.c (fold, COMPONENT_REF): Don't die if the CONSTRUCTOR + doesn't initialize the field we want. + + Wed Oct 5 11:38:48 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.c (legitimize_pic_address): Changes to support + LABEL_REF references when using -fpic. + (output_pic_addr_const): Ditto. + (print_operand_address): Ditto. + + * i386/i386.md (movsi insn): Changes to support LABEL_REF + references when using -fpic. + (movsi_lea): Name insn supporting lea instruction so it shows up + more clearly when doing -dp. + + Wed Oct 5 06:56:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reorg.c (try_merge_delay_insns): Update THREAD if deleting first + insn in it. + + Wed Oct 5 01:19:14 1994 Roland McGrath + + * configure (i[345]86-*-gnu*): Set xm_file=i386/xm-gnu.h. + * config/i386/xm-gnu.h: New file. + * config/xm-gnu.h: New file. + * config/i386/gnu.h: Move #include out of here, into + config/xm-gnu.h. + + Tue Oct 4 23:19:28 1994 Michael Meissner + + * protoize.c (POSIX includes): If POSIX is defined, include + sys/wait.h to get WIFSIGNALED, WTERMSIG, WIFEXITED, and + WEXITSTATUS. + + Tue Oct 4 21:48:02 1994 Michael I Bushnell + + * config/i386/gnu.h: Include to get O_RDONLY definition. + * gcc.c (O_RDONLY): Define macro iff not already defined. + (read_specs): Second arg to open should be O_RDONLY, not constant 0. + + Tue Oct 4 19:06:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (do_jump_for_compare): Properly scan insns when + branch is at start of sequence. + + Tue Oct 4 16:53:54 1994 Ian Lance Taylor (ian@cygnus.com) + + * gcc.c, collect2.c, protoize.c (WIFSIGNALED): Define if not + already defined. + (WTERMSIG, WIFEXITED, WEXITSTATUS): Likewise. + * gcc.c (execute): Use them. + * collect2.c (do_wait): Likewise. + * protoize.c (gen_aux_info_file): Likewise. + + Tue Oct 4 16:38:06 1994 Michael Meissner + + * i386/i386.h (RETURN_IN_MEMORY): Define so that large types such + as complex double values get returned like structures do, and + don't overwrite %ebx. + + Tue Oct 4 15:58:21 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * lynx-ng.h, lynx.h (PREFERRED_DEBUGGING_INFO): Add undef before + define. + + Tue Oct 4 05:12:02 1994 Richard Stallman + + * config.sub: Translate -gnu/linux* to -linux*. + + Mon Oct 3 11:43:45 1994 Ian Lance Taylor (ian@cygnus.com) + + * config.sub: Add support for MIPS variants: mips64, mipsel, + mips64el, mips64orion, mips64orionel, mips3*. + + Sun Oct 2 18:26:34 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * function.c (push_function_context_to): Renamed from + push_function_context, adds argument to indicate that the new + function is not a nested function. + (push_function_context): Call it. + (pop_function_context{,_from}): Similarly. + + * tree.c (save_tree_status): Add argument to indicate that the new + function is not a nested function. + (restore_tree_status): Ditto. + + Sun Oct 2 18:05:37 1994 Doug Evans (dje@cygnus.com) + + * configure (i[34]86-*): Change to i[345]86-*. + (target_cpu_default): Treat i586 as an i486 (for now). + + Sun Oct 2 10:25:51 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * arm.md (movsf): If reloading, create a scratch from the target for + loading a constant into integer regs. + (movdf): Likewise. + + Support for variants that fault on unaligned addrs: + * arm.h (TARGET_SHORT_BY_BYTES): New macro. + (TARGET_SWITCHES): Recognize switches -m[no-]short-load-bytes. + (TARGET_DEFAULT): Only define if not already done so. + (PROMOTE_MODE): Promote HImode unsigned if TARGET_SHORT_BY_BYTES. + (SECONDARY_INPUT_RELOAD_CLASS): Need a scratch for reloading HImode if + TARGET_SHORT_BY_BYTES. + * arm.c (arm_reload_in_hi): New function. + * arm.md (zero_extendhisi2, extendhisi2): Expand to suitable byte + sequence when TARGET_SHORT_BYTES and loading a mem. + (movhi_bytes, extendhisi2_mem): New expands. + (movhi): Call movhi_bytes to load a short from memory if + TARGET_SHORT_BY_BYTES. + (all matchers loading a short from memory): Don't match if + TARGET_SHORT_BY_BYTES. + (matcher for movhi when TARGET_SHORT_BY_BYTES): New pattern to cover + remaining valid cases. + + Sun Oct 2 08:54:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reg-stack.c (subst_stack_regs): Check for NOTE to see if insn was + deleted. + + * reorg.c (fill_slots_from_thread): Update THREAD if deleting + its first insn. + + * reg-stack.c (delete_insn_for_stacker): Don't set INSN_DELETED_P + on NOTE_INSN_DELETED. + + Sat Oct 1 20:42:33 1994 Chip Salzenberg + + * sco4.h (CPP_PREDEFINES): Remove i386, unix. + (CPP_SPEC): Add them here, so that they're undefined if -ansi. + Also add _i386 and _unix, which are always defined. + * x-sco (CLIB): Add "-lmalloc". + (ALLOCA): Define as "-lPW". + * x-sco4 (CC, OLDCC, RCCFLAGS, CCLIBFLAGS, CLIB, ALLOCA): From x-sco. + (X_CFLAGS): Remove. + + Sat Oct 1 14:27:45 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.md (movsf_push386): Rename to movsf_push_nomove. + (movdf_normal): Prefer to use float registers rather than general + purpose registers. + + Sat Oct 1 07:01:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * c-decl.c (shadow_label): Emit an error if the label is already + declared at this label scope. + + Sat Oct 1 06:44:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * emit-rtl.c (add_insn_{before,after}): Abort if insertion point is + a deleted insn. + * jump.c (jump_optimize): When deleting a jump, properly set NEXT. + (duplicate_loop_exit_test): Don't insert NOTE_INSN_LOOP_VTOP + before deleted insn; insert first, then delete. + + * gcc.c: Install omitted hunk from last diff. + + Fri Sep 30 18:26:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * emit-rtl.c (add_insn_after): Abort if can't find AFTER and it + has no NEXT_INSN. + (add_insn_before): New function. + (emit_{insn,insns,jump_insn,call_insn,barrier,note}_before): Call it. + + Fri Sep 30 17:33:41 1994 Douglas Rupp (drupp@cs.washington.edu) + + * config.sub (windowsnt): Alias for winnt. + (winnt): New OS name. + * configure (extra_programs): New, like extra_parts. + (i[34]86-*-winnt3.1): New configuration. + * genattr.c (atoi): Remove declaration. + * getpwd.c: #ifdef WINNT, include direct.h. + * sdbout.c: Don't include syms.h for winnt. + * toplev.c: Don't include times.h for winnt. + (get_run_time): Just return zero for winnt. + (main): Don't print memory usage for OS/2 or winnt. + * cccp.c (main): Use DIR_SEPARATOR if defined. + Use "Include" environment variable instead of CPATH for winnt. + * gcc.c: Don't include sys/file.h for winnt; use process.h instead. + (concat): Now just concats two things; all callers changed. + (concat[346]): New functions. + (dir_separator_str): New variable. + (exec_prefixes, startfile_prefixes, include_prefixes): Renamed + from same names without plural; all users changed. + (find_a_file, process_command, do_spec_1): Use DIR_SEPARATOR. + (find_file, is_directory, main): Likewise. + (lookup_compiler): If OS/2, do case-independent search. + (fix_argv): New function on winnt. + (FIX_ARGV): New macro for some systems; use instead of argv. + * i386/unix.h: Treat ALMOST_STDC like __STDC__. + (AS2C): New macro. + * i386.c (output_387_binary_op): Use AS2C instead of AS2 with + null first arg. + * config/winnt/config-nt.bat, config/winnt/ld.c: New files. + * config/winnt/{[tx]-winnt, config/winnt/top.sed: New files. + * config/winnt/winnt.h, config/winnt/xm-winnt: New files. + * i386/winnt.h, i386/xm-winnt.h: New files. + + Thu Sep 29 19:53:14 1994 Jim Wilson (wilson@cygnus.com) + + * sparc.md (movdf+3): Handle overlapping registers in define_split. + + * gcc.c (default_compilers): Add %Z to all cpp specs. + (n_preprocessor_options, preprocessor_options): New variables. + (process_command): Handle -Wp option. + (do_spec_1): Handle %Z spec. + + * i960/i960-coff.h: New file. + * t-960bare: New file. + * config.sub (os): Accept coff as an OS. + * configure (i960-*-coff): New configuration. + + * expr.c (result_vector): Use INCOMING_REGNO when !savep instead + of when savep. + * sparc.md (call): Use struct value pattern is struct size is not + equal to zero instead of greater than zero. + (call+7, call+8): New patterns for untyped calls. + (untyped_call): Revise to emit explicit rtl for all operation. + Delete four old patterns that matched the unexpanded untyped_call + pattern. + (blockage): New pattern. + (flush_register_windows): Modify from 0 to 1. + (goto_handler_and_restore): Modify from 1 to 2. + (flush): Modify from 2 to 3. + * sparc.c (sparc_initialize_trampoline): FLUSH is now 3 not 2. + + * calls.c (emit_library_call): For FUNCTION_ARG_PASS_BY_REFERENCE, + pass address through force_operand before using it. + + * i960.c (i960_setup_incoming_varargs): Store parameter registers + at proper offset in argument block. + + Thu Sep 29 16:39:32 1994 Mike Stump + + * stmt.c (expand_return): We have to be careful of cleanups that can + be generated when expanding the return value, as they might otherwise + wipe out the return value. + + Thu Sep 29 13:35:24 1994 Mike Stump + + * expr.c (do_jump): Handle cleanups in TRUTH_ANDIF_EXPR and + TRUTH_ORIF_EXPR. + + Thu Sep 29 13:23:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * gcc.c (struct option_map): Sort in alphabetical order. + (translate_options): Ignore option once an error occurs. + Fix error with reversed 'a' and 'o'. + Give error if specified abbreviation is unambiguous. + + * c-typeck.c (convert_for_assignment): When converting object + to union, allow converting the constant zero into a pointer + member of the union. + + Wed Sep 28 19:33:01 1994 Alex T Ramos (ramos@engr.latech.edu) + + * machmode.def (PSImode): Widens to PDImode. + * expr.c (convert_move): Added handling of PDImode conversions. + + Wed Sep 28 19:24:17 1994 H.J. Lu (hjl@nynexst.com) + + * configure: Don't make objc-runtime if cross-compiling gcc. + * build-make (FIXINCLUDES): Set to Makefile.in. + + Wed Sep 28 19:18:19 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (trampoline_address): Add missing call to + round_trampoline. + + Wed Sep 28 18:34:13 1994 Michael Meissner (meissner@osf.org) + + * config/svr4.h (ESCAPES): Print \v in octal rather than as '\v', + since some older versions of gas didn't accept it. + + Wed Sep 28 14:29:20 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Comment out loop which handles symbolic links to + files. It appears to not work, and to be unnecessary. + + Tue Sep 27 19:27:56 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.h (ENCODE_SECTION_INFO): Only calls may go through the + PLT. All address loads, even function address loads, have to + go through the GOT or function addresses will not be unique. + + Tue Sep 27 19:20:12 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (newline_fix, name_newline_fix): Don't treat \r + specially here; it only causes bugs. This undoes the + May 14 16:01:13 1990 change to newline_fix and name_newline_fix. + + Tue Sep 27 19:02:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * m88k.h (ASM_OUTPUT_SOURCE_LINE): Add missing #undef. + + Tue Sep 27 18:32:17 1994 William J. Eaton (wje@hoffman.rstnu.bcm.tmc.edu) + + * function.c (optimize_bit_field): Put any insns made by + change_address in front of INSN. + (expand_function_end): Don't pass DECL_INITIAL to setjmp_protect + if it is error_mark_node. + + * genoutput.c, reload.c (n_occurrences): Make arg int, not char. + * objc-act.c (warn_with_method): Likewise. + + * optabs.c (expand_fix): Call emit_library_call_value. + + Tue Sep 27 12:39:10 1994 Mike Stump (mrs@cygnus.com) + + * Makefile.in, libgcc2.c (L_eh): some support routines for C++. + + Mon Sep 26 06:45:20 1994 Michael Meissner (meissner@osf.org) + + * 386/i386.md (adddi3, subdi3): Rewrite to add a clobber of a + scratch variable, so that memory/memoroy adds and subtracts can be + done using just one scratch register. Also, don't require op1 to + be the same as op0. + + Fri Sep 23 19:03:09 1994 Roland McGrath + + * config/i386/gnu.h (LIB_SPEC): Remove macro. + + Fri Sep 23 16:11:26 1994 Michael Meissner (meissner@osf.org) + + * i386/lynx-ng.h (CALL_USED_REGISTERS): Copy definition from + i386/lynx.h that makes ebx be a call clobbered register, since + some system calls evidently trash it. + + Fri Sep 23 15:54:53 1994 Jim Wilson (wilson@cygnus.com) + + * configure (mips-*riscos*): Changed to mips-*-riscos*. + (mips-*-riscos*-*): Deleted. + + * cse.c (invalidate): New parameter FULL_MODE. All callers + changed. + (set_nonvarying_address_components): Modify initial comment. + (cse_insn): When call invalidate for dest, use the actual dest not + inner_dest. + + Thu Sep 22 18:56:19 1994 Torbjorn Granlund (tege@cygnus.com) + + * expmed.c (expand_divmod): Special case for signed CEIL_DIV_EXPR + when divisor is power of 2. + + Thu Sep 22 12:28:53 1994 Jason Merrill (jason@deneb.cygnus.com) + + * fixinc.svr4: Fix size_t, ptrdiff_t and wchar_t like fixincludes + does. Use extern inline rather than static inline in byteorder.h. + + Thu Sep 22 12:22:03 1994 Steve Dum (steve_dum@mentorg.com) + + * collect2.c (main): Discard the first executable once we've + exploited it. + + Thu Sep 22 11:38:34 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Tweaks for LynxOS 2.2.2: accept spaces after # when + removing #define void int in curses.h; change prototype of fnctl + in fcntl.h to match POSIX.1. + + Thu Sep 22 07:18:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure: Consistently put specified manufacturer names ahead + of entries with wildcard manufacturers. + + * calls.c (emit_call_1): Fix typo in last change. + + Wed Sep 21 21:32:56 1994 Chris Smith (csmith@convex.com) + + * config.guess: Add convex c3* and c4* guesses. + * configure: Don't run fixincludes on convex. + + Wed Sep 21 15:59:12 1994 Ashley Saulsbury (ans@sics.se) + + * alpha.h (ASM_FILE_START): Write .set volatile. + + Wed Sep 21 14:45:45 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (emit_call_1): Properly add a CLOBBER for sp + to CALL_INSN_FUNCTION_USAGE. + + * c-typeck.c (mark_addressable): Give different error if trying + to put object with volatile fields into register; don't use DECL_NAME. + + Wed Sep 21 14:02:10 1994 Jim Wilson (wilson@cygnus.com) + + * reload1.c (eliminate_regs): Make test in LOAD_EXTEND_OP case + more precise. + + Wed Sep 21 11:34:12 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Don't try to remove empty directories until after + removing DONE files. + + Wed Sep 21 05:52:49 1994 Uwe Seimet (seimet@chemie.uni-kl.de) + + * m68k/atari.h (NO_{DOLLAR,DOT}_IN_LABEL): Define. + + Tue Sep 20 20:06:08 1994 Doug Evans (dje@cygnus.com) + + * final.c (asm_insn_count): Handle ASM_INPUTs too. + + Tue Sep 20 19:32:10 1994 Oliver Kellogg (okellogg@salyko.cube.net) + + * 1750a.h, 1750a.c, 1750a.md: New files, to use as1750. + * 1750a/m1750.inc: File deleted. + * 1750a/ms1750.inc: New file. + + Tue Sep 20 17:55:50 1994 Hallvard B Furuseth (hbf@durin.uio.no) + + * cccp.c (make_definition): Enable `-D' with macro arguments. + + Tue Sep 20 17:49:47 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cexp.y (HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT): New macros. + (expression_value): Now HOST_WIDE_INT. + (parse_c_expression): Now returns HOST_WIDE_INT. + * cccp.c (eval_if_expression): Likewise. + (do_if, do_elif): Reflect new return value of functions. + + * alpha.c (mode_mask_operand): Always return a value. + + * function.c (pop_function_context): Clear reg_renumber. + + * gcc.c (process_command): Add new switch, -dumpmachine. + + Tue Sep 20 15:57:40 1994 Jim Wilson (wilson@cygnus.com) + + * sched.c (sched_analyze_insn): Parameter loop_note type changed + to rtx, and name changed to loop_notes. Code adding it to + REG_NOTES modified to account for type change. + (sched_analyze): Variable loop_note type changed to rtx, and name + changed to loop_notes. Store LOOP_* REG_DEAD notes in it instead + of LOOP_* NOTE_LINE_NUMBER. + (schedule_block): Pass last not insn to emit_note_before call. + + * iris5.h (ASM_OUTPUT_UNDEF_FUNCTION): Define. + (ASM_OUTPUT_EXTERNAL_LIBCALL): Define. + (ASM_DECLARE_FUNCTION_SIZE): Define. + * mips.c (mips_output_external): Use ASM_OUTPUT_UNDEF_FUNCTION. + (mips_output_external_libcall): New function. + (mips_asm_file_end): Handle ASM_OUTPUT_UNDEF_FUNCTION. + * README.IRIX5: Update. + + Tue Sep 20 14:39:37 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.h (output_move_memory): Add declaration. + (output_move_pushmem): Ditto. + + * i386/i386.c (output_move_pushmem): New function to handle + pushing bytes from memory onto the stack, possibily using + temporary registers. + (output_move_memory): New function to handle moving bytes from + memory to memory via temporary registers. + + * i386/i386.md (movsi insn): If -fpic and the value we are moving + is a constant pool address, emit a leal instruction instead of + movl. + (movsf_push): Allow pushes from memory. + (SF, DF, XF, DI pushes): Move most of the code to the common + function output_move_pushmem. + (SF, DF, XF, DI memory->memory moves): Move most of the code to + the common function output_move_memory. + (DI move patterns): Combine DI patterns into two, one for pushes, + and one for everything else, so that the combiner will combine a + load with a store into a memory->memory move. + (untyped_call): Replace non-working code with m68k version that + emits a regular call, then breaks the parallel moves into separate + moves, and then issue a blockage instruction. + (blockage): New unspec_volatile insn to block insns from being + moved across this point. + (untyped_return): Delete. + (update_return): Delete. + + * objc/sendmsg.c (get_imp): Allow __inline__ on x86 platforms. + + Tue Sep 20 12:21:12 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Handle the case of a symlink to root/* from a + subdirectory of another symlink to root/*. + + Mon Sep 19 20:30:21 1994 Jason Merrill (jason@deneb.cygnus.com) + + * fold-const.c (fold): Handle COMPONENT_REFs involving CONSTRUCTORs. + + Mon Sep 19 20:25:38 1994 Will Athanasiou (will@westford.ccur.com) + + * rs6000.md (load sf with update): Fix RTL typo. + + Mon Sep 19 08:46:46 1994 Charles M. Hannum (mycroft@duality.gnu.ai.mit.edu) + + * c-common.c (check_format_info): Enable checking of format + specifiers using the `q' (quad) length modifier. + (format_char_info): Add `qlen'. + (print_char_table, scan_char_table): Add appropriate entries for + qlen. + + Sat Sep 17 12:48:57 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * stmt.c (mark_seen_cases): Don't call fatal (or do anything + else) if case index out of range. Warning is given later. + + Fri Sep 16 19:22:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * global.c (global_alloc): Mark regs assigned to SCRATCH as used by + more than just local alloc. + + Thu Sep 15 14:36:59 1994 Michael Meissner + + * i386/i386.c (order_regs_for_local_alloc): Instead of using + flag_cse_follow_jumps and not leaf_function_p to determine whether + to allocate EDX, and ECX before EAX, use whether or not a DImode + variable was used in the compilation. DImode variables seem to + cause spill failures if EAX is allocated first, while smaller code + is generated if EAX is allocated first, assuming no spill failure. + + * i386/i386.md (SF, DF, XF, and DI moves and pushes): Eliminate + special patterns for TARGET_386 that allow direct pushes from + memory, and instead allow direct pushes from memory as the last + alternative in case no scratch registers could be allocated. + (movxf_mem): Remove inadvertent !TARGET_386 condition. + (addsi3): Allow generation of lea on 486, since the single + instruction lea is at least as fast as the mov and add it + replaces. + (zero extend patterns): Replace !TARGET_486 with TARGET_386. + (bit extracts): Ditto. + + * i386/osfrose.h (LONG_DOUBLE_TYPE_SIZE): Don't redefine to be 64 + unless NO_LONG_DOUBLE is defined. + + Thu Sep 15 13:46:05 1994 Jim Wilson (wilson@cygnus.com) + + * expmed.c (store_split_bit_field): Use number of bits in arg not + BITS_PER_WORD to adjust arg in BYTES_BIG_ENDIAN case. + + Thu Sep 15 09:19:12 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * optabs.c (expand_binop, multi-word shifts): Generate rtl + free of conflicts for shifts less than one word. + + Thu Sep 15 05:29:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * gcc.c: Rework last change so it's done like collect2.c. + + * cse.c (cse_around_loop): Don't invalidate SUBREG unless + it's a SUBREG of a REG. + + * sched.c (sched_analyze_insn): Don't set SCHED_GROUP_P for previous + INSN a USE unless it's a USE of a REG. + + Wed Sep 14 10:08:58 1994 Michael I Bushnell + + * gcc.c: Include in case `errno' is really a macro + as permitted by ANSI C. + + * getpwd.c (GUESSPATHLEN): If there is no definition of + MAXPATHLEN, then set GUESSPATHLEN to be 100. (It's used + as a starting point, not a limit, so this is harmless.) + + Tue Sep 13 15:02:19 1994 Michael Meissner + + * i386/i386.md (movxf_mem): Fix typo with memory/memory moves + of XFmode variables, where the store actually did a load, ie, the + source and destination operands were fixed. + (fixuns_trunc patterns): Revert to the old code. + (movdf_push486, movxf_push486, movdi_push486): If an address is + based on the stack pointer, account for the stack pointer changing + due to the intermediate pushes generated. + + Tue Sep 13 14:11:16 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * collect2.c (fatal_perror, fatal, error): Declare all args as char *. + + Tue Sep 13 12:40:39 1994 Jeffrey A. Law (snake.cs.utah.edu) + + * pa.c (emit_move_sequence): Handle secondary FP load/store + reloads of the form (subreg (mem (plus (reg) (disp)))). + (secondary_reload_class): A secondary register is needed to handle + out-of-range FP loads and stores. + * pa.md (reload_indf, reload_outdf): New expanders. + (reload_insf, reload_outsf): Likewise. + + Mon Sep 12 18:15:48 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * t-pa (ADA_CFLAGS): New override. + * pa/t-pa-hpux: New file. + * configure (hppa*-*-hpux*): Use t-pa-hpux instead of t-libc-ok. + + Mon Sep 12 14:52:17 1994 Jim Wilson (wilson@cygnus.com) + + * function.c (assign_parms): Set RTX_UNCHANGING_P on stack_parm + for const parameter before calling move_block_from_reg. + + Mon Sep 12 14:27:58 1994 Doug Evans (dje@cygnus.com) + + * config/fp-bit.c (FLO_union_type): Add packed attribute to `bits'. + + Sat Sep 10 09:50:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (invalidate_for_call): Properly set IN_TABLE. + + Sat Sep 10 06:46:24 1994 Bill Burton (billb@progress.com) + + * Added improved support for Sequent DYNIX/ptx 1.x and 2.x: + * fixinc.ptx: New file. + * i386/seq-sysv3.h (HAVE_ATEXIT): No longer defined. + * i386/seq2-sysv3.h: New file. + * configure (i[34]86-sequent-ptx[12]*): New configurations. + (i[34]86-sequent-sysv*, i[34]84-sequent-ptx): Deleted configurations. + * config.sub (ptx): New OS; use for Sequent. + + Fri Sep 9 21:48:48 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (rescan, handle_directive): Backslash no longer suppresses the + specialness of the following char unless -traditional. + (rescan): Remove backslash-newline only if at top level, since + backslash-newline-space can be encountered during macro processing. + (collect_expansion): Remove special hack for \# inside a #define; + it's not compatible with the C Standard. + + Thu Sep 9 17:36:03 1994 Jason Merrill (jason@deneb.cygnus.com) + + * Utilize OSF/1's limited .init support. + * alpha/alpha.h (HAS_INIT_SECTION): Define. + (LINK_SPEC): Add '-init __main'. + * alpha/osf12.h (LINK_SPEC): Ditto. + + * function.c (expand_main_function): Don't call __main if + HAS_INIT_SECTION is defined. + + Fri Sep 9 16:36:46 1994 Mike Stump (mrs@cygnus.com) + + * tree.c (decl_function_context): Don't treat C++ member + functions of classes declared in a function, as nested functions. + + Fri Sep 9 16:10:25 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * sh/sh.c (prepare_move_operands): Generate better DI constant + code. + (fake_shift): New function. + * sh/sh.md (ashlsi3_n, lshrsi3_n): Only recognise if fake_shift + enabled. + * sh/{lib1funcs.asm, ashlsi3.c, lshrsi3.c, ashrsi3.c} : New files. + * sh/t-sh : Build new files. + + Fri Sep 9 15:52:54 1994 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) + + * cccp.c: Correct unprototyped pointer args from `0' to `NULL_PTR' + + Fri Sep 9 15:17:52 1994 Matthew Green (mrg@splode.mame.mu.oz.au) + + * configure (sparc-*-netbsd): New configuration. + * sparc/netbsd.h: New file. + + Fri Sep 9 15:15:48 1994 Jim Wilson (wilson@cygnus.com) + + * mips.md (truncdisi2): Change from define_expand to define_insn. + (truncdihi2, truncdiqi2): Likewise. + + * sparc.h (SQRTTF2_LIBCALL): Delete. + (INIT_TARGET_OPTABS): Define. + (INIT_SUBTARGET_OPTABS): Define. + + * stmt.c (check_for_full_enumeration_handling): Cast malloc result + to `unsigned char *' not `char *'. + + * dbxout.c (dbxout_symbol_location): Handle error_mark_node in + DECL_INITIAL for C++. + + * mips.md (memory): Add missing !r4600 to first define_function_unit. + + * sparc.md (negsi2): Use register_operand not general_operand for + output. + + Fri Sep 9 14:52:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * config/netbsd.h: Add #undef for everything we define; a few were + missing. + + * reload.c (find_reloads, case 'p'): Operand is BASE_REG_CLASS. + + Fri Sep 9 14:00:28 1994 Mike Collison (collison@world.std.com) + + * configure (dsp16xx-*): New configuration. + * config.sub (dsp16xx): New basic machine. + * dsp16xx.c, dsp16xx.md, dsp16xx.h, xm-dsp16xx.h: New files. + + Fri Sep 9 12:47:00 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.md (All SF, DF, XF, DI 486 push patterns): Merge the + memory and nonmemory push patterns together. + + Fri Sep 9 00:53:36 1994 Richard Stallman + + * config.sub: Accept i586 like i386. + Do not use SCO as a default for i386-*. + + Thu Sep 8 18:49:35 1994 Steve Chamberlain (sac@cygnus.com) + + * config/fp-bit.c (_fpmul_parts): Perform optimized + 64bit*64bit multiply correctly. + * sh/sh.c (synth_constant): Ensure DI mode constants get their + high part zeroed. + (add_constant): Entabled constants are only identical if their + sizes are the same. + + Thu Sep 8 14:40:31 1994 Jim Wilson (wilson@cygnus.com) + + * flow.c (mark_used_regs, case REG): Correct typo, use GET_MODE + not GET_CODE. + * sched.c (attach_deaths): Likewise. + + Tue Sep 6 23:33:41 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * tree.c (get_set_constructor_bits, get_set_constructor_words): + New functions. Extract bits or words from SET_TYPE CONSTRUCTOR. + * tree.h: Declare above new functions. + + Thu Sep 8 14:02:05 1994 Michael Meissner (meissner@osf.org) + + * 386/i386.h (TARGET_OPTIONS): New macro to define -mreg-alloc= + switch to allow users to override the register allocation order. + (OVERRIDE_OPTIONS): Call the function override_options. + (REG_ALLOC_ORDER): Define to allocate in the natural order, this + is needed for ORDER_REGS_FOR_LOCAL_ALLOC to work. + (ORDER_REGS_FOR_LOCAL_ALLOC): Define to call the function + order_regs_for_local_alloc. + (regclass_map): Move declaration to end of file. + (i386_compare_op0, i386_compare_op1): Ditto. + (CLASS_LIKELY_SPILLED_P): Define, return 1 for AD_REGS in addition + to all of the single register classes, since AD_REGS is only used + to allocate EAX:EDX. + (override_options, order_regs_for_local_alloc): Add declarations. + (hi_reg_name): Add declaration. + (qi_reg_name): Ditto. + (qi_high_reg_name): Ditto. + (i386_reg_alloc_order): Add declaration for TARGET_OPTIONS to use. + + * i386/i386.c (i386_compare_op0, i386_compare_op1): Initialize + with NULL_RTX. + (i386_reg_alloc_order): Provide global variable definition. + (regs_allocated): Static array to note whether a register is noted + via -mreg-alloc=. + (override_options): Provide checking for registers declared with + -mreg-alloc=. + (order_regs_for_local_alloc): If -mreg-alloc= was used, + allocate registers mentioned in order, and then allocate all other + registers in the normal register order. If -mreg-alloc= was + not used, allocate registers in natural order except for non-leaf + functions with CSE following jumps, allocate EAX after EDX and + ECX, to allow the function return to be CSE'd, and perl 4.036's + perly.y to be compiled without aborting due to not being able to + find a spill register. + (movsf, movdf, movdi): Rewrite all patterns to provide effecient + memory to memory moves, including pushes for i386 and i486. Fixes + problems in compiling motif+ without optimization. + (swapsf): Add, like swapdf and swapxf. + (fixuns_truncsfsi2, fixuns_truncdfsi2): Use general_operand + instead of register_operand for define_expand, since the operand + is copied to a new pseudo register as part of the expansion. + (fix_truncxfdi2, fix_truncdfdi2, fix_truncsfdi2): Rewrite to call + the more primitive generator functions instead of knowing how many + clobbers of match_scratchs they do. + + * Makefile.in (aux_output.o): Define TARGET_CPU_DEFAULT if + specified when compiling aux_output.o to allow the machine C file + access to this if it wants it. + + Thu Sep 8 07:15:29 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (movsi matcher): Merge TARGET_POWER and !TARGET_POWER + cases. Rationalize mnemonics. + (movhi and movqi matchers): Likewise. + (movsf matcher): Correct length attribute for stfs which no longer + includes frsp. + + Thu Sep 8 07:06:31 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.h (REGISTER_MOVE_COST): Fix typo in last change. + + Wed Sep 7 19:31:52 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (handle_directive): In `#include ' directives, + remove backslash-newline properly. Don't allow any other newlines. + + Wed Sep 7 18:11:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.h (REGISTER_MOVE_COST): Moving between special registers + is expensive. + + * combine.c (simplify_comparison): Convert comparison to unsigned + when stripping off a ZERO_EXTEND. + + * combine.c (simplify_set): Only convert IF_THEN_ELSE to logical + expression if mode of object being compared is result mode. + + Wed Sep 7 18:09:17 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * configure: Ignore --help, --version, --program-prefix, + --program-suffix, --cache-file, --quiet, --silent. + + Wed Sep 7 13:29:50 1994 Doug Evans (dje@cygnus.com) + + * stmt.c (expand_asm_operands): Move test for misspelled registers + higher so all cases caught. + + Wed Sep 7 09:54:14 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * configure: Touch Makefile.ll before appending subdir stuff. + (Needed if there are no subdirs.) + + Wed Sep 7 11:19:18 1994 Kresten Krab Thorup (krab@akvavit.next.com) + + * objc/init.c (__objc_init_protocols): Remove assertion. + * objc/Object.m (conformsTo:): Make lookup allways happen in + the class object. + + Tue Sep 6 17:47:39 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * configure: Rename *-next-ns[23] to *-next-nextstep[23]. + * config.sub: Cleanup NeXT support to emit nextstep*. + + Tue Sep 6 18:38:02 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads_address): Don't reorder the operands of a + PLUS when fixing up index. + + Tue Sep 6 18:24:50 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.md (stackadjust/push peepholes): For the adjust/push/push + pattern one offset was wrong. + Don't use addr for register and and MEM refs. + + Tue Sep 6 11:24:06 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * sh/sh.c (push, pop): Generate REG_NOTES. + (synth_constant): Correct one of the patterns. + (output_file_start): Bump version number. + * sh/sh.h (EXIT_IGNORE_STACK): Now 1. + * sh/sh.md (adddi3, subdi3): Simplify. + (casesi_worker): Use TARGET_BIGTABLE. + + Mon Sep 5 12:29:15 1994 Ian Lance Taylor (ian@cygnus.com) + + * ginclude/math-68881.h: Change inline functions from static to + extern. + + * configure (i[34]86-*-sysv4*): If --with-stabs, set tm_file to + i386/sysv4gdb.h. + * config/i386/sysv4gdb.h: New file; sets PREFERRED_DEBUGGING_TYPE. + + Sun Sep 4 08:40:02 1994 Chris Smith (csmith@convex.com) + + * convex.h (VTABLE_USES_MASK, VINDEX_MAX, SET_DECL_VINDEX): + delete, no longer used. + (target_flags): delete cexp.c hack, no longer needed. + * convex.md (decr-and-set-cc0): fix HImode to use halfword + insns. + (cmpqi patterns): fix constraints not to use A regs + + Sat Sep 3 14:12:11 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.md (DImode move and push insns): Eliminate movdi + wrapper that made a DI temp register to do a memory to memory + move because it creates too much register pressure, especially + when not optimizing. On the 486, allocate and use 1-2 scratch + registers to push a DImode value. + + Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com) + + * c-decl.c (min_precision): Move from here. + * c-common.c: To here. + + Fri Sep 2 13:16:38 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * tree.h (maximum_field_alignment, set_alignment): New declarations. + + Fri Sep 2 14:25:36 1994 Ian Lance Taylor (ian@cygnus.com) + + * config/svr4.h (DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE, + DBX_BLOCKS_FUNCTION_RELATIVE, ASM_IDENTIFY_GCC, + ASM_IDENTIFY_GCC_AFTER_SOURCE, ASM_OUTPUT_SOURCE_LINE, + DBX_FUNCTION_FIRST): Define. This adds support for -gstabs for + SVR4 configurations. -gstabs requires gas and gdb. + * config/sparc/sol2.h (DBX_DEBUGGING_INFO, + DBX_BLOCKS_FUNCTION_RELATIVE, ASM_IDENTIFY_GCC, + ASM_IDENTIFY_GCC_AFTER_SOURCE, ASM_OUTPUT_SOURCE_LINE, + DBX_FUNCTION_FIRST): Don't define. Now defined by config/svr4.h. + (PREFERRED_DEBUGGING_TYPE): Undefine before defining. + * config/sparc/sysv4.h (DBX_DEBUGGING_INFO): Don't bother to + undefine before including svr4.h. + (ASM_OUTPUT_SOURCE_LINE): Undefine before including svr4.h. + + Thu Sep 1 22:02:02 1994 Michael Meissner (meissner@osf.org) + + * toplev.c (fatal_insn): Move most of the code from + fatal_insns_not_found here, and add an argument to give the error + message. + (fatal_insn_not_found): Call fatal_insn. + * rtl.h (fatal_insn, fatal_insn_not_found): Add prototypes. + * genextra.c (main): Don't declare fatal_insn_not_found in + insn-extract.c. + * reload1.c (reload): Call fatal_insn where appropriate to print + an error message instead of calling abort. + (spill_failure): Ditto. + (reload_as_needed): Ditto. + (allocate_reload_reg): Ditto. + (emit_reload_insns): Ditto. + + Thu Sep 1 19:34:26 1994 Jason Merrill (jason@deneb.cygnus.com) + + * tree.c (type_list_equal): If the types of the default arguments + differ, the lists do not match. + + Thu Sep 1 19:29:58 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.md (stack-adjust/push peepholes): Addresses are + moved with "addr", not with "movd". + + Thu Sep 1 19:17:55 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (make_definition): Don't dump core when given an + unterminated string in a -D option. + + Thu Sep 1 19:13:35 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c (convert_arguments): Give proper warnings when + converting COMPLEX_TYPE; widen check to include all integral types. + + Wed Aug 31 20:38:53 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * fixproto: Define FIX_HEADER (needed by Aug 19 change). + Use FIX_HEADER instead of $original_dir/fix-header (twice). + + Wed Aug 31 16:56:15 1994 Jason Merrill (jason@deneb.cygnus.com) + + * stmt.c (warn_if_unused_value): Extend special case for casted + MODIFY_EXPRs to apply to INIT_EXPRs as well. + + Wed Aug 31 16:30:09 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * stor-layout.c (set_alignment): New global. + (layout-type): Add support for SET_TYPE. + + * expmed.c (store_bit_field): Semi-revert Aug 25 change: + Make it apply only for BLKmode, not integral modes. + + * stmt.c (all_cases_count, mark_seen_cases): New functions. + (BITARRAY_TEST, BITARRAY_SET): New macros. Used (mainly by + Chill) to check all cases are covered (for enums and ranges). + (check_for_full_enumeration_handling): Re-write to use the + new functions, now that we have them. + + Wed Aug 31 19:19:29 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * combine.c (nonzero_bits, cases DIV, MOD, UDIV, UMOD): Declare + op0_maybe_minusp and op1_maybe_minusp as HOST_WIDE_INT. + + Wed Aug 31 18:54:54 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (store_split_bit_field): Always adjust arg to + extract_fixed_bit_field in BYTES_BIG_ENDIAN case. + + Wed Aug 31 02:49:34 1994 Roland McGrath + + * config/i386/gnu.h (LIB_SPEC): New macro. + + Tue Aug 30 16:35:23 1994 Jason Merrill (jason@deneb.cygnus.com) + + * toplev.c (lang_options): Add -W{no-,}reorder. + + Tue Aug 30 13:55:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * combine.c (simplify_comparison, case GEU): Add missing break. + + Mon Aug 29 17:50:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * vax.md (extv, extzv): Don't use ROTL when field is outside + boundaries of a word. + + Mon Aug 29 11:43:18 1994 Kresten Krab Thorup (krab@akvavit.next.com) + + * objc/sendmsg.c (get_imp): Don't inline on 386. + + Sun Aug 28 18:56:03 1994 Andrew McCallum (mccallum@cs.rochester.edu) + + * objc/class.c (objc_get_meta_class): New function. + + Sat Aug 27 23:13:53 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.c (legitimate_address_p): If index register is either + the arg pointer or the stack pointer, and there is no scale + factor, swap with the base register. + + * i386/i386.h (REG_CLASS_CONTENTS): Don't allow the arg pointer + register as an index register, since the frame could be omitted, + and the stack pointer is not valid as an index. + + * i386/i386.md (mov*, movstrict*): Don't create pushes of memory + values when creating insns, let the combiner create a push of a + memory value if -m386. In particular, pushes of byte values was + broken because there is no pattern to recognize such a push. + + Fri Aug 26 16:03:09 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.h (MASK_*): Add masks for all of the switches. + (TARGET_*): Use appropriate MASK_* instead of a number. Add + -mdebug-addr switch to debug GO_IF_LEGITIMATE_ADDRESS, + -mno-wide-multiply to turn off widening multiplies, and -mno-move + to allow integer move insns to generate direct memory to memory + copies, which reload will fix up. Add TARGET_386 which is not of + TARGET_486. + (REG_ALLOC_ORDER): Go to the order used in 2.5.8, eax, edx, ecx, ... + Add a comment describing the tradeoffs. + (REG_OK*): Add strict and non-strict versions of the macros that + are always present, and REG_OK_STRICT chooses between the two + inner macros. + (GO_IF_LEGIMATE_ADDRESS): Move processing to legitimate_address_p + function. + (LEGITIMIZE_ADDRESS): Move processing to legitimize_address + function. + (function declarations): Add function declarations for all extern + functions in i386.c. + + * i386/i386.c (asm_add): Add support in case adding by 1 or -1 to + use inc/dec. + (various): Change TARGET_486 -> !TARGET_386. + (legitimate_address_p): Move GO_IF_LEGITIMATE_ADDRESS processing + here from i386.h. Combine OSF/rose support from osfrose.h through + the use of conditional macros. Only recognize addresses in + canonical formats, code adapted from the i960 port. Add tracing + if -mdebug-addr. + (legitimize_address): Move LEGITIMIZE_ADDRESS here from i386.h, + and add adaptations from the i960 port. + (convert_387_op): Remove unused function. + + * i386/i386.md (various): Remove cast to char * of output + functions, since i386.h now declares them all properly. Change + TARGET_486 tests to !TARGET_386 and !TARGET_486 to TARGET_386. + (movsi, movstricthi, movhi, movstrictqi, movqi, movdi): Add + define_expand wrappers to prevent memory<->memory moves from being + generated unless -mno-move is used. On 486's do not allow push of + memory insns to be generated unless -mno-move. + (movdi): For movdi patterns, add 2 (clobber (match_scratch...)) + declarations to allow memory<->memory moves with non-contigous + registers, so that reload don't abort if it can't make a DI + register. + (umulsidi3, mulsidi3): Don't allow pattern if -mno-wide-multiply. + (smultsi3_highpart, umultsi3_highpart): Add patterns to make + division by constants generate better code. + + * i386/osfrose.h (MASK_*): Use octal to define bitmasks, not hex, + for compatibility with i386.h. + (NO_IMPLICIT_EXTERN_C): Define. + (LONG_DOUBLE_TYPE_SIZE): Explicitly define to be 64 instead of + just #undef'ing it. + (GO_IF_LEGITIMATE_ADDRESS): Delete, merged with common i386 code. + (ASM_FILE_END): Print -fschedule-insns and -fschedule-insns2 in + ident string if those options are used. + (REAL_LD_FILE_NAME): Delete. + (ASM_OUTPUT_DOUBLE): Delete, use the common macros. + (ASM_OUTPUT_FLOAT): Ditto. + (ASM_OUTPUT_LONG_DOUBLE): Ditto. + + Thu Aug 25 17:15:18 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * expmed.c (store_bit_field): Always store into multi-word + bitfields starting with low addresses. (Old code was + incompatible with operand_subword_force on big-endian targets.) + + Thu Aug 25 18:31:20 1994 Antti Miettinen (amiettin@ntc.nokia.com) + + * m68k/lynx.h (CALL_USED_REGS): Add d2 and d3 as call-used. + + Thu Aug 25 11:30:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (record_jump_cond): Don't do anything if OP0 and OP1 + are already equivalent. + + * rtlanal.c (may_trap_p, case EXPR_LIST): New case. + + * c-common.c (shorten_compare): Don't issue warning if both + operands constants and the signedness doesn't affect the + comparison results. + + * configure: Refine handling and error-checking of positional args. + + * print-tree.c (print_node): Print more flags for types and decls. + + * c-typeck.c (type_lists_compatible_p): Treat transparent unions + just like unnamed ones. + + Wed Aug 24 19:34:52 1994 Charles Hannum (mycroft@duality.gnu.ai.mit.edu) + + * configure: Rearrange handling of NetBSD ports to use the standard + `cpu-vendor-os' format. + * config.sub: Recognize names of NetBSD ports that do not correspond + to a CPU name. + + Wed Aug 24 18:43:30 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * print-tree.c (print_node_brief, print_node): Use assignment instead + of initialization for aggregate local variable REAL_VALUE_TYPE d. + + Wed Aug 24 18:28:52 1994 Ian Lance Taylor (ian@cygnus.com) + + * config/svr4.h (ASM_OUTPUT_SECTION_NAME): Define. + * config/sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): Output #alloc to + set SHF_ALLOC in section flags. + + Wed Aug 24 17:45:19 1994 Jim Wilson (wilson@sphagnum.cygnus.com) + + * c-parse.in (parmlist_2): Give error for function with only + ELLIPSIS as an argument. + + Wed Aug 24 17:36:22 1994 H.J. Lu (hjl@nynexst.com) + + * i386/linux.h (STARTFILE_SPEC): Add %{static:-static}. + + Wed Aug 24 14:34:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (expand_call): Check for variable-sized return value + in proper place. + + * c-typeck.c (default_conversion): Don't substitute constant + value if array since will return address. + + * configure (LANG_MAKEFILE): Include lang/Makefile.in in list. + + * alpha.h (EXTRA_CONSTRAINT): Add new letter, `R'. + (ENCODE_SECTION_INFO): Don't check TREE_ASM_WRITTEN. + (PREDICATE_COSTS): Add call_operand. + * alpha.c (call_operand): New function. + (output_epilog): Don't set SYMBOL_REF_FLAG of current function. + * alpha.md (call): Rework to use macro version of jsr. + * osf2.h (LINK_SPEC): Don't define; should never have been. + + * c-typeck.c (push_init_level): Don't blow up if construct_type + is null (can happen with missing brace). + + Wed Aug 24 10:49:35 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.h (REG_ALLOC_ORDER): Restore previous version which + allocates edx first, then ecx, eax, ... This is because perl + doesn't build when the order is eax, ecx, edx... + + Tue Aug 23 09:20:16 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure: Restore old behavior of positional arguments. + Add new argument, --noguess. + config.guess now guesses BUILD, not HOST; HOST defaults from BUILD. + Always compare canonical names, not user-specified names. + Numerous minor changes in the messages output to make the + configuration chosen clearer. + + Tue Aug 23 02:01:42 1994 Richard Stallman + + * config.sub: Move m68k-ccur handling to proper part of file. + Canonicalize cpu type pentium into i486. (Change it to i586 later.) + + Mon Aug 22 18:41:59 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * sh/sh.c (find_barrier): Calculate the size of larger than + SI moves correctly. + (general_movsrc_operand): Allow label_refs plus const. + (sh_function_arg_partial_nregs, sh_function_arg): Pass BLKmode + objects in partial regs. + * sh.h (TARGET_DEFAULT): Turn off BIGTABLE_BIT. + (EXTRA_CONSTRAINT_Q): Allow label_refs plus const. + (READONLY_DATA_SECTION_ASM_OP, EXTRA_SECTIONS, rdata_section): + Delete rdata section and refs. + * sh.md (dimode split): Don't allow a Q constraint source. + + Sun Aug 21 23:15:35 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (FUNCTION_ARG): Use indirect calling conventions when + TARGET_LONG_CALLS is in effect. + + Sat Aug 20 13:31:34 1994 Jim Wilson (wilson@cygnus.com) + + * sched.c (sched_analyze_insn): Add new parameter loop_note. + If loop_note set, then serialize on this insn. + (sched_analyze): New variable loop_note. Pass to + sched_analyze_insn. Set it if we pass a NOTE_INSN_LOOP_BEG or + NOTE_INSN_LOOP_END. + (unlink_notes): Don't save away NOTE_INSN_LOOP_BEG or + NOTE_INSN_LOOP_END notes. + (schedule_block): Generalize code that looks for magic REG_DEAD + notes and converts them to notes. + + Sat Aug 20 12:47:21 1994 Michael Meissner (meissner@osf.org) + + * i386.h (REG_ALLOC_ORDER): Allocate eax first, then ecx, edx, and + then do the nromal allocation order for the remaining registers. + + Fri Aug 19 20:14:35 1994 Jim Wilson (wilson@cygnus.com) + + * tree.c (build_type_variant): Only return existing type if it + also has the same TYPE_NAME. + + * irix5.h (NO_IMPLICIT_EXTERN_C): Comment out. + + Fri Aug 19 16:41:43 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * fixproto: Use $FIX_HEADER macro instead of calling + fix-header directly in 2nd location. + + Fri Aug 19 17:34:19 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (emit_move_insn_1): Never make a no-conflict block. + + * tree.h (struct tree_type): New field transparent_union_flag. + (struct tree_decl): New field transparent_union. + ({DECL,TYPE}_TRANSPARENT_UNION): New macros. + * c-common.c (decl_attribute): Handle "transparent_union" attribute. + * function.c (assign_parms): If parm is transparent union, use + type of first field. + * calls.c (expand_call): Likewise. + * integrate.c (function_cannot_inline): Don't inline if any + parm is a transparent union. + + Fri Aug 19 12:01:11 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Canonicalize ${INPUT} to avoid automounter + problems. + + Fri Aug 19 11:31:24 1994 Kresten Krab Thorup (krab@akvavit.next.com) + + * objc-act.c (build_selector_translation_table): Reset + current_function_decl after hack_function_prototype build it. + (build_module_descriptor): Return constructor name from functions + decl_rtl. + + Thu Aug 18 17:23:18 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * README.FRESCO: New file. Notes about compiling the Fresco + toolkit with g++. + + Thu Aug 18 14:10:22 1994 Jim Wilson (wilson@cygnus.com) + + * combine.c (distribute_notes, case REG_UNUSED): Ignore notes when + from_insn != i3 only if the notes would remain as REG_UNUSED notes. + + Wed Aug 17 18:31:43 1994 Holger Teutsch (holger@hotbso.rhein-main.de) + + * clipper.h (CLIPPER_ARG_SIZE): Return size in bytes. + (FUNCTION_ARG_ADVANCE): Fix argument alignment processing. + + Wed Aug 17 18:03:54 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fx80.md (casesi_2): Operand 0 is HImode; add SIGN_EXTEND + when adding to pc. + (casesi): Operand 0 is HImode. + (unnamed PC addition pattern): Add SIGN_EXTEND to add HImode + offset to SImode PC. + * m68k.md (tablejump): Add SIGN_EXTEND to HImode offset + so can add to SImode PC. + Likewise for matching pattern. + * cse.c (fold_rtx): When folding tablejump, allow LABEL_REF + to be in arg0; also allow other arg to be MINUS, not just be + equivalent to it. + + Mon Aug 15 19:19:11 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (index0): New function. + (trigraph_pcp): Use index0 instead of index, so that a null + byte doesn't suppress further trigraph preprocessing. + + * cccp.c (rescan, do_ident): Pass more accurate size request + to check_expand. + + * cccp.c (main): Don't dump core if given -pcp, -MD, or -MMD + without following arg. + + Mon Aug 15 17:56:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stmt.c (expand_elseif): New function. + + Mon Aug 15 14:16:18 1994 Ian Lance Taylor (ian@cygnus.com) + + * configure: If the host is guessed, and the target name is a + prefix of the host name, then use the target name as the host + name. + + Mon Aug 15 13:35:24 1994 Stan Shebs (shebs@andros.cygnus.com) + + * m68k/m68k-coff.h: New file. + + Sun Aug 14 00:28:15 1994 Andrew McCallum (mccallum@vein.cs.rochester.edu) + + * objc/encoding.c (objc_sizeof_type): Assign from ROUND, + don't increment. Remove ; after while to fix infinite loop. + Add float and double cases. + (objc_alignof_type): Add float and double cases. + * objc/selector.c (): Use __objc_selector_names, not + __objc_selector_array. + (sel_types_match): New function. + (sel_get_typed_uid): Use sel_types_match. Change strcmp to !strcmp. + + Sun Aug 14 21:54:29 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL): + Define. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete. + + * pa.c (hppa_expand_prologue): Avoid writing outside the current + stack boundary in code to handle large stack frames. + + Sun Aug 14 18:55:51 1994 Jim Wilson (wilson@cygnus.com) + + * unroll.c (loop_iterations): Use PREV_INSN not prev_nonnote_insn. + + * bsd-5.h (ASM_OUTPUT_NEWLINE): Delete. + (ASM_OUTPUT_ASCII): Define. + * mips-5.h, svr3-5.h, svr4-5.h: Likewise. + * mips.h (ASM_OUTPUT_NEWLINE): Delete. + (ASM_OUTPUT_ASCII): Don't use ASM_OUTPUT_NEWLINE. + + * va-mips.h (va_start): Add cast to __gnuc_va_list type. + + * flow.c (mark_used_regs): When adding REG_DEAD notes, check for + the case where a multiple register hard reg overlaps a register + set by the insn. + * sched.c (attach_deaths): Likewise. + * combine.c (distribute_notes, case REG_DEAD): Add another + find_reg_fusage call. + + * unroll.c (calculate_giv_inc): Handle constants loaded with IOR. + + Sun Aug 14 16:40:04 1994 Richard Stallman + + * cccp.c (skip_if_group): New arg op. All callers changed. + If output_conditionals is true, output text of failed conditionals. + (conditional_skip): New arg op. All callers changed. + (main): Handle -ifoutput option. + + Sun Aug 14 05:49:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * print-tree.c (print_node{,_brief}): Use REAL_VALUE_TO_DECIMAL + to print REAL_CST ifdef REAL_ARITHMETIC. + + * reload1.c (count_possible_groups) Pass CLASS as arg and only + try to find groups of that class. + + * configure: If config.guess fails and target specified, use as host. + Print a message when making a cross-compiler. + + Sat Aug 13 17:12:30 1994 Jim Wilson (wilson@cygnus.com) + + * configure (sparc-*-sunos4.0*): New configuration. + * t-sunos4: Rename file to t-sunos41. + * t-sunos40: New file. + + Sat Aug 13 13:50:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * reload1.c (emit_reload_insns): Handle a secondary input reload + which needs to use secondary memory too. + + Fri Aug 12 18:53:24 1994 Ian Lance Taylor (ian@cygnus.com) + + * mips/mips.c (override_options): If neither -mcpu= nor -mipsN was + used, and MIPS_CPU_DEFAULT is defined, set mips_cpu to + MIPS_CPU_DEFAULT and set mips_cpu_string to + MIPS_CPU_STRING_DEFAULT. + + Fri Aug 12 10:54:35 1994 Stan Cox (coxs@dg-rtp.dg.com) + + * m88k/dgux.h, m88k/dguxbcs.h (ASM_SPEC,CPP_SPEC): + Made -pipe work for -msvr4. Added -D*_TARGET definitions. + + * m88k.c (emit_bcnd): Improved code generated by changing cmp/bbx + instruction pair to single bcnd instruction + + Fri Aug 12 07:52:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (set_nonvarying_address_components): If BASE is CONST_INT, + add value to start and set BASE to const0_rtx. + (refers_to_mem_p): Don't do it here. + + * function.c (expand_function_start): Add redundant copy to + static_chain_incoming_rtx if SMALL_REGISTER_CLASS so inlining + works properly. + * integrate.c (expand_inline_function): Use single_set when + appropriate. + Delete insn that sets static_chain_incoming_rtx before its use. + (subst_constants): Treat virtual reg as constant. + + * flow.c (mark_used_regs): Only show changes size if one mode is + integral. + * stupid.c (stupid_mark_refs): Likewise. + * combine.c (simplify_rtx, case FLOAT_TRUNCATE): Remove + redundant float_truncate. + * rs6000.md (movsf): Don't truncate if not register; clean up. + + * c-decl.c (duplicate_decls): Suppress -Wredundant-decls warning + if we have already given an error. + + Thu Aug 11 18:44:25 1994 Jason Merrill (jason@deneb.cygnus.com) + + * stmt.c (expand_anon_union_decl): Fix up the alignment and mode + of the member VAR_DECLs. + + Thu Aug 11 13:36:14 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * tree.c (stabilize_reference): Handle COMPOUND_EXPR. + + * fix-header.c (write_rbrac): If NO_IMPLICIT_EXTERN_C is defined, + add extern "C" { ... } to added prototypes. (Needed for hpux.) + + Thu Aug 11 14:23:59 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (rescan): Fix botches with `-lint': the output buffer + pointer was not recached properly, leading to lost output. + Also, buffer overrun was possible. + + * cccp.c (dump_defn_1): Skip newlines and strings correctly. + + Thu Aug 11 14:13:17 1994 Niklas Hallqvist (niklas@appli.se) + + * configure (m68k-*-netbsd*): New target, like others. + + Thu Aug 11 14:09:23 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu) + + * alpha.h (FUNCTION_PROFILER): Load global pointer from $27, not $26. e + + Thu Aug 11 13:52:15 1994 Walter Misar (misar@rbg.informatik.th-darmstadt.de) + + * m68k/hp320.h (NO_DOT_IN_LABEL): Define if HPUX_ASM. + + Thu Aug 11 13:12:12 1994 David Mosberger-Tang (davidm@cs.arizona.edu) + + * alpha.h (BLOCK_PROFILER): Use $26 and $27 instead of $0 and $1. + + Thu Aug 11 13:09:36 1994 Antti Miettinen (amiettin@trshp.trs.ntc.nokia.com) + + * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Call assemble_name. + + Thu Aug 11 12:57:22 1994 Stephen L Moshier (moshier@world.std.com) + + * expr.c (expand_builtin): Relegate sin and cos to ffast-math. + + Thu Aug 11 12:45:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * flow.c (find_auto_inc): Ensure that all proposed changes to + insns are valid before commiting to the auto-inc. + + * calls.c (expand_call): Ensure we call force_operand on + structure_value_addr. + + * configure: Use config.guess to get default value for host, + not target. + + Thu Aug 11 12:43:24 1994 Robert Wilhelm (Robert.Wilhelm@physik.tu-muenchen.de) + + * Makefile.in (mostlyclean): Add missing -f. + + Tue Aug 9 02:02:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.md (default set high): Do not accept function label arithmetic + as a valid operand. + (default lo_sum): Likewise. + * pa.c (hppa_legitimize_address): Do nothing with function label + arithmetic. + (emit_move_sequence): Split up function label arithmetic so that + function's address is loaded first, then constant part is added to + the function's address. + (is_function_label_plus_const): New function. + + Mon Aug 8 19:57:05 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.md (all patterns that use ins/inss and ext/exts): + Disallow use of these instructions when -mnobitfield is + specified. + * ns32k.h (TARGET_BITFIELD): New macro. + (TARGET_SWITCHES): Support for TARGET_BITFIELD. + * ns32k/netbsd.h (TARGET_DEFAULT): Added -mnobitfield. + (CPP_PREDEFINES): Added -Dpc532. + (WCHAR_{TYPE, UNSIGNED, TYPE_SIZE}): Changed to match new definition + in NetBSD 1.0. + * ns32k.c (print_operand_address): A patch for 2.5.8 ended up at the + wrong place. Moved. + + Mon Aug 8 19:42:09 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (create_definition): Warn about `#define a@', since a + diagnostic is now required (see ISO TC1's addition to + subclause 6.8). Also warn about `#define is-empty(x) (!x)'. + + Mon Aug 8 16:32:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fix-header.c (write_rbrac): Set up to use fixed headers + if __USE_FIXED_HEADERS__ is defined. + + * reload1.c (emit_reload_insns): Always clear new_spill_reg_store. + + * reload.c (find_reloads): Force reload for paradoxical SUBREG + of MEM if BYTES_BIG_ENDIAN. + + * m68k/hp320.h (READONLY_DATA_SECTION): Remove definition. + + * function.c (expand_function_start): Only use + static_chain_incoming_rtx once if it is a REG and we + have SMALL_REGISTER_CLASSES. + + * local-alloc.c (find_free_reg): Fix typo in last change. + * rs6000.h (CLASS_CANNOT_CHANGE_SIZE): New macro. + + Sun Aug 7 08:54:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * regs.h (reg_changes_size): Add declaration. + * flow.c (reg_changes_size): New variable. + (allocate_for_life_analysis): Allocate and initialize it. + (mark_used_regs, case SUBREG): Set it. + * local-alloc.c (qty_changes_size): New variable. + (alloc_qty{,_for_scratch}, update_qty_class): Set it. + (local_alloc): Allocate it. + (find_free_reg): If CLASS_CANNOT_CHANGE_SIZE, avoid its registers + if qty_changes_size. + * global.c (find_reg) If CLASS_CANNOT_CHANGE_SIZE, avoid its + registers if reg_changes_size. + * stupid.c (regs_change_size): New variable. + (stupid_life_analysis): Alloc, init and pass it to stupid_free_reg. + (stupid_mark_regs): Set it. + (stupid_find_reg): New arg, CHANGES_SIZE; avoid regs + in CLASS_CANNOT_CHANGE_SIZE if defined and CHANGES_SIZE nonzero. + * reload.c (push_reload): Make test in LOAD_EXTEND_OP case more + precise; handle CLASS_CANNOT_CHANGE_SIZE. + (find_relods): When setting force_reloads, make LOAD_EXTEND_OP + case more precise. + * alpha.h (CLASS_CANNOT_CHANGE_SIZE): New macro. + + * reload1.c (eliminate_regs, case SUBREG): Add USE of pseudo + so we don't improperly delete an output reload. + + Fri Aug 5 15:08:39 1994 Jason Merrill (jason@deneb.cygnus.com) + + * expr.c (expand_expr, COND_EXPR case): Use truthvalue_conversion + to make the condition for running cleanups acceptable to + invert_truthvalue. + + Fri Aug 5 12:29:42 1994 Jim Wilson (wilson@cygnus.com) + + * expmed.c (expand_mult): Accept DImode for synth_mult only if + CONST_DOUBLE_HIGH is zero. Reject negative values for synth_mult + if the mode is larger than HOST_BITS_PER_INT. Don't do the + negate_variant if the mode is larger than HOST_BITS_PER_INT. + + Fri Aug 5 12:23:17 1994 Stephen L Moshier (moshier@world.std.com) + + * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Use long instead of + HOST_WIDE_INT. + + Fri Aug 5 12:18:18 1994 Kaveh R. Ghazi (ghazi@caip.rutgers.edu) + + * configure: In subdirectories, make link to include directory. + * Makefile.in (distclean): Delete it. + + Thu Aug 4 17:21:02 1994 Jason Merrill (jason@deneb.cygnus.com) + + * expr.c (defer_cleanups_to): Put back line which was mistakenly + removed. + + Wed Aug 3 21:37:31 1994 Doug Evans (dje@cygnus.com) + + * sparc.c (v9 sparc_builtin_saveregs): Save quadword fp regs on + 16 byte boundaries. Handle non-zero number of named fp args. + * va-sparc.h (v9 va_start): Pass an arg to __builtin_next_arg. + (v9 va_arg): Advance over float's. + + Wed Aug 3 11:10:32 1994 Ian Lance Taylor (ian@mole.gnu.ai.mit.edu) + + * fixincludes: Changes for glibc. In the main loop, don't fix + files which contain the string ``This file is part of the GNU C + Library''. Don't include in if + contains the string ``__need___va_list''. In , don't + change GNUC_VA_LIST to GNUC_DUMMY_VA_LIST. Don't add extern "C" + to if it contains the string ``__BEGIN_DECLS''. Don't + add multiple inclusion protection to or if + they contain the string ``#ifndef''. + + Tue Aug 2 18:38:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (simplify_unary_operation): Clean up some mode and + size checks with CONST_DOUBLEs; TRUNCATE should do nothing. + + * combine.c (subst_prev_insn): Remove variable and all uses. + + Tue Aug 2 14:42:29 1994 Doug Evans (dje@canuck.cygnus.com) + + * sparc.h (V9_SWITCHES): Add -mmedlow, -mmedany. + (TARGET_OPTIONS): Delete. + (CONDITIONAL_REGISTER_USAGE): Don't unfix %g4 if -mmedany. + * sparc.c (sparc_code_model): Delete. + (sparc_override_options): Code model flags only useable with v9. + + * sparc.h (enum reg_class): New values EXTRA_FP_REGS, + GENERAL_OR_EXTRA_FP_REGS for the v9 case. + (REG_CLASS_NAMES): Likewise. + (REG_CLASS_CONTENTS): Likewise. + (REGNO_REG_CLASS): Handle EXTRA_FP_REGS. + (REG_CLASS_FROM_LETTER): Likewise, as `e'. + Treat `e' like `f' in v8 case. + (FP_REG_CLASS_P): New macro. + (PREFERRED_RELOAD_CLASS): Use it. + (SECONDARY_INPUT_RELOAD_CLASS, SECONDARY_OUTPUT_RELOAD_CLASS, + SECONDARY_MEMORY_NEEDED, CLASS_MAX_NREGS, REGISTER_MOVE_COST): + Likewise. + * sparc.md (all DF/TFmode patterns): Use `e' in contraint field + instead of `f'. + + Mon Aug 1 20:05:51 1994 Roland McGrath + + * config/i386/gnu.h: New file. + * configure (i[34]86-*-gnu*): Deal with this on its own, not like + i[34]86-*-mach*. Use i386/gnu.h and t-libc-ok; set gnu_ld and + gas, and disable fixincludes. + + Mon Aug 1 19:27:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (permanent_allocation): When freeing to + momentary_function_firstobj, set momentary_firstobj to be + the next available location (i.e., momentary_function_firstobj). + + Mon Aug 1 18:52:40 1994 Chris Arthur (csa@gnu.ai.mit.edu) + + * stddef.h: Handle _BSD_WCHAR_T_ like _WCHAR_T_, since + at least BSD/386 1.1 uses the former instead of the latter. + If _BSD_RUNE_T_ is defined, then define rune_t when we define + wchar_t. Test definedness of _GCC_SIZE_T as well as + _GCC_SIZE_T_; likewise for _GCC_PTRDIFF_T and _GCC_WCHAR_T. + + Mon Aug 1 05:20:44 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa-ghpux.h, pa-hpux.h (LINK_SPEC): Any -g argument implies + static linking. + + Sun Jul 31 17:19:37 1994 Jason Merrill (jason@deneb.cygnus.com) + + * integrate.c (expand_inline_function): Don't fall down trying to + pass things by invisible reference. + + Sun Jul 31 06:56:46 1994 Pat Rankin (rankin@eql.caltech.edu) + + * cccp.c (my_strerror): New function. + (error_from_errno, perror_with_name): Use it. + + Sat Jul 30 12:59:01 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold_truthop): Apply masks to constants. + + * print-tree.c (print_node{,_brief}): Use correct printf code to + print INTEGER_CST if HOST_WIDE_INT is wider than int. + + * expmed.c ({store,extract}_bit_field): Don't use bitfield insn + if OP0 is register and bitfield spans it. + + * m88k.c (arith64_operand): Integer CONST_DOUBLE is not DImode. + * sparc.c (reg_or_0_operand): Likewise. + * ns32k.c, pa.c (print_operand): Likewise. + * fx80.h, gmicro.h, ns32/{genix,merlin}.h (PRINT_OPERAND): Likewise. + * m68k/crds.h, m68k/news.h, pyr.h (PRINT_OPERAND): Likewise. + + * alpha.h (CASE_VECTOR_PC_RELATIVE): Define. + (ASM_OUTPUT_ADDR_VEC_ELT): Abort. + (ASM_OUTPUT_ADDR_DIFF_ELT): Now what used to be previous definition. + * alpha.md (tablejump): Rework to look like normal add but verify + that label is for next insn and is tablejump; look for ADDR_DIFF_ELT. + * cse.c (fold_rtx, case MEM): Surround TRUNCATE for jump table + entry with a CONST. + (fold_rtx, case '1'): Handle operand 0 of a CONST. + (fold_rtx, case PLUS): Handle (const (minus (label_ref) (label_ref))). + + Fri Jul 29 19:27:17 1994 Lee Iverson (leei@ai.sri.com) + + * c-decl.c (finish_decl): Preserve initialializer if iterator. + + Fri Jul 29 19:07:23 1994 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) + + * libgcc2.c: Add declaration of ctime. + * bc-emit.c (bc_sym_write): Change %d to %lu in printf calls. + * fix-header.c (write_{l,r}brac): Specify return type of int. + * tree.c (change_main_variant): Return type now void. + * varasm.c (bc_output_constructor): Return type now rtx. + + Fri Jul 29 18:33:48 1994 Ken Duda (kjd@cache.crc.ricoh.com) + + * c-typeck.c (build_unary_op, case *INCREMENT_EXPR): + Add size in bytes, not value of sizeof. + + Fri Jul 29 17:36:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (expand_function_start): Initialize VALUE_ADDRESS. + + * romp.md (tst?f): Use CONST0_RTX instead of incorrect call + to immed_real_const_1. + + * expr.c (move_block_to_reg): Do nothing if NREGS == 0. + + Fri Jul 29 17:17:18 1994 Tom Tromey (tromey@busco.lanl.gov) + + * cccp.c (special_symbol, do_xifdef): Don't access value.defn + of a T_CONST. + + Thu Jul 28 17:19:32 1994 Jason Merrill (jason@deneb.cygnus.com) + + * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Reverse order of execution + of constuctor lists. + * config/svr3.h (DO_GLOBAL_CTORS_BODY): Ditto. + + * libgcc2.c (__do_global_dtors): Reverse order of execution of + destructor lists. + + Thu Jul 28 19:56:30 1994 Jim Pendergraft (jimp@dg-rtp.dg.com) + + * dwarfout.c (output_decl, case FUNCTION_DECL): Corrected + and simplified code that determined when to generate + varargs or ANSI stdargs variable length parameter list + DWARF information. + + Thu Jul 28 19:38:57 1994 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) + + * m68k.md (extv, extzv): In patterns that will use movb and + movw, ensure size is 8 or 16. + + Thu Jul 28 19:28:31 1994 David Robinson (drtr@mail.ast.cam.ac.uk) + + * expr.c (expand_expr, case CONJ_EXPR): Use correct mode for + parts of a complex expression. + + * optabs.c (expand_binop, case MULT [complex]) Fix typo. + + Thu Jul 28 19:21:38 1994 Uwe Seimet (seimet@chemie.uni-kl.de) + + * am68k/atari.h (FUNCTION_VALUE): New override. + + Thu Jul 28 17:27:38 1994 Paul Eggert (eggert@twinsun.com) + + * Makefile.in (c-lex.o, distdir-start): + Depend on $(srcdir)/c-gperf.h, not c-gperf.h. + + Thu Jul 28 15:14:33 1994 Oliver Kellogg (okellogg@salyko.cube.net) + + * m1750.inc (DNR.M): Add missing macro. + + Thu Jul 28 13:02:56 1994 Kresten Krab Thorup (krab@akvavit) + + * objc/misc.c (__objc_xcalloc): Remove declaration of bzero. + + Thu Jul 28 07:29:52 1994 Markus Wild (mw@eunet.ch) + + * c-common.c (decl_attributes): Correct string check for "format" + to include unsigned and signed char. + + Thu Jul 28 07:11:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (compare_spill_regs): Simplify and return zero if + registers are the same. + + * c-decl.c (finish_struct): Don't look at alignment of error_mark_node. + + * combine.c (try_combine): Don't make a MULT if none of the insns + in our input had one. + + Wed Jul 27 19:06:53 1994 R Bowler (rbowler@cix.compulink.co.uk) + + * i370/mvs.h (ASM_OUTPUT_ASCII): Fix bug when first character + of string constant is single quote. + + Wed Jul 27 22:44:32 1994 Jason Merrill (jason@deneb.cygnus.com) + + * m68k/next.h: #undef PCC_STATIC_STRUCT_RETURN. + + * alpha/alpha.h: #define NO_IMPLICIT_EXTERN_C. + + Wed Jul 27 14:06:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (expand_mult): Properly set ADD_TARGET for add_variant. + + * alpha.h (INITIAL_ELIMINATION_OFFSET): Properly compute offset + between AP and SP when get_frame_size and + current_function_pretend_args_size are not a multiple of 16 bytes. + + * expmed.c (expand_divmod): Don't make REG_NOTE if last insn's + destination isn't QUOTIENT. + + Tue Jul 26 19:45:54 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_expr, case ARRAY_REF): Don't fold L"foo"[2]. + + Tue Jul 26 14:10:52 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * config.sub: Refer to NeXT's operating system as nextstep. + + Tue Jul 26 13:50:37 1994 Jim Wilson (wilson@cygnus.com) + + * c-typeck.c (process_init_element): Do not call push_init_level + if the value is error_mark_node. + + * iris5.h (NO_IMPLICIT_EXTERN_C): Define. + + Mon Jul 25 00:20:36 1994 Chris Arthur (csa@gnu.ai.mit.edu) + + * configure (canon_target): add cases to recognize BSD/386 + specifically, so we can use a tm_file that will cause __bsdi__ + to get defined (since emacs, among other things, needs it). + + * config/i386/bsd386.h: New. Use 386bsd.h, and just override + CPP_PREDEFINES (add -Dbsdi) and WCHAR stuff. + + Sat Jul 23 16:30:12 1994 Kaveh R. Ghazi (ghazi@caip.rutgers.edu) + + * fixinc.svr4: Change i860 in #if to __i860__, as with other CPUs. + + Fri Jul 22 14:33:59 1994 Doug Evans (dje@cygnus.com) + + * h8300.md (andhi3, iorhi3, xorhi3): Change constraint on + operand 2 from `i' to `n'. + + Fri Jul 22 09:30:39 1994 DJ Delorie (dj@ctron.com) + + * configure.bat: move code to config/msdos/* (simplification) + + * config/msdos/configure.bat [new file]: moved most processing + here so that as things get more complicated with the language + breakouts, the top directory won't get too messy. Sed script + broken out to simplify processing and avoid quoting errors. + * config/msdos/top.sed [new file]: sed script to change Makefile.in + to Makefile in top directory (currently used for cp directory also) + sed commands changed to handle language breakout + + * gcc.c (pexecute): use spawn*() for djgpp to ensure that quotes + are properly preserved. Response file code left for 16-bit + compilers, which can't handle the long command lines that gcc + may generate. + + * config/i386/go32.h: define NO_IMPLICIT_EXTERN_C. + + Thu Jul 21 23:19:03 1994 Steve Chamberlain (sac@wombat.gnu.ai.mit.edu) + + * sh/sh.h (TARGET_SWITCHES, PACKSTRUCT_BIT, STRUCTURE_SIZE_BOUNDARY): + parse and handle new option. + (LEGITIMATE_CONSTANT_P): LABEL_REFs are no longer illegal. + (WCHAR_TYPE, WCHAR_TYPE_SIZE): New definitions. + (HANDLE_PRAGMA): Has return. + + * sh/sh.c (add_function, seen_function): Experimental code to + generate bsrs. + (handle_pragma): Return final char. + (expand_acall): Handle TARGET_BSR. + (general_movdst_operand, general_movsrc_operand): Allow ok + autoinc/dec. + (bsr_operand): New function. + (fixit): Need to fix LABEL_REFs. + + * sh/sh.md (addc): Simplify. + (adddi3, subdi3, negdi3): Use operand_subword. + (subc, negc): New pattern. + (shifts): Fix constraints. + + Thu Jul 21 17:59:43 1994 Jim Wilson (wilson@cygnus.com) + + * objc-act.c (build_module_descriptor): Don't set DECL_EXTERNAL on + current_function_decl. + + * combine.c (simplify_rtx): For (not (xor X C)) generate new rtx + instead of modifying old rtx. + + * c-decl.c (start_function): If old_decl is NULL, then set it to + the implicit decl if any. Delete superfluous test from warn missing + prototypes code. For warn missing declarations code, only warn if + previous decl is implicit. + + Thu Jul 21 17:47:05 1994 Paul Eggert (eggert@twinsun.com) + + * fold-const.c (fold): Don't fold X-X to 0 if X is floating point + and !flag_fast_math. + + Thu Jul 21 02:07:45 1994 Charles Levert (charles@comm.polymtl.ca) + + * Makefile.in (stmp-multilib): Rework to handle make -n. + (stmp-multilib-sub): New target. + + Tue Jul 19 23:14:42 1994 Larry Jones (larry.jones@sdrc.com) + + * configure (i[34]86-*-isc*): Treat isc4 like isc3. + Remove references to nonexistant files and add extra_parts + when needed. + (i[34]86-*-solaris2*): Remove reference to nonexistant + t-sco and use extra_parts instead. + (i[34]86-*-sysv*, i860-*-sysv3*, m68k-*-sysv3*, m68k-ncr-sysv*): + Replace t-svr3 with extra_parts. + + Tue Jul 19 20:31:34 1994 Doug Evans (dje@cygnus.com) + + * configure (find lang subdirs loop): Try to work around an + apparent bug in bash 1.12 on linux. + + * Makefile.in (clean): Remove multilib build dirs. + + * h8300.c (print_operand, default case): Handle SFmode regs. + + Mon Jul 18 22:02:53 1994 Jim Wilson (wilson@cygnus.com) + + * sparc.c (call_operand): Use symbolic_operand not CONSTANT_P. + (call_operand_address): Likewise. + * sparc.md (call*): Use symbolic_operand not immediate_operand. + Use 's' constraint not 'i' constraint. + + * toplev.c (rest_of_compilation): Clear DECL_ABSTRACT_ORIGIN if + clear DECL_INLINE. + + * global.c (find_reg): Store divide results in temporary variables. + + * gcc.c (process_command): When have -BstageN option, pass include + not stageN/../include to preprocessor. + + Mon Jul 18 21:58:27 1994 Torbjorn Granlund (tege@tiny.cygnus.com) + + * loop.c (move_movables): Aviod lossage when CALL_INSN_FUNCTION_USAGE + is NULL. + + Mon Jul 18 20:53:54 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Rework required loop to avoid crash on decstation. + + Thu Jul 14 09:42:23 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Version 2.6.0 released. + + * explow.c (force_reg): Don't make a REG_EQUAL note for an insn + that doesn't set TEMP. + + Wed Jul 13 17:00:35 1994 Torbjorn Granlund (tege@rtl.cygnus.com) + + * expmed.c (expand_divmod, case CEIL_DIV_EXPR): + Handle emit_store_flag returning 0. + + Wed Jul 13 16:35:57 1994 Jim Wilson (wilson@cygnus.com) + + * expr.c (store_field): Set MEM_IN_STRUCT_P on object and + blk_object. + + Wed Jul 13 08:40:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Makefile.in (distdir-start): Make tmp/ginclude and copy its files. + (distdir-finish): Don't use -f Makefile.in. + (gcc.xtar.gz): Add --best. + + * fold-const.c (decode_field_reference): Merge operand of + a BIT_AND_EXPR with the mask made from the description of the field. + + * fold-const.c (fold, case MULT_EXPR): Remove last change. + + Wed Jul 13 07:12:32 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * xm-pa.h, xm-pahpux.h, xm-pahiux.h (USE_C_ALLOCA): Define. + + Wed Jul 13 03:30:36 1994 Jason Merrill (jason@deneb.cygnus.com) + + * tree.h (TYPE_NEEDS_CONSTRUCTING): New macro. + (tree_type): Add needs_constructing_flag. + * function.c (assign_parms): If TYPE_NEEDS_CONSTRUCTING, pass by + invisible reference. + * calls.c (expand_call): Ditto. + + Wed Jul 13 06:49:05 1994 Simon Cooper (scooper@hardees.rutgers.edu) + + * objc/Object.m: Include stdarg.h before stdio.h. + + Tue Jul 12 21:31:59 1994 Jim Wilson (wilson@cygnus.com) + + * c-decl.c (pushdecl): Don't call lookup_name_current_level_global + when traditional. When doing checks against + IDENTIFIER_LIMBO_VALUE, also do check against + INDENTIFIER_GLOBAL_VALUE when traditional. + + * final.c (getpwd): Declare. + + Tue Jul 12 16:24:10 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (GO_IF_LEGITIMATE_ADDRESS): Only allow immediate addressing + using 5 bits to avoid losing with FP loads and stores on page zero. + + Tue Jul 12 16:20:09 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (ashlsi3, lshrsi3, ashrsi3): Only output low-order five + bits for !TARGET_POWER case. + + Tue Jul 12 13:06:14 1994 Jim Wilson (wilson@cygnus.com) + + * combine.c (record_dead_and_set_regs_1): Can only handle SUBREG + if the register is smaller or equal to BITS_PER_WORD. + + * sparc/sysv4.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Define. + + * final.c (end_final): Store full path name in .d file not just + the filename. + + * README.IRIX5: New file. + + Tue Jul 12 10:55:14 1994 Michael Meissner (meissner@osf.org) + + * i386/osfrose.h (CC1_SPEC): If both -pic-extern/-pic-lib and + -pic-none, use -pic-extern win, instead of -pic-none. + + * i386/osfelf.h (CC1_SPEC): Ditto. + + Tue Jul 12 09:08:06 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads): Don't try to call force_const_mem on + a HIGH. + + * fold-const.c (fold, case MULT_EXPR): If arg is an unsigned + CEIL_DIV_EXPR, convert to TRUNC_DIV_EXPR of a PLUS_EXPR in some cases. + + * alpha.md (ashldi3): Update pattern for (sign_extend (ashift ..)) + to match the current canonicalization. + + * explow.c (round_push, allocate_dynamic_stack_space): Avoid + using CEIL_DIV_EXPR; add adjustment and use TRUNC_DIV_EXPR instead. + + Tue Jul 12 08:12:04 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * dbxout.c (dbxout_source_file): Increment source_label_number outside + of macro expansion. + + * arm.c (reversible_cc_register): New function. + (final_prescan_insn): Don't try to conditionalize jumps with JUMP_CLOB + attribute. + * arm.h (PREDICATE_CODES): Add reversible_cc_register. + * arm.md (matcher for SFmode inequality comparison): Use cmfe, not cfm. + (matchers for {store-flag, not-store-flag, neg-store-flag}): Output + if-false instruction first before if-true instruction. + (matcher for (AND store-flag x)): Only match if reversible_cc_register. + (matcher for (IF-THEN-ELSE reg (NOT reg))): Likewise. + + * arm.h (FRAME_POINTER_REQUIRED): Always true if the function has + nonlocal labels. + * arm.md ({save,restore}_stack_nonlocal): Delete. + + Mon Jul 11 19:29:15 1994 Oliver Kellogg (okellogg@salyko.cube.net) + + * machmode.def (TQFmode): New mode. + * expr.c (convert_move): Add some conversions for TQFmode. + * varasm.c (assemble_real): Handle TQFmode output. + * config.sub (basic_machine): Add 1750a. + * configure (1750a-*-*): New configuration. + * 1750a.c, 1750a.h, 1750a.md, m1750a.inc: New files. + + Mon Jul 11 18:38:42 1994 Doug Evans (dje@cygnus.com) + + Add support for the h8/300h cpu. + * config/h8300/lib1funcs.asm: New file. + * h8300/t-h8300 (CROSS_LIBGCC1): Use libgcc1-asm.a. + (LIB1ASMSRC, LIB1ASMFUNCS, LIB2FUNCS_EXTRA, MULTILIB_OPTIONS, + MULTILIB_DIRNAMES, LIBGCC, INSTALL_LIBGCC): Define. + (fp-bit.c): Build it. + * h8300/h8300.h (CPP_PREDEFINES, CPP_SPEC, LIB_SPEC, TARGET_SWITCHES, + BITS_PER_WORD, MAX_BITS_PER_WORD, UNITS_PER_WORD, MAX_UNITS_PER_WORD, + POINTER_SIZE, PARM_BOUNDARY, BIGGEST_ALIGNMENT, + BIGGEST_FIELD_ALIGNMENT, STACK_BOUNDARY, HARD_REGNO_NREGS, + HARD_REGNO_MODE_OK, REG_CLASS_NAMES, REG_CLASS_CONTENTS, + REGNO_REG_CLASS, PUSH_ROUNDING, FUNCTION_ARG_ADVANCE, + TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE, + CONSTANT_ADDRESS, MOVE_MAX, Pmode, SIZE_TYPE, PTRDIFF_TYPE): + Add h8/300h support. + (LINK_SPEC, TARGET_RTL_DUMP, TARGET_H8300, TARGET_H8300H, + REAL_ARITHMETIC, SETUP_INCOMING_VARARGS, HAVE_POST_INCREMENT, + HAVE_PRE_DECREMENT, MAX_MOVE_MAX, NO_BUILTIN_SIZE_TYPE, + NO_BUILTIN_PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE, + MAX_WCHAR_TYPE_SIZE, ASM_WORD_OP, INIT_SECTION_ASM_OP, + CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, EXTRA_SECTIONS, + EXTRA_SECTION_FUNCTIONS, ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR, + DO_GLOBAL_CTORS_BODY, DO_GLOBAL_DTORS_BODY, INIT_TARGET_OPTABS): + Define. + (CAN_DEBUG_WITHOUT_FP, PCC_STATIC_STRUCT_RETURN, STRUCT_VALUE_REGNUM, + STRUCT_VALUE_INCOMING, STRUCTURE_SIZE_BOUNDARY): Undefine. + (enum reg_class): Add h8/300h support. + (emit_a_shift): Declare. + (TARGET_DEFAULT): Set default to -mquickcall. + (DOUBLE_TYPE_SIZE): Fix at 32. DFmode support doesn't exist. + (CALL_USED_REGISTERS, REG_ALLOC_ORDER): Swap registers 2,3 with 4,5. + Registers 0,1 contain function result, allocate after 2,3. + (STATIC_CHAIN_REGNUM): Use reg 4. + (CONST_OK_FOR_LETTER_P): 'O' is ok_for_bclr, 'P' is small_power_of_two. + (FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): First + attempt at an implementation. + (CONST_COSTS): Move code into function const_costs. + (BRANCH_COST): Set to 0. + (NOTICE_UPDATE_CC): Move code into function notice_update_cc. + (ASM_FILE_START): Move code into function asm_file_start. + (ASM_FILE_END): Move code into function asm_file_end. + (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Use REAL_VALUE_TO_DECIMAL. + * h8300/h8300.c (cpu_type, names_extended, names_upper_extended, + h8_reg_names, h8_push_ops, h8_pop_ops, h8_mov_ops, h8_push_op, + h8_pop_op, h8_mov_op, current_function_anonymous_args, extra_pop, + hand_list): New variables. + (h8300_init_once, asm_file_start, asm_file_end, ok_for_bclr, o_operand, + p_operand, call_insn_operand, jump_address_operand, bit_operand, + eq_operator, const_costs, notice_update_cc, bit_operator, + nshift_operator, expand_a_shift, get_shift_alg, emit_a_shift, + fix_bit_operand): New functions. + (shift_alg, shift_type, shift_mode): New enums. + (shift_insn): New struct. + (shift_n_bits, can_shift): Deleted. + (shift_one, rotate_one): New variables. + (WORD_REG_USED): New macro (was function word_reg_used). + (dosize, function_prologue, function_epilogue, print_operand_address): + Add h8/300h support. + (small_power_of_two): Renamed from potl8. + (potg8): Deleted. + (general_operand_src): Fix POST_INC case. + (general_operand_dst): Fix PRE_DEC case. + (function_arg): 3 regs of args are passed if -mquickcall. + 4 regs of args are passed to handwritten assembler routines. + (print_operand): New cases 'A', 'P', 'S', 'U', 'W', 'b', 'c', 'd', 'g'. + Delete case 'O'. Sort cases. Add h8/300h support. + (do_movsi): Renamed from domovsi. + Handle reload_in_progress and reload_completed. + (initial_offset): Renamed from io. Add h8/300h support. + * h8300/h8300.md (cpu): New attribute. + (attribute length): Add h8/300h support. + (attribute cc): New value `cbit'. + (all anonymous insns): Give them names. + (move insns): Add h8/300h support. + (tstqi, tsthi): Use btst insn if able. + (arithmetic insns): Add h8/300h support. + (boolean insns): Likewise. + (negate insns): Likewise. + (branch insns): Likewise. + (call_value): Use call_insn_operand for operand 1. + (shift insns): Completely rewritten. Add h8/300h support. + (zero/sign extension insns): Add h8/300h support. + (extv): Deleted. + (insv, extzv): Only use for h8/300. + (bitfield insns): Completely rewritten. + (fancyb*): New insns for speeding up bit accesses. + + * optabs.c (init_optabs): Allow target specific libcalls + with INIT_TARGET_OPTABS. + + Mon Jul 11 18:32:42 1994 Steve Chamberlain (sac@cygnus.com) + + * config/fp-bit.c: New file. Provides simple fp emulation library. + + Mon Jul 11 18:27:42 1994 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (libgcc1-asm.a): New target for building libgcc1.a + in cross compilers. + + Mon Jul 11 17:00:45 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (movsi matcher): Add nop for moving special register + to itself for !TARGET_POWER. + (movhi and movqi matcher): Likewise and add mtjmpr attribute. + Separate MQ from CTR and LR target registers for TARGET_POWER. + + * powerpc.h (CPP_SPEC): Fix typo. + + Mon Jul 11 16:50:29 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (stmt): Don't give more than one error message if a + nested `if' has an empty body. + + * a29k.md (movqi): Call loadhi, not loadqi. + + Mon Jul 11 16:46:09 1994 Jeffrey A. Law (law@mole.gnu.ai.mit.edu) + + * pa.h (DEBUGGER_ARG_OFFSET): Define. If no frame pointer + is available, then adjust the offset by the size of the + current frame. + + Mon Jul 11 16:34:14 1994 Stan Shebs (shebs@andros.cygnus.com) + + * configure (*-*-lynxos*): Always run fixincludes, and if not using + gas, set tm_file to lynx-ng.h. + * config/x-lynx: Always run fixproto. + * config/lynx.h, i386/lynx.h, m68k/lynx.h, sparc/lynx.h: Rewrite + to work with gas producing coff files. + * config/lynx-ng.h, i386/lynx-ng.h, m68k/lynx-ng.h, + sparc/lynx-ng.h: New files. + + Mon Jul 11 15:16:28 1994 Pat Rankin (rankin@eql.caltech.edu) + + * make-cc1.com: Compile most of cc1plus in the `cp' subdirectory. + * vmsconfig.com: When setting up tm.h, convert "vax/vax.h" into + "config-vax.h" rather than "[.config.vax]vax.h" for #include so + it will work from [.cp] subdirectory; copy vax.h to config-vax.h + as part of configuration setup. Also, manually include cc1plus + in the list of buildable compilers (a temporary measure; it + should process cp/Makefile.in like it does for primary makefile). + + * make-cc1.com: Use `=' rather than `:=' when setting up CC, + so that `gcc' can be defined as a foreign command if necessary; + eliminate `set symbol/scope=noGlobal' for same reason; use `=' + with all other symbols, for consistency; add explicit .obj + extension to some lists of object files passed to the linker; + general cleanup of the command text echoed during execution. + * make-cccp.com: Revise to be more consistent with make-cc1.com + for symbol setup & usage and for echoing command execution. + + Mon Jul 11 15:03:23 1994 Charles Hannum (mycroft@duality.gnu.ai.mit.edu) + + * configure: Recognize m68k-*-netbsd* and i[345]86-*-netbsd*. + * cccp.c, collect2.c, gcc.c, protoize.c, cp/g++.c (sys_errlist) + [bsd4_4]: Do this for __NetBSD__ also. + + Mon Jul 11 14:16:28 1994 Kresten Krab Thorup (krab@spiff.gnu.ai.mit.edu) + + * mips/mips.h (STRUCT_VALUE): Change definition from `(rtx)0' to + just `0' so it is a valid expression for the pre-processor. + + Mon Jul 11 10:54:35 1994 Stan Cox (coxs@dg-rtp.dg.com) + + * configure (m88k-dg-dguxbcs): New configuration. m88k-dg-dgux + Now builds an elf compiler. Both targets will create bcs or elf. + + * m88k/dgux.h (ASM_SPEC,STARTFILE_SPEC,LIB_SPEC): svr4 default. + + * m88k/dguxbcs.h (ASM_SPEC,STARTFILE_SPEC,LIB_SPEC): + New target for svr3. + + * m88k/x-dgux, m88k/t-dgux, m88k/x-dguxbcs: + Changed for svr4/svr4/svr3 respectively. + + * m88k/m88k.h (TARGET_SVR3): New target switch. + + Wed Jun 29 19:23:27 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu) + + * alpha.h (LIB_SPEC): If -pg, add -lprof2. + + Mon Jul 11 13:17:38 1994 Ian Lance Taylor (ian@cygnus.com) + + * combine.c (simplify_set): Only turn IF_THEN_ELSE into AND if + MODE_INT. + + Sun Jul 10 06:03:12 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (eliminate_regs_in_insn): Handle special case of + assignment from hard frame pointer to frame pointer (for + nonlocal goto). + * function.c (instantiate_virtual_regs_1): Remove last change. + * stmt.c (expand_end_bindings): When adjusting FP, set it + from hard_frame_pointer_rtx. + + * expr.c (expand_builtin, case BUILT_IN_FSQRT): Don't use + asterisk in name of `errno'. + + Fri Jul 8 22:07:32 1994 Jim Wilson (wilson@cygnus.com) + + * stdarg.h: Delete include of when not gcc. + * varargs.h: Delete include of when not gcc. + + Fri Jul 8 18:45:56 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): Copy a0 to d0, not + the other way. + + Fri Jul 8 17:41:39 1994 Jim Wilson (wilson@cygnus.com) + + * expr.c (get_inner_unaligned_p): New function. + (expand_assignment, expand_expr): Use it. + + Fri Jul 8 17:16:25 1994 Doug Evans (dje@cygnus.com) + + * expmed.c (extract_split_bit_field): Set UNIT to BITS_PER_WORD for + register values. + (store_split_bit_field): Likewise. Call operand_subword_force. + + Fri Jul 8 13:48:23 1994 Mike Stump (mrs@cygnus.com) + + * expr.c (target_temp_slot_level): New variable to keep track of + the current stack level for temporaries created by TARGET_EXPRs. + * expr.h (target_temp_slot_level): Declare it. + * expr.c (expand_expr): Add code to maintain the new temporary + stack for TARGET_EXPRs to the CLEANUP_POINT_EXPR code and change + the allocation of temporaries for TARGET_EXPRs to be from the new + stack, so that they may live longer, and only be reused after they + are no longer in use. + * function.c (assign_stack_temp): KEEP can now also be 2, to + indicate allocation from the longer term frontend controlled + temporary stack. + * function.c (init_function_start): Initialize + target_temp_slot_level to zero. + + Fri Jul 8 16:52:38 1994 Jim Wilson (wilson@cygnus.com) + + * combine.c (distribute_notes, REG_DEAD case): When check to see + if insn uses register, also call find_regno_fusage. + + * sparc.h (SECONDARY_MEMORY_NEEDED_RTX): Call assign_stack_local + if the frame has zero size. + + Fri Jul 8 11:46:50 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * varasm.c (record_constant_rtx, force_const_mem): Ensure everything + is in saveable_obstack, not current_obstack. + + * combine.c (force_to_mode): OP_MODE must be MODE if MODE and + mode of X are of different classes. + (nonzero_bits, num_sign_bit_copies): Say nothing known for + floating-point modes. + + * function.c (instantiate_virtual_regs_1, case SET): + If DEST is virtual_stack_vars_rtx, replace with hardware + frame pointer. + + * expr.c (expand_expr, case CONVERT_EXPR): If changing signedness + and we have a promoted SUBREG, clear the promotion flag. + + * c-decl.c (finish_decl): Put RTL and other stuff in + permanent_obstack if DECL is. + + * combine.c (gen_unary): Add new arg, OP0_MODE. + All callers changed. + + Thu Jul 7 19:58:35 1994 Jason Merrill (jason@deneb.cygnus.com) + + * varasm.c (assemble_variable): Do set TREE_ASM_WRITTEN on + erroneous incomplete decls. + + Thu Jul 7 17:59:46 1994 Joseph Arceneaux (jla@gnu.ai.mit.edu) + + * configure (m68k-motorola-sysv*): Use mot3300g.h for gas. + * m68k/mot3300g.h: New file. + + Thu Jul 7 17:42:21 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): Fix typo in last change. + + Thu Jul 7 17:36:26 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (expand_mult_highpart): Build constant forms of CNST1 + in MODE or WIDE_MODE, as appropriate. + + * optabs.c (expand_binop, case DIV [complex]): Fix typo in last change. + + * alpha.md (reload_inqi): Make operand[2] be TImode and + pass register number that differs to unaligned_loadqi. + (reload_outqi): Change overlap in temps to unaligned_storeqi. + * alpha.c ({un,}aligned_memory_operand): Check against + hard_frame_pointer_rtx, not frame_pointer_rtx. + + Thu Jul 7 01:39:33 1994 Doug Evans (dje@cygnus.com) + + * combine.c (make_compound_operation, AND case): Do extraction in + desired result mode. + + * flow.c (mark_set_1): Record explicit hard registers in their + raw mode. + (mark_used_regs): Likewise. + * combine.c (distribute_notes): Likewise. + + Wed Jul 6 14:45:08 1994 Pat Rankin (rankin@eql.caltech.edu) + + * longlong.h (vax sdiv_qrnnd): Fix typo. + + Wed Jul 6 19:59:12 1994 Mike Stump (mrs@cygnus.com) + + * expr.c (expand_expr, defer_cleanups_to, expand_cleanups_to): All + cleanups have to be protected by interim exception handling code. + * stmt.c (expand_decl_cleanup, expand_cleanups): Ditto. + * toplev.c (interim_eh_hook): Hook for interim exception handling. + * toplev.c (interim_eh): Default implementation for exception + handling that does nothing. + * toplev.c (main): Set default for interim_eh_hook. + + Wed Jul 6 17:56:37 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (output_prolog): Start memory probing with $2. + + Wed Jul 6 14:21:14 1994 Jim Wilson (wilson@cygnus.com) + + * stmt.c (struct nesting): Add new field alt_end_label. + (expand_start_loop): Initialize it to zero. + (expand_end_loop): Reorder loop if find either a jump to end_label + or a jump to alt_end_label. + (expand_exit_loop_if_false): Set alt_end_label. + + Wed Jul 6 05:07:31 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * c-common.c (decl_attributes): If TREE_TYPE for the DECL is updated, + then update TYPE as well. + + * longlong.h (arm umul_ppmm): Fix use of uninitialized register. + Eliminate clobbers of hard registers. + + Wed Jul 6 03:22:04 1994 Torbjorn Granlund (tege@rtl.cygnus.com) + + * expmed.c (expand_divmod): Clear out TARGET also if OP1 is a + constant, when TARGET == OP0. + + Tue Jul 5 18:58:28 1994 Torbjorn Granlund (tege@rtl.cygnus.com) + + * Makefile.in (c-parse.y): Redirect through tmp file. + (objc-parse.y): Likewise. + (c-gperf.h): Likewise. + (mostlyclean): Delete the new tmp files. + + * expmed.c (expand_divmod): Fix typo setting op1_is_pow2. + (expand_divmod): Handle powers-of-two specifically for unsigned + CEIL_*_EXPR. + + * longlong.h: Really fix the test for _IBMR2. Change test of + __powerpc__ to _ARCH_PPC. + + Tue Jul 5 17:00:19 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (try_combine): Don't check for replacing + arg of function here. + (can_combine_p): Do it here. + + * expr.c (expand_increment): If pre-incrementing a promoted + variable, don't adjust OP0 since the result won't be used. + + * jump.c (duplicate_loop_exit_test): Handle SUBREG in SET_DEST + of loop exit test statements. + + * combine.c (try_combine): If I2DEST was used in I2SRC, it isn't + unused just because there is no SET for I2 anymore. + + Mon Jul 4 11:15:13 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.h (RS6000_OUTPUT_BASENAME): Always call assembler_name + and pass the actual symbol name. + + * varasm.c (assemble_name): Call STRIP_NAME_ENCODING. + + * cse.c (canon_hash, exp_equiv_p): Refer to string in SYMBOL_REF + with XSTR, not XEXP. + + Sat Jul 2 18:53:19 1994 Jim Wilson (wilson@cygnus.com) + + * mips.md (smuldi3_highpart, smuldi3_highpart_internal, + umuldi3_highpart, umuldi3_highpart_internal): New patterns. + + * unroll.c (loop_iterations): Only use REG_EQUAL note value if it + is constant. + + * dbxout.c (dbxout_type_methods): Enable debugging info for + template classes. + + * c-lex.c (yylex): Reject imaginary numbers when pedantic. + + * c-decl.c (duplicate_decls): When make void* match char*, set + DECL_IN_SYSTEM_HEADER. + + * Makefile.in (clean): Delete LIB2FUNCS_EXTRA. + + * alpha.h (FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, + BLOCK_PROFILER): Use multiple fputs/fprintf calls instead of ANSI + C concatenated strings. + (PREDICATE_CODES): Add cint8_operand. + + * gcc.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -isystem. + + Sat Jul 2 09:34:20 1994 Torbjorn Granlund (tege@rtl.cygnus.com) + + * expmed.c (expand_divmod): Always return gen_lowpart (mode, ...). + + Fri Jul 1 19:28:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * reorg.c (make_return_insns): Make sure redirecting a jump to + a RETURN insn does not invalidate the delay slots of the jump. + + Fri Jul 1 16:32:58 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * longlong.h: (arm umul_ppmm): Fix typos in last change. Mark + hard-coded registers with "%|". + + Fri Jul 1 10:08:47 1994 Jason Merrill (jason@deneb.cygnus.com) + + * toplev.c (compile_file): Pass through static consts and inlines + multiple times in case they reference each other. + + Fri Jul 1 07:41:19 1994 Torbjorn Granlund (tege@tiny.cygnus.com) + + * longlong.h: Test for _AM29K and _IBMR2, not ___AM29K__ + and ___IBMR2__. + (arm umul_ppmm): New definition. + (clipper umul_ppmm, smul_ppmm, __umulsidi3): New definitions. + (hppa count_leading_zeros): New definition. + (i960 umul_ppmm, __umulsidi3): New definitions. + (mc68000 umul_ppmm): Use %. before size suffixes. + (mc88110 umul_ppmm, udiv_qrnnd): Rewrite, + (mc88000): Get UMUL_TIME and UDIV_TIME right. + (mips): Get UMUL_TIME right. + (ns32000 umul_ppmm): New definition. + (ns32000 udiv_qrnnd): Rename from bogus div_qrnnd, rewrite. + (powerpc umul_ppmm, smul_ppmm): New definitions. + (_IBMR2/powerpc add_ssaaaa, sub_ddmmss): Improve. + (pyr umul_ppmm): Fix typo. + (sparc add_ssaaaa, sub_ddmmss): Match constant 0 for all inputs. + (vax sdiv_qrnnd): New definition. + + * expmed.c (expand_divmod): Put OP0 in a register when computing + remainder, or when OP1 is constant. + + Fri Jul 1 06:46:09 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * jump.c (jump_optimize): Don't convert if (foo) x++ into an + add of an scc unless X has no side effects and can't trap. + + * c-parse.in (initelt): The equal sign is optional when + positioning to a single element of an array. + + * c-typeck.c (push_init_level): If not at "unfilled" position, + set constructor_incremental to 0; likewise for range. + + * xm-alpha.h: If GNUC, include alloca.h, else declare alloca. + + * m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): New macro. + + * expmed.c (expand_divmod): Don't set REG_NOTES unless we generated + a quotient. + + Thu Jun 30 18:25:52 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * gcc.c (do_spec_1, case 'P'): Don't add underscores to macros + starting with '_[A-Z]'. + + Thu Jun 30 18:16:36 1994 Will Athanasiou (will@guardian.westford.ccur.com) + + * m68k.md (umulsi3_highpart, smulsi3_highpart): Fix constraint + for operand 0 in define_insn. + + Thu Jun 30 16:07:33 1994 Kaveh R. Ghazi (ghazi@noc.rutgers.edu) + + * fixincludes: Put wrappers around and to + avoid multiple inclusion errors on m88k-tektronix-sysv3. + + Thu Jun 30 12:08:48 1994 Kresten Krab Thorup (krab@spiff.gnu.ai.mit.edu) + + * objc-act.c, objc/init.c (OBJC_VERSION): Incremented to 6. + + * objc/sendmsg.c (INVISIBLE_STRUCT_RETURN): New macro. + (__objc_block_forward): Declare depending on the above. + + * objc/class.c (objc_next_class): New function. + * objc/objc-api.h (objc_next_class): New function. + + * objc-act.c (get_proto_encoding, build_typed_selector_reference): + New fucnctions. (UTAG_PROTOCOL): New define. + (objc_selector_template, flag_typed_selectors): New variables. + (objc_init): set flag_typed_selectors if -fgnu-runtime. + (synth_module_prologue): Change declaration of + _OBJC_SELECTOR_TABLE when flag_typed_selectors is non-null. + (build_module_descriptor): Make sure the generated constructor + function is declared public. + (build_selector): Only cast to SEL when not doing typed selectors. + (build_selector_translation_table): Rewrite initialization. + (build_tmp_function_decl): Make up new name when called, since it + may now be called multiple times. + (hack_method_prototype): Use init_function_start to reinit args + machinery. Also set current_function_decl before calling + assign_parms. + (generate_protocols): Don't generate encoding twice. + (build_selector_template): New function. + (build_method_list_template): Generate (void*)0 as first element, + not (int)0. + (build_message_expr): move the call to build_selector_reference + towards the end, where we have determined the function prototype. + + * objc/Object.h, objc/Object.m (read:, write:, streamVersion:): + Un-disable for alpha. (forward::, performv::): Declare and fix to + return retval_t. + * objc/archive.c: Completely rewritten to handle 64 bit longs and + pointers. + * objc/class.c (class_pose_as): Rewritten. + * objc/encoding.c: use new ROUND macro for alignment rounding. + * objc/init.c, objc/selector.c, objc/sendmsg.c: Rewritten to + handle new selectors. + + Thu Jun 30 07:49:50 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.h (INITIAL_ELIMINATION_OFFSET): Check frame_pointer_needed when + eliminating the arg pointer into the stack pointer. + + Thu Jun 30 06:25:50 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-common.c (c_build_type_variant): Remove last change; instead, + copy TYPE if not in old obstack. + + Wed Jun 29 21:51:52 1994 Jason Merrill (jason@deneb.cygnus.com) + + * toplev.c (lang_options): Add -W{no-,}non-virtual-dtor. + + Wed Jun 29 19:23:27 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu) + + * final.c (end_final,profile_function): Profiling variables are + size of pointer, not int. + * alpha.h (LIB_SPEC): If -pg, add -lprof2. + (STARTFILE_SPEC, {FUNCTION,BLOCK,FUNCTION_BLOCK}_PROFILER): New macros. + + Wed Jun 29 15:52:45 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * loop.c (basic_induction_var, case REG): Allow previous + insn to set a SUBREG of X. + + * alpha.c (alpha_sa_size): Round size to 16-byte boundary. + (add_long_const): Add new arg, TEMP_REG. + (output_{pro,epi}log): Rework to put save area between outgoing + args and local variables. + * alpha.h (FRAME_POINTER_REGNUM): Now register 63. + (HARD_FRAME_POINTER_REGNUM): New macro. + (CONDITIONAL_REGISTER_USAGE, REG_CLASS_CONTENTS, REGNO_REG_CLASS): + Show register 63 is not an FP register. + (REGHNO_OK_FOR_BASE_P, REG_OK_FOR_BASE_P, REGISTER_NAMES): Likewise. + (ALPHA_ROUND): New macro. + (STARTING_FRAME_OFFSET, ELIMINABLE_REGS, INITIAL_ELIMINATION_OFFSET): + Modify to reflect save area between outgoing args and local vars. + * alpha.md: Add new pattern for double-add when have + reg + frame pointer. + Slight changes to all such patterns and add define_splits for them. + + * global.c (global_alloc): Make a more accurate attempt to see + if the frame pointer will be used. + If it is, show HARD_FRAME_POINTER_REGNUM used if its not + the same as FRAME_POINTER_REGNUM. + * reload1.c (reload): Can't eliminate if frame pointer needed + and TO is stack pointer. + Spill HARD_FRAME_POINTER_REGNUM if not FRAME_POINTER_REGNUM + and frame pointer is needed. + (spill_hard_reg): If CANT_ELIMINATE, set regs_ever_live; + no longer done by callers. + + * a29k.md (movqi): Add missing `DONE'. + + Wed Jun 29 15:44:18 1994 Doug Evans (dje@canuck.cygnus.com) + + * sparc/sparc.h (CPP_SPEC): Split up v9/non-v9 stuff. + Move -Acpu and -Amachine from here. + (CPP_PREDEFINES): To here. + (NO_BUILTIN_PTRDIFF_TYPE): Undefine. + (NO_BUILTIN_SIZE_TYPE): Likewise. + (PTRDIFF_TYPE): Split up v9/non-v9 definitions. + (SIZE_TYPE): Likewise. + * sparc/sp64-elf: (PTRDIFF_TYPE): Remove dependence on POINTER_SIZE. + (SIZE_TYPE): Likewise. + + Wed Jun 29 15:28:17 1994 Michael Meissner (meissner@osf.org) + + * cccp.c (collect_expansion): Always put 1 space after the macro + expansion in ANSI mode to fix regression from June 24th. + + Tue Jun 28 22:41:52 1994 Doug Evans (dje@cygnus.com) + + * combine.c (simplify_set): Evaluate HAVE_conditional_move at runtime. + + Tue Jun 28 20:27:08 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * optab.c (expand_binop): Convert OP0 to mode for library calls. + + Changes to optimize division-by-constants, and make ceil and floor + rounding work correctly: + * expmed.c (expand_mult): Generalize to call synth_mult also + for OP1 - 1. + (ceil_log2): New function. + (choose_multiplier): New function. + (invert_mod2n): New function. + (expand_mult_highpart_adjust): New function. + (expand_mult_highpart): New function. + (EXACT_POWER_OF_2_OR_ZERO_P): New macro. + (expand_divmod): Almost completely rewritten. + (expand_shift): Don't truncate immediate shift count, it doesn't work + for types smaller than int. + * expr.h (smul_highpart_optab, umul_highpart_optab): New variables. + * genopinit.c (optabs): Add [us]mul_highpart_optab. + * optabs.c (smul_highpart_optab, umul_highpart_optab): New variables. + (expand_binop): Handle [us]mul_highpart_optab as commutative. + (init_optabs): Initialize [us]mul_highpart_optab. + * fold-const.c (div_and_round_double): Make it globally accessible. + * a29k.md (smulsi3_highpart, umulsi3_highpart): New patterns. + * alpha.md (umuldi3_highpart): New expander and matcher. + * alpha.c (cint8_operand): New predicate. + * m68k.md (umulsi3_highpart, const_umulsi3_highpart): + New expander and matcher. + (smulsi3_highpart, const_smulsi3_highpart): Likewise. + + Tue Jun 28 13:42:10 1994 Jim Wilson (wilson@cygnus.com) + + * sol2.h (CPP_SPEC): Handle -msupersparc. + * sparc.c (cpu_type, sparc_cpu_type): Rename to arch_type and + sparc_arch_type. Fix all users. + (supersparc_adjust_cost): New function. + * sparc.h (cpu_type, sparc_cpu_type): Rename to arch_type and + sparc_arch_type. + (CPP_SPEC): Handle -msupersparc. + (MASK_SUPERSPARC, TARGET_SUPERSPARC): New macros. + (TARGET_SWITCHES): Add -msupersparc and -mcypress. + (ADJUST_COST): New macro. + * sparc.md (cpu attribute): Rename to arch attribute. Add a new + cpu attribute. Fix all users. + (type attribute): Add ialu, shift, imul, fpdivs, and fpdivd. + Delete fpdiv. + (function units): Add Cypress and Supersparc versions of each. + (addsi3, subsi3, andsi3, iorsi3, xorsi3): Add ialu type attribute. + (mulsi3): Add imul type attribute. + (divtf3, divdf3): Use fpdivd not fpdiv type attribute. + (divsf3); Use fpdivs not fpdiv type attribute. + (ashlsi3, ashrsi3, lshrsi3): Add shift type attribute. + + * i960.md (andsi3+6): Replace bad clrbit pattern with two working + ones. + + Tue Jun 28 13:31:31 1994 Uwe Seimet (seimet@iris1.chemie.uni-kl.de) + + * configure (m68k-atari-sysv4*): New configuration. + * m68k/atari.h, m68k/xm-atari.h: New files. + + Tue Jun 28 12:41:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.md (define_split for (plus (reg) (large_constant))): Treat + large_constant as signed. + + Tue Jun 28 05:46:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (eliminate_regs_in_insn): When checking for moves + and adds, use single_set. + + * reload1.c (reloads_conflict): Handle R1_TYPE of RELOAD_OTHER. + + * expr.c (do_jump, case BIT_AND_EXPR): Only narrow to a type + that corresponds to a mode. + + Tue Jun 28 05:41:29 1994 Will R. Athanasiou (will@westford.ccur.com) + + * rs6000.h (MEMORY_MOVE_COST): Make processor-dependent. + * rs6000.md (movsf): Emit frsp if storing to memory and not PowerPC. + (movsf matcher): Remove explicit frsp. + (store sf with update): Likewise. + * rs6000.c: Include ctype.h. + + Tue Jun 28 05:40:44 1994 Mike Collison (collison@chianti.sw.stratus.com) + + * real.c: Treat HFmode like SFmode, for now. + + Mon Jun 27 19:16:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * optabs.c (expand_binop, multi-words shifts and rotates): + Fix errors in last change. + + Mon Jun 27 11:29:18 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.c: Include "expr.h". + (arm_fpu): New variable. + (arm_gen_movstrqi): Fix typo. + * arm.h: (enum floating_point_type): New enumeration type. + (arm_fpu): New declaration. + * arm.md: (function_unit fpa): Add more accurate scheduling + information. + (all floating point patterns): Add more detailed instruction type + information to attributes. + * riscix.h: (STARTFILE_SPEC,SIZE_TYPE,PTRDIFF_TYPE): Fix typos. + (ASM_FINAL_SPEC): Only reject -mbsd and -mxopen when -pedantic. + + Sun Jun 26 05:37:26 1994 Pat Rankin (rankin@eql.caltech.edu) + + * toplev.c (v_message_with_decl): Avoid fwrite for stderr; mixing + it with fprintf and fputs can cause strange results under VMS. + + Sat Jun 25 06:07:56 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * combine.c (distribute_notes, case REG_DEAD): If a call uses a + hard reg, then this is where it dies. + + Fri Jun 24 19:09:33 1994 Chip Salzenberg (chip@fin.uucp) + + * cccp.c (create_definition): Eliminate whitespace before and + after macro definitions. + + Fri Jun 24 16:19:27 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * c-decl.c (lang_decode_option): Set warn_bad_function_cast + for -Wbad-function-cast. + * c-typeck.c (build_c_cast): Issue a warning for non-matching cast + from a function call (like malloc without proto). + * c-tree.h: Declare warn_bad_function_cast. + * toplev.c (lang_options): Add -W[no]-bad-function-cast. + + Fri Jun 24 16:09:12 1994 Pat Rankin (rankin@eql.caltech.edu) + + * vax.h (ASM_IDENTIFY_LANGUAGE): New macro. + + Fri Jun 24 15:36:37 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * jump.c (jump_optimize): If we reverse "if (foo) bar else break;" + and there follows a NOTE_INSN_LOOP_END, move the note before "bar". + + * arm.md (movstrsi): Delete. + (movstrqi): New expand. + * arm.h (arm_gen_movstrqi): New function. + + Fri Jun 24 14:43:46 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (alpha_builtin_saveregs): Fix typo in computing value + for __base. + + * vax.md (zero_extract patterns): Don't allow constants in + the first operand of ZERO_EXTRACT since the recognizer + function forces them to match the mode of the match_operand. + + * c-typeck.c (decl_constant_value): Test for const and + not iterator. + (default_conversion, digest_init): Remove redundant checks + before calling decl_constant_value. + (convert_for_assignment): See if RHS has a constant value. + + * m68k.md (ashrsi3, lshrsh3): Remove patterns using bfext[su]. + + * reg-stack.c (goto_block_pat): Ignore undefined label. + + Thu Jun 23 22:07:42 1994 Doug Evans (dje@cygnus.com) + + * sparc/sp64-elf.h (LINK_SPEC): Fix typo. + (PTRDIFF_TYPE): Likewise. + + Thu Jun 23 19:15:36 1994 Jason Merrill (jason@deneb.cygnus.com) + + * tree.h (TREE_SYMBOL_REFERENCED): New macro. + * varasm.c (assemble_name): Set TREE_SYMBOL_REFERENCED on the + identifier for `name'. + * toplev.c (compile_file): Use TREE_SYMBOL_REFERENCED instead of + TREE_USED and TREE_ADDRESSABLE where appropriate. + + Thu Jun 23 19:06:05 1994 Randy Wright (rwright@dhostwo.convex.com) + + * cse.c (simplify_unary_operation, case UNSIGNED_FLOAT): Add + missing cast to unsigned. + + Thu Jun 23 19:00:18 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (fix_truncdfsi2, movsf, movdi): Use assign_stack_temp. + (mulsidi3): Add earlyclobber constraint modifier to PowerPC + version and !TARGET_POWERPC64 to final condition. + + * rs6000.h (CPP_PREDEFINES): Define _POWER (alias for _IBMR2). + (CPP_SPEC): New macro. + * powerpc.h (ASM_SPEC): Use PowerPC mode, not 601 mode. + (CPP_SPEC): New macro. + (TARGET_DEFAULT): Generate pure PowerPC code, not 601-specific. + + Thu Jun 23 18:09:23 1994 Pat Rankin (rankin@eql.caltech.edu) + + * vax.h (CPP_PREDEFINES): Add `__vax__'. + * vax/vms.h (CPP_PREDEFINES): Add `__vax__', `__vms__', and `__VMS__'; + update __GNUC_MINOR__ to 6. + + Thu Jun 23 17:59:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * toplev.c (compile_file): Don't try to write function if we + didn't save insns for it. + + * reload.c (find_reloads): Don't rejecting non-const due to value + of PREFERRED_RELOAD_CLASS if no regs were valid for alternative. + + Thu Jun 23 17:45:55 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.c (output_move_double): If the dest is register pair and both + regs are used in src address, use ADDR to compute src address, not + ADDD, which throws away scaled index. + + Thu Jun 23 17:40:06 1994 Craig Burley (burley@gnu.ai.mit.edu) + + * c-decl.c (clear_binding_level): Add missing fields in initializer. + (c_decode_option): Correct misspelling of -fno-dollars-in-identifiers. + + Thu Jun 23 13:47:23 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Fix return type of sbrk in on Alpha + OSF/1 V2.0. Also, redirect grep errors to /dev/null in + fix. + + Thu Jun 23 12:08:23 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.c: Include tree.h. + (const_ok_for_arm): Add fast return for 0 or just one non-zero bit. + (const_ok_for_op, arm_split_constant): New functions. + (arm_rtx_costs, reg_or_int_operand): New functions. + (shift_operator): Accept ROTATERT. + (multi_register_push): New function. + (shift_op): Don't abort if a constant is outside the acceptable range, + but convert the whole shift expression into something legal. If the + shift is zero, then return NULL. + (output_return_instruction): Output a call to abort if the function is + volatile. + (arm_volatile_func): New function. + (get_prologue_size): Remove all adjustments for insns that are now + output as rtx. + (output_func_prologue): Remove all code that outputs instructions, + just print a few comments. + (output_func_epilogue): Output a call to abort if a volatile function + tries to return. + (emit_multi_reg_push): New function. + (arm_expand_prologue): New function. Don't bother to push call-saved + regs if we will never return. + (arm_print_operand, case 'S'): If shift_op returns NULL, then no shift + is required. + * arm.h (TARGET_WHEN_DEBUGGING): Delete. + (MODES_TIEABLE_P): All modes of the same class are tieable. + (CONST_OK_FOR_LETTER_P): Add 'M' for constants valid in a shift. + (FUNCTION_PROFILER): Don't call arm_increase_location. + (INITIAL_ELIMINATION_OFFSET): Call saved regs are no-longer pushed for + functions that don't return. + (LEGITIMIZE_ADDRESS): Push constants that will never be legitimate -- + symbols and labels -- into registers. Handle DImode better. + (DEFAULT_SIGNED_CHAR): Use unsigned unless already defined. + (RTX_COSTS): Call arm_rtx_costs. + (ADDRESS_COST): Since most operations have the same rtx cost, make the + more complex addresses cheaper. + (PREDICATE_CODES): Add ROTATERT to shift_operator; and new predicates + for reg_or_int_operand and multi_register_push. + (DBX_CONTIN_LENGTH): Only define if not already done. + (PRINT_OPERAND_ADDRESS): Let arm_print operand output the ", " for + shifts. + * arm.md (addsi3, subsi3, andsi3, iorsi3, ashlsi3, ashrsi3, lshrsi3, + rotrsi3): Rewrite as expand patterns. + (rotlsi3): New expand. + (matchers, and split patterns for above): New. + (all patterns with shifts): Let arm_print_operand output the ", " + before a shift if it is needed. + (zero_extendqihi2): Delete. + (zero_extendqisi2): Expand to (and ...) if not memory. + (movsi): Call arm_split_constant to generate a constant. + (movqi): Only force a MEM into a register if not reloading. + (movsf, movdf): If loading a non-immediate floating point value, or + loading and floating point immediate into integer regs, push the + constant straight into the pool. + (movdf): Get rid of the scratch register. + (reload_outdf): Rewrite to expand to the two required insns. + (matcher for movdf): Remove alternative that used scratch register for + storing. + (movxf): rewrite as expand. + (matcher for movxf): Recognize even when XFmode code is disabled, so + that prologue insns can be generated. + (Matcher for reversed conditional jump): Don't match if the mode of the + CC register is not reversible. + (prologue): New expand. + (matcher for multi_register_push insn): New. + * riscix.h: Delete some dead code. + (STARTFILE_SPEC): Look in the correct places for start files. + (LIB_SPEC): Define. + (LINK_SPEC): Define. + (TARGET_WHEN_DEBUGGING): Delete. + (DEFAULT_SIGNED_CHAR): Set to unsigned. + (SIZE_TYPE, PTRDIFF_TYPE, TARGET_EDOM): Define. + * rix-gas.h (DBX_CONTIN_LENGTH): Set to 80. + (DEFAULT_GDB_EXTENSIONS, DBX_NO_XREFS): Don't try to pander to dbx, it + is just to broken to use. + + Wed Jun 22 20:13:03 1994 Will Athanasiou (will@westford.ccur.com) + + * configure (m68k-ccur-rtu): New configuration. + * config.sub (m68k-ccur): New system. + * protoize.c: Include , not on Concurrent. + * ccur-GAS.h, x-ccur: New files. + + Wed Jun 22 18:49:17 1994 Walter Misar (misar@rbg.informatik.th-darmstadt.de) + + * m68k/hp320.h (LINK_SPEC): New macro. + + Wed Jun 22 18:43:51 1994 Ian Lance Taylor (ian@cygnus.com) + + * configure: For target alpha-*-*, if using gas, set + target_cpu_default to 4. + * config/alpha/alpha.h (TARGET_SWITCHES): Include + TARGET_CPU_DEFAULT in default value. + (TARGET_CPU_DEFAULT): Define as 0 if not already defined. + (ASM_FINAL_SPEC): Include TARGET_CPU_DEFAULT in test for which + version to define. + + Wed Jun 22 18:15:41 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * loop.c (strength_reduce): When replacing DEST_ADDR givs, make + sure resulting insn is valid. + + * optabs.c (expand_binop): New variable next_methods; pass to + most recursive calls when trying to avoid libcalls. + Always check for a return value of zero in recursive calls. + (expand_float): Ensure TARGET has proper mode. + Pass OPTAB_LIB_WIDEN to expand_binop calls. + + Tue Jun 21 14:35:38 1994 Doug Evans (dje@cygnus.com) + + * cccp.c (skip_to_end_of_comment): Catch unterminated comments. + + Sat Jun 18 17:49:41 1994 Jason Merrill (jason@deneb.cygnus.com) + + * fixproto: Move hacking of assert.h from here. + * fixincludes: To here. + + Sat Jun 18 16:42:31 1994 Jim Wilson (wilson@cygnus.com) + + * c-typeck.c (process_init_element): For fieldtype, don't access + TYPE_MAIN_VARIANT field if the type is error_mark_node. + + * jump.c (duplicate_loop_exit_test): Initialize copy to zero. + Emit jump to end lable if copy is still zero. + + * mips.md (truncdisi2): Change from define_insn to define_expand. + (truncdihi2, truncdiqi2, extendsidi2): Likewise. + (extendsidi2_internal): New pattern. + + * loop.c (move_movables): Copy CALL_INSN_FUNCTION_USAGE field. + + * sdbout.c (sdbout_one_type): Use DECL_ASSEMBLER_NAME if + DECL_LANG_SPECIFIC is set. Use DECL_ASSEMBLER_NAME not + DECL_NAME for child_type that is a template type. + (sdbout_symbol): Use DECL_ASSEMBLER_NAME if DECL_LANG_SPECIFIC + is set. + + Sat Jun 18 16:39:03 1994 Kung Hsu (kung@mexican.cygnus.com) + + * dbxout.c (dbxout_symbol): Replace DECL_IGNORED_P with + TYPE_DECL_SUPPRESS_DEBUG. + + Sat Jun 18 10:21:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (expand_shift): Don't try extzv for lshr. + + * vax.md (lshrsi3): New define_expand. + + * optabs.c: Pass NULL_RTX for TARGET in calls to expand_{un,bin}op. + (expand_float): Use expand_shift instead of expand_binop. + + Fri Jun 17 15:05:58 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Correct math.h on Lynx handling again. + + Fri Jun 17 10:52:41 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * cse.c (simplify_binary_operation, case MINUS): Check mode of op0, + instead of op1, before calling plus_constant. + + Fri Jun 17 01:42:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (DEBUGGER_AUTO_OFFSET): Define. If no frame pointer + is available, then adjust the offset by the size of the current + frame. + + Thu Jun 16 16:35:12 1994 Jason Merrill (jason@deneb.cygnus.com) + + * tree.h (DECL_DEFER_OUTPUT): New macro. + * toplev.c (compile_file): Unset DECL_DEFER_OUTPUT on decls + considered at end of file. + * integrate.c (output_inline_function): Unset DECL_DEFER_OUTPUT on + fndecl. + * toplev.c (rest_of_compilation): Also postpone compilation of + inlines with DECL_DEFER_OUTPUT set. + (compile_file): Always emit postponed inlines if + -fkeep-inline-functions. + + Thu Jun 16 11:00:14 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Fix argument type for ffs in on Alpha + OSF/1 V2.0. + + Thu Jun 16 06:49:03 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (reload_reg_free_p, case RELOAD_OTHER): Allowed + to conflict with RELOAD_FOR_OTHER_ADDRESS. + + * cse.c (set_nonvarying_address_components): Rework and also + handle an AND used for non-aligned accesses. + + Thu Jun 16 06:36:49 1994 Chip Salzenberg (chip@fin.uucp) + + * i386.h (REG_ALLOC_ORDER): Prefer registers listed in + CALL_USED_REGISTERS. + + Wed Jun 15 20:45:14 1994 Jason Merrill (jason@deneb.cygnus.com) + + * tree.h (TREE_NO_UNUSED_WARNING): Note that this can be applied + to COMPOUND_EXPRs, too. + + * stmt.c (warn_if_unused_value): Handle TREE_NO_UNUSED_WARNING for + COMPOUND_EXPRs, too. + + Wed Jun 15 20:35:21 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (divsi3): Fix divide by 2^N with compare RTL. + + * rs6000.md (maxsf3, minsf3, maxdf3, mindf3): Fix predicate of + define_split. + (muldi3): Fix predicate. + (movdf matcher): Allow update and indexed for lfd instruction. + + Wed Jun 15 19:24:23 1994 Doug Evans (dje@cygnus.com) + + * dbxout.c (dbxout_type): Fix call to bzero. + + Wed Jun 15 19:20:34 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (simplify_unary_operation): Fix typo in last change. + + Wed Jun 15 15:20:54 1994 Per Bothner (bothner@cygnus.com) + + * dbxout.c (dbxout_range_type): Handle the case that an array + range is neither an integer nor a sub-range. (In Pascal or + Chill it could be a Boolean, character, or enumeral type.) + + Wed Jun 15 04:00:42 1994 Ian Lance Taylor (ian@cygnus.com) + + * genmultilib: New shell script to generate multiple library + information. + * Makefile.in (multilib.h, stmp-multilib, install-multilib): New + targets. + (gcc.o): Depend on multilib.h. + (clean): Remove multilib.h and tmpmultilib*. + * gcc.c: Include multilib.h. + (print_multi_lib, print_multi_directory, multilib_select, + multilib_dir): New static variables. + (option_map): Added --print-multi-lib and --print-multi-directory. + (set_spec): Get multilib_select from specs file. + (process_command): Dump multilib_select into specs file. Handle + -print-multi-lib and -print-multi-directory. + (do_spec_1): Try multilib_dir for %D case. + (find_file): Try multilib_dir. + (main): Call set_multilib_dir. Handle print_multi_lib and + print_multi_directory. + (used_arg, set_multilib_dir, print_multilib_info): New functions. + * configure (sparc-*-sunos4*): Use target fragment sparc/t-sunos4. + * sparc/t-sunos4: New file. + + Wed Jun 15 03:54:32 1994 Doug Evans (dje@cygnus.com) + + Add support for the SPARC V9 cpu. + * configure (sparc64-*-aout): New target. + (sparc64-*-elf): New target. + * config.sub (sparc64): New cpu. + (aout, elf): New os's. + * genconfig.c (main): Allow targets to override HAVE_conditional_move. + * jump.c (jump_optimize): Use it at run-time. + * sparc/t-sp64: New file. + * sparc/sp64-aout.h: New file. + * sparc/sp64-elf.h: New file. + * sparc/sysv4.h (ASM_OUTPUT_CASE_LABEL): Handle 64 bit pointers. + * sparc/sparc.h (cpu_type): New enum. + (CPP_PREDEFINES,CPP_SPEC): Add v9 support. + (NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE, + SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, + FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE, + MAX_LONG_TYPE_SIZE): Define. + (PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD, + UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE, + POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN, + EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER, + FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE): + Add v9 support. + (sparc_override_options, sparc_code_model): Declare. + (OVERRIDE_OPTIONS): Call it. + (MASK_*): Define bits set by target flags. + (TARGET_*): Use them. + ({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS, + MEDLOW,MEDANY,FULLANY}): Define. + (MEDANY_BASE_REG): Define. + (V9_SWITCHES, TARGET_OPTIONS): Define. + (TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*. + (SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define. + (SECONDARY_MEMORY_NEEDED): Simplify. + (hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare. + (REG_PARM_STACK_SPACE): Do not define if v9. + (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P, + RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class, + REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER, + REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER, + CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET, + BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG, + BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support. + (sparc_arg_class): New enum (v9 only). + (sparc_args): New struct to record v9 arguments. + (CUMULATIVE_ARGS): Use it (v9 only). + (GET_SPARC_ARG_CLASS): Define. + (sparc_arg_count, sparc_n_named_args): Declare. + (PASS_IN_REG_P): Define. + (ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE, + FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS, + FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES): + Add v9 support. + (sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare. + (INIT_EXPANDERS): Define (v9 only). + (gen_v9_scc, output_v9branch): Declare. + (HAVE_conditional_move): Define. + (FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, + DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P, + REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT, + CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES, + SELECT_CC_MODE, REGISTER_NAMES): Add v9 support. + (REGNO_OK_FOR_CCFP_P): Define. + (sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare. + (INITIALIZE_TRAMPOLINE): Call them. + (ENCODE_SECTION_INFO): Mark functions in v9. + (RTX_COSTS): Assume MULT costs the same for v9 as v8. + (ASM_LONGLONG, ASM_FLOAT): Define. + (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support. + * sparc/sparc.c (SKIP_CALLERS_UNIMP_P): Define. + (sparc_cpu_type, sparc_arg_count, sparc_n_named_args, + frame_base_offset, fpconv_stack_temp): New globals. + (leaf_reg_remap): Add additional registers for v9. + (sparc_override_options, sparc64_init_expanders, + sparc64_fpconv_stack_temp, intreg_operand, ccfp_reg_operand, + data_segment_operand, text_segment_operand, v9_regcmp_op, + arith11_operand, arith10_operand, arith11_double_operand, + arith10_double_operand, gen_v9_scc, emit_v9_brxx_insn, + sparc_init_modes, build_big_number, output_v9branch, + sparc_initialize_trampoline, sparc64_initialize_trampoline): + New functions. + (arith_double_operand, gen_compare_reg, finalize_pic, + emit_move_sequence, mem_aligned_8, output_move_double, + output_move_quad, output_fp_move_double, output_fp_move_quad, + output_block_move, save_regs, restore_regs): Add v9 support. + (sparc_mode_class): New enum. + (*_MODES): Redefine to use it. + (hard_32bit_mode_classes): Renamed from hard_regno_mode_ok. + (hard_regno_mode_classes, hard_64bit_mode_classes, + sparc_mode_class): New globals. + (num_gfregs): Renamed from num_fregs. + (compute_frame_size): Add v9 support. Simplify calculations. + (output_function_prologue): Call build_big_number to compute stack + size in %g1, then adjust %sp. + Fix saving of call saved registers. Handle new v9 registers. + (output_function_epilogue): Fix restoration of call saved registers. + Handle new v9 registers. + Use SKIP_CALLERS_UNIMP_P to see if unimp insn is at return address. + (sparc_builtin_saveregs): Define v9 version. + (output_cbranch): New argument fp_cond_reg. All callers changed. + Add v9 support. + (output_return): Use SKIP_CALLERS_UNIMP_P. + (print_operand): New codes '_', '@', 'C', 'D'. + (output_double_int): Handle LABEL_REF and MINUS for v9. + Use ASM_LONGLONG if assembler can handle it. + * sparc/sparc.md (cpu): New attribute. + (type attribute): New value cmove (conditional moves). + (cmpdi): New pattern for v9. + (seq*, sne*): Add v9 support. + (sgt,slt,sge,sle): Explicitly restrict operand 0 to the integer + registers. Try emitting a conditional move for v9. + (sgtu,sltu,sgeu,sleu): Likewise. + (comparison insns): Add v9 versions. + (scc insns): Add DImode versions for v9. + (beq, bne, bgt, blt, bge, ble): If comparing DImode with 0 on v9, + use brxx insns. Use emit_jump_insn, not emit_insn, as the latter + mishandles brxx insns. + (branch insns): Update calls to output_cbranch. + Add v9 versions to support multiple floating point condition code regs. + Add v9 versions to support brxx insns. + (lo_sum, high, pic): Add v9 support. + (symbolic move patterns): Disable for v9. + (DImode, DFmode, TFmode moves): Add v9 support. + (conditional move insns): Define for v9. + (zero_extendqidi2, extendqidi2, zero_extendhidi2, extendhidi2, + zero_extendsidi2, extendsidi2, floatdisf2, floatdidf2, floatditf2, + fix_truncsfdi2, fix_truncdfdi2, fix_trunctfdi2, muldi3, divdi3, + udivdi3, ashldi3, ashrdi3, lshrdi3, ffsdi2): New patterns for v9. + (bitfield compare insn): Add DImode version for v9. + (adddi3, subdi3, negdi2, anddi3, iordi3, xordi3, one_cmpldi2, + mixed mode fp mult insns, negdf2, negtf2, absdf2, abstf2, tablejump, + call, call_value, untyped_call, untyped_return, indirect_jump, + flush_register_windows, flush): Add v9 support. + (ldd peep holes): Disable for v9. + (set/compare peep hole): Define DImode version for v9. + (sign extend/compare peep hole): Likewise. + (return peep holes): Add v9 support. + (call/jump peep holes): Add v9 support. + * ginclude/va-sparc.h: Add v9 support. + + Tue Jun 14 22:44:52 1994 Michael Meissner (meissner@osf.org) + + * config/i386/i386.h (reg_class): Add AD_REGS that match %eax and + %edx to allow %eax:%edx to be specified as one DI register. + (REG_CLASS_NAMES): Ditto. + (REG_CLASS_CONTENTS): Ditto. + (REG_CLASS_FROM_LETTER): 'A' specifies AD_REGS. + + * config/i386/i386.md (umulqihi3): Name the insn with the standard + name. + (mulqihi3, umulsidi3, mulsidi3): Add new widening multiply + patterns. + + Tue Jun 14 22:25:16 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * fold-const.c (encode, decode): Use 4 HOST_WIDE_INTs for encoded + value with HOST_BITS_PER_WIDE_INT/2 bits in each. + (LOWPART, HIGHPART): New macros. + (BASE): Move definition outside of div_and_round_double. + (add_double, mul_double, lshift_double, rshift_double): Rewrite. + (lrotate_double): Use LOWPART, HIGHPART, and BASE. + (rrotate_double): Likewise. + (div_and_round_double): Major changes to code for general case. + Now it actually produces non-garbage results for large operands. + (div_and_round_double): Simplify condition for special code used when + divisor < BASE. + (const_binop): Delete special cases for multiplying by 0, 1, 2, 4, 8. + (fold, case *_DIV_EXPR): Don't try to optimize for overflow. + * machmode.h (MAX_SHORTS): Deleted. + + * m68k.md: Trivial simplification of many patterns. + (subsi3): Don't handle CONST_INT for operand 2. + (ashiftrt, op2 > 8): New pattern. + (lshiftrt, op2 > 8): New pattern. + + * a29k.md (logical patterns): Tune to give better code for immediate + values. + * a29k.c (cmplsrcb_operand): New predicate. + * a29k.h (PREDICATE_CODES): Add cmplsrcb_operand. + + Tue Jun 14 17:52:10 1994 Tor Egge (tegge@flipper.pvv.unit.no) + + * m88k/sysv3.h (DO_GLOBAL_CTORS_BODY): Call __builtin_alloca + with a non-zero argument, forcing a frame pointer to be needed. + + Tue Jun 14 17:37:41 1994 Mike Collison (collison@sw.stratus.com) + + * reload.h (RELOAD_FOR_OPADDR_ADDR): New reload class. + * reload.c (find_reloads): Change secondary reloads of class + RELOAD_FOR_OPERAND_ADDRESS to RELOAD_FOR_OPADDR_ADDR. + * reload1.c (reload): Process and accumulate needs for + RELOAD_FOR_OPADDR_ADDR reloads. + When determining if needs are nongroup needs, ignore + inactive or optional reloads. + (reload_reg_used_in_op_addr_reload): New variable to indicate + when reloads of class RELOAD_FOR_OPADDR_ADDR are in use. + (mark_reload_reg_in_use, clear_reload_reg_in_use): + Process reloads of class RELOAD_FOR_OPADDR_ADDR. + (reload_reg_free_p, reload_reg_free_before_p, reloads_conflict): + Likewise. + (choose_reload_regs): Support RELOAD_FOR_OPADDR_ADDR reloads. + (emit_reload_insns): Output RELOAD_FOR_OPADDR_ADDR reloads. + + Tue Jun 14 17:29:53 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cccp.c, toplev.c, tree.c, print-tree.c, fold-const.c: + Cast pointer operands to bzero, bcopy, and bcmp to (char *). + * function.c, stmt.c, expmed.c, varasm.c, emit-rtl.c: Likewise. + * dbxout.c, integrate.c, jump.c, real.h, calls.c, cse.c: Likewise. + * loop.c, unroll.c, flow.c, stupid.c, combine.c, regclass.c: Likewise. + * local-alloc.c, global.c, reload.c, reload1.c, sched.c: Likewise. + * genattrtab.c, bc-emit.c, gcc.c, collect2.c: Likewise. + + * c-decl.c (min_precision): New function. + (finish_enum): Rewrite code to determine precision required + for enumeral type. + + * cse.c (simplify_unary_operation): Correctly and consistently + handle CONST_INT cases for FLOAT and UNSIGNED_FLOAT. + + * xm-alpha.h (sbrk): Don't declare here. + + * alpha.h (CONST_COSTS, case CONST_INT): Fix typo. + + * tree.c (staticp, case FUNCTION_DECL): A nested function isn't static. + + * i386/linux.h (STARTFILE_SPEC): Don't force -static for -g. + + * gcc.c (find_a_file): Try EXECUTABLE_SUFFIX first, then file + without the suffix. + + * jump.c (jump_optimize): Don't delete dead insn if it has a + REG_RETVAL note. + + * fix-header.c (xstrdup): Renamed from strdup. + (check_protection): Call xstrdup, not strdup. + + Tue Jun 14 17:26:08 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.h (TARGET_SWITCHES): Remove -mpowerpc64 and -mno-powerpc64. + * rs6000.c (rs6000_override_options): Remove MPC620 cpu variants. + + * rs6000.c (output_prolog): Fix error in loading size of large + stack frames. + + Tue Jun 14 17:24:09 1994 Chip Salzenberg (chip@fin.uucp) + + * reload1.c (reload_as_needed): Clear spill_reg_store at start. + (emit_reload_insns): Omit erroneous predicate of reload + deletion -- reload_spill_index is not indexed by regno. + + Tue Jun 14 15:59:55 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Wrap assert.h in extern "C" { } to avoid problem on + HP/UX, which uses NO_IMPLICIT_EXTERN_C. Also fix 12 May 94 + change. + + Tue Jun 14 15:12:50 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * jump.c (condjump_in_parallel_p): New function to detect + conditional jumps within PARALLEL insns. + (jump_optimize): Allow for some simple optimizations involving + conditional jumps within PARALLEL insns. + * reorg.c (get_jump_flags): Handle conditional jumps in PARALLEL + insns. + (get_branch_condition, fill_simple_delay_slots): Likewise. + (fill_eager_delay_slots, relax_delay_slots, dbr_schedule): Likewise. + + * pa-osf.h (SIZE_TYPE): Define as "long unsigned int" to be + compatable with system include files. + * pa1-osf.h (SIZE_TYPE): Likewise. + + * pa1-osf.h (WCHAR_TYPE): Define as "short unsigned int". + (WCHAR_TYPE_SIZE): Define as 16 bits. + + * pa.c (output_arg_descriptor): Restore old behavior for SImode + USE insns of FP registers (used by untyped call support). + + Mon Jun 6 09:15:43 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.c (arm_reload_out_hi): Rewrite. Add support for processors + running in big-endian mode. + (fp_immediate_constant): Fix typo in argument declaration. + * arm.h (PROMOTE_MODE): Promote HImode integers as signed. + (BYTES_BIG_ENDIAN): Allow OS description to override default. + (LOAD_EXTEND_OP): When big-endian, HImode loads are sign extended. + * arm.md (storehi_bigend): New expansion pattern. + (storeinthi): Rework to generate better code, add big-endian support. + (movhi): Add support for processors running in big-endian mode. + (movhi_bigend): New expansion pattern. + (matcher for movhi): Remove incorrect alternative for storing HImode to + memory. Only match when little endian. + (matcher for big-endian movhi): New pattern. + (matchers/peepholes for extended pre/post increment HImode loads): Only + match when little-endian. + (matcher for operating on adjacent memory locations): Load operation + into arith operands. + (peepholes for extended pre-increment byte loads): New patterns. + + Sat Jun 4 21:06:29 1994 Kaveh R. Ghazi (ghazi@noc.rutgers.edu) + + * sys-types.h (__gnuc_va_list): Use instead of va_list. + * sys-protos.h (*): Use __gnuc_va_list, not va_list. + + Sat Jun 4 07:19:39 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.c (print_multi_reg, output_call, output_call_mem, + output_mov_long_double_fpu_from_arm, + output_mov_long_double_arm_from_fpu, + output_mov_double_fpu_from_arm, output_mov_double_arm_from_fpu, + output_return_instruction, output_func_{prologue,epilogue}, + arm_print_operand, output_load_symbol): Print the register prefix + before each register name. + (output_func_prologue, output_lcomm_directive): Output the target + dependent comment char for asm comments. + * arm.h (FUNCTION_PROFILER): Delete duplicate definition. + (FUNCTION_PROFILER, TRAMPOLINE_TEMPLATE, ASM_FILE_START, + ASM_OUTPUT_REG_{PUSH,POP}, PRINT_OPERAND_ADDRESS): Output register + prefix before any explicit register name. + (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, + ASM_OUTPUT_COMMON): Output the target dependent comment char. + (ASM_FILE_START): Output register alias for r10. + (REGISTER_NAMES): Output "r9" now for r9, not "rfp". + (ADDITIONAL_REGISTER_NAMES): New macro. + * arm.md (all patterns explicitly mentioning register names): Output + the target dependent prefix before the register name. + (all patterns with asm comments): Output the target dependent comment + character. + + Fri Jun 3 18:14:07 1994 Doug Evans (dje@cygnus.com) + + * c-common.c (decl_attributes): Fix section attributes. + * varasm.c (make_decl_rtl): If section attribute is being ignored, + really ignore it. + + Fri Jun 3 15:53:57 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * pa.h (FP_REGNO_P): New macro for intra file usage. + (REGNO_OK_FOR_FP_P): Use FP_REGNO_P. + (FUNCTION_VALUE_REGNO_P): Revert last change. + * pa.md (mulsi3): Use MATCH_DUP for op3, not MATCH_OPERAND. + + * pa.h (CONDITIONAL_REGISTER_USAGE): Partially revert last changes; + Make non-existing 1.0 fp regs fixed, including odd-numbered regs. + (enum reg_class): Get rid of SNAKE_FP_REGS, GENERAL_OR_SNAKE_FP_REGS, + and NON_SHIFT_REGS. + (REG_CLASS_NAMES): Likewise. + (REG_CLASS_CONTENTS): Likewise. + (REGNO_REG_CLASS): Likewise. + (HARD_REGNO_MODE_OK): Corresponding changes. Don't force 1.0 fpregs + to even regno here; fixed_regs does the job better. + (FP_REG_CLASS_P): Get rid of SNAKE_FP_REGS. + (REG_CLASS_FROM_LETTER, case 'z'): Deleted. + (HARD_REGNO_NREGS): Partially revert last change. + (CLASS_MAX_NREGS): Partially revert last change. + * pa.md (globally): Delete 'x' constraint or change it to 'f', + as apropriate. + + Fri Jun 3 09:18:55 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.h (CONST_OK_FOR_LETTER_P): Only allow constants that are valid + when inverted for 'K'. Only allow constants that are valid when + negated for 'L'. + * arm.md (all patterns): Update instruction generation to reflect new + meanings of constraints 'K' and 'L'. Use output type 'B' to + generate an inverted constant. Use output type 'N' to generate a + negated floating point constant. + + Thu Jun 2 22:43:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (TARGET_SWITCHES): Enable TARGET_LONG_CALLS when + TARGET_PORTABLE_RUNTIME is enabled. + * pa.c (output_call): If TARGET_LONG_CALLS is enabled, then emit + an inline long-call sequence. + * pa.md (millicode define_delay): Disable delay slots if + TARGET_LONG_CALLS. + (call_internal_reg, call_value_internal_reg): If TARGET_LONG_CALLS + is enabled, then emit an inline long-call sequence. Fix length + computation for TARGET_LONG_CALLS. + (millicode calls): Fix length computation for TARGET_LONG_CALLS. + + * pa.h (ASM_DECLARE_FUNCTION_NAME): Fix typo. + + Thu Jun 2 18:28:07 1994 Jason Merrill (jason@deneb.cygnus.com) + + * stmt.c (expand_end_bindings): Don't bother emitting cleanups + after a barrier. + + Thu Jun 2 18:10:36 1994 Stephen L Moshier (moshier@world.std.com) + + * libgcc2.c (__floatdisf): Protect against double-rounding error. + + Thu Jun 2 17:47:54 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.h (MASK_PPCFPX): Delete. + (MASK_PPC_GPOPT, MASK_PPC_GFXOPT, TARGET_PPC_GPOPT, TARGET_PPC_GFXOPT): + New Macros. + (TARGET_SWITCHES): Remove -mpowerpc-fpx; add -mpowerpc-gpopt + and -mpowerpc-gfxopt. + * rs6000.c (processor_target_table): Use new macros. + * rs6000.md (define_function_unit): Remove ppc604 from sqrt list. + (divsi3, udivsi3): Remove spaces from PowerPC output templates. + (sqrtsf2, maxsf3, minsf3, sqrtdf2, maxdf3, mindf3): Use new macros. + (floatdidf2, fix_truncdfdi2, ffsdi2, muldi3): New patterns. + ({s,u}muldi3_highpart, divdi3, udivdi3, rotldi3): Likewise. + (movdi): Handle moves between FPRs and GPRs. + (scc insn): Correct swapped compare and delayed_compare attributes. + + Thu Jun 2 14:45:04 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.c (arm_condition_code): Move to start of file. + (const_pool_offset): Correct typo. + (fp_const_from_val): New function. + (all instruction generators): mark position where conditionalization + should be with '%?'. + (output_move_double): Use new '%m' output type to simplify load/store + multiple generation. + (shift_instr): Delete. + (shift_op): New function. + (output_arithmetic): Delete. + (output_arithmetic_with_shift): Delete. + (output_arithmetic_with_immediate_multiply): Delete. + (output_shifted_move): Delete. + (output_shift_compare): Delete. + (arm_print_operand): New function. + * arm.h (output_func_{prologue,epilogue}): Change declarations from + output_{prologue,epilogue}. + (arm_output_llc, arithmetic_instr, + output_arithmetic_with_immediate_mulitply, + output_arithmetic_with_shift, shift_instr): Delete function + definitions. + (ASM_OUTPUT_OPCODE): Delete. + (PRINT_OPERAND): Call arm_print_operand, instead of doing it directly. + (ARM_COMMENT_CHAR): New macro. + (ARM_REG_PREFIX): New macro. + (ARM_SIGN_EXTEND): New macro. + (PRINT_OPERAND_ADDRESS): Delete variable 'shift'. Change type of + variable 'offset' to HOST_WIDE_INT. Use arm_print_operand to handle + shifts in addresses. + * arm.md (all output patterns): Use new capabilities of + arm_print_operand to simplify output sequences. Mark position of + condition code with '%?'. + + * riscix.h (ASM_FINAL_SPEC [CROSS_COMPILE]): Correct typo. + + Thu Jun 2 08:14:00 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-common.c (c_build_type_variant): Don't change TYPE_MAIN_VARIANT + of new type. + + * expr.c (expand_expr, case ADDR_EXPR): If result is ignored, + just return const0_rtx. + + Wed Jun 1 13:52:01 1994 Jason Merrill (jason@deneb.cygnus.com) + + * i386/sco4.h: #define NO_IMPLICIT_EXTERN_C. + + Wed Jun 1 04:55:06 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * arm.c: General tidy up. + #include . + Declare some prototypes. + (output_memory_reference_mode): Change type to enum machine_mode. + (arm_const_nmoves): Delete. + (adjacent_mem_locations, {load,store}_multiple_operation): Explicitly + declare to return int. + ({load,store}_multiple_operation): Change type of 'count', 'base' and + 'i' to HOST_WIDE_INT. + (output_add_immediate): Change type of 'n' to HOST_WIDE_INT. + (output_multi_immediate): Change type of Argument 'n' to + HOST_WIDE_INT, if wider than 32 bits, mask out the high bits. + (output_arithmetic_with_immediate_multiply): Change type of 'shift' + to HOST_WIDE_INT. + (output_func_{prologue,epilogue}): Renamed from + output_{prologue,epilogue}. Check all registers to see if they are + live, but only push/pop them if they are not in call_used_regs. + * arm.h: Delete some dead code. + (FUNCTION_{PROLOGUE,EPILOGUE}): Call output_func_{prologue,epilogue}. + (INITIAL_ELIMINATION_OFFSET): Inspect all registers, but only add + those that are not in call_used_regs. + (GO_IF_LEGITIMATE_INDEX): Change type of variable 'range' to + HOST_WIDE_INT; change type of variable 'code' to enum rtx_code. + (REVERSIBLE_CC_MODE): New macro. + + * arm.c (const_pool_offset): New function. + (get_prologue_size): New function. + (output_func_prologue): Eliminate variable code_size. + (output_func_epilogue): Only call arm_increase_location when + optimizing; also add the size of the function just compiled, and the + size of the prologue. + (arm_output_asm_insn): Delete. All callers changed to use + output_asm_insn. + (arm_output_llc): Delete. + (output_load_symbol): New first parameter 'insn'. Rewrite so that + assembler can detect whether we made a mistake. + * arm.h (arm_output_asm_insn): Delete declaration. + (EXTRA_CONSTAINT): New constraint 'R' to match a constant pool label. + Make constraint 'S' never match when not optimizing. + (CONSTANT_ADDRESS_P): Only accept symbols marked with SYMBOL_REF_FLAG + when optimizing. + (ENCODE_SECTION_INFO): Don't mark any symbols when not optimizing. + (ASM_OUTPUT_REG_{PUSH,POP}: Don't call arm_increase_location. + (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. + * arm.md (all insn and peephole patterns): Rewrite without using + arm_output_asm_insn. + (matcher for movsi): New alternative to load symbol directly into a + register. Add new parameter in call to output_load_symbol. + + * arm.md (all patterns): Length attribute now describes length in + bytes. + * arm.c (short_branch): Convert length calculations to bytes. + + Tue May 31 20:35:39 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * pa.c (emit_move_sequence): Add missing argument to symbolic_operand. + (output_block_move): Prefer addl to add. + (print_operand): Print fp regs with L suffix when appropriate. + (output_arg_descriptor): Rewrite to accomodate new convention for + USE information. + + * pa.h (SECONDARY_MEMORY_NEEDED): Simplify. + (ADDITIONAL_REGISTER_NAMES): Define. + (CONDITIONAL_REGISTER_USAGE): Make PIC_OFFSET_TABLE_REGNUM fixed + again. + + Changes to combine fp registers for 1.0 and 1.1 architectures. + (Make explicit clobbers of fp registers work.) + * pa.h (FIRST_PSEUDO_REGISTER): Now 89. + (FIXED_REGISTERS): Delete 1.0 fp registers, + (CALL_USED_REGISTERS): Likewise. + (CONDITIONAL_REGISTER_USAGE): Almost deleted. + (REG_ALLOC_ORDER): Update register numbers. + (HARD_REGNO_NREGS): Delete special case for 1.0 fp registers. + (HARD_REGNO_MODE_OK): Rewrite. Don't allow use of odd fp registers + (enum reg_class): Delete HI_SNAKE_FP_REGS and FP_OR_SNAKE_FP_REGS. + (REG_CLASS_NAMES): Corresponding change. + (REG_CLASS_CONTENTS): Delete HI_SNAKE_FP_REGS and + FP_OR_SNAKE_FP_REGS. Make SNAKE_FP_REGS class contain all fp + registers. Update all values for changed register numbering. + (REGNO_REG_CLASS): Corresponding changes. + (REG_CLASS_FROM_LETTER): Delete 'y'. + (FP_REG_CLASS_P): No longer test HI_SNAKE_FP_REGS. + (CLASS_MAX_NREGS): Delete special case for 1.1 fp registers. + (FUNCTION_VALUE): Remove TARGET_SNAKE conditionals. + (LIBCALL_VALUE): Likewise. + (FUNCTION_ARG_REGNO_P): Likewise. + (FUNCTION_VALUE_REGNO_P): Likewise. Add registers 29 and 33. + (FUNCTION_ARG): Remove TARGET_SNAKE conditionals. Update register + numbers. + (REGNO_OK_FOR_FP_P): Update register number. + (REGISTER_NAMES): Delete special entries for 1.0 fp registers. + (DBX_REGISTER_NUMBER): Likewise. + * pa.c (compute_frame_size): Update for changed register numbers. + Simplify loops over general registers to stop at register 4. + (hppa_expand_prologue): Likewise. + (hppa_expand_epilogue): Likewise. + + Tue May 31 19:32:18 1994 Jim Wilson (wilson@cygnus.com) + + * mips.md (movesi_unaligned, movsi_ulw, movsi_usw): Delete. + (extv, extzv, insv, movsi_ulw, movsi_usw): New patterns. + + * dbxout.c (dbxout_type): Always emit cross-references if + use_gnu_debug_info_extensions set. + + * final.c (output_source_line): Call xcoffout_source_line. + * xcoffout.c (xcoff_lastfile): New variable. + (ABS_OR_RELATIVE_LINENO, ASM_OUTPUT_SOURCE_LINE): Define here. + (xcoffout_source_file, xcoffout_source_line): New functions. + (xcoffout_declare_function): Use xcoffout_source_file. + * xcoffout.h (xcoff_lastfile): Declare. + (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Clean up. Set xcoff_lastfile. + (ABS_OR_RELATIVE_LINENO, ASM_OUTPUT_SOURCE_LINE): Delete here. + (DBX_OUTPUT_SOURCE_FILENAME): Delete. + + * unroll.c (copy_loop_body): Copy CALL_INSN_FUNCTION_USAGE field. + + * sparc.h (ASM_SPEC): Don't pass -k when -pg or -p given. + (OVERRIDE_OPTIONS): Warn when disabling -fpic. + + * mips-tdump.c (print_global_hdr): Remove "l" from printf format + for flags. + (print_sym_hdr): Add missing "l" to printf formats. + (print_symbol, print_file_desc): Likewise. + + * i960.h (PUT_SDB_TYPE): Adjust value for compatibility with GNU960 + toolchain. + + * sparc.h (LIB_SPEC): Don't link in /usr/lib/bb_link.o with -a. + (CONDITIONAL_REGISTER_USAGE): When -a, make %g1 and %g2 fixed. + + * mips/iris5gas.h, mips/iris5gdb.h: New files. + * configure (mips-sgi-irix5): Use iris5gas.h and iris5gdb.h. + + Tue May 31 19:21:44 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * pa.md (movsi matcher): Use ldi for moving of 0 to a reg. + (movhi matcher): Likewise. + (movqi matcher): Likewise. + (many patterns): Prefer addl to add, and shNaddl to shNadd. + (define_split for (plus (reg) (large_constant))): Cleanup. + (divsi3): Use match_dup for operand 3, not match_operand. + (udivsi3): Likewise. + (modsi3): Likewise. + (umodsi3): Likewise. + + Tue May 31 19:15:31 1994 Doug Evans (dje@cygnus.com) + + * toplev.c (v_pedwarn_with_decl): Don't even issue warnings from + pedantic errors in system header files. + + Tue May 31 17:16:41 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (extendqidi2, extendqisi2, extendqihi2): Remove + non-existent lba instruction. + (ashrdi3): Undo previous change. + + Tue May 31 12:30:00 1994 Jason Merrill (jason@deneb.cygnus.com) + + * toplev.c (lang_options): Add -f{no-,}implicit-templates. + (compile_file): Don't output SDB debugging info for + externals. + + Tue May 31 07:20:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stmt.c (expand_asm_operands): Make MEM with BLKmode for clobber + of "memory". + * loop.c (note_addr_stored): A SET or CLOBBER of a BLKmode MEM means + that all memory is clobbered. + + Mon May 30 14:01:48 1994 Doug Evans (dje@cygnus.com) + + * gcc.c (default_compilers): Pass -MG to cpp if present. + (option_map): New option --print-missing-file-dependencies/-MG. + * cccp.c (print_deps_missing_files): New global. + (main): New argument -MG. Treat missing include files as + generated files and output dependencies for them. + + Mon May 30 10:42:14 1994 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) + + * m68k/dpx2cdbx.h (PREFERRED_DEBUGGING_TYPE): Define as SDB_DEBUG. + * m68k/dpx2g.h: Disable code that manages gcc.ifile. + + Mon May 30 10:35:49 1994 Stephen L Moshier (moshier@world.std.com) + + * optabs.c (expand_float): Avoid double-rounding when float is + is narrower than int. + * real.c (significand_size): New function. + * real.h (significand_size): Declare. + + Sun May 29 15:58:21 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * jump.c (jump_optimize): When deleting unneeded stack adjusts + or mem-mem copies, use delete_computation. + + * combine.c (force_to_mode): NEXT_SELECT is true for NEG. + Only exit quickly if X is narrower than MODE and MASK has all + bits in X's mode set. + (force_to_mode, case SUBREG): Don't check for WORD_REGISTER_OPERATIONS. + (force_to_mode, case NEG): Special-case test for low-order bit. + + * rtlanal.c (volatile_insn_p): Call ourselves in recursive scan. + + Sat May 28 19:03:23 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (init, compstmt, stmt, all_iter_stmt_with_decl): + If the lookahead token is a constant and we need to pop the + momentary obstack, don't free it. + + * stmt.c (expand_end_case): Have INDEX_TYPE track conversions done + to INDEX_EXPR. + + Sat May 28 06:25:40 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * pa.md (call): Force address into register in non-symbol case. + (call_value): Likewise. + + Fri May 27 19:29:30 1994 Doug Evans (dje@cygnus.com) + + * toplev.c (compile_file): Call init_regs after `word_mode' is valid. + * regclass.c (init_reg_modes): If choose_hard_reg_mode can't find a + valid mode, fall back to word_mode. + + * expr.c (use_reg): Fix recording of USE information. + (use_regs): Likewise. + Delete argument `reg'. All callers changed. + * expr.h (use_regs): Update prototype. + * calls.c (expand_call): Update call to use_regs. Call use_reg + if parm is wholly in registers. + + * configure: If compiling in separate dir, add subdirs to .gdbinit. + + Fri May 27 18:18:23 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (zero_extendqidi2, zero_extendhidi2): Use rldicl + instruction. + * rs6000.h (RTX_COSTS): Update PPC603 and PPC604 values. + + Fri May 27 17:56:07 1994 Douglas Rupp (drupp@cs.washington.edu) + + * i386/xm-dos.h (DIR_SEPARATOR): New macro. + + Fri May 27 17:45:08 1994 Holger Teutsch (teutsch@ffm-iw.Degussa.DE) + + * clipper.h (PCC_STATIC_STRUCT_RETURN): No longer defined. + + Fri May 27 17:36:53 1994 Pat Rankin (rankin@eql.caltech.edu) + + * make-l2.com: Update to handle `ginclude' subdirectory + when compiling libgcc2. + + Fri May 27 17:30:37 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.c (print_operand_address): print_operand_address + creates PLUS-rtls for internal use, so it has to handle them. + + Fri May 27 16:13:53 1994 Chris Torek (torek@elf.bsdi.com) + + * function.c (assign_parms): Set REG_USERVAR_P when parm + is passed by invisible reference but can live in register. + + Fri May 27 06:03:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads): Revert to old code and change secondary + reloads to RELOAD_FOR_OPERAND_ADDRESS too. + + * combine.c (try_combine): Don't make complemented XOR for + constant out of range. + + * alpha.c (or_operand): Renamed from ior_operand. + * alpha.h (PREDICATE_CODES): Likewise. + * alpha.md (iordi3): Likewise. + (xordi3): Use or_operand and add second alternative. + (eqv): Only accept registers. + + * expr.c (expand_expr, case CONSTRUCTOR): If constant and large + enough for memcpy to be used, build constructor into static memory. + + * alpha.md: Add define_split for sign-extended PLUS of a MULT + of an SImode comparison. + + * combine.c (simplify_comparison): Narrow comparison for AND's + that are ZERO_EXTENDs. + Can widen for all comparisons if inputs are both sign extended. + + * reload1.c (reload_as_needed): Update spill_reg_order once we sort + spill_regs. + + * alpha.md: Add define_split for sign-extended PLUS of an SImode + comparison; change comparison to DImode. + + * stmt.c (expand_end_case): Use old type of INDEX_EXPR when making + a constant. + + * local-alloc.c (requires_inout): Renamed from requires_inout_p and + returns number of alternatives that require a match. + (block_alloc): Use new function and handle case where all + alternatives have some operand that must match operand 0. + + * local-alloc.c (qty_phys_num{,_copy}_sugg): New variables. + (qty_phys_has{,_copy}_sugg): Deleted. + (qty_sugg_compare{,_1}): New functions. + (local_alloc): Allocate and init new vars instead of deleted ones. + (block_alloc): Update and use new vars. + Order quantities using new functions when allocating quantities + with suggested registers. + (combine_regs, find_free_reg): Use new vars to count number + of suggestions. + + Thu May 26 11:55:44 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * jump.c (jump_optimize): When looking for an `if' statement + that takes two insns to compute a result using a temporary, + allow the temporary to be a SUBREG. + + * combine.c (simplify_comparison): Call CANONICALIZE_COMPARISON, + if defined. + * alpha.h (CANONICALIZE_COMPARISON): New macro. + + * combine.c (simplify_if_then_else): Don't make (mult (cond)) + in simple case; leave as IF_THEN_ELSE instead. + + * expmed.c (expand_divmod): Correctly set CAN_CLOBBER_OP0 when we've + converted OP0 to COMPUTE_MODE. + + Thu May 26 11:41:58 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Protect bool in curses.h with #ifndef __cplusplus, + since g++ now defines bool as a basic type. + + * fixinc.svr4: Protect definition of __P used in Solaris math.h + and floatingpoint.h to avoid future fixproto conflicts. + + * Makefile.in (stmp-fixinc): Don't pass ${srcdir} argument to + $(FIXINCLUDES); no longer needed, and always problematical for + binary only installations. + * fixincludes: Remove initialization of ${SRCDIR}. Don't + explicitly copy over multimedia/audio_errno.h; should be handled + by Oct 11, 1993 change. + * fixinc.svr4: Remove initialization of ${SRCDIR}. + * fixinc.sco, fixinc.dgux: Likewise. + + Fri May 20 12:48:24 1994 Jim Wilson (wilson@cygnus.com) + + * stmt.c (expand_exit_loop_if_false): Emit conditional jump around + unconditional loop exit instead of conditional loop exit. + + * rs6000.c (output_prolog): Use multiple fputs calls instead of + one call with multiple strings. + + * iris4.h (STARTFILE_SPEC, LIB_SPEC): Define. + + * xcoffout.c (MAKE_LINE_SAFE): Delete. + (ASM_OUTPUT_LBB, ASM_OUTPUT_LBE): Don't use MAKE_LINE_SAFE. + + Fri May 20 01:18:30 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.sub (basic_machine): Accept cxux*. + + Thu May 19 19:12:41 1994 Mike Stump (mrs@cygnus.com) + + * calls.c (expand_call): Only destroy temps here, if -fshort-temps + is given. + + Thu May 19 19:07:59 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.sub: Fix unrecognized os error message. + + Thu May 19 17:46:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (emit_reload_insns): When seeing if an equivalent + register can have it's output reload deleted, check for REG_DEAD + notes for reload_in instead of calling dead_or_set_p. + + Thu May 19 16:38:32 1994 Stephen L Moshier (moshier@world.std.com) + + * emit-rtl.c (operand_subword): Fix arg of REAL_VALUE_TO_TARGET_SINGLE + and .._DOUBLE. Permit float subword extraction when host's word + width is wider than target's. + + Thu May 19 15:09:21 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Make OSF/1 getopt.h fix work on AIX also. + + Wed May 18 15:34:10 1994 Jason Merrill (jason@deneb.cygnus.com) + + * fixincludes: Add forward declaration of struct exception to + SunOS 4 math.h. + + Wed May 18 12:46:46 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * stor-layout.c (layout_decl): Allow any integral types + for bit fields. (Specifically, C++ now has a 'bool' type.) + + Wed May 18 16:32:40 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (compare_spill_regs): Fix typo in declaration. + + Wed May 18 10:39:00 1994 Brendan Kehoe (brendan@lisa.cygnus.com) + + * fixinc.svr4: Avoid the SVR4 typedef of bool in curses.h when + compiling for C++, since g++ now supports it as an official typename. + + Tue May 17 18:06:32 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.md: Don't use the extsd/extd instructions on the ns32532. + + Tue May 17 17:44:38 1994 Pat Rankin (rankin@eql.caltech.edu) + + * make-cc1.com (CFLAGS): Separate include file handling; for + stage 1, CFLAGS1 is appended to CFLAGS, otherwise CFLAGS2. + + Tue May 17 16:35:22 1994 Jason Merrill (jason@deneb.cygnus.com) + + * convert.c (convert_to_real): Accept boolean values. + + * config/m68k/hp320.h: #define NO_IMPLICIT_EXTERN_C + + Tue May 17 15:52:05 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc2.c (__umoddi3): Correct type of variable `w'. + + * combine.c (simplify_set): Move call to make_field_assignment + to end; if SRC or DEST is a (clobber (const_int 0)), return it. + (force_to_mode): If X is a CALL, just return it. + + * reload.c (find_reloads): Properly account for cost when + constant is forced to memory to ensure same alternative chosen later. + + Tue May 17 11:30:19 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * combine.c (simplify_set): Use rtx_equal_p to compare cc_use and its + setter. + (make_extraction): Don't put a subreg around a register if it is + already in the correct mode. + + * reload1.c (compare_spill_regs): New function. + (reload_as_needed): Sort the spilled regs. + (allocate_reload_reg): If we have group needs and failure would be + fatal, do not try to do round-robin allocation of the spill regs. + + Mon May 16 18:58:10 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (zero_extendqidi2): Fix omission of TARGET_POWERPC64 + test in previous change. + + Mon May 16 14:59:25 1994 Per Bothner (bothner@cygnus.com) + + * dbxout.c (dbxout_type): When emitting an ENUMERAL_TYPE, if + the precision is different from the default precision (perhaps + because of -fshort-enums), write out the precision. + + Mon May 16 17:44:49 1994 Stephen L Moshier (moshier@world.std.com) + + * real.c (ereal_from_int, ereal_to_int, etarsingle): Correct + signed/unsigned discrepancies. + (ereal_from_double): Avoid "right shift count too big" warning + in previous change. + * final.c (split_double): Fix arg of REAL_VALUE_TO_TARGET_DOUBLE. + + * real.h (REAL_VALUE_FROM_TARGET_SINGLE, .._DOUBLE): Change + arg from long to HOST_WIDE_INT. + * real.c (ereal_from_float, .._double): Likewise, and unpack + the HOST_WIDE_INTs. + + Mon May 16 16:16:32 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * flow.c (try_pre_increment_1): Don't try to create a pre-increment + expression if the register dies in the succeeding insn. + + * expr.c: Use #ifdef TARGET_EDOM, not #if. + + * expr.c (convert_move): When {zero,sign}_extending, allow a wider + intermediate than to_mode if truncation is a no-op. + + Mon May 16 11:49:28 1994 Doug Evans (dje@cygnus.com) + + * m68k/apollo68.h (REGISTER_PREFIX_MD): Delete. + + Mon May 16 08:11:57 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.c (rs6000_convert_preincs): Delete. + * rs6000.h (FINAL_PRESCAN_INSN): Delete. + + * c-typeck.c (initializer_constant_valid_p): Rework to use + precision, not size. + Allow conversions from integer to pointer if int is wide enough. + + * c-decl.c (finish_enum): Handle VALUES being an ERROR_MARK. + + * rs6000.md: Replace bogus "andil" opcode with rlinm. + + Sat May 14 21:26:05 1994 Doug Evans (dje@cygnus.com) + + * hard-reg-set.h (GO_IF_HARD_REG_EQUAL): Fix typo. + + * jump.c (find_cross_jump): Two CALL_INSNs only compare equal if + their CALL_INSN_FUNCTION_USAGEs are the same as well. + + * stupid.c (stupid_life_analysis): Make sure a function result reg + is still live if it contains an argument. + + Fri May 13 22:17:48 1994 Doug Evans (dje@cygnus.com) + + * reorg.c (mark_referenced_resources): Fix typo. + + Fri May 13 18:54:38 1994 Jason Merrill (jason@deneb.cygnus.com) + + * integrate.c (integrate_decl_tree): Use copy_node to make a copy + of the decl. Also call copy_lang_decl to copy the + language-specific bits. + * tree.h: Declare copy_lang_decl. + * c-decl.c (copy_lang_decl): No-op function that will never + actually be called. + + Fri May 13 15:12:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): Correctly check for two modes being the + same number of words. + + Fri May 13 05:03:51 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-parse.in (enumlist): Add error alternative. + + Thu May 12 23:25:38 1994 Jason Merrill (jason@deneb.cygnus.com) + + * c-common.c (truthvalue_conversion): If expr is a BIT_AND_EXPR + where one of the operands is integer_onep, just return expr. + + Thu May 12 20:08:49 1994 Mike Stump (mrs@cygnus.com) + + Fixup lifetime of temporaries. + + * calls.c (expand_call): Only destroy temporaries at the end + of function calls, if flag_short_temps is set. + * expr.c (safe_from_p, expand_expr): Handle CLEANUP_POINT_EXPRs. + * expr.c (expand_expr): Improve handling of temporaries inside + COND_EXPRs, cures call to sorry. + * expr.c (defer_cleanups_to): New routine to handle the deferral + of cleanups. + * flags.h (flag_short_temps): New flag, to allow better control + over the lifetime of temporaries. + * toplev.c (flag_short_temps, lang_options): Ditto. + * tree.def (CLEANUP_POINT_EXPR): Add, to allow better control over + the lifetime of temporaries. + + Thu May 12 19:33:54 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (function units): Numerous cycle count change. + (zero_extendqidi2, extendqidi2, zero_extendhidi2): New patterns. + (extendhidi2, zero_extendsidi2, extendsidi2): Likewise. + (zero_extendqisi2, zero_extendqihi2, zero_extendhisi2): Use + andil/andi instead of rlinm/rlwinm. + (zero_extendqihi2): Add condition register variants. + (extendqisi2, extendqihi2): Use extsb for PowerPC. + (adddi3, subdi3, negdi2, ashrdi3): Emulate only if !TARGET_POWERPC64. + (movdf, movdi, movti): New PowerPC64 versions. + (load/store with update): New PowerPC64 patterns. + + Thu May 12 18:50:55 1994 Stephen L Moshier (moshier@world.std.com) + + * real.c (m16m): Change first arg to int; all callers changed. + + Thu May 12 18:46:26 1994 Bill Cox (bill@cygnus.com) + + * fixincludes: Add definition of DBL_MAX to math.h for Lynx math.h. + Correct return type of strlen in Lynx string.h. + Delete definition of 'void' as 'int' from Lynx curses.h. + + Thu May 12 18:11:33 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads): Don't change a secondary reload + to RELOAD_FOR_OPERAND_ADDRESS. + + * function.c (assign_parms): Fix typo in previous change. + + Thu May 12 15:48:54 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * c-common.c (decl_attributes): Revert to identifiers for + mode attributes. + * libgcc2.c: Likewise. + + Thu May 12 15:41:38 1994 Pat Rankin (rankin@eql.caltech.edu) + + * vax/xm-vms.h (lookup_name_current_level_global): New macro. + + Wed May 11 17:44:47 1994 Jim Wilson (wilson@cygnus.com) + + * cse.c (cse_insn): Set src_eqv if the dest is a STRICT_LOW_PART. + + * expmed.c (store_fixed_bit_field): Delete code to handle + MODE_FLOAT values here. + (store_bit_field): Put it here instead. + + Wed May 11 16:18:21 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * a29k.c (a29k_clobbers_to): New function. + * a29k.md (clobbers_to): Deleted. + (call_internal, call_value_internal): New patterns. + (call, call_value): Just call new patterns and a29k_clobbers_to. + + * stor-layout.c (layout_type): Use POINTER_SIZE, instead of width + of Pmode, when appropriate. + + * calls.c (emit_call_1): Put new function usage data at end of + any data already there. + * expr.c (expand_builtin_apply): Likewise. + + * sched.c (sched_analyze_insn): Fix typo in last change. + + Wed May 11 14:45:12 1994 Doug Evans (dje@cygnus.com) + + * configure: Fix handing case of no language subdirs. + + Wed May 11 12:11:40 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixincludes: Don't recursively search symlinks to `.'. + + Tue May 10 17:49:57 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * configure: Include stage4 in the list. + + * gcc.c (process_command): Kludge in stageN/../include instead of + include. + + Mon May 9 21:04:19 1994 Jim Wilson (wilson@cygnus.com) + + * sparc.h (*TF*_LIBCALL): Delete `*' from libcall name. + + Mon May 9 18:42:10 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.c (output_move_dconst): Fix errors on ranges. + + Mon May 9 18:33:16 1994 Chris Torek (torek@bsdi.com) + + * gcc.c (delete_if_ordinary): New function. + (delete_temp_files, delete_failure_queue): Call it. + + Sat May 7 12:12:58 1994 Andreas Neubacher (aneubach@risc.uni-linz.ac.at) + + * i386/seq-sysv3.h (LIB_SPEC): Support -fshared-data. + (CPP_SPEC): Set _SEQUENT_ to 1. + (SHARED_SECTION_ASM_OP, ASM_OUTPUT_SHARED_COMMON): Supply new macros. + (SHARED_BSS_SECTION_ASM_OP, BSS_SECTION_FUNCTION): Likewise. + + Sat May 7 10:09:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reorg.c (mark_{referenced,set}_resources): Fix typos in last change. + + * reload1.c (emit_reload_insns): Don't try to delete output reload + if there isn't one. + + * i386.h (REG_ALLOC_ORDER): New macro. + + * sched.c (sched_analyze_insn, attach_deaths_insn): Look at + CALL_INSN_FUNCTION_USAGE. + + * reload1.c (choose_reload_regs): Remove previous change. + + Fri May 6 20:32:22 1994 Doug Evans (dje@canuck.cygnus.com) + + * sparc.c (leaf_reg_backmap): Delete. + (sparc_flat_compute_frame_size): Renamed from + sparc_frw_compute_frame_size. All callers changed. + (sparc_flat_save_restore): Likewise. + (sparc_flat_output_function_prologue): Likewise. + Delete decl of call_used_regs. + Delete reference to frame_base_name, use frame pointer explicitly. + Print prologue end marker. + (sparc_flat_output_function_epilogue): Likewise (renaming). + Delete decls of asm_out_data_file, asm_out_file, call_used_regs. + Print epilogue start marker. + (sparc_flat_epilogue_delay_slots): Likewise (renaming). + (sparc_flat_eligible_for_epilogue_delay): Likewise. + * sparc.h (TARGET_FRW): Add note saying this option is deprecated. + (TARGET_FLAT): Renamed from TARGET_FRW_COMPAT. + (TARGET_SWITCHES): Delete references to -mfrw, -mfrw-compat. + Add -mflat. + (CONDITIONAL_REGISTER_USAGE): If -mflat, fix %i7, rename "%fp" + to "%i7", and make %g7 a global_reg. + (FRAME_POINTER_REQUIRED): Handle -mflat. + (INITIAL_FRAME_POINTER_OFFSET): Likewise. + (ARG_POINTER_REGNUM): Explicitly say it's the frame pointer. + (LEAF_REGISTERS): Make %g7 not a leaf register. + (leaf_reg_backmap): Delete. + (LEAF_REG_BACKMAP): Likewise. + (FUNCTION_PROLOGUE): Handle -mflat. + (FUNCTION_EPILOGUE): Likewise. + (DELAY_SLOTS_FOR_EPILOGUE): Likewise. + (ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise. + + Fri May 6 14:05:00 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * tree.h (TYPE_ATTRIBUTES): New macro. + (struct tree_type): attributes, new field. + (precision): Move this field up for better alignment. + (attribute_list_{equal,contained}): Prototype for new functions. + (build_type_attribute_variant): Prototype for new function. + * c-parse.in: Rewrite attribute parsing; update the expected + conflicts and state numbers. + * tree.c (TYPE_HASH): Move definition to top of file. + (make_node): Add support for SET_DEFAULT_TYPE_ATTRIBUTES. + (build_type_attribute_variant): New function. + (type_hash_lookup): Check if the attributes match. + (attribute_list_{equal,contained}): New functions. + * c-typeck.c (common_type): Add attribute merging. + (comp_types): Use COMP_TYPE_ATTRIBUTES macro. + * print-tree.c (print_node): Print attributes. + * c-common.c (decl_attributes): Move the attribute + recognition and rejection here from c-parse.in. + (decl_attributes): Use VALID_MACHINE_ATTRIBUTE macro. + + * regclass.c (init_reg_sets_1): Eliminate several permanent + call_fixed_regs. + + * rtl.def (CALL_INSN): Define new CALL_INSN_FUNCTION_USAGE field. + * rtl.h (CALL_INSN_FUNCTION_USAGE): New macro. + (find_reg{,no}_fusage): Prototype for new function. + * rtlanal.c (reg_used_between_p): Check usage exprs on CALL_INSNs. + (reg_referenced_between_p, reg_set_p, dead_or_set_regno_p): Likewise. + (find_reg{,no}_fusage): New functions. + * combine.c (try_combine): Restrict combining on CALL_INSNs. + (distribute_{notes,links}): Look at CALL_INSN_FUNCTION_USAGE. + * cse.c (cse_insn): Invalidate CLOBBERed registers. + (count_reg_usage): Count registers in USE rtls on CALL_INSNs. + * emit-rtl.c (make_call_insn_raw): New function. + (emit_call_insn{,_before}): Use make_call_insn_raw. + * calls.c (prepare_call_address, emit_call_1, expand_call): Change + from USE and CLOBBER insns to using CALL_INSN_FUNCTION_USAGE. + (emit_library_call{,_value}): Likewise. + * expr.c (use_regs, expand_builtin_apply): Likewise. + * expr.h (use_regs): Likewise. + * flow.c (flow_analysis, find_basic_blocks): Likewise. + * caller-save.c (insert_save_restore): Likewise. + * function.c (fixup_var_refs_insns): Likewise. + * jump.c (find_cross_jump, get_label_{before,after}): Likewise. + * reload1.c (emit_reload_insns): Likewise. + * reorg.c (mark_referenced_resources, mark_set_resources): Likewise. + * integrate.c (save_for_inline_copying, expand_inline_function): + Copy CALL_INSN_FUNCTION_USAGE field. + * reload1.c (choose_reload_regs): Ban filled argument registers. + * caller-save.c (save_call_clobbered_regs): CALL_INSN_FUNCTION_USAGE + requires a sharper liveliness check. + * flow.c (propagate_block): Mark all registers mentioned in USE + usage expressions on a CALL_INSN as used. + * jump.c (find_cross_jump): If STACK_REGS is defined two + CALL_INSNs only compare equal if their USE usage rtls are + the same as well. + * stupid.c (stupid_life_analysis): Check the usage information + on CALL_INSNs. + + * function.c (assign_parms): Spread out the REG_EQUIV notes + on CONCATs. + + Fri May 6 12:43:10 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads): Ignore alternatives that will + not be reloadable due to PREFERRED_RELOAD_CLASS. + + * explow.c (allocate_dynamic_stack_space): Just return + virtual_stack_dynamic_rtx if asking for zero bytes. + Set current_function_calls_alloca here and also record new + stack level for nonlocal gotos. + * expr.c (expand_builtin, case BUILT_IN_ALLOCA): Don't + set current_function_calls_alloca here nor record new + stack level for nonlocal gotos. + * stmt.c (expand_decl): Likewise. + + * function.c (assign_parms): Use expr_size when appropriate. + + * c-typeck.c (comptypes): An enum type is compatible with type of + same signedness as well as precision. + + * alpha.h (CONST_COSTS): Revise all costs. + * alpha.md (addsi3, subsi3): Add define_expand to make + adddi3/subdi3; old pattern is now anonymous. + + * combine.c (simplify_rtx, case MULT): Don't convert MULT to + shift here. + (simplify_logical, case IOR): Convert back to PLUS if valid and + it will combine with another PLUS. + (extract_left_shift): New function. + (make_compound_operation, case ASHIFTRT): Simplify by calling it. + (force_to_mode): Don't ignore if X is a SUBREG. + (force_to_mode, case AND): Try to turn unchecked bits on + instead of just off and see which is cheaper. + + Fri May 6 11:22:23 1994 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (libgcc1.a, libgcc2.a): Don't ignore errors in for + loops over $(LIB[12]FUNCS_EXTRA). + + Fri May 6 06:14:56 1994 Mike Stump (mrs@cygnus.com) + + * expr.c (expand_cleanups_to): Tell expand_expr that we are going + to ignore the result of the cleanup. + + Thu May 5 17:45:02 1994 Stan Shebs (shebs@andros.cygnus.com) + + * gcc.c (do_spec_1): If -save-temps, always clear the deletion flag. + + Thu May 5 13:39:35 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (simplify_rtx, case SUBREG): Don't call force_to_mode. + (simplify_set): Call force_to_mode here. + + * m68k.md (movhi): Simplify code involving jump-table + reference. + (load_address): Handle case of jump-table reference; output + required label. + + Thu May 5 12:28:16 1994 Ian Lance Taylor (ian@cygnus.com) + + * cccp.c (main): Include source file name in dependency output. + + Wed May 4 18:45:07 1994 Doug Evans (dje@cygnus.com) + + * config.sub: Remove duplicate -freebsd* entry. + + Wed May 4 18:03:34 1994 Jason Merrill (jason@deneb.cygnus.com) + + * cccp.c (special_symbol): Don't copy simple strings, use wchar_type. + (main): Setup wchar_type for C++ if needed. + (initialize_builtins): Use wchar_type. + + Wed May 4 17:19:34 1994 Mike Collison (collison@sw.stratus.com) + + * reload.c (push_secondary_reload): Use TYPE for secondary type + if it is RELOAD_FOR_{INPUT,OUTPUT}_ADDRESS. + + Wed May 4 16:35:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure (i386-gnu): New, same as i386-mach. + + * global.c (find_reg): When looking for locally-allocated hard + regs to reclaim, use REG_ALLOC_ORDER to find least used. + + * reload1.c (emit_reload_insns): Add another way to delete an + output reload. + + * reload1.c (reload, reload_as_needed): Check for use of return + register with reg_referenced_p, not reg_mentioned_p. + + Wed May 4 14:23:51 1994 Jim Wilson (wilson@cygnus.com) + + * mips.c (override_options): Delete TARGET_LLONG128 references. + * mips.h (MASK_LLONG128, TARGET_LLONG128): Delete. + (TARGET_SWITCHES): Delete -mlonglong128 option. + (LONG_LONG_TYPE_SIZE): Delete TARGET_LLONG128 reference. + + * mips/bsd-4.h, mips/bsd-5.h, mips/news4.h, mips/news5.h, + mips/nws3250v4.h, mips/svr3-4.h, mips/svr3-5.h, mips/svr4-4.h, + mips/svr4-5.h (CPP_SPEC): Delete. + * mips/dec-bsd.h (CPP_SPEC): Define __SIZE_TYPE__, + __PTRDIFF_TYPE__, and __mips. + (SIZE_TYPE): Delete. + * mips/dec-osf1.h (PTRDIFF_TYPE): Delete. + (CPP_SPEC): Define, overriding ultrix.h version. + * mips/iris5.h (CPP_SPEC): Define __SIZE_TYPE__, __PTRDIFF_TYPE__, + and __mips. + * mips/osfrose.h (CPP_SPEC): Define __PTRDIFF_TYPE__ and __mips. + (PTRDIFF_TYPE): Delete. + (SIZE_TYPE): Define. + (SET_ASM_OP): Define. + * config/mips/ultrix.h (CPP_SPEC): Delete. + (SIZE_TYPE): Delete. + + Tue May 3 19:04:43 1994 Jason Merrill (jason@deneb.cygnus.com) + + * Makefile.in (stamp-objlist): Depend on OBJS and BC_OBJS so that + subdir makes will know to re-link. + + Mon May 2 16:05:05 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * toplev.c (compile_file): If static consts haven't been written + out yet, don't do it just because TREE_USED is set (if we're + optimizing). (This wins for C++, which uses static consts a lot.) + + Mon May 2 16:42:59 1994 Jim Wilson (wilson@cygnus.com) + + * stmt.c (expand_end_case): Make sure gen_casesi operands are + valid by passing them through copy_to_mode_reg if necessary. + * mips.md (casesi): Delete force_reg calls. + + * ns32k.c (output_move_double): Always use split_double for the + CNSTOP case. + + * gcc.c (translate_options): For options that take an argument, + don't skip the argument if it doesn't exist. + + * c-decl.c (pushdecl): Use lookup_name_current_level_global instead + of lookup_name for extern references. Don't return duplicate decl + if it came from the global binding level, and there exists a + conflicting decl in an intervening block. + (lookup_name_current_level_global); New function. + * c-tree.h (lookup_name_current_level_global): Declare. + + * sys-protos.h (read, write): Last parm is size_t not unsigned int. + + * unroll.c (remap_split_bivs): New function. + (unroll_loop): When remapping split bivs in the last instruction, + handle JUMP_INSNs in addition to INSNs. + + Mon May 2 12:53:57 1994 Jason Merrill (jason@deneb.cygnus.com) + + * config/nextstep.h (INCLUDE_DEFAULTS): Add cxx_aware field. + * config/vax/xm-vms.h (INCLUDE_DEFAULTS): Ditto. + + Fri Apr 29 18:30:38 1994 Kung Hsu (kung@cygnus.com) + + * tree.h (TYPE_DECL_SUPPRESS_DEBUG): new macro to support + suppressing of detail type infos into stabs. + * dbxout.c (dbxout_type): check the above flag to generate cross + reference in stabs. + + Fri Apr 29 01:01:45 1994 Doug Evans (dje@cygnus.com) + + * Makefile.in (stamp-objlist): New target. + + Thu Apr 28 22:17:15 1994 Doug Evans (dje@cygnus.com) + + * Makefile.in (USE_ALLOCA): Rearrange "'s. + (FLAGS_TO_PASS): Delete CLIB, MALLOC, OBSTACK. + + Thu Apr 28 19:04:17 1994 Jim Wilson (wilson@cygnus.com) + + * stmt.c (expand_end_case): Correct test for sign extending + unsigned constant index when creating index_expr. + + * cccp.c (macroexpand): Use start_line for line number of the new + instack level pushed at the end. + + Thu Apr 28 18:59:17 1994 Mike Stump (mrs@cygnus.com) + + * stmt.c: Remove old exception handling support from the backend. + + Thu Apr 28 18:59:53 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * sparc.c (arith_double_operand): Modify to accept all possible constants. + * sparc.md (adddi3, subdi3, anddi3, iordi3, xordi3): Corresponding changes. + (one_cmpldi3): Don't allow constants for operand 1. + + Thu Apr 28 18:10:18 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (addsi3): Prefer add without carry instructions and + flag input operands as commutative for condition register variant. + (subsi3): Define PowerPC patterns using subtract without carry. + (numerous): Flag input operands as commutative for condition + register variant. + (mov* matchers): Use mr instruction in ! TARGET_POWERPC case as + well and mr. in condition register variant. + * rs6000.c (output_prolog): Use mr, lis, and li instructions. + Use subf instruction if TARGET_POWERPC. + (output_epilog): Use cal/addi instruction. + + Thu Apr 28 12:48:59 1994 Andreas Neubacher (aneubach@risc.uni-linz.ac.at) + + * i386/seq-sysv3.h (SHARED_SECTION_ASM_OP): Defined. + + Thu Apr 28 12:40:28 1994 Doug Evans (dje@cygnus.com) + + * expr.c (expand_builtin): Fix typo in previous patch + (allow __builtin_next_arg in varargs functions). + + Tue Apr 26 16:31:44 1994 Per Bothner (bothner@cygnus.com) + + * tree.h (AGGREGATE_TYPE_P): New macro. + * calls.c, expr.c, function.c, stmt.c, varasm.c: Use + new macro AGGREGATE_TYPE_P. + + Mon Apr 25 18:45:28 1994 John Hassey (hassey@dg-rtp.dg.com) + + * varasm.c (copy_constant, case CONSTRUCTOR): Fix typo; copied list + was placed on old CONSTRUCTOR, not new one. + + Mon Apr 25 15:04:53 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-decl.c (grokdeclarator): Never warn about `long long' in + system header. + + * c-decl.c (finish_decl): Redo last change. + + * Makefile.in (*compare*): Add missing semicolons. + + Mon Apr 25 15:02:31 1994 Doug Evans (dje@cygnus.com) + + * configure (m68k-hp-hpux): t-hp320g no longer needed as of gas 2.1. + * m68k/t-hp320g: Deleted. + + Mon Apr 25 14:23:18 1994 Poul-Henning Kamp (phk@login.dkuug.dk) + + * config.sub, configure: Recognize FreeBSD. + * i386/freebsd.h, x-freebsd: New files. + * i386/x-freebsd: New file. + * i386.h (TARGET_NO_FANCY_MATH_387): New option. + * i386.md (TARGET_NO_FANCY_MATH_387): Implement new option. + * ginclude/stdarg.h, ginclude/stddef.h, ginclude/varargs.h: + Recognize __FreeBSD__. + * gcc.c (link_command_spec): Add -Z argument for ZMAGIC's on FreeBSD. + + Mon Apr 25 14:08:26 1994 Doug Evans (dje@cygnus.com) + + * configure (language search loop): Correct test for no languages. + (CC): Use single quotes to avoid shell expansion of $(CC). + + Mon Apr 25 13:10:07 1994 Andreas Stolcke (stolcke@icsi.berkeley.edu) + + * Makefile.in (install-common): Install EXTRA_PARTS with + INSTALL_DATA, not INSTALL_PROGRAM. + + Mon Apr 25 06:34:00 1994 Stephen L Moshier (moshier@world.std.com) + + * fold-const.c (fold-convert): Use assignment, instead of + initializing, aggregate local variable REAL_VALUE_TYPE. + + Sun Apr 24 11:17:20 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reorg.c (redirect_with_delay_list_safe_p): Fix off-by-one error. + + * real.c (etoe53, etoe24): Make all occurrences static. + + * emit-rtl.c (try_split): Don't try to recursively split deleted insn. + + * rs6000.md (movti): Adjust constraints to avoid impossible reload. + + * expr.c (expand_expr, case SAVE_EXPR): Fix error in last change. + + Sat Apr 23 06:45:50 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (reloads_conflict, case RELOAD_FOR_OUTPUT): Fix typo. + + Fri Apr 22 18:43:08 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure (alpha-dec-osf): Fix typo. + + Fri Apr 22 15:02:22 1994 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) + + * gcc.c (handle_braces, check_live_switch): Refine previous change. + + Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com) + + * configure: Sort machines. + + * Language directory reorganization. + * configure: Auto-configure each language subdirectory by looking + for */config-lang.in. + Add language makefile fragments (Make-lang.in) to top level makefile, + and hook them in via lang.* targets. + Configure each language subdirectory. On hosts that support them, + create stage[123] symlinks in each subdirectory. + If there is a configure script in the subdirectory, run it. + * Makefile.in (LANGUAGES): Remove c++. + (SUBDIRS): New variable. + (LEX, LEXFLAGS): Ditto. + (MAKEOVERRIDES): Ditto. + (COMPILERS): Remove cc1plus. + (LANG_MAKEFILES, LANG_STAGESTUFF, LANG_DIFF_EXCLUDES, FLAGS_TO_PASS): + New variables. + (CPLUS_OBJS, CPLUS_TREE_H, C++, c++, g++, g++-cross, cc1plus, + cp-*.o, g++.o, gplus.info): Deleted. + (STAGESTUFF): Remove g++, g++-cross, cc1plus. Add $(LANG_STAGESTUFF). + (Makefile): Depend on $(LANG_MAKEFILES). + (####language hooks, ####language fragments): New spots for sed + to insert things. + (all.cross, all.build, start.encap, rest.encap, info, dvi, + install-normal, install-common, install-info, install-man, + uninstall, distdir, mostlyclean, clean, distclean, extraclean, + realclean, stage1, stage2, stage3, stage4): Depend on lang.foo. + (mostlyclean, clean, distclean, extraclean, realclean): Clean as + much of the language subdirectories as we can. + (install-common): Remove g++ installation. + (install-man): Remove g++.1 installation. + (uninstall): Remove g++ reference. + (TAGS): Remove cp-parse.? reference. + (distdir): Ditto. + (distdir-start, distdir-finish): New targets. + (diff): Remove cp-parse.? reference. Add $(LANG_DIFF_EXCLUDES). + (compare, compare3, gnucompare, gnucompare3): Compare language + subdirectories too. + (stage1-start, stage2-start, stage3-start, stage4-start): New targets. + Ensure stage subdirectory exists before processing language + dependent part. + * cp/Makefile.in: New file, makefile for c++ subdirectory. + * cp/Make-lang.in: New file, c++ language makefile fragment. + This file provides c++ specific support to the top level makefile via + several well defined targets: c++.all.build, c++.all.cross, + c++.start.encap, c++.rest.encap, c++.info, c++.dvi, + c++.install-normal, c++.install-common, c++.install-info, + c++.install-man, c++.uninstall, c++.distdir, c++.mostlyclean, + c++.clean, c++.distclean, c++.extraclean, c++.realclean, + c++.stage1, c++.stage2, c++.stage3, c++.stage4. + * cp/config-lang.in: New file, defines language name and other + configuration parameters for the c++ language: compilers, stagestuff, + and diff_excludes. + * g++.c: Move into cp subdirectory. + * g++.1: Ditto. + * g++int.texi: Ditto. + * cp-*: Ditto, remove "cp-" prefix except for cp-tree.h. + + Thu Apr 21 15:47:01 1994 Jim Wilson (wilson@cygnus.com) + + * sparc.c (mem_aligned_8): Don't assume addresses with + MEM_IN_STRUCT_P set are 8 byte aligned. + + * iris5.h (CPP_SPEC): Define _LANGUAGE_C for Objective C also. + + * unroll.c (find_splittable_givs): Share dest_reg for multiple + address givs within a single instruction. + (copy_loop_body): Only update psuedo-reg for shared giv once. + + * sparc.c (sparc_type_code): Don't put more than 30 bits of info + into the variable qualifiers. + + * expr.c (store_expr): Don't check the TYPE_MODE of an ERROR_MARK. + + Thu Apr 21 15:34:11 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (calls_function_1): A language-specific code must + be assumed to call a function and also call alloca. + Check for inlined functions that call alloca. + + * reload1.c (reload): Clear forbidden_regs earlier. + (new_spill_reg): Mention in error message that asm clauses can also + cause the compiler to run out of spill regs. + (scan_paradoxical_regs): If SMALL_REGISTER_CLASSES, forbid + hard regs used in explicit user variables. + + * combine.c (can_combine_p, combinable_i3pat, try_combine): Allow + combination involving hard regs if the hard reg is a user variable. + + * gcc.c (default_compilers): If -E and the file is (e.g.) x.s, + don't run the assembler; similarly for .i, .ii, .adb, etc. + + * Cleanups related to adding prototypes to many declarations. + * rtl.h: If TREE_CODE undefined, make an incomplete union for tree. + (STDIO_PROTO): Define here if not already defined. + (read_rtx): Use STDIO_PROTO. + (output_constant_def, immed_real_const): Use "union tree_node *". + (immed_real_const_1): Move declaration to real.h. + (rtx_to_tree_code): Supply prototype. + * tree.h: If RTX_CODE undefined, make an incomplete struct for rtx. + Add some missing declarations of functions in stmt.c. + (STDIO_PROTO): Define here if not already defined. + * real.h: Add prototypes to declarations of functions in real.c. + (immed_real_const_1): Move declaration from rtl.h. + * output.h: Add missing declarations of functions in final.c. + (STDIO_PROTO): Don't define here. + * c-tree.h (STDIO_PROTO): Likewise. + * reload.h (PROTO, STDIO_PROTO): Likewise. + * bi-opcode.c (main): Don't write overly-long line. + * cse.c, emit-rtl.c: Use CONST_DOUBLE_FROM_REAL_VALUE macro for immed + real_const_1. + * expmed.c: Add prototypes for static functions. + * expr.c (bc_expand_expr): Call expand_decl and expand_decl_init, + not the bc_ versions. + * final.c: Include stdio.h and ctype.h early. + Add prototypes for static functions. + * function.c: Add prototypes for static functions. + (bc_expand_function_end, expand_function_end): Call new + expand_fixups instead of old fixup_gotos. + * global.c, local-alloc.c: Add prototypes for static functions. + * integrate.c: Likewise. + Use CONST_DOUBLE_FROM_REAL_VALUE macro for immed_real_const_1. + * optabs.c: Likewise. + * real.c: Make most functions static and add prototypes for + all static functions. + (GET_REAL, PUT_REAL): Cast parameter to proper pointer type in + some cases; use unsigned array. + * stmt.c: Add prototypes for static functions. + (expand_fixups): New function. + (fixup_gotos): Now static. + Don't call bc_fixup_gotos with wrong type (but now probably wrong + value). + (bc_*): Now static. + (expand_exit_loop_if_false): Call bc_expand_goto_internal with + proper null pointer. + (expand_decl_init): Call bc_expand_decl_init if writing bytecode. + + Thu Apr 21 14:21:56 1994 Ian Lance Taylor (ian@cygnus.com) + + Support taking the address of a text segment symbol when using + MIPS -membedded-pic. + * mips.h (embedded_pic_fnaddr_rtx): Declare. + (embedded_pic_offset): Declare. + (mips_finalize_pic): Declare. + (FINALIZE_PIC): Define. + (GO_IF_LEGITIMATE_ADDRESS): When using -membedded-pic, reject + combining an embedded PIC text reference with a register. + (ENCODE_SECTION_INFO): Under -membedded-pic set SYMBOL_REF_FLAG to + 0 for text segment symbols, 1 for data segment symbols. + * mips.c (embedded_pic_fnaddr_rtx): New variable. + (embedded_pic_offset): New function. + (mips_finalize_pic): New function. + (mips_select_section): When using -membedded-pic and not using + -fwritable-strings, put strings in the text section, not the read + only data section. + * mips.md (movsi): When using -membedded-pic, add special code + when loading a symbol directly to use an offset from the start of + the current function. + (get_fnaddr): New insn to get address of current function. + + Wed Apr 20 19:38:38 1994 Doug Evans (dje@cygnus.com) + + * regclass.c (init_reg_sets_1): Make static. + (init_reg_modes): New function. + (init_regs): Likewise. + * toplev.c (compile_file): Call init_regs after init_rtl. + (main): Delete call to init_reg_sets_1. + + Wed Apr 20 15:06:35 1994 Steve Chamberlain (sac@cygnus.com) + + * sh.c (REG_ODD): Allow DIs and DFs into odd registers. + (print_operand): New command char '@', change nop insn. + (synth_constant): Don't allocate temp reg during reload. + (expand_block_move): Don't expand if TARGET_SMALLCODE. + (prepare_split_double_ops): Deleted. + (howshift, multcosts): Work out costs exactly. + (dump_table): Emit a label before the align. + (hi_const): TARGET_SHORTADDR makes more things HI consts. + (machine_dependent_reorg): Look through SUBREGS. + (from_compare): Get better code when relational args are loaded + into regs now. + (expand_acall): Cope with TARGET_BSR. + (general_movdst_operand): Don't allow illegal autoincs. + (mac_operand): New function. + (sh_function_arg, sh_function_partial_nregs): From sh.h + * sh.h (PARANOID_BIT, RETR2_BIT, CONSTLEN0_BIT, BSR_BIT, + SHORTADDR_BIT, TARGET_PARANOID, TARGET_RETR2, TARGET_CONSTLEN0, + TARGET_BSR, TARGET_SHORTADDR, TARGET_SWITCHES): New options. + (OVERRIDE_OPTIONS): No function_cse when TARGET_BSR. + (FIRST_RET_REG): Depends on TARGET_RETR2. + (FUNCTION_ARG, FUNCTION_ARG_PARTIAL_NREGS): Moved to sh.c + (HAVE_POST_INCREMENT, HAVE_PRE_DECREMENT): Define. + (MODE_DISP_OK_8): Define. + (REG_OK_FOR_PRE_POST_P): Allow a pseudoreg. + (GO_IF_LEGITIMATE_ADDRESS): Allow DI addressing modes. + (MOVE_RATIO): Depends on TARGET_SMALLCODE. + * sh.md (interrupt_function): New attr. + (define_delay): Account for interrupt functions. + (addc): Describe pattern better. + (adddi3): Expanded better. + (peepholes): Deleted many obsolete patterns. + + Wed Apr 20 13:37:58 1994 Jason Merrill (jason@deneb.cygnus.com) + + * expr.c (expand_expr): Don't force ignore when expanding the + subexpression of a WITH_CLEANUP_EXPR. Don't check ignore when + deciding whether or not to expand the cleanup for a TARGET_EXPR. + + Wed Apr 20 12:20:16 1994 Doug Evans (dje@cygnus.com) + + * h8300/h8300.h (RTX_COSTS): Remove LSHIFT. + * h8300/h8300.md (lshrhi3_eight): Fix name. + (lshrhi3): Use it. + * i860/i860.c (safe_insn_src_p): Remove LSHIFT. + (single_insn_src_p): Likewise. + * i960/i960.c (i960_expr_alignment): Remove LSHIFT. + * sh/sh.c (output_shift, ASHIFTRT case): Do opposite shift as ASHIFT. + Delete LSHIFT case. + * sh/sh.h (RTX_COSTS): Remove LSHIFT, add LSHIFTRT. + * spur/spur.md (lshlsi3): Delete. + + Wed Apr 20 06:40:15 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * c-lex.c (check_newline): Avoid unreachable statement when + HANDLE_SYSV_PRAGMA defined. + + Wed Apr 20 01:52:24 1994 Steve Chamberlain (sac@mole.gnu.ai.mit.edu) + + * flow.c (find_auto_inc, try_pre_increment): Make sure + that insertion of autoinc addressing mode would yield a valid + instructon. + + Tue Apr 19 23:41:14 1994 Doug Evans (dje@cygnus.com) + + * Makefile.in (expr.o): Depend on regs.h. + * rtl.h (choose_hard_reg_mode): Declare. + * regs.h (reg_raw_mode): Declare. + * caller-save.c (choose_hard_reg_mode): Delete from here. + * regclass.c (choose_hard_reg_mode): Define here. + (reg_raw_mode): Define. + (init_reg_sets_1): Initialize reg_raw_mode. + * expr.c: #include regs.h. + (use_regs): Use reg_raw_mode. + * reload1.c (emit_reload_insns): Record additional spill registers + in their intrinsic mode. + * combine.c (move_deaths): Record death information of remaining + registers in their intrinsic mode. + * sched.c (attach_deaths): Create partial register dead notes using + register's intrinsic mode. + + Tue Apr 19 21:40:57 1994 Mike Stump (mrs@cygnus.com) + + * toplev.c (lang_options): Add -fhandle-signatures for C++ + frontend. + + Tue Apr 19 19:00:30 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cccp.c (do_error): Don't terminate. + + Tue Apr 19 17:48:41 1994 Hallvard B Furuseth (hbf@durin.uio.no) + + * gcc.c: Add new options -print-file-name= and -print-prog-name=. + + * gcc.c (struct switchstr): New field LIVE_COND. + (process_command): Initialize it. + (check_live_switch): New function. + (handle_braces): Call it. + + Mon Apr 18 19:22:25 1994 Lee Iverson (leei@ai.sri.com) + + * mips.h (RTX_COSTS): Remove LSHIFT. + + Mon Apr 18 17:56:22 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * c-decl.c (duplicate_decls): Always warn when const declaration + follows non-const one for variables. + + Mon Apr 18 16:38:30 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * calls.c (prepare_call_address): New arg REG_PARM_SEEN. + All callers changed. + (expand_call): Pre-load args if small reg classes and reg parms. + * expr.h (prepare_call_address): Extend prototype. + * expr.c (expand_builtin_apply): Pass new arg to prepare_call_address. + + Mon Apr 18 14:53:14 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (const_binop): If arg is NaN, just return it + (fold_convert): Handle NaN in real->int and real->real cases. + + * c-lex.c (yylex): If FP value is NaN, use value of zero. + + * expr.h (PROMOTE_MODE): Don't supply default here. + (promote_mode): Add declaration. + * explow.c (promote_mode): New function. + * calls.c (expand_call): Use it. + * function.c (assign_parms, promoted_input_arg, expand_function_start): + Likewise. + * expr.c (expand_expr, case VAR_DECL, SAVE_EXPR): Likewise. + * stmt.c (expand_value_return, expand_decl): Likewise. + + Mon Apr 18 11:36:04 1994 Jason Merrill (jason@deneb.cygnus.com) + + * Makefile.in (LIB2FUNCS): Change _op_vec_delete to _op_vec_del. + * libgcc2.c: Ditto. + + Mon Apr 18 11:19:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * reorg.c (redirect_with_delay_list_safe_p): New function, + similar to redirect_with_delay_slots_safe_p. + (fill_slots_from_thread): Do not redirect a jump if doing + so would invalidate the delay list for the jump. + + Mon Apr 18 03:09:30 1994 Doug Evans (dje@cygnus.com) + + * scan-types.sh: Fix program's name in error message. + Rename dummy.c to avoid collisions in parallel makes. + + Sun Apr 17 18:29:00 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.h (PROCESSOR_COMMON, PROCESSOR_POWER, PROCESSOR_POWERPC): + New macros. + * rs6000.c (processor_target_table): Change "all" to "common". + Add "power" and "powerpc" generic processors. Explicitly turn off + new mnemonics for all members of the POWER architecture family. + + Sun Apr 17 10:04:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.h (DECL_PRINT_NAME): Deleted. + (struct tree_decl): Field print_name deleted. + + Sun Apr 17 06:59:58 1994 Pat Rankin (rankin@eql.caltech.edu) + + * vax.h (RTX_COSTS), vax.c (vax_rtx_cost): Remove LSHIFT case. + + Sun Apr 17 01:15:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * function.c (locate_and_pad_parm): For ARGS_GROW_DOWNWARD, + Round sizetree for both upward and downward padding, nuke + the (now unnecessary) call to pad_below for arg_size_ptr. + + Sat Apr 16 21:05:40 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (one_cmplsi2): Always use nor instruction; + remove extraneous minus sign from condition register set constraint. + + Sat Apr 16 17:12:40 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.c (print_operand): 'x' and 'y' mode letters only + if SUPPORT_SUN_FPA. + (print_operand_address): If (new) ASM_OUTPUT_CASE_FETCH defined, + use it to emit the address for the insn before a tablejump. + * m68k/mot3300.h (FUNCTION_ARG_PADDING, FUNCTION_PROLOGUE): Deleted. + (FUNCTION_EPILOGUE, PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Deleted. + (SGS_SWITCH_TABLES, ASM_OUTPUT_CASE_END): Deleted. + (ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Deleted. + (SGS_NO_LI, ASM_OUTPUT_CASE_FETCH, ASM_RETURN_CASE_JUMP): Defined. + + * configure (header_files): Use ${srcdir} instead of $(srcdir). + + Sat Apr 16 16:51:15 1994 DJ Delorie (dj@ctron.com) + + * objc/makefile.dos (OBJC_O): Add encoding.o. + + Sat Apr 16 16:38:32 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-lex.c (yylex): Turn off overflow flag when fixing up large + traditional hex constants. + + * c-decl.c (finish_decl): If asmspec_tree, clear DECL_BUILT_IN + for function and DECL_RTL always. + + Wed Apr 13 13:08:10 1994 Per Bothner (bothner@cygnus.com) + + * toplev.c (compile_file): Never warn about unused static consts, + since it is reasonable to have those in header files. + + Wed Apr 13 12:25:21 1994 Jason Merrill (jason@deneb.cygnus.com) + + * varasm.c (contains_pointers_p): When examining a RECORD_TYPE, + only look at the FIELD_DECLs. + + Tue Apr 12 18:14:42 1994 Jason Merrill (jason@deneb.cygnus.com) + + * Makefile.in (LIB2FUNCS): Add _op_vec_{delete,new}. + + * libgcc2.c (__builtin_vec_{delete,new}): New functions per the + latest C++ working paper. + (__default_new_handler): No longer static. + (__set_new_handler): Lose. + + * cccp.c: Don't implicitly wrap LOCAL_INCLUDE_DIR. + (struct default_include): Add cxx_aware field. + (include_defaults_array): Ditto. + (main): Use cxx_aware field. + + Tue Apr 12 16:13:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.sub (next): Fix typo in m68k-next-ns3 alternative. + + Tue Apr 12 07:41:17 1994 Michael Meissner (meissner@osf.org) + + * i386/i386.c (notice_update_cc): Remove LSHIFT case, since there + is no LSHIFT rtl code any more. + + * halfpic.h (NO_STDIO_H): Do not include stdio.h if this is defined. + + Mon Apr 11 17:24:46 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * scan.c (get_token): Correctly increment lineno after + encountering #ident (or other #-directive). + + Mon Apr 11 13:22:51 1994 Jim Wilson (wilson@cygnus.com) + + * reorg.c (try_merge_delay_insns): Account for resources set/used + by a filled insn before trying to simplify insns in delay slots. + + * x-iris, x-iris3, x-mips, x-sony, x-sysv (OLDCC): Change -XNh1500 + to -XNh2000. + + * c-decl.c (finish_decl): Don't preserve initializer if it is + error_mark_node. + + * reorg.c (try_merge_delay_insns): Move next_trial update + immediately after the try_split call. + + * mips.c (mips_select_rtx_section, mips_select_section): New + functions. Prefer rdata when TARGET_EMBEDDED_DATA, and prefer + sdata otherwise. + * mips.h (MASK_EMBEDDED_DATA, TARGET_EMBEDDED_DATA): New macros. + (TARGET_SWITCHED): Add new option -membedded-data. + (SELECT_RTX_SECTION, SELECT_SECTION): Call function in mips.c. + + * Makefile.in (all.cross, rest.encap): Delete objc-runtime and + SYSCALLS.c.X. + (OBJC, OBJECTIVE-C): Add objc-runtime. + (proto): Add SYSCALLS.c.X. + (libgcc2.ready, libobjc.a, sublibobjc.a, SYSCALLS.c.X): Add + dependence on stmp-int-hdrs. + + * cccp.c (rescan): Don't look for C++ // comment before directive. + Handle \-newline inside a C++ // comment. + (skip_if_group): Likewise. + (handle_directive): Also handle C++ // comment after #. Point + ip->bufp after the comment start before calling + skip_to_end_of_comment. + (validate_else): Handle \-newline inside a C++ // comment. + (skip_to_end_of_comment, macarg1, discard_comments): Likewise. + + * varasm.c (immed_double_const): Sign-extend constants when they + have the most significant bit set for the target. + + Mon Apr 11 06:20:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (reload): When accumulating needs, use nested + structures to simplify and speed up the code. + + * alpha.md (compare define_split): Fix bugs in last addition. + + * calls.c (expand_call, emit_library_call{,_value}, store_one_arg): + Use convert_modes instead of convert_to_mode. + + * tree.h (frame_size): Now a union. + (DECL_ALIGN, DECL_FRAME_SIZE, DECL_FUNCTION_CODE): Access proper + field of frame_size union. + (DECL_SET_FUNCTION_CODE): Simplified; retained for compatibility. + * c-decl.c (duplicate_decls, pushdecl, builtin_function): + Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE. + + Mon Apr 11 05:50:26 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * mips-tfile.c (update_headers): Do not copy stStatic symbols that + result from internal labels. + + Sun Apr 10 07:13:24 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rtl.def (LSHIFT): Deleted. + * combine.c, cse.c, function.c: No longer handle LSHIFT. + * genattrtab.c, loop.c, reload1.c: Likewise. + * expr.h (lshl_optab): Deleted. + * optabs.c (lshl_optab): Deleted. + (expand_binop, init_optabs): No longer reference it. + * genopinit.c, expmed.c (expand_shift): Likewise. + + * arm.c, arm.h, arm.md: Remove references to LSHIFT and lshlsi3. + * clipper.h, clipper.md, convex.h, convex.md, elxsi.md: Likewise. + * fx80.h, fx80.md, gmicro.md, i370.md: Likewise. + * m68k.c, m68k.h, m68k.md, m88k.c, m88k.md, ns32k.md: Likewise. + * rs6000.md, tahoe.md: Likewise. + + * combine.c (simplify_shift_count, case EQ): LSHIFT should be + LSHIFTRT. + + Sun Apr 10 04:48:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa-ghiux.h (LIB_SPEC): Remove last change until we've got the + go ahead from HP to distribute /usr/lib/end.o. + * pa-ghpux.h, pa-hiux.h, pa-ghiux.h: Likewise. + + Sat Apr 9 15:06:22 1994 Christian Kranz (kranz@sent5.uni-duisburg.de) + + * config.sub: Add ns* as operating systems; default to ns2 for NeXT. + * configure (m68k-next-ns2*): New configuration. + * libgcc2.c: Include , not for NeXTStep 2.1. + * config/nextstep21.h, m68k/next21.h: New files. + + Sat Apr 9 10:56:06 1994 Randy Wright (rwright@convex.com) + + * combine.c (force_to_mode, case ROTATE): Don't assume + simplify_binary_operation always returns CONST_INT. + (simplify_shift_const, case IOR, PLUS): Likewise. + + Sat Apr 9 09:13:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * i386/sequent.h (STRUCT_VALUE{,_INCOMING,_REGNUM}): + Redefine for calling conventions of native cc. + + Sat Apr 9 08:25:43 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.h (FINAL_PRESCAN_INSN): Define. + * rs6000.c (rs6000_convert_preincs): New function. + + * i386.md (mulhi3): Use SImode for MULT RTL. + + * fold-const.c (fold): Avoid exponential work when simplifying + conditional expressions; don't recurse twice if ARG1 is constant. + + * function.c (unitialized_vars_warning, setjmp_args_warning): + Reword warning to be less ambiguous. + + * c-typeck.c (convert_arguments): Truncate and reextend + for PROMOTE_PROTOTYPES so we can give error on overflow. + + * reload1.c (reload_conflicts): Rewrite to clean up and fix + numerous bugs; move to later in file. + + * c-decl.c (duplicate_decls): Put new type in same obstack as + old ones, or permanent if old ones in different obstacks. + + Fri Apr 8 18:18:18 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold, case GT_EXPR): Simplify X < (1 << Y) + into X >> Y == 0. + + Fri Apr 8 11:23:51 1994 Ian Lance Taylor (ian@cygnus.com) + + Add support for -membedded-pic to MIPS backend, to create + genuinely position independent code without using a global offset + table. Requires GNU as and ld. + * mips.h (MASK_EMBEDDED_PIC): Define. + (TARGET_EMBEDDED_PIC): Define. + (TARGET_SWITCHES): Add embedded-pic and no-embedded-pic. + (ASM_SPEC): Pass -membedded-pic to assembler. + (ASM_OUTPUT_ADDR_DIFF_ELT): If TARGET_EMBEDDED_PIC output a + difference, rather than using .gpword. + (ASM_OUTPUT_CASE_LABEL): Define. + * mips.md (casesi, casesi_internal): New instructions, used only + for TARGET_EMBEDDED_PIC. + * mips.c (override_options): For TARGET_EMBEDDED_PIC warn + if -mabicalls or -G were used, and set flag_pic and + mips_section_threshold. + (print_operand): Handle 'S' by printing a label with a leading LS. + + Thu Apr 7 22:20:09 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * calls.c (emit_library_call_value): Move is_const set after ifdef. + + Wed Apr 6 21:34:17 1994 Pat Rankin (rankin@eql.caltech.edu) + + * expr.c (expand_builtin, case BUILT_IN_NEXT_ARG): Test whether + an argunment has been passed to __builtin_next_arg; warn if not. + + Wed Apr 6 17:28:44 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * toplev.c (lang_options): Add -f[no-]vtable-thunks (for C++). + + Wed Apr 6 15:35:42 1994 Jim Wilson (wilson@cygnus.com) + + * cccp.c (discard_comments): Replace comments with a single space. + + * Makefile.in (USER_H): Add $(srcdir)/ before every ginclude use. + + * calls.c (emit_library_call_value): New variable is_const. Clear + it for functions that return an aggregate in memory. + + * configure (header_files): Prepend $(srcdir)/ginclude/ to each + element before substituting into the Makefile. Delete ginclude/ + at each point where we set header_files. + + * c-decl.c (finish_decl): Correct typo in use of tree_int_cst_sgn. + + Wed Apr 6 07:39:47 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.md: Add define_split to simplify "(unsigned) x > 0xffffff". + + * toplev.c (lang_options): Group and alphabetize some options. + + Wed Apr 6 07:03:13 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * function.c (push_function_context): Use current_function_varargs. + (pop_function_context): Likewise. + (assign_parms): Respect current_function_varargs. + Save args_so_far in any case. + * expr.c (expand_builtin): Allow builtin_next_arg for varargs + functions as well. + * function.h (struct function): New field for current_function_varargs. + * integrate.c (function_cannot_inline_p): Use current_function_varargs. + * va-alpha.h, va-m88k.h, va-sparc.h (va_dcl): Add ... to + set current_function_varargs. + + * c-decl.c (warn_missing_declarations): New variable. + (c_decode_option): -Wmissing-declarations. + (start_function): Actually do the checking. + * toplev.c (lang_options): Add -Wmissing-declarations. + + * function.c (expand_function_start): Delay copying static chain. + + * calls.c (emit_library_call): Move the invocation of + prepare_call_address before the assignments of the function arguments. + (emit_library_call_value): Likewise. + + * i386.h (DEBUG_PRINT_REG): Fix printing of coprocessor regs in QImode. + + Wed Apr 6 06:42:50 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * mips-tfile.c (update_headers): Copy stStatic symbols from the old + local symbol table to the new local symbol table if they did not get + added via debugging psuedo ops. + + Wed Apr 6 06:36:05 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * stdarg.h, varargs.h (__va_rounded_size): Round to multiple + of sizeof (short) on sysV68. + + * m68k.c (output_function_prologue): pea/move: Fix typos. + asm_fprintf("add%.[wl] ...): Undo previous change. + + Tue Apr 5 20:05:10 1994 Doug Evans (dje@cygnus.com) + + * gcc.c (process_command): Add "include" prefix for [foo/]stageN. + + Tue Apr 5 01:22:08 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa-ghiux.h (LIB_SPEC): Link in /usr/lib/end.o + * pa-ghpux.h, pa-hiux.h, pa-hpux.h (LIB_SPEC): Likewise. + + Mon Apr 4 17:36:55 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * final.c (final_scan_insn): Pass new arg, block num, to + sdbout_end_block. + * sdbout.c (sdbout_begin_block): Don't output block for function + level scope unless MIPS_DEBUGGING_INFO is defined. + (sdbout_end_block): Likewise. Add new parameter n for the block + number. + + * calls.c (expand_call): If PCC_STATIC_STRUCT_RETURN defined, mark + function as addressable same time as we clear is_integrable. + + Mon Apr 4 17:11:17 1994 Jason Merrill (jason@deneb.cygnus.com) + + * Makefile.in (xsys-protos.h): Undefine __*_TYPE when + preprocessing fixtmp.c. + * fixincludes: Fix ptrdiff_t and wchar_t in system headers like we + do size_t. + * scan-types.sh: Use __WCHAR_TYPE__, __PTRDIFF_TYPE__, and + __SIZE_TYPE__. Still deduce size_t so that it can be used for + ssize_t if necessary. + * stddef.h (wchar_t): Always define as __WCHAR_TYPE__. + * cccp.c (special_symbol, case T_WCHAR_TYPE): Output "__wchar_t" + for C++. + + Sat Apr 2 08:14:02 1994 Michael Meissner (meissner@osf.org) + + * i386/osfrose.h (FUNCTION_PROLOGUE, FUNCTION_PROFILER): Correct + code for -fpic ELF case. + + Fri Apr 1 17:33:35 1994 Jason Merrill (jason@deneb.cygnus.com) + + * fixproto: Add strncpy, strpbrk, strrchr, strspn, strstr, strtok + and strxfrm to the required list for string.h. + + Fri Apr 1 01:05:53 1994 Jim Wilson (wilson@cygnus.com) + + * configure: Change math-68881.h to ginclude/math-68881.h. + (EXTRA_HEADERS): Use | not / in sed command. + * math-68881.h, math-3300.h: Move to ginclude directory. + + * libgcc2.c: Modify all uses of __attribute__ mode to use new + syntax. + + * Makefile.in (USER_H): Files in ginclude now. Add stdarg.h, + stddef.h, varargs.h. + (all.cross, rest.encap): Move LIBGCC after stmp-headers. Add + objc-runtime, and SYSCALLS.c.X. + (for-bootstrap): Delete. + (OBJC, OBJECTIVE-C): Delete objc-runtime. + (proto): Delete SYSCALLS.c.X. + (*.o): Delete gvarargs.h dependencies. + (stmp-int-hdrs): Delete gvarargs.h, gstdarg.h, gstddef.h deps, and + code to copy them. + + * bc-emit.c: Change to . + * enquire.c, libgcc2.c, sys-types.h: Change "gstddef.h" to . + * gcc.c: Change "gstdarg.h" to and "gvarargs.h" to + . + * objc/Object.m: Change "gstdarg.h" to . + * objc/runtime.h, scan-types.sh: Change "gstddef.h" to . + Change "gstdarg.h" to . + * objc/hash.h, objc/objc.h, objc/sarry.h: Delete use of IN_GCC to + control stddef.h/gstddef.h include. + * cccp.c (pcfinclude): Modify comment referring to gstddef.h. + * sparc/sparc.h (CPP_PREDEFINES): Update GCC_NEW_VARARGS comment. + * i386/x-next, m68k/x-next (libgcc2.a, stdarg.h): Delete rules. + * fixincludes: Modify comment referring to gvarargs.h. + * cp/Makefile.in: Modify comments that refer to gvarargs.h and + gstddef.h. + + * gstdarg.h, gstddef.h, gvarargs.h: Move to ginclude directory + and strip off initial `g'. + * va-*.h, proto.h: Move to ginclude directory. + + Thu Mar 31 19:49:17 1994 Jim Wilson (wilson@cygnus.com) + + * sparc.h (SPARC_STACK_ALIGN): Use ~7 not 0xfffffff8 for portability. + + * xcoffout.h (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Disable. + + * sol2.h: Delete ifdefed out section defining *_SECTION_ASM_OP + macros. + ({CTORS,DTORS}_SECTION_ASM_OP) Delete definitions. + * sysv4.h (INIT_SECTION_ASM_OP): Don't set the alloc flag. + ({CTORS,DTORS}_SECTION_ASM_OP): Set execinstr flag. + + * dbxout.c (dbxout_type): Re-enable debugging output for anonymous + structures. Change all three places that refer to xrefs to use + exactly the same condition. + + * c-typeck.c (pop_init_level): Correct typo in use of + tree_int_cst_sgn. + + * mips.c (mips_rtx_classify, md_register_operand, + fpsw_register_operand, cmp2_op, uns_cmp_op, fcmp_op): Delete. + (mips_const_double_ok, mips_fill_delay_slot, output_block_move, + print_operand, function_epilogue): Don't treat gas differently + than native assembler. + (equality_op, cmp_op): Delete use of classify_op. + (override_options): Delete uses of mips_rtx_classify. + (final_prescan_insn): Simplify based on other changes. + * mips.h (mips_rtx_classify, cmp2_op, fcmp_op, + fpsw_register_operand, md_register_operand, uns_cmp_op, + classify_op, additive_op, divmod_op, unsigned_op, CLASS_*_OP, + NOTICE_UPDATE_CC): Delete. + (RTX_COSTS): Use different numbers for R3000/R6000/R4000. + (REGISTER_MOVE_COST): Use cost of 2 within same register class, 4 + for FP to GR copy, 6 otherwise. + (ADJUST_COST): Give anti and output dependencies zero cost. + (PREDICATE_CODES): Delete obsolete functions from list. + * mips.md (addsi3_internal): Don't output subtract. + (subsi3_internal): Don't output add. + (smulsi3_highpart, umulsi3_highpart): Add missing third operand to + mips_move_1word call. + + Thu Mar 31 12:09:42 1994 Ian Lance Taylor (ian@cygnus.com) + + * longlong.h: Change RS/6000 macros to use PowerPC mnemonics when + using -mnew-mnemonics. + + Wed Mar 30 17:37:16 1994 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) + + * m68k/dpx2.h (NO_ASM_FMOVECR): Defined. + * m68k.c (standard_68881_constant_p): Return 0 if NO_ASM_FMOVECR + defined. + + * configure: Add case for rs6000-bull-bosx. + + Wed Mar 30 17:31:24 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.c (global_symbolic_reference_mentioned_p): New parameter F. + (print_operand_address): When generating pic baseregisters are + only allowed if offset is CONST_INT. For {SYMBOL,LABEL}_REF + a indexregister has to be used instead. (sb) is no longer + emitted for constant absolute addresses. + (output_move_double): Use CONSTANT_P instead of CONSTANT_ADDRESS_P. + * ns32k.h (FUNCTION_PROLOGUE): use __GLOBAL_OFFSET_TABLE_, + not _GLOBAL_OFFSET_TABLE_. + (LEGITIMATE_CONSTANT_P, LEGITIMATE_PIC_OPERAND_P): Use + LEGITIMATE_PIC_OPERAND_P, not LEGITIMATE_CONSTANT_P, + to set current_function_uses_pic_offset_table. + (INDIRECTABLE_1_ADDRESS_P): Baseregisters are not legal + for {LABEL,SYMBOL}_REFS when emitting pic. + (GO_IF_INDEXABLE_ADDRESS): INDIRECTABLE_1_ADDRESSes are indexable too. + * ns32k/netbsd.h, ns32k/xm-netbsd.h: New files. + * configure (ns32k-pc532-netbsd*): New case, to use new files. + + Wed Mar 30 16:39:24 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (reload): Fix typo in previous change. + + * gcc.c (process_command, case 'B'): If name is "stageN/", + add "include" to system include prefix. + + * bc-emit.c, calls.c, combine.c, emit-rtl.c, final.c, g++.c: + Include instead of "gstdarg.h"; similarly for varargs. + * genattrtab.c, mips-tfile.c, protoize.c, toplev.c, tree.c: Likewise. + + * fold-const.c (strip_compound_expr): New function. + (fold): Call it; avoid exponential work when simplifying + binary op over a COND_EXPR. + + * cse.c (cse_insn): Add missing definition of var TEM; clean up + shadowed uses. + + * sparc.c (sparc_type_code): Revise so it supports non-C types. + + Wed Mar 30 14:52:26 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * xm-alpha.h (string.h): Don't include when inhibit_libc is defined. + + Wed Mar 30 10:37:51 1994 Stan Coxs (coxs@dg-rtp.dg.com) + + * m88k.md (movdf): Do not consider extended registers when doing + define_split. + + Wed Mar 30 01:49:06 1994 Torbjorn Granlund (tege@cygnus.com) + + * config/m68k/m68k.c (output_move_double): Use `%.' where appropriate. + + Tue Mar 29 10:46:18 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (ASM_OUTPUT_LABEL): TARGET_GAS no longer needs trailing colons. + (ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_COMMON): Likewise. + + * pa.h (TARGET_PORTABLE_RUNTIME): Define. + (TARGET_SWITCHES): Add -mportable-runtime and -mno-portable-runtime. + (CUMULATIVE_ARGS): Now a "struct hppa_args" rathern than an int. + All references changed. + (INIT_CUMULATIVE_ARGS): Also initialize nargs_prototype. + (INIT_CUMULATIVE_INCOMING_ARGS): Define. + (FUNCTION_ARG_ADVANCE): Decrement nargs_prototype for each arg seen. + (FUNCTION_ARG): Handle TARGET_PORTABLE_RUNTIME. + (ASM_DECLARE_FUNCTION_NAME): Explicitly disallow argument relocations + for TARGET_PORTABLE_RUNTIME. + (ASM_OUTPUT_INT): Do not use a P% prefix for function references + if TARGET_PORTABLE_RUNTIME. + + * pa.md (high and lo_sum for function addresses): Provide alternate + definitions for TARGET_PORTABLE_RUNTIME. + + * pa.c (output_arg_descriptor): Explicitly disallow argument + relocations for TARGET_PORTABLE_RUNTIME. + + Tue Mar 29 07:45:44 1994 Chris Smith (csmith@convex.com) + + * convex.h (check_float_value): fix return type in extern. + + Mon Mar 28 18:36:56 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k/mot3300.h (ASM_IDENTIFY_GCC): Define to be non-null. + + Sun Mar 27 20:26:36 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-parse.in (attrib): Handle string args as expressions, + merging the two rules. `mode' attribute now takes a string arg. + Delete the rule for an identifier as arg. + * c-common.c (decl_attributes): `mode' attribute now takes string arg. + + Sun Mar 27 14:42:39 1994 Doug Evans (dje@cygnus.com) + + * c-parse.in (attrib): Back out last patch. + + Fri Mar 25 17:52:44 1994 Walter Misar (misar@rbg.informatik.th-darmstadt.de) + + * m68k.md (movsi): New strategy for moving small constants into dregs, + if it can't be done with moveq. + * m68k.h (CONST_COSTS): Reflect the change in m68k.md. + + Fri Mar 25 14:30:47 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (call): If (new) MOTOROLA_BSR defined, try to emit 'bsr'. + * m68k/mot3300.h (MOTOROLA_BSR): Defined. + + * m68k.c (output_function_prologue): Use link.w on 68040; + emit pea fp + movl sp,fp instead of linkw 0 for 68040. + + Fri Mar 25 14:21:06 1994 Jim Meyering (meyering@idefix.comco.com) + + * bc-emit.c (bc_emit_bytecode): Remove decl of unused variable NPUSHES. + (bc_emit_instruction): Remove decl of unused variable LITERAL. + * c-aux-info.c (gen_decl): Remove decl of unused variable. + * c-common.c (truthvalue_conversion): Remove decl of unused CODE. + * c-decl.c (push_parm_decl): Move decl of unused variable OLDDECL + into #if 0 block. + (finish_enum): Remove decls of unused variables I and TEMPORARY. + * c-parse.in (primary): Remove decl of unused variable CONTEXT. + * c-typeck.c (convert_arguments): Remove decls of unused variables. + * collect2.c (putenv): Remove decl of unused variable STR_LEN. + (main): Remove decls of unused variables LEN and CLEN. + * combine.c (try_combine): Remove decls of unused variables. + (subst): Remove decls of unused variables ORIG_CODE. + (simplify_if_then_else): Remove decl of unused variable C2. + (make_compound_operation): Remove decl of unused variable COUNT. + (known_cond): Remove decl of unused variable NEW. + (make_field_assignment): Remove decl of unused variable OURDEST. + (simplify_and_const_int): Remove decls of unused variables. + (simplify_shift_const): Remove decl of unused variable INNER. + * cse.c (cse_insn): Remove decl of unused variable TEM. + * dbxout.c (dbxout_symbol): Remove decls of unused variables. + * emit-rtl.c (reset_used_flags): Remove decl of unused variable. + (gen_sequence): Remove decl of unused variable NEWVEC. + * enquire.c (f_rep): Remove decl of unused variable F1. + * final.c (output_source_line): Remove decl of unused variable. + * fix-header.c (read_scan_file): Remove decl of unused variable RPTR. + (write_rbrac): Remove decl of unused variable PARTIAL. + (main): Likewise. + * g++.c (main): Remove decl of unused variable FN. + * genattr.c (main): Remove decl of unused variable MAX_ISSUE_TIME. + * genattrtab.c (expand_units): Remove decl of unused variable. + * genrecog.c (break_out_subroutines): Remove decl of unused variable. + * global.c (global_conflicts): Move decl of unused variable I into + #if 0 block. + * integrate.c (save_for_inline_nocopy): Remove decls of unused vars. + (expand_inline_function): Remove two block-scope decls of unused + variable COPY. + * jump.c (invert_jump): Remove decl of unused variable OLABEL. + * loop.c (init_loop): Remove decls of unused variables. + (loop_optimize): Remove decl of unused variable END. + (combine_movables): Remove decls of unused variables. + (check_final_value): Remove decl of unused variable TEM. + (check_dbra_loop): Remove decls of unused variables. + (maybe_eliminate_biv): Remove decls of unused variables SET and V. + * reload.c (find_reloads_address): Remove two block-scope decls of + unused variable OLDREF. + * rtl.c (read_rtx): Remove decl of unused variable STRINGBUFSIZE. + * scan.c (get_token): Remove decl of unused variable QUOTE. + (get_token): Remove unused label AGAIN. + * sched.c (clear_units): Remove decl of unused variable UNIT. + (actual_hazard_this_instance): Remove decl of unused variable I. + (actual_hazard): Remove two block-scope decls of unused variable BEST. + (sched_analyze_1): Remove decls of unused variables OFFSET and BIT. + (sched_analyze): Remove decl of unused variable DEST. + (sched_note_set): Remove decl of unused variable J. + (create_reg_dead_note): Remove decl of unused variable BACKLINK. + (new_sometimes_live): Remove decl of unused variable I. + (schedule_block): Remove decls of unused variables LAST_NOTE and REGNO. + (schedule_insns): Remove decls of unused variables I and INSNS. + * sdbout.c (sdbout_symbol): Remove decl of unused variable LETTER. + (sdbout_type): Remove decl of unused variable TEM. + * toplev.c (compile_file): Remove unused label. + * tree.c (stabilize_reference_1): Remove decl of unused variable. + * unroll.c (unroll_loop): Remove decl of unused variable V. + (precondition_loop_p): Remove decls of unused variables. + (final_giv_value): Remove decl of unused variable CODE. + + Fri Mar 25 13:40:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (DBX_REGISTER_NUMBER): Fix numerous bugs in handling + of FP registers and the SAR register. + + Fri Mar 25 12:46:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * i386.md (movhi, movqi): Properly recognize unsigned forms of -1 + for dec[bw] insns. + + * expr.c (expand_expr, case ADDR_EXPR): Return const0_rtx if + taking address of an ERROR_MARK; also do some minor cleanup. + + * calls.c (expand_call): Don't require both -W and -Winline to say + that call can't be inlined. + Warn if inlining is tried but fails. + + * cccp.c (for_lint): Variable renamed from `lint'. + + * expr.c (expand_expr, case ABS_EXPR): Compare with 0 of proper mode. + + * fold-const.c (fold, case *_DIV_EXPR): Correct result when + product of constants overflows. + + * alpha.c (output_prolog): Correctly compute floating-reg save + area offset. + + * stmt.c (init_stmt_for_function): Clear stack_block_stack. + + * reload1.c (reload): Fix error in last change; only check + against group reloads and check all reloads. + + Thu Mar 24 13:19:43 1994 Doug Evans (dje@cygnus.com) + + * toplev.c (v_pedwarn_with_decl): Don't cause compilation to fail + from pedantic errors in system header files. + + Thu Mar 24 03:01:05 1994 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) + + * config.sub: Add case for Bull dpx20. + + * config/m68k/dpx2.h (CPP_PREDEFINES): Fix typo. + + Wed Mar 23 17:29:56 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (reload): Fix error in last change; compute MODE before + it's used. + + * loop.c (get_condition): Exit if we don't recognize SET_SRC of + a SET that modifies OP0. + + * combine.c (simplify_rtx, case FLOAT_TRUNCATE): Simplify + case of (float_truncate (abs (float_extend X))). + + Wed Mar 23 17:20:54 1994 Jim Wilson (wilson@cygnus.com) + + * dbxout.c (dbxout_parms): For parameter living in psuedo-reg that + was optimized away, use declared type instead of passed type. + + * mips.c (mips_asm_file_start): Add comment on TARGET_GP_OPT code. + + * c-decl.c (init_decl_processing): Change builtin_next_arg type so + that it accepts any parameter instead of none. + * cp/decl.c (init_decl_processing): Likewise. + * expr.c (expand_builtin, BUILT_IN_NEXT_ARG case): Verify that + parameter is last named argument. + * gstdarg.h (va_start): Pass LASTARG as a parameter to + builtin_next_arg. + * va-h8300.h, va-i860.h, va-i960.h, va-mips.h, va-sparc.h + (va_start): Likewise. + * va-alpha.h (va_start): Add call to builtin_next_arg. + * va-clipper.h, va-m88k.h, va-pa.h, va-sparc.h (va_start): + Likewise. + + Tue Mar 22 18:57:54 1994 Jim Wilson (wilson@cygnus.com) + + * iris5.h (MIPS_DEFAULT_GVALUE): Define to zero. + * mips.c (pic_address_needs_scratch): New function. + (override_options): Set flag_pic when TARGET_ABICALLS. + * mips.h (GO_IF_LEGITIMATE_ADDRESS): Also pretend that we have REG + plus CONST_INT addresses by deleting an else. + (CONSTANT_ADDRESS_P): When pic, don't accept addresses which are + symbol_ref plus a large integer. + (LEGITIMATE_PIC_OPERAND_P): Likewise. + (LEGITIMIZE_ADDRESS): When pic, convert addresses which are + symbol_reg plus a large integer, to reg plus a large integer. + (ASM_OUTPUT_ADDR_DIFF_ELT): Use .gpword instead of subtracting + labels. + * mips.md (movsi): Add special handling for constants which are + illegal addresses when pic. + (tablejump_internal1, tablejump_internal2): Emit .cpadd when + TARGET_ABICALLS. Adjust length to include .cpadd. + + * mips.h (TRAMPOLINE_TEMPLATE): Add `move $25,$3' for when + TARGET_ABICALLS. Delete padding for 64 bit case. Adjust offsets. + (TRAMPOLINE_SIZE): Increase from 9 to 10 words for 32 bit case. + (INITIALIZE_TRAMPOLINE): Increase offsets by 4 bytes for 32 bit case. + + Tue Mar 22 15:46:42 1994 Michael Meissner (meissner@osf.org) + + * i386/osfrose.h (HANDLE_PRAGMA_WEAK): Define in terms of + TARGET_ELF. + (ASM_OUTPUT_DEF): Provide a definition. + + Mon Mar 21 15:56:58 1994 Per Bothner (bothner@cygnus.com) + + * fix-header.c: Make sstring buf extern (rather than "common"). + + Mon Mar 21 17:45:56 1994 Doug Evans (dje@cygnus.com) + + * configure: Accept and ignore --without-*. + + Mon Mar 21 17:05:25 1994 Jim Wilson (wilson@cygnus.com) + + * dbxout.c (source_label_number): New variable. + (dbxout_source_file): Use it. Output an Ltext label. + + * c-decl.c (duplicate_decls): When pedantic, warn when any static + declaraction follows a non-static. + + * sparc.md (seq, sne, sgt, slt, sge, sle): Add support + for !TARGET_HARD_QUAD. + + Mon Mar 21 16:59:02 1994 Mike Collison (collison@chianti.sw.stratus.com) + + * reload1.c (reload): More accurately compute nongroup needs. + (reloads_conflict): New function. + + Mon Mar 21 16:21:07 1994 Doug Evans (dje@cygnus.com) + + * libgcc2.c (__builtin_saveregs): Fix return type. + + Mon Mar 21 07:37:13 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (preserve_temp_slots): If argument is REG, see if it + is address of a temp slot we know about. + * expr.c (expand_expr, case ADDR_EXPR): Update temp slot address + if we put it in a register; mark result as pointer. + + * cse.c (FIXED_REGNO_P): Treate global regs as fixed. + (CHEAP_REGNO): Renamed from CHEAP_REG. + (CHEAP_REG): New macro; user var in hard reg is cheap. + (COST): Pass RTL to CHEAP_REG, not regno. + (rtx_cost, case REG): Likewise. + + Sun Mar 20 19:38:44 1994 Stephen L Moshier (moshier@world.std.com) + + * m68k/news.h (PRINT_OPERAND): Print float infinity + and NaN's as +/-99e999. + + Sun Mar 20 17:42:09 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * mips-tfile.c (update_headers): Align symbol table sections, + using ALIGN_SYMTABLE_OFFSET. Provide a default definition which + does no alignment. + * alpha.h (ALIGN_SYMTABLE_OFFSET): New macro. + + Sun Mar 20 06:38:41 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * emit_rtl.c (try_split): Rename third parameter as LAST. + Recursively call try_split for each new insn created. + + * combine.c (mark_used_regs_combine): Correct typo. + + Sun Mar 20 06:28:23 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * vax.h (CHECK_FLOAT_VALUE): Add missing continuation character. + * tree.c (build_real): Add `overflow' var; pass to CHECK_FLOAT_VALUE. + + Sat Mar 19 17:44:14 1994 Jim Wilson (wilson@cygnus.com) + + * expr.c (expand_expr, case ABS_EXPR): Fix typo in last change. + + Sat Mar 19 17:13:47 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * combine.c (newpat_used_regs): New variable. + (mark_used_regs_combine): New function. + (try_combine): Use them. + (reg_dead_at_p): Registers marked in newpat_used_regs must always be + considered to be live. + + Sat Mar 19 06:29:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (attrib): Use `identifier' instead of `IDENTIFIER' + since names that are (e.g.) typedef names are still OK. + + * m68k/next.h (GO_IF_INDEXABLE_BASE): Make compatible with m68k.h. + + * genoutput.c (output_epilogue, insn_names): Write correct names + for patterns before first named pattern. + + * nextstep.h (SELECT_SECTION): Fix typo (arg names) in last change. + + * c-decl.c (grokdeclarator): Use signed version of `sizetype' for + type of array index. + + Sat Mar 19 06:25:39 1994 Stephen L Moshier (moshier@world.std.com) + + * fold-const.c (const_binop): Avoid initialized aggregate + local variables, for antique compilers. + + Fri Mar 18 18:43:28 1994 Jim Wilson (wilson@cygnus.com) + + * i386/osfrose.h (SELECT_SECTION): Variables go in readonly data + only if the initializer is constant. + * i386/svr3gas.h, m88k/m88k.h, mips/mips.h, nexstep.h, + rs6000/rs6000.h, sparc/sparc.h, svr3.h, svr4.h, vax/vms.h + (SELECT_SECTION): Likewise. + * varasm.c (assemble_variable): Likewise. + + Fri Mar 18 17:54:12 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * rs6000.md (divmodsi4, udivsi3, divsi3, udivmodsi4): Add AIX + common-mode cases. + (mulh_call, mull_call, divss_call, divus_call, quoss_call, quous_call): + AIX common-mode call patterns. + (ashlsi3): More TARGET_POWERPC to ! TARGET_POWER changes. + (addsf3, subsf3, mulsf3, divsf3, etc.): Change TARGET_POWER + to ! TARGET_POWERPC. + (fix_truncdfsi2): Use POWER/2 and PowerPC FP convert instruction. + (fpcvtsi): New pattern. + (mulsidi3): Add AIX common-mode case, add imul attribute to POWER + pattern, add PowerPC pattern, flag input operands as commutative. + (smulsi3_highpart): Add AIX common-mode case. + (movsi matcher): Add mtjmpr attribute to ! TARGET_POWER case. + (movsf): Clean up load from memory or integer register test. + (movdi matcher): Add FP register support. + + * rs6000.c (common_mode_defined): New variable. + (output_prolog): Define external common-mode calls. + + * rs6000.h (HARD_REGNO_MODE_OK): Allow DImode in FP registers. + (CONDITIONAL_REGISTER_USAGE): Delete ppcas mention from comment. + (RTX_COSTS): Costs based upon processor_type enum. + + Fri Mar 18 17:53:35 1994 Torbjorn Granlund (tege@cygnus.com) + + * rs6000.md (smulsi3_highpart): New patterns. + (umulsi3_highpart_power): New pattern. + + Fri Mar 18 15:26:56 1994 Jim Wilson (wilson@cygnus.com) + + * sol2.h (SELECT_RTX_SECTION): Delete. + * sysv4.h (SELECT_RTX_SECTION): Add. + (ASM_SPEC): Pass -K to assembler when PIC. + + * cccp.c (before_system, last_before_system): New variables. + (main): Handle -isystem option. Insert -isystem directories in + search chain at first_system_include. + * gcc.c (include_prefix): New variable. + (process_command): Add path/include to include_prefix when see a + -Bpath option. + (do_spec_1, case 'I'): Pass include_prefix directories to cpp with + the -isystem option. + + * loop.c (scan_loop): New variable loop_depth. Increment and + decrement on LOOP_BEG and LOOP_END notes. Only use LOOP_VTOP note + if loop_depth is zero. + (strength_reduce): Likewise. + + * sparc/sparc.h (FIXUNS_TRUNCTFSI2_LIBCALL): Define. + * optabs.c (init_optabs): Use FIXUNS_TRUNCTFSI2_LIBCALL macro. + + Thu Mar 17 13:13:46 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * stor-layout.c (layout_type, case BOOLEAN_TYPE): + Set TREE_UNSIGNED unless TYPE_MIN_VALUE is negative. + + Thu Mar 17 18:36:34 1994 Jim Wilson (wilson@cygnus.com) + + * c-common.c (shorten_compare): When simplify compare against + zero, check for restype_ptr unsigned instead of primop0 unsigned. + + * calls.c (expand_call): Undo Feb 27 change. Set nregs to -1 for + normal case. + + Thu Mar 17 17:43:28 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixinc.svr4: Define BYTE_ORDER in as on + UnixWare 1.1. + + Thu Mar 17 06:02:24 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stor-layout.c (layout_type, case INTEGER_TYPE): Properly test for + nonnegative lower bound. + + Wed Mar 16 12:41:19 1994 Ian Lance Taylor (ian@cygnus.com) + + * tree.c (build_nt, build_parse_node): Don't declare last + parameter to be register, since it is used in VA_START, which + may take its address. + * genattrtab.c (attr_printf): Likewise. + + Wed Mar 16 12:00:40 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * pa.h (INITIALIZE_TRAMPOLINE): Do not mask off high + bits of address passed to icacheflush. + + * pa.h (WCHAR_TYPE): Use "unsigned int" by default. + (WCHAR_TYPE_SIZE): Change appropriately. + * pa-ghiux.h, pa-ghpux.h, pa-gux7.h, pa-hiux.h, pa-hpux.h, + pa-hpux7.h (WCHAR_TYPE): Delete definition. + (WCHAR_TYPE_SIZE): Likewise. + * pa-osf.h (WCHAR_TYPE): Override appropriately for OSF1. + (WCHAR_TYPE_SIZE): Likewise. + + * pa.md (DImode lo_sum): Add earlyclobber for alternative one. + + * pa.h (ASM_OUTPUT_ADDR_DIFF_ELT): Rewrite to match + ASM_OUTPUT_ADDR_VEC_ELT which is PIC-safe. + + Wed Mar 16 09:07:34 1994 Matthias Pfaller (leo@marco.de) + + * ns32k.c (global_symbolic_reference_mentioned_p): Recurse only + if GET_CODE (op) == CONST. + + * ns32k.h (FUNCTION_PROLOGUE): Load sb through r0 if TARGET_REGPARM + is false. + + Wed Mar 16 06:57:45 1994 Richard Kenner (kenner@vlsi1.ultra.nyu) + + * emit-rtl.c (gen_lowpart_common, gen_highpart, operand_subword): + Test input against RTX for FP, AP, and SP, not same register number. + + * expr.c (expand_expr): Update comments and fix formatting. + (expand_expr, case VAR_DECL, STRING_CST, CONSTRUCTOR): If + flag_force_addr, put address in register unless REG. + (expand_expr, case CONSTRUCTOR, CONVERT_EXPR): Make TARGET with + TMODE, if specified. + (expand_expr, case IN_EXPR): Clean up. Allow INDEX to be an + unsigned type. Always evaluate SET and INDEX in case of side effects. + (expand_expr, case CONVERT_EXPR): Use convert_modes to handle consts. + (expand_expr, case ABS_EXPR): Simplify processing of COMPLEX. + Compare with zero word-by-word if required. + (expand_expr, case ABS_EXPR, MIN_EXPR, COND_EXPR): Don't use TARGET + if not MODE. + (expand_expr, case TRUTH_*_EXPR): Modes of input and output must agree. + (expand_expr, case CONJ_EXPR): Remove redundant def of MODE. + + * stor-layout.c (layout_record): If the place where we were going + to put a field changed, lay it out again. + + Tue Mar 15 07:53:36 1994 Paul A Vixie (paul@vix.com) + + * Makefile.in (stmp-fixproto): Add missing "-" in front of "if". + (install-headers-tar, gcc.xtar): Use "-" in front of tar options. + + Mon Mar 14 16:28:16 1994 Paul Eggert (eggert@twinsun.com) + + * fixincludes: Insert newlines just before the end of 'sed' + command strings if the last 'sed' command is 'a' or 'i'; + BSDI 1.1 'sed' needs this. + + Mon Mar 14 15:46:29 1994 Ian Lance Taylor (ian@cygnus.com) + + * fixinc.svr4: Don't name variables in mmap prototype. + + Mon Mar 14 15:16:38 1994 Doug Evans (dje@cygnus.com) + + * objc/Makefile (*.o): Add explicit dependencies for Sun's VPATH. + + Mon Mar 14 05:11:42 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (assign_parms, expand_function_start): Properly + set MEM_IN_STRUCT_P for DECL_RTL of function result. + + * c-decl.c (grokdeclarator): Convert to sizetype when manipulating + size of array and use care to avoid mixed-type operations. + + * expr.c (expand_expr): Don't call bc_expand_expr + if EXPAND_INITIALIZER. + * bc-optab.c (bc_expand_{binary,unary}_operation): Add missing + args to call to expand_expr. + * stmt.c (bc_expand_start_cond): Set exit_label if not EXITFLAG. + (bc_expand_end_bindings): Only define exit_label if set. + Don't pop nesting_stack. + * varasm.c (output_constant_def): Do hashing and make label + even if bytecode. + * bc-emit.c (bc_seg_write): Don't make unaligned reference to + seg->data. + * toplev.c (compile_file): Call bc_write_file here and pass + asm_out_file, not stdout. + (main): Don't call bc_write_file here. + Fix wording on error if -fbytecode specified on unsupported target. + + * fold-const.c (fold, associate): If -ffast-math, associate FP mults. + (fold, case RDIV_EXPR): Split case; ignore division by 1. + If -ffast-math, convert to multply by reciprocal. + (fold, case *_DIV_EXPR): Simplify A/C1/C2. + + * tree.h (tree_int_cst_sgn): New declaration. + * tree.c (tree_int_cst_sgn): New function. + * c-decl.c (finish_{decl,struct,enum}): Call it. + * c-typeck.c (build_binary_op, pop_init_level): Likewise. + (output_pending_init_elements): Likewise. + * expr.c (expand_builtin, case BUILT_IN_RETURN_ADDRESS): Likewise. + * fold-const.c (fold): Likewise. + (fold, case *_DIV_EXPR): Add missing conversion. + * convert.c (convert_to_integer): Convert integer_one_node to + proper type before tree_int_cst_lt call. + + Sun Mar 13 06:46:13 1994 Wolfgang Stukenbrock (wgstuken@immd4.informatik.uni-erlangen.de) + + * gcc.c (do_spec_1): Don't duplicate a macro starting with '__'. + + Sun Mar 13 05:54:00 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * convert.c (convert_to_integer): When changing type of truthvalue + operation, change types of inputs too. + * c-common.c (TRUTH_*_EXPR): Convert to integer_type_node. + + * tree.c: Include setjmp.h. + (build_real_from_int_cst): Propagate overflow flags and + establish float handler. + (build_complex): Propagate overflow flags. + * cse.c (simplify_binary_operation): Protect real_value_truncate + inside handler. + * fold-const.c (force_fit_value): Operate on REAL_CST as well. + (real_value_truncate): Don't use its own handler. + (const_binop): Set overflow on FP error and call force_fit_type. + (fold_convert): Likewise. + * c-common.c (constant_expression_warning, overflow_warning): + Handle REAL_CST and COMPLEX_CST. + * convex.h, convex.c, fx80.h, tahoe.h, vax.h, vax.c: Add OVERFLOW + operand to CHECK_FLOAT_VALUE. + + * jump.c (rtx_equal_for_thread_p): Correct error in previous + change; add missing arg in recursive call. + + Sat Mar 12 19:42:03 1994 H.J. Lu (hjl@nynexst.com) + + * configure (gxx-include-dir): Replacement for gxx-prefix. + * Makefile.in (gxx_include_dir): Likewise, for gxx_prefix. + + * i386/linux.h (NO_IMPLICIT_EXTERN_C): Defined. + + Sat Mar 12 07:42:12 1994 Paul Eggert (eggert@twinsun.com) + + * Makefile.in (stmp-fixproto): Work around a `make' bug in BSDI 1.1. + + Sat Mar 12 07:38:08 1994 Klaus Kaempf (kkaempf@didymus.rmi.de) + + * bi-run.h: Properly test BYTES_BIG_ENDIAN. + * bytecode.h: Likewise for WORDS_BIG_ENDIAN. + + * cccp.c (do_include, hack-vms_include_specification): Change handling + of '#include filename' to be compatible with VAX-C. + + * genemit.c (gen_exp): Added \n to printf to shorten line for VAX-C. + + Sat Mar 12 06:42:38 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.h (emit_float_lib_cmp): Add declaration here. + * optabs.c: Don't define emit_float_lib_cmp now that no longer static. + + * jump.c: Add prototypes for static functions. + (jump_optimize, delete_insn): Use GET_RTX_CLASS to test for insns. + (mark_jump_label): Delete dead code. + (delete_computation, redirect_tablejump): No longer static. + + Fri Mar 11 14:40:40 1994 Jim Wilson (wilson@cygnus.com) + + * lite.h (TARGET_DEFAULT): Use parentheses. + * sparc.h (TARGET_HARD_QUAD): New macro. + (TARGET_SWITCHES): Add hard-quad-float, soft-quad-float. + (TARGET_DEFAULT): Use parentheses. + ({ADDTF3,SUBTF3,MULTF3,DIVTF3,SQRTTF2,FLOATSITF2,FIX_TRUNCTFSI2, + EXTENDSFTF2,TRUNCTFSF2,EXTENDDFTF2,TRUNCTFDF2,EQTF2,NETF2,GTTF2, + GETF2,LTTF2,LETF2}_LIBCALL): New macros. + * sparc.md (sleu+4, sleu+7, extendsftf2, extenddftf2, trunctfsf2, + trunctfdf2, floatsitf2, fix_trunctfsi2, addtf3, subtf3, multf3, + divtf3, sqrttf2): Disable when -msoft-quad-float. + (beq, bne, bgt, blt, bge, ble): When -msoft-quad-float, account + for return value of SPARC ABI routines that differs from libgcc. + * flow.c (libcall_dead_p): Fail not abort for libcall that returns + value via invisible pointer. + * optabs.c (emit_float_lib_cmp): Make non static. + (init_optabs): Use {ADDTF3,SUBTF3,MULTF3,DIVTF3,SQRTTF2,FLOATSITF2, + FIX_TRUNCTFSI2,EXTENDSFTF2,TRUNCTFSF2,EXTENDDFTF2,TRUNCTFDF2,EQTF2, + NETF2,GTTF2,GETF2,LTTF2,LETF2}_LIBCALL macros. + + * sparc/sparc.h (STARTING_FRAME_OFFSET): Depend on + LONG_DOUBLE_TYPE_SIZE. + + Fri Mar 11 08:01:54 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * rtl.h, tree.h, g++.c, gcc.c (PVPROTO): New macro. + * combine.c, expr.h, rtl.h, tree.h, gcc.c: Use it for varargs protos.. + * genattrtab.c, mips-tfile.c, output.h, toplev.c: Likewise. + + Fri Mar 11 07:21:36 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * emit-rtl.c (copy_rtx_if_shared, case LABEL_REF): Can't share. + * jump.c (jump_optimize): Delete REG_LABEL note if label no + longer in insn. + + * c-decl.c (finish_decl): When preserving an initializer, ensure + its type is on a good obstack. + + Thu Mar 10 15:32:42 1994 Mike Collison (collison@sw.stratus.com) + + * reload1.c (emit_reload_insns): When clearing reg_last_reload_reg, + clear all hard regs in reload_out. + + Thu Mar 10 15:23:10 1994 Hallvard B Furuseth (hbf@durin.uio.no) + + * collect2.c (dup2): Catch `dup' failure. Return correct value. + + Thu Mar 10 15:18:08 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * gcc.c ([__MSDOS__]): Use #ifdef, not #if. + * collect2.c ([__MSDOS__]): Likewise. + + Thu Mar 10 15:03:01 1994 Paul Eggert (eggert@twinsun.com) + + * cccp.c (main, finclude, check_precompiled): When safe_read + returns a partial buffer, this means EOF has been reached; + don't try to read any more. + + Wed Mar 9 18:47:29 1994 Paul Eggert (eggert@twinsun.com) + + * real.c (target_negative): -0 counts as negative. + + Wed Mar 9 15:32:01 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * m68k.md (movqi): Disable special-case of stack push if operand + one is an address register. + + * c-typeck.c (pointer_int_sum): Multiplication should be + done signed. + (pointer_diff): Likewise the division. + * fold-const.c (fold, case MULT_EXPR): Simplify MULT_EXPR of an + EXACT_DIV_EXPR with the same divisor as our multiplicand. + + * jump.c (rtx_equal_for_thread_p): Commutative operations + are identical if the operands match in the opposite order. + * sched.c (rtx_equal_for_memref_p): Likewise. + + Wed Mar 9 12:07:29 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) + + * cse.c (simplify_relational_operation): Fix typos; use + ARG_POINTER_REGNUM and FRAME_POINTER_REGNUM in condtionals. + + Tue Mar 8 16:12:07 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * explow.c (break_out_memory_refs): Don't call mark_reg_pointer + here. + (memory_address): Call it here if X changed and is now a REG + or REG + CONST_INT. + + Tue Mar 8 15:57:29 1994 Jim Wilson (wilson@cygnus.com) + + * c-decl.c (finish_decl): When saving/discarding initializers, + don't check TREE_PERMANENT and TREE_STATIC. + (finish_decl, finish_function): Pass new argument to + permanent_allocation. + * cp/decl.c (finish_function): Likewise. + * cp/decl2.c (write_vtable_entries, finish_file): Likewise. + * toplev.c (compile_file): Likewise. + * function.h (struct function): Add momentary_function_firstobj + field. + * tree.c (momentary_function_firstobj): New variable. + (init_obstack): Set it. + (save_tree_status): Save it and set it. + (restore_tree_status): Use it and restore it. + (permanent_allocation): New parameter function_end. Clear + momentary_obstack to momentary_function_firstobj if true. + (preserve_initializer): Set base field of every momentary + level on the momentary stack to new momentary_firstobj. + (pop_momentary): Only free back to previous base. + * tree.h (permanent_allocation): Add prototype. + + Mon Mar 7 20:10:56 1994 Jim Wilson (wilson@cygnus.com) + + * iris4gl.h: Rewrite. Include iris4loser.h not iris4-gdb.h. + Define PREFERRED_DEBUGGING_TYPE not ASM_SPEC. + + * bsd-4.h (LINK_SPEC): Do not depend on gas. Don't interpret -EB + and -EL options, but do pass them. + * bsd-5.h (LINK_SPEC): Likewise. + * decl-osf1.h (LINK_SPEC): Likewise. + * iris5.h (LINK_SPEC): Likewise. + * mips-5.h (LINK_SPEC): Likewise. + * mips.h (LINK_SPEC): Likewise. + * svr3-4.h (LINK_SPEC): Likewise. + * svr3-5.h (LINK_SPEC): Likewise. + * svr4-4.h (LINK_SPEC): Likewise. + * svr4-5.h (LINK_SPEC): Likewise. + + * dec-bsd.h (LINK_SPEC): Pass all normal linker options to gld. + (ASM_SPEC): Pass all normal assembler options to gas. + * osfrose.h (LINK_SPEC): Likewise. + (ASM_SPEC): Likewise. + + * mips.h (ASM_SPEC): Make definition depend on whether or + not the default assembler is gas. Pass all normal assembler + options to gas. + * iris4loser.h (ASM_SPEC): Likewise. Pass -O0 if the assembler is + not gas. + + * iris3.h (ASM_SPEC, LINK_SPEC): Delete. + * news4.h (ASM_SPEC, LINK_SPEC): Delete. + * news5.h (LINK_SPEC): Delete. + * nws3250v4.h (ASM_SPEC, LINK_SPEC): Delete. + * ultrix.h (ASM_SPEC, LINK_SPEC): Delete. + + * mips.h (ASM_FINAL_SPEC): Cross compiling does not presume gas. + + * osfrose.h (SIZE_TYPE): Delete. + (MAX_WCHAR_TYPE_SIZE): Define. + + * calls.c (expand_call): For pcc_struct_value case, set + MEM_IN_STRUCT_P correctly on target. + + * Makefile.in (mostlyclean): Don't explicitly delete ld. + + Mon Mar 7 20:06:38 1994 Ian Lance Taylor (ian@cygnus.com) + + * mips-tdump.c (print_symbol): The index field of a global symbol + is the symbol table index of the corresponding local symbol, not + an index into the aux table. + (print_file_desc): Print out size of line number information + rather than repeating line number count. The cbLineOffset field + of a PDR is relative to the cbLineOffset field of the FDR. Also, + when computing line_end of the last PDR, use cbLineOffset, not + ilineBase. + + Mon Mar 7 17:42:35 1994 H.J. Lu (hjl@nynexst.com) + + * Makefile.in (gxx_prefix): New; default to $(libdir). + (GPLUSPLUS_INCLUDE_DIR): Change to $(gxx_prefix)/g++-include. + * configure (gxx_prefix): New; default to $(libdir). + + * i386/linux.h (GPLUSPLUS_INCLUDE_DIR): Deleted. + (STARTFILE_SPEC): Remove "-nojump". + + Mon Mar 7 17:06:08 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * i386/xm-linux.h (malloc): Remove disabled code. + + Mon Mar 7 13:27:09 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cccp.c (no_record_file): New variable. + (main): Set it for -imacros and -include files. + (do_endif): Don't call record_control_macro for -include or -imacros + files or files included from -imacros. + + Sun Mar 6 21:48:51 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.sub: Accept freebsd as OS. + + Sun Mar 6 14:40:00 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stupid.c: Add prototypes for static functions. + (last_{jump,label}_suid): Deleted; all uses deleted. + (reg_crosses_blocks): Likewise. + (stupid_life_analysis): Only allocate MAX_SUID entries + of after_insn_hard_regs. + Use GET_RTX_CLASS when possible. + Initialize all of reg_renumber. + Use reg_alternate_class when reg not available in preferred class. + (stupid_find_reg): Delete argument CROSSES_BLOCKS. + + * stupid.c (stupid_mark_refs): If setting reg_where_dead, set + regs_live so we don't later clobber it. + + * recog.c (constrain_operands): Properly handle '#' in constraint. + + * combine.c (subst): Split into five functions. + (simplify_{rtx,if_then_else,set,logical}): New functions. + + Sun Mar 6 13:12:48 1994 James Van Artsdalen (james at bigtex.cactus.org) + + * reg-stack.c (find_blocks): Undo previous change to block + delineation algorithm. + (reg_to_stack): Make algorithm identical to that in find_blocks. + + Sat Mar 5 16:27:58 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * genattrtab.c (attr_printf): Remove `register' from decl of FMT. + * tree.c (build_nt, build_parse_node): Remove `register' from decl + of CODE. + + * reload.c (get_secondary_mem): Call SECONDARY_MEMORY_NEEDED_MODE + if it is defined. + * alpha.h (SECONDARY_MEMORY_NEEDED_MODE): New macro. + * alpha.c (output_{pro,epi}log): Round var size to quadword boundary. + + * alpha.md (unaligned_{load,store}hi): Clear low bit of + address before using as operand to extwl, mskwl, and inswl. + (movhi, reload_inhi, reload_outhi): Pass extra scratch value. + + Fri Mar 4 17:16:23 1994 Leonard Norrgard (vinsci@nic.funet.fi) + + * c-lex.c: Delete gperf-generated source from here. + * c-gperf.h: New file; contains just gperf output. + * Makefile.in (c-gperf.h): New rule. + (c-lex.o): Depends on c-gperf.h. + (realclean): Delete c-gperf.h. + (distdir): Build c-gperf.h. + (diff): Omit differences in c-gperf.h. + + Fri Mar 4 06:35:26 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * svr4.h, m88k.h (ASM_FINISH_DECLARE_OBJECT): Set + size_directive_output to 1. + + * reload1.c (emit_reload_insns): Don't call gen_input_reload if + src and dest are identical. + + Thu Mar 3 15:32:55 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.md (mskXl): Add missing NOT in patterns. + + * t-m88k: Remove added realclean rule. + + See ChangeLog.8 for earlier changes. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/INSTALL gcc-2.7.0/INSTALL *** gcc-2.6.3/INSTALL Thu Dec 1 15:24:17 1994 --- gcc-2.7.0/INSTALL Fri Jun 16 15:45:41 1995 *************** *** 52,55 **** --- 52,59 ---- Here is an example: + from an MSDOS console window or from the program manager dialog + box. Configure.bat assumes that you have already installed and in + your path a Unix-like sed program which is used to modify + Makefile.in to create a working Makefile. ./configure --build=sparc-sun-sunos4.1 *************** *** 77,81 **** See *Note Configurations::, for a list of supported configuration names and notes on many of the configurations. You should check ! the notes in that section before proceding any further with the installation of GNU CC. --- 81,85 ---- See *Note Configurations::, for a list of supported configuration names and notes on many of the configurations. You should check ! the notes in that section before proceeding any further with the installation of GNU CC. *************** *** 107,113 **** `i860-ANY-bsd', `m68k-bull-sysv', `m68k-hp-hpux', `m68k-sony-bsd', ! `m68k-altos-sysv', `m68000-hp-hpux', `m68000-att-sysv', and ! `mips-ANY'). On any other system, `--with-gnu-as' has no ! effect. On the systems listed above (except for the HP-PA, for ISC on --- 111,117 ---- `i860-ANY-bsd', `m68k-bull-sysv', `m68k-hp-hpux', `m68k-sony-bsd', ! `m68k-altos-sysv', `m68000-hp-hpux', `m68000-att-sysv', ! `ANY-lynx-lynxos', and `mips-ANY'). On any other system, ! `--with-gnu-as' has no effect. On the systems listed above (except for the HP-PA, for ISC on *************** *** 341,345 **** make stage2 ! make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" This is called making the stage 3 compiler. Aside from the `-B' --- 345,349 ---- make stage2 ! make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" This is called making the stage 3 compiler. Aside from the `-B' *************** *** 453,459 **** 1750a, a29k, alpha, arm, cN, clipper, dsp16xx, elxsi, h8300, ! hppa1.0, hppa1.1, i370, i386, i486, i860, i960, m68000, m68k, m88k, ! mips, ns32k, powerpc, pyramid, romp, rs6000, sh, sparc, sparclite, ! sparc64, vax, we32k. Here are the recognized company names. As you can see, customary --- 457,463 ---- 1750a, a29k, alpha, arm, cN, clipper, dsp16xx, elxsi, h8300, ! hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m68000, m68k, ! m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, powerpcle, ! pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, vax, we32k. Here are the recognized company names. As you can see, customary *************** *** 463,467 **** crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus, ! sequent, sgi, sony, sun, tti, unicom. The company name is meaningful only to disambiguate when the rest of --- 467,471 ---- crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus, ! sequent, sgi, sony, sun, tti, unicom, wrs. The company name is meaningful only to disambiguate when the rest of *************** *** 472,481 **** Here is a list of system types: ! 386bsd, aix, acis, amigados, aos, aout, bosx, bsd, clix, ctix, ! cxux, dgux, dynix, ebmon, elf, esix, freebsd, hms, genix, gnu, ! gnu/linux, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, ! msdos, mvs, netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, ! riscos, rtu, sco, solaris, sunos, sym, sysv, ultrix, unicos, ! uniplus, unos, vms, vxworks, xenix. You can omit the system type; then `configure' guesses the operating --- 476,486 ---- Here is a list of system types: ! 386bsd, aix, acis, amigados, aos, aout, bosx, bsd, clix, coff, ! ctix, cxux, dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, ! genix, gnu, gnu/linux, hiux, hpux, iris, irix, isc, luna, lynxos, ! mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf, osfrose, ! ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym, sysv, ! udi, ultrix, unicos, uniplus, unos, vms, vsta, vxworks, winnt, ! xenix. You can omit the system type; then `configure' guesses the operating *************** *** 505,510 **** hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin, miniframe, mmax, news-3600, news800, news, next, pbd, pc532, pmax, powerpc, ! ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3, sun4, symmetry, ! tower-32, tower. Remember that a machine name specifies both the cpu type and the company --- 510,515 ---- hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin, miniframe, mmax, news-3600, news800, news, next, pbd, pc532, pmax, powerpc, ! powerpcle, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3, ! sun4, symmetry, tower-32, tower. Remember that a machine name specifies both the cpu type and the company *************** *** 745,752 **** have a higher-quality port for this machine soon. ! `i386-*-gnu/linux' ! Bash-1.12 has a bug that causes configure to fail. The symptom is ! that the c++ subdirectory, `cp', is not configured. Bash-1.14 and ! later work fine. `i386-*-sco' --- 750,766 ---- have a higher-quality port for this machine soon. ! `i386-*-linuxoldld' ! Use this configuration to generate a.out binaries on Linux if you ! do not have gas/binutils version 2.5.2 or later installed. This is ! an obsolete configuration. ! ! `i386-*-linuxaout' ! Use this configuration to generate a.out binaries on Linux. This ! is an obsolete configuration. You must use gas/binutils version ! 2.5.2 or later. ! ! `i386-*-linux' ! Use this configuration to generate ELF binaries on Linux. You must ! use gas/binutils version 2.5.2 or later. `i386-*-sco' *************** *** 755,759 **** system. ! `i386-*-sco3.2.4' Use this configuration for SCO release 3.2 version 4. --- 769,773 ---- system. ! `i386-*-sco3.2v4' Use this configuration for SCO release 3.2 version 4. *************** *** 794,797 **** --- 808,855 ---- Sun systems. + `i[345]86-*-winnt3.5' + This version requires a GAS that has not let been released. Until + it is, you can get a prebuilt binary version via anonymous ftp from + `cs.washington.edu:pub/gnat' or `cs.nyu.edu:pub/gnat'. You must + also use the Microsoft header files from the Windows NT 3.5 SDK. + Find these on the CDROM in the `/mstools/h' directory dated + 9/4/94. You must use a fixed version of Microsoft linker made + especially for NT 3.5, which is also is available on the NT 3.5 + SDK CDROM. If you do not have this linker, can you also use the + linker from Visual C/C++ 1.0 or 2.0. + + Installing GNU CC for NT builds a wrapper linker, called `ld.exe', + which mimics the behaviour of Unix `ld' in the specification of + libraries (`-L' and `-l'). `ld.exe' looks for both Unix and + Microsoft named libraries. For example, if you specify `-lfoo', + `ld.exe' will look first for `libfoo.a' and then for `foo.lib'. + + You may install GNU CC for Windows NT in one of two ways, + depending on whether or not you have a Unix-like shell and various + Unix-like utilities. + + 1. If you do not have a Unix-like shell and few Unix-like + utilities, you will use a DOS style batch script called + `configure.bat'. Invoke it as `configure winnt' from an + MSDOS console window or from the program manager dialog box. + `configure.bat' assumes you have already installed and have + in your path a Unix-like `sed' program which is used to + create a working `Makefile' from `Makefile.in'. + + `Makefile' uses the Microsoft Nmake program maintenance + utility and the Visual C/C++ V8.00 compiler to build GNU CC. + You need only have the utilities `sed' and `touch' to use + this installation method, which only automatically builds the + compiler itself. You must then examine what `fixinc.winnt' + does, edit the header files by hand and build `libgcc.a' + manually. + + 2. The second type of installation assumes you are running a + Unix-like shell, have a complete suite of Unix-like utilities + in your path, and have a previous version of GNU CC already + installed, either through building it via the above + installation method or acquiring a pre-built binary. In this + case, use the `configure' script in the normal fashion. + `i860-intel-osf1' This is the Paragon. If you have version 1.0 of the operating *************** *** 801,804 **** --- 859,871 ---- Manual. + `*-lynx-lynxos' + LynxOS 2.2 and earlier comes with GNU CC 1.x already installed as + `/bin/gcc'. You should compile with this instead of `/bin/cc'. + You can tell GNU CC to use the GNU assembler and linker, by + specifying `--with-gnu-as --with-gnu-ld' when configuring. These + will produce COFF format object files and executables; otherwise + GNU CC will use the installed tools, which produce a.out format + executables. + `m68000-hp-bsd' HP 9000 series 200 running BSD. Note that the C compiler that *************** *** 996,999 **** --- 1063,1070 ---- Graphics. This is found on the 2nd CD in release 4.0.1. + In order to compile GCC on an SGI running IRIX 5, the + "compiler_dev.hdr" subsystem must be installed from the IDO CD-ROM + supplied by Silicon Graphics. + `make compare' may fail on version 5 of IRIX unless you add `-save-temps' to `CFLAGS'. On these systems, the name of the *************** *** 1033,1037 **** To enable debugging under Irix 5, you must use GNU as 2.5 or later, ! and use the -with-gnu-as configure option when configuring gcc. GNU as is distributed as part of the binutils package. --- 1104,1108 ---- To enable debugging under Irix 5, you must use GNU as 2.5 or later, ! and use the `--with-gnu-as' configure option when configuring gcc. GNU as is distributed as part of the binutils package. *************** *** 1102,1105 **** --- 1173,1194 ---- the LANG environment variable to "C" or "En_US". + `powerpc-*-elf' + `powerpc-*-sysv4' + PowerPC system in big endian mode, running System V.4. This + system is currently under development. + + `powerpc-*-eabi' + Embedded PowerPC system in big endian mode. This system is + currently under development. + + `powerpcle-*-elf' + `powerpcle-*-eabi' + PowerPC system in little endian mode, running System V.4. This + system is currently under development. + + `powerpcle-*-sysv4' + Embedded PowerPC system in little endian mode. This system is + currently under development. + `vax-dec-ultrix' Don't try compiling with Vax C (`vcc'). It produces incorrect code *************** *** 1347,1351 **** To compile `libgcc1.c' with the cross-compiler itself does not work. The functions in this file are supposed to implement arithmetic ! operations that GNU CC does not know how to open code, for your target machine. If these functions are compiled with GNU CC itself, they will compile into infinite recursion. --- 1436,1440 ---- To compile `libgcc1.c' with the cross-compiler itself does not work. The functions in this file are supposed to implement arithmetic ! operations that GNU CC does not know how to open code for your target machine. If these functions are compiled with GNU CC itself, they will compile into infinite recursion. *************** *** 1373,1376 **** --- 1462,1471 ---- That depends on whether someone wants to implement it. + Some embedded targets come with all the necessary `libgcc1.a' + routines written in C or assembler. These targets build `libgcc1.a' + automatically and you do not need to do anything special for them. + Other embedded targets do not need any `libgcc1.a' routines since all + the necessary operations are supported by the hardware. + If your target system has another C compiler, you can configure GNU CC as a native compiler on that machine, build just `libgcc1.a' with *************** *** 1460,1475 **** it needs that file, printing a suitable error message. If you do provide `libgcc1.a', then building the compiler will automatically ! compile and link a test program called `cross-test'; if you get errors ! in the linking, it means that not all of the necessary routines in ! `libgcc1.a' are available. ! ! If you are making a cross-compiler for an embedded system, and there ! is no `stdio.h' header for it, then the compilation of `enquire' will ! probably fail. The job of `enquire' is to run on the target machine ! and figure out by experiment the nature of its floating point ! representation. `enquire' records its findings in the header file ! `float.h'. If you can't produce this file by running `enquire' on the ! target machine, then you will need to come up with a suitable `float.h' ! in some other way (or else, avoid using it in your programs). Do not try to build stage 2 for a cross-compiler. It doesn't work to --- 1555,1570 ---- it needs that file, printing a suitable error message. If you do provide `libgcc1.a', then building the compiler will automatically ! compile and link a test program called `libgcc1-test'; if you get ! errors in the linking, it means that not all of the necessary routines ! in `libgcc1.a' are available. ! ! You must provide the header file `float.h'. One way to do this is ! to compile `enquire' and run it on your target machine. The job of ! `enquire' is to run on the target machine and figure out by experiment ! the nature of its floating point representation. `enquire' records its ! findings in the header file `float.h'. If you can't produce this file ! by running `enquire' on the target machine, then you will need to come ! up with a suitable `float.h' in some other way (or else, avoid using it ! in your programs). Do not try to build stage 2 for a cross-compiler. It doesn't work to diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/Makefile.in gcc-2.7.0/Makefile.in *** gcc-2.6.3/Makefile.in Mon Nov 28 18:54:06 1994 --- gcc-2.7.0/Makefile.in Thu Jun 15 07:01:43 1995 *************** *** 1,4 **** # Makefile for GNU C compiler. ! # Copyright (C) 1987, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,4 ---- # Makefile for GNU C compiler. ! # Copyright (C) 1987, 88, 90-94, 1995 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 16,24 **** #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. # The targets for external use include: # all, doc, proto, install, install-cross, install-cross-rest, ! # uninstall, TAGS, mostlyclean, clean, distclean, realclean, # stage1, stage2, stage3, stage4. --- 16,25 ---- #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, 59 Temple Place - Suite 330, ! #Boston MA 02111-1307, USA. # The targets for external use include: # all, doc, proto, install, install-cross, install-cross-rest, ! # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean, # stage1, stage2, stage3, stage4. *************** *** 70,74 **** INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) - SYMLINK = ln -s MAKEINFO = makeinfo TEXI2DVI = texi2dvi --- 71,74 ---- *************** *** 103,107 **** INSTALL_HEADERS_DIR = install-headers-tar ! # The GCC to use for compiling libgcc2.a, enquire, and cross-test. # Usually the one we just built. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). --- 103,107 ---- INSTALL_HEADERS_DIR = install-headers-tar ! # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test. # Usually the one we just built. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). *************** *** 118,121 **** --- 118,125 ---- ENQUIRE_LDFLAGS = $(LDFLAGS) + # Sed command to transform gcc to installed name. Overwritten by configure. + program_transform_name = -e s,x,x, + program_transform_cross_name = -e s,^,$(target)-, + # Tools to use when building a cross-compiler. # These are used because `configure' appends `cross-make' *************** *** 134,137 **** --- 138,144 ---- STMP_FIXPROTO = stmp-fixproto + # Test to see whether exists in the system header files. + LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ] + # There may be a premade insn-attrtab.c for this machine. # (You could rebuild it with genattrtab as usual, but it takes a long time.) *************** *** 144,147 **** --- 151,162 ---- xmake_file= ... `configure' substitutes actual x- file name here. tmake_file= ... `configure' substitutes actual t- file name here. + out_file= ... `configure' substitutes actual out file name here. + out_object_file= ... `configure' substitutes actual out object file name here. + md_file= ... `configure' substitutes actual md file name here. + tm_file= ... `configure' substitutes actual tm file name here. + build_xm_file= ... `configure' substitutes actual build xm- file name here. + host_xm_file= ... `configure' substitutes actual host xm- file name here. + lang_specs_files= ... `configure' substitutes actual lang spec file names here. + lang_options_files= ... `configure' puts actual lang options file names here. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c` mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c` *************** *** 176,179 **** --- 191,197 ---- # Extension (if any) to put in installed man-page filename. manext = .1 + objext = .o + exeext = + # Directory in which to put man pages. mandir = $(prefix)/man/man1 *************** *** 226,231 **** ENQUIRE = enquire ! # Cross-test target (must also be overridable for a target) ! CROSS_TEST = cross-test # List of extra executables that should be compiled for this target machine --- 244,249 ---- ENQUIRE = enquire ! # libgcc1-test target (must also be overridable for a target) ! LIBGCC1_TEST = libgcc1-test # List of extra executables that should be compiled for this target machine *************** *** 319,322 **** --- 337,346 ---- HOST_OBSTACK=$(OBSTACK) + # Actual name to use when installing a native compiler. + GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t` + + # Actual name to use when installing a cross-compiler. + GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t` + # Choose the real default target. ALL=all.internal *************** *** 331,334 **** --- 355,361 ---- FIXPROTO_DEFINES = + # Extra flags to use when compiling crt{begin,end}.o. + CRTSTUFF_T_CFLAGS = + # End of variables for you to override. *************** *** 434,437 **** --- 461,466 ---- "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \ "SHELL=$(SHELL)" \ + "exeext=$(exeext)" \ + "objext=$(objext)" \ "exec_prefix=$(exec_prefix)" \ "prefix=$(prefix)" \ *************** *** 444,448 **** # A list of all the language-specific executables. # This is overridden by configure. ! COMPILERS = cc1 cc1obj # Language-specific object files for C. --- 473,477 ---- # A list of all the language-specific executables. # This is overridden by configure. ! COMPILERS = cc1$(exeext) cc1obj$(exeext) # Language-specific object files for C. *************** *** 457,460 **** --- 486,492 ---- BC_OBJS = bc-emit.o bc-optab.o + # Bytecode header files constructed at build time; vmsconfig.com wants this. + BC_ALL = bc-arity.h bc-opcode.h bc-opname.h + # Language-independent object files. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ *************** *** 466,470 **** insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \ ! insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS) # GEN files are listed separately, so they can be built before doing parallel --- 498,502 ---- insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \ ! insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS) # GEN files are listed separately, so they can be built before doing parallel *************** *** 473,478 **** GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep # Files to be copied away after each stage in building. ! STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ insn-attr.h insn-attrtab.c insn-opinit.c \ --- 505,514 ---- GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep + CCCP=cccp + # Uncomment this line if you want to use cppmain (w/cpplib) as cpp. + #CCCP=cppmain + # Files to be copied away after each stage in building. ! STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ insn-attr.h insn-attrtab.c insn-opinit.c \ *************** *** 480,495 **** stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \ stamp-attr stamp-attrtab stamp-opinit stamp-proto \ ! genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \ ! genattrtab genattr genopinit \ ! bc-arity.h bc-opcode.h bc-opname.h \ stamp-bcarity stamp-bcopcode stamp-bcopname \ ! bi-arity bi-opcode bi-opname \ ! $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \ ! cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2) \ $(LANG_STAGESTUFF) # Members of libgcc1.a. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ ! _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \ _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \ _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \ --- 516,537 ---- stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \ stamp-attr stamp-attrtab stamp-opinit stamp-proto \ ! genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \ ! genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \ ! genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \ ! $(BC_ALL) \ stamp-bcarity stamp-bcopcode stamp-bcopname \ ! bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \ ! $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ ! $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \ ! protoize$(exeext) unprotoize$(exeext) \ ! specs collect2$(exeext) $(USE_COLLECT2) underscore.c \ ! *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \ ! *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \ ! *.[si] \ $(LANG_STAGESTUFF) # Members of libgcc1.a. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ ! _lshrsi3 _ashrsi3 _ashlsi3 \ _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \ _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \ *************** *** 500,504 **** # Library members defined in libgcc2.c. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ ! _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _ffsdi2 \ _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ --- 542,546 ---- # Library members defined in libgcc2.c. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ ! _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \ _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ *************** *** 518,521 **** --- 560,564 ---- $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \ $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \ + $(srcdir)/ginclude/iso646.h \ $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) *************** *** 526,530 **** # That may or may not be what one wants to do. # If it is, rm *.o is an easy way to do it. ! # CONFIG_H = config.h tm.h CONFIG_H = RTL_H = rtl.h rtl.def machmode.h machmode.def --- 569,573 ---- # That may or may not be what one wants to do. # If it is, rm *.o is an easy way to do it. ! # CONFIG_H = $(host_xm_file) $(tm_file) CONFIG_H = RTL_H = rtl.h rtl.def machmode.h machmode.def *************** *** 540,544 **** # install-normal, install-common, install-info, install-man, # uninstall, distdir, ! # mostlyclean, clean, distclean, extraclean, realclean, # stage1, stage2, stage3, stage4 # --- 583,587 ---- # install-normal, install-common, install-info, install-man, # uninstall, distdir, ! # mostlyclean, clean, distclean, extraclean, maintainer-clean, # stage1, stage2, stage3, stage4 # *************** *** 560,564 **** $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \ $(LANG_MAKEFILES) ! $(SHELL) config.status all.internal: start.encap rest.encap --- 603,609 ---- $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \ $(LANG_MAKEFILES) ! cp config.status config.run ! $(SHELL) config.run ! rm -f config.run all.internal: start.encap rest.encap *************** *** 567,571 **** # although we can't run it on this machine. all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \ ! $(CROSS_TEST) $(ENQUIRE) $(EXTRA_PARTS) lang.all.cross # This is what to compile if making gcc with a cross-compiler. all.build: native xgcc $(EXTRA_PARTS) lang.all.build --- 612,616 ---- # although we can't run it on this machine. all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \ ! $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross # This is what to compile if making gcc with a cross-compiler. all.build: native xgcc $(EXTRA_PARTS) lang.all.build *************** *** 584,587 **** --- 629,635 ---- PROTO: proto + # Tell GNU make these are phony targets. + .PHONY: C c OBJC objc OBJECTIVE-C objective-c PROTO proto + # Really, really stupid make features, such as SUN's KEEP_STATE, may force # a target to build even if it is up-to-date. So we must verify that *************** *** 599,608 **** rest.cross: $(LIBGCC) gfloat.h specs ! # Verify that it works to compile and link cross-test. # If it does, then there are sufficient replacements for libgcc1.a. ! cross-test: cross-test.o native gcc-cross $(LIBGCC) $(GCC_PARTS) ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o cross-test ! cross-test.o: cross-test.c native gcc-cross ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c # Recompile all the language-independent object files. --- 647,658 ---- rest.cross: $(LIBGCC) gfloat.h specs ! # Verify that it works to compile and link libgcc1-test. # If it does, then there are sufficient replacements for libgcc1.a. ! libgcc1-test: libgcc1-test.o native $(GCC_PARTS) ! @echo "Testing libgcc1. Ignore linker warning messages." ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \ ! -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name` ! libgcc1-test.o: libgcc1-test.c native xgcc ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c # Recompile all the language-independent object files. *************** *** 619,627 **** # and CC is `gcc'. It is renamed to `gcc' when it is installed. xgcc: gcc.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgcc gcc.o version.o $(LIBS) # Dump a specs file to make -B./ read these specs over installed ones. ! specs: xgcc ! $(GCC_FOR_TARGET) -dumpspecs > specs # We do want to create an executable named `xgcc', so we can use it to --- 669,678 ---- # and CC is `gcc'. It is renamed to `gcc' when it is installed. xgcc: gcc.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o $(LIBS) # Dump a specs file to make -B./ read these specs over installed ones. ! specs: xgcc$(exeext) ! $(GCC_FOR_TARGET) -dumpspecs > tmp-specs ! mv tmp-specs specs # We do want to create an executable named `xgcc', so we can use it to *************** *** 629,639 **** # Also create gcc-cross, so that install-common will install properly. gcc-cross: xgcc ! cp xgcc gcc-cross cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS) cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS) # Copy float.h from its source. --- 680,690 ---- # Also create gcc-cross, so that install-common will install properly. gcc-cross: xgcc ! cp xgcc$(exeext) gcc-cross$(exeext) cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS) cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS) # Copy float.h from its source. *************** *** 648,660 **** # Create a dummy float.h source for a cross-compiler. float.h-cross: ! echo "#error float.h values not known for cross-compiler" > float.h-cross # Used to compile enquire with standard cc, but have forgotten why. # Let's try with GCC. enquire: enquire.o $(GCC_PARTS) ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o enquire enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs - # -if [ "$(srcdir)" != "." ]; then rm -f ./enquire.c; else true; fi - # -cp $(srcdir)/enquire.c . > /dev/null 2>&1 # Breaking this line caused a problem with one version of GNU make. $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c --- 699,710 ---- # Create a dummy float.h source for a cross-compiler. float.h-cross: ! echo "#error float.h values not known for cross-compiler" > t-float.h-cross ! mv t-float.h-cross float.h-cross # Used to compile enquire with standard cc, but have forgotten why. # Let's try with GCC. enquire: enquire.o $(GCC_PARTS) ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@ enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs # Breaking this line caused a problem with one version of GNU make. $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c *************** *** 662,670 **** # Build the version of limits.h that we will install. xlimits.h: glimits.h limitx.h limity.h ! if [ -f $(SYSTEM_HEADER_DIR)/limits.h ] ; then \ ! cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > xlimits.h; \ else \ ! cat $(srcdir)/glimits.h > xlimits.h; \ fi # Build libgcc.a. --- 712,721 ---- # Build the version of limits.h that we will install. xlimits.h: glimits.h limitx.h limity.h ! if $(LIMITS_H_TEST) ; then \ ! cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \ else \ ! cat $(srcdir)/glimits.h > tmp-xlimits.h; \ fi + mv tmp-xlimits.h xlimits.h # Build libgcc.a. *************** *** 684,689 **** echo "__foo () {}" > dummy.c $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c ! $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o ! rm -f dummy.o dummy.c # This is $(LIBGCC1) for a cross-compiler. --- 735,740 ---- echo "__foo () {}" > dummy.c $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c ! $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext) ! rm -f dummy$(objext) dummy.c # This is $(LIBGCC1) for a cross-compiler. *************** *** 711,720 **** do \ echo $${name}; \ ! rm -f $${name}.o; \ $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! mv libgcc1.o $${name}.o; \ ! $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \ ! rm -f $${name}.o; \ done # Some shells crash when a loop has no items. --- 762,771 ---- do \ echo $${name}; \ ! rm -f $${name}$(objext); \ $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! mv libgcc1$(objext) $${name}$(objext); \ ! $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \ ! rm -f $${name}$(objext); \ done # Some shells crash when a loop has no items. *************** *** 734,743 **** $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! rm -f $${name}.[so]; \ else true; \ fi; \ done mv tmplibgcc1.a libgcc1.a --- 785,795 ---- $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! rm -f $${name}.s $${name}$(objext); \ else true; \ fi; \ done + -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi mv tmplibgcc1.a libgcc1.a *************** *** 761,771 **** $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! mv libgcc1.o $${name}.o; \ ! $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}.o; \ ! rm -f $${name}.o; \ done -rm -f libgcc1.S mv tmplibgcc1.a libgcc1-asm.a # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled. # But recompiling cc1 should not force recompilation of libgcc2.a. --- 813,840 ---- $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! mv libgcc1$(objext) $${name}$(objext); \ ! $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \ ! rm -f $${name}$(objext); \ done -rm -f libgcc1.S mv tmplibgcc1.a libgcc1-asm.a + # Generate assembly versions of the functions required for libgcc1. + # You'll still need to massage the code by hand (possibly hacking + # underscores and local labels) but this will get you started. + libgcc1.S: libgcc1.c $(CONFIG_H) config.status + -rm -f libgcc1.S + touch libgcc1.S + for name in $(LIB1FUNCS); \ + do \ + echo $${name}; \ + $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \ + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + echo '#ifdef ' L$${name} >> libgcc1.S; \ + cat libgcc1.s >> libgcc1.S; \ + echo '#endif /*' L$${name} '*/' >> libgcc1.S; \ + echo "" >> libgcc1.S; \ + done + # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled. # But recompiling cc1 should not force recompilation of libgcc2.a. *************** *** 793,800 **** echo $${name}; \ $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \ ! $(srcdir)/libgcc2.c -o $${name}.o; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \ ! rm -f $${name}.o; \ done # Some shells crash when a loop has no items. --- 862,869 ---- echo $${name}; \ $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \ ! $(srcdir)/libgcc2.c -o $${name}$(objext); \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \ ! rm -f $${name}$(objext); \ done # Some shells crash when a loop has no items. *************** *** 808,811 **** --- 877,881 ---- if [ x$${file} != x.. ]; then \ name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \ + oname=` echo $${name} | sed -e 's,.*/,,'`; \ echo $${name}; \ if [ $${name}.asm = $${file} ]; then \ *************** *** 814,819 **** $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \ ! rm -f $${name}.[so]; \ else true; \ fi; \ --- 884,889 ---- $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \ ! rm -f $${name}.s $${oname}$(objext); \ else true; \ fi; \ *************** *** 823,827 **** # because ranlibing libgcc.a itself should suffice. # -if [ x${HPUX_GAS} = x ] ; then \ ! # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \ # else true; fi --- 893,897 ---- # because ranlibing libgcc.a itself should suffice. # -if [ x${HPUX_GAS} = x ] ; then \ ! # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \ # else true; fi *************** *** 840,844 **** -(cd tmpcopy; chmod +w * > /dev/null 2>&1) (cd tmpcopy; $(AR) x ../$(LIBGCC2)) ! (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o) rm -rf tmpcopy -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi --- 910,914 ---- -(cd tmpcopy; chmod +w * > /dev/null 2>&1) (cd tmpcopy; $(AR) x ../$(LIBGCC2)) ! (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext)) rm -rf tmpcopy -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi *************** *** 850,854 **** # driver program needs to select the library directory based on the # switches. ! multilib.h: $(srcdir)/genmultilib config.status $(SHELL) $(srcdir)/genmultilib "$(MULTILIB_OPTIONS)" \ "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h --- 920,924 ---- # driver program needs to select the library directory based on the # switches. ! multilib.h: $(srcdir)/genmultilib Makefile $(SHELL) $(srcdir)/genmultilib "$(MULTILIB_OPTIONS)" \ "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h *************** *** 861,865 **** flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ --- 931,935 ---- flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ *************** *** 867,870 **** --- 937,941 ---- LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \ dir="$${dir}" stmp-multilib-sub; \ + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ done touch stmp-multilib *************** *** 874,878 **** rm -f $(dir)/libgcc.a $(LIBGCC2) $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2) --- 945,949 ---- rm -f $(dir)/libgcc.a $(LIBGCC2) $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2) *************** *** 885,889 **** else \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \ --- 956,960 ---- else \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ! AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \ *************** *** 931,942 **** # linked using GCC on system V, for the sake of C++ constructors. crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \ ! -finhibit-size-directive -fno-inline-functions \ ! -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \ ! -finhibit-size-directive -fno-inline-functions \ ! -g0 -c $(srcdir)/crtstuff.c -o crtend.o # Compiling object files from source files. --- 1002,1015 ---- # linked using GCC on system V, for the sake of C++ constructors. crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \ ! -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \ ! -g0 -c $(srcdir)/crtstuff.c ! mv crtstuff$(objext) $@ crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h ! $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \ ! -DCRT_END -finhibit-size-directive -fno-inline-functions \ ! -g0 -c $(srcdir)/crtstuff.c ! mv crtstuff$(objext) $@ # Compiling object files from source files. *************** *** 950,956 **** $(srcdir)/c-parse.h c-tree.h input.h flags.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c ! $(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c ! $(srcdir)/c-parse.y: $(srcdir)/c-parse.in sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ -e "/^ifc$$/d" -e "/^end ifc$$/d" \ --- 1023,1030 ---- $(srcdir)/c-parse.h c-tree.h input.h flags.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c ! $(srcdir)/c-parse.h: $(srcdir)/c-parse.c ! $(srcdir)/c-parse.c: $(srcdir)/c-parse.y cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c ! $(srcdir)/c-parse.y: c-parse.in sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ -e "/^ifc$$/d" -e "/^end ifc$$/d" \ *************** *** 958,991 **** $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y ! $(srcdir)/c-gperf.h: $(srcdir)/c-parse.gperf gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \ $(srcdir)/c-parse.gperf >tmp-gperf.h $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h ! c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h ! c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H) c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \ ! input.h flags.h $(srcdir)/c-gperf.h c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h ! c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h # To make a configuration always use collect2, set USE_COLLECT2 to ld. ld: collect2 ! rm -f ld ! ln collect2 ld ! collect2 : collect2.o version.o $(LIBDEPS) # Don't try modifying collect2 (aka ld) in place--it might be linking this. ! -rm -f collect2 ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS) ! collect2.o : collect2.c $(CONFIG_H) gstab.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DTARGET_MACHINE=\"$(target)\" \ -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'` # Objective C language specific files. --- 1032,1081 ---- $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y ! $(srcdir)/c-gperf.h: c-parse.gperf gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \ $(srcdir)/c-parse.gperf >tmp-gperf.h $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h ! c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h ! c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H) c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \ ! input.h flags.h $(srcdir)/c-gperf.h c-pragma.h c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h ! c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) c-pragma.h c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h # To make a configuration always use collect2, set USE_COLLECT2 to ld. ld: collect2 ! rm -f ld$(exeext) ! ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \ ! || cp collect2$(exeext) ld$(exeext) ! collect2 : collect2.o cplus-dem.o underscore.o version.o $(LIBDEPS) # Don't try modifying collect2 (aka ld) in place--it might be linking this. ! -rm -f collect2$(exeext) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o \ ! cplus-dem.o underscore.o version.o $(LIBS) ! collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DTARGET_MACHINE=\"$(target)\" $(MAYBE_USE_COLLECT2) \ -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'` + cplus-dem.o: cplus-dem.c demangle.h + + underscore.c: $(GCC_PASSES) + echo "int xxy_us_dummy;" >tmp-dum.c + $(GCC_FOR_TARGET) -S tmp-dum.c + echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c + if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ + echo "int prepends_underscore = 1;" >>tmp-under.c; \ + else \ + echo "int prepends_underscore = 0;" >>tmp-under.c; \ + fi + $(srcdir)/move-if-change tmp-under.c underscore.c + -rm -f tmp-dum.c tmp-dum.s + # Objective C language specific files. *************** *** 1010,1014 **** # Language-independent files. ! gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ --- 1100,1104 ---- # Language-independent files. ! gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ *************** *** 1029,1036 **** tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H) ! stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h ! toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \ ! insn-attr.h xcoffout.h defaults.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \ --- 1119,1127 ---- tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H) ! stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h ! toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \ ! flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \ ! $(lang_options_files) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \ *************** *** 1042,1048 **** rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H) - toplev.o: bytecode.h bc-emit.h varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \ ! defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ --- 1133,1139 ---- rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H) varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \ ! defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \ ! output.h bytecode.h c-pragma.h function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ *************** *** 1124,1141 **** regs.h hard-reg-set.h flags.h insn-config.h ! aux-output.o : aux-output.c $(CONFIG_H) \ $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \ insn-flags.h output.h insn-attr.h insn-codes.h ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! $(MAYBE_TARGET_DEFAULT) aux-output.c # Build auxiliary files that support ecoff format. mips-tfile: mips-tfile.o version.o $(LIBDEPS) ! $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tfile mips-tfile.o version.o $(LIBS) mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) mips-tdump: mips-tdump.o version.o $(LIBDEPS) ! $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tdump mips-tdump.o version.o $(LIBS) mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) --- 1215,1231 ---- regs.h hard-reg-set.h flags.h insn-config.h ! $(out_object_file): $(out_file) $(CONFIG_H) \ $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \ insn-flags.h output.h insn-attr.h insn-codes.h ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file) # Build auxiliary files that support ecoff format. mips-tfile: mips-tfile.o version.o $(LIBDEPS) ! $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS) mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) mips-tdump: mips-tdump.o version.o $(LIBDEPS) ! $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS) mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) *************** *** 1179,1196 **** insn-config.h: stamp-config ; @true ! stamp-config : md genconfig $(srcdir)/move-if-change ! ./genconfig md > tmp-config.h $(srcdir)/move-if-change tmp-config.h insn-config.h touch stamp-config insn-flags.h: stamp-flags ; @true ! stamp-flags : md genflags $(srcdir)/move-if-change ! ./genflags md > tmp-flags.h $(srcdir)/move-if-change tmp-flags.h insn-flags.h touch stamp-flags insn-codes.h: stamp-codes ; @true ! stamp-codes : md gencodes $(srcdir)/move-if-change ! ./gencodes md > tmp-codes.h $(srcdir)/move-if-change tmp-codes.h insn-codes.h touch stamp-codes --- 1269,1286 ---- insn-config.h: stamp-config ; @true ! stamp-config : $(md_file) genconfig $(srcdir)/move-if-change ! ./genconfig $(md_file) > tmp-config.h $(srcdir)/move-if-change tmp-config.h insn-config.h touch stamp-config insn-flags.h: stamp-flags ; @true ! stamp-flags : $(md_file) genflags $(srcdir)/move-if-change ! ./genflags $(md_file) > tmp-flags.h $(srcdir)/move-if-change tmp-flags.h insn-flags.h touch stamp-flags insn-codes.h: stamp-codes ; @true ! stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change ! ./gencodes $(md_file) > tmp-codes.h $(srcdir)/move-if-change tmp-codes.h insn-codes.h touch stamp-codes *************** *** 1201,1206 **** insn-emit.c: stamp-emit ; @true ! stamp-emit : md genemit $(srcdir)/move-if-change ! ./genemit md > tmp-emit.c $(srcdir)/move-if-change tmp-emit.c insn-emit.c touch stamp-emit --- 1291,1296 ---- insn-emit.c: stamp-emit ; @true ! stamp-emit : $(md_file) genemit $(srcdir)/move-if-change ! ./genemit $(md_file) > tmp-emit.c $(srcdir)/move-if-change tmp-emit.c insn-emit.c touch stamp-emit *************** *** 1211,1216 **** insn-recog.c: stamp-recog ; @true ! stamp-recog : md genrecog $(srcdir)/move-if-change ! ./genrecog md > tmp-recog.c $(srcdir)/move-if-change tmp-recog.c insn-recog.c touch stamp-recog --- 1301,1306 ---- insn-recog.c: stamp-recog ; @true ! stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change ! ./genrecog $(md_file) > tmp-recog.c $(srcdir)/move-if-change tmp-recog.c insn-recog.c touch stamp-recog *************** *** 1221,1226 **** insn-opinit.c: stamp-opinit ; @true ! stamp-opinit : md genopinit $(srcdir)/move-if-change ! ./genopinit md > tmp-opinit.c $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c touch stamp-opinit --- 1311,1316 ---- insn-opinit.c: stamp-opinit ; @true ! stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change ! ./genopinit $(md_file) > tmp-opinit.c $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c touch stamp-opinit *************** *** 1230,1235 **** insn-extract.c: stamp-extract ; @true ! stamp-extract : md genextract $(srcdir)/move-if-change ! ./genextract md > tmp-extract.c $(srcdir)/move-if-change tmp-extract.c insn-extract.c touch stamp-extract --- 1320,1325 ---- insn-extract.c: stamp-extract ; @true ! stamp-extract : $(md_file) genextract $(srcdir)/move-if-change ! ./genextract $(md_file) > tmp-extract.c $(srcdir)/move-if-change tmp-extract.c insn-extract.c touch stamp-extract *************** *** 1239,1244 **** insn-peep.c: stamp-peep ; @true ! stamp-peep : md genpeep $(srcdir)/move-if-change ! ./genpeep md > tmp-peep.c $(srcdir)/move-if-change tmp-peep.c insn-peep.c touch stamp-peep --- 1329,1334 ---- insn-peep.c: stamp-peep ; @true ! stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change ! ./genpeep $(md_file) > tmp-peep.c $(srcdir)/move-if-change tmp-peep.c insn-peep.c touch stamp-peep *************** *** 1249,1265 **** insn-attr.h: stamp-attr ; @true ! stamp-attr : md genattr $(srcdir)/move-if-change ! ./genattr md > tmp-attr.h $(srcdir)/move-if-change tmp-attr.h insn-attr.h touch stamp-attr insn-attrtab.c: stamp-attrtab ; @true ! stamp-attrtab : md genattrtab $(srcdir)/move-if-change ! if cmp -s $(PREMADE_ATTRTAB_MD) md; \ then \ echo Using $(PREMADE_ATTRTAB); \ cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \ else \ ! ./genattrtab md > tmp-attrtab.c; \ fi $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c --- 1339,1355 ---- insn-attr.h: stamp-attr ; @true ! stamp-attr : $(md_file) genattr $(srcdir)/move-if-change ! ./genattr $(md_file) > tmp-attr.h $(srcdir)/move-if-change tmp-attr.h insn-attr.h touch stamp-attr insn-attrtab.c: stamp-attrtab ; @true ! stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change ! if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \ then \ echo Using $(PREMADE_ATTRTAB); \ cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \ else \ ! ./genattrtab $(md_file) > tmp-attrtab.c; \ fi $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c *************** *** 1272,1277 **** insn-output.c: stamp-output ; @true ! stamp-output : md genoutput $(srcdir)/move-if-change ! ./genoutput md > tmp-output.c $(srcdir)/move-if-change tmp-output.c insn-output.c touch stamp-output --- 1362,1367 ---- insn-output.c: stamp-output ; @true ! stamp-output : $(md_file) genoutput $(srcdir)/move-if-change ! ./genoutput $(md_file) > tmp-output.c $(srcdir)/move-if-change tmp-output.c insn-output.c touch stamp-output *************** *** 1290,1370 **** $(MD_FILE): $(MD_DEPS) rm -f $@ ! $(MD_CPP) $(MD_CPPFLAGS) md.pre-cpp | sed 's/^# /; /g' > $@ genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \ genconfig.o $(HOST_RTL) $(HOST_LIBS) ! genconfig.o : genconfig.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \ genflags.o $(HOST_RTL) $(HOST_LIBS) ! genflags.o : genflags.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \ gencodes.o $(HOST_RTL) $(HOST_LIBS) ! gencodes.o : gencodes.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \ genemit.o $(HOST_RTL) $(HOST_LIBS) ! genemit.o : genemit.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genopinit \ genopinit.o $(HOST_RTL) $(HOST_LIBS) ! genopinit.o : genopinit.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \ genrecog.o $(HOST_RTL) $(HOST_LIBS) ! genrecog.o : genrecog.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \ genextract.o $(HOST_RTL) $(HOST_LIBS) ! genextract.o : genextract.c $(RTL_H) hconfig.h insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \ genpeep.o $(HOST_RTL) $(HOST_LIBS) ! genpeep.o : genpeep.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \ genattr.o $(HOST_RTL) $(HOST_LIBS) ! genattr.o : genattr.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \ genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS) ! genattrtab.o : genattrtab.c $(RTL_H) hconfig.h insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \ genoutput.o $(HOST_RTL) $(HOST_LIBS) ! genoutput.o : genoutput.c $(RTL_H) hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c --- 1380,1461 ---- $(MD_FILE): $(MD_DEPS) rm -f $@ ! $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@ ! mv tmp-$@ $@ genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genconfig.o $(HOST_RTL) $(HOST_LIBS) ! genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genflags.o $(HOST_RTL) $(HOST_LIBS) ! genflags.o : genflags.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ gencodes.o $(HOST_RTL) $(HOST_LIBS) ! gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genemit.o $(HOST_RTL) $(HOST_LIBS) ! genemit.o : genemit.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genopinit.o $(HOST_RTL) $(HOST_LIBS) ! genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genrecog.o $(HOST_RTL) $(HOST_LIBS) ! genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genextract.o $(HOST_RTL) $(HOST_LIBS) ! genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genpeep.o $(HOST_RTL) $(HOST_LIBS) ! genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genattr.o $(HOST_RTL) $(HOST_LIBS) ! genattr.o : genattr.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS) ! genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ genoutput.o $(HOST_RTL) $(HOST_LIBS) ! genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c *************** *** 1409,1461 **** # Remake bytecode files. - # BI_ALL=bi-run.o - BI_ALL= - BC_ALL=bc-opname.h bc-opcode.h bc-arity.h BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o - bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \ ! bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \ ! bc-opcode.h bc-typecd.h bc-typecd.def ! - bytecode: $(BI_ALL) $(BC_ALL) - bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \ bi-arity.o $(BI_OBJ) $(HOST_LIBS) bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \ bi-opcode.o $(BI_OBJ) $(HOST_LIBS) bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \ bi-opname.o $(BI_OBJ) $(HOST_LIBS) ! bi-run.o: $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \ ! bc-opname.h bc-arity.h bc-opcode.h ! $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c ! $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c ! bi-parser.o: $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-parser.c ! bi-lexer.o: $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-lexer.c ! bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-arity.c ! bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-opcode.c ! bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-opname.c ! bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-reverse.c - bc-arity.h: stamp-bcarity ; @true stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change --- 1500,1543 ---- # Remake bytecode files. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \ ! bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \ ! bc-opcode.h bc-typecd.h bc-typecd.def bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ bi-arity.o $(BI_OBJ) $(HOST_LIBS) bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ bi-opcode.o $(BI_OBJ) $(HOST_LIBS) bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ bi-opname.o $(BI_OBJ) $(HOST_LIBS) ! $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c ! $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c ! ! bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-parser.c ! bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-lexer.c ! bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-arity.c ! bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-opcode.c ! bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-opname.c ! bi-reverse.o: bi-reverse.c bi-defs.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-reverse.c bc-arity.h: stamp-bcarity ; @true stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change *************** *** 1482,1486 **** -rm -f bi-arity bi-opcode bi-opname bi-lexer ! bytecode.realclean: bytecode.clean -rm -f bi-parser.c bi-parser.h --- 1564,1568 ---- -rm -f bi-arity bi-opcode bi-opname bi-lexer ! bytecode.maintainer-clean: bytecode.clean -rm -f bi-parser.c bi-parser.h *************** *** 1489,1501 **** # Making the preprocessor ! cpp: cccp ! -rm -f cpp ! ln cccp cpp cccp: cccp.o cexp.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS) cexp.o: $(srcdir)/cexp.c $(CONFIG_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c $(srcdir)/cexp.c: $(srcdir)/cexp.y cd $(srcdir); $(BISON) -o cexp.c cexp.y cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status # The reason we use $(libdir)/g++-include rather than using libsubdir --- 1571,1586 ---- # Making the preprocessor ! cpp: $(CCCP) ! -rm -f cpp$(exeext) ! ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \ ! || cp $(CCCP)$(exeext) cpp$(exeext) cccp: cccp.o cexp.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \ ! version.o $(LIBS) cexp.o: $(srcdir)/cexp.c $(CONFIG_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c $(srcdir)/cexp.c: $(srcdir)/cexp.y cd $(srcdir); $(BISON) -o cexp.c cexp.y + cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status # The reason we use $(libdir)/g++-include rather than using libsubdir *************** *** 1509,1512 **** --- 1594,1617 ---- -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'` + cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \ + version.o $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \ + cppalloc.o cpperror.o cppexp.o version.o $(LIBS) + + cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ + -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \ + -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ + -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ + -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \ + -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'` + + cpperror.o: cpperror.c $(CONFIG_H) cpplib.h + + cppexp.o: cppexp.c $(CONFIG_H) cpplib.h + + cpphash.o: cpphash.c cpplib.h cpphash.h + # Note for the stamp targets, we run the program `true' instead of # having an empty command (nothing following the semicolon). *************** *** 1515,1529 **** protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o protoize protoize.o: stamp-proto ; @true unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) \ ! -o unprotoize unprotoize.o: stamp-proto ; @true ! stamp-proto: $(srcdir)/protoize.c getopt.h $(CONFIG_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ --- 1620,1633 ---- protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ ! protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) protoize.o: stamp-proto ; @true unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ ! unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) unprotoize.o: stamp-proto ; @true ! stamp-proto: protoize.c getopt.h $(CONFIG_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ *************** *** 1534,1538 **** -DSTD_PROTO_DIR=\"$(libsubdir)\" \ -DUNPROTOIZE $(srcdir)/protoize.c ! mv protoize.o unprotoize.o $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ --- 1638,1642 ---- -DSTD_PROTO_DIR=\"$(libsubdir)\" \ -DUNPROTOIZE $(srcdir)/protoize.c ! mv protoize$(objext) unprotoize$(objext) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ *************** *** 1545,1555 **** touch stamp-proto ! getopt.o: $(srcdir)/getopt.c getopt.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c ! getopt1.o: $(srcdir)/getopt1.c getopt.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c # This info describes the target machine, so compile with GCC just built. ! SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) stmp-int-hdrs -rm -f SYSCALLS.c tmp-SYSCALLS.s cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c --- 1649,1660 ---- touch stamp-proto ! getopt.o: getopt.c getopt.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c ! getopt1.o: getopt1.c getopt.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c # This info describes the target machine, so compile with GCC just built. ! SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \ ! stmp-int-hdrs -rm -f SYSCALLS.c tmp-SYSCALLS.s cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c *************** *** 1582,1586 **** @echo Expect zero differences. diff $(srcdir)/protoize.c tmp-proto.c | cat ! -rm -f tmp-proto.[cso] # Build the include directory. The stamp files are stmp-* rather than --- 1687,1691 ---- @echo Expect zero differences. diff $(srcdir)/protoize.c tmp-proto.c | cat ! -rm -f tmp-proto.[cs] tmp-proto$(objext) # Build the include directory. The stamp files are stmp-* rather than *************** *** 1620,1624 **** # Build fixed copies of system files. ! stmp-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h rm -rf include mkdir include --- 1725,1729 ---- # Build fixed copies of system files. ! stmp-fixinc: $(FIXINCLUDES) gsyslimits.h rm -rf include mkdir include *************** *** 1663,1691 **** mv tmp-deduced.h deduced.h ! gen-protos: gen-protos.o scan.o $(HOST_LIBDEPS) ! ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \ ! gen-protos.o scan.o $(HOST_LIBS) ! gen-protos.o: gen-protos.c scan.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c ! scan.o: scan.c scan.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile ! cat deduced.h $(srcdir)/sys-protos.h > fixtmp.c ! $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE_ -U__WCHAR_TYPE__ -E \ | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \ ! | ./gen-protos >xsys-protos.h rm -rf fixtmp.c ! fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fix-header \ ! fix-header.o scan-decls.o scan.o $(HOST_LIBS) ! fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c ! scan-decls.o: scan-decls.c scan.h hconfig.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c --- 1768,1800 ---- mv tmp-deduced.h deduced.h ! gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS) ! ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ ! gen-protos.o scan.o cppalloc.o $(HOST_LIBS) ! gen-protos.o: gen-protos.c scan.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c ! scan.o: scan.c scan.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile ! cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c ! mv tmp-fixtmp.c fixtmp.c ! $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \ | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \ ! | ./gen-protos >xsys-protos.hT ! mv xsys-protos.hT xsys-protos.h rm -rf fixtmp.c ! fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \ ! cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o ! $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \ ! scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \ ! cppexp.o $(HOST_LIBS) ! fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c ! scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c *************** *** 1710,1716 **** else \ : This line works around a 'make' bug in BSDI 1.1.; \ ! CPP="$(GCC_FOR_TARGET) -E"; export CPP; \ ! FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ ! $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ touch include/fixed; \ fi --- 1819,1824 ---- else \ : This line works around a 'make' bug in BSDI 1.1.; \ ! FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ ! $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ touch include/fixed; \ fi *************** *** 1746,1750 **** # Deletion of files made during compilation. # There are four levels of this: ! # `mostlyclean', `clean', `distclean' and `realclean'. # `mostlyclean' is useful while working on a particular type of machine. # It deletes most, but not all, of the files made by compilation. --- 1854,1858 ---- # Deletion of files made during compilation. # There are four levels of this: ! # `mostlyclean', `clean', `distclean' and `maintainer-clean'. # `mostlyclean' is useful while working on a particular type of machine. # It deletes most, but not all, of the files made by compilation. *************** *** 1752,1757 **** # `clean' deletes everything made by running `make all'. # `distclean' also deletes the files made by config. ! # `realclean' also deletes everything that could be regenerated automatically. ! # We remove as much from the language subdirectories as we can # (less duplicated code). --- 1860,1865 ---- # `clean' deletes everything made by running `make all'. # `distclean' also deletes the files made by config. ! # `maintainer-clean' also deletes everything that could be regenerated ! # automatically. We remove as much from the language subdirectories as we can # (less duplicated code). *************** *** 1776,1779 **** --- 1884,1889 ---- -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h + -rm -f tmp-specs t-float.h-cross tmp-xlimits.h + -rm -f tmp-fixtmp.c xsys-protos.hT # Delete the stamp files. -rm -f stamp-* tmp-* *************** *** 1806,1810 **** # Using unprotoize.c is not quite right in the first place, # but what better way is there? ! -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready -rm -f libgcc1.null $(LIB2FUNCS_EXTRA) -rm -f *.dvi --- 1916,1920 ---- # Using unprotoize.c is not quite right in the first place, # but what better way is there? ! -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready -rm -f libgcc1.null $(LIB2FUNCS_EXTRA) -rm -f *.dvi *************** *** 1827,1837 **** # while building and installing GCC. distclean: clean bytecode.distclean lang.distclean ! -rm -f tm.h aux-output.c config.h config.status tconfig.h hconfig.h ! -rm -f md md.pre-cpp ! -rm -f Makefile *.oaux -rm -fr stage1 stage2 stage3 stage4 -rm -f */stage1 */stage2 */stage3 */stage4 */include -rm -f objc-parse.output -rm -f c-parse.output # Delete anything likely to be found in the source directory --- 1937,1948 ---- # while building and installing GCC. distclean: clean bytecode.distclean lang.distclean ! -rm -f tm.h config.h tconfig.h hconfig.h md ! -rm -f config.status config.run ! -rm -f Makefile specs.h options.h *.oaux -rm -fr stage1 stage2 stage3 stage4 -rm -f */stage1 */stage2 */stage3 */stage4 */include -rm -f objc-parse.output -rm -f c-parse.output + -rm -f *.asm # Delete anything likely to be found in the source directory *************** *** 1842,1846 **** -rm -f config/*/=* config/*/"#"* config/*/*~* -rm -f config/*/*.orig config/*/*.rej ! -rm -f *.dvi *.oaux *.d *.[zZ] *.gz -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs -rm -f *lose config/*lose config/*/*lose --- 1953,1957 ---- -rm -f config/*/=* config/*/"#"* config/*/*~* -rm -f config/*/*.orig config/*/*.rej ! -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs -rm -f *lose config/*lose config/*/*lose *************** *** 1854,1858 **** # Get rid of every file that's generated from some other file. # Most of these files ARE PRESENT in the GCC distribution. ! realclean: distclean bytecode.realclean lang.realclean -rm -f c-parse.y c-gperf.h objc-parse.y -rm -f objc-parse.c objc-parse.output --- 1965,1969 ---- # Get rid of every file that's generated from some other file. # Most of these files ARE PRESENT in the GCC distribution. ! maintainer-clean: distclean bytecode.maintainer-clean lang.maintainer-clean -rm -f c-parse.y c-gperf.h objc-parse.y -rm -f objc-parse.c objc-parse.output *************** *** 1871,1876 **** # Copy the compiler files into directories where they will be run. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ ! install-man install-info lang.install-normal # Do nothing while making gcc with a cross-compiler. The person who --- 1982,1989 ---- # Copy the compiler files into directories where they will be run. + # Install the driver last so that the window when things are + # broken is small. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ ! install-libobjc install-man install-info lang.install-normal install-driver # Do nothing while making gcc with a cross-compiler. The person who *************** *** 1897,1921 **** # Create the installation directory. install-dir: ! -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi ! -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi # This dir isn't currently searched by cpp. ! # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi ! -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi ! -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi ! -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi ! -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi ! -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi ! -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ! -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ! -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi # We don't use mkdir -p to create the parents of mandir, # because some systems don't support it. # Instead, we use this technique to create the immediate parent of mandir. -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \ ! if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ! -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi # Install the compiler executables built during cross compilation. ! install-common: native install-dir xgcc $(EXTRA_PARTS) lang.install-common for file in $(COMPILERS); do \ if [ -f $$file ] ; then \ --- 2010,2034 ---- # Create the installation directory. install-dir: ! -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi ! -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi # This dir isn't currently searched by cpp. ! # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi ! -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi ! -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi ! -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi ! -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi ! -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi ! -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi ! -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi ! -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi # We don't use mkdir -p to create the parents of mandir, # because some systems don't support it. # Instead, we use this technique to create the immediate parent of mandir. -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \ ! if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi ! -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi # Install the compiler executables built during cross compilation. ! install-common: native install-dir $(EXTRA_PARTS) lang.install-common for file in $(COMPILERS); do \ if [ -f $$file ] ; then \ *************** *** 1942,1974 **** $(INSTALL_DATA) specs $(libsubdir)/specs; \ fi - # Install the driver program as $(target)-gcc - # and also as either gcc (if native) or $(tooldir)/bin/gcc. - -if [ -f gcc-cross ] ; then \ - rm -f $(bindir)/$(target)-gcc; \ - $(INSTALL_PROGRAM) gcc-cross $(bindir)/$(target)-gcc; \ - if [ -d $(tooldir)/bin/. ] ; then \ - rm -f $(tooldir)/bin/gcc; \ - $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \ - else true; fi; \ - else \ - rm -f $(bindir)/gcc; \ - $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \ - rm -f $(bindir)/$(target)-gcc-1; \ - ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \ - mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \ - fi # Install protoize if it was compiled. ! -if [ -f protoize ]; \ then \ ! rm -f $(bindir)/protoize; \ ! $(INSTALL_PROGRAM) protoize $(bindir)/protoize; \ ! rm -f $(bindir)/unprotoize; \ ! $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize; \ rm -f $(libsubdir)/SYSCALLS.c.X; \ $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ chmod a-x $(libsubdir)/SYSCALLS.c.X; \ fi ! -rm -f $(libsubdir)/cpp ! $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp # Install the info files. --- 2055,2091 ---- $(INSTALL_DATA) specs $(libsubdir)/specs; \ fi # Install protoize if it was compiled. ! -if [ -f protoize$(exeext) ]; \ then \ ! rm -f $(bindir)/protoize$(exeext); \ ! $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \ ! rm -f $(bindir)/unprotoize$(exeext); \ ! $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \ rm -f $(libsubdir)/SYSCALLS.c.X; \ $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ chmod a-x $(libsubdir)/SYSCALLS.c.X; \ fi ! -rm -f $(libsubdir)/cpp$(exeext) ! $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext) ! ! # Install the driver program as $(target)-gcc ! # and also as either gcc (if native) or $(tooldir)/bin/gcc. ! install-driver: xgcc ! -if [ -f gcc-cross$(exeext) ] ; then \ ! rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ ! $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ ! if [ -d $(tooldir)/bin/. ] ; then \ ! rm -f $(tooldir)/bin/gcc$(exeext); \ ! $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \ ! else true; fi; \ ! else \ ! rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ ! $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ ! rm -f $(bindir)/$(target)-gcc-1$(exeext); \ ! ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \ ! > /dev/null 2>&1 \ ! || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \ ! mv $(bindir)/$(target)-gcc-1$(exeext) $(bindir)/$(target)-gcc$(exeext); \ ! fi # Install the info files. *************** *** 1981,1987 **** # Install the man pages. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man ! -rm -f $(mandir)/gcc$(manext) ! -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext) ! -chmod a-x $(mandir)/gcc$(manext) -rm -f $(mandir)/cccp$(manext) -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext) --- 2098,2110 ---- # Install the man pages. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man ! -if [ -f gcc-cross ] ; then \ ! rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \ ! $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \ ! chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \ ! else \ ! rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \ ! $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \ ! chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \ ! fi -rm -f $(mandir)/cccp$(manext) -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext) *************** *** 2011,2015 **** # Install the objc run time library. ! install-libobjc: libobjc.a install-dir -if [ -f libobjc.a ] ; then \ rm -f $(libsubdir)/libobjc.a; \ --- 2134,2138 ---- # Install the objc run time library. ! install-libobjc: install-dir -if [ -f libobjc.a ] ; then \ rm -f $(libsubdir)/libobjc.a; \ *************** *** 2079,2093 **** # Use this target to install the program `collect2' under the name `ld'. install-collect2: collect2 install-dir ! $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld # Install the driver program as $(libsubdir)/gcc for collect2. ! $(INSTALL_PROGRAM) xgcc $(libsubdir)/gcc # Cancel installation by deleting the installed files. uninstall: lang.uninstall -rm -rf $(libsubdir) ! -rm -rf $(bindir)/gcc ! -rm -rf $(bindir)/protoize ! -rm -rf $(bindir)/unprotoize ! -rm -rf $(mandir)/gcc$(manext) -rm -rf $(mandir)/cccp$(manext) -rm -rf $(mandir)/protoize$(manext) --- 2202,2218 ---- # Use this target to install the program `collect2' under the name `ld'. install-collect2: collect2 install-dir ! $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext) # Install the driver program as $(libsubdir)/gcc for collect2. ! $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) # Cancel installation by deleting the installed files. uninstall: lang.uninstall -rm -rf $(libsubdir) ! -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext) ! -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext) ! -rm -rf $(bindir)/protoize$(exeext) ! -rm -rf $(bindir)/unprotoize$(exeext) ! -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext) ! -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext) -rm -rf $(mandir)/cccp$(manext) -rm -rf $(mandir)/protoize$(manext) *************** *** 2123,2128 **** # This target exists to do the initial work before the language specific # stuff gets done. ! distdir-start: doc $(srcdir)/INSTALL c-parse.y $(srcdir)/c-gperf.h objc-parse.y \ ! c-parse.c objc-parse.c cexp.c @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \ then true; \ --- 2248,2254 ---- # This target exists to do the initial work before the language specific # stuff gets done. ! distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \ ! $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \ ! $(srcdir)/cexp.c @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \ then true; \ *************** *** 2162,2166 **** cd ginclude; \ for file in *[0-9a-zA-Z+]; do \ ! ln $$file ../tmp/ginclude >/dev/null 2>&1 || cp $$file ../tmp/ginclude; \ done cd objc; \ --- 2288,2293 ---- cd ginclude; \ for file in *[0-9a-zA-Z+]; do \ ! ln $$file ../tmp/ginclude >/dev/null 2>&1 \ ! || cp $$file ../tmp/ginclude; \ done cd objc; \ *************** *** 2192,2214 **** gcc-$(oldversion) gcc-$(version) > diffs - # do make -f ../gcc/Makefile maketest DIR=../gcc - # in the intended test directory to make it a suitable test directory. - # THIS IS OBSOLETE; use the -srcdir operand in configure instead. - maketest: - ln -s $(DIR)/*.[chy] . - ln -s $(DIR)/configure . - ln -s $(DIR)/*.def . - -rm -f =* - ln -s $(DIR)/.gdbinit . - ln -s $(DIR)/$(FIXINCLUDES) . - -ln -s $(DIR)/bison.simple . - ln -s $(DIR)/config . - ln -s $(DIR)/move-if-change . - # The then and else were swapped to avoid a problem on Ultrix. - if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi - -rm tm.h aux-output.c config.h md - make clean - # You must then run config to set up for compilation. - bootstrap: force # Only build the C compiler for stage1, because that is the only one that --- 2319,2322 ---- *************** *** 2222,2236 **** # because alloca.o is newer, we permit these recursive makes to compile # alloca.o. Then cc1 is newer, so it won't have to be relinked. ! $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" $(MAKE) stage2 ! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" bootstrap2: force ! $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" $(MAKE) stage2 ! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" bootstrap3: force ! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" # Compare the object files in the current directory with those in the --- 2330,2344 ---- # because alloca.o is newer, we permit these recursive makes to compile # alloca.o. Then cc1 is newer, so it won't have to be relinked. ! $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" $(MAKE) stage2 ! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" bootstrap2: force ! $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" $(MAKE) stage2 ! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" bootstrap3: force ! $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" # Compare the object files in the current directory with those in the *************** *** 2239,2243 **** # ./ avoids bug in some versions of tail. compare: force ! for file in *.o; do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage2/$$file > tmp-foo2 2>/dev/null \ --- 2347,2351 ---- # ./ avoids bug in some versions of tail. compare: force ! for file in *$(objext); do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage2/$$file > tmp-foo2 2>/dev/null \ *************** *** 2245,2250 **** done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \ ! for file in $$dir/*.o; do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage2/$$file > tmp-foo2 2>/dev/null \ --- 2353,2358 ---- done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ ! for file in $$dir/*$(objext); do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage2/$$file > tmp-foo2 2>/dev/null \ *************** *** 2257,2261 **** # Similar, but compare with stage3 directory compare3: force ! for file in *.o; do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage3/$$file > tmp-foo2 2>/dev/null \ --- 2365,2369 ---- # Similar, but compare with stage3 directory compare3: force ! for file in *$(objext); do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage3/$$file > tmp-foo2 2>/dev/null \ *************** *** 2263,2268 **** done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \ ! for file in $$dir/*.o; do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage3/$$file > tmp-foo2 2>/dev/null \ --- 2371,2376 ---- done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ ! for file in $$dir/*$(objext); do \ tail +16c ./$$file > tmp-foo1; \ tail +16c stage3/$$file > tmp-foo2 2>/dev/null \ *************** *** 2278,2286 **** gnucompare: force ! for file in *.o; do \ cmp --ignore-initial=16 $$file stage2/$$file || true ; \ done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \ for file in $$dir/*.o; do \ cmp --ignore-initial=16 $$file stage2/$$file || true ; \ --- 2386,2394 ---- gnucompare: force ! for file in *$(objext); do \ cmp --ignore-initial=16 $$file stage2/$$file || true ; \ done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ for file in $$dir/*.o; do \ cmp --ignore-initial=16 $$file stage2/$$file || true ; \ *************** *** 2291,2300 **** # Similar, but compare with stage3 directory gnucompare3: force ! for file in *.o; do \ cmp --ignore-initial=16 $$file stage3/$$file || true ; \ done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \ ! for file in $$dir/*.o; do \ cmp --ignore-initial=16 $$file stage3/$$file || true ; \ done; \ --- 2399,2408 ---- # Similar, but compare with stage3 directory gnucompare3: force ! for file in *$(objext); do \ cmp --ignore-initial=16 $$file stage3/$$file || true ; \ done for dir in tmp-foo $(SUBDIRS); do \ ! if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ ! for file in $$dir/*$(objext); do \ cmp --ignore-initial=16 $$file stage3/$$file || true ; \ done; \ *************** *** 2310,2313 **** --- 2418,2426 ---- done -mv $(STAGESTUFF) stage1 + # Copy as/ld if they exist to stage dir, so that running xgcc from the stage + # dir will work properly. + -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi + -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi + -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi -rm -f stage1/libgcc.a -cp libgcc.a stage1 *************** *** 2322,2325 **** --- 2435,2443 ---- done -mv $(STAGESTUFF) stage2 + # Copy as/ld if they exist to stage dir, so that running xgcc from the stage + # dir will work properly. + -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi + -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi + -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi -rm -f stage2/libgcc.a -cp libgcc.a stage2 *************** *** 2334,2337 **** --- 2452,2460 ---- done -mv $(STAGESTUFF) stage3 + # Copy as/ld if they exist to stage dir, so that running xgcc from the stage + # dir will work properly. + -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi + -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi + -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi -rm -f stage3/libgcc.a -cp libgcc.a stage3 *************** *** 2346,2349 **** --- 2469,2477 ---- done -mv $(STAGESTUFF) stage4 + # Copy as/ld if they exist to stage dir, so that running xgcc from the stage + # dir will work properly. + -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi + -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi + -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi -rm -f stage4/libgcc.a -cp libgcc.a stage4 *************** *** 2354,2387 **** # and delete the object files. Use this if you're just verifying a version # that is pretty sure to work, and you are short of disk space. ! risky-stage1: force ! -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi ! -mv $(GCC_PARTS) stage1 ! -rm -f stage1/libgcc.a ! -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a ! -make clean ! risky-stage2: force ! -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi ! -mv $(GCC_PARTS) stage2 ! -rm -f stage2/libgcc.a ! -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a -make clean ! risky-stage3: force ! -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi ! -mv $(GCC_PARTS) stage3 ! -rm -f stage3/libgcc.a ! -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a -make clean ! risky-stage4: force ! -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi ! -mv $(GCC_PARTS) stage4 ! -rm -f stage4/libgcc.a ! -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a -make clean #In GNU Make, ignore whether `stage*' exists. ! .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 --- 2482,2499 ---- # and delete the object files. Use this if you're just verifying a version # that is pretty sure to work, and you are short of disk space. ! risky-stage1: stage1 ! - make clean ! risky-stage2: stage2 -make clean ! risky-stage3: stage3 -make clean ! risky-stage4: stage4 -make clean #In GNU Make, ignore whether `stage*' exists. ! .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/NEWS gcc-2.7.0/NEWS *** gcc-2.6.3/NEWS Wed Nov 23 17:52:59 1994 --- gcc-2.7.0/NEWS Fri Jun 16 09:02:06 1995 *************** *** 1,2 **** --- 1,235 ---- + Noteworthy changes in GCC version 2.7.0: + + GCC now works better on systems that use ".obj" and ".exe" instead of + ".o" and no extension. This involved changes to the driver program, + gcc.c, to convert ".o" names to ".obj" and to GCC's Makefile to use + ".obj" and ".exe" in filenames that are not targets. In order to + build GCC on such systems, you may need versions of GNU make and/or + compatible shells. At this point, this support is preliminary. + + Object file extensions of ".obj" and executable file extensions of + ".exe" are allowed when using appropriate version of GNU Make. + + Numerous enhancements were made to the __attribute__ facility including + more attributes and more places that support it. We now support the + "packed", "nocommon", "noreturn", "volatile", "const", "unused", + "transparent_union", "constructor", "destructor", "mode", "section", + "align", "format", "weak", and "alias" attributes. Each of these + names may also be specified with added underscores, e.g., "__packed__". + __attribute__ may now be applied to parameter definitions, function + definitions, and structure, enum, and union definitions. + + GCC now supports returning more structures in registers, as specified by + many calling sequences (ABIs), such as on the HP PA RISC. + + A new option '-fpack-struct' was added to automatically pack all structure + members together without holes. + + There is a new library (cpplib) and program (cppmain) that at some + point will replace cpp (aka cccp). To use cppmain as cpp now, pass + the option CCCP=cppmain to make. The library is already used by the + fix-header program, which should speed up the fixproto script. + + New options for supported targets: + + GNU on many targets. + NetBSD on MIPS, m68k, VAX, and x86. + LynxOS on x86, m68k, Sparc, and RS/6000. + VxWorks on many targets. + + Windows/NT on x86 architecture. Initial support for Windows/NT on Alpha + (not fully working). + + Many embedded targets, specifically UDI on a29k, aout, coff, elf, + and vsta "operating systems" on m68k, m88k, mips, sparc, and x86. + + Additional support for x86 (i386, i486, and Pentium): + + Work with old and new linkers for Linux-based GNU systems, + supporting both a.out and ELF. + FreeBSD on x86. + Stdcall convention. + -malign-double, -mregparm=, -malign-loops= and -malign-jumps= switches. + On ISC systems, support -Xp like -posix. + + Additions for RS/6000: + + Instruction scheduling information for PowerPC 403. + AIX 4.1 on PowerPC. + -mstring and -mno-string. + -msoft-float and floating-point emulation included. + Preliminary support for PowerPC System V.4 with or without the GNU as. + Preliminary support for EABI. + Preliminary support for 64-bit systems. + Both big and little endian systems. + + New features for MIPS-based systems: + + r4650. + mips4 and R8000. + Irix 6.0. + 64-bit ABI. + Allow dollar signs in labels on SGI/Irix 5.x. + + New support for HP PA RISC: + + Generation of PIC (requires binutils-2.5.2.u6 or later). + HP-UX version 9 on HP PA RISC (dynamically links even with -g). + Processor variants for HP PA RISC: 700, 7100, and 7100LC. + Automatic generation of long calls when needed. + -mfast-indirect-calls for kernels and static binaries. + + The called routine now copies arguments passed by invisible reference, + as required by the calling standard. + + Other new miscellaneous target-specific support: + + -mno-multm on a29k. + -mold-align for i960. + Configuration for "semi-hosted" ARM. + -momit-leaf-frame-pointer for M88k. + SH3 variant of Hitachi Super-H and support both big and little endian. + + Changes to Objective-C: + + Bare-bones implementation of NXConstantString has been added, + which is invoked by the @"string" directive. + + Class * has been changed to Class to conform to the NextSTEP and + OpenStep runtime. + + Enhancements to make dynamic loading easier. + + The module version number has been updated to Version 7, thus existing + code will need to be recompiled to use the current run-time library. + + GCC now supports the ISO Normative Addendum 1 to the C Standard. + As a result: + + The header defines macros for C programs written + in national variants of ISO 646. + + The following digraph tokens are supported: + <: :> <% %> %: %:%: + These behave like the following, respectively: + [ ] { } # ## + + Digraph tokens are supported unless you specify the `-traditional' + option; you do not need to specify `-ansi' or `-trigraphs'. Except + for contrived and unlikely examples involving preprocessor + stringizing, digraph interpretation doesn't change the meaning of + programs; this is unlike trigraph interpretation, which changes the + meanings of relatively common strings. + + The macro __STDC_VERSION__ has the value 199409L. + + As usual, for full conformance to the standard, you also need a + C library that conforms. + + The following lists changes that have been made to g++. If some + features mentioned below sound unfamiliar, you will probably want to + look at the recently-released public review copy of the C++ Working + Paper. For PostScript and PDF (Adobe Acrobat) versions, see the + archive at ftp://research.att.com/dist/stdc++/WP. For HTML and ASCII + versions, see ftp://ftp.cygnus.com/pub/g++. On the web, see + http://www.cygnus.com/~mrs/wp-draft. + + The scope of variables declared in the for-init-statement has been changed + to conform to http://www.cygnus.com/~mrs/wp-draft/stmt.html#stmt.for; as a + result, packages such as groff 1.09 will not compile unless you specify the + -fno-for-scope flag. PLEASE DO NOT REPORT THIS AS A BUG; this is a change + mandated by the C++ standardization committee. + + Binary incompatibilities: + + The builtin 'bool' type is now the size of a machine word on RISC targets, + for code efficiency; it remains one byte long on CISC targets. + + Code that does not use #pragma interface/implementation will most + likely shrink dramatically, as g++ now only emits the vtable for a + class in the translation unit where its first non-inline, non-abstract + virtual function is defined. + + Classes that do not define the copy constructor will sometimes be + passed and returned in registers. This may illuminate latent bugs in + your code. + + Support for automatic template instantiation has *NOT* been added, due + to a disagreement over design philosophies. + + Support for exception handling has been improved; more targets are now + supported, and throws will use the RTTI mechanism to match against the + catch parameter type. Optimization is NOT SUPPORTED with + -fhandle-exceptions; no need to report this as a bug. + + Support for Run-Time Type Identification has been added with -frtti. + This support is still in alpha; one major restriction is that any file + compiled with -frtti must include . + + Preliminary support for namespaces has been added. This support is far + from complete, and probably not useful. + + Synthesis of compiler-generated constructors, destructors and + assignment operators is now deferred until the functions are used. + + The parsing of expressions such as `a ? b : c = 1' has changed from + `(a ? b : c) = 1' to `a : b ? (c = 1)'. + + The code generated for testing conditions, especially those using || + and &&, is now more efficient. + + The operator keywords and, and_eq, bitand, bitor, compl, not, not_eq, + or, or_eq, xor and xor_eq are now supported. Use -ansi or + -foperator-names to enable them. + + The 'explicit' keyword is now supported. 'explicit' is used to mark + constructors and type conversion operators that should not be used + implicitly. + + g++ now accepts the typename keyword, though it currently has no + semantics; it can be a no-op in the current template implementation. + You may want to start using it in your code, however, since the + pending rewrite of the template implementation to compile STL properly + (perhaps for 2.8.0, perhaps not) will require you to use it as + indicated by the current draft. + + Handling of user-defined type conversion has been overhauled so that + type conversion operators are now found and used properly in + expressions and function calls. + + -fno-strict-prototype now only applies to function declarations with + "C" linkage. + + g++ now warns about 'if (x=0)' with -Wparentheses or -Wall. + + #pragma weak and #pragma pack are supported on System V R4 targets, as + are various other target-specific #pragmas supported by gcc. + + new and delete of const types is now allowed (with no additional + semantics). + + Explicit instantiation of template methods is now supported. Also, + 'inline template class foo;' can be used to emit only the vtable + for a template class. + + With -fcheck-new, g++ will check the return value of all calls to + operator new, and not attempt to modify a returned null pointer. + + The template instantiation code now handles more conversions when + passing to a parameter that does not depend on template arguments. + This means that code like 'string s; cout << s;' now works. + + Invalid jumps in a switch statement past declarations that require + initializations are now caught. + + Functions declared 'extern inline' now have the same linkage semantics + as inline member functions. On supported targets, where previously + these functions (and vtables, and template instantiations) would have + been defined statically, they will now be defined as weak symbols so + that only one out-of-line definition is used. + + collect2 now demangles linker output, and c++filt has become part of + the gcc distribution. + Noteworthy changes in GCC version 2.6.3: *************** *** 160,166 **** This release only fixes a few serious bugs. These include fixes for a bug that prevented most programs from working on the RS/6000, a bug ! that caused invalid assembler code for prgrams with a `switch' statement on the NS32K, a G++ problem that caused undefined names in ! some configurations, and several less erious problems, some of which can affect most configuration. --- 393,399 ---- This release only fixes a few serious bugs. These include fixes for a bug that prevented most programs from working on the RS/6000, a bug ! that caused invalid assembler code for programs with a `switch' statement on the NS32K, a G++ problem that caused undefined names in ! some configurations, and several less serious problems, some of which can affect most configuration. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ORDERS gcc-2.7.0/ORDERS *** gcc-2.6.3/ORDERS --- gcc-2.7.0/ORDERS Fri Jun 16 18:14:00 1995 *************** *** 0 **** --- 1,3764 ---- + The actual order form follows the descriptions of media contents. + + Most of this file is excerpted from the draft of the June 1995 GNU's Bulletin. + The Order Form itself is accurate, but the information in the other articles + is not completely updated. You can ask gnu@prep.ai.mit.edu for the complete + June, 1995 Order From to get up-to-date information. + + Please send suggestions for improvements to gnu@prep.ai.mit.edu or the postal + address at the end of the order form. Thank You. + + --------------------------------------------------------------------- + + + FSF Order Form with Descriptions preliminary, June 1995 + + + + Free Software Foundation, Inc. Telephone: +1-617-542-5942 + 59 Temple Place - Suite 330 Fax: (including Japan) +1-617-542-2652 + Boston, MA 02111-1307 Free Dial Fax (in Japan): + USA 0031-13-2473 (KDD) + Electronic mail: `gnu@prep.ai.mit.edu' 0066-3382-0158 (IDC) + + + There are some sections (e.g. ``Forthcoming GNUs'' and ``How to Get GNU + Software'') which are not in this Order Form file. If you wish to see them, + ask gnu@prep.ai.mit.edu for the complete June, 1995 GNU's Bulletin. + + + Table of Contents + ----------------- + + Donations Translate Into Free Software + Cygnus Matches Donations! + Free Software Redistributors Donate + Help from Free Software Companies + (not included) Major Changes in GNU Software and Documentation (not + included as it was not done when this file was assembled). + GNU Documentation + GNU Software (not completely up to date) + Program/Package Cross Reference (not completely up to date) + Tapes + Languages Tape (version numbers not completely up to date) + Lisps and Emacs Tape (version numbers not completely up to date) + Utilities Tape (version numbers not completely up to date) + Scheme Tape + X11 Tapes + Berkeley 4.4BSD-Lite Tape + VMS Emacs and VMS Compiler Tapes + CD-ROMs + Pricing of the GNU CD-ROMs + MS-DOS CD-ROM + Debian GNU/Linux CD-ROM + Compiler Tools Binaries CD-ROM + Source Code CD-ROMs + June 1995 Source Code CD-ROM (version numbers not completely up + to date) + May 1994 Source Code CD-ROM + November 1993 Source Code CD-ROM + MS-DOS Diskettes + DJGPP Diskettes (version numbers not completely up to date) + Emacs Diskettes (version numbers not completely up to date) + Selected Utilities Diskettes (not completely up to date) + Windows Diskette + Tape & CD-ROM Subscription Service + The Deluxe Distribution + FSF T-shirt + Free Software Foundation Order Form + + + + Donations Translate Into Free Software + ************************************** + + If you appreciate Emacs, GNU CC, Ghostscript, and other free software, you + may wish to help us make sure there is more in the future--remember, + *donations translate into more free software!* + + Your donation to us is tax-deductible in the United States. We gladly accept + *any* currency, although the U.S. dollar is the most convenient. + m{No Value For "ergegrafkludge"} If your employer has a matching gifts + program for charitable donations, please arrange to: add the FSF to the list + of organizations for your employer's matching gifts program; and have your + donation matched (note *Note Cygnus Matches Donations!::), if you do not + know, please ask your personnel department. Circle amount you are donating, + cut out this form, and send it with your donation to: + Free Software Foundation + 59 Temple Place -- Suite 330 + Boston, MA 02111-1307 + USA + + $500 $250 $100 $50 other $________ + + Other currency:________ + + + You can charge a donation to any of Carte Blanche, Diner's Club, JCB, + Mastercard, Visa, or American Express. Charges may also be faxed to + +1-617-492-9057. Individuals in Japan who are unable to place international + calls may use the "free dial" numbers: 0031-13-2473 (KDD) and + 0066-3382-0158 (IDC). + + Card type: __________________ Expiration Date: _____________ + + Account Number: _____________________________________________ + + Cardholder's Signature: _____________________________________ + + Name: _______________________________________________________ + + Street Address: _____________________________________________ + + City/State/Province: ________________________________________ + + Zip Code/Postal Code/Country: _______________________________ + + + + Cygnus Matches Donations! + ************************* + + To encourage cash donations to the Free Software Foundation, Cygnus Support + will continue to contribute corporate funds to FSF to accompany gifts by its + employees, and by its customers and their employees. + + Donations payable to the Free Software Foundation should be sent by eligible + persons to Cygnus Support, which will add its gifts and forward the total to + the FSF each quarter. The FSF will provide the contributor with a receipt to + recognize the contribution (which is tax-deductible on U.S. tax returns). + For more information, please contact Cygnus: + Cygnus Support + 1937 Landings Drive + Mountain View, CA 94043 + USA + + Telephone: 415-903-1400 + +1-800-Cygnus1 (-294-6871) + Fax: 415-903-0122 + Electronic-Mail: `info@cygnus.com' + FTP: `ftp.cygnus.com' + WWW: `http://www.cygnus.com/' + + + + Free Software Redistributors Donate + *********************************** + + by Richard Stallman + + The Sun Users Group Deutschland and ASCII Corporation (Japan) have added + donations to the FSF to the price of their next CD-ROM of GNU software. + Potential purchasers will know precisely how much of the price is for the FSF + and how much is for the redistributor. + + Austin Code Works, a redistributor of free software, is supporting free + software development by giving the FSF 20% of the selling price for the GNU + software packages they produce and sell. The producers of the SNOW 2.1 CD + added the words "Includes $5 donation to the FSF" to the front of their CD. + Walnut Creek CDROM and Info Magic, two more free software redistributors, are + also giving us a percentage of their selling price. CQ Publishing made a + large donation from the sales of their book about GAWK in Japanese. + + In the long run, the success of free software depends on how much new free + software people develop. Free software distribution offers an opportunity to + raise funds for such development in an ethical way. These redistributors + have made use of the opportunity. Many others let it go to waste. + + You can help promote free software development by convincing for-a-fee + redistributors to contribute--either by doing development themselves, or by + donating to development organizations (the FSF and others). + + The way to convince distributors to contribute is to demand and expect this + of them. This means choosing among distributors partly by how much they give + to free software development. Then you can show distributors they must + compete to be the one who gives the most. + + To make this work, you must insist on numbers that you can compare, such as, + "We will give ten dollars to the Foobar project for each disk sold." A vague + commitment, such as "A portion of the profits is donated," doesn't give you a + basis for comparison. Even a precise fraction "of the profits from this + disk" is not very meaningful, since creative accounting and unrelated + business decisions can greatly alter what fraction of the sales price counts + as profit. + + Also, press developers for firm information about what kind of development + they do or support. Some kinds make much more long-term difference than + others. For example, maintaining a separate version of a GNU program + contributes very little; maintaining a program on behalf of the GNU Project + contributes much. Easy new ports contribute little, since someone else would + surely do them; difficult ports such as adding a new CPU to the GNU compiler + contribute more; major new features and programs contribute the most. + + By establishing the idea that supporting further development is "the proper + thing to do" when distributing free software for a fee, we can assure a + steady flow of resources for making more free software. + + + + Help from Free Software Companies + ********************************* + + When choosing a free software business, ask those you are considering how + much they do to assist free software development, e.g., by contributing money + to free software development or by writing free software improvements + themselves for general use. By basing your decision partially on this + factor, you can help encourage those who profit from free software to + contribute to its growth. + + These free software support companies regularly donate a part of their income + to the Free Software Foundation to support the development of new GNU + programs. Listing them here is our way of thanking them. Wingnut has made a + pledge to donate 10% of their income to the FSF, and has also purchased + several Deluxe Distribution packages in Japan. (Wingnut is SRA's special GNU + support group). Also see *Note Cygnus Matches Donations!::. + + Wingnut Project + Software Research Associates, Inc. + 1-1-1 Hirakawa-cho, Chiyoda-ku + Tokyo 102, Japan + + Phone: (+81-3)3234-2611 + Fax: (+81-3)3942-5174 + E-mail: `info-wingnut@sra.co.jp' + + + + GNU Documentation + ***************** + + GNU is dedicated to having quality, easy-to-use online and printed + documentation. GNU manuals are intended to explain underlying concepts, + describe how to use all the features of each program, and give examples of + command use. GNU manuals are distributed as Texinfo source files, which + yield both typeset hardcopy via the TeX document formatting system, and online + hypertext display via the menu-driven Info system. Source for these manuals + comes with our software; here we list the manuals that we publish as printed + books as well; see the *note Free Software Foundation Order Form::.. + + Most GNU manuals are bound as soft cover books with "lay-flat" bindings. + This allows you to open them so they lie flat on a table without creasing the + binding. These books have an inner cloth spine and an outer cardboard cover + that will not break or crease as an ordinary paperback will. Currently, the + `GDB', `Emacs', `Emacs Lisp Reference', `GAWK', `Make', `Bison', and `Texinfo' + manuals have this binding. The other GNU manuals also lie flat when opened, + using a GBC or Wire-O binding. All of our manuals are 7in by 9.25in except + the 8.5in by 11in `Calc' manual. + + The edition number of the manual and version number of the program listed + after each manual's name were current at the time this Bulletin was published. + + `Debugging with GDB' (Edition 4.12 for Version 4.14) tells how to use the GNU + Debugger, run your program under debugger control, examine and alter data, + modify a program's flow of control, and use GDB through GNU Emacs. + + The `Emacs Manual' (11th Edition for Version 19.29) describes editing with + GNU Emacs. It explains advanced features, including outline mode and regular + expression search; how to use special modes for programming in languages like + C++ and TeX; how to use the `tags' utility; how to compile and correct code; + how to make your own keybindings; and other elementary customizations. + + `Programming in Emacs Lisp, An Introduction' (Edition 1.03 for Version 19.29) + is an elementary introduction to programming in Emacs Lisp. It is written + for people who are not necessarily interested in programming, but who do want + to customize or extend their computing environment. It tells how to write + programs that find files; switchbuffers; use searches, conditionals, loops, + and recursion; how to write Emacs initialization files; and how to run the + Emacs Lisp debuggers. If you read the text in GNU Emacs under Info mode, you + can run the sample programs directly. + + The `GNU Emacs Lisp Reference Manual' (Edition 2.4 for Version 19.29) covers + this programming language in depth, including data types, control structures, + functions, macros, syntax tables, searching/matching, modes, windows, + keymaps, byte compilation, and the operating system interface. + + The `GAWK Manual' (Edition 0.16 for Version 2.16) tells how to use the GNU + implementation of `awk'. It is written for those who have never used `awk' + and describes the features of this powerful string and record manipulation + language. + + The `Make Manual' (Edition 0.46 for Version 3.72) describes GNU `make', a + program used to rebuild parts of other programs. The manual tells how to + write "makefiles", which specify how a program is to be compiled and how its + files depend on each other. Included are an introductory chapter for novice + users and a section about automatically generated dependencies. + + The `Flex Manual' (Edition 1.03 for Version 2.3.7) teaches you to write a + lexical scanner definition for the `flex' program to create a C++ or C-coded + scanner that recognizes the patterns defined. You need no prior knowledge of + scanners. + + The `Bison Manual' (December 1993 Edition for Version 1.23) teaches you how + to write context-free grammars for the Bison program that convert into + C-coded parsers. You need no prior knowledge of parser generators. + + `Using and Porting GNU CC' (September 1994 Edition for Version 2.6) tells how + to run, install, and port the GNU C Compiler to new systems. It lists new + features and incompatibilities of GCC, but people not familiar with C will + still need a good reference on the C programming language. It also covers + G++. + + The `Texinfo Manual' (Edition 2.20 for Version 3) explains the markup + language used to generate both the online Info documentation and typeset + hardcopies. It tells you how to make tables, lists, chapters, nodes, + indexes, cross references, how to use Texinfo mode in GNU Emacs, and how to + catch mistakes. This second edition describes over 50 new commands. + + The `Termcap Manual' (2nd Edition for Version 1.2), often described as "twice + as much as you ever wanted to know about termcap," details the format of the + termcap database, the definitions of terminal capabilities, and the process + of interrogating a terminal description. This manual is primarily for + programmers. + + The `C Library Reference Manual' (Edition 0.06 for Version 1.09) describes + most of the facilities of the GNU C library, including both what Unix calls + "library functions" and "system calls." We are doing limited copier runs of + this manual until it becomes more stable. Please send corrections and + improvements to `bug-glibc-manual@prep.ai.mit.edu'. + + The `Emacs Calc Manual' (Edition 2.02 for Version 2.02) is both a tutorial + and a reference manual. It tells how to do ordinary arithmetic, how to use + Calc for algebra, calculus, and other forms of mathematics, and how to extend + Calc. + + + + GNU Software - (NOT COMPLETELY UP TO DATE) + ************ + + All our software is available via FTP; see *Note How to Get GNU Software::. + In addition, we offer software on various media and printed documentation: + + * *Note CD-ROMs::. + + * *Note Tapes::. + + * *Note MS-DOS Diskettes::. + + * *Note Documentation::, which includes manuals and reference cards. + + We welcome all bug reports sent to the appropriate electronic mailing list + (*note Free Software Support::.). + + In the articles describing the contents of each medium, the version number + listed after each program name was current when we published this Bulletin. + When you order a distribution tape, diskette or newer CD-ROM, some of the + programs may be newer, and therefore the version number higher. + + Key to cross reference: + + + BinCD + Binaries CD-ROM + + DjgppD + Djgpp Diskettes + + DosCD + MS-DOS CD-ROM + + EmcsD + Emacs Diskettes + + LspEmcT + Lisps/Emacs Tape + + LangT + Languages Tape + + LiteT + 4.4BSD-Lite Tape + + SchmT + Scheme Tape + + SrcCD + Source CD-ROM + + UtilD + Selected Utilities Diskettes + + UtilT + Utilities Tape + + VMSCompT + VMS Compiler Tape + + VMSEmcsT + VMS Emacs Tape + + WdwsD + Windows Diskette + + X11OptT + X11 Optional Tape + + X11ReqT + X11 Required Tape + + + + Configuring GNU Software: + + We are using a uniform scheme for configuring GNU software packages in order + to compile them. It uses the `Autoconf' program (see item below). The goal + is to have all GNU software support the same alternatives for naming machine + and system types. When the GNU system is complete it will be possible to + configure and build the entire system at once, eliminating the need to + separately configure each individual package. The configuration scheme lets + you specify both the host and target system to build cross-compilation tools. + + + + GNU software currently available: + + (For new features and coming programs, see *Note Forthcoming GNUs::.) + + * `acm' (SrcCD, UtilT) + + `acm' is a LAN-oriented, multiplayer aerial combat simulation that runs + under the X Window System. Players engage in air to air combat against + one another using heat seeking missiles and cannons. We are working on + more accurate simulation of real airplane flight characteristics. + + * Autoconf (SrcCD, UtilT) + + Autoconf produces shell scripts which automatically configure source code + packages. These scripts adapt the packages to many kinds of Unix-like + systems without manual user intervention. Autoconf creates a script for + a package from a template file which lists the operating system features + which the package can use, in the form of `m4' macro calls. Autoconf + requires GNU `m4' to operate, but the resulting configure scripts it + generates do not. + + Most GNU programs now use Autoconf-generated configure scripts. + + * BASH (SrcCD, UtilT) + + The GNU shell, BASH (Bourne Again SHell), is compatible with the Unix + `sh' and offers many extensions found in `csh' and `ksh'. BASH has job + control, `csh'-style command history, and command-line editing (with + Emacs and `vi' modes built-in, and the ability to rebind keys) via the + readline library. BASH conforms to the POSIX 1003.2 shell specification. + + * `bc' (DjgppD, DosCD, SrcCD, UtilT) + + `bc' is an interactive algebraic language with arbitrary precision + numbers. GNU `bc' follows the POSIX.2-1992 standard, with several + extensions including multi-character variable names, an `else' + statement, and full Boolean expressions. The RPN calculator `dc' is now + distributed as part of the same package, but GNU `bc' is not implemented + as a `dc' preprocessor. + + * BFD (BinCD, DjggpD, DosCD, LangT, SrcCD) + + The Binary File Descriptor library allows a program which operates on + object files (e.g., `ld' or GDB) to support many different formats in a + clean way. BFD provides a portable interface, so that only BFD needs to + know the details of a particular format. One result is that all + programs using BFD will support formats such as a.out, COFF, and ELF. + BFD comes with source for Texinfo documentation (not yet published on + paper). Presently BFD is not distributed separately; it is included + with packages that use it. + + * Binutils (BinCD, DjgppD, DosCD, LangT, SrcCD) + + Binutils includes the programs: `ar', `c++filt', `demangle', `gas', + `gprof', `ld', `nlmconv', `nm', `objcopy', `objdump', `ranlib', `size', + `strings', and `strip'. + + Binutils Version 2 uses the BFD library. The GNU linker `ld' emits + source-line numbered error messages for multiply-defined symbols and + undefined references. It interprets a superset of the AT&T Linker + Command Language, which gives general control over where segments are + placed in memory. `nlmconv' converts object files into Novell NetWare + Loadable Modules. `objdump' can disassemble code for a29k, ALPHA, + H8/300, H8/500, HP-PA, i386, i960, m68k, m88k, MIPS, SH, SPARC, & Z8000 + processors, and can display other data (e.g., symbols & relocations) + from any file format understood by BFD. + + * Bison (BinCD, DjgppD, DosCD, LangT, SrcCD, VMSCompT) + + Bison is an upwardly compatible replacement for the parser generator + `yacc'. Texinfo source for the `Bison Manual' and reference card are + included. *Note Documentation::. + + We recently decided to change the policy for using the parsers that + Bison generates. It is now permitted to use Bison-generated parsers in + non-free programs. *Note GNUs Flashes::. + + * GNU C Library (BinCD, LangT, SrcCD) + + The GNU C library supports ANSI C-1989, POSIX 1003.1-1990 and most of the + functions in POSIX 1003.2-1992. It is upwardly compatible with 4.4BSD + and includes many System V functions, plus GNU extensions. + + The C Library will perform many functions of the Unix system calls in + the Hurd. Mike Haertel has written a fast `malloc' which wastes less + memory than the old GNU version. The GNU regular-expression functions + (`regex' and `rx') now nearly conform to the POSIX 1003.2 standard. + + GNU `stdio' lets you define new kinds of streams, just by writing a few + C functions. The `fmemopen' function uses this to open a stream on a + string, which can grow as necessary. You can define your own `printf' + formats to use a C function you have written. For example, you can + safely use format strings from user input to implement a `printf'-like + function for another programming language. Extended `getopt' functions + are already used to parse options, including long options, in many GNU + utilities. + + The C Library runs on Sun-3 (SunOS 4.1), Sun-4 (SunOS 4.1 or Solaris 2), + HP 9000/300 (4.3BSD), SONY News 800 (NewsOS 3 or 4), MIPS DECstation + (Ultrix 4), DEC Alpha (OSF/1), i386/i486 (System V, SVR4, BSD, SCO 3.2 & + SCO ODT 2.0), Sequent Symmetry i386 (Dynix 3) & SGI (Irix 4). Texinfo + source for the `GNU C Library Reference Manual' is included (*note + Documentation::.); the manual is now being updated. + + * GNU C++ Library (BinCD, DjgppD, DosCD, LangT, SrcCD) + + The GNU C++ library (libg++) contains an extensive collection of C++ + `forest' classes, an IOStream library for input/output routines, and + support tools for use with G++. Supported classes include: Obstacks, + multiple-precision Integers and Rationals, Complex numbers, arbitrary + length Strings, BitSets and BitStrings. Version 2.6.2 includes the + initial release of the libstdc++ library. This implements library + facilities defined by the forthcoming ANSI/ISO C++ standard, including + the Standard Template Library. + + * Calc (LspEmcT, SrcCD) + + Calc (written by Dave Gillespie in Emacs Lisp) is an extensible, advanced + desk calculator & mathematical tool that runs as part of GNU Emacs. You + can use Calc just as a simple four-function calculator, but it has many + more features including: choice of algebraic or RPN (stack-based) entry; + logarithmic, trigonometric & financial functions; arbitrary precision; + complex numbers; vectors; matrices; dates; times; infinities; sets; + algebraic simplification; differentiation & integration. It outputs to + `gnuplot' & comes with source for a reference card & a Manual. *Note + Documentation::. + + * GNU Chess (SrcCD, UtilT, WdwsD) + + GNU Chess lets the computer play a full game of chess with you. It runs + on most platforms & has dumb terminal, "curses" & X terminal interfaces. + The X terminal interface is based on the `xboard' program. + m{No Value For "ergegrafkludge"} GNU Chess implements many specialized + features including the null move heuristic, a hash table with aging, the + history heuristic (another form of the earlier killer heuristic), + caching of static evaluations, & a database which lets it play the first + several moves of the game quickly. Recent improvements include better + heuristics, faster evaluation, thinking on opponent's time, a perfect + King and Pawn vs King endgame routine, Swedish & German language + support, support for more book formats, a rudimentary Bobby Fischer + clock, & bug fixes. It is primarily supported by Stuart Cracraft, Chua + Kong Sian, & Tim Mann on behalf of the FSF. + + * CLISP (LspEmcT, SrcCD) + + CLISP is a Common Lisp implementation by Bruno Haible and Michael Stoll. + It mostly supports the Lisp described by `Common LISP: The Language (2nd + edition)' and the ANSI Common Lisp standard. CLISP includes an + interpreter, a byte-compiler, a large subset of CLOS, a foreign language + interface and, for some machines, a screen editor. The user interface + language (English, German, French) is chooseable at run time. Major + packages that run in CLISP include CLX & Garnet. CLISP needs only 2 MB + of memory & runs on many microcomputers (including MS-DOS systems, OS/2, + the Atari ST, Amiga 500-4000, Acorn RISC PC) & Unix-like systems + (GNU/Linux, Sun4, SVR4, SGI, HP-UX, DEC Alpha, NeXTstep & others). + + * GNU Common Lisp (LspEmcT, SrcCD) + + GNU Common Lisp (GCL) has a compiler and interpreter for Common Lisp. It + used to be known as Kyoto Common Lisp. It is very portable and extremely + efficient on a wide class of applications. It compares favorably in + performance with commercial Lisps on several large theorem-prover and + symbolic algebra systems. It supports the CLtL1 specification but is + moving towards the proposed ANSI definition. GCL compiles to C and + then uses the native optimizing C compilers (e.g., GCC). A function + with a fixed number of args and one value turns into a C function of the + same number of args, returning one value, so GCL is maximally efficient + on such calls. It has a conservative garbage collector which allows + great freedom for the C compiler to put Lisp values in arbitrary + registers. It has a source level Lisp debugger for interpreted code, + with display of source code in an Emacs window. Ita profiling tools + (based on the C profiling tools) count function calls and the time spent + in each function. CLX works with GCL. + + There is now a builtin interface with the TK widget system. It runs in + a separate process so that users may monitor progress on lisp + computations, or interact with running computations via a windowing + interface. + + There is also an Xlib interface via C (xgcl-2). PCL runs with GCL (see + PCL item later in this article). *Note Forthcoming GNUs::, for plans for + about GCL, or for recent developments. GCL version 2.0 is released + under the GNU Library General Public License. + + * `cpio' (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + `cpio' is an alternative archive program with all the features of SVR4 + `cpio', including support for the final POSIX 1003.1 `ustar' standard. + `mt', a program to position magnetic tapes, is included with `cpio'. + + * CVS (SrcCD, UtilT) + + CVS, the Concurrent Version System, manages software revision and release + control in a multi-developer, multi-directory, multi-group environment. + It works best in conjunction with RCS versions 4 and above, but will + parse older RCS formats with the loss of CVS's fancier features. See + Berliner, Brian, "CVS-II: Parallelizing Software Development," + `Proceedings of the Winter 1990 USENIX Association Conference'. To find + out how to get a copy of this report, contact `office@usenix.org'. + + * DejaGnu (LangT, SrcCD) + + DejaGnu is a framework for testing other programs that provides a single + front end for all tests. The framework's flexibility and consistency + makes it easy to write tests for any program. DejaGnu comes with + `expect', which runs scripts to conduct dialogs with programs. + + * Diffutils (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + GNU `diff' compares files showing line-by-line changes in several + flexible formats. It is much faster than traditional Unix versions. The + Diffutils package contains `diff', `diff3', `sdiff', and `cmp'. + + Recent Diffutils improvements include more consistent handling of + character sets, and a new `diff' option to do all input/output in + binary; this is useful on some non-Posix hosts. + + Plans for the Diffutils package include support for internationalization + (e.g., error messages in Chinese), and for some non-Unix PC environments. + + * DJGPP (BinCD, DjgppD, DosCD) + + DJ Delorie has ported GCC/G++ 2.6.0 (see the GCC item in this section) + to the i386 MS-DOS platform. The DJGPP package also contains a 32-bit + 80386 DOS extender with symbolic debugger; development libraries; and + ports of Bison, `flex', GAS, and the GNU Binutils. Full source code is + provided. It requires at least 5MB of hard disk space to install and + 512K of RAM to use. It supports SVGA (up to 1024x768), XMS & VDISK + memory allocation, `himem.sys', VCPI (e.g., QEMM, DESQview, & 386MAX), + and DPMI (e.g., Windows 3.x, OS/2, QEMM, & QDPMI). Ask + `djgpp-request@sun.soe.clarkson.edu' to join a DJGPP users mailing list. + + * `dld' (LangT, SrcCD) + + `dld' is a dynamic linker written by W. Wilson Ho. Linking your program + with the `dld' library allows you to dynamically load object files into + the running binary. Currently supported are VAX (Ultrix), Sun 3 (SunOS + 3.4 & 4.0), SPARC (SunOS 4.0), Sequent Symmetry (Dynix), & Atari ST. + + * `doschk' (DjgppD, DosCD, SrcCD, UtilT) + + This program is intended as a utility to help software developers ensure + that their source file names are distinguishable on System V platforms + with 14-character filenames and on MS-DOS with 8+3 character filenames. + + * `ecc' (SrcCD, UtilT) + + `ecc' is a Reed-Solomon error correction checking program, which can + correct three byte errors in a block of 255 bytes and detect more severe + errors. Contact `paulf@Stanford.EDU' for more information. + + * `ed' (SrcCD, UtilT) + + Ed is the standard text editor. + + * Elib (LspEmcT, SrcCD) + + Elib is a small library of Emacs Lisp functions, including routines for + using AVL trees and doubly-linked lists. + + * GNU Emacs + + In 1975, Richard Stallman developed the first Emacs, an extensible, + customizable real-time display editor and computing environment. GNU + Emacs is his second implementation. It offers true Lisp--smoothly + integrated into the editor--for writing extensions, and provides an + interface to the X Window System. It also runs on MS-DOS and Windows + NT. In addition to its powerful native command set, Emacs has + extensions which emulate the editors vi and EDT (DEC's VMS editor). + Emacs has many other features which make it a full computing support + environment. Our long term plan is now to move it in the direction of a + WYSIWYG word processor and make it easy for beginners to use. Source + for the `GNU Emacs Manual', `Programming in Emacs Lisp, An + Introduction', the `GNU Emacs Lisp Reference Manual', and a reference + card come with the software. *Note Documentation::. + + * GNU Emacs 18 (EmcsD, LspEmcT, SrcCD, VMSEmcsT) + + GNU Emacs 18.59 is the last release of version 18 from the FSF. We are + no longer maintaining it. It runs on many Unix systems. In hardware + order: Alliant FX/80 & FX/2800, Altos 3068, Amdahl (UTS), Apollo, AT&T + (3Bs & 7300 PC), DG Aviion, Bull DPX/2 (2nn & 3nn) CCI 5/32 & 6/32, + Celerity, Convex, Digital (DECstation 3100 & 5000 (PMAXes), Mips, VAX + (BSD, SysV & VMS)), Motorola Delta 147 & 187, Dual, Elxsi 6400, Encore + (DPC, APC & XPC), Gould, HP (9000 series 200, 300, 700 & 800, but not + 500), HLH Orion (original & 1/05), IBM (RS/6000 (AIX), RT/PC (4.2 & AIX) + & PS/2 (AIX (386 only))), ISI (Optimum V, 80386), Intel 860 & 80386 + (BSD, Esix, SVR3, SVR4, SCO, ISC, IX, AIX & others), Iris (2500, 2500 + Turbo & 4D), Masscomp, MIPS, National Semiconductor 32000, NeXT (Mach), + NCR Tower 32 (SVR2 & SVR3), Nixdorf Targon 31, Nu (TI & LMI), pfa50, + Plexus, Prime EXL, Pyramid (original & MIPS), Sequent (Balance & + Symmetry), SONY News (m68k & MIPS), Stride (system release 2), all Suns + including 386i (all SunOS & some Solaris vers.), Tadpole, Tahoe, Tandem + Integrity S2, Tektronix (16000 & 4300), Triton 88, Ustation E30 (SS5E), + Whitechapel (MG1) & Wicat. + + In operating system order: AIX (RS/6000, RT/PC, 386-PS/2), BSD (vers. + 4.1, 4.2, 4.3), DomainOS, Esix (386), HP-UX (HP 9000 series 200, 300, + 700, 800 but not 500), ISC (386), IX (386), Mach, Microport, NewsOS + (Sony m68k & MIPS) SCO (386), SVR0 (Vax, AT&T 3Bs), SVR2, SVR3, SVR4, + Solaris 2.0, SunOS, UTS (Amdahl), Ultrix (vers. 3.0, 4,1), Uniplus 5.2 + (Dual machines), VMS (vers. 4.0, 4.2, 4.4, 5.5) & Xenix (386). + + * GNU Emacs 19 (DosCD, EmacsD, LspEmcT, SrcCD) + + Emacs 19 works with character-only terminals as well as with the X + Window System (with or without the X toolkit); New features in Emacs 19 + include: multiple X windows ("frames" to Emacs), with either a separate + X window for the minibuffer or a minibuffer attached to each X window; + property lists associated with regions of text in a buffer; multiple + fonts and colors defined by those properties; simplified and improved + processing of function keys, mouse clicks and mouse movement; X + selection processing, including clipboard selections; hooks to be run if + point or mouse moves outside a certain range; menu bars and popup menus + defined by keymaps; scrollbars; before and after change hooks; + source-level debugging of Emacs Lisp programs; European character sets + support; floating point numbers; improved buffer allocation, including + returning storage to the system when a buffer is killed; interfacing + with the X resource manager; GNU configuration scheme support; good RCS + support; & many updated libraries. + + Recent features include support for Motif widgets as well as the Athena + widgets, displaying multiple views of an outline at the same time, + version control support for CVS and for multiple branches, ability to + open frames on more than one X display from a single Emacs job, + operation on MS-DOS and MS Windows, commands to edit text properties, + text properties for formatting text, the ability to save text properties + in files, & GNU-standard long named command line options. + + Emacs 19.29 is believed to work on, in hardware order: Acorn Risc + machine (RISCiX); Alliant FX/2800 (BSD); Alpha (OSF/1); Apollo + (DomainOS); Bull DPX/2 2nn & 3nn (SysV.3) & sps7 (SysV.2); Clipper; + Convex (BSD); Cubix QBx (SysV); Data General Aviion (DGUX); DEC MIPS + (Ultrix 4.2 & OSF/1, not VMS); Elxsi 6400 (SysV); Gould Power Node & NP1 + (4.2 & 4.3BSD); Harris Night Hawk 1200 and 3000, 4000 and 5000 (cxux); + Honeywell XPS100 (SysV); HP 9000 series 200, 300, 700, 800 (but not 500) + (4.3BSD or HP-UX 7, 8, 9); Intel i386, i486 and Pentium (386BSD, AIX, + BSDI/386, FreeBSD, Esix, GNU/Linux, ISC, MS-DOS (*note MS-DOS + Diskettes::. & *Note MS-DOS CD-ROM::), NetBSD, SCO3.2v4, SysV, Xenix, + WindowsNT); IBM RS6000 (AIX 3.2); IBM RT/PC (AIX or BSD); Motorola Delta + 147 & 187 (SysV.3, SysV.4, & m88kbcs); National Semiconductor 32K + (Genix); NeXT (BSD or Mach 2 w/ NeXTStep 3.0); Paragon (OSF/1); Prime + EXL (SysV); Pyramid (BSD); Sequent Symmetry (BSD, ptx); Siemens RM400 + and RM600 (SysV); SGI Iris 4D (Irix 4.x & 5.x); Sony News/RISC (NewsOS); + Stardent i860 (SysV); Sun 3 & 4, SPARC 1, 1+, 2, 10 & Classic (SunOS + 4.0, 4.1, Solaris 2.0-2.3); Tadpole 68k (SysV); Tektronix XD88 (SysV.3) + & 4300 (BSD); & Titan P2 & P3 (SysV). + + In operating system order: AIX (i386, RS6000, RT/PC); 4.1, 4.2, 4.3BSD + (i386, i860, Convex, Gould Power Node & NP1, HP9000 series 300, NeXT, + Pyramid, Symmetry, Tektronix 4300, RT/PC); DG/UX (Aviion); + DomainOS(Apollo); Esix (i386); FreeBSD (i386); Genix (ns32k); GNU/Linux + (i386); HP-UX 7, 8, 9 (HP 9000 series 200, 300, 700, 800, but not 500); + Irix 4 & 5 (Iris 4D); ISC (i386); Mach 2 & 3 (i386, NeXT); MS-DOS (*note + MS-DOS Diskettes::. & *Note MS-DOS CD-ROM::); NetBSD (i386, HP9000 + series 300); OSF/1 (Alpha, Paragon); RISCiX (Acorn); SCO 3.2v4 (i386); + SysV (Cubix QBx, Elxsi 6400, Honeywell XPS100, Intel i386, Prime EXL, + Siemens RM400 and RM600, Stardent, Tadpole 68k, Titan P2 & P3); SysV.2 + (Bull sps7); SysV.3 (Bull DPX/2 2nn & 3nn, Motorola Delta 147 & 187, + Tektronix XD88); SysV.4 (Motorola Delta 147 & 187, Stardent i860); + Solaris 2 (SPARC 1, 1+, 2, 10, Classic); SunOS 4.0, 4.1 (Sun 3 & 4, + SPARC 1, 1+, 2, 10 & Classic); Ultrix 4.2 (DEC MIPS); Windows NT; & + Xenix (i386). + + Other configurations supported by Emacs 18 should work with few changes + in Emacs 19; as users tell us more about their experiences with different + systems, we will augment the list. Also see *Note Forthcoming GNUs::. + + * `es' (SrcCD, UtilT) + + `es' is an extensible shell based on `rc' with first class functions, + lexical scope, exceptions, and rich return values (i.e., functions can + return values other than just numbers). `es''s extensibility comes from + the ability to modify and extend the shell's builtin services, such as + path searching and redirection. Like `rc', it is great for both + interactive use and for scripting, particularly since its quoting rules + are much less baroque than the C or Bourne shells. + + * `f2c' (LangT, SrcCD) + + `f2c' converts Fortran-77 source files into C or C++, which can be + compiled with GCC. You can get bug fixes by FTP from site + `netlib.att.com' or by email from `netlib@research.att.com'. The fixes + are summarized in the file `/netlib/f2c/changes.Z'. *Note Forthcoming + GNUs::, for information about GNU Fortran. + + * Fileutils (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + The fileutils work on files: `chgrp', `chmod', `chown', `cp', `dd', `df', + `dir', `du', `install', `ln', `ls', `mkdir', `mkfifo', `mknod', `mv', + `mvdir', `rm', `rmdir', `sync', `touch', & `vdir'. Only some of these + are on the *Note Selected Utilities Diskettes::. + + * Findutils (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + `find' is frequently used both interactively and in shell scripts to + find files which match certain criteria and perform arbitrary operations + on them. Also included are `xargs', which applies a command to a list + of files, and `locate', which scans a database for file names that match + a pattern. + + * Finger (SrcCD, UtilT) + + GNU Finger has more features than other finger programs. For sites with + many hosts, a single host may be designated as the finger "server" host, + and other hosts at that site configured as finger "clients". The server + host collects information about who is logged in to the clients. To + finger a user at a GNU Finger site, a query to any its client hosts gets + useful information. GNU Finger supports many customization features, + including user output filters, and site programmable output for special + target names. + + * `flex' (DjgppD, DosCD, LangT, SrcCD, UtilD) + + `flex' is a replacement for the `lex' scanner generator. `flex' was + written by Vern Paxson of the Lawrence Berkeley Laboratory and generates + far more efficient scanners than `lex' does. Source for the `Flex + Manual' and reference card are included. *Note Documentation::. + + * FlexFAX (UtilT) + + FlexFAX is now called HylaFAX. For more information, *Note GNU + Software::. + + * Fontutils (SrcCD, UtilT) + + The fontutils create fonts for use with Ghostscript or TeX, starting + with a scanned type image and converting the bitmaps to outlines. They + also contain general conversion programs and other utilities. + + Fontutils programs include: `bpltobzr', `bzrto', `charspace', + `fontconvert', `gsrenderfont', `imageto', `imgrotate', `limn', and + `xbfe'. + + * GAWK (DjgppD, DosCD, LangT, SrcCD) + + GAWK is upwardly compatible with the latest POSIX specification of + `awk'. It also provides several useful extensions not found in other + `awk' implementations. Texinfo source for the `GAWK Manual' comes with + the software. *Note Documentation::. + + * GCC (BinCD, DjgppD, DosCD, LangT, SrcCD, VMSCompT) + + Version 2 of the GNU C Compiler supports multiple languages; the source + file name suffix or a compiler option selects the language. The GNU C + Compiler distribution includes support for C, C++ and Objective-C. + Support for Objective-C was donated by NeXT. The runtime support needed + to run Objective-C programs is now distributed with GCC (this does not + include any Objective-C classes aside from `object'). As much as + possible, G++ is kept compatible with the evolving draft ANSI standard, + but not with `cfront' (AT&T's compiler), which has been diverging from + ANSI. + + The GNU C Compiler is a fairly portable optimizing compiler which + performs automatic register allocation, common sub-expression + elimination, invariant code motion from loops, induction variable + optimizations, constant propagation and copy propagation, delayed + popping of function call arguments, tail recursion elimination, + integration of inline functions and frame pointer elimination, + instruction scheduling, loop unrolling, filling of delay slots, leaf + function optimization, optimized multiplication by constants, a certain + amount of common subexpression elimination (CSE) between basic blocks + (though not all of the supported machine descriptions provide for + scheduling or delay slots), a feature for assigning attributes to + instructions, and many local optimizations that are automatically + deduced from the machine description. Position-independent code is + supported on the 68k, i386, i486, Pentium, Hitachi Slt, Hitachi H8/300, + Clipper, 88k, SPARC & SPARClite. + + GCC can open-code most arithmetic on 64-bit values (type `long long + int'). It supports extended floating point (type `long double') on the + 68k; other machines will follow. + + GCC supports full ANSI C, traditional C & GNU C extensions (including: + nested functions support, nonlocal gotos & taking the address of a + label). + + GCC can generate a.out, COFF, ELF & OSF-Rose files when used with a + suitable assembler. It can produce debugging information in these + formats: BSD stabs, COFF, ECOFF, ECOFF with stabs & DWARF. + + GCC generates code for many CPUs, including: a29k, Alpha, ARM, AT&T + DSP1610, Convex cN, Clipper, Elxsi, Fujitsu Gmicro, H8/300, HP-PA (1.0 + and 1.1) i370, i386, i486, Pentium, i860, i960, m68k, m68020, m68030, + m68040, m88k, MIL-STD-1750a, MIPS, ns32k, PDP-11, Pyramid, ROMP, RS6000, + SH, SPARC, SPARClite, VAX, & we32k. + + Operating systems supported include: AIX, ACIS, AOS, BSD, Clix, Ctix, + DG/UX, Dynix, Genix, GNU, HP-UX, ISC, Irix, GNU/Linux, Luna, LynxOS, + Mach, Minix, NetBSD, NewsOS, OSF, OSF-Rose, RISCOS, SCO, Solaris 2, + SunOS 4, SysV, Ultrix, Unos, VMS & Windows/NT. + + Using the configuration scheme for GCC, building a cross-compiler is as + easy as building a native compiler. + + We no longer maintain version 1 of GCC, G++, or libg++. + + Texinfo source for the `Using and Porting GNU CC' manual, is included + with GCC. *Note Forthcoming GNUs::, for plans for later releases of + GCC. + + * GDB (BinCD, DjgppD, DosCD, LangT, SrcCD) + + GDB, the GNU DeBugger, is a source-level debugger which supports C, C++, + and Fortran. + + GDB can debug both C and C++ programs, and will work with executables + produced by many different compilers; however, C++ debugging will have + some limitations if you do not use GCC. + + GDB has a command line user interface; GNU Emacs comes with a GDB mode, + and `xxgdb' provides an X interface (but it is not distributed or + maintained by the FSF; FTP it from `ftp.x.org' in the + `/contrib/utilities' directory). + + Executable files and symbol tables are read via the BFD library, which + allows a single copy of GDB to debug programs with multiple object file + formats (e.g., a.out, COFF, ELF). Other features include a rich command + language, remote debugging over serial lines or TCP/IP, and watchpoints + (breakpoints triggered when the value of an expression changes). + + GDB defines a standard interface for simulators, and the included + simulator library includes simulators for the Zilog Z8001/2, Hitachi + H8/300, H8/500 & Super-H. + + GDB can perform cross-debugging. To say that GDB "targets" a platform + means that it can perform native or cross-debugging for it. To say that + GDB can "host" a given platform means that it can be built on it, but + cannot necessarily debug native programs. GDB can: + + * "target" & "host": Amiga 3000 (Amix), DEC Alpha (OSF/1), DECstation + 3100 & 5000 (Ultrix), HP 9000/300 (BSD, HP-UX), HP 9000/700 (HP-UX), + i386 (BSD, FreeBSD, GNU/Linux, LynxOS, NetBSD, SCO), IBM RS/6000 + (AIX, LynxOS), Motorola Delta m88k (System V, CX/UX), PC532 + (NetBSD), Motorola m68k MVME-167 (LynxOS), NCR 3000 (SVR4), SGI + (Irix V3, V4, V5), SONY News (NewsOS 3.x), SPARC (SunOS 4.1, + Solaris, NetBSD, LynxOS) Sun-3 (SunOS 4.1), & Ultracomputer (a29k + running Sym1). + + * "target", but not "host": AMD 29000 (COFF & a.out), Hitachi H8/300, + Hitachi SH, i386 (a.out, COFF, OS/9000) i960 (Nindy, VxWorks), + m68k/m68332 (a.out, COFF, VxWorks), MIPS (IDT ecoff, ELF), Fujitsu + SPARClite (a.out, COFF), & Z8000. + + * "host", but not "target": IBM RT/PC (AIX), and HP/Apollo 68k (BSD). + + GDB can use the symbol tables emitted by the vendor-supplied compilers of + most MIPS-based machines, including DEC. (These tables are in a format + which almost nobody else uses.) Source for the manual + `Debugging with GDB' and a reference card are included. *Note + Documentation::. + + * `gdbm' (LangT, SrcCD, UtilD) + + `gdbm' is the GNU replacement for the traditional `dbm' and `ndbm' + libraries. It implements a database using quick lookup by hashing. + `gdbm' does not ordinarily make sparse files (unlike its Unix and BSD + counterparts). + + * Ghostscript (DjgppD, DosCD, SrcCD, UtilT) + + GNU Ghostscript is the GNU release of Ghostscript, which is an + interpreter for the Postscript graphics language (*note Forthcoming + GNUs::., for news on future plans). + + The current version of GNU Ghostscript is 2.6.2. Features include the + ability to use the fonts provided by the platform on which Ghostscript + runs (X Window System and Microsoft Windows), resulting in much + better-looking screen displays; improved text file printing (like + `enscript'); a utility to extract the text from a Postscript language + document; a much more reliable (and faster) Microsoft Windows + implementation; support for Microsoft C/C++ 7.0; drivers for many new + printers, including the SPARCprinter, and for TIFF/F (fax) file format; + many more Postscript Level 2 facilities, including most of the color + space facilities (but not patterns), and the ability to switch between + Level 1 and Level 2 dynamically. Version 2.6.2 adds a LaserJet 4 driver + and several important bug fixes to version 2.6.1. + + Ghostscript executes commands in the Postscript language by writing + directly to a printer, drawing on an X window, or writing to a file for + later printing (or to a bitmap file that you can manipulate with other + graphics programs). + + Ghostscript includes a C-callable graphics library (for client programs + that do not want to deal with the Postscript language). It also supports + IBM PCs and compatibles with EGA, VGA, or SuperVGA graphics (but please + do *not* ask the FSF staff any questions about this; we do not use PCs). + + * Ghostview (SrcCD, UtilT) + + Tim Theisen, `ghostview@cs.wisc.edu', has created Ghostview, a previewer + for multi-page files with an X11 user interface. Ghostview and + Ghostscript function as two cooperating programs; Ghostview creates a + viewing window and Ghostscript draws in it. + + * `gmp' (LangT, SrcCD) + + GNU mp is a library for arbitrary precision arithmetic on signed integers + and rational numbers. It has a rich set of functions with a regular + interface. + + * GNATS (SrcCD, UtilT) + + GNATS (GNats: A Tracking System, not to be confused with GNAT, The GNU + Ada Translator) is a bug-tracking system. It is based upon the paradigm + of a central site or organization which receives problem reports and + negotiates their resolution by electronic mail. Although it has been + used primarily as a software bug-tracking system so far, it is + sufficiently generalized so that it could be used for handling system + administration issues, project management or any number of other + applications. + + * `gnuplot' (SrcCD, UtilT, WdwsD) + + `gnuplot' is an interactive program for plotting mathematical + expressions and data. It handles both curves (2 dimensions) and surfaces + (3 dimensions). Curiously, the program was neither written nor named for + the GNU Project; the name is a coincidence. Various GNU programs use + `gnuplot' to produce graphical output. + + * GnuGo (SrcCD, UtilT) + + GnuGo plays the game of Go (Wei-Chi); it is not yet very sophisticated. + + * `gperf' (LangT, SrcCD) + + `gperf' generates perfect hash tables. There are two implementations of + `gperf', written in C and C++. Both produce hash functions in either C + or C++. + + * GNU Graphics (SrcCD, UtilT) + + GNU Graphics is a system which produces x-y plots from ASCII or binary + data. It supports output in Postscript, Tektronix 4010 compatible and + Unix device-independent "plot" formats as well as a previewer for the X + Window System. Features include a `spline' interpolation program; + examples of shell scripts using `graph' and `plot'; and a statistics + toolkit; and output in TekniCAD TDA and ln03 file formats. Email bugs or + questions to Rich Murphey, `Rich@lamprey.utmb.edu'. + + * grep (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + This package has GNU `grep', `egrep', and `fgrep' which find lines that + match inputed patterns. They are much faster than the traditional Unix + versions. + + * Groff (DjgppD, DosCD, SrcCD, UtilT) + + Groff is a document formatting system based on an implementation of + device-independent troff, which also includes implementations of `eqn', + `nroff', `pic', `refer', `tbl', `troff', and the `man', `ms', and `mm' + macros, as well as drivers for Postscript, TeX `dvi' format, and + typewriter-like devices. + + Groff's `mm' macro package is almost compatible with the DWB `mm' macros + and has several extensions. Also included is a modified version of the + Berkeley `me' macros and an enhanced version of the X11 `xditview' + previewer. Written in C++, these programs can be compiled with GNU C++ + Version 2.5 or later. A driver for the LaserJet 4 series of printers is + currently in test. + + Groff users are encouraged to contribute enhancements. Most needed are + complete Texinfo documentation, a `grap' emulation (a `pic' preprocessor + for typesetting graphs), a page-makeup postprocessor similar to `pm' + (see `Computing Systems', Vol. 2, No. 2; ask `office@usenix.org' how to + get a copy) and an ASCII output class for `pic' so that `pic' can be + integrated with Texinfo. Questions and bug reports from users who have + read the documentation provided with groff can be sent to + `bug-groff@prep.ai.mit.edu'. + + * `gzip' (DjgppD, DosCD, LangT, LspEmcT, SrcCD, UtilT) + + Some of the contents of our tape and FTP distributions are compressed. + We have software on our tapes and FTP sites to uncompress these files. + Due to patent troubles with `compress', we use another compression + program, `gzip'. (Such prohibitions on software development are fought + by the League for Programming Freedom, *note What Is the LPF::., for + details.) `gzip' can expand LZW-compressed files but uses another, + unpatented algorithm for compression which generally produces better + results. It also expands files compressed with System V's `pack' + program. + + * `hello' (DjgppD, DosCD, SrcCD, UtilT) + + The GNU `hello' program produces a familiar, friendly greeting. It + allows non-programmers to use a classic computer science tool which would + otherwise be unavailable to them. Because it is protected by the GNU + General Public License, users are free to share and change it. + + Like any truly useful program, `hello' contains a built-in mail reader. + + * `hp2xx' (SrcCD, UtilT) + + GNU `hp2xx' reads HP-GL files, decomposes all drawing commands into + elementary vectors, and converts them into a variety of vector and raster + output formats. It is also an HP-GL previewer. Currently supported + vector formats include encapsulated Postscript, Uniplex RGIP, Metafont + and various special TeX-related formats, and simplified HP-GL (line + drawing only) for imports. Raster formats supported include IMG, PBM, + PCX, & HP-PCL (including Deskjet & DJ5xxC support). Previewers work + under X11 (Unix), OS/2 (PM & full screen), MS-DOS (SVGA, VGA, & HGC). + + * HylaFAX (UtilT) + + HylaFAX is a facsimile system for Unix systems. It supports sending, + receiving, and polled retrieval of facsimile, as well as transparent + shared data use of the modem. Information is also available on the + World Wide Web at URL: `http://www.vix.com/hylafax/'. + + * `indent' (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + GNU `indent' is a revision of the BSD version. By default, it formats C + source according to the GNU coding standards. The BSD default, K&R and + other formats are available as options. It is also possible to define + your own format. GNU `indent' is more robust and provides more + functionality than other versions, e.g., it handles C++ comments. + + * Ispell (DjgppD, DosCD, SrcCD, UtilT) + + Ispell is an interactive spell checker that suggests "near misses" as + replacements for unrecognized words. System & user-maintained + dictionaries for multiple languages can be used. Standalone & GNU Emacs + interfaces are available. Previously, the GNU Project had its own + version of ispell ("Ispell 4.0"), but has dropped it for a parallel + branch that has had more development ("Ispell 3.1"). (Version 3 was an + earlier release from the original Ispell author, but others have since + made it more sophisticated.) + + * JACAL *Not available from the FSF* + + JACAL is a symbolic mathematics system for the manipulation and + simplification of equations and single and multiple-valued algebraic + expressions constructed of numbers, variables, radicals, differential + operators, and algebraic and holonomic functions. Vectors, matrices, + and tensors of these objects are also supported. + + JACAL was written in Scheme by Aubrey Jaffer. It comes with SCM, an IEEE + P1178 and R4RS compliant version of Scheme written in C. SCM runs on + Amiga, Atari-ST, MS-DOS, OS/2, NOS/VE, Unicos, VMS, Unix, and similar + systems. SLIB is a portable Scheme library used by JACAL. + m{No Value For "ergegrafkludge"} The FSF is not distributing JACAL on + any media. To receive an IBM PC floppy disk with the source and + executable files, send $99.00 to: + Aubrey Jaffer + 84 Pleasant Street + Wakefield, MA 01880-1846 + USA + + * `less' (SrcCD, UtilD, UtilT) + + `less' is a display paginator similar to `more' and `pg' but with + various features (such as the ability to scroll backwards) that most + pagers lack. + + * `m4' (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + GNU `m4' is an implementation of the traditional Unix macro processor. + It is mostly SVR4 compatible, although it has some extensions (for + example, handling more than 9 positional parameters to macros). `m4' + also has built-in functions for including files, running shell commands, + doing arithmetic, etc. + + * `make' (BinCD, DjgppD, DosCD, LangT, LspEmcT, SrcCD, UtilD, + UtilT) + + GNU `make' supports POSIX 1003.2 and has all but a few obscure features + of the BSD and System V versions of `make', as well as many of our own + extensions. GNU extensions include long options, parallel compilation, + flexible implicit pattern rules, conditional execution and powerful text + manipulation functions. Texinfo source for the `Make Manual' comes with + the program. *Note Documentation::. + + GNU `make' is on several of our tapes because some system vendors supply + no `make' utility at all, and some native `make' programs lack the + `VPATH' feature essential for using the GNU configure system to its full + extent. The GNU `make' sources have a shell script to build `make' + itself on such systems. + + MS-DOS binaries for `make' are available with the DJGPP distribution. + + * MandelSpawn (SrcCD, UtilT) + + A parallel Mandelbrot generation program for the X Window System. + + * mtools (SrcCD, UtilT) + + mtools is a set of public domain programs to allow Unix systems to read, + write and manipulate files on an MS-DOS file system (usually a diskette). + + * MULE (EmcsD, DosCD, SrcCD) + + MULE is a MULtilingual Enhancement to GNU Emacs. It can handle many + character sets at once including Japanese, Chinese, Korean, Vietnamese, + Thai, Greek, the ISO Latin-1 through Latin-8 character sets, Ukrainian, + Arabic, Hebrew, Russian, and other Cyrillic alphabets. A text buffer in + MULE can contain a mixture of characters from these languages. To input + any of these characters, you can use various input methods provided by + MULE itself. In addition, if you use MULE under some terminal emulators + (kterm, cxterm, or exterm), you can use its input methods. MULE is + being merged into GNU Emacs. *Note GNU and Other Free Software in + Japan::, for more information about MULE. + + * NetHack (SrcCD, UtilT) + + NetHack is a display-oriented adventure game similar to Rogue. Both + ASCII and X displays are supported. + + * NIH Class Library (LangT, SrcCD) + + The NIH Class Library (formerly known as "OOPS", Object-Oriented Program + Support) is a portable collection of C++ classes, similar to those in + Smalltalk-80, which has been developed by Keith Gorlen of the National + Institutes of Health (NIH), using the C++ programming language. + + * `nvi' (SrcCD, UtilT) + + `nvi' is a free implementation of the `vi'/`ex' Unix editor. It has + most of the functionality of the original `vi'/`ex', except "open" mode + & the `lisp' option, which will be added. Enhancements over `vi'/`ex' + include split screens with multiple buffers, handling 8-bit data, + infinite file & line lengths, tag stacks, infinite undo & extended + regular expressions. It runs under GNU/Linux, BSD, NetBSD, FreeBSD, + BSDI, AIX, HP-UX, DGUX, IRIX, PSF, PTX, Solaris, SunOS, Ultrix, Unixware + & should port easily to many other systems. + + * GNU Objective-C Library (LangT, SrcCD) + + The GNU Objective-C Class Library (`libobjects') is a library of + general-purpose, non-graphical Objective-C objects written by Andrew + McCallum and other volunteers. It includes collection classes for + maintaining groups of objects and C types, streams for I/O to various + destinations, coders for formatting objects and C types to streams, ports + for network packet transmission, distributed objects (remote object + messaging), string classes, pseudo-random number generators, and time + handling facilities. The package will also include the foundation + classes for the GNUStep project; over 50 of these classes have already + been implemented. The library is known to work on i386, i486, Pentium, + m68k, SPARC, MIPS, & RS6000. Send queries and bug reports to + `mccallum@gnu.ai.mit.edu'. + + * `OBST' (LangT, SrcCD) + + `OBST' is a persistent object management system with bindings to C++. + `OBST' supports incremental loading of methods. Its graphical tools + require the X Window System. It features a hands-on tutorial including + sample programs. It compiles with g++ and should install easily on most + Unix platforms. + + * Octave (LangT, SrcCD) + + Octave is a high-level language similar to MATLAB that is primarily + intended for numerical computations. It provides a convenient command + line interface for solving linear and nonlinear problems numerically. + m{No Value For "ergegrafkludge"} Octave does arithmetic for real and + complex scalars and matrices, solves sets of nonlinear algebraic + equations, integrates systems of ordinary differential and + differential-algebraic equations, and integrates functions over finite + and infinite intervals. Two- and three-dimensional plotting is + available using `gnuplot'. Send queries and bug reports to: + `bug-octave@che.utexas.edu'. Source is included for a 220+ page + Texinfo manual, which is not yet published by the FSF. + + * Oleo (SrcCD, UtilT) + + Oleo is a spreadsheet program (better for you than the more expensive + spreadsheets). It supports the X Window System and character-based + terminals, and can output Embedded Postscript renditions of spreadsheets. + Keybindings should be familiar to Emacs users and are configurable. + Under X and in Postscript output, Oleo supports multiple, variable width + fonts. *Note Forthcoming GNUs::, for the plans for later releases of + Oleo. + + * `p2c' (LangT, SrcCD) + + `p2c' is a Pascal-to-C translator written by Dave Gillespie. It + recognizes many Pascal dialects including Turbo, HP, VAX, and ISO, and + produces readable, maintainable, portable C. + + * `patch' (DjgppD, DosCD, SrcCD, UtilT) + + `patch' is our version of Larry Wall's program to take `diff''s output + and apply those differences to an original file to generate the modified + version. + + * PCL (LspEmcT, SrcCD) + + PCL is a free implementation of a large subset of CLOS, the Common Lisp + Object System. It runs under both GCL and CLISP, mentioned above. + + * `perl' (LangT, SrcCD) + + Larry Wall's `perl' combines the features and capabilities of `sed', + `awk', `sh' and C, as well as interfaces to the Unix system calls and + many C library routines. + + * `ptx' (SrcCD, UtilD, UtilT) + + GNU `ptx' is our version of the traditional permuted index generator. + It handles multiple input files at once, produces TeX compatible output, + & outputs readable "KWIC" (KeyWords In Context) indexes. It does not + yet handle input files that do not fit in memory all at once. + + * `rc' (SrcCD, UtilT) + + `rc' is a shell that features a C-like syntax (much more so than `csh') + and far cleaner quoting rules than the C or Bourne shells. It's + intended to be used interactively, but is also great for writing + scripts. It inspired the shell `es'. + + * RCS (SrcCD, UtilD, UtilT) + + RCS, the Revision Control System, is used for version control & + management of software projects. When used with GNU `diff', RCS can + handle binary files (executables, object files, 8-bit data, etc). Also + see the item about CVS in this section. + + * `recode' (SrcCD, UtilT) + + GNU `recode' converts files between character sets and usages. When + exact transliterations are not possible, it may get rid of the offending + characters or fall back on approximations. This program recognizes or + produces nearly 150 different character sets and is able to + transliterate files between almost any pair. Most RFC 1345 character + sets are supported. + + * regex (LangT, SrcCD) + + The GNU regular expression library supports POSIX.2, except for + internationalization features. It is included in many GNU programs which + do regular expression matching and available separately. An alternative + regular expression package, `rx', comes with `sed'; it has the potential + to be faster than `regex' in most cases, but still needs work. + + * Scheme (SchmT, SrcCD) + + For information about Scheme, see *Note Scheme Tape::. + + * `screen' (SrcCD, UtilT) + + `screen' is a terminal multiplexer that runs several separate "screens" + (ttys) on a single character-based terminal. Each virtual terminal + emulates a DEC VT100 plus several ISO 6429 (ECMA 48, ANSI X3.64) and ISO + 2022 functions. Arbitrary keyboard input translation is also supported. + `screen' sessions can be detached and resumed later on a different + terminal type. Output in detached sessions is saved for later viewing. + + * `sed' (DjgppD, DosCD, SrcCD, UtilD, UtilT) + + `sed' is a stream-oriented version of `ed'. GNU `sed' comes with the + `rx' library, a faster version of `regex' (*note Forthcoming GNUs::.). + + * Sharutils (SrcCD, UtilT) + + `shar' makes so-called shell archives out of many files, preparing them + for transmission by electronic mail services, while `unshar' helps + unpack these shell archives after reception. `uuencode' prepares a file + for transmission over an electronic channel which ignores or otherwise + mangles the high order bit of bytes, while `uudecode' does the converse + transformation. + + * Shellutils (DjgppD, DosCD, SrcCD, UtilT) + + Use shellutils interactively or in shell scripts: `basename', `date', + `dirname', `echo', `env', `expr', `false', `groups', `hostname', `id', + `logname', `nice', `nohup', `pathchk', `printenv', `printf', `pwd', + `sleep', `stty', `su', `tee', `test', `true', `tty', `uname', `users', + `who', `whoami', and `yes'. + + * GNU Shogi (SrcCD, UtilT) + + Shogi is a Japanese game similar to Chess; a major difference is that + captured pieces can be returned into play. GNU Shogi is a variant of + GNU Chess; GNU Shogi implements the same features as GNU Chess and uses + similar heuristics. As a new feature, sequences of partial board + patterns can be introduced in order to help the program play toward + specific opening patterns. There are both character and X display + interfaces. GNU Shogi is primarily supported by Matthias Mutz on + behalf of the FSF. + + * Smalltalk (LangT, SrcCD) + + GNU Smalltalk is an interpreted object-oriented programming language + system written in highly portable C. It has been successfully ported to + many Unix and some other platforms, including DOS (but these non-Unix + ports are not available from the FSF). Current features include a + binary image save capability, the ability to invoke user-written C code + and pass parameters to it, a GNU Emacs editing mode, a version of the X + protocol invocable from Smalltalk, optional byte-code compilation + tracing and byte-code execution tracing, and automatically loaded + per-user initialization files. It implements all of the classes and + protocol in the Smalltalk-80 book "Smalltalk-80: The Language", except + for the graphic user interface (`GUI') related classes. + + *Note Forthcoming GNUs::, for plans for later releases of Smalltalk. + + * Superopt (LangT, SrcCD) + + Superopt is a function sequence generator that uses an exhaustive + generate-and-test approach to find the shortest instruction sequence for + a given function. You provide a function as input, a CPU to generate + code for, and how many instructions you can accept. Its application in + GCC is described in the `ACM SIGPLAN PLDI'92' proceedings. Superopt + supports: SPARC, m68k, m68020, m88k, IBM RS/6000, AMD 29000, Intel + 80x86, Pyramid, DEC Alpha, & HP-PA. + + * `tar' (SrcCD, UtilT) + + GNU `tar' includes multivolume support, the ability to archive sparse + files, automatic archive compression/decompression, remote archives and + special features that allow `tar' to be used for incremental and full + backups. Unfortunately, GNU `tar' implements an early draft of the + POSIX 1003.1 `ustar' standard which is different from the final + standard. Adding support for the new changes in a backward-compatible + fashion is not trivial. + + * Termcap Library (SrcCD, UtilT) + + The GNU Termcap library is a drop-in replacement for `libtermcap.a' on + any system. It does not place an arbitrary limit on the size of Termcap + entries, unlike most other Termcap libraries. Included is source for the + `Termcap Manual' in Texinfo format. *Note Documentation::. + + * TeX (SrcCD) + + TeX is a document formatting system that handles complicated + typesetting, including mathematics. It is GNU's standard text formatter. + + You can obtain TeX from the University of Washington, which maintains and + supports a tape distribution of TeX for Unix systems. The core material + consists of Karl Berry's `web2c' TeX package, the sources for which are + available via anonymous ftp; retrieval instructions are in + `pub/tex/unixtex.ftp' on `ftp.cs.umb.edu'. If you receive any + installation support from the University of Washington, please consider + sending them a donation. + + To order a full distribution written in `tar' on either a 1/4inch + 4-track QIC-24 cartridge or a 4mm DAT cartridge, send $210.00 to: + + Pierre A. MacKay + Department of Classics + DH-10, Denny Hall 218 + University of Washington + Seattle, WA 98195 + USA + + Electronic-Mail: `mackay@cs.washington.edu' + Telephone: +1-206-543-2268 + + Please make checks payable to the University of Washington. Do not + specify any other payee. That causes accounting difficulties. Checks + must be in U.S. dollars, drawn on a U.S. bank. Prepaid orders are the + only orders that can now be handled. Overseas sites: please add to the + base cost $20.00 for shipment via air parcel post, or $30.00 for + shipment via courier. Please check with the above for current prices + and formats. + + * Texinfo (DjgppD, DosCD, LangT, LspEmcT, SrcCD, UtilD, UtilT) + + Texinfo is a set of utilities which generate both printed manuals and + online hypertext documentation (called "Info"). There are also programs + for reading online Info documents. Version 3 has both GNU Emacs Lisp + and standalone programs written in C or shell script. Texinfo mode for + GNU Emacs enables easy editing and updating of Texinfo files. Programs + provided include `makeinfo', `info', `texi2dvi', `texindex', `tex2patch', + and `fixfonts'. Source for the `Texinfo Manual' is included. *Note + Documentation::. + + * Textutils (DjgppD, DosCD, SrcCD, UtilT) + + The Textutils programs manipulate textual data. They include: `cat', + `cksum', `comm', `csplit', `cut', `expand', `fmt', `fold', `head', + `join', `nl', `od', `paste', `pr', `sort', `split', `sum', `tac', `tail', + `tr', `unexpand', `uniq', and `wc'. + + * Tile Forth (LangT, SrcCD) + + Tile Forth is a 32-bit implementation of the Forth-83 standard written + in C, allowing it to be easily ported to new systems, and extended with + "any" C-function (graphics, windowing, etc). Many Forth libraries with + full documentation are available including ones for top-down parsing, + multi-threads, and object oriented programming. + + * `time' (SrcCD, UtilT) + + `time' is used to report statistics (usually from a shell) about the + amount of user, system and real time used by a process. On some systems + it also reports memory usage, page faults, and other statistics. + + * `tput' (SrcCD, UtilT) + + `tput' is a portable way for shell scripts to use special terminal + capabilities. Our `tput' uses the Termcap database, instead of Terminfo + as most others do. + + * UUCP (SrcCD, UtilT) + + This version of UUCP was written by Ian Lance Taylor, and is GNU's + standard UUCP system. It supports the `f', `g' and `v' (in all window + and packet sizes), `G', `t', `e', Zmodem and two new bidirectional (`i' + and `j') protocols. If you have a Berkeley sockets library, it can make + TCP connections. If you have TLI libraries, it can make TLI + connections. Source is included for a Texinfo manual, which is not yet + published by the FSF. + + * `wdiff' (DjgppD, DosCD, SrcCD, UtilT) + + `wdiff' is a front-end to GNU `diff'. It compares two files, finding + the words deleted or added to the first to make the second. It has many + output formats and works well with terminals and pagers. `wdiff' is + very useful when two texts differ only by a few words and paragraphs + have been refilled. + + * `Ygl' (SrcCD, UtilT) + + `Ygl' emulates SGI's GL (Graphics Language) library under X11. It runs + under GNU/Linux with XFree, AIX 3.2, ConvexOS, HP-UX 7.0/8.0/9.0, SunOS + and many others. + + + + Program/Package Cross Reference - (NOT COMPLETELY UP TO DATE) + ******************************* + + Here is a list of what package each GNU program or library is in. You can + anonymously FTP a full list in the file `/pub/gnu/ProgramIndex' from a GNU + FTP host (*note How to Get GNU Software::. for a list). + + * a2p perl + * a2x xopt + * ac bsd44 + * accton bsd44 + * acl bsd44 + * acm acm + * acms acm + * addftinfo Groff + * adventure bsd44 + * afm2tfm TeX + * amd bsd44 + * ansitape bsd44 + * AnswerGarden xopt + * apply bsd44 + * appres xreq + * apropos bsd44 + * ar Binutils + * arithmetic bsd44 + * arp bsd44 + * atc bsd44 + * autoconf Autoconf + * autoheader Autoconf + * autoreconf Autoconf + * autoscan Autoconf + * autoupdate Autoconf + * auto_box xopt + * auto_box xreq + + * b2m Emacs + * backgammon bsd44 + * bad144 bsd44 + * badsect bsd44 + * banner bsd44 + * basename Shellutils + * bash BASH + * battlestar bsd44 + * bc bc + * bcd bsd44 + * bdes bsd44 + * bdftops Ghostscript + * beach_ball xopt + * beach_ball xreq + * beach_ball2 xopt + * bibtex TeX + * biff bsd44 + * bison Bison + * bitmap xreq + * boggle bsd44 + * bpltobzr Fontutils + * bugfiler bsd44 + * build ispell + * bzrto Fontutils + + * c++ GCC + * c++filt Binutils + * c2ph perl + * ca100 xopt + * caeser bsd44 + * cal bsd44 + * calendar bsd44 + * canfield bsd44 + * cat Textutils + * cbars wdiff + * cc GCC + * cc1 GCC + * cc1obj GCC + * cc1plus GCC + * cccp GCC + * charspace Fontutils + * checknr bsd44 + * chess bsd44 + * chflags bsd44 + * chgrp Fileutils + * ching bsd44 + * chmod Fileutils + * chown Fileutils + * chpass bsd44 + * chroot bsd44 + * ci RCS + * cksum Textutils + * clisp CLISP + * clri bsd44 + * cmail xboard + * cmmf TeX + * cmodext xopt + * cmp Diffutils + * co RCS + * col bsd44 + * colcrt bsd44 + * colrm bsd44 + * column bsd44 + * comm Textutils + * compress bsd44 + * comsat bsd44 + * connectd bsd44 + * cp Fileutils + * cpicker xopt + * cpio cpio + * cpp GCC + * cppstdin perl + * cribbage bsd44 + * crock xopt + * csh bsd44 + * csplit Textutils + * ctags Emacs + * ctwm xopt + * cu UUCP + * cut Textutils + * cvs CVS + * cvscheck CVS + * cvtmail Emacs + * cxterm xopt + + * d Fileutils + * date Shellutils + * dc bc + * dd Fileutils + * delatex TeX + * demangle Binutils + * descend CVS + * detex TeX + * df Fileutils + * diff Diffutils + * diff3 Diffutils + * digest-doc Emacs + * dipress bsd44 + * dir Fileutils + * dirname Shellutils + * dish xopt + * disklabel bsd44 + * diskpart bsd44 + * dld dld + * dm bsd44 + * dmesg bsd44 + * doschk doschk + * dox xopt + * du Fileutils + * dump bsd44 + * dumpfs bsd44 + * dvi2tty TeX + * dvicopy TeX + * dvips TeX + * dvitype TeX + + * ecc ecc + * echo Shellutils + * ed ed + * edit-pr GNATS + * editres xreq + * edquota bsd44 + * eeprom bsd44 + * egrep grep + * emacs Emacs + * emacsclient Emacs + * emacsserver Emacs + * emacstool Emacs + * emu xopt + * env Shellutils + * eqn Groff + * error bsd44 + * es es + * esdebug es + * etags Emacs + * ex nvi + * expand Textutils + * expect DejaGnu + * expr Shellutils + * exterm xopt + + * f2c f2c + * factor bsd44 + * fakemail Emacs + * false Shellutils + * fastboot bsd44 + * fax2ps HylaFAX + * faxalter HylaFAX + * faxanswer HylaFAX + * faxcover HylaFAX + * faxd HylaFAX + * faxd.recv HylaFAX + * faxmail HylaFAX + * faxquit HylaFAX + * faxrcvd HylaFAX + * faxrm HylaFAX + * faxstat HylaFAX + * fc f2c + * fdraw xopt + * fgrep grep + * file bsd44 + * find Findutils + * find2perl perl + * finger finger + * fingerd finger + * fish bsd44 + * fixfonts Texinfo + * fixinc.svr4 GCC + * fixincludes GCC + * flex flex + * fmt bsd44 + * fold Textutils + * font2c Ghostscript + * fontconvert Fontutils + * forth Tile Forth + * forthicon Tile Forth + * forthtool Tile Forth + * fortune bsd44 + * fpr bsd44 + * freq ispell + * freqtbl ispell + * from bsd44 + * fsck bsd44 + * fsplit bsd44 + * fstat bsd44 + * ftp bsd44 + * ftpd bsd44 + + * g++ GCC + * gas Binutils + * gawk Gawk + * gcc GCC + * gcore bsd44 + * gdb GDB + * genclass libg++ + * getty bsd44 + * gftodvi TeX + * gftopk TeX + * gftype TeX + * ghostview Ghostview + * gnats GNATS + * gnuchess Chess + * gnuchessc Chess + * gnuchessn Chess + * gnuchessr Chess + * gnuchessx Chess + * gnupdisp Shogi + * gnuplot gnuplot + * gnuplot_x11 gnuplot + * gnushogi Shogi + * gnushogir Shogi + * gnushogix Shogi + * go GnuGo + * gpc xopt + * gpc xreq + * gperf gperf + * gperf libg++ + * gprof Binutils + * graph Graphics + * grep grep + * grodvi Groff + * groff Groff + * grops Groff + * grotty Groff + * groups Shellutils + * gs Ghostscript + * gsbj Ghostscript + * gsdj Ghostscript + * gslj Ghostscript + * gslp Ghostscript + * gsnd Ghostscript + * gsrenderfont Fontutils + * gunzip gzip + * gwm xopt + * gzexe gzip + * gzip gzip + + * h2ph perl + * h2pl perl + * hack bsd44 + * hangman bsd44 + * head Textutils + * hello hello + * hexdump bsd44 + * hexl Emacs + * hostname Shellutils + * hp2xx hp2xx + * hterm xopt + + * i18nOlwmV2 xopt + * i2mif xopt + * ico xopt + * ico xreq + * id Shellutils + * ident RCS + * ifconfig bsd44 + * ifnames Autoconf + * ImageMagick xopt + * imageto Fontutils + * iman xopt + * imgrotate Fontutils + * indent indent + * indxbib Groff + * inetd bsd44 + * info Texinfo + * inimf TeX + * init bsd44 + * initex TeX + * inn bsd44 + * install Fileutils + * iostat bsd44 + * ispell ispell + * ixterm xopt + * ixx xopt + + * join Textutils + * jot bsd44 + * jove bsd44 + + * kdestroy bsd44 + * kdump bsd44 + * kermit bsd44 + * kgames xopt + * kgmon bsd44 + * kill bsd44 + * kinit bsd44 + * kinput2 xopt + * klist bsd44 + * kpasswdd bsd44 + * ksrvtgt bsd44 + * kterm xopt + * ktrace bsd44 + + * lam bsd44 + * larn bsd44 + * lasergnu gnuplot + * last bsd44 + * lastcomm bsd44 + * latex TeX + * lclock xopt + * ld Binutils + * leave bsd44 + * less less + * lesskey less + * libbfd.a Binutils + * libbfd.a GAS + * libbfd.a GDB + * libbzr.a Fontutils + * libc.a C Library + * libcompat.a bsd44 + * libcurses.a bsd44 + * libcurses.a nvi + * libedit.a bsd44 + * libF77.a f2c + * libg++.a libg++ + * libgdbm.a gdbm + * libgf.a Fontutils + * libgmp.a gmp + * libI77.a f2c + * libkvm.a bsd44 + * libm.a bsd44 + * libnihcl.a NIHCL + * libnihclmi.a NIHCL + * libnihclvec.a NIHCL + * libnls.a xreq + * liboctave.a Octave + * liboldX.a xreq + * libpbm.a Fontutils + * libPEXt.a xopt + * libpk.a Fontutils + * libresolv.a bsd44 + * librpc.a bsd44 + * libtcl.a DejaGnu + * libtelnet.a bsd44 + * libterm.a bsd44 + * libtermcap.a Termcap + * libtfm.a Fontutils + * libutil.a bsd44 + * libWc.a xopt + * libwidgets.a Fontutils + * libX.a xreq + * libXau.a xreq + * libXaw.a xreq + * libXcp.a xopt + * libXcu.a xopt + * libXdmcp.a xreq + * libXmp.a xopt + * libXmu.a xreq + * libXO.a xopt + * libXop.a xopt + * libXp.a xopt + * libXpex.a xopt + * libXt.a xopt + * libXt.a xreq + * libXwchar.a xopt + * liby.a bsd44 + * libYgl.a Ygl + * limn Fontutils + * listres xopt + * listres xreq + * lkbib Groff + * ln Fileutils + * locate Findutils + * lock bsd44 + * logger bsd44 + * login bsd44 + * logname Shellutils + * look ispell + * lookbib Groff + * lorder bsd44 + * lpr bsd44 + * ls Fileutils + + * m4 m4 + * mail bsd44 + * make Make + * make-docfile Emacs + * make-path Emacs + * makeindex TeX + * makeinfo Texinfo + * MakeTeXPK TeX + * man bsd44 + * man-macros Groff + * mattrib mtools + * maze xopt + * maze xreq + * mazewar xopt + * mcd mtools + * mcopy mtools + * mdel mtools + * mdir mtools + * me-macros Groff + * merge RCS + * mesg bsd44 + * mf TeX + * mformat mtools + * mft TeX + * mgdiff xopt + * mh bsd44 + * mille bsd44 + * mkdep bsd44 + * mkdir Fileutils + * mkfifo Fileutils + * mklocale bsd44 + * mkmanifest mtools + * mkmf bsd44 + * mkmodules CVS + * mknod Fileutils + * mkstr bsd44 + * mlabel mtools + * mm-macros Groff + * mmd mtools + * monop bsd44 + * more bsd44 + * morse bsd44 + * mount bsd44 + * mountd bsd44 + * movemail Emacs + * mprof bsd44 + * mrd mtools + * mread mtools + * mren mtools + * ms-macros Groff + * msgs bsd44 + * mt cpio + * mterm xopt + * mtree bsd44 + * mtype mtools + * mule MULE + * muncher xopt + * mv Fileutils + * mvdir Fileutils + * mwrite mtools + + * nethack Nethack + * netstat bsd44 + * newfs bsd44 + * nfsd bsd44 + * nfsiod bsd44 + * nfsstat bsd44 + * nice Shellutils + * nl Textutils + * nlmconv Binutils + * nm Binutils + * nohup Shellutils + * notify HylaFAX + * nroff Groff + * number bsd44 + + * objc GCC + * objcopy Binutils + * objdump Binutils + * objective-c GCC + * obst-boot OBST + * obst-CC OBST + * obst-cct OBST + * obst-cgc OBST + * obst-cmp OBST + * obst-cnt OBST + * obst-cpcnt OBST + * obst-csz OBST + * obst-dir OBST + * obst-dmp OBST + * obst-gen OBST + * obst-gsh OBST + * obst-init OBST + * obst-scp OBST + * obst-sil OBST + * obst-stf OBST + * oclock xreq + * octave Octave + * od Textutils + * oleo Oleo + * ora-examples xopt + + * p2c p2c + * pagesize bsd44 + * palette xopt + * pascal bsd44 + * passwd bsd44 + * paste Textutils + * patch patch + * patgen TeX + * pathalias bsd44 + * pathchk Shellutils + * pax bsd44 + * pbmplus xopt + * perl perl + * pfbtops Groff + * phantasia bsd44 + * pic Groff + * pig bsd44 + * ping bsd44 + * pixedit xopt + * pixmap xopt + * pktogf TeX + * pktype TeX + * plaid xopt + * plot2fig Graphics + * plot2plot Graphics + * plot2ps Graphics + * plot2tek Graphics + * pltotf TeX + * pollrcvd HylaFAX + * pom bsd44 + * pooltype TeX + * portmap bsd44 + * ppt bsd44 + * pr Textutils + * pr-addr GNATS + * pr-edit GNATS + * primes bsd44 + * printenv Shellutils + * printf Shellutils + * protoize GCC + * ps bsd44 + * ps2ascii Ghostscript + * ps2epsi Ghostscript + * ps2fax HylaFAX + * psbb Groff + * pstat bsd44 + * psycho xopt + * ptx ptx + * pubdic+ xopt + * puzzle xopt + * puzzle xreq + * pwd Shellutils + * pyramid xopt + + * query-pr GNATS + * quiz bsd44 + * quot bsd44 + * quota bsd44 + * quotacheck bsd44 + * quotaon bsd44 + + * rain bsd44 + * random bsd44 + * ranlib Binutils + * rbootd bsd44 + * rc rc + * rcp bsd44 + * rcs RCS + * rcs-to-cvs CVS + * rcs2log Emacs + * rcsdiff RCS + * rcsfreeze RCS + * rcsmerge RCS + * rdist bsd44 + * reboot bsd44 + * recode recode + * recvstats HylaFAX + * refer Groff + * renice bsd44 + * repquota bsd44 + * restore bsd44 + * rev bsd44 + * rexecd bsd44 + * rlog RCS + * rlogin bsd44 + * rlogind bsd44 + * rm Fileutils + * rmail bsd44 + * rmdir Fileutils + * rmt cpio + * rmt tar + * robots bsd44 + * rogue bsd44 + * route bsd44 + * routed bsd44 + * rr xopt + * rs bsd44 + * rsh bsd44 + * rshd bsd44 + * runtest DejaGnu + * runtest.exp DejaGnu + * ruptime bsd44 + * rwho bsd44 + * rwhod bsd44 + + * s2p perl + * sail bsd44 + * savecore bsd44 + * sc bsd44 + * sccs bsd44 + * sccs2rcs CVS + * scdisp xopt + * screen screen + * script bsd44 + * scsiformat bsd44 + * sctext xopt + * sdiff Diffutils + * sed sed + * send-pr GNATS + * sendfax HylaFAX + * sendmail bsd44 + * sgi2fax HylaFAX + * sh bsd44 + * shar Sharutils + * shinbun xopt + * shogi Shogi + * showfont xopt + * showmount bsd44 + * shutdown bsd44 + * size Binutils + * sj3 xopt + * sjxa xopt + * slattach bsd44 + * sleep Shellutils + * sliplogin bsd44 + * snake bsd44 + * snftobdf xopt + * soelim Groff + * sort Textutils + * sos2obst OBST + * spider xopt + * split Textutils + * startslip bsd44 + * stf OBST + * strings Binutils + * strip Binutils + * stty Shellutils + * su Shellutils + * sum Textutils + * superopt Superopt + * swapon bsd44 + * sync bsd44 + * sysctl bsd44 + * syslogd bsd44 + * systat bsd44 + + * tac Textutils + * tail Textutils + * taintperl perl + * talk bsd44 + * talkd bsd44 + * tangle TeX + * tar tar + * tbl Groff + * tcl DejaGnu + * tclsh DejaGnu + * tcopy bsd44 + * tcp Emacs + * tee Shellutils + * tek2plot Graphics + * telnet bsd44 + * telnetd bsd44 + * test Shellutils + * test-g++ DejaGnu + * test-tool DejaGnu + * tetris bsd44 + * tex TeX + * tex3patch Texinfo + * texi2dvi Texinfo + * texindex Texinfo + * texspell TeX + * textfmt HylaFAX + * tfmtodit Groff + * tftopl TeX + * tftp bsd44 + * tftpd bsd44 + * tgrind TeX + * time time + * timed bsd44 + * timer Emacs + * timex xopt + * tip bsd44 + * tkpostage xopt + * tn3270 bsd44 + * touch Fileutils + * tput tput + * tr Textutils + * traceroute bsd44 + * transcript HylaFAX + * transfig xopt + * trek bsd44 + * trn3 bsd44 + * troff Groff + * trpt bsd44 + * trsp bsd44 + * true Shellutils + * tset bsd44 + * tsort bsd44 + * tty Shellutils + * tunefs bsd44 + * tvtwm xopt + * twm xreq + + * ul bsd44 + * umount bsd44 + * uname Shellutils + * uncompress gzip + * unexpand Textutils + * unifdef bsd44 + * uniq Textutils + * unprotoize GCC + * unshar Sharutils + * unvis bsd44 + * update bsd44 + * updatedb Findutils + * users Shellutils + * uuchk UUCP + * uucico UUCP + * uuconv UUCP + * uucp UUCP + * uucpd bsd44 + * uudecode Sharutils + * uudir UUCP + * uuencode Sharutils + * uulog UUCP + * uuname UUCP + * uupick UUCP + * uurate UUCP + * uusched UUCP + * uustat UUCP + * uuto UUCP + * uux UUCP + * uuxqt UUCP + + * v Fileutils + * vacation bsd44 + * vandal xopt + * vcdiff Emacs + * vdir Fileutils + * vftovp TeX + * vgrind bsd44 + * vi nvi + * viewres xopt + * viewres xreq + * vine xopt + * vipw bsd44 + * virmf TeX + * virtex TeX + * vis bsd44 + * vmstat bsd44 + * vptovf TeX + + * w bsd44 + * wakeup Emacs + * wall bsd44 + * wargames bsd44 + * wc Textutils + * wdiff wdiff + * weave TeX + * what bsd44 + * whatis bsd44 + * whereis bsd44 + * who Shellutils + * whoami Shellutils + * whois bsd44 + * window bsd44 + * winterp xopt + * wish DejaGnu + * worm bsd44 + * worms bsd44 + * write bsd44 + * wump bsd44 + + * x11perf xreq + * x2p perl + * xalarm xopt + * xancur xopt + * xargs Findutils + * xauth xreq + * xbfe Fontutils + * xbiff xopt + * xbiff xreq + * xboard xboard + * xboing xopt + * xbuffy3 xopt + * xcalc xopt + * xcalc xreq + * xcalendar xopt + * xcdplayer xopt + * xcell xopt + * xclipboard xreq + * xclock xreq + * xcmdmenu xopt + * xcms xopt + * xcmsdb xreq + * xcmstest xreq + * xco xopt + * xcolorize xopt + * xcolors xopt + * xconsole xreq + * xcrtca xopt + * xdaliclock xopt + * xdiary xopt + * xditview Groff + * xditview xopt + * xditview xreq + * xdm xreq + * xdpyinfo xreq + * xdu xopt + * xdvi TeX + * xdvi xopt + * xdvorak xopt + * xearth xopt + * xed xopt + * xedit xopt + * xedit xreq + * xev xopt + * xev xreq + * xexit xopt + * xeyes xopt + * xeyes xreq + * xfd xreq + * xfed xopt + * xfedor xopt + * xfeoak xopt + * xferstats HylaFAX + * xfig xopt + * xfontsel xopt + * xfontsel xreq + * xforecast xopt + * xgas xopt + * xgas xreq + * xgc xopt + * xgc xreq + * xhearts xopt + * xhelp xopt + * xhost xreq + * xinit xreq + * xkeycaps xopt + * xkill xreq + * xlax xopt + * xlayout xopt + * xlbiff xopt + * xless xopt + * xload xopt + * xload xreq + * xlogin xopt + * xlogo xreq + * xlsatoms xreq + * xlsclients xreq + * xlsfonts xreq + * xmag xreq + * xmail xopt + * xmailbox xopt + * xmailwatcher xopt + * xman xopt + * xman xreq + * xmandel xopt + * xmessage xopt + * xmeter xopt + * xmh xreq + * xmh-icons xopt + * xmh.editor xopt + * xmodmap xreq + * xmon xopt + * xmove xopt + * xmphone xopt + * xpd xopt + * xphoon xopt + * xpipeman xopt + * xplot Graphics + * xpostit xopt + * xpr xopt + * xpr xreq + * xprompt xopt + * xproof xopt + * xprop xreq + * xpserv xopt + * xrdb xreq + * xrefresh xreq + * xrsh xopt + * xrubik xopt + * xrunclient xopt + * xscope xopt + * xscreensaver xopt + * xsession xopt + * xset xreq + * xsetroot xreq + * xshogi xshogi + * xstdcmap xreq + * xstr bsd44 + * xtalk xopt + * xterm xreq + * xterm_color xopt + * xtetris xopt + * xTeXcad.13 xopt + * xtiff xopt + * xtree xopt + * xtv xopt + * xwd xreq + * xwininfo xreq + * xwud xreq + + * yacc bsd44 + * yes Shellutils + * youbin xopt + * yow Emacs + + * zcat gzip + * zcmp gzip + * zdiff gzip + * zforce gzip + * zgrep gzip + * zmore gzip + * znew gzip + + * [ Shellutils + + + + Tapes + ***** + + We offer Unix source code on tapes in `tar' format on these media: + + * 4mm DAT cartridges + + * 8mm Exabyte cartridges + + * Sun DC300XLP QIC-24 1/4in cartridges (readable on some other systems) + + * Hewlett-Packard 16-track DC600HC 1/4in cartridges + + * IBM RS/6000 QIC-150 1/4in cartridges (readable on some other systems) + + * 1600bpi 9-track 1/2in reel tape + + The contents of the reel and various cartridge tapes for Unix systems are the + same (except for the RS/6000 Emacs tape, which also has executables for + Emacs); only the media are different. For pricing information, see the *note + Free Software Foundation Order Form::.. Source code for the manuals and + reference cards is included (*note Documentation::.). + + Some of the files on the tapes may be compressed with `gzip' to make them + fit. Refer to the top-level `README' file at the beginning of each tape for + instructions on uncompressing them. `uncompress' and `unpack' *do not work*! + + + + Languages Tape - (VERSION NUMBERS NOT COMPLETELY UP TO DATE) + -------------- + + This tape contains programming tools: compilers, interpreters, and related + programs (parsers, conversion programs, debuggers, etc.). + + * Binutils 2.5.2 + * Bison 1.22 + * C Library 1.09 + * DejaGnu 1.2 + * dld 3.2.3 + * ecc 1.2.1 + * f2c 1994.11.03 + * flex 2.4.7 + * Gawk 2.15.5 + * GCC/G++/Objective-C 2.7.0 + * GDB 4.13 + * gdbm 1.7.3 + * gmp 1.3.2 + * gperf 2.1a + * gzip 1.2.4 + * indent 1.9.1 + * libg++ 2.6.1 + * libobjects 0.1.0 + * Make 3.72.1 + * NIHCL 3.0 + * OBST 3.4 + * Octave 1.0 + * p2c 1.20 + * perl 4.036 + * perl 5.000 + * regex 0.12 + * rx 0.05 + * Smalltalk 1.1.1 + * Superopt 2.3 + * Texinfo 3.1 + * Tile Forth 2.1 + + + + Lisps and Emacs Tape - (VERSION NUMBERS NOT COMPLETELY UP TO DATE) + -------------------- + + This tape has Common Lisp systems and libraries, GNU Emacs, assorted + extensions that work with GNU Emacs, and a few other important utilities. + + * Calc 2.02c + * CLISP 1994.10.26 + * Common Lisp 1.1 + * elib 0.06 + * Emacs 18.59 + * Emacs 19.29 + * GNU Emacs Lisp Reference Manaul, Ed. 2.3 + * gzip 1.2.4 + * Make 3.72.1 + * MULE 2.1 + * PCL 1993.03.18 + * Texinfo 3.1 + + + + Utilities Tape - (VERSION NUMBERS NOT COMPLETELY UP TO DATE) + -------------- + + This tape consists mostly of smaller utilities and miscellaneous applications. + + * acm 4.6 + * Autoconf 1.11 + * Autoconf 2.1 + * BASH 1.14.2 + * bc 1.03 + * Chess 4.0.73 + * cpio 2.3 + * CVS 1.3 + * dc 0.2 + * Diffutils 2.7 + * doschk 1.1 + * ed 0.2 + * es 0.84 + * Fileutils 3.12 + * Findutils 4.1 + * finger 1.37 + * HylaFAX 2.2.2.1 + * Fontutils 0.6 + * Ghostscript 2.6.1 + * Ghostview 1.5 + * GNATS 3.2 + * GnuGo 1.1 + * gnuplot 3.5 + * Graphics 0.17 + * grep 2.0 + * Groff 1.09 + * gzip 1.2.4 + * hello 1.3 + * hp2xx 3.1.4 + * ispell 3.1.13 + * m4 1.3 + * Make 3.72.1 + * mkisofs 1.01 + * mm 1.07 + * mtools 2.0.7 + * Nethack 3.1.3 + * nvi 1.34 + * Oleo 1.6 + * patch 2.1 + * ptx 0.4 + * rc 1.4 + * RCS 5.6.0.1 + * recode 3.4 + * saoimage 1.08 + * screen 3.5.2 + * screen 3.6.0 + * sed 1.18 & 2.05 + * Sharutils 4.1 + * Shellutils 1.12 + * Shogi 1.2.02 + * tar 1.11.2 + * Termcap 1.2 + * Texinfo 3.1 + * Textutils 1.11 + * time 1.6 + * tput 1.0 + * UUCP 1.05 + * wdiff 0.04 + * xboard 3.1.1 + * xshogi 1.2.02 + * Ygl 2.9 + + + + Scheme Tape + ----------- + + Scheme is a simplified, lexically-scoped dialect of Lisp. It was designed at + MIT and other universities to teach students the art of programming, and to + research new parallel programming constructs and compilation techniques. + + This tape now contains MIT Scheme 7.3, which conforms to the "Revised^4 + Report On the Algorithmic Language Scheme" (MIT AI Lab Memo 848b), for which + TeX source is included. It is written partly in C, but is presently hard to + bootstrap. Binaries that can be used to bootstrap Scheme are available for: + + * HP 9000 series 300, 400, 700 & 800 running HP-UX 7.0 or 8.0 + + * NeXT running NeXT OS 1.0 or 2.0 + + * Sun-3 or Sun-4 running SunOS 4.1 + + * DECstation 3100/5100 running Ultrix 4.0 + + * Sony NeWS-3250 running NEWS OS 5.01 + + * Vax running 4.3BSD + + If your system is not on this list and you don't enjoy the bootstrap + challenge, see the JACAL item in *Note GNU Software::. + + + + X11 Tapes + --------- + + The two X11 tapes contain Version 11, Release 6 of the X Window System. The + first tape contains all of the core software, documentation and some + contributed clients. We call this the "required" X tape since it is + necessary for running X or running GNU Emacs under X. The second, "optional" + tape contains contributed libraries and other toolkits, the Andrew User + Interface System, games, and other programs. + + The X11 Required tape also contains all fixes and patches released to date. + We update this tape as new fixes and patches are released for programs on + both tapes. *Note Tape & CD-ROM Subscription Service::. + + We will distribute X11R5 on tape until X11R6 is stable, and on the *Note + November 1993 Source Code CD-ROM::, while supplies last. + + + + Berkeley 4.4BSD-Lite Tape + ------------------------- + + The "4.4BSD-Lite" release is the last from the Computer Systems Research + Group at the University of California at Berkeley. It has most of the BSD + software system, except for a few files that remain proprietary. It is much + more complete than the previous "Net2" release. + + + + VMS Emacs and VMS Compiler Tapes + -------------------------------- + + We offer two VMS tapes. One has just GNU Emacs 18.59 (none of the other + software on the *Note Lisps/Emacs Tape::, is included). The other has GCC + 2.3.3, Bison 1.19 (to compile GCC), GAS 1.38 (to assemble GCC's output) and + some library and include files (none of the other software on the *Note + Languages Tape::, is included). We are not aware of a GDB port for VMS. + Both VMS tapes have DEC VAX executables from which you can bootstrap, as the + DEC VMS C compiler cannot compile GCC. We do not have executables for DEC + Alpha VMS systems. Please do not ask us to devote effort to VMS support, + because it is peripheral to the GNU Project. + + + + CD-ROMs + ******* + + We offer these CD-ROMs: + + * *Note MS-DOS CD-ROM::, expected in September 1995. + + * *Note Debian GNU/Linux CD-ROM::, expected in late fall 1995. + + * *Note Compiler Tools Binaries CD-ROM::. + + * *Note June 1995 Source Code CD-ROM::. + + * *Note May 1994 Source Code CD-ROM::. + + * *Note November 1993 Source Code CD-ROM::. + + Our CD-ROMs are in ISO 9660 format & can be mounted as a read-only file + system on most computers. If your driver supports it you can mount each + CD-ROM with "Rock Ridge" extensions (the MS-DOS CD-ROM is only in ISO 9660 + format) & it will look just like an ordinary Unix file system, rather than + one full of truncated & otherwise mangled names that fit vanilla ISO 9660. + + You can build most of the software without copying the sources off the CD. + You only need enough disk space for object files and intermediate build + targets. + + + + Pricing of the GNU CD-ROMs + -------------------------- + + If a business or organization is ultimately paying, the June 1995 Source CD + costs $240. It costs $60 if you, an individual, are paying out of your own + pocket. The December 1994 Compiler Tools Binaries CD-ROM costs $220 for a + business or organization, and $55 for an individual. + + + + What do the individual and company prices mean? + + The software on our disk is free; anyone can copy it and anyone can run it. + What we charge for is the physical disk and the service of distribution. + + We charge two different prices depending on who is buying. When a company or + other organization buys the June 1995 Source CD-ROM, we charge $240. When an + individual buys the same disk, we charge just $60. + + This distinction is not a matter of who is allowed to use the software. In + either case, once you have a copy, you can distribute as many copies as you + wish, and there's no restriction on who can have or run them. The price + distinction is entirely a matter of what kind of entity pays for the CD. + + You, the reader, are certainly an individual, not a company. If you are + buying a disk "in person", then you are probably doing so as an individual. + But if you expect to be reimbursed by your employer, then the disk is really + for the company; so please pay the company price and get reimbursed for it. + We won't try to check up on you--we use the honor system--so please cooperate. + + Buying CDs at the company price is very helpful for GNU; just 140 Source CDs + at that price supports an FSF programmer or tech writer for a year. + + + + Why is there an individual price? + + In the past, our distribution tapes have been ordered mainly by companies. + The CD at the price of $240 provides them with all of our software for a much + lower price than they would previously have paid for six different tapes. To + lower the price more would cut into the FSF's funds very badly, and decrease + the software development we can do. + + However, for individuals, $240 is too high a price; hardly anyone could + afford that. So we decided to make CDs available to individuals at the lower + price of $60. + + + + Is there a maximum price? + + Our stated prices are minimum prices. Feel free to pay a higher price if you + wish to support GNU development more. The sky's the limit; we will accept as + high a price as you can offer. Or simply give a donation (tax-deductible in + the U.S.) to the Free Software Foundation, a tax-exempt public charity. + + + + MS-DOS CD-ROM + ------------- + + We expect to release our first CD-ROM for MS-DOS in September, 1995. Contact + either address on page 1 for more information at that time. The MS-DOS CD + will be packaged inside a book describing its contents. It will have all the + sources and executables on the MS-DOS Diskettes. For details and version + numbers, *note MS-DOS Diskettes::.. + + + + Debian GNU/Linux CD-ROM + ----------------------- + + The FSF expects to ship a CD-ROM with Debian GNU/Linux on it in the late fall + 1995. This CD will be packaged inside a book describing its contents. + m{No Value For "ergegrafkludge"} Debian GNU/Linux is a complete operating + system for x86 machines, available in both source code and binary form. It + is a GNU/Linux system--that is to say, a variant GNU system which uses Linux + as the kernel. (All the systems now available which use the Linux kernel are + GNU/Linux systems.) + + Debian is being developed by Ian Murdock and the Debian Association in + conjunction with the Free Software Foundation. We are distributing it as an + interim measure until the GNU kernel (the Hurd) is ready for users. + + Debian GNU/Linux is available for FTP at `ftp.cps.cmich.edu' in file + `/pub/debian'. For more information about the Debian Project and how to get + involved, see `/pub/gnu/GNUinfo/DEBIAN' on a GNU FTP host (*note How to Get + GNU Software::. for a list). + + + + December 1994 Compiler Tools Binaries CD-ROM + -------------------------------------------- + + We are now offering a CD-ROM that contains executables for GNU compiler tools + for some systems which lack a compiler. This enables the people who use + these systems to compile GNU and other free software without having to buy a + proprietary compiler. You can also use the GNU compilation system to compile + your own C/C++/Objective-C programs. + + We hope to have more systems on each update of this CD. If you can help + build binaries for new systems (especially those that don't come with a C + compiler), or have one to suggest, please contact us at the addresses on page + 1. + + These packages: + + *DJGPP 1.12.m2 from GCC 2.6.0 + *GCC/G++/Objective-C 2.6.2 + *GNU C Library 1.09 + *GDB 4.13 + *Binutils 2.5.2 + *Bison 1.22 + *Emacs 19.26 (MS-DOS only) + *Flex 2.4.7 + *Make 3.72.1 + *libg++ 2.6.1 + + On these platforms: + + *`i386-msdos' + *`hppa1.1-hp-hpux9' + *`sparc-sun-solaris2' + *`sparc-sun-sunos4.1' + + + + Source Code CD-ROMs + ------------------- + + We have several versions of our Source Code CD-ROMs available: + + * *Note June 1995 Source Code CD-ROM::. + + * *Note May 1994 Source Code CD-ROM::. + + * *Note November 1993 Source Code CD-ROM::. + + The older Source Code CDs will be available while supplies last at a reduced + price; see the *note Free Software Foundation Order Form::.. + + All of the Source Code CDs also contain Texinfo source for the GNU manuals + listed in *Note Documentation::. + + The VMS tapes' contents are *not* included. Many programs that are only on + MS-DOS diskettes and not on the tapes are also *not* included. The contents + of the MIT Scheme & X11 Optional tapes are *not* on the November 1993 & May + 1994 Source CDs. *Note Tapes:: & *Note MS-DOS Diskettes::. + + There are no precompiled programs on these Source CDs. You will need a C + compiler (programs which need some other interpreter or compiler normally + provide the C source for a bootstrapping program). We ship C compiler + binaries for some systems on the *Note Compiler Tools Binaries CD-ROM::. + + + + June 1995 Source Code CD-ROM - (VERSION NUMBERS NOT COMPLETELY UP TO DATE) + ............................ + + We now have the sixth edition of our Source CD. This CD has Edition X.X for + version 19 of the `GNU Emacs Lisp Reference Manual' & some additional + software; not all FSF distributed software is included (*note Source Code + CD-ROMs::.). It contains the following packages: + *XXXXX UPDATE THIS LIST XXXXX* + *acm 4.5 + *Autoconf 1.10 + *BASH 1.13.5 + *bc 1.02 + *Binutils 2.3 + *Bison 1.22 + *C Library 1.08 + *Calc 2.02c + *Chess 4.0.69 + *CLISP 1994.01.08 + *Common Lisp 1.0 + *cpio 2.3 + *CVS 1.3 + *dc 0.2 + *DejaGnu 1.2 + *Diffutils 2.6 + *dld 3.2.3 + *doschk 1.1 + *ecc 1.2.1 + *ed 0.1 + *elib 0.06 + *Emacs 18.59 + *Emacs 19.23 + *es 0.84 + *f2c 1994.04.14 + *Fileutils 3.9 + *find 3.8 + *finger 1.37 + *flex 2.4.6 + *Fontutils 0.6 + *GAS 1.36.utah + *GAS 2.2 + *Gawk 2.15.4 + *GCC 2.5.8 + *GDB 4.12 + *gdbm 1.7.1 + *Ghostscript 2.6.1 + *Ghostview 1.5 + *Ghostview for Windows 1.0 + *gmp 1.3.2 + *GNATS 3.2 + *GnuGo 1.1 + *gnuplot 3.5 + *gperf 2.1a + *Graphics 0.17 + *grep 2.0 + *Groff 1.09 + *gzip 1.2.4 + *hello 1.3 + *hp2xx 3.1.4 + *indent 1.9.1 + *ispell 4.0 + *libg++ 2.5.3 + *m4 1.1 + *Make 3.71 + *MandelSpawn 0.07 + *mtools 2.0.7 + *MULE 1.0 + *NetFax 3.2.1 + *Nethack 3.1.3 + *NIHCL 3.0 + *nvi 1.11 + *Octave 1.0 + *Oleo 1.5 + *p2c 1.20 + *patch 2.1 + *PCL 1993.03.18 + *perl 4.036 + *ptx 0.3 + *rc 1.4 + *RCS 5.6.0.1 + *recode 3.3 + *regex 0.12 + *screen 3.5.2 + *sed 2.05 + *shellutils 1.9.4 + *Shogi 1.1.02 + *Smalltalk 1.1.1 + *Superopt 2.3 + *tar 1.11.2 + *Termcap 1.2 + *TeX 3.1 + *Texinfo 3.1 + *Textutils 1.9.1 + *Tile Forth 2.1 + *time 1.6 + *tput 1.0 + *UUCP 1.05 + *uuencode 1.0 + *wdiff 0.04 + *X11R6 + *xboard 3.0.9 + *xshogi 1.2.02 + + + + May 1994 Source Code CD-ROM + ........................... + + We still have the fourth edition of our Source CD, at a reduced price. This + CD has Edition 2.3 for version 19 of the `GNU Emacs Lisp Reference Manual' & + some additional software; not all FSF distributed software is included (*note + Source Code CD-ROMs::.). It contains these packages: + *acm 4.5 + *Autoconf 1.10 + *BASH 1.13.5 + *bc 1.02 + *Binutils 2.3 + *Bison 1.22 + *C Library 1.08 + *Calc 2.02c + *Chess 4.0.69 + *CLISP 1994.01.08 + *Common Lisp 1.0 + *cpio 2.3 + *CVS 1.3 + *dc 0.2 + *DejaGnu 1.2 + *Diffutils 2.6 + *dld 3.2.3 + *doschk 1.1 + *ecc 1.2.1 + *ed 0.1 + *elib 0.06 + *Emacs 18.59 + *Emacs 19.23 + *es 0.84 + *f2c 1994.04.14 + *Fileutils 3.9 + *find 3.8 + *finger 1.37 + *flex 2.4.6 + *Fontutils 0.6 + *GAS 1.36.utah + *GAS 2.2 + *Gawk 2.15.4 + *GCC 2.5.8 + *GDB 4.12 + *gdbm 1.7.1 + *Ghostscript 2.6.1 + *Ghostview 1.5 + *Ghostview for Windows 1.0 + *gmp 1.3.2 + *GNATS 3.2 + *GnuGo 1.1 + *gnuplot 3.5 + *gperf 2.1a + *Graphics 0.17 + *grep 2.0 + *Groff 1.09 + *gzip 1.2.4 + *hello 1.3 + *hp2xx 3.1.4 + *indent 1.9.1 + *ispell 4.0 + *libg++ 2.5.3 + *m4 1.1 + *Make 3.71 + *MandelSpawn 0.07 + *mtools 2.0.7 + *MULE 1.0 + *NetFax 3.2.1 + *Nethack 3.1.3 + *NIHCL 3.0 + *nvi 1.11 + *Octave 1.0 + *Oleo 1.5 + *p2c 1.20 + *patch 2.1 + *PCL 1993.03.18 + *perl 4.036 + *ptx 0.3 + *rc 1.4 + *RCS 5.6.0.1 + *recode 3.3 + *regex 0.12 + *screen 3.5.2 + *sed 2.05 + *shellutils 1.9.4 + *Shogi 1.1.02 + *Smalltalk 1.1.1 + *Superopt 2.3 + *tar 1.11.2 + *Termcap 1.2 + *TeX 3.1 + *Texinfo 3.1 + *Textutils 1.9.1 + *Tile Forth 2.1 + *time 1.6 + *tput 1.0 + *UUCP 1.05 + *uuencode 1.0 + *wdiff 0.04 + *X11R6 + *xboard 3.0.9 + *xshogi 1.2.02 + + + + November 1993 Source Code CD-ROM + ................................ + + We still have the third edition of our Source CD, at a reduced price. It + contains X11R5, as we feel that people should have a choice between X11R5 and + X11R6 until the latter is stable. This CD has Edition 2.2 for version 19 of + the `GNU Emacs Lisp Reference Manual' & some additional software; not all FSF + distributed software is included (*note Source Code CD-ROMs::.). It contains + the following packages: + *acm 3.1 + *Autoconf 1.7 + *BASH 1.13.4 + *bc 1.02 + *Binutils 1.9 2.3 + *Bison 1.22 + *C Library 1.06.7 + *Calc 2.02b + *Chess 4.0p62 + *CLISP 93.11.08 + *cpio 2.3 + *CVS 1.3 + *dc 0.2 + *DejaGnu 1.0.1 + *Diffutils 2.6 + *dld 3.2.3 + *doschk 1.1 + *ecc 1.2.1 + *elib 0.06 + *Emacs 18.59 + *Emacs 19.21 + *es 0.84 + *f2c 1993.04.28 + *Fileutils 3.9 + *find 3.8 + *finger 1.37 + *flex 2.3.8 + *Fontutils 0.6 + *GAS 1.36.utah + *GAS 1.38.1 + *GAS 2.2 + *Gawk 2.15.3 + *GCC 2.5.4 + *GDB 4.11 + *gdbm 1.7.1 + *Ghostscript 2.6.1 + *Ghostview 1.5 + *Ghostview for Windows 1.0 + *gmp 1.3.2 + *GNATS 3.01 + *GnuGo 1.1 + *gnuplot 3.5 + *gperf 2.1a + *Graphics 0.17 + *grep 2.0 + *Groff 1.08 + *gzip 1.2.4 + *hello 1.3 + *hp2xx 3.1.3a + *indent 1.8 + *Ispell 4.0 + *less 177 + *libg++ 2.5.1 + *m4 1.1 + *Make 3.69.1 + *MandelSpawn 0.06 + *mtools 2.0.7 + *MULE 1.0 + *NetFax 3.2.1 + *Nethack 3.1.3 + *NIHCL 3.0 + *Oleo 1.5 + *p2c 1.20 + *patch 2.1 + *PCL 93.03.18 + *perl 4.036 + *ptx 0.3 + *rc 1.4 + *RCS 5.6.0.1 + *recode 3.2.4 + *regex 0.12 + *screen 3.5.2 + *sed 1.18 2.03 + *Shellutils 1.9.1 + *Shogi 1.1p02 + *Smalltalk 1.1.1 + *Superopt 2.3 + *tar 1.11.2 + *Termcap 1.2 + *TeX 3.1 + *Texinfo 3.1 + *Tile Forth 2.1 + *time 1.6 + *time 1.6 + *tput 1.0 + *UUCP 1.04 + *uuencode 1.0 + *wdiff 0.04 + *X11R5 + + + + + MS-DOS Diskettes + **************** + + The FSF distributes some of the GNU software ported to MS-DOS, on 3.5inch + 1.44MB diskettes. These disks have both sources and executables. + + + + DJGPP Diskettes - (VERSION NUMBERS NOT COMPLETELY UP TO DATE) + --------------- + + We offer DJGPP on 30 diskettes. For further details, see *Note GNU + Software::. The DJGPP diskettes contain the following: + + * bc 1.03 + * Binutils 2.4 + * Bison 1.22 + * cpio 2.3 + * Diffutils 2.6 + * doschk 1.1 + * Fileutils 3.9 + * Findutils 3.8 + * GAS 2.4 + * Gawk 2.15.5 + * GCC 2.6.0 + * GDB 4.12 + * Ghostscript 2.6.1 + * Ghostview for Windows 1.0 + * Groff 1.09 + * gzip 1.24 + * hello 1.3 + * indent 1.9 + * ispell 4.0 + * m4 1.2 + * Make 3.71 + * patch 2.1 + * sed 1.18 + * shellutils 1.9 + * Texinfo 3.1 + * texutils 1.9 + * wdiff 0.04 + + + + Emacs Diskettes - (VERSION NUMBERS NOT COMPLETELY UP TO DATE) + --------------- + + Two versions of GNU Emacs are included on the Emacs diskettes we distribute: + GNU Emacs version 19.29 handles 8-bit character sets; the other, MULE version + 2.1, handles 16-bit character sets including Kanji. + + + + Selected Utilities Diskettes - (NOT COMPLETELY UP TO DATE) + ---------------------------- + + The GNUish MS-DOS Project ported GNU software to PC compatibles. Though the + GNUish Project is no longer active, users still ask for these ports that were + done several years ago. You can anonymous FTP files + `/pub/gnu/MicrosPorts/MSDOS*' from `prep.ai.mit.edu' to find out how to + access these ports over the Internet. We offer these programs on five + diskettes. In general, this software will run on 8086 and 80286-based 16-bit + machines; an 80386 is not required. Some of these utilities are necessarily + missing features. Included are: `cpio', `diff', `find', `flex', `gdbm', + `grep', `indent', `less', `m4', `make', `ptx', RCS, `sed', `shar', `sort', & + Texinfo. + + + + Windows Diskette + ---------------- + + We offer GNU Chess and `gnuplot' for Microsoft Windows on a single diskette. + + + + Tape & CD-ROM Subscription Service + ********************************** + + If you do not have net access, our subscription service enables you to stay + current with the latest GNU developments. For a one-time cost equivalent to + three tapes or CD-ROMs (plus shipping in some cases), we will ship you four + new versions of the tape of your choice or the Source Code CD-ROM. The tapes + are sent each quarter; the CD-ROMs are sent as they are issued (which is + between two and four times a year.) + + Regularly, we will send you a new version of an Lisps/Emacs, Languages, + Utilities, or X Window System (X11R6) Required tape or the Source CD-ROM. + The MIT Scheme and X Window System Optional tapes are not changed often + enough to warrant quarterly updates. We do not yet know if we will be + offering subscriptions to the Compiler Tools Binaries or our new CD-ROMs. + + Since Emacs 19 is on the Lisps/Emacs Tape and the Source CD-ROM, a + subscription to either is an easy way to keep current with Emacs 19 as it + evolves. + + A subscription is an easy way to keep up with the regular bug fixes to the X + Window System. We update the X11R6 Required tape as fixes and patches are + issued throughout the year. Each new edition of the *Note Source Code + CD-ROMs::, also has updated sources for the X Window System. + + Please note: In two cases, you must pay 4 times the normal shipping required + for a single order when you pay for each subscription. If you're in Alaska, + Hawaii, or Puerto Rico you must add $20.00 for shipping for each + subscription. If you're outside of U.S., Canada, and Puerto Rico, you have + to add $80.00 for each subscription. See "Unix and VMS Software" & "Shipping + Instructions" on the *note Free Software Foundation Order Form::.. + + + + The Deluxe Distribution + *********************** + + The Free Software Foundation has been asked repeatedly to create a package + that provides executables for all of our software. Normally we offer only + sources. In addition to providing binaries with the source code, the Deluxe + Distribution includes a complete set of our printed manuals and reference + cards. + + The FSF Deluxe Distribution contains the binaries and sources to hundreds of + different programs including GNU Emacs, the GNU C Compiler, the GNU Debugger, + the complete X Window System, and all the GNU utilities. + + We will make a Deluxe Distribution for any machine, with any operating + system. We will send someone to your office to do the compilation, if we + can't find a suitable machine close to us! However, we can only compile the + programs that already support your chosen machine and system - porting is a + separate matter (if you wish to commission a port, see the GNU Service + Directory, details in *Note Free Software Support::). Compiling all these + programs take time; a Deluxe Distribution for an unusual machine will take + longer to produce then one for a common machine. Please contact the FSF + office if you have any questions. + + We supply the software in one of these tape formats in Unix `tar' format: + 1600 or 6250bpi 1/2in reel, Sun DC300XLP 1/4in cartridge - QIC24, + Hewlett-Packard 16-track DC600HC 1/4in cartridge, IBM RS/6000 1/4in cartridge + - QIC 150, Exabyte 8mm cartridge, or DAT 4mm cartridge. If your computer + cannot read any of these, please contact us to see if we can handle your + format. + + The manuals included are one each of the `Bison', `Calc', `Gawk', `GNU C + Compiler', `GNU C Library', `GDB', `Flex', `GNU Emacs Lisp Reference', + `Programming in Emacs Lisp: An Introduction', `Make', `Texinfo', & `Termcap' + manuals; six copies of the `GNU Emacs' manual; and a packet of ten reference + cards each for GNU Emacs, Bison, Calc, Flex, & GDB. Every Deluxe + Distribution also includes a copy of the latest editions of our CD-ROMs + (including the MS-DOS CD & the Debian GNU/Linux CD when they are available) + that contain sources of our software & compiler tool binaries for some + systems. The MS-DOS CD is in ISO 9660 format. The other CDs are in ISO 9660 + format with Rock Ridge extensions. + + The price of the Deluxe Distribution is $5000 (shipping included). These + sales provide enormous financial assistance to help the FSF develop more free + software. To order, please fill out the "Deluxe Distribution" section on the + *note Free Software Foundation Order Form::. and send it to: + + Free Software Foundation, Inc. + 59 Temple Place -- Suite 330 + Boston, MA 02111--1307 + USA + + Telephone: +1-617-542-5942 + Fax (including Japan): +1-617-542-2652 + Free Dial Fax (in Japan): + 0031-13-2473 (KDD) + 0066-3382-0158 (IDC) + Electronic mail: gnu@prep.ai.mit.edu + + + + FSF T-shirt + *********** + + Our latest T-shirt has artwork by Berkeley, CA artist Etienne Suvasa. The + front has the ever-popular picture of GNArnold from the `Flex Manual', while + the back has the Preamble to the GNU General Public License. + + They are available in two colors, Natural & Black. Natural is an off-white, + unbleached, undyed, environment-friendly cotton, printed with black ink, & is + great for tye-dyeing or displaying as is. Black is printed with white ink & + is perfect for late night hacking. All shirts are thick 100% cotton, & are + available in sizes M, L, XL & XXL. This shirt makes a great gift for your + favorite hacker! + + The previous version of the T-shirt will be available while supplies last, + but please contact the FSF to see if we have what you would like before + ordering. + + + + Free Software Foundation Order Form + *********************************** + + All items are distributed with permission to copy and to redistribute. + Texinfo source for each manual and source for each reference card is on + the appropriate tape, diskette, or CD-ROM; the prices for these magnetic + media do not include printed documentation. All items are provided on + an ``as is'' basis, with no warranty of any kind. Please allow six + weeks for delivery (though it won't usually take that long). + + + PRICE AND CONTENTS MAY CHANGE WITHOUT NOTICE AFTER January 31, 1996. + + + + Unix and VMS Software + --------------------- + + These tapes in the formats indicated (*note Tapes::., for contents): + + Please circle the dollar amount for each tape you order. + + Reel to Sun (1) HP IBM (2) Exabyte DAT + reel RS/6000 + Unix tar Unix tar Unix tar Unix tar Unix tar Unix tar + 9-track QIC-24 16-track QIC-150 + 1600 bpi DC300XLP DC600HC DC600A + 1/2" reel 1/4" c.t. 1/4" c.t. 1/4" c.t. 8mm c.t. 4mm c.t. + + (c.t. = cartridge tape) + + Lisps/Emacs $200 $210 $230 $215 (3) $205 $225 + Languages $200 $210 $230 $215 $205 $225 + Utilities $200 $210 $230 $215 $205 $225 + 4.4BSD-Lite $200 $210 $230 $215 $205 $225 + Scheme $200 $210 $230 $215 $205 $225 + X11R5-Required $200 $210 $230 $215 $205 $225 + X11R5-Optional $200 $210 $230 $215 $205 $225 + X11R6-Required $200 $210 $230 $215 $205 $225 + X11R6-Optional $200 $210 $230 $215 $205 $225 + + (1) Sun tapes can be read on some other Unix systems. + (2) IBM RS/6000 tapes can be read on some other Unix systems. + (3) The IBM Emacs tape also has binaries for GNU Emacs. + + + Subscriptions, 4 updates for one year (*note Tape & CD-ROM Subscription Service::.): + + Emacs $600 $630 $690 $645 $615 $675 + Languages $600 $630 $690 $645 $615 $675 + Utilities $600 $630 $690 $645 $615 $675 + X11R6-Required $600 $630 $690 $645 $615 $675 + + Subtotal $ ______ Please put total of the above circled amounts here. + + + These 1600 bpi reel-to-reel 9 track 1/2" tapes, in VMS BACKUP format (aka + interchange format) (*note VMS Emacs and VMS Compiler Tapes::.): + + ____ @ $195 = $ ______ VMS Emacs, GNU Emacs source & executables only. + + ____ @ $195 = $ ______ VMS Compiler, GCC, GAS, and Bison source and + executables only. + + + FSF Deluxe Distribution (*note Deluxe Distribution::.): + ...................................................... + + + ____ @ $5000 = $ ______ The Deluxe Distribution, with manuals, etc. + + Machine: _____________________________________________________________________ + + Operating system: ____________________________________________________________ + + Media type: __________________________________________________________________ + + + + CD-ROMs, in ISO 9660 format (*note CD-ROMs::.): + .............................................. + + + GNU Source Code CD-ROM, Version 6 with X11R6 (*note June 1995 Source Code CD-ROM::.): + + ____ @ $240 = $ ______ for corporations and other organizations. + + ____ @ $ 60 = $ ______ for individuals. + + + + GNU Compiler Tools Binaries CD-ROM, Version 2, December 1994 Edition + (*note Compiler Tools Binaries CD-ROM::.): + + ____ @ $220 = $ ______ for corporations and other organizations. + + ____ @ $55 = $ ______ for individuals. + + + + Debian GNU/Linux Book with CD-ROM - expected late fall 1995 (*note Debian GNU/Linux CD-ROM::.): + + ____ @ $200 = $ ______ for corporations and other organizations. + + ____ @ $50 = $ ______ for individuals. + + + Subscriptions, next 4 updates, of the Source Code CD-ROM, in ISO 9660 format + (*note Tape & CD-ROM Subscription Service::.): + + ____ @ $720 = $ ______ for corporations and other organizations. + + ____ @ $180 = $ ______ for individuals. + + + + MS-DOS Software + --------------- + + MS-DOS Book with CD-ROM - expected September 1995 (*note MS-DOS CD-ROM::.): + + ____ @ $180 = $ ______ for corporations and other organizations. + + ____ @ $45 = $ ______ for individuals. + + + + The following sources and executables for MS-DOS, on 3.5" 1.44MB diskettes + (*note MS-DOS Diskettes::.): + + ____ @ $ 90 = $ ______ Emacs diskettes, GNU Emacs, for 80386 and up. + + ____ @ $ 80 = $ ______ DJGPP diskettes, GCC version 2, for 80386 and up + (also on the *note Compiler Tools Binaries CD-ROM::. and *note MS-DOS CD-ROM::..) + ____ @ $ 85 = $ ______ Selected Utilities diskettes, 8086 and up. + + ____ @ $ 40 = $ ______ Windows diskette, GNU Chess and gnuplot for + Microsoft Windows. + + + Manuals + ------- + + These manuals (*note Documentation::.). Please call for bulk purchase + discounts. + + ____ @ $300 = $ ______ One copy each of the following 13 manuals. + + ____ @ $ 25 = $ ______ GNU Emacs version manual, with a reference card. + + ____ @ $ 50 = $ ______ GNU Emacs Lisp Reference manual, in two volumes. + + ____ @ $ 50 = $ ______ Using and Porting GNU CC. + + ____ @ $ 50 = $ ______ GNU C Library Reference Manual. + + ____ @ $ 50 = $ ______ GNU Emacs Calc manual, with a reference card. + + ____ @ $ 20 = $ ______ Programming in Emacs Lisp, An Introduction + + ____ @ $ 20 = $ ______ Debugging with GDB, with a reference card. + + ____ @ $ 20 = $ ______ Gawk manual. + + ____ @ $ 20 = $ ______ Make manual. + + ____ @ $ 20 = $ ______ Bison manual, with a reference card. + + ____ @ $ 20 = $ ______ Flex manual, with a reference card. + + ____ @ $ 20 = $ ______ Texinfo manual. + + ____ @ $ 15 = $ ______ Termcap manual. + + + + Reference Cards + --------------- + + The following reference cards, in packets of ten. For single copies please + call. + + ____ @ $ 10 = $ ______ GNU Emacs version 19 reference cards. + + ____ @ $ 10 = $ ______ GNU Emacs Calc reference cards. + + ____ @ $ 10 = $ ______ GDB reference cards. + + ____ @ $ 10 = $ ______ Bison reference cards. + + ____ @ $ 10 = $ ______ Flex reference cards. + + + + T-shirts + -------- + + GNU/FSF T-shirts, thick 100% cotton (*note FSF T-shirt::.): + + ____ @ $ 15 = $ ______ Size M ____ natural ____ black. + + ____ @ $ 15 = $ ______ Size L ____ natural ____ black. + + ____ @ $ 15 = $ ______ Size XL ____ natural ____ black. + + ____ @ $ 15 = $ ______ Size XXL ____ natural ____ black. + + + + Older Items + ----------- + + Older items are only available while supplies last. + + ____ @ $ 5 = $ ______ GNU Emacs version 18 reference cards, in packets + of ten. + + One copy each of the following five older CD-ROMs: + + ____ @ $200 = $ ______ for corporations and other organizations. + + ____ @ $ 50 = $ ______ for individuals. + + + Please fill in the number of each older CD-ROM you order: + + for for + corporations individuals: + and other + organizations: + + GNU Compiler Tools Binaries CD-ROM + December 1993 Edition (Version 1) ____________ ____________ + + + GNU Source Code CD-ROM + May 1994 edition with X11R6 ____________ ____________ + + GNU Source Code CD-ROM + November 1993 edition with X11R5 ____________ ____________ + + GNU Source Code CD-ROM + May 1993 edition with X11R5 ____________ ____________ + + GNU Source Code CD-ROM + October 1992 edition with X11R5 ____________ ____________ + + + Please put the total count and cost of the above older CD-ROMs here: + + ____ @ $ 80 = $ ______ for corporations and other organizations. + + ____ @ $ 20 = $ ______ for individuals. + + ====== + + Subtotal $ ______ + + + + Tax and Shipping Costs + ---------------------- + + + $ ______ In Massachusetts: add 5% sales tax, or give tax + exempt number. + + $ ______ In Alaska, Hawaii, or Puerto Rico for shipping: + for GNU Emacs Lisp Reference and GNU Emacs Calc + manuals, add $5 *each*. For *each* tape or + CD-ROM subscription, add $20. For all other + items, add $5 base charge, then $1 per item except + reference cards; i.e., + shipping for all other items = $5 + ($1 * i). + + $ ______ Outside of U.S., Canada, and Puerto Rico for + shipping: Add $20 base charge; then add $80 more + for *each* tape or CD-ROM subscription; and then + add $10 more for *each* manual in the order; + i.e., shipping for all other items + = $20 + ($80 * s) + ($10 * m). + + $ ______ Optional (tax-deductible in the U.S.) donation. + ------ We suggest 5% if paying by credit card. + + TOTAL $ ______ We pay for shipping via UPS ground transportation in + the contiguous 48 states and Canada. For very + large orders, ask about actual shipping costs for + that order. + + + + Shipping Information + -------------------- + + Name: ________________________________________________________________________ + + Mail Stop/Dept. Name: ________________________________________________________ + + Organization: ________________________________________________________________ + + Street Address: ______________________________________________________________ + + City/State/Province: _________________________________________________________ + + Zip Code/Postal Code/Country: ________________________________________________ + + Telephone number in case of a problem with your order. + For international orders, please include a FAX number. _______________________ + + + ------------------------------------------------------------------------------ + | | + | Orders filled only upon receipt of check, money order or credit card | + | order in U.S. dollars. Unpaid orders will be returned to the sender. | + | We do not have the staff to handle the billing of unpaid orders. Please | + | help keep our lives simple by including your payment with your order. | + | | + ------------------------------------------------------------------------------ + + + For orders from outside the U.S.: + --------------------------------- + + You are responsible for paying all duties, tariffs, and taxes. If you + refuse to pay the charges, the shipper will return or abandon the order. + + + --------------------------------------------------------------------------- + | | + | Please make checks payable to the ``Free Software Foundation''. | + | | + --------------------------------------------------------------------------- + + + For Credit Card Orders: + ----------------------- + + The Free Software Foundation takes these credit cards: Carte Blanche, + Diner's Club, JCB, Mastercard, Visa, or American Express. Please note that + we are charged about 5% of an order's total amount in credit card + processing fees. Please consider paying by check instead, or adding on a + 5% donation to make up the difference. To place a credit card order, + please give us this information: + + + Card type: ___________________________________________________________________ + + Account Number: ______________________________________________________________ + + Expiration Date: _____________________________________________________________ + + Cardholder's Signature: ______________________________________________________ + + + + ------------------------------------------------------------------------------ + | | + | If you wish to pay by wire transfer, or you are a reseller, please | + | call or write us for details. | + | | + ------------------------------------------------------------------------------ + + + Please mail orders to: Free Software Foundation + 59 Temple Place -- Suite 330 + Boston, MA 02111 + +1-617-542-5942 + FAX (including Japan): +1-617-542-2652 + Free Dial FAX numbers in Japan: + PRICES AND CONTENTS MAY CHANGE 0031-13-2473 (KDD) + WITHOUT NOTICE AFTER January 31, 1996. 0066-3382-0158 (IDC) + + Version: June 1995 ASCII Bull to June 1995 Src CD/GNU 19.29/GCC 2.7.0 + + --------------------------------------------------------------------- + local variables: + mode: text + fill-column: 78 + end: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/README gcc-2.7.0/README *** gcc-2.6.3/README Mon Nov 14 18:15:48 1994 --- gcc-2.7.0/README Thu Jun 15 18:10:48 1995 *************** *** 1,3 **** ! This directory contains the version 2.6.3 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. --- 1,3 ---- ! This directory contains the version 2.7.0 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/README.DWARF gcc-2.7.0/README.DWARF *** gcc-2.6.3/README.DWARF Mon Nov 21 09:12:58 1994 --- gcc-2.7.0/README.DWARF Mon May 15 23:11:17 1995 *************** *** 522,526 **** Unfortunately, as mentioned above, there are quite a few problems in the ! g++ front end itself, and these are currently responsible for severly restricting the progress which can be made on adding DWARF support specifically for the g++ front-end. Furthermore, Richard Stallman has --- 522,526 ---- Unfortunately, as mentioned above, there are quite a few problems in the ! g++ front end itself, and these are currently responsible for severely restricting the progress which can be made on adding DWARF support specifically for the g++ front-end. Furthermore, Richard Stallman has diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/README.FRESCO gcc-2.7.0/README.FRESCO *** gcc-2.6.3/README.FRESCO Thu Aug 18 17:22:10 1994 --- gcc-2.7.0/README.FRESCO Tue Jun 6 18:46:35 1995 *************** *** 1,3 **** ! Compiling Fresco with g++ 2.6 ----------------------------- --- 1,3 ---- ! Compiling Fresco with g++ ----------------------------- *************** *** 6,220 **** with x11r6. ! G++ 2.5.x had various bugs preventing Fresco from compiling properly. ! We believe these have all been fixed in g++ 2.6. However, there ! are still a few portability problems in Fresco itself. These should ! be fixed in the next release of Fresco. ! The following patches should help in working around the problems. ! I used these patches when I built Fresco, but I don't have time ! right now to verify them, or to check that they would apply cleanly. ! Perhaps someone could verify these patches against gcc 2.6 and ! the latest Fresco and clean it up? ! The most obvious problem is that Fresco defines false and true as constants. ! However, these are noe reserved words in ANSI C++. Since g++ has ! implemented false, true, and bool, it complains about a syntax error. ! ! The first patch below to workInProgress/Fresco/include/Ox/base.h should ! fix that. It also enables use of long long. ! ! I ran into the same "true/false" problem in some other file, ! but I can find it now. (It was not in the library proper.) ! ! The second patch is to contrib/programs/dish/main.cxx. ! The first part of it is probably SunOS4-specific. ! It was somewhat puzzling, but it looks like the %p format conversion ! specifier in either sscanf or sprintf doesn't work properly, so I had to ! use (the less strictly correct) %x specifier. ! ! The other part is also Sun-specific. The original code assumes ! it can call _main, but g++ does not provide that. Instead, I changed ! the code to use a static destructor. The fix in the next Fresco ! release will probably be different. ! ! Please try these patches, and let me know how they work. ! ! --Per Bothner ! Cygnus Support bothner@cygnus.com ! ! *** /cygint/x11r6/workInProgress/Fresco/include/Ox/base.h Fri Apr 1 13:49:59 1994 ! --- ./base.h Thu May 19 21:02:24 1994 ! *************** ! *** 39,58 **** ! #ifndef ox_Boolean ! #define ox_Boolean ! ! ! typedef unsigned char Boolean; ! ! ! ! static const unsigned char false = 0; ! ! static const unsigned char true = 1; ! ! #ifndef TRUE ! #define TRUE true ! #endif ! - ! #ifndef FALSE ! #define FALSE false ! #endif ! ! ! #endif ! ! #ifndef ox_octet ! #define ox_octet ! --- 39,68 ---- ! #ifndef ox_Boolean ! #define ox_Boolean ! ! ! /* Note that 'bool', 'false', and 'true' are now reserved words in ! ! ANSI/ISO C++, though few compilers implement them. */ ! ! #ifndef __GNUC__ ! ! #ifndef false ! ! #define false 0 ! ! #endif ! ! #ifndef true ! ! #define true 1 ! ! #endif ! ! #ifndef bool ! ! #define bool unsigned char ! ! #endif ! ! #endif ! ! + /* Note: Avoid obsolete identifiers Boolean/TRUE/FALSE. */ ! #ifndef TRUE ! #define TRUE true ! #endif ! #ifndef FALSE ! #define FALSE false ! #endif ! + typedef bool Boolean; ! ! ! #endif /*!ox_Boolean*/ ! ! #ifndef ox_octet ! #define ox_octet ! *************** ! *** 85,91 **** ! #else ! typedef long Long; ! typedef unsigned long ULong; ! ! #if defined(sgi) ! /* compiler supports long long */ ! typedef long long LongLong; ! typedef unsigned long long ULongLong; ! --- 95,101 ---- ! #else ! typedef long Long; ! typedef unsigned long ULong; ! ! #if defined(sgi) || defined (__GNUC__) ! /* compiler supports long long */ ! typedef long long LongLong; ! typedef unsigned long long ULongLong; ! ! *** main.cxx.orig Mon Apr 11 16:25:30 1994 ! --- main.cxx.new Sat May 14 12:48:09 1994 ! *************** ! *** 251,264 **** ! if (strcmp(s, "0") == 0) { ! obj = nil; ! } else { ! ! b = sscanf(s, "_dish_%p", &obj) == 1; ! } ! return b; ! } ! ! char* Dish::object_to_string(BaseObjectRef obj, char* result) { ! if (is_not_nil(obj)) { ! ! sprintf(result, "_dish_%p", obj); ! } else { ! sprintf(result, "0"); ! } ! --- 251,268 ---- ! if (strcmp(s, "0") == 0) { ! obj = nil; ! } else { ! ! long val; ! ! b = sscanf(s, "_dish_%lx", &val) == 1; ! ! if (b) ! ! obj = (BaseObjectRef)(void*)val; ! } ! return b; ! } ! ! char* Dish::object_to_string(BaseObjectRef obj, char* result) { ! if (is_not_nil(obj)) { ! ! long val = (long)obj; ! ! sprintf(result, "_dish_%lx", val); ! } else { ! sprintf(result, "0"); ! } ! *************** ! *** 1087,1110 **** ! } ! } ! ! ! /* ! ! * Called by main() defined in tcl lib. ! ! */ ! ! #if defined(sun) && !defined(SVR4) ! extern "C" { ! void _main(); ! void on_exit(void (*)(), caddr_t); ! } ! #endif ! ! int Tcl_AppInit(Tcl_Interp* interp) { ! #if defined(sun) && !defined(SVR4) ! _main(); ! on_exit(&Dish::cleanup, NULL); ! #else ! atexit(&Dish::cleanup); ! #endif ! Dish* dish = new Dish(interp); ! dish->add_commands(interp); ! dish->add_variables(interp); ! --- 1091,1129 ---- ! } ! } ! ! ! #if !defined(DISH_CLEANUP_USE_DESTRUCTOR) && defined(__GNUC__) ! ! /* This assumes that the tcl library's main() has also been ! ! compiled with gcc, or else the destructors won't get run properly. */ ! ! #define DISH_CLEANUP_USE_DESTRUCTOR 1 ! ! #endif ! ! + #if DISH_CLEANUP_USE_DESTRUCTOR ! + struct DishCleanup { ! + ~DishCleanup() { Dish::cleanup(); } ! + }; ! + static DishCleanup DishCleanupObject; ! + #else /* !DISH_CLEANUP_USE_DESTRUCTOR */ ! #if defined(sun) && !defined(SVR4) ! extern "C" { ! void _main(); ! void on_exit(void (*)(), caddr_t); ! } ! #endif ! + #endif /* !DISH_CLEANUP_USE_DESTRUCTOR */ ! + ! + /* ! + * Called by main() defined in tcl lib. ! + */ ! ! int Tcl_AppInit(Tcl_Interp* interp) { ! + #if !DISH_CLEANUP_USE_DESTRUCTOR ! #if defined(sun) && !defined(SVR4) ! _main(); ! on_exit(&Dish::cleanup, NULL); ! #else ! atexit(&Dish::cleanup); ! #endif ! + #endif /* !DISH_CLEANUP_USE_DESTRUCTOR */ ! Dish* dish = new Dish(interp); ! dish->add_commands(interp); ! dish->add_variables(interp); --- 6,17 ---- with x11r6. ! Prevous version of Fresco have not compiled using g++, ! partly because of the use of true and false as identifiers. ! (They are now reserved words in g++, as required by the ! ANSI/ISO draft standard for C++.) ! If you get x11r6 with public patch #5 or a later version ! of Fresco, these problems should now be fixed. ! See http://www.faslab.com/fresco/HomePage.html for information ! on Fresco, including how to get the latest version. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/README.NS32K gcc-2.7.0/README.NS32K *** gcc-2.6.3/README.NS32K Fri Mar 13 23:58:10 1992 --- gcc-2.7.0/README.NS32K Thu Jun 15 07:02:40 1995 *************** *** 1,22 **** - Copyright (C) 1987 Free Software Foundation, Inc. - Contributed by Michael Tiemann (tiemann@mcc.com) - - 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 describes the implementation notes of the GNU C Compiler for the National Semiconductor 32032 chip (and 32000 family). --- 1,2 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/SERVICE gcc-2.7.0/SERVICE *** gcc-2.6.3/SERVICE Mon Nov 14 18:16:11 1994 --- gcc-2.7.0/SERVICE Thu Jun 15 18:11:00 1995 *************** *** 73,77 **** - 14 years experience with CS, Systemadministration - 7 years with UNIX/Networking/FreeWare/GNU/X11 ! - 5 years organizer of practical OS courses - Platforms: SunOS, HP-UX, Ultrix, OSF1, Linux, AIX, Solaris - Experience with parallel environments (Transputers: Meiko, Parix) --- 73,77 ---- - 14 years experience with CS, Systemadministration - 7 years with UNIX/Networking/FreeWare/GNU/X11 ! - 5 years organizer of practical OS courses - Platforms: SunOS, HP-UX, Ultrix, OSF1, Linux, AIX, Solaris - Experience with parallel environments (Transputers: Meiko, Parix) *************** *** 158,162 **** Entered: 5May94 ! ^_ Contributed Software Graefestr. 76 --- 158,162 ---- Entered: 5May94 !  Contributed Software Graefestr. 76 *************** *** 206,232 **** Cygnus Support ! 1 Kendall Square ! Cambridge, MA 02139 ! +1 617 494 1040 voice ! +1 617 494 1325 fax ! ! Cygnus Support offers warranty protection (service contracts) for a ! number of free software tools. For a fixed annual fee our customers ! receive binary and source distributions, mail and phone support, ! documentation and customization assistance for the GNU tools and the ! Kerberos Network Security package. This toolkit consists of gcc, g++, ! gdb, and gas. Cygnus maintains and supports the GNU tools on over 50 ! host/target configurations. ! ! This set of supported tools and platforms is updated and added to ! every 90 days. Please contact Cygnus for the most up to date software ! available. ! ! For those who need on-site assistance, support is also available from ! our Cambridge office. ! Annual Support starts at $1,400. ! ! Updated: 11Apr94  Jose A. Fernandez --- 206,224 ---- Cygnus Support ! 48 Grove Street ! Somerville, MA 02144 ! +1 617 629 3000 voice ! +1 617 629 3010 fax ! ! Cygnus Support continues to provide supported, maintained versions of ! the GNU toolset including GCC, G++, the GNU debugger with graphical ! user interface, GNU linker, GNU macro-assembler and Emacs 19. In ! keeping with the rapidly advancing needs of software developers, ! Cygnus maintains a 90 day release cycle of the GNU toolset. Each ! release is regression tested and includes substantial improvements and ! additions to the existing matrix of over 65 supported platform ! configurations. ! Updated: 2Feb95  Jose A. Fernandez *************** *** 290,294 **** Updated: 5Apr94  ! Ron Guilmette 396 Ano Nuevo Ave. #216 Sunnyvale, CA 94086 --- 282,286 ---- Updated: 5Apr94  ! Ron Guilmette 396 Ano Nuevo Ave. #216 Sunnyvale, CA 94086 *************** *** 332,340 **** Updated: 13Apr94  ! Hundred Acre Software Consultants ! 5301 Longley Lane, Suite D-144 ! Reno NV 89511-1805 ! (702)-829-9700 ! (800) 245-2885 Hundred Acre is a consulting group providing support and development services to organizations of all sizes. We support GNU C++ and C in --- 324,332 ---- Updated: 13Apr94  ! Hundred Acre Consulting ! 1155 W Fourth St Ste 225 ! PO Box 6209 ! Reno NV 89513-6209 ! (702)-348-7299 Hundred Acre is a consulting group providing support and development services to organizations of all sizes. We support GNU C++ and C in *************** *** 349,353 **** Support contracts: Several levels, from $495 to $90000 per year. ! Updated: 7Apr94  Scott D. Kalter + : Dennis Fitzgerald + + Kaman Sciences has performed a GNU port for a custom RISC processor. + We have experience in the definition and description of the machine + register transfer language to the GNU tool-set. This includes rewriting + and modification of the necessary description and source files of gcc, gas, + and gld and other binutils. Kaman also has services for installation and + setup of GNU tools, (GAWK, GCC, EMACS, etc.) on Sun workstations. + + Work is on a "service contract" basis and development is charged either + hourly or as a fixed price contract. + + Consulting rates: $70 to $200 per hour. + + Entered: 13Jan95 +  Scott J. Kramer P.O. Box 620207 *************** *** 416,421 **** Germany ! Phone: +49-6637-1488 ! Fax: +49-6637-1489 Mail --- 430,435 ---- Germany ! Phone: +49-6637-919123 ! Fax: +49-6637-919122 Mail *************** *** 424,428 **** Experience: 20 years OS and compiler experience, portations of most ! GNU products. Author of ported software CD-ROM for Unix 4.2. Rates: Choice of DM 150 per hour or hotline rates 3 DM per minute + 10 --- 438,442 ---- Experience: 20 years OS and compiler experience, portations of most ! GNU products. Author of ported software CD-ROM for Unix 4.2. Rates: Choice of DM 150 per hour or hotline rates 3 DM per minute + 10 *************** *** 430,434 **** available for purchasers of LEMIS CD-ROMs. ! Updated: 13Apr94  Marty Leisner --- 444,448 ---- available for purchasers of LEMIS CD-ROMs. ! Updated: 21Feb95  Marty Leisner *************** *** 449,469 **** Updated: 15Apr94 ! ^_ Roland McGrath ! 545 Tech Sq rm 426 Cambridge, MA 02139 Work: (617) 253-8568 Co-author of GNU Make (with Richard Stallman); maintainer of GNU Make. ! Author and maintainer of the GNU C Library and parts of the GNU Hurd. ! Author of several Emacs Lisp packages and parts of Emacs 19. FSF employee summer 1989, fall 1990 to the present. ! Installation, maintenance, porting, enhancement of all GNU software. ! Fees negotiable. I can work anywhere in the Boston or SF Bay Area, or ! anywhere on the Internet. ! Updated: 14Apr94  Wolfgang S. Rupprecht --- 463,537 ---- Updated: 15Apr94 !  ! Richard Levitte (in TeX: Richard Levitte ! Södra Långgatan 39, II S\"odra L{\aa}nggatan 39, II ! S-171 49 Solna S-171 49 Solna ! Sweden Sweden) ! Tel.nr.: +46 (8) 18 30 99 (there is an answering machine) ! e-mail: (preferred) ! ! ! What I do: ! Primarly I work on GNU software for VMS, both VAX and AXP. I ! also work on GNU stuff for Unix on occasion. I'm familiar with ! SunOS (version 4.x.x), BSD (version 4.2 and up), ! Ultrix (version 4.2 and up). ! I've been porting GNU Emacs to VMS since spring 1991. This ! includes versions 18.57 to 18.59 and version 19.22. ! I maintain GNU vmslib. ! ! Programs supported: ! GNU vmslib: extending, installation, upgrading aid, ! simple and complex questions, you name it. ! GNU Emacs: porting, extending, installation, upgrading aid, ! customization, simple or complex questions, ! training, you name it. ! GNU autoconf: porting, extending, installation, upgrading aid. ! GNU zip, diffutils, m4, patch, texinfo: ! porting, installation, upgrading aid. ! GNU C/C++: installation, upgrading aid. I might start to ! hack at it some day. ! ! The list of programs I currently support represents both my interests and ! current priorities. Your interest and funding can influence my priorities. ! ! Experience: ! Fluent in C, C++, Emacs Lisp, Pascal as well as assembler ! on VAX, Motorola 680x0, Intel 8086 and 80x86. Modified key ! elements in Emacs (e.g., memory and process management) to work ! transparently on VMS. I have very good knowledge in the VMS ! operating system, as well as MS-DOS and IBM PC compatibles. ! I have worked for four and a half years as a VMS system manager. ! I've also provided consulting services on IBM PC compatibles, ! as well as held classes for IBM PC users. ! A reference list is available on request. ! ! Your Rate: ! $50-$80/hour (400-700 SEK in sweden), plus expenses. My rates ! are negotiable, depending on how interesting the project is to me. ! ! ! Entered: 18Aug94 !  Roland McGrath ! 545 Tech Sq, Rm 426 Cambridge, MA 02139 Work: (617) 253-8568 Co-author of GNU Make (with Richard Stallman); maintainer of GNU Make. ! Author and maintainer of the GNU C Library and co-author of the GNU Hurd. ! Author of several GNU Emacs Lisp packages and parts of GNU Emacs 19. FSF employee summer 1989, fall 1990 to the present. ! Installation, maintenance, porting, enhancement of all GNU software. I can ! install GNU software and maintain its installation on call via the Internet. ! Fees negotiable; $75-$100/hour, higher for very short term projects. I can ! work anywhere in the Boston or SF Bay Area, or anywhere on the Internet. I ! am working full-time for the FSF on the GNU Hurd, so I am likely to take on ! only jobs that either can be done entirely via the Internet and are ! short-term, or that are very interesting. ! Updated: 21Jan95  Wolfgang S. Rupprecht *************** *** 642,647 **** Database documents, directories, standard forms. ! UrbanSoft uses a portion of its revenues to contribute ! diskette distributions of GNU software to Russian universities (most of which lack FTP access). --- 710,715 ---- Database documents, directories, standard forms. ! UrbanSoft uses a portion of its revenues to contribute ! diskette distributions of GNU software to Russian universities (most of which lack FTP access). *************** *** 652,655 **** --- 720,758 ---- Updated: 20Apr94  + noris network + Matthias Urlichs + Schleiermacherstrasse 12 + 90491 Nuernberg + Germany + Phone: +49 911 9959621 + Fax: +49 911 5980150 + + http://info.noris.de/ (German) + + Expertise: + OS internals, esp. Linux and BSD, esp. device drivers + Network protocol / program design and coding + Utilities coding and maintainance + Program debugging, testing + User interface design and testing + Several programming and tool languages + + Services: + Installation, debugging, enhancement, distribution, + for all kinds of free software. + System administration for most Unix-like systems. + Email, Fax, phone, and in-person consulting (and/or "question answering"). + Remote support and system monitoring (over the Internet), + Update service (new tools tested and installed automagically) + Internet access + + Rates: + DM 110 (~$70) per hour + Support contracts start at DM 170/month + DM 30/supported system. + Willing to travel for sufficiently large jobs. + Rates don't include taxes. + + Entered: 16Aug94 +  Joe Wells Postal Address: *************** *** 657,674 **** 111 Cummington Street, Room 138 Boston, Massachusetts 02215 ! Work Telephone: (617) 353-3381 ! Home Telephone: (617) 352-7508 (until August 1994) Finger "jbw@cs.bu.edu" for up-to-date contact information. Experience: I have B.A. and M.A. degrees in Computer Science and have completed ! all but the dissertation for a Ph.D. in C.S. My primary programming ! languages are Emacs Lisp, Perl, and Bourne shell, but of course I can ! program in any language. I have written numerous Emacs Lisp ! packages. I started the USENET "List of Frequently Asked Questions ! about GNU Emacs with Answers" and maintained it for more than two ! years. Most of my work has been related to the telephone system, but ! I am not limited to that. Send e-mail for my complete resume or ! curriculum vita. Programs supported: --- 760,779 ---- 111 Cummington Street, Room 138 Boston, Massachusetts 02215 ! Work Telephone: (617) 353-3381 (sorry, but no answering machine or voice mail) ! Home Telephone: (617) 739-7456 (until August 1995) Finger "jbw@cs.bu.edu" for up-to-date contact information. Experience: I have B.A. and M.A. degrees in Computer Science and have completed ! all but the dissertation for a Ph.D. in C.S. My research for my ! Ph.D. is in the areas of logic, type systems, and programming ! language theory. My primary programming languages are Emacs Lisp, ! Perl, and Bourne shell, but of course I can program in any language. ! I have written numerous Emacs Lisp packages. I started the USENET ! "List of Frequently Asked Questions about GNU Emacs with Answers" and ! maintained it for more than two years. Most of my work has been ! related to the telephone system (modems, voice mail, etc.), but I am ! not limited to that. Send e-mail for my complete resume or curriculum ! vita. Programs supported: *************** *** 682,690 **** Working conditions: I am usually available for part-time work (less than 20 hours per week ! including any travel time). I can sometimes make time for full-time work for a month or two; please inquire. I can either work in or near ! Boston or via the Internet or via telephone. My schedule is fairly ! flexible. Any programs I write will normally have the copying ! conditions of the GNU General Public License. Rates: $65/hour as an independent contractor. --- 787,796 ---- Working conditions: I am usually available for part-time work (less than 20 hours per week ! including any travel time). I can sometimes make time for full-time work for a month or two; please inquire. I can either work in or near ! Boston or via the Internet or via telephone; travel outside the Boston ! metropolitan area can be negotiated. My schedule is very flexible. ! Any programs I write will normally have the copying conditions of the ! GNU General Public License; this is negotiable. Rates: $65/hour as an independent contractor. *************** *** 692,697 **** higher rates if extensive travel is required. ! Updated: 1May94 ! ^_ Yggdrasil Computing, Inc./ Freesoft, Inc. 4880 Stevens Creek Blvd. Ste. 205 --- 798,803 ---- higher rates if extensive travel is required. ! Updated: 27Sep94. !  Yggdrasil Computing, Inc./ Freesoft, Inc. 4880 Stevens Creek Blvd. Ste. 205 *************** *** 701,705 **** Updated: 14Apr94 ! ^_ For a current copy of this directory, or to have yourself listed, ask: --- 807,811 ---- Updated: 14Apr94 !  For a current copy of this directory, or to have yourself listed, ask: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/basic-block.h gcc-2.7.0/basic-block.h *** gcc-2.6.3/basic-block.h Sat Jul 10 15:25:07 1993 --- gcc-2.7.0/basic-block.h Thu Jun 15 07:03:29 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bc-emit.c gcc-2.7.0/bc-emit.c *** gcc-2.6.3/bc-emit.c Fri Nov 4 16:10:21 1994 --- gcc-2.7.0/bc-emit.c Thu Jun 15 07:03:54 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 442,446 **** work relocatable address directly into bytecoded functions (which would require us to provide hairy location info and possibly obey alignment ! rules imposed by the architecture) we build an auxilary table of pointer constants, and encode just offsets into this table into the actual bytecode. */ --- 443,447 ---- work relocatable address directly into bytecoded functions (which would require us to provide hairy location info and possibly obey alignment ! rules imposed by the architecture) we build an auxiliary table of pointer constants, and encode just offsets into this table into the actual bytecode. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bc-optab.c gcc-2.7.0/bc-optab.c *** gcc-2.6.3/bc-optab.c Mon Mar 14 08:11:59 1994 --- gcc-2.7.0/bc-optab.c Thu Jun 15 07:04:19 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bc-optab.h gcc-2.7.0/bc-optab.h *** gcc-2.6.3/bc-optab.h Wed Sep 22 13:44:30 1993 --- gcc-2.7.0/bc-optab.h Thu Jun 15 07:04:45 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bc-typecd.h gcc-2.7.0/bc-typecd.h *** gcc-2.6.3/bc-typecd.h Mon Oct 4 17:59:24 1993 --- gcc-2.7.0/bc-typecd.h Thu Jun 15 07:05:21 1995 *************** *** 16,20 **** 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. */ #ifndef TYPECODE_H --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef TYPECODE_H diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-arity.c gcc-2.7.0/bi-arity.c *** gcc-2.6.3/bi-arity.c Fri Nov 4 16:10:16 1994 --- gcc-2.7.0/bi-arity.c Thu Jun 15 07:05:55 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-defs.h gcc-2.7.0/bi-defs.h *** gcc-2.6.3/bi-defs.h Wed Sep 22 11:43:42 1993 --- gcc-2.7.0/bi-defs.h Thu Jun 15 07:06:15 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-lexer.c gcc-2.7.0/bi-lexer.c *** gcc-2.6.3/bi-lexer.c Sat Nov 13 03:56:44 1993 --- gcc-2.7.0/bi-lexer.c Thu Jun 15 07:06:42 1995 *************** *** 16,20 **** 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 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 27,31 **** ! /* Safely allocate NBYTES bytes of memory. Reuturns pointer to block of memory. */ --- 28,32 ---- ! /* Safely allocate NBYTES bytes of memory. Returns pointer to block of memory. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-opcode.c gcc-2.7.0/bi-opcode.c *** gcc-2.6.3/bi-opcode.c Thu Apr 21 15:15:23 1994 --- gcc-2.7.0/bi-opcode.c Thu Jun 15 07:07:00 1995 *************** *** 16,20 **** 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 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-opname.c gcc-2.7.0/bi-opname.c *** gcc-2.6.3/bi-opname.c Sat Nov 13 03:56:51 1993 --- gcc-2.7.0/bi-opname.c Thu Jun 15 07:07:17 1995 *************** *** 16,20 **** 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 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-parser.y gcc-2.7.0/bi-parser.y *** gcc-2.6.3/bi-parser.y Sat Nov 13 03:56:57 1993 --- gcc-2.7.0/bi-parser.y Thu Jun 15 07:07:36 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-reverse.c gcc-2.7.0/bi-reverse.c *** gcc-2.6.3/bi-reverse.c Wed Oct 13 11:55:58 1993 --- gcc-2.7.0/bi-reverse.c Thu Jun 15 07:07:57 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bi-run.h gcc-2.7.0/bi-run.h *** gcc-2.6.3/bi-run.h Sat Mar 12 07:35:35 1994 --- gcc-2.7.0/bi-run.h Thu Jun 15 07:08:18 1995 *************** *** 16,20 **** 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. */ #define MAXLITERALS 5 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MAXLITERALS 5 *************** *** 102,106 **** bit numbering is reversed (i.e. bit 0 is the sign bit). ! (Alright, so I drew this to keep my tongue in cheek while writing the code below, not because I'm into ASCII art.) */ --- 103,107 ---- bit numbering is reversed (i.e. bit 0 is the sign bit). ! (All right, so I drew this to keep my tongue in cheek while writing the code below, not because I'm into ASCII art.) */ *************** *** 125,152 **** - #if BYTES_BIG_ENDIAN - - #define SHIFT_IN_BITS(DEST, SOURCE, OFFSET, NBITS) \ - (DEST = ((DEST) << (NBITS)) \ - | (LM ((NBITS)) \ - & ((SOURCE) >> (INTERP_BPC - (OFFSET) - (NBITS))))) - - #define OR_IN_BITS(DEST, VALUE, OFFSET, NBITS) \ - (DEST = ((DEST) & ~(LM ((NBITS)) << (INTERP_BPC - (OFFSET) - (NBITS)))) \ - | (((VALUE) & LM ((NBITS))) << (INTERP_BPC - (OFFSET) - (NBITS)))) - - #else - #define SHIFT_IN_BITS(DEST, SOURCE, OFFSET, NBITS) \ (DEST = ((DEST) << (NBITS)) \ | (LM ((NBITS)) \ ! & ((SOURCE) >> (OFFSET)))) #define OR_IN_BITS(DEST, VALUE, OFFSET, NBITS) \ ! (DEST = ((DEST) & ~(LM ((NBITS)) << (OFFSET))) \ ! | (((VALUE) & LM ((NBITS))) << (OFFSET))) ! ! #endif ! /* Procedure call; arguments are a pointer to the function to be called, --- 126,146 ---- #define SHIFT_IN_BITS(DEST, SOURCE, OFFSET, NBITS) \ (DEST = ((DEST) << (NBITS)) \ | (LM ((NBITS)) \ ! & ((SOURCE) \ ! >> (BYTES_BIG_ENDIAN \ ! ? (INTERP_BPC - (OFFSET) - (NBITS)) \ ! : (OFFSET))))) #define OR_IN_BITS(DEST, VALUE, OFFSET, NBITS) \ ! (DEST = ((DEST) & ~(LM ((NBITS)) \ ! << (BIG_ENDIAN \ ! ? (INTERP_BPC - (OFFSET) - (NBITS)) \ ! : (OFFSET))) \ ! | (((VALUE) & LM ((NBITS))) \ ! << (BIG_ENDIAN \ ! ? (INTERP_BPC - (OFFSET) - (NBITS)) \ ! : (OFFSET))))) /* Procedure call; arguments are a pointer to the function to be called, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/bytecode.h gcc-2.7.0/bytecode.h *** gcc-2.6.3/bytecode.h Sat Mar 12 07:36:14 1994 --- gcc-2.7.0/bytecode.h Thu Jun 15 07:08:34 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 25,50 **** /* Emit DI constant according to target machine word ordering */ - #if WORDS_BIG_ENDIAN - #define bc_emit_bytecode_DI_const(CST) \ { int opcode; \ ! opcode = TREE_INT_CST_HIGH (CST); \ ! bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ ! opcode = TREE_INT_CST_LOW (CST); \ ! bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ ! } ! ! #else ! ! #define bc_emit_bytecode_DI_const(CST) \ ! { int opcode; \ ! opcode = TREE_INT_CST_LOW (CST); \ bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ ! opcode = TREE_INT_CST_HIGH (CST); \ bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ } - - #endif - extern void bc_expand_expr (); --- 26,40 ---- /* Emit DI constant according to target machine word ordering */ #define bc_emit_bytecode_DI_const(CST) \ { int opcode; \ ! opcode = (WORDS_BIG_ENDIAN \ ! ? TREE_INT_CST_HIGH (CST) \ ! : TREE_INT_CST_LOW (CST)); \ bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ ! opcode = (WORDS_BIG_ENDIAN \ ! ? TREE_INT_CST_LOW (CST) \ ! : TREE_INT_CST_HIGH (CST)); \ bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ } extern void bc_expand_expr (); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-aux-info.c gcc-2.7.0/c-aux-info.c *** gcc-2.6.3/c-aux-info.c Fri Mar 25 13:54:49 1994 --- gcc-2.7.0/c-aux-info.c Thu Jun 15 07:08:56 1995 *************** *** 2,7 **** on information stored in GCC's tree structure. This code implements the -aux-info option. ! Copyright (C) 1989, 1991, 1994 Free Software Foundation, Inc. ! Contributed by Ron Guilmette (rfg@netcom.com). This file is part of GNU CC. --- 2,7 ---- on information stored in GCC's tree structure. This code implements the -aux-info option. ! Copyright (C) 1989, 1991, 1994, 1995 Free Software Foundation, Inc. ! Contributed by Ron Guilmette (rfg@segfault.us.com). This file is part of GNU CC. *************** *** 19,23 **** 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 --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 209,213 **** we do our best to give protoize something nice to insert. ! This "something nice" should be something that is still legal (when re-compiled) but something that can clearly indicate to the user that more typing information (for the parameter list) should be added (by --- 210,214 ---- we do our best to give protoize something nice to insert. ! This "something nice" should be something that is still valid (when re-compiled) but something that can clearly indicate to the user that more typing information (for the parameter list) should be added (by diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-common.c gcc-2.7.0/c-common.c *** gcc-2.6.3/c-common.c Thu Nov 17 11:07:14 1994 --- gcc-2.7.0/c-common.c Thu Jun 15 07:09:23 1995 *************** *** 1,4 **** /* Subroutines shared by all languages that are variants of C. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Subroutines shared by all languages that are variants of C. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 "config.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 29,33 **** extern struct obstack permanent_obstack; ! static void declare_hidden_char_array PROTO((char *, char *)); /* Make bindings for __FUNCTION__ and __PRETTY_FUNCTION__. */ --- 30,41 ---- extern struct obstack permanent_obstack; ! enum attrs {A_PACKED, A_NOCOMMON, A_NORETURN, A_CONST, A_T_UNION, ! A_CONSTRUCTOR, A_DESTRUCTOR, A_MODE, A_SECTION, A_ALIGNED, ! A_UNUSED, A_FORMAT, A_WEAK, A_ALIAS}; ! ! static void declare_hidden_char_array PROTO((char *, char *)); ! static void add_attribute PROTO((enum attrs, char *, ! int, int, int)); ! static void init_attributes PROTO((void)); /* Make bindings for __FUNCTION__ and __PRETTY_FUNCTION__. */ *************** *** 81,84 **** --- 89,93 ---- TREE_ASM_WRITTEN (decl) = 1; DECL_SOURCE_LINE (decl) = 0; + DECL_ARTIFICIAL (decl) = 1; DECL_IN_SYSTEM_HEADER (decl) = 1; DECL_IGNORED_P (decl) = 1; *************** *** 200,311 **** } ! /* Process the attributes listed in ATTRIBUTES ! and install them in DECL. */ void ! decl_attributes (decl, attributes) ! tree decl, attributes; { ! tree a, name, args, type, new_attr; ! type = TREE_TYPE (decl); ! new_attr = TYPE_ATTRIBUTES (type); for (a = attributes; a; a = TREE_CHAIN (a)) ! if (!(name = TREE_VALUE (a))) ! continue; ! else if (name == get_identifier ("packed") ! || name == get_identifier ("__packed__")) ! { ! if (TREE_CODE (decl) == FIELD_DECL) ! DECL_PACKED (decl) = 1; ! /* We can't set DECL_PACKED for a VAR_DECL, because the bit is ! used for DECL_REGISTER. It wouldn't mean anything anyway. */ ! else ! warning_with_decl (decl, "`packed' attribute ignore"); ! ! } ! else if (TREE_VALUE (a) == get_identifier ("noreturn") ! || TREE_VALUE (a) == get_identifier ("__noreturn__") ! || TREE_VALUE (a) == get_identifier ("volatile") ! || TREE_VALUE (a) == get_identifier ("__volatile__")) ! { ! if (TREE_CODE (decl) == FUNCTION_DECL) ! TREE_THIS_VOLATILE (decl) = 1; ! else if (TREE_CODE (type) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) ! TREE_TYPE (decl) = type ! = build_pointer_type ! (build_type_variant (TREE_TYPE (type), ! TREE_READONLY (TREE_TYPE (type)), 1)); ! else ! warning_with_decl (decl, "`%s' attribute ignored", ! IDENTIFIER_POINTER (TREE_VALUE (a))); ! } ! else if (TREE_VALUE (a) == get_identifier ("const") ! || TREE_VALUE (a) == get_identifier ("__const__")) ! { ! if (TREE_CODE (decl) == FUNCTION_DECL) ! TREE_READONLY (decl) = 1; ! else if (TREE_CODE (type) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) ! TREE_TYPE (decl) = type ! = build_pointer_type ! (build_type_variant (TREE_TYPE (type), 1, ! TREE_THIS_VOLATILE (TREE_TYPE (type)))); ! else ! warning_with_decl (decl, "`const' attribute ignored"); ! } ! else if (TREE_VALUE (a) == get_identifier ("transparent_union") ! || TREE_VALUE (a) == get_identifier ("__transparent_union__")) ! { ! if (TREE_CODE (decl) == PARM_DECL ! && TREE_CODE (type) == UNION_TYPE ! && TYPE_MODE (type) == DECL_MODE (TYPE_FIELDS (type))) ! DECL_TRANSPARENT_UNION (decl) = 1; ! else if (TREE_CODE (decl) == TYPE_DECL ! && TREE_CODE (type) == UNION_TYPE ! && TYPE_MODE (type) == DECL_MODE (TYPE_FIELDS (type))) ! TYPE_TRANSPARENT_UNION (type) = 1; ! else ! warning_with_decl (decl, "`transparent_union' attribute ignored"); ! } ! else if (TREE_CODE (name) != TREE_LIST) ! { ! #ifdef VALID_MACHINE_ATTRIBUTE ! if (VALID_MACHINE_ATTRIBUTE (type, new_attr, name)) ! { ! register tree atlist; ! ! for (atlist = new_attr; atlist; atlist = TREE_CHAIN (atlist)) ! if (TREE_VALUE (atlist) == name) ! goto found_attr; ! new_attr = tree_cons (NULL_TREE, name, new_attr); ! found_attr:; ! } ! else ! #endif ! warning ("`%s' attribute directive ignored", IDENTIFIER_POINTER (name)); ! } ! else if ( args = TREE_CHAIN(name), ! (!strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode") ! || !strcmp (IDENTIFIER_POINTER (name), "__mode__")) ! && list_length (args) == 1 ! && TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE) ! { ! int i; ! char *specified_name ! = IDENTIFIER_POINTER (TREE_VALUE (args)); ! ! /* Give this decl a type with the specified mode. */ ! for (i = 0; i < NUM_MACHINE_MODES; i++) ! if (!strcmp (specified_name, GET_MODE_NAME (i))) { ! tree typefm ! = type_for_mode (i, TREE_UNSIGNED (type)); ! if (typefm != 0) { TREE_TYPE (decl) = type = typefm; --- 209,454 ---- } ! /* To speed up processing of attributes, we maintain an array of ! IDENTIFIER_NODES and the corresponding attribute types. */ + /* Array to hold attribute information. */ + + static struct {enum attrs id; tree name; int min, max, decl_req;} attrtab[50]; + + static int attrtab_idx = 0; + + /* Add an entry to the attribute table above. */ + + static void + add_attribute (id, string, min_len, max_len, decl_req) + enum attrs id; + char *string; + int min_len, max_len; + int decl_req; + { + char buf[100]; + + attrtab[attrtab_idx].id = id; + attrtab[attrtab_idx].name = get_identifier (string); + attrtab[attrtab_idx].min = min_len; + attrtab[attrtab_idx].max = max_len; + attrtab[attrtab_idx++].decl_req = decl_req; + + sprintf (buf, "__%s__", string); + + attrtab[attrtab_idx].id = id; + attrtab[attrtab_idx].name = get_identifier (buf); + attrtab[attrtab_idx].min = min_len; + attrtab[attrtab_idx].max = max_len; + attrtab[attrtab_idx++].decl_req = decl_req; + } + + /* Initialize attribute table. */ + + static void + init_attributes () + { + add_attribute (A_PACKED, "packed", 0, 0, 0); + add_attribute (A_NOCOMMON, "nocommon", 0, 0, 1); + add_attribute (A_NORETURN, "noreturn", 0, 0, 1); + add_attribute (A_NORETURN, "volatile", 0, 0, 1); + add_attribute (A_UNUSED, "unused", 0, 0, 1); + add_attribute (A_CONST, "const", 0, 0, 1); + add_attribute (A_T_UNION, "transparent_union", 0, 0, 0); + add_attribute (A_CONSTRUCTOR, "constructor", 0, 0, 1); + add_attribute (A_DESTRUCTOR, "destructor", 0, 0, 1); + add_attribute (A_MODE, "mode", 1, 1, 1); + add_attribute (A_SECTION, "section", 1, 1, 1); + add_attribute (A_ALIGNED, "aligned", 0, 1, 0); + add_attribute (A_FORMAT, "format", 3, 3, 1); + add_attribute (A_WEAK, "weak", 0, 0, 1); + add_attribute (A_ALIAS, "alias", 1, 1, 1); + } + + /* Process the attributes listed in ATTRIBUTES and PREFIX_ATTRIBUTES + and install them in NODE, which is either a DECL (including a TYPE_DECL) + or a TYPE. PREFIX_ATTRIBUTES can appear after the declaration specifiers + and declaration modifiers but before the declaration proper. */ + void ! decl_attributes (node, attributes, prefix_attributes) ! tree node, attributes, prefix_attributes; { ! tree decl = 0, type; ! int is_type; ! tree a; ! if (attrtab_idx == 0) ! init_attributes (); ! if (TREE_CODE_CLASS (TREE_CODE (node)) == 'd') ! { ! decl = node; ! type = TREE_TYPE (decl); ! is_type = TREE_CODE (node) == TYPE_DECL; ! } ! else if (TREE_CODE_CLASS (TREE_CODE (node)) == 't') ! type = node, is_type = 1; + attributes = chainon (prefix_attributes, attributes); + for (a = attributes; a; a = TREE_CHAIN (a)) ! { ! tree name = TREE_PURPOSE (a); ! tree args = TREE_VALUE (a); ! int i; ! enum attrs id; ! ! for (i = 0; i < attrtab_idx; i++) ! if (attrtab[i].name == name) ! break; ! if (i == attrtab_idx) ! { ! if (! valid_machine_attribute (name, args, decl, type)) ! warning ("`%s' attribute directive ignored", ! IDENTIFIER_POINTER (name)); ! continue; ! } ! else if (attrtab[i].decl_req && decl == 0) ! { ! warning ("`%s' attribute does not apply to types", IDENTIFIER_POINTER (name)); ! continue; ! } ! else if (list_length (args) < attrtab[i].min ! || list_length (args) > attrtab[i].max) ! { ! error ("wrong number of arguments specified for `%s' attribute", ! IDENTIFIER_POINTER (name)); ! continue; ! } ! ! id = attrtab[i].id; ! switch (id) ! { ! case A_PACKED: ! if (decl == 0) ! TYPE_PACKED (type) = 1; ! else if (TREE_CODE (decl) == FIELD_DECL) ! DECL_PACKED (decl) = 1; ! /* We can't set DECL_PACKED for a VAR_DECL, because the bit is ! used for DECL_REGISTER. It wouldn't mean anything anyway. */ ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_NOCOMMON: ! if (TREE_CODE (decl) == VAR_DECL) ! DECL_COMMON (decl) = 0; ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_NORETURN: ! if (TREE_CODE (decl) == FUNCTION_DECL) ! TREE_THIS_VOLATILE (decl) = 1; ! else if (TREE_CODE (type) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) ! TREE_TYPE (decl) = type ! = build_pointer_type ! (build_type_variant (TREE_TYPE (type), ! TREE_READONLY (TREE_TYPE (type)), 1)); ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_UNUSED: ! if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL ! || TREE_CODE (decl) == FUNCTION_DECL) ! TREE_USED (decl) = 1; ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_CONST: ! if (TREE_CODE (decl) == FUNCTION_DECL) ! TREE_READONLY (decl) = 1; ! else if (TREE_CODE (type) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) ! TREE_TYPE (decl) = type ! = build_pointer_type ! (build_type_variant (TREE_TYPE (type), 1, ! TREE_THIS_VOLATILE (TREE_TYPE (type)))); ! else ! warning ( "`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_T_UNION: ! if (decl != 0 && TREE_CODE (decl) == PARM_DECL ! && TREE_CODE (type) == UNION_TYPE ! && TYPE_MODE (type) == DECL_MODE (TYPE_FIELDS (type))) ! DECL_TRANSPARENT_UNION (decl) = 1; ! else if (is_type ! && TREE_CODE (type) == UNION_TYPE ! && TYPE_MODE (type) == DECL_MODE (TYPE_FIELDS (type))) ! TYPE_TRANSPARENT_UNION (type) = 1; ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_CONSTRUCTOR: ! if (TREE_CODE (decl) == FUNCTION_DECL ! && TREE_CODE (type) == FUNCTION_TYPE ! && decl_function_context (decl) == 0) ! DECL_STATIC_CONSTRUCTOR (decl) = 1; ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_DESTRUCTOR: ! if (TREE_CODE (decl) == FUNCTION_DECL ! && TREE_CODE (type) == FUNCTION_TYPE ! && decl_function_context (decl) == 0) ! DECL_STATIC_DESTRUCTOR (decl) = 1; ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! ! case A_MODE: ! if (TREE_CODE (TREE_VALUE (args)) != IDENTIFIER_NODE) ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! else { ! int j; ! char *p = IDENTIFIER_POINTER (TREE_VALUE (args)); ! int len = strlen (p); ! enum machine_mode mode = VOIDmode; ! tree typefm; ! ! if (len > 4 && p[0] == '_' && p[1] == '_' ! && p[len - 1] == '_' && p[len - 2] == '_') ! { ! char *newp = (char *) alloca (len - 1); ! ! strcpy (newp, &p[2]); ! newp[len - 4] = '\0'; ! p = newp; ! } ! ! /* Give this decl a type with the specified mode. ! First check for the special modes. */ ! if (! strcmp (p, "byte")) ! mode = byte_mode; ! else if (!strcmp (p, "word")) ! mode = word_mode; ! else if (! strcmp (p, "pointer")) ! mode = ptr_mode; ! else ! for (j = 0; j < NUM_MACHINE_MODES; j++) ! if (!strcmp (p, GET_MODE_NAME (j))) ! mode = (enum machine_mode) j; ! ! if (mode == VOIDmode) ! error ("unknown machine mode `%s'", p); ! else if (0 == (typefm = type_for_mode (mode, ! TREE_UNSIGNED (type)))) ! error ("no data type for mode `%s'", p); ! else { TREE_TYPE (decl) = type = typefm; *************** *** 313,491 **** layout_decl (decl, 0); } - else - error ("no data type for mode `%s'", specified_name); - break; } ! if (i == NUM_MACHINE_MODES) ! error_with_decl (decl, "unknown machine mode `%s'", specified_name); ! } ! else if ((!strcmp (IDENTIFIER_POINTER (name), "section") ! || !strcmp (IDENTIFIER_POINTER (name), "__section__")) ! && list_length (args) == 1 ! && TREE_CODE (TREE_VALUE (args)) == STRING_CST) ! { #ifdef ASM_OUTPUT_SECTION_NAME ! if (TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) ! { ! if (TREE_CODE (decl) == VAR_DECL && current_function_decl != NULL_TREE) ! error_with_decl (decl, ! "section attribute cannot be specified for local variables"); ! /* The decl may have already been given a section attribute from ! a previous declaration. Ensure they match. */ ! else if (DECL_SECTION_NAME (decl) != NULL_TREE ! && strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), ! TREE_STRING_POINTER (TREE_VALUE (args))) != 0) ! error_with_decl (decl, ! "section of `%s' conflicts with previous declaration"); ! else ! DECL_SECTION_NAME (decl) = TREE_VALUE (args); ! } ! else ! error_with_decl (decl, "section attribute not allowed for `%s'"); #else ! error_with_decl (decl, "section attributes are not supported for this target"); #endif ! } ! else if ((!strcmp (IDENTIFIER_POINTER (name), "aligned") ! || !strcmp (IDENTIFIER_POINTER (name), "__aligned__")) ! && list_length (args) == 1 ! && TREE_CODE (TREE_VALUE (args)) == INTEGER_CST) ! { ! tree align_expr = TREE_VALUE (args); ! int align; ! ! /* Strip any NOPs of any kind. */ ! while (TREE_CODE (align_expr) == NOP_EXPR ! || TREE_CODE (align_expr) == CONVERT_EXPR ! || TREE_CODE (align_expr) == NON_LVALUE_EXPR) ! align_expr = TREE_OPERAND (align_expr, 0); ! if (TREE_CODE (align_expr) != INTEGER_CST) { ! error_with_decl (decl, ! "requested alignment of `%s' is not a constant"); ! continue; } ! align = TREE_INT_CST_LOW (align_expr) * BITS_PER_UNIT; ! ! if (exact_log2 (align) == -1) ! error_with_decl (decl, ! "requested alignment of `%s' is not a power of 2"); ! else if (TREE_CODE (decl) != VAR_DECL ! && TREE_CODE (decl) != FIELD_DECL) ! error_with_decl (decl, ! "alignment specified for `%s'"); ! else ! DECL_ALIGN (decl) = align; ! } ! else if ((!strcmp (IDENTIFIER_POINTER (name), "format") ! || !strcmp (IDENTIFIER_POINTER (name), "__format__")) ! && list_length (args) == 3 ! && TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE ! && TREE_CODE (TREE_VALUE (TREE_CHAIN (args))) == INTEGER_CST ! && TREE_CODE (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (args)))) == INTEGER_CST ) ! { ! tree format_type = TREE_VALUE (args); ! tree format_num_expr = TREE_VALUE (TREE_CHAIN (args)); ! tree first_arg_num_expr = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (args))); ! int format_num; ! int first_arg_num; ! int is_scan; ! tree argument; ! int arg_num; ! ! if (TREE_CODE (decl) != FUNCTION_DECL) { ! error_with_decl (decl, ! "argument format specified for non-function `%s'"); ! continue; ! } ! if (!strcmp (IDENTIFIER_POINTER (format_type), "printf") ! || !strcmp (IDENTIFIER_POINTER (format_type), "__printf__")) ! is_scan = 0; ! else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf") ! || !strcmp (IDENTIFIER_POINTER (format_type), "__scanf__")) ! is_scan = 1; ! else ! { ! error_with_decl (decl, "unrecognized format specifier for `%s'"); ! continue; ! } ! /* Strip any conversions from the string index and first arg number ! and verify they are constants. */ ! while (TREE_CODE (format_num_expr) == NOP_EXPR ! || TREE_CODE (format_num_expr) == CONVERT_EXPR ! || TREE_CODE (format_num_expr) == NON_LVALUE_EXPR) ! format_num_expr = TREE_OPERAND (format_num_expr, 0); ! ! while (TREE_CODE (first_arg_num_expr) == NOP_EXPR ! || TREE_CODE (first_arg_num_expr) == CONVERT_EXPR ! || TREE_CODE (first_arg_num_expr) == NON_LVALUE_EXPR) ! first_arg_num_expr = TREE_OPERAND (first_arg_num_expr, 0); ! ! if (TREE_CODE (format_num_expr) != INTEGER_CST ! || TREE_CODE (first_arg_num_expr) != INTEGER_CST) ! { ! error_with_decl (decl, ! "format string for `%s' has non-constant operand number"); ! continue; ! } ! format_num = TREE_INT_CST_LOW (format_num_expr); ! first_arg_num = TREE_INT_CST_LOW (first_arg_num_expr); ! if (first_arg_num != 0 && first_arg_num <= format_num) ! { ! error_with_decl (decl, ! "format string arg follows the args to be formatted, for `%s'"); ! continue; ! } ! /* If a parameter list is specified, verify that the format_num ! argument is actually a string, in case the format attribute ! is in error. */ ! argument = TYPE_ARG_TYPES (type); ! if (argument) ! { ! for (arg_num = 1; ; ++arg_num) { ! if (argument == 0 || arg_num == format_num) ! break; ! argument = TREE_CHAIN (argument); } ! if (! argument ! || TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE ! || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (argument))) ! != char_type_node)) { ! error_with_decl (decl, ! "format string arg not a string type, for `%s'"); continue; } ! if (first_arg_num != 0) { ! /* Verify that first_arg_num points to the last arg, the ... */ ! while (argument) ! arg_num++, argument = TREE_CHAIN (argument); ! if (arg_num != first_arg_num) { ! error_with_decl (decl, ! "args to be formatted is not ..., for `%s'"); continue; } } } ! record_function_format (DECL_NAME (decl), DECL_ASSEMBLER_NAME (decl), ! is_scan, format_num, first_arg_num); ! } ! else ! warning ("`%s' attribute directive ignored", ! IDENTIFIER_POINTER (name)); ! TREE_TYPE (decl) = build_type_attribute_variant (type, new_attr); } --- 456,650 ---- layout_decl (decl, 0); } } ! break; ! ! case A_SECTION: #ifdef ASM_OUTPUT_SECTION_NAME ! if ((TREE_CODE (decl) == FUNCTION_DECL ! || TREE_CODE (decl) == VAR_DECL) ! && TREE_CODE (TREE_VALUE (args)) == STRING_CST) ! { ! if (TREE_CODE (decl) == VAR_DECL ! && current_function_decl != NULL_TREE) ! error_with_decl (decl, ! "section attribute cannot be specified for local variables"); ! /* The decl may have already been given a section attribute from ! a previous declaration. Ensure they match. */ ! else if (DECL_SECTION_NAME (decl) != NULL_TREE ! && strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), ! TREE_STRING_POINTER (TREE_VALUE (args))) != 0) ! error_with_decl (node, ! "section of `%s' conflicts with previous declaration"); ! else ! DECL_SECTION_NAME (decl) = TREE_VALUE (args); ! } ! else ! error_with_decl (node, "section attribute not allowed for `%s'"); #else ! error_with_decl (node, ! "section attributes are not supported for this target"); #endif ! break; ! case A_ALIGNED: { ! tree align_expr ! = args ? TREE_VALUE (args) : size_int (BIGGEST_ALIGNMENT); ! int align; ! ! /* Strip any NOPs of any kind. */ ! while (TREE_CODE (align_expr) == NOP_EXPR ! || TREE_CODE (align_expr) == CONVERT_EXPR ! || TREE_CODE (align_expr) == NON_LVALUE_EXPR) ! align_expr = TREE_OPERAND (align_expr, 0); ! ! if (TREE_CODE (align_expr) != INTEGER_CST) ! { ! error ("requested alignment is not a constant"); ! continue; ! } ! ! align = TREE_INT_CST_LOW (align_expr) * BITS_PER_UNIT; ! ! if (exact_log2 (align) == -1) ! error ("requested alignment is not a power of 2"); ! else if (is_type) ! TYPE_ALIGN (TREE_TYPE (decl)) = align; ! else if (TREE_CODE (decl) != VAR_DECL ! && TREE_CODE (decl) != FIELD_DECL) ! error_with_decl (decl, ! "alignment may not be specified for `%s'"); ! else ! DECL_ALIGN (decl) = align; } + break; ! case A_FORMAT: { ! tree format_type = TREE_VALUE (args); ! tree format_num_expr = TREE_VALUE (TREE_CHAIN (args)); ! tree first_arg_num_expr ! = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (args))); ! int format_num; ! int first_arg_num; ! int is_scan; ! tree argument; ! int arg_num; ! if (TREE_CODE (decl) != FUNCTION_DECL) ! { ! error_with_decl (decl, ! "argument format specified for non-function `%s'"); ! continue; ! } ! if (TREE_CODE (format_type) == IDENTIFIER_NODE ! && (!strcmp (IDENTIFIER_POINTER (format_type), "printf") ! || !strcmp (IDENTIFIER_POINTER (format_type), ! "__printf__"))) ! is_scan = 0; ! else if (TREE_CODE (format_type) == IDENTIFIER_NODE ! && (!strcmp (IDENTIFIER_POINTER (format_type), "scanf") ! || !strcmp (IDENTIFIER_POINTER (format_type), ! "__scanf__"))) ! is_scan = 1; ! else ! { ! error ("unrecognized format specifier for `%s'"); ! continue; ! } ! /* Strip any conversions from the string index and first arg number ! and verify they are constants. */ ! while (TREE_CODE (format_num_expr) == NOP_EXPR ! || TREE_CODE (format_num_expr) == CONVERT_EXPR ! || TREE_CODE (format_num_expr) == NON_LVALUE_EXPR) ! format_num_expr = TREE_OPERAND (format_num_expr, 0); ! ! while (TREE_CODE (first_arg_num_expr) == NOP_EXPR ! || TREE_CODE (first_arg_num_expr) == CONVERT_EXPR ! || TREE_CODE (first_arg_num_expr) == NON_LVALUE_EXPR) ! first_arg_num_expr = TREE_OPERAND (first_arg_num_expr, 0); ! if (TREE_CODE (format_num_expr) != INTEGER_CST ! || TREE_CODE (first_arg_num_expr) != INTEGER_CST) { ! error ("format string has non-constant operand number"); ! continue; } ! ! format_num = TREE_INT_CST_LOW (format_num_expr); ! first_arg_num = TREE_INT_CST_LOW (first_arg_num_expr); ! if (first_arg_num != 0 && first_arg_num <= format_num) { ! error ("format string arg follows the args to be formatted"); continue; } ! ! /* If a parameter list is specified, verify that the format_num ! argument is actually a string, in case the format attribute ! is in error. */ ! argument = TYPE_ARG_TYPES (type); ! if (argument) { ! for (arg_num = 1; ; ++arg_num) ! { ! if (argument == 0 || arg_num == format_num) ! break; ! argument = TREE_CHAIN (argument); ! } ! if (! argument ! || TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE ! || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (argument))) ! != char_type_node)) { ! error ("format string arg not a string type"); continue; } + if (first_arg_num != 0) + { + /* Verify that first_arg_num points to the last arg, + the ... */ + while (argument) + arg_num++, argument = TREE_CHAIN (argument); + if (arg_num != first_arg_num) + { + error ("args to be formatted is not ..."); + continue; + } + } } + + record_function_format (DECL_NAME (decl), + DECL_ASSEMBLER_NAME (decl), + is_scan, format_num, first_arg_num); + break; } ! case A_WEAK: ! declare_weak (decl); ! break; ! case A_ALIAS: ! if ((TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl)) ! || TREE_CODE (decl) != FUNCTION_DECL && ! DECL_EXTERNAL (decl)) ! error_with_decl (decl, ! "`%s' defined both normally and as an alias"); ! else if (decl_function_context (decl) == 0) ! { ! tree id = get_identifier (TREE_STRING_POINTER ! (TREE_VALUE (args))); ! if (TREE_CODE (decl) == FUNCTION_DECL) ! DECL_INITIAL (decl) = error_mark_node; ! else ! DECL_EXTERNAL (decl) = 0; ! assemble_alias (decl, id); ! } ! else ! warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ! break; ! } ! } } *************** *** 536,540 **** /* Two GNU extensions. */ { "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" }, ! { "m", 0, T_UI, T_UI, T_UL, NULL, NULL, "-wp" }, { "feEgG", 0, T_D, NULL, NULL, NULL, T_LD, "-wp0 +#" }, { "c", 0, T_I, NULL, T_W, NULL, NULL, "-w" }, --- 695,699 ---- /* Two GNU extensions. */ { "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" }, ! { "m", 0, T_V, NULL, NULL, NULL, NULL, "-wp" }, { "feEgG", 0, T_D, NULL, NULL, NULL, T_LD, "-wp0 +#" }, { "c", 0, T_I, NULL, T_W, NULL, NULL, "-w" }, *************** *** 1037,1040 **** --- 1196,1202 ---- if (info->first_arg_num == 0) continue; + if (fci->pointer_count == 0 && wanted_type == void_type_node) + /* This specifier takes no argument. */ + continue; if (params == 0) { *************** *** 1212,1215 **** --- 1374,1381 ---- TREE_OVERFLOW (t) = 0; + /* Do not diagnose overflow in a constant expression merely + because a conversion overflowed. */ + TREE_CONSTANT_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (expr); + /* No warning for converting 0x80000000 to int. */ if (!(TREE_UNSIGNED (type) < TREE_UNSIGNED (TREE_TYPE (expr)) *************** *** 1282,1285 **** --- 1448,1454 ---- int unsignedp; { + if (bits == TYPE_PRECISION (integer_type_node)) + return unsignedp ? unsigned_type_node : integer_type_node; + if (bits == TYPE_PRECISION (signed_char_type_node)) return unsignedp ? unsigned_char_type_node : signed_char_type_node; *************** *** 1288,1294 **** return unsignedp ? short_unsigned_type_node : short_integer_type_node; - if (bits == TYPE_PRECISION (integer_type_node)) - return unsignedp ? unsigned_type_node : integer_type_node; - if (bits == TYPE_PRECISION (long_integer_type_node)) return unsignedp ? long_unsigned_type_node : long_integer_type_node; --- 1457,1460 ---- *************** *** 1322,1325 **** --- 1488,1494 ---- int unsignedp; { + if (mode == TYPE_MODE (integer_type_node)) + return unsignedp ? unsigned_type_node : integer_type_node; + if (mode == TYPE_MODE (signed_char_type_node)) return unsignedp ? unsigned_char_type_node : signed_char_type_node; *************** *** 1328,1334 **** return unsignedp ? short_unsigned_type_node : short_integer_type_node; - if (mode == TYPE_MODE (integer_type_node)) - return unsignedp ? unsigned_type_node : integer_type_node; - if (mode == TYPE_MODE (long_integer_type_node)) return unsignedp ? long_unsigned_type_node : long_integer_type_node; --- 1497,1500 ---- *************** *** 1611,1648 **** { if (max_lt || min_gt) ! val = integer_one_node; } else if (code == EQ_EXPR) { if (max_lt || min_gt) ! val = integer_zero_node; } else if (code == LT_EXPR) { if (max_lt) ! val = integer_one_node; if (!min_lt) ! val = integer_zero_node; } else if (code == GT_EXPR) { if (min_gt) ! val = integer_one_node; if (!max_gt) ! val = integer_zero_node; } else if (code == LE_EXPR) { if (!max_gt) ! val = integer_one_node; if (min_gt) ! val = integer_zero_node; } else if (code == GE_EXPR) { if (!min_lt) ! val = integer_one_node; if (max_lt) ! val = integer_zero_node; } --- 1777,1814 ---- { if (max_lt || min_gt) ! val = boolean_true_node; } else if (code == EQ_EXPR) { if (max_lt || min_gt) ! val = boolean_false_node; } else if (code == LT_EXPR) { if (max_lt) ! val = boolean_true_node; if (!min_lt) ! val = boolean_false_node; } else if (code == GT_EXPR) { if (min_gt) ! val = boolean_true_node; if (!max_gt) ! val = boolean_false_node; } else if (code == LE_EXPR) { if (!max_gt) ! val = boolean_true_node; if (min_gt) ! val = boolean_false_node; } else if (code == GE_EXPR) { if (!min_lt) ! val = boolean_true_node; if (max_lt) ! val = boolean_false_node; } *************** *** 1682,1688 **** /* This is the case of (char)x >?< 0x80, which people used to use expecting old C compilers to change the 0x80 into -0x80. */ ! if (val == integer_zero_node) warning ("comparison is always 0 due to limited range of data type"); ! if (val == integer_one_node) warning ("comparison is always 1 due to limited range of data type"); } --- 1848,1854 ---- /* This is the case of (char)x >?< 0x80, which people used to use expecting old C compilers to change the 0x80 into -0x80. */ ! if (val == boolean_false_node) warning ("comparison is always 0 due to limited range of data type"); ! if (val == boolean_true_node) warning ("comparison is always 1 due to limited range of data type"); } *************** *** 1691,1697 **** { /* This is the case of (unsigned char)x >?< -1 or < 0. */ ! if (val == integer_zero_node) warning ("comparison is always 0 due to limited range of data type"); ! if (val == integer_one_node) warning ("comparison is always 1 due to limited range of data type"); } --- 1857,1863 ---- { /* This is the case of (unsigned char)x >?< -1 or < 0. */ ! if (val == boolean_false_node) warning ("comparison is always 0 due to limited range of data type"); ! if (val == boolean_true_node) warning ("comparison is always 1 due to limited range of data type"); } *************** *** 1761,1765 **** primop0)))) warning ("unsigned value >= 0 is always 1"); ! value = integer_one_node; break; --- 1927,1931 ---- primop0)))) warning ("unsigned value >= 0 is always 1"); ! value = boolean_true_node; break; *************** *** 1770,1774 **** primop0)))) warning ("unsigned value < 0 is always 0"); ! value = integer_zero_node; } --- 1936,1940 ---- primop0)))) warning ("unsigned value < 0 is always 0"); ! value = boolean_false_node; } *************** *** 1787,1791 **** *op1_ptr = convert (type, primop1); ! *restype_ptr = integer_type_node; return 0; --- 1953,1957 ---- *op1_ptr = convert (type, primop1); ! *restype_ptr = boolean_type_node; return 0; *************** *** 1798,1805 **** representation of an expression expr and producing a valid tree boolean expression describing whether expr is nonzero. We could ! simply always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1), but we optimize comparisons, &&, ||, and !. ! The resulting type should always be `integer_type_node'. */ tree --- 1964,1971 ---- representation of an expression expr and producing a valid tree boolean expression describing whether expr is nonzero. We could ! simply always do build_binary_op (NE_EXPR, expr, boolean_false_node, 1), but we optimize comparisons, &&, ||, and !. ! The resulting type should always be `boolean_type_node'. */ tree *************** *** 1817,1829 **** case RECORD_TYPE: error ("struct type value used where scalar is required"); ! return integer_zero_node; case UNION_TYPE: error ("union type value used where scalar is required"); ! return integer_zero_node; case ARRAY_TYPE: error ("array type value used where scalar is required"); ! return integer_zero_node; default: --- 1983,1995 ---- case RECORD_TYPE: error ("struct type value used where scalar is required"); ! return boolean_false_node; case UNION_TYPE: error ("union type value used where scalar is required"); ! return boolean_false_node; case ARRAY_TYPE: error ("array type value used where scalar is required"); ! return boolean_false_node; default: *************** *** 1858,1862 **** case TRUTH_OR_EXPR: case TRUTH_XOR_EXPR: ! return convert (integer_type_node, expr); case ERROR_MARK: --- 2024,2030 ---- case TRUTH_OR_EXPR: case TRUTH_XOR_EXPR: ! case TRUTH_NOT_EXPR: ! TREE_TYPE (expr) = boolean_type_node; ! return expr; case ERROR_MARK: *************** *** 1864,1878 **** case INTEGER_CST: ! return integer_zerop (expr) ? integer_zero_node : integer_one_node; case REAL_CST: ! return real_zerop (expr) ? integer_zero_node : integer_one_node; case ADDR_EXPR: if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0))) ! return build (COMPOUND_EXPR, integer_type_node, ! TREE_OPERAND (expr, 0), integer_one_node); else ! return integer_one_node; case COMPLEX_EXPR: --- 2032,2046 ---- case INTEGER_CST: ! return integer_zerop (expr) ? boolean_false_node : boolean_true_node; case REAL_CST: ! return real_zerop (expr) ? boolean_false_node : boolean_true_node; case ADDR_EXPR: if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0))) ! return build (COMPOUND_EXPR, boolean_type_node, ! TREE_OPERAND (expr, 0), boolean_true_node); else ! return boolean_true_node; case COMPLEX_EXPR: *************** *** 1895,1899 **** we can't ignore them if their second arg has side-effects. */ if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))) ! return build (COMPOUND_EXPR, integer_type_node, TREE_OPERAND (expr, 1), truthvalue_conversion (TREE_OPERAND (expr, 0))); else --- 2063,2067 ---- we can't ignore them if their second arg has side-effects. */ if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))) ! return build (COMPOUND_EXPR, boolean_type_node, TREE_OPERAND (expr, 1), truthvalue_conversion (TREE_OPERAND (expr, 0))); else *************** *** 1902,1906 **** case COND_EXPR: /* Distribute the conversion into the arms of a COND_EXPR. */ ! return fold (build (COND_EXPR, integer_type_node, TREE_OPERAND (expr, 0), truthvalue_conversion (TREE_OPERAND (expr, 1)), truthvalue_conversion (TREE_OPERAND (expr, 2)))); --- 2070,2074 ---- case COND_EXPR: /* Distribute the conversion into the arms of a COND_EXPR. */ ! return fold (build (COND_EXPR, boolean_type_node, TREE_OPERAND (expr, 0), truthvalue_conversion (TREE_OPERAND (expr, 1)), truthvalue_conversion (TREE_OPERAND (expr, 2)))); *************** *** 1940,1945 **** case BIT_AND_EXPR: ! if (integer_onep (TREE_OPERAND (expr, 1))) ! return expr; case MODIFY_EXPR: --- 2108,2116 ---- case BIT_AND_EXPR: ! if (integer_onep (TREE_OPERAND (expr, 1)) ! && TREE_TYPE (expr) != boolean_type_node) ! /* Using convert here would cause infinite recursion. */ ! return build1 (NOP_EXPR, boolean_type_node, expr); ! break; case MODIFY_EXPR: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-convert.c gcc-2.7.0/c-convert.c *** gcc-2.6.3/c-convert.c Wed Apr 14 13:26:42 1993 --- gcc-2.7.0/c-convert.c Thu Jun 15 07:09:46 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-decl.c gcc-2.7.0/c-decl.c *** gcc-2.6.3/c-decl.c Fri Nov 11 17:52:25 1994 --- gcc-2.7.0/c-decl.c Thu Jun 15 07:10:15 1995 *************** *** 1,4 **** /* Process declarations and variables for C compiler. ! Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Process declarations and variables for C compiler. ! Copyright (C) 1988, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 29,32 **** --- 30,34 ---- #include "tree.h" #include "flags.h" + #include "output.h" #include "c-tree.h" #include "c-lex.h" *************** *** 116,119 **** --- 118,125 ---- tree long_long_unsigned_type_node; + tree boolean_type_node; + tree boolean_false_node; + tree boolean_true_node; + tree ptrdiff_type_node; *************** *** 179,182 **** --- 185,190 ---- tree double_ftype_double, double_ftype_double_double; tree int_ftype_int, long_ftype_long; + tree float_ftype_float; + tree ldouble_ftype_ldouble; /* Function type `void (void *, void *, int)' and similar ones */ *************** *** 398,401 **** --- 406,413 ---- static struct binding_level *label_level_chain; + /* Functions called automatically at the beginning and end of execution. */ + + tree static_ctors, static_dtors; + /* Forward declarations. */ *************** *** 702,706 **** else if (!strcmp (p, "-Wall")) { - extra_warnings = 1; /* We save the value of warn_uninitialized, since if they put -Wuninitialized on the command line, we need to generate a --- 714,717 ---- *************** *** 963,968 **** /* If this decl was copied from a file-scope decl on account of a block-scope extern decl, ! propagate TREE_ADDRESSABLE to the file-scope decl. */ ! if (DECL_ABSTRACT_ORIGIN (decl) != 0) TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1; else --- 974,983 ---- /* If this decl was copied from a file-scope decl on account of a block-scope extern decl, ! propagate TREE_ADDRESSABLE to the file-scope decl. ! ! DECL_ABSTRACT_ORIGIN can be set to itself if warn_return_type is ! true, since then the decl goes through save_for_inline_copying. */ ! if (DECL_ABSTRACT_ORIGIN (decl) != 0 ! && DECL_ABSTRACT_ORIGIN (decl) != decl) TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1; else *************** *** 1306,1309 **** --- 1321,1327 ---- char *errmsg = 0; + if (TREE_CODE_CLASS (TREE_CODE (olddecl)) == 'd') + DECL_MACHINE_ATTRIBUTES (newdecl) = DECL_MACHINE_ATTRIBUTES (olddecl); + if (TREE_CODE (newtype) == ERROR_MARK || TREE_CODE (oldtype) == ERROR_MARK) *************** *** 1389,1392 **** --- 1407,1422 ---- tree oldreturntype = TREE_TYPE (TREE_TYPE (olddecl)); tree newreturntype = TREE_TYPE (TREE_TYPE (newdecl)); + + /* Make sure we put the new type in the same obstack as the old ones. + If the old types are not both in the same obstack, use the + permanent one. */ + if (TYPE_OBSTACK (oldtype) == TYPE_OBSTACK (newtype)) + push_obstacks (TYPE_OBSTACK (oldtype), TYPE_OBSTACK (oldtype)); + else + { + push_obstacks_nochange (); + end_temporary_allocation (); + } + if (TYPE_MODE (oldreturntype) == TYPE_MODE (newreturntype)) { *************** *** 1423,1426 **** --- 1453,1458 ---- TREE_TYPE (olddecl) = newtype; } + + pop_obstacks (); } if (!types_match) *************** *** 1540,1547 **** : "`%s' previously declared here")); } else if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_INITIAL (olddecl) != 0 && TYPE_ARG_TYPES (oldtype) == 0 ! && TYPE_ARG_TYPES (newtype) != 0) { register tree type, parm; --- 1572,1592 ---- : "`%s' previously declared here")); } + else if (TREE_CODE (newdecl) == TYPE_DECL + && (DECL_IN_SYSTEM_HEADER (olddecl) + || DECL_IN_SYSTEM_HEADER (newdecl))) + { + warning_with_decl (newdecl, "redefinition of `%s'"); + warning_with_decl + (olddecl, + ((DECL_INITIAL (olddecl) + && current_binding_level == global_binding_level) + ? "`%s' previously defined here" + : "`%s' previously declared here")); + } else if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_INITIAL (olddecl) != 0 && TYPE_ARG_TYPES (oldtype) == 0 ! && TYPE_ARG_TYPES (newtype) != 0 ! && TYPE_ACTUAL_ARG_TYPES (oldtype) != 0) { register tree type, parm; *************** *** 1707,1711 **** DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl); ! if (DECL_CONTEXT (olddecl) == 0) DECL_CONTEXT (newdecl) = 0; } --- 1752,1757 ---- DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl); ! if (DECL_CONTEXT (olddecl) == 0 ! && TREE_CODE (newdecl) != FUNCTION_DECL) DECL_CONTEXT (newdecl) = 0; } *************** *** 1728,1731 **** --- 1774,1783 ---- DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl); + if (TREE_CODE (newdecl) == FUNCTION_DECL) + { + DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl); + DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl); + } + pop_obstacks (); } *************** *** 1741,1744 **** --- 1793,1797 ---- /* Merge the storage class information. */ + DECL_WEAK (newdecl) |= DECL_WEAK (olddecl); /* For functions, static overrides non-static. */ if (TREE_CODE (newdecl) == FUNCTION_DECL) *************** *** 1897,1902 **** decl in a parent block, then we can't return as yet, because we need to register this decl in the current binding block. */ ! if (! DECL_EXTERNAL (x) || ! TREE_PUBLIC (x) ! || lookup_name (name) == t) return t; } --- 1950,1954 ---- decl in a parent block, then we can't return as yet, because we need to register this decl in the current binding block. */ ! if (! TREE_PUBLIC (x) || lookup_name (name) == t) return t; } *************** *** 2334,2337 **** --- 2386,2391 ---- if (flag_traditional && TREE_TYPE (newdecl) == TREE_TYPE (olddecl)) return 0; + if (DECL_IN_SYSTEM_HEADER (olddecl) || DECL_IN_SYSTEM_HEADER (newdecl)) + return 0; return "redefinition of `%s'"; } *************** *** 2865,2868 **** --- 2919,2926 ---- TREE_TYPE (integer_one_node) = integer_type_node; + boolean_type_node = integer_type_node; + boolean_true_node = integer_one_node; + boolean_false_node = integer_zero_node; + size_zero_node = build_int_2 (0, 0); TREE_TYPE (size_zero_node) = sizetype; *************** *** 2917,2924 **** --- 2975,2991 ---- = build_function_type (void_type_node, NULL_TREE); + float_ftype_float + = build_function_type (float_type_node, + tree_cons (NULL_TREE, float_type_node, endlink)); + double_ftype_double = build_function_type (double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)); + ldouble_ftype_ldouble + = build_function_type (long_double_type_node, + tree_cons (NULL_TREE, long_double_type_node, + endlink)); + double_ftype_double_double = build_function_type (double_type_node, *************** *** 2990,2994 **** endlink)))); ! builtin_function ("__builtin_constant_p", int_ftype_int, BUILT_IN_CONSTANT_P, NULL_PTR); --- 3057,3061 ---- endlink)))); ! builtin_function ("__builtin_constant_p", default_function_type, BUILT_IN_CONSTANT_P, NULL_PTR); *************** *** 3038,3043 **** --- 3105,3114 ---- builtin_function ("__builtin_abs", int_ftype_int, BUILT_IN_ABS, NULL_PTR); + builtin_function ("__builtin_fabsf", float_ftype_float, BUILT_IN_FABS, + NULL_PTR); builtin_function ("__builtin_fabs", double_ftype_double, BUILT_IN_FABS, NULL_PTR); + builtin_function ("__builtin_fabsl", ldouble_ftype_ldouble, BUILT_IN_FABS, + NULL_PTR); builtin_function ("__builtin_labs", long_ftype_long, BUILT_IN_LABS, NULL_PTR); *************** *** 3100,3109 **** --- 3171,3192 ---- builtin_function ("__builtin_strlen", strlen_ftype, BUILT_IN_STRLEN, "strlen"); + builtin_function ("__builtin_sqrtf", float_ftype_float, + BUILT_IN_FSQRT, "sqrtf"); builtin_function ("__builtin_fsqrt", double_ftype_double, BUILT_IN_FSQRT, "sqrt"); + builtin_function ("__builtin_sqrtl", ldouble_ftype_ldouble, + BUILT_IN_FSQRT, "sqrtl"); + builtin_function ("__builtin_sinf", float_ftype_float, + BUILT_IN_SIN, "sinf"); builtin_function ("__builtin_sin", double_ftype_double, BUILT_IN_SIN, "sin"); + builtin_function ("__builtin_sinl", ldouble_ftype_ldouble, + BUILT_IN_SIN, "sinl"); + builtin_function ("__builtin_cosf", float_ftype_float, + BUILT_IN_COS, "cosf"); builtin_function ("__builtin_cos", double_ftype_double, BUILT_IN_COS, "cos"); + builtin_function ("__builtin_cosl", ldouble_ftype_ldouble, + BUILT_IN_COS, "cosl"); /* In an ANSI C program, it is okay to supply built-in meanings *************** *** 3114,3118 **** --- 3197,3204 ---- { builtin_function ("abs", int_ftype_int, BUILT_IN_ABS, NULL_PTR); + builtin_function ("fabsf", float_ftype_float, BUILT_IN_FABS, NULL_PTR); builtin_function ("fabs", double_ftype_double, BUILT_IN_FABS, NULL_PTR); + builtin_function ("fabsl", ldouble_ftype_ldouble, BUILT_IN_FABS, + NULL_PTR); builtin_function ("labs", long_ftype_long, BUILT_IN_LABS, NULL_PTR); builtin_function ("memcpy", memcpy_ftype, BUILT_IN_MEMCPY, NULL_PTR); *************** *** 3124,3130 **** --- 3210,3223 ---- NULL_PTR); builtin_function ("strlen", strlen_ftype, BUILT_IN_STRLEN, NULL_PTR); + builtin_function ("sqrtf", float_ftype_float, BUILT_IN_FSQRT, NULL_PTR); builtin_function ("sqrt", double_ftype_double, BUILT_IN_FSQRT, NULL_PTR); + builtin_function ("sqrtl", ldouble_ftype_ldouble, BUILT_IN_FSQRT, + NULL_PTR); + builtin_function ("sinf", float_ftype_float, BUILT_IN_SIN, NULL_PTR); builtin_function ("sin", double_ftype_double, BUILT_IN_SIN, NULL_PTR); + builtin_function ("sinl", ldouble_ftype_ldouble, BUILT_IN_SIN, NULL_PTR); + builtin_function ("cosf", float_ftype_float, BUILT_IN_COS, NULL_PTR); builtin_function ("cos", double_ftype_double, BUILT_IN_COS, NULL_PTR); + builtin_function ("cosl", ldouble_ftype_ldouble, BUILT_IN_COS, NULL_PTR); /* Declare these functions volatile *************** *** 3162,3165 **** --- 3255,3260 ---- #endif + pedantic_lvalues = pedantic; + /* Create the global bindings for __FUNCTION__ and __PRETTY_FUNCTION__. */ declare_function_name (); *************** *** 3278,3282 **** else { ! if (!warned) { warning ("useless keyword or type name in empty declaration"); --- 3373,3377 ---- else { ! if (!warned && ! in_system_header) { warning ("useless keyword or type name in empty declaration"); *************** *** 3342,3348 **** tree ! start_decl (declarator, declspecs, initialized) tree declarator, declspecs; int initialized; { register tree decl = grokdeclarator (declarator, declspecs, --- 3437,3444 ---- tree ! start_decl (declarator, declspecs, initialized, attributes, prefix_attributes) tree declarator, declspecs; int initialized; + tree attributes, prefix_attributes; { register tree decl = grokdeclarator (declarator, declspecs, *************** *** 3438,3449 **** gen_aux_info_record (decl, 0, 0, TYPE_ARG_TYPES (TREE_TYPE (decl)) != 0); /* 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); - /* For C and Obective-C, we by default put things in .common when - possible. */ - DECL_COMMON (tem) = 1; - /* For a local variable, define the RTL now. */ if (current_binding_level != global_binding_level --- 3534,3548 ---- gen_aux_info_record (decl, 0, 0, TYPE_ARG_TYPES (TREE_TYPE (decl)) != 0); + /* For C and Objective-C, we by default put things in .common when + possible. */ + DECL_COMMON (decl) = 1; + + /* Set attributes here so if duplicate decl, will have proper attributes. */ + decl_attributes (decl, attributes, prefix_attributes); + /* 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); /* For a local variable, define the RTL now. */ if (current_binding_level != global_binding_level *************** *** 3587,3592 **** Otherwise, let it through, but if it is not `extern' then it may cause an error message later. */ ! (DECL_INITIAL (decl) != 0 ! || current_binding_level != global_binding_level) : /* An automatic variable with an incomplete type --- 3686,3693 ---- Otherwise, let it through, but if it is not `extern' then it may cause an error message later. */ ! /* We must use DECL_CONTEXT instead of current_binding_level, ! because a duplicate_decls call could have changed the binding ! level of this decl. */ ! (DECL_INITIAL (decl) != 0 || DECL_CONTEXT (decl) != 0) : /* An automatic variable with an incomplete type *************** *** 3630,3635 **** /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); ! rest_of_decl_compilation (decl, asmspec, ! current_binding_level == global_binding_level, 0); pop_obstacks (); --- 3731,3735 ---- /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); ! rest_of_decl_compilation (decl, asmspec, DECL_CONTEXT (decl) == 0, 0); pop_obstacks (); *************** *** 3639,3647 **** /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); ! rest_of_decl_compilation (decl, asmspec, ! current_binding_level == global_binding_level, 0); } ! if (current_binding_level != global_binding_level) { /* Recompute the RTL of a local array now --- 3739,3746 ---- /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); ! rest_of_decl_compilation (decl, asmspec, DECL_CONTEXT (decl) == 0, 0); } ! if (DECL_CONTEXT (decl) != 0) { /* Recompute the RTL of a local array now *************** *** 3667,3672 **** /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); ! rest_of_decl_compilation (decl, NULL_PTR, ! current_binding_level == global_binding_level, 0); } --- 3766,3770 ---- /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); ! rest_of_decl_compilation (decl, NULL_PTR, DECL_CONTEXT (decl) == 0, 0); } *************** *** 3699,3703 **** preserve_initializer (); /* Hack? Set the permanent bit for something that is permanent, ! but not on the permenent obstack, so as to convince output_constant_def to make its rtl on the permanent obstack. */ --- 3797,3801 ---- preserve_initializer (); /* Hack? Set the permanent bit for something that is permanent, ! but not on the permanent obstack, so as to convince output_constant_def to make its rtl on the permanent obstack. */ *************** *** 3779,3783 **** push_obstacks_nochange (); ! decl = grokdeclarator (TREE_VALUE (parm), TREE_PURPOSE (parm), PARM, 0); #if 0 --- 3877,3884 ---- push_obstacks_nochange (); ! decl = grokdeclarator (TREE_VALUE (TREE_PURPOSE (parm)), ! TREE_PURPOSE (TREE_PURPOSE (parm)), PARM, 0); ! decl_attributes (decl, TREE_VALUE (TREE_VALUE (parm)), ! TREE_PURPOSE (TREE_VALUE (parm))); #if 0 *************** *** 3940,3943 **** --- 4041,4045 ---- int bitfield = 0; int size_varies = 0; + tree decl_machine_attr = NULL_TREE; if (decl_context == BITFIELD) *************** *** 3994,3998 **** Then store_parm_decls will reject it and not use it as a parm. */ if (decl_context == NORMAL && !funcdef_flag ! && current_binding_level->level_chain == global_binding_level) decl_context = PARM; --- 4096,4100 ---- Then store_parm_decls will reject it and not use it as a parm. */ if (decl_context == NORMAL && !funcdef_flag ! && current_binding_level->parm_flag) decl_context = PARM; *************** *** 4049,4052 **** --- 4151,4155 ---- { type = TREE_TYPE (id); + decl_machine_attr = DECL_MACHINE_ATTRIBUTES (id); typedef_decl = id; } *************** *** 4657,4662 **** & ((1 << (int) RID_STATIC) | (1 << (int) RID_REGISTER))))))) { ! error ("variable or field `%s' declared void", ! IDENTIFIER_POINTER (declarator)); type = integer_type_node; } --- 4760,4764 ---- & ((1 << (int) RID_STATIC) | (1 << (int) RID_REGISTER))))))) { ! error ("variable or field `%s' declared void", name); type = integer_type_node; } *************** *** 4732,4743 **** if (TREE_CODE (type) == FUNCTION_TYPE) { ! error ("field `%s' declared as a function", ! IDENTIFIER_POINTER (declarator)); type = build_pointer_type (type); } else if (TREE_CODE (type) != ERROR_MARK && TYPE_SIZE (type) == 0) { ! error ("field `%s' has incomplete type", ! IDENTIFIER_POINTER (declarator)); type = error_mark_node; } --- 4834,4843 ---- if (TREE_CODE (type) == FUNCTION_TYPE) { ! error ("field `%s' declared as a function", name); type = build_pointer_type (type); } else if (TREE_CODE (type) != ERROR_MARK && TYPE_SIZE (type) == 0) { ! error ("field `%s' has incomplete type", name); type = error_mark_node; } *************** *** 4768,4776 **** if (specbits & (1 << (int) RID_AUTO) && (pedantic || current_binding_level == global_binding_level)) ! pedwarn ("invalid storage class for function `%s'", ! IDENTIFIER_POINTER (declarator)); if (specbits & (1 << (int) RID_REGISTER)) ! error ("invalid storage class for function `%s'", ! IDENTIFIER_POINTER (declarator)); /* Function declaration not at top level. Storage classes other than `extern' are not allowed --- 4868,4874 ---- if (specbits & (1 << (int) RID_AUTO) && (pedantic || current_binding_level == global_binding_level)) ! pedwarn ("invalid storage class for function `%s'", name); if (specbits & (1 << (int) RID_REGISTER)) ! error ("invalid storage class for function `%s'", name); /* Function declaration not at top level. Storage classes other than `extern' are not allowed *************** *** 4779,4784 **** && (specbits & ((1 << (int) RID_STATIC) | (1 << (int) RID_INLINE))) && pedantic) ! pedwarn ("invalid storage class for function `%s'", ! IDENTIFIER_POINTER (declarator)); /* If this is a block level extern, it must live past the end --- 4877,4881 ---- && (specbits & ((1 << (int) RID_STATIC) | (1 << (int) RID_INLINE))) && pedantic) ! pedwarn ("invalid storage class for function `%s'", name); /* If this is a block level extern, it must live past the end *************** *** 4789,4792 **** --- 4886,4890 ---- decl = build_decl (FUNCTION_DECL, declarator, type); + decl = build_decl_attribute_variant (decl, decl_machine_attr); if (pedantic && (constp || volatilep) *************** *** 4803,4806 **** --- 4901,4905 ---- TREE_PUBLIC (decl) = !(specbits & ((1 << (int) RID_STATIC) | (1 << (int) RID_AUTO))); + /* Record presence of `inline', if it is reasonable. */ if (inlinep) *************** *** 5290,5299 **** /* Fill in the fields of a RECORD_TYPE or UNION_TYPE node, T. FIELDLIST is a chain of FIELD_DECL nodes for the fields. We also do a pop_obstacks to match the push in start_struct. */ tree ! finish_struct (t, fieldlist) ! register tree t, fieldlist; { register tree x; --- 5389,5401 ---- /* Fill in the fields of a RECORD_TYPE or UNION_TYPE node, T. FIELDLIST is a chain of FIELD_DECL nodes for the fields. + ATTRIBUTES are attributes to be applied to the structure. We also do a pop_obstacks to match the push in start_struct. */ tree ! finish_struct (t, fieldlist, attributes) ! tree t; ! tree fieldlist; ! tree attributes; { register tree x; *************** *** 5306,5309 **** --- 5408,5413 ---- TYPE_SIZE (t) = 0; + decl_attributes (t, attributes, NULL_TREE); + /* Nameless union parm types are useful as GCC extension. */ if (! (TREE_CODE (t) == UNION_TYPE && TYPE_NAME (t) == 0) && !pedantic) *************** *** 5335,5338 **** --- 5439,5443 ---- { DECL_CONTEXT (x) = t; + DECL_PACKED (x) |= TYPE_PACKED (t); DECL_FIELD_SIZE (x) = 0; *************** *** 5670,5679 **** /* After processing and defining all the values of an enumeration type, install their decls in the enumeration type and finish it off. ! ENUMTYPE is the type object and VALUES a list of decl-value pairs. Returns ENUMTYPE. */ tree ! finish_enum (enumtype, values) ! register tree enumtype, values; { register tree pair, tem; --- 5775,5787 ---- /* After processing and defining all the values of an enumeration type, install their decls in the enumeration type and finish it off. ! ENUMTYPE is the type object, VALUES a list of decl-value pairs, ! and ATTRIBUTES are the specified attributes. Returns ENUMTYPE. */ tree ! finish_enum (enumtype, values, attributes) ! tree enumtype; ! tree values; ! tree attributes; { register tree pair, tem; *************** *** 5685,5688 **** --- 5793,5798 ---- warning ("enum defined inside parms"); + decl_attributes (enumtype, attributes, NULL_TREE); + /* Calculate the maximum value of any enumerator in this type. */ *************** *** 5716,5720 **** precision = MAX (lowprec, highprec); ! if (flag_short_enums || precision > TYPE_PRECISION (integer_type_node)) /* Use the width of the narrowest normal C type which is wide enough. */ TYPE_PRECISION (enumtype) = TYPE_PRECISION (type_for_size (precision, 1)); --- 5826,5831 ---- precision = MAX (lowprec, highprec); ! if (flag_short_enums || TYPE_PACKED (enumtype) ! || precision > TYPE_PRECISION (integer_type_node)) /* Use the width of the narrowest normal C type which is wide enough. */ TYPE_PRECISION (enumtype) = TYPE_PRECISION (type_for_size (precision, 1)); *************** *** 5839,5844 **** /* Create the FUNCTION_DECL for a function definition. ! DECLSPECS and DECLARATOR are the parts of the declaration; ! they describe the function's name and the type it returns, but twisted together in a fashion that parallels the syntax of C. --- 5950,5955 ---- /* Create the FUNCTION_DECL for a function definition. ! DECLSPECS, DECLARATOR, PREFIX_ATTRIBUTES and ATTRIBUTES are the parts of ! the declaration; they describe the function's name and the type it returns, but twisted together in a fashion that parallels the syntax of C. *************** *** 5853,5858 **** int ! start_function (declspecs, declarator, nested) ! tree declarator, declspecs; int nested; { --- 5964,5969 ---- int ! start_function (declspecs, declarator, prefix_attributes, attributes, nested) ! tree declarator, declspecs, prefix_attributes, attributes; int nested; { *************** *** 5879,5882 **** --- 5990,5995 ---- return 0; + decl_attributes (decl1, prefix_attributes, attributes); + announce_function (decl1); *************** *** 6697,6700 **** --- 6810,6832 ---- DECL_INITIAL (fndecl) = error_mark_node; DECL_ARGUMENTS (fndecl) = 0; + } + + if (DECL_STATIC_CONSTRUCTOR (fndecl)) + { + #ifndef ASM_OUTPUT_CONSTRUCTOR + if (! flag_gnu_linker) + static_ctors = perm_tree_cons (NULL_TREE, fndecl, static_ctors); + else + #endif + assemble_constructor (IDENTIFIER_POINTER (DECL_NAME (fndecl))); + } + if (DECL_STATIC_DESTRUCTOR (fndecl)) + { + #ifndef ASM_OUTPUT_DESTRUCTOR + if (! flag_gnu_linker) + static_dtors = perm_tree_cons (NULL_TREE, fndecl, static_dtors); + else + #endif + assemble_destructor (IDENTIFIER_POINTER (DECL_NAME (fndecl))); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-iterate.c gcc-2.7.0/c-iterate.c *** gcc-2.6.3/c-iterate.c Wed Jul 28 15:33:13 1993 --- gcc-2.7.0/c-iterate.c Thu Jun 15 07:10:57 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 342,346 **** ITERATOR_BOUND_P (idecl) = 0; /* we can reset rtl since there is not chance that this expansion */ ! /* would be superceded by a higher level one */ if (top_level_ixpansion_p ()) DECL_RTL (idecl) = 0; --- 343,347 ---- ITERATOR_BOUND_P (idecl) = 0; /* we can reset rtl since there is not chance that this expansion */ ! /* would be superseded by a higher level one */ if (top_level_ixpansion_p ()) DECL_RTL (idecl) = 0; *************** *** 434,438 **** /* Record an iterator expansion ("ixpansion") for IDECL. ! The remaining paramters are the notes in the loop entry and exit rtl. */ --- 435,439 ---- /* Record an iterator expansion ("ixpansion") for IDECL. ! The remaining parameters are the notes in the loop entry and exit rtl. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-lang.c gcc-2.7.0/c-lang.c *** gcc-2.6.3/c-lang.c Thu Apr 22 07:42:38 1993 --- gcc-2.7.0/c-lang.c Thu Jun 15 07:11:15 1995 *************** *** 1,4 **** /* Language-specific hook definitions for C front end. ! Copyright (C) 1991 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Language-specific hook definitions for C front end. ! Copyright (C) 1991, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 127,129 **** --- 128,180 ---- { fatal ("GCC does not yet support XREF"); + } + + /* called at end of parsing, but before end-of-file processing. */ + void + finish_file () + { + extern tree static_ctors, static_dtors; + extern tree get_file_function_name (); + extern tree build_function_call PROTO((tree, tree)); + tree void_list_node = build_tree_list (NULL_TREE, void_type_node); + #ifndef ASM_OUTPUT_CONSTRUCTOR + if (static_ctors) + { + tree fnname = get_file_function_name ('I'); + start_function (void_list_node, + build_parse_node (CALL_EXPR, fnname, void_list_node, + NULL_TREE), + NULL_TREE, NULL_TREE, 0); + fnname = DECL_ASSEMBLER_NAME (current_function_decl); + store_parm_decls (); + + for (; static_ctors; static_ctors = TREE_CHAIN (static_ctors)) + expand_expr_stmt (build_function_call (TREE_VALUE (static_ctors), + NULL_TREE)); + + finish_function (0); + + assemble_constructor (IDENTIFIER_POINTER (fnname)); + } + #endif + #ifndef ASM_OUTPUT_DESTRUCTOR + if (static_dtors) + { + tree fnname = get_file_function_name ('D'); + start_function (void_list_node, + build_parse_node (CALL_EXPR, fnname, void_list_node, + NULL_TREE), + NULL_TREE, 0); + fnname = DECL_ASSEMBLER_NAME (current_function_decl); + store_parm_decls (); + + for (; static_dtors; static_dtors = TREE_CHAIN (static_dtors)) + expand_expr_stmt (build_function_call (TREE_VALUE (static_dtors), + NULL_TREE)); + + finish_function (0); + + assemble_destructor (IDENTIFIER_POINTER (fnname)); + } + #endif } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-lex.c gcc-2.7.0/c-lex.c *** gcc-2.6.3/c-lex.c Sat Jul 2 19:12:12 1994 --- gcc-2.7.0/c-lex.c Thu Jun 15 07:11:39 1995 *************** *** 1,4 **** /* Lexical analyzer for C and Objective C. ! Copyright (C) 1987, 1988, 1989, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Lexical analyzer for C and Objective C. ! Copyright (C) 1987, 88, 89, 92, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 31,34 **** --- 32,36 ---- #include "flags.h" #include "c-parse.h" + #include "c-pragma.h" #include *************** *** 645,649 **** && TREE_CODE (yylval.ttype) == INTEGER_CST && TREE_INT_CST_LOW (yylval.ttype) == 3) ! in_system_header = 1; } else --- 647,664 ---- && TREE_CODE (yylval.ttype) == INTEGER_CST && TREE_INT_CST_LOW (yylval.ttype) == 3) ! in_system_header = 1, used_up = 1; ! ! if (used_up) ! { ! /* Is this the last nonwhite stuff on the line? */ ! c = getc (finput); ! while (c == ' ' || c == '\t') ! c = getc (finput); ! if (c == '\n') ! return c; ! ungetc (c, finput); ! } ! ! warning ("unrecognized text at end of #line"); } else *************** *** 981,985 **** } ungetc(c, finput); ! /* Fall through to treat '@' as the start of an indentifier. */ } --- 996,1000 ---- } ungetc(c, finput); ! /* Fall through to treat '@' as the start of an identifier. */ } *************** *** 1361,1367 **** type = float_type_node; value = REAL_VALUE_ATOF (copy, TYPE_MODE (type)); ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! && REAL_VALUE_ISINF (value) && pedantic) ! pedwarn ("floating point number exceeds range of `float'"); } else if (lflag) --- 1376,1384 ---- type = float_type_node; value = REAL_VALUE_ATOF (copy, TYPE_MODE (type)); ! /* A diagnostic is required here by some ANSI C testsuites. ! This is not pedwarn, become some people don't want ! an error for this. */ ! if (REAL_VALUE_ISINF (value) && pedantic) ! warning ("floating point number exceeds range of `float'"); } else if (lflag) *************** *** 1369,1382 **** type = long_double_type_node; value = REAL_VALUE_ATOF (copy, TYPE_MODE (type)); ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! && REAL_VALUE_ISINF (value) && pedantic) ! pedwarn ("floating point number exceeds range of `long double'"); } else { value = REAL_VALUE_ATOF (copy, TYPE_MODE (type)); ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! && REAL_VALUE_ISINF (value) && pedantic) ! pedwarn ("floating point number exceeds range of `double'"); } --- 1386,1397 ---- type = long_double_type_node; value = REAL_VALUE_ATOF (copy, TYPE_MODE (type)); ! if (REAL_VALUE_ISINF (value) && pedantic) ! warning ("floating point number exceeds range of `long double'"); } else { value = REAL_VALUE_ATOF (copy, TYPE_MODE (type)); ! if (REAL_VALUE_ISINF (value) && pedantic) ! warning ("floating point number exceeds range of `double'"); } *************** *** 1388,1396 **** /* ERANGE is also reported for underflow, so test the value to distinguish overflow from that. */ ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT ! && (REAL_VALUES_LESS (dconst1, value) ! || REAL_VALUES_LESS (value, dconstm1))) { ! pedwarn ("floating point number exceeds range of `double'"); exceeds_double = 1; } --- 1403,1410 ---- /* ERANGE is also reported for underflow, so test the value to distinguish overflow from that. */ ! if (REAL_VALUES_LESS (dconst1, value) ! || REAL_VALUES_LESS (value, dconstm1)) { ! warning ("floating point number exceeds range of `double'"); exceeds_double = 1; } *************** *** 1800,1803 **** --- 1814,1820 ---- *p = 0; + if (c < 0) + error ("Unterminated string constant"); + /* We have read the entire constant. Construct a STRING_CST for the result. */ *************** *** 1865,1868 **** --- 1882,1886 ---- case '&': case '|': + case ':': case '<': case '>': *************** *** 1942,1947 **** goto combine; } ! else if ((c == '-') && (c1 == '>')) ! { value = POINTSAT; goto done; } ungetc (c1, finput); token_buffer[1] = 0; --- 1960,1985 ---- goto combine; } ! else ! switch (c) ! { ! case '-': ! if (c1 == '>') ! { value = POINTSAT; goto done; } ! break; ! case ':': ! if (c1 == '>') ! { value = ']'; goto done; } ! break; ! case '<': ! if (c1 == '%') ! { value = '{'; goto done; } ! if (c1 == ':') ! { value = '['; goto done; } ! break; ! case '%': ! if (c1 == '>') ! { value = '}'; goto done; } ! break; ! } ungetc (c1, finput); token_buffer[1] = 0; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-lex.h gcc-2.7.0/c-lex.h *** gcc-2.6.3/c-lex.h Fri Apr 9 19:00:25 1993 --- gcc-2.7.0/c-lex.h Thu Jun 15 07:12:22 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-parse.in gcc-2.7.0/c-parse.in *** gcc-2.6.3/c-parse.in Wed Aug 24 17:44:37 1994 --- gcc-2.7.0/c-parse.in Thu Jun 15 07:12:47 1995 *************** *** 1,4 **** /* YACC parser for C syntax and for Objective C. -*-c-*- ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* YACC parser for C syntax and for Objective C. -*-c-*- ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 defines the grammar of C and that of Objective C. --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This file defines the grammar of C and that of Objective C. *************** *** 25,49 **** /* To whomever it may concern: I have heard that such a thing was once ! written by AT&T, but I have never seen it. */ ifobjc ! %expect 22 end ifobjc ifc ! %expect 10 ! /* These are the 10 conflicts you should get in parse.output; the state numbers may vary if minor changes in the grammar are made. ! State 41 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 97 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 104 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 108 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 124 contains 1 shift/reduce conflict. (See comment at component_decl.) ! State 191 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 204 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 210 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 449 contains 2 shift/reduce conflicts. (Four ways to parse this.) ! */ end ifc --- 26,59 ---- /* To whomever it may concern: I have heard that such a thing was once ! written by AT&T, but I have never seen it. */ ifobjc ! %expect 48 end ifobjc ifc ! %expect 34 ! /* These are the 23 conflicts you should get in parse.output; the state numbers may vary if minor changes in the grammar are made. ! State 42 contains 1 shift/reduce conflict. (Two ways to parse ATTRIBUTE.) ! State 44 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 103 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 110 contains 1 shift/reduce conflict. (Two ways to parse ATTRIBUTE.) ! State 111 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 115 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 132 contains 1 shift/reduce conflict. (See comment at component_decl.) ! State 180 contains 1 shift/reduce conflict. (Two ways to parse ATTRIBUTE.) ! State 194 contains 2 shift/reduce conflict. (Four ways to parse this.) ! State 202 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 214 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 220 contains 1 shift/reduce conflict. (Two ways to recover from error.) ! State 304 contains 2 shift/reduce conflicts. (Four ways to parse this.) ! State 335 contains 2 shift/reduce conflicts. (Four ways to parse this.) ! State 347 contains 1 shift/reduce conflict. (Two ways to parse ATTRIBUTES.) ! State 352 contains 1 shift/reduce conflict. (Two ways to parse ATTRIBUTES.) ! State 383 contains 2 shift/reduce conflicts. (Four ways to parse this.) ! State 434 contains 2 shift/reduce conflicts. (Four ways to parse this.) */ ! end ifc *************** *** 131,135 **** /* SCO include files test "ASM", so use something else. */ %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF ALIGN %token ATTRIBUTE EXTENSION LABEL %token REALPART IMAGPART --- 141,145 ---- /* SCO include files test "ASM", so use something else. */ %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF %token ATTRIBUTE EXTENSION LABEL %token REALPART IMAGPART *************** *** 228,233 **** /* List of types and structure classes of the current declaration. */ static tree current_declspecs; ! /* Stack of saved values of current_declspecs. */ static tree declspec_stack; --- 238,244 ---- /* List of types and structure classes of the current declaration. */ static tree current_declspecs; + static tree prefix_attributes = NULL_TREE; ! /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; *************** *** 259,265 **** { if (pedantic) pedwarn ("ANSI C forbids an empty source file"); ! ifobjc ! objc_finish (); ! end ifobjc } | extdefs --- 270,274 ---- { if (pedantic) pedwarn ("ANSI C forbids an empty source file"); ! finish_file (); } | extdefs *************** *** 269,275 **** while (! global_bindings_p ()) poplevel (0, 0, 0); ! ifobjc ! objc_finish (); ! end ifobjc } ; --- 278,282 ---- while (! global_bindings_p ()) poplevel (0, 0, 0); ! finish_file (); } ; *************** *** 305,313 **** error ("ANSI C forbids data definition with no type or storage class"); else if (!flag_traditional) ! warning ("data definition has no type or storage class"); } | declmods setspecs notype_initdecls ';' ! {} | typed_declspecs setspecs initdecls ';' ! {} | declmods ';' { pedwarn ("empty declaration"); } --- 312,331 ---- error ("ANSI C forbids data definition with no type or storage class"); else if (!flag_traditional) ! warning ("data definition has no type or storage class"); ! ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($1); } | declmods setspecs notype_initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | typed_declspecs setspecs initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | declmods ';' { pedwarn ("empty declaration"); } *************** *** 323,327 **** fndef: typed_declspecs setspecs declarator ! { if (! start_function ($1, $3, 0)) YYERROR1; reinit_parse_for_function (); } --- 341,346 ---- fndef: typed_declspecs setspecs declarator ! { if (! start_function ($1, $3, prefix_attributes, ! NULL_TREE, 0)) YYERROR1; reinit_parse_for_function (); } *************** *** 329,337 **** { store_parm_decls (); } compstmt_or_error ! { finish_function (0); } | typed_declspecs setspecs declarator error ! { } | declmods setspecs notype_declarator ! { if (! start_function ($1, $3, 0)) YYERROR1; reinit_parse_for_function (); } --- 348,364 ---- { store_parm_decls (); } compstmt_or_error ! { finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | typed_declspecs setspecs declarator error ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | declmods setspecs notype_declarator ! { if (! start_function ($1, $3, prefix_attributes, ! NULL_TREE, 0)) YYERROR1; reinit_parse_for_function (); } *************** *** 339,347 **** { store_parm_decls (); } compstmt_or_error ! { finish_function (0); } | declmods setspecs notype_declarator error ! { } | setspecs notype_declarator ! { if (! start_function (NULL_TREE, $2, 0)) YYERROR1; reinit_parse_for_function (); } --- 366,382 ---- { store_parm_decls (); } compstmt_or_error ! { finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | declmods setspecs notype_declarator error ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | setspecs notype_declarator ! { if (! start_function (NULL_TREE, $2, ! prefix_attributes, NULL_TREE, 0)) YYERROR1; reinit_parse_for_function (); } *************** *** 349,355 **** { store_parm_decls (); } compstmt_or_error ! { finish_function (0); } | setspecs notype_declarator error ! { } ; --- 384,397 ---- { store_parm_decls (); } compstmt_or_error ! { finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($1); } | setspecs notype_declarator error ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($1); } ; *************** *** 413,416 **** --- 455,460 ---- | ANDAND identifier { tree label = lookup_label ($2); + if (pedantic) + pedwarn ("ANSI C forbids `&&'"); if (label == 0) $$ = null_pointer_node; *************** *** 807,811 **** ifobjc ! /* Produces an OBJC_STRING_CST with prehaps more OBJC_STRING_CSTs chained onto it. */ objc_string: --- 851,855 ---- ifobjc ! /* Produces an OBJC_STRING_CST with perhaps more OBJC_STRING_CSTs chained onto it. */ objc_string: *************** *** 844,851 **** typed_declspecs setspecs initdecls ';' { current_declspecs = TREE_VALUE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } | declmods setspecs notype_initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } --- 888,897 ---- typed_declspecs setspecs initdecls ';' { current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } | declmods setspecs notype_initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } *************** *** 880,886 **** { $$ = suspend_momentary (); pending_xref_error (); ! declspec_stack = tree_cons (NULL_TREE, current_declspecs, declspec_stack); ! current_declspecs = $0; } ; --- 926,938 ---- { $$ = suspend_momentary (); pending_xref_error (); ! declspec_stack = tree_cons (prefix_attributes, ! current_declspecs, declspec_stack); ! current_declspecs = $0; ! prefix_attributes = NULL_TREE; } ! ; ! ! setattrs: /* empty */ ! { prefix_attributes = chainon (prefix_attributes, $0); } ; *************** *** 888,903 **** --- 940,959 ---- typed_declspecs setspecs initdecls ';' { current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } | declmods setspecs notype_initdecls ';' { current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } | typed_declspecs setspecs nested_function { current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } | declmods setspecs notype_nested_function { current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } *************** *** 1019,1049 **** initdcl: declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, 1); ! decl_attributes ($$, $3); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); - decl_attributes ($5, $3); finish_decl ($5, $6, $2); } | declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, 0); ! decl_attributes (d, $3); ! finish_decl (d, NULL_TREE, $2); } ; notype_initdcl: notype_declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, 1); ! decl_attributes ($$, $3); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); ! decl_attributes ($5, $3); finish_decl ($5, $6, $2); } | notype_declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, 0); ! decl_attributes (d, $3); finish_decl (d, NULL_TREE, $2); } ; --- 1075,1105 ---- initdcl: declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, 1, ! $3, prefix_attributes); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); finish_decl ($5, $6, $2); } | declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, 0, ! $3, prefix_attributes); ! finish_decl (d, NULL_TREE, $2); ! } ; notype_initdcl: notype_declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, 1, ! $3, prefix_attributes); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); ! decl_attributes ($5, $3, prefix_attributes); finish_decl ($5, $6, $2); } | notype_declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, 0, ! $3, prefix_attributes); finish_decl (d, NULL_TREE, $2); } ; *************** *** 1071,1077 **** attribute_list: attrib ! { $$ = build_tree_list (NULL_TREE, $1); } | attribute_list ',' attrib ! { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } ; --- 1127,1133 ---- attribute_list: attrib ! { $$ = $1; } | attribute_list ',' attrib ! { $$ = chainon ($1, $3); } ; *************** *** 1080,1092 **** { $$ = NULL_TREE; } | any_word ! { $$ = $1; } | any_word '(' IDENTIFIER ')' ! { $$ = tree_cons ($1, NULL_TREE, ! build_tree_list (NULL_TREE, $3)); } | any_word '(' IDENTIFIER ',' nonnull_exprlist ')' ! { $$ = tree_cons ($1, NULL_TREE, ! tree_cons (NULL_TREE, $3, $5)); } ! | any_word '(' nonnull_exprlist ')' ! { $$ = tree_cons ($1, NULL_TREE, $3); } ; --- 1136,1146 ---- { $$ = NULL_TREE; } | any_word ! { $$ = build_tree_list ($1, NULL_TREE); } | any_word '(' IDENTIFIER ')' ! { $$ = build_tree_list ($1, build_tree_list (NULL_TREE, $3)); } | any_word '(' IDENTIFIER ',' nonnull_exprlist ')' ! { $$ = build_tree_list ($1, tree_cons (NULL_TREE, $3, $5)); } ! | any_word '(' exprlist ')' ! { $$ = build_tree_list ($1, $3); } ; *************** *** 1147,1151 **** /* These are for labeled elements. The syntax for an array element initializer conflicts with the syntax for an Objective-C message, ! so don't include these productions in the Objective-C grammer. */ ifc | '[' expr_no_commas ELLIPSIS expr_no_commas ']' '=' --- 1201,1205 ---- /* These are for labeled elements. The syntax for an array element initializer conflicts with the syntax for an Objective-C message, ! so don't include these productions in the Objective-C grammar. */ ifc | '[' expr_no_commas ELLIPSIS expr_no_commas ']' '=' *************** *** 1170,1180 **** declarator { push_c_function_context (); ! if (! start_function (current_declspecs, $1, 1)) { pop_c_function_context (); YYERROR1; } ! reinit_parse_for_function (); ! store_parm_decls (); } /* This used to use compstmt_or_error. That caused a bug with input `f(g) int g {}', --- 1224,1236 ---- declarator { push_c_function_context (); ! if (! start_function (current_declspecs, $1, ! prefix_attributes, NULL_TREE, 1)) { pop_c_function_context (); YYERROR1; } ! reinit_parse_for_function (); } ! xdecls ! { store_parm_decls (); } /* This used to use compstmt_or_error. That caused a bug with input `f(g) int g {}', *************** *** 1191,1201 **** notype_declarator { push_c_function_context (); ! if (! start_function (current_declspecs, $1, 1)) { pop_c_function_context (); YYERROR1; } ! reinit_parse_for_function (); ! store_parm_decls (); } /* This used to use compstmt_or_error. That caused a bug with input `f(g) int g {}', --- 1247,1259 ---- notype_declarator { push_c_function_context (); ! if (! start_function (current_declspecs, $1, ! prefix_attributes, NULL_TREE, 1)) { pop_c_function_context (); YYERROR1; } ! reinit_parse_for_function (); } ! xdecls ! { store_parm_decls (); } /* This used to use compstmt_or_error. That caused a bug with input `f(g) int g {}', *************** *** 1233,1236 **** --- 1291,1296 ---- | '*' type_quals after_type_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } + | attributes setattrs after_type_declarator + { $$ = $3; } | TYPENAME ifobjc *************** *** 1256,1259 **** --- 1316,1321 ---- | '*' type_quals parm_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } + | attributes setattrs parm_declarator + { $$ = $3; } | TYPENAME ; *************** *** 1276,1279 **** --- 1338,1343 ---- | notype_declarator '[' ']' %prec '.' { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); } + | attributes setattrs notype_declarator + { $$ = $3; } | IDENTIFIER ; *************** *** 1284,1303 **** /* Start scope of tag before parsing components. */ } ! component_decl_list '}' ! { $$ = finish_struct ($4, $5); ! /* Really define the structure. */ ! } ! | STRUCT '{' component_decl_list '}' { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), ! $3); } | STRUCT identifier { $$ = xref_tag (RECORD_TYPE, $2); } | UNION identifier '{' { $$ = start_struct (UNION_TYPE, $2); } ! component_decl_list '}' ! { $$ = finish_struct ($4, $5); } ! | UNION '{' component_decl_list '}' { $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE), ! $3); } | UNION identifier { $$ = xref_tag (UNION_TYPE, $2); } --- 1348,1367 ---- /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute ! { $$ = finish_struct ($4, $5, $7); } ! | STRUCT '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), ! $3, $5); ! } | STRUCT identifier { $$ = xref_tag (RECORD_TYPE, $2); } | UNION identifier '{' { $$ = start_struct (UNION_TYPE, $2); } ! component_decl_list '}' maybe_attribute ! { $$ = finish_struct ($4, $5, $7); } ! | UNION '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE), ! $3, $5); ! } | UNION identifier { $$ = xref_tag (UNION_TYPE, $2); } *************** *** 1305,1316 **** { $3 = suspend_momentary (); $$ = start_enum ($2); } ! enumlist maybecomma_warn '}' ! { $$ = finish_enum ($4, nreverse ($5)); resume_momentary ($3); } | ENUM '{' { $2 = suspend_momentary (); $$ = start_enum (NULL_TREE); } ! enumlist maybecomma_warn '}' ! { $$ = finish_enum ($3, nreverse ($4)); resume_momentary ($2); } | ENUM identifier --- 1369,1380 ---- { $3 = suspend_momentary (); $$ = start_enum ($2); } ! enumlist maybecomma_warn '}' maybe_attribute ! { $$ = finish_enum ($4, nreverse ($5), $8); resume_momentary ($3); } | ENUM '{' { $2 = suspend_momentary (); $$ = start_enum (NULL_TREE); } ! enumlist maybecomma_warn '}' maybe_attribute ! { $$ = finish_enum ($3, nreverse ($4), $7); resume_momentary ($2); } | ENUM identifier *************** *** 1375,1378 **** --- 1439,1443 ---- { $$ = $3; current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } *************** *** 1385,1388 **** --- 1450,1454 ---- { $$ = $3; current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } *************** *** 1405,1416 **** save_filename save_lineno declarator maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); ! decl_attributes ($$, $4); } | save_filename save_lineno declarator ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, $5); ! decl_attributes ($$, $6); } | save_filename save_lineno ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); ! decl_attributes ($$, $5); } ; --- 1471,1482 ---- save_filename save_lineno declarator maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); ! decl_attributes ($$, $4, prefix_attributes); } | save_filename save_lineno declarator ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, $5); ! decl_attributes ($$, $6, prefix_attributes); } | save_filename save_lineno ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); ! decl_attributes ($$, $5, prefix_attributes); } ; *************** *** 1483,1486 **** --- 1549,1554 ---- | '[' ']' %prec '.' { $$ = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); } + | attributes setattrs absdcl1 + { $$ = $3; } ; *************** *** 2087,2100 **** as found in a parmlist. */ parm: ! typed_declspecs parm_declarator ! { $$ = build_tree_list ($1, $2) ; } ! | typed_declspecs notype_declarator ! { $$ = build_tree_list ($1, $2) ; } ! | typed_declspecs absdcl ! { $$ = build_tree_list ($1, $2); } ! | declmods notype_declarator ! { $$ = build_tree_list ($1, $2) ; } ! | declmods absdcl ! { $$ = build_tree_list ($1, $2); } ; --- 2155,2204 ---- as found in a parmlist. */ parm: ! typed_declspecs setspecs parm_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } ! | typed_declspecs setspecs notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } ! | typed_declspecs setspecs absdcl maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } ! | declmods setspecs notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } ! ! | declmods setspecs absdcl maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } ; *************** *** 2368,2380 **** ivar_decl: typed_typespecs setspecs ivars ! { ! $$ = $3; ! resume_momentary ($2); ! } | nonempty_type_quals setspecs ivars ! { ! $$ = $3; ! resume_momentary ($2); ! } | error { $$ = NULL_TREE; } --- 2472,2486 ---- ivar_decl: typed_typespecs setspecs ivars ! { $$ = $3; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | nonempty_type_quals setspecs ivars ! { $$ = $3; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | error { $$ = NULL_TREE; } *************** *** 2553,2557 **** mydecl: typed_declspecs setspecs myparms ';' ! { resume_momentary ($2); } | typed_declspecs ';' { shadow_tag ($1); } --- 2659,2666 ---- mydecl: typed_declspecs setspecs myparms ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! resume_momentary ($2); } | typed_declspecs ';' { shadow_tag ($1); } *************** *** 2571,2580 **** myparm: ! parm_declarator ! { $$ = build_tree_list (current_declspecs, $1) ; } ! | notype_declarator ! { $$ = build_tree_list (current_declspecs, $1) ; } ! | absdcl ! { $$ = build_tree_list (current_declspecs, $1) ; } ; --- 2680,2698 ---- myparm: ! parm_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! build_tree_list (prefix_attributes, ! $2)); } ! | notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! build_tree_list (prefix_attributes, ! $2)); } ! | absdcl maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! build_tree_list (prefix_attributes, ! $2)); } ; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-pragma.c gcc-2.7.0/c-pragma.c *** gcc-2.6.3/c-pragma.c Sun Feb 27 18:23:05 1994 --- gcc-2.7.0/c-pragma.c Thu Jun 15 07:13:10 1995 *************** *** 16,20 **** 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 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 23,51 **** #include "function.h" #include "defaults.h" #ifdef HANDLE_SYSV_PRAGMA - /* Support #pragma weak by default if WEAK_ASM_OP and ASM_OUTPUT_DEF - are defined. */ - #if !defined (HANDLE_PRAGMA_WEAK) && defined (WEAK_ASM_OP) && defined (ASM_OUTPUT_DEF) - #define HANDLE_PRAGMA_WEAK 1 - #endif - - /* See varasm.c for an identical definition. */ - enum pragma_state - { - ps_start, - ps_done, - ps_bad, - ps_weak, - ps_name, - ps_equals, - ps_value, - ps_pack, - ps_left, - ps_align, - ps_right - }; - /* When structure field packing is in effect, this variable is the number of bits to use as the maximum alignment. When packing is not --- 24,31 ---- #include "function.h" #include "defaults.h" + #include "c-pragma.h" #ifdef HANDLE_SYSV_PRAGMA /* When structure field packing is in effect, this variable is the number of bits to use as the maximum alignment. When packing is not *************** *** 83,87 **** #ifdef HANDLE_PRAGMA_WEAK if (HANDLE_PRAGMA_WEAK) ! handle_pragma_weak (state, asm_out_file, name, value); #endif /* HANDLE_PRAMA_WEAK */ --- 63,67 ---- #ifdef HANDLE_PRAGMA_WEAK if (HANDLE_PRAGMA_WEAK) ! handle_pragma_weak (state, name, value); #endif /* HANDLE_PRAMA_WEAK */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-pragma.h gcc-2.7.0/c-pragma.h *** gcc-2.6.3/c-pragma.h --- gcc-2.7.0/c-pragma.h Thu Jun 15 07:13:22 1995 *************** *** 0 **** --- 1,46 ---- + /* Pragma related interfaces. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Support #pragma weak iff ASM_WEAKEN_LABEL and ASM_OUTPUT_DEF are + defined. */ + #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF) + #define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK + #endif + + enum pragma_state + { + ps_start, + ps_done, + ps_bad, + ps_weak, + ps_name, + ps_equals, + ps_value, + ps_pack, + ps_left, + ps_align, + ps_right + }; + + /* Output asm to handle ``#pragma weak'' */ + extern void handle_pragma_weak PROTO((enum pragma_state, char *, char *)); + + /* Handle a C style pragma */ + extern void handle_pragma_token PROTO((char *, tree)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-tree.h gcc-2.7.0/c-tree.h *** gcc-2.6.3/c-tree.h Fri Jun 24 16:15:16 1994 --- gcc-2.7.0/c-tree.h Thu Jun 15 07:13:40 1995 *************** *** 1,4 **** /* Definitions for C parsing and type checking. ! Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for C parsing and type checking. ! Copyright (C) 1987, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ #ifndef _C_TREE_H --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef _C_TREE_H *************** *** 157,161 **** /* in c-common.c */ extern void declare_function_name PROTO((void)); ! extern void decl_attributes PROTO((tree, tree)); extern void init_function_format_info PROTO((void)); extern void record_function_format PROTO((tree, tree, int, int, int)); --- 158,162 ---- /* in c-common.c */ extern void declare_function_name PROTO((void)); ! extern void decl_attributes PROTO((tree, tree, tree)); extern void init_function_format_info PROTO((void)); extern void record_function_format PROTO((tree, tree, int, int, int)); *************** *** 239,242 **** --- 240,246 ---- extern tree wchar_array_type_node; extern tree wchar_type_node; + extern tree boolean_type_node; + extern tree boolean_true_node; + extern tree boolean_false_node; extern tree build_enumerator PROTO((tree, tree)); *************** *** 255,261 **** extern void delete_block PROTO((tree)); extern void finish_decl PROTO((tree, tree, tree)); ! extern tree finish_enum PROTO((tree, tree)); extern void finish_function PROTO((int)); ! extern tree finish_struct PROTO((tree, tree)); extern tree get_parm_info PROTO((int)); extern tree getdecls PROTO((void)); --- 259,266 ---- extern void delete_block PROTO((tree)); extern void finish_decl PROTO((tree, tree, tree)); ! extern void finish_decl_top_level PROTO((tree, tree, tree)); ! extern tree finish_enum PROTO((tree, tree, tree)); extern void finish_function PROTO((int)); ! extern tree finish_struct PROTO((tree, tree, tree)); extern tree get_parm_info PROTO((int)); extern tree getdecls PROTO((void)); *************** *** 300,305 **** extern void shadow_tag_warned PROTO((tree, int)); extern tree start_enum PROTO((tree)); ! extern int start_function PROTO((tree, tree, int)); ! extern tree start_decl PROTO((tree, tree, int)); extern tree start_struct PROTO((enum tree_code, tree)); extern void store_parm_decls PROTO((void)); --- 305,312 ---- extern void shadow_tag_warned PROTO((tree, int)); extern tree start_enum PROTO((tree)); ! extern int start_function PROTO((tree, tree, tree, ! tree, int)); ! extern tree start_decl PROTO((tree, tree, int, ! tree, tree)); extern tree start_struct PROTO((enum tree_code, tree)); extern void store_parm_decls PROTO((void)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/c-typeck.c gcc-2.7.0/c-typeck.c *** gcc-2.6.3/c-typeck.c Fri Oct 28 19:22:15 1994 --- gcc-2.7.0/c-typeck.c Thu Jun 15 07:14:17 1995 *************** *** 1,4 **** /* Build expressions with type checking for C compiler. ! Copyright (C) 1987, 88, 91, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Build expressions with type checking for C compiler. ! Copyright (C) 1987, 88, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 33,36 **** --- 34,38 ---- #include "c-tree.h" #include "flags.h" + #include "output.h" /* Nonzero if we've already printed a "missing braces around initializer" *************** *** 209,214 **** else { ! /* Pick the longest list, and hang on the other ! list. */ if (list_length (a1) < list_length (a2)) --- 211,216 ---- else { ! /* Pick the longest list, and hang on the other list. */ ! /* ??? For the moment we punt on the issue of attrs with args. */ if (list_length (a1) < list_length (a2)) *************** *** 216,220 **** for (; a2; a2 = TREE_CHAIN (a2)) ! if (!value_member (attributes, a2)) { a1 = copy_node (a2); --- 218,223 ---- for (; a2; a2 = TREE_CHAIN (a2)) ! if (lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (a2)), ! attributes) == NULL_TREE) { a1 = copy_node (a2); *************** *** 1897,1902 **** int converted = 0; /* Nonzero means after finally constructing the expression ! give it this type. Otherwise, give it type RESULT_TYPE. */ tree final_type = 0; --- 1900,1909 ---- int converted = 0; + /* Nonzero means create the expression with this type, rather than + RESULT_TYPE. */ + tree build_type = 0; + /* Nonzero means after finally constructing the expression ! convert it to this type. */ tree final_type = 0; *************** *** 2169,2174 **** /* Result of comparison is always int, but don't convert the args to int! */ ! result_type = integer_type_node; ! converted = 1; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE) --- 2176,2180 ---- /* Result of comparison is always int, but don't convert the args to int! */ ! build_type = integer_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE) *************** *** 2184,2188 **** and both must be object or both incomplete. */ if (comp_target_types (type0, type1)) ! ; else if (TYPE_MAIN_VARIANT (tt0) == void_type_node) { --- 2190,2194 ---- and both must be object or both incomplete. */ if (comp_target_types (type0, type1)) ! result_type = common_type (type0, type1); else if (TYPE_MAIN_VARIANT (tt0) == void_type_node) { *************** *** 2201,2227 **** else pedwarn ("comparison of distinct pointer types lacks a cast"); } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) ! op1 = null_pointer_node; else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST && integer_zerop (op0)) ! op0 = null_pointer_node; else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { if (! flag_traditional) pedwarn ("comparison between pointer and integer"); - op1 = convert (TREE_TYPE (op0), op1); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { if (! flag_traditional) pedwarn ("comparison between pointer and integer"); - op0 = convert (TREE_TYPE (op1), op0); } - else - /* If args are not valid, clear out RESULT_TYPE - to cause an error message later. */ - result_type = 0; break; --- 2207,2232 ---- else pedwarn ("comparison of distinct pointer types lacks a cast"); + + if (result_type == NULL_TREE) + result_type = ptr_type_node; } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) ! result_type = type0; else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST && integer_zerop (op0)) ! result_type = type1; else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { + result_type = type0; if (! flag_traditional) pedwarn ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { + result_type = type1; if (! flag_traditional) pedwarn ("comparison between pointer and integer"); } break; *************** *** 2233,2242 **** else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (! comp_target_types (type0, type1)) ! pedwarn ("comparison of distinct pointer types lacks a cast"); ! else if (pedantic ! && TREE_CODE (TREE_TYPE (type0)) == FUNCTION_TYPE) ! pedwarn ("ANSI C forbids ordered comparisons of pointers to functions"); ! result_type = common_type (type0, type1); } break; --- 2238,2253 ---- else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1)) ! { ! result_type = common_type (type0, type1); ! if (pedantic ! && TREE_CODE (TREE_TYPE (type0)) == FUNCTION_TYPE) ! pedwarn ("ANSI C forbids ordered comparisons of pointers to functions"); ! } ! else ! { ! result_type = ptr_type_node; ! pedwarn ("comparison of distinct pointer types lacks a cast"); ! } } break; *************** *** 2246,2249 **** --- 2257,2261 ---- case LT_EXPR: case GT_EXPR: + build_type = integer_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) *************** *** 2251,2270 **** else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (! comp_target_types (type0, type1)) ! pedwarn ("comparison of distinct pointer types lacks a cast"); ! else if ((TYPE_SIZE (TREE_TYPE (type0)) != 0) ! != (TYPE_SIZE (TREE_TYPE (type1)) != 0)) ! pedwarn ("comparison of complete and incomplete pointers"); ! else if (pedantic ! && TREE_CODE (TREE_TYPE (type0)) == FUNCTION_TYPE) ! pedwarn ("ANSI C forbids ordered comparisons of pointers to functions"); ! result_type = integer_type_node; } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) { ! result_type = integer_type_node; ! op1 = null_pointer_node; ! if (pedantic) pedwarn ("ordered comparison of pointer with integer zero"); } --- 2263,2287 ---- else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1)) ! { ! result_type = common_type (type0, type1); ! if ((TYPE_SIZE (TREE_TYPE (type0)) != 0) ! != (TYPE_SIZE (TREE_TYPE (type1)) != 0)) ! pedwarn ("comparison of complete and incomplete pointers"); ! else if (pedantic ! && TREE_CODE (TREE_TYPE (type0)) == FUNCTION_TYPE) ! pedwarn ("ANSI C forbids ordered comparisons of pointers to functions"); ! } ! else ! { ! result_type = ptr_type_node; ! pedwarn ("comparison of distinct pointer types lacks a cast"); ! } } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) { ! result_type = type0; ! if (pedantic || extra_warnings) pedwarn ("ordered comparison of pointer with integer zero"); } *************** *** 2272,2277 **** && integer_zerop (op0)) { ! result_type = integer_type_node; ! op0 = null_pointer_node; if (pedantic) pedwarn ("ordered comparison of pointer with integer zero"); --- 2289,2293 ---- && integer_zerop (op0)) { ! result_type = type1; if (pedantic) pedwarn ("ordered comparison of pointer with integer zero"); *************** *** 2279,2295 **** else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { ! result_type = integer_type_node; if (! flag_traditional) pedwarn ("comparison between pointer and integer"); - op1 = convert (TREE_TYPE (op0), op1); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { ! result_type = integer_type_node; if (! flag_traditional) pedwarn ("comparison between pointer and integer"); - op0 = convert (TREE_TYPE (op1), op0); } - converted = 1; break; } --- 2295,2308 ---- else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { ! result_type = type0; if (! flag_traditional) pedwarn ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { ! result_type = type1; if (! flag_traditional) pedwarn ("comparison between pointer and integer"); } break; } *************** *** 2392,2395 **** --- 2405,2412 ---- if (TYPE_PRECISION (TREE_TYPE (arg0)) < TYPE_PRECISION (result_type) + /* We can shorten only if the shift count is less than the + number of bits in the smaller type size. */ + && TREE_INT_CST_HIGH (op1) == 0 + && TYPE_PRECISION (TREE_TYPE (arg0)) > TREE_INT_CST_LOW (op1) /* If arg is sign-extended and then unsigned-shifted, we can simulate this with a signed shift in arg's type *************** *** 2429,2469 **** if (val != 0) return val; ! op0 = xop0, op1 = xop1, result_type = xresult_type; resultcode = xresultcode; if (extra_warnings) { ! tree op0_type = TREE_TYPE (orig_op0); ! tree op1_type = TREE_TYPE (orig_op1); ! int op0_unsigned = TREE_UNSIGNED (op0_type); ! int op1_unsigned = TREE_UNSIGNED (op1_type); /* Give warnings for comparisons between signed and unsigned ! quantities that will fail. Do not warn if the signed quantity ! is an unsuffixed integer literal (or some static constant ! expression involving such literals) and it is positive. ! Do not warn if the width of the unsigned quantity is less ! than that of the signed quantity, since in this case all ! values of the unsigned quantity fit in the signed quantity. ! Do not warn if the signed type is the same size as the ! result_type since sign extension does not cause trouble in ! this case. */ /* Do the checking based on the original operand trees, so that casts will be considered, but default promotions won't be. */ ! if (op0_unsigned != op1_unsigned ! && ((op0_unsigned ! && TYPE_PRECISION (op0_type) >= TYPE_PRECISION (op1_type) ! && TYPE_PRECISION (op0_type) < TYPE_PRECISION (result_type) ! && (TREE_CODE (op1) != INTEGER_CST ! || (TREE_CODE (op1) == INTEGER_CST ! && INT_CST_LT (op1, integer_zero_node)))) ! || ! (op1_unsigned ! && TYPE_PRECISION (op1_type) >= TYPE_PRECISION (op0_type) ! && TYPE_PRECISION (op1_type) < TYPE_PRECISION (result_type) ! && (TREE_CODE (op0) != INTEGER_CST ! || (TREE_CODE (op0) == INTEGER_CST ! && INT_CST_LT (op0, integer_zero_node)))))) warning ("comparison between signed and unsigned"); } } --- 2446,2556 ---- if (val != 0) return val; ! op0 = xop0, op1 = xop1; ! converted = 1; resultcode = xresultcode; if (extra_warnings) { ! int op0_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op0)); ! int op1_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op1)); ! ! int unsignedp0, unsignedp1; ! tree primop0 = get_narrower (op0, &unsignedp0); ! tree primop1 = get_narrower (op1, &unsignedp1); ! ! /* Avoid spurious warnings for comparison with enumerators. */ + xop0 = orig_op0; + xop1 = orig_op1; + STRIP_TYPE_NOPS (xop0); + STRIP_TYPE_NOPS (xop1); + /* Give warnings for comparisons between signed and unsigned ! quantities that may fail. */ /* Do the checking based on the original operand trees, so that casts will be considered, but default promotions won't be. */ ! ! /* Do not warn if the comparison is being done in a signed type, ! since the signed type will only be chosen if it can represent ! all the values of the unsigned type. */ ! if (! TREE_UNSIGNED (result_type)) ! /* OK */; ! /* Do not warn if both operands are unsigned. */ ! else if (op0_signed == op1_signed) ! /* OK */; ! /* Do not warn if the signed quantity is an unsuffixed ! integer literal (or some static constant expression ! involving such literals) and it is non-negative. */ ! else if ((op0_signed && TREE_CODE (xop0) == INTEGER_CST ! && tree_int_cst_sgn (xop0) >= 0) ! || (op1_signed && TREE_CODE (xop1) == INTEGER_CST ! && tree_int_cst_sgn (xop1) >= 0)) ! /* OK */; ! /* Do not warn if the comparison is an equality operation, ! the unsigned quantity is an integral constant and it does ! not use the most significant bit of result_type. */ ! else if ((resultcode == EQ_EXPR || resultcode == NE_EXPR) ! && ((op0_signed && TREE_CODE (xop1) == INTEGER_CST ! && int_fits_type_p (xop1, signed_type (result_type)) ! || (op1_signed && TREE_CODE (xop0) == INTEGER_CST ! && int_fits_type_p (xop0, signed_type (result_type)))))) ! /* OK */; ! else warning ("comparison between signed and unsigned"); + + /* Warn if two unsigned values are being compared in a size + larger than their original size, and one (and only one) is the + result of a `~' operator. This comparison will always fail. + + Also warn if one operand is a constant, and the constant + does not have all bits set that are set in the ~ operand + when it is extended. */ + + if ((TREE_CODE (primop0) == BIT_NOT_EXPR) + != (TREE_CODE (primop1) == BIT_NOT_EXPR)) + { + if (TREE_CODE (primop0) == BIT_NOT_EXPR) + primop0 = get_narrower (TREE_OPERAND (primop0, 0), + &unsignedp0); + else + primop1 = get_narrower (TREE_OPERAND (primop1, 0), + &unsignedp1); + + if (TREE_CODE (primop0) == INTEGER_CST + || TREE_CODE (primop1) == INTEGER_CST) + { + tree primop; + long constant, mask; + int unsignedp, bits; + + if (TREE_CODE (primop0) == INTEGER_CST) + { + primop = primop1; + unsignedp = unsignedp1; + constant = TREE_INT_CST_LOW (primop0); + } + else + { + primop = primop0; + unsignedp = unsignedp0; + constant = TREE_INT_CST_LOW (primop1); + } + + bits = TYPE_PRECISION (TREE_TYPE (primop)); + if (bits < TYPE_PRECISION (result_type) + && bits < HOST_BITS_PER_LONG && unsignedp) + { + mask = (~0L) << bits; + if ((mask & constant) != mask) + warning ("comparison of promoted ~unsigned with constant"); + } + } + else if (unsignedp0 && unsignedp1 + && (TYPE_PRECISION (TREE_TYPE (primop0)) + < TYPE_PRECISION (result_type)) + && (TYPE_PRECISION (TREE_TYPE (primop1)) + < TYPE_PRECISION (result_type))) + warning ("comparison of promoted ~unsigned with unsigned"); + } } } *************** *** 2490,2495 **** } { ! register tree result = build (resultcode, result_type, op0, op1); register tree folded; --- 2577,2585 ---- } + if (build_type == NULL_TREE) + build_type = result_type; + { ! register tree result = build (resultcode, build_type, op0, op1); register tree folded; *************** *** 3479,3486 **** rest = internal_build_compound_expr (TREE_CHAIN (list), FALSE); ! /* When pedantic, a compound expression can be neither an lvalue ! nor an integer constant expression. */ ! if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)) && ! pedantic) ! return rest; return build (COMPOUND_EXPR, TREE_TYPE (rest), TREE_VALUE (list), rest); --- 3569,3594 ---- rest = internal_build_compound_expr (TREE_CHAIN (list), FALSE); ! if (! TREE_SIDE_EFFECTS (TREE_VALUE (list))) ! { ! /* The left-hand operand of a comma expression is like an expression ! statement: with -W or -Wunused, we should warn if it doesn't have ! any side-effects, unless it was explicitly cast to (void). */ ! if ((extra_warnings || warn_unused) ! && ! (TREE_CODE (TREE_VALUE (list)) == CONVERT_EXPR ! && TREE_TYPE (TREE_VALUE (list)) == void_type_node)) ! warning ("left-hand operand of comma expression has no effect"); ! ! /* When pedantic, a compound expression can be neither an lvalue ! nor an integer constant expression. */ ! if (! pedantic) ! return rest; ! } ! ! /* With -Wunused, we should also warn if the left-hand operand does have ! side-effects, but computes a value which is not used. For example, in ! `foo() + bar(), baz()' the result of the `+' operator is not used, ! so we should issue a warning. */ ! else if (warn_unused) ! warn_if_unused_value (TREE_VALUE (list)); return build (COMPOUND_EXPR, TREE_TYPE (rest), TREE_VALUE (list), rest); *************** *** 3986,3990 **** so the usual warnings are not appropriate. */ else if (TREE_CODE (ttr) != FUNCTION_TYPE ! || TREE_CODE (ttl) != FUNCTION_TYPE) { if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr)) --- 4094,4098 ---- so the usual warnings are not appropriate. */ else if (TREE_CODE (ttr) != FUNCTION_TYPE ! && TREE_CODE (ttl) != FUNCTION_TYPE) { if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr)) *************** *** 4005,4009 **** get_spelling (errtype), funname, parmnum); } ! else { /* Because const and volatile on functions are restrictions --- 4113,4118 ---- get_spelling (errtype), funname, parmnum); } ! else if (TREE_CODE (ttl) == FUNCTION_TYPE ! && TREE_CODE (ttr) == FUNCTION_TYPE) { /* Because const and volatile on functions are restrictions *************** *** 4132,4136 **** { case CONSTRUCTOR: ! if (TREE_CODE (TREE_TYPE (value)) == UNION_TYPE && TREE_CONSTANT (value)) return --- 4241,4246 ---- { case CONSTRUCTOR: ! if ((TREE_CODE (TREE_TYPE (value)) == UNION_TYPE ! || TREE_CODE (TREE_TYPE (value)) == RECORD_TYPE) && TREE_CONSTANT (value)) return *************** *** 4814,4818 **** /* For an ARRAY_TYPE, this is the end index of the range ! to intitialize with the next element, or NULL in the ordinary case where the element is used just once. */ static tree constructor_range_end; --- 4924,4928 ---- /* For an ARRAY_TYPE, this is the end index of the range ! to initialize with the next element, or NULL in the ordinary case where the element is used just once. */ static tree constructor_range_end; *************** *** 5238,5241 **** --- 5348,5352 ---- constructor_type = TREE_TYPE (constructor_fields); push_member_name (constructor_fields); + constructor_depth++; if (constructor_fields != constructor_unfilled_fields) constructor_incremental = 0; *************** *** 5246,5249 **** --- 5357,5361 ---- constructor_type = TREE_TYPE (constructor_type); push_array_bounds (TREE_INT_CST_LOW (constructor_index)); + constructor_depth++; if (! tree_int_cst_equal (constructor_index, constructor_unfilled_index) || constructor_range_end != 0) *************** *** 5387,5391 **** { constructor = digest_init (constructor_type, constructor, ! 0, 0); /* If initializing an array of unknown size, --- 5499,5504 ---- { constructor = digest_init (constructor_type, constructor, ! require_constant_value, ! require_constant_elements); /* If initializing an array of unknown size, *************** *** 5659,5663 **** else if (!TREE_CONSTANT (value)) constructor_constant = 0; ! else if (initializer_constant_valid_p (value, TREE_TYPE (value)) == 0) constructor_simple = 0; --- 5772,5779 ---- else if (!TREE_CONSTANT (value)) constructor_constant = 0; ! else if (initializer_constant_valid_p (value, TREE_TYPE (value)) == 0 ! || ((TREE_CODE (constructor_type) == RECORD_TYPE ! || TREE_CODE (constructor_type) == UNION_TYPE) ! && DECL_BIT_FIELD (field) && TREE_CODE (value) != INTEGER_CST)) constructor_simple = 0; *************** *** 5719,5723 **** constructor_pending_elts = tree_cons (copy_node (field), ! digest_init (type, value, 0, 0), constructor_pending_elts); } --- 5835,5840 ---- constructor_pending_elts = tree_cons (copy_node (field), ! digest_init (type, value, require_constant_value, ! require_constant_elements), constructor_pending_elts); } *************** *** 5731,5735 **** constructor_pending_elts = tree_cons (field, ! digest_init (type, value, 0, 0), constructor_pending_elts); } --- 5848,5853 ---- constructor_pending_elts = tree_cons (field, ! digest_init (type, value, require_constant_value, ! require_constant_elements), constructor_pending_elts); } *************** *** 5746,5750 **** field = copy_node (field); constructor_elements ! = tree_cons (field, digest_init (type, value, 0, 0), constructor_elements); } --- 5864,5870 ---- field = copy_node (field); constructor_elements ! = tree_cons (field, digest_init (type, value, ! require_constant_value, ! require_constant_elements), constructor_elements); } *************** *** 5767,5771 **** } } ! output_constant (digest_init (type, value, 0, 0), int_size_in_bytes (type)); --- 5887,5893 ---- } } ! output_constant (digest_init (type, value, ! require_constant_value, ! require_constant_elements), int_size_in_bytes (type)); *************** *** 6229,6233 **** /* If the (lexically) previous elments are not now saved, we can discard the storage for them. */ ! if (constructor_incremental && constructor_pending_elts == 0 && value != 0) clear_momentary (); } --- 6351,6356 ---- /* If the (lexically) previous elments are not now saved, we can discard the storage for them. */ ! if (constructor_incremental && constructor_pending_elts == 0 && value != 0 ! && constructor_stack == 0) clear_momentary (); } *************** *** 6344,6366 **** /* Strip any conversions, additions, and subtractions, and see if we are returning the address of a local variable. Warn if so. */ ! while (TREE_CODE (inner) == NOP_EXPR ! || TREE_CODE (inner) == NON_LVALUE_EXPR ! || TREE_CODE (inner) == CONVERT_EXPR ! || TREE_CODE (inner) == PLUS_EXPR ! || TREE_CODE (inner) == MINUS_EXPR) ! inner = TREE_OPERAND (inner, 0); ! ! if (TREE_CODE (inner) == ADDR_EXPR) ! { ! inner = TREE_OPERAND (inner, 0); ! ! while (TREE_CODE_CLASS (TREE_CODE (inner)) == 'r') ! inner = TREE_OPERAND (inner, 0); ! ! if (TREE_CODE (inner) == VAR_DECL ! && ! DECL_EXTERNAL (inner) ! && ! TREE_STATIC (inner) ! && DECL_CONTEXT (inner) == current_function_decl) ! warning ("function returns address of local variable"); } --- 6467,6514 ---- /* Strip any conversions, additions, and subtractions, and see if we are returning the address of a local variable. Warn if so. */ ! while (1) ! { ! switch (TREE_CODE (inner)) ! { ! case NOP_EXPR: case NON_LVALUE_EXPR: case CONVERT_EXPR: ! case PLUS_EXPR: ! inner = TREE_OPERAND (inner, 0); ! continue; ! ! case MINUS_EXPR: ! /* If the second operand of the MINUS_EXPR has a pointer ! type (or is converted from it), this may be valid, so ! don't give a warning. */ ! { ! tree op1 = TREE_OPERAND (inner, 1); ! ! while (! POINTER_TYPE_P (TREE_TYPE (op1)) ! && (TREE_CODE (op1) == NOP_EXPR ! || TREE_CODE (op1) == NON_LVALUE_EXPR ! || TREE_CODE (op1) == CONVERT_EXPR)) ! op1 = TREE_OPERAND (op1, 0); ! ! if (POINTER_TYPE_P (TREE_TYPE (op1))) ! break; ! ! inner = TREE_OPERAND (inner, 0); ! continue; ! } ! ! case ADDR_EXPR: ! inner = TREE_OPERAND (inner, 0); ! ! while (TREE_CODE_CLASS (TREE_CODE (inner)) == 'r') ! inner = TREE_OPERAND (inner, 0); ! ! if (TREE_CODE (inner) == VAR_DECL ! && ! DECL_EXTERNAL (inner) ! && ! TREE_STATIC (inner) ! && DECL_CONTEXT (inner) == current_function_decl) ! warning ("function returns address of local variable"); ! break; ! } ! ! break; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/caller-save.c gcc-2.7.0/caller-save.c *** gcc-2.6.3/caller-save.c Fri May 6 17:36:54 1994 --- gcc-2.7.0/caller-save.c Thu Jun 15 07:15:06 1995 *************** *** 1,4 **** /* Save and restore call-clobbered registers which are live across a call. ! Copyright (C) 1989, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Save and restore call-clobbered registers which are live across a call. ! Copyright (C) 1989, 1992, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 "config.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 33,38 **** #endif ! #ifndef MAX_UNITS_PER_WORD ! #define MAX_UNITS_PER_WORD UNITS_PER_WORD #endif --- 34,39 ---- #endif ! #ifndef MIN_UNITS_PER_WORD ! #define MIN_UNITS_PER_WORD UNITS_PER_WORD #endif *************** *** 43,47 **** static enum machine_mode ! regno_save_mode[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MAX_UNITS_PER_WORD + 1]; /* For each hard register, a place on the stack where it can be saved, --- 44,48 ---- static enum machine_mode ! regno_save_mode[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1]; /* For each hard register, a place on the stack where it can be saved, *************** *** 49,53 **** static rtx ! regno_save_mem[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MAX_UNITS_PER_WORD + 1]; /* We will only make a register eligible for caller-save if it can be --- 50,54 ---- static rtx ! regno_save_mem[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1]; /* We will only make a register eligible for caller-save if it can be *************** *** 58,64 **** static enum insn_code ! reg_save_code[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MAX_UNITS_PER_WORD + 1]; static enum insn_code ! reg_restore_code[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MAX_UNITS_PER_WORD + 1]; /* Set of hard regs currently live (during scan of all insns). */ --- 59,65 ---- static enum insn_code ! reg_save_code[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1]; static enum insn_code ! reg_restore_code[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1]; /* Set of hard regs currently live (during scan of all insns). */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/calls.c gcc-2.7.0/calls.c *** gcc-2.6.3/calls.c Mon Nov 14 19:18:34 1994 --- gcc-2.7.0/calls.c Thu Jun 15 07:15:32 1995 *************** *** 1,4 **** /* Convert function calls to rtl insns, for GNU C compiler. ! Copyright (C) 1989, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Convert function calls to rtl insns, for GNU C compiler. ! Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 "config.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 125,130 **** static int calls_function PROTO((tree, int)); static int calls_function_1 PROTO((tree, int)); ! static void emit_call_1 PROTO((rtx, tree, int, int, rtx, rtx, int, ! rtx, int)); static void store_one_arg PROTO ((struct arg_data *, rtx, int, int, tree, int)); --- 126,131 ---- static int calls_function PROTO((tree, int)); static int calls_function_1 PROTO((tree, int)); ! static void emit_call_1 PROTO((rtx, tree, tree, int, int, rtx, rtx, ! int, rtx, int)); static void store_one_arg PROTO ((struct arg_data *, rtx, int, int, tree, int)); *************** *** 162,166 **** int length = tree_code_length[(int) code]; ! /* If this code is langauge-specific, we don't know what it will do. */ if ((int) code >= NUM_TREE_CODES) return 1; --- 163,167 ---- int length = tree_code_length[(int) code]; ! /* If this code is language-specific, we don't know what it will do. */ if ((int) code >= NUM_TREE_CODES) return 1; *************** *** 292,296 **** emit_move_insn (static_chain_rtx, static_chain_value); ! use_reg (call_fusage, static_chain_rtx); } --- 293,298 ---- emit_move_insn (static_chain_rtx, static_chain_value); ! if (GET_CODE (static_chain_rtx) == REG) ! use_reg (call_fusage, static_chain_rtx); } *************** *** 302,305 **** --- 304,310 ---- The CALL_INSN is the first insn generated. + FNDECL is the declaration node of the function. This is given ot the + macro RETURN_POPS_ARGS to determine whether this function pops its own args. + FUNTYPE is the data type of the function, or, for a library call, the identifier for the name of the call. This is given to the *************** *** 335,341 **** static void ! emit_call_1 (funexp, funtype, stack_size, struct_value_size, next_arg_reg, ! valreg, old_inhibit_defer_pop, call_fusage, is_const) rtx funexp; tree funtype; int stack_size; --- 340,348 ---- static void ! emit_call_1 (funexp, fndecl, funtype, stack_size, struct_value_size, ! next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage, ! is_const) rtx funexp; + tree fndecl; tree funtype; int stack_size; *************** *** 361,371 **** #if defined (HAVE_call_pop) && defined (HAVE_call_value_pop) if (HAVE_call_pop && HAVE_call_value_pop ! && (RETURN_POPS_ARGS (funtype, stack_size) > 0 || stack_size == 0)) { ! rtx n_pop = GEN_INT (RETURN_POPS_ARGS (funtype, stack_size)); rtx pat; /* If this subroutine pops its own args, record that in the call insn if possible, for the sake of frame pointer elimination. */ if (valreg) pat = gen_call_value_pop (valreg, --- 368,380 ---- #if defined (HAVE_call_pop) && defined (HAVE_call_value_pop) if (HAVE_call_pop && HAVE_call_value_pop ! && (RETURN_POPS_ARGS (fndecl, funtype, stack_size) > 0 ! || stack_size == 0)) { ! rtx n_pop = GEN_INT (RETURN_POPS_ARGS (fndecl, funtype, stack_size)); rtx pat; /* If this subroutine pops its own args, record that in the call insn if possible, for the sake of frame pointer elimination. */ + if (valreg) pat = gen_call_value_pop (valreg, *************** *** 440,444 **** stack pointer will be changed. */ ! if (stack_size != 0 && RETURN_POPS_ARGS (funtype, stack_size) > 0) { if (!already_popped) --- 449,453 ---- stack pointer will be changed. */ ! if (stack_size != 0 && RETURN_POPS_ARGS (fndecl, funtype, stack_size) > 0) { if (!already_popped) *************** *** 447,451 **** gen_rtx (CLOBBER, VOIDmode, stack_pointer_rtx), CALL_INSN_FUNCTION_USAGE (call_insn)); ! stack_size -= RETURN_POPS_ARGS (funtype, stack_size); stack_size_rtx = GEN_INT (stack_size); } --- 456,460 ---- gen_rtx (CLOBBER, VOIDmode, stack_pointer_rtx), CALL_INSN_FUNCTION_USAGE (call_insn)); ! stack_size -= RETURN_POPS_ARGS (fndecl, funtype, stack_size); stack_size_rtx = GEN_INT (stack_size); } *************** *** 600,603 **** --- 609,613 ---- if (!flag_no_inline && fndecl != current_function_decl + && DECL_INLINE (fndecl) && DECL_SAVED_INSNS (fndecl)) is_integrable = 1; *************** *** 610,614 **** directly. */ if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline) ! warning_with_decl (fndecl, "can't inline call to `%s'"); mark_addressable (fndecl); } --- 620,627 ---- directly. */ if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline) ! { ! warning_with_decl (fndecl, "can't inline call to `%s'"); ! warning ("called from here"); ! } mark_addressable (fndecl); } *************** *** 684,687 **** --- 697,702 ---- structure_value_addr = XEXP (assign_stack_temp (BLKmode, struct_value_size, 1), 0); + MEM_IN_STRUCT_P (structure_value_addr) + = AGGREGATE_TYPE_P (TREE_TYPE (exp)); target = 0; } *************** *** 785,789 **** if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline && ! TREE_ADDRESSABLE (fndecl)) ! warning_with_decl (fndecl, "can't inline call to `%s'"); mark_addressable (fndecl); } --- 800,807 ---- if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline && ! TREE_ADDRESSABLE (fndecl)) ! { ! warning_with_decl (fndecl, "inlining failed in call to `%s'"); ! warning ("called from here"); ! } mark_addressable (fndecl); } *************** *** 930,950 **** /* Compute number of named args. Normally, don't include the last named arg if anonymous args follow. ! (If no anonymous args follow, the result of list_length ! is actually one too large.) - If SETUP_INCOMING_VARARGS is defined, this machine will be able to - place unnamed args that were passed in registers into the stack. So - treat all args as named. This allows the insns emitting for a specific - argument list to be independent of the function declaration. - If SETUP_INCOMING_VARARGS is not defined, we do not have any reliable way to pass unnamed args in registers, so we must force them into memory. */ ! #ifndef SETUP_INCOMING_VARARGS if (TYPE_ARG_TYPES (funtype) != 0) n_named_args ! = list_length (TYPE_ARG_TYPES (funtype)) - 1 ! /* Count the struct value address, if it is passed as a parm. */ ! + structure_value_addr_parm; else #endif --- 948,974 ---- /* Compute number of named args. Normally, don't include the last named arg if anonymous args follow. ! We do include the last named arg if STRICT_ARGUMENT_NAMING is defined. ! (If no anonymous args follow, the result of list_length is actually ! one too large. This is harmless.) ! ! If SETUP_INCOMING_VARARGS is defined and STRICT_ARGUMENT_NAMING is not, ! this machine will be able to place unnamed args that were passed in ! registers into the stack. So treat all args as named. This allows the ! insns emitting for a specific argument list to be independent of the ! function declaration. If SETUP_INCOMING_VARARGS is not defined, we do not have any reliable way to pass unnamed args in registers, so we must force them into memory. */ ! #if !defined(SETUP_INCOMING_VARARGS) || defined(STRICT_ARGUMENT_NAMING) if (TYPE_ARG_TYPES (funtype) != 0) n_named_args ! = (list_length (TYPE_ARG_TYPES (funtype)) ! #ifndef STRICT_ARGUMENT_NAMING ! /* Don't include the last named arg. */ ! - 1 ! #endif ! /* Count the struct value address, if it is passed as a parm. */ ! + structure_value_addr_parm); else #endif *************** *** 960,964 **** /* In this loop, we consider args in the order they are written. ! We fill up ARGS from the front of from the back if necessary so that in any case the first arg to be pushed ends up at the front. */ --- 984,988 ---- /* In this loop, we consider args in the order they are written. ! We fill up ARGS from the front or from the back if necessary so that in any case the first arg to be pushed ends up at the front. */ *************** *** 1007,1011 **** if ((TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST && contains_placeholder_p (TYPE_SIZE (type))) ! || TYPE_NEEDS_CONSTRUCTING (type) #ifdef FUNCTION_ARG_PASS_BY_REFERENCE || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, TYPE_MODE (type), --- 1031,1035 ---- if ((TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST && contains_placeholder_p (TYPE_SIZE (type))) ! || TREE_ADDRESSABLE (type) #ifdef FUNCTION_ARG_PASS_BY_REFERENCE || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, TYPE_MODE (type), *************** *** 1056,1060 **** { int size = int_size_in_bytes (type); ! copy = assign_stack_temp (TYPE_MODE (type), size, 1); } --- 1080,1084 ---- { int size = int_size_in_bytes (type); ! copy = assign_stack_temp (TYPE_MODE (type), size, 0); } *************** *** 1310,1313 **** --- 1334,1341 ---- && calls_function (args[i].tree_value, 0))) { + /* If this is an addressable type, we cannot pre-evaluate it. */ + if (TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))) + abort (); + push_temp_slots (); *************** *** 1315,1324 **** = expand_expr (args[i].tree_value, NULL_RTX, VOIDmode, 0); - if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) != args[i].mode) - args[i].value - = convert_modes (args[i].mode, - TYPE_MODE (TREE_TYPE (args[i].tree_value)), - args[i].value, args[i].unsignedp); - preserve_temp_slots (args[i].value); pop_temp_slots (); --- 1343,1346 ---- *************** *** 1327,1330 **** --- 1349,1361 ---- but PCC has one, so this will avoid some problems. */ emit_queue (); + + args[i].initial_value = args[i].value + = protect_from_queue (args[i].initial_value, 0); + + if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) != args[i].mode) + args[i].value + = convert_modes (args[i].mode, + TYPE_MODE (TREE_TYPE (args[i].tree_value)), + args[i].value, args[i].unsignedp); } *************** *** 1681,1685 **** if (save_mode == BLKmode) { ! save_area = assign_stack_temp (BLKmode, num_to_save, 1); emit_block_move (validize_mem (save_area), stack_area, GEN_INT (num_to_save), --- 1712,1717 ---- if (save_mode == BLKmode) { ! save_area = assign_stack_temp (BLKmode, num_to_save, 0); ! MEM_IN_STRUCT_P (save_area) = 0; emit_block_move (validize_mem (save_area), stack_area, GEN_INT (num_to_save), *************** *** 1728,1732 **** * args[i].n_aligned_regs); ! /* Structures smaller than a word are aligned to the least signifcant byte (to the right). On a BYTES_BIG_ENDIAN machine, this means we must skip the empty high order bytes when calculating the bit --- 1760,1764 ---- * args[i].n_aligned_regs); ! /* Structures smaller than a word are aligned to the least significant byte (to the right). On a BYTES_BIG_ENDIAN machine, this means we must skip the empty high order bytes when calculating the bit *************** *** 1880,1884 **** /* Generate the actual call instruction. */ ! emit_call_1 (funexp, funtype, args_size.constant, struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), valreg, old_inhibit_defer_pop, call_fusage, is_const); --- 1912,1916 ---- /* Generate the actual call instruction. */ ! emit_call_1 (funexp, fndecl, funtype, args_size.constant, struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), valreg, old_inhibit_defer_pop, call_fusage, is_const); *************** *** 2005,2008 **** --- 2037,2093 ---- when function inlining is being done. */ emit_move_insn (target, valreg); + else if (TYPE_MODE (TREE_TYPE (exp)) == BLKmode) + { + /* Some machines (the PA for example) want to return all small + structures in registers regardless of the structure's alignment. + + Deal with them explicitly by copying from the return registers + into the target MEM locations. */ + int bytes = int_size_in_bytes (TREE_TYPE (exp)); + int n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + int i; + enum machine_mode tmpmode; + + if (target == 0) + { + target = assign_stack_temp (BLKmode, bytes, 0); + MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (TREE_TYPE (exp)); + preserve_temp_slots (target); + } + + /* We could probably emit more efficient code for machines + which do not use strict alignment, but it doesn't seem + worth the effort at the current time. */ + for (i = 0; i < n_regs; i++) + { + rtx src = operand_subword_force (valreg, i, BLKmode); + rtx dst = operand_subword (target, i, 1, BLKmode); + int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (exp)), BITS_PER_WORD); + int bitpos, big_endian_correction = 0; + + /* Should never happen. */ + if (src == NULL || dst == NULL) + abort (); + + if (BYTES_BIG_ENDIAN && bytes < UNITS_PER_WORD) + big_endian_correction + = (BITS_PER_WORD - (bytes * BITS_PER_UNIT)); + + for (bitpos = 0; + bitpos < BITS_PER_WORD && bytes > 0; + bitpos += bitsize, bytes -= bitsize / BITS_PER_UNIT) + { + int xbitpos = bitpos + big_endian_correction; + + store_bit_field (dst, bitsize, xbitpos, word_mode, + extract_bit_field (src, bitsize, bitpos, 1, + NULL_RTX, word_mode, + word_mode, + bitsize / BITS_PER_UNIT, + BITS_PER_WORD), + bitsize / BITS_PER_UNIT, BITS_PER_WORD); + } + } + } else target = copy_to_reg (valreg); *************** *** 2012,2015 **** --- 2097,2101 ---- might be const0_rtx here, so be careful. */ if (GET_CODE (target) == REG + && TYPE_MODE (TREE_TYPE (exp)) != BLKmode && GET_MODE (target) != TYPE_MODE (TREE_TYPE (exp))) { *************** *** 2383,2387 **** will set inhibit_defer_pop to that value. */ ! emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), args_size.constant, 0, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), outmode != VOIDmode ? hard_libcall_value (outmode) : NULL_RTX, --- 2469,2475 ---- will set inhibit_defer_pop to that value. */ ! emit_call_1 (fun, ! get_identifier (XSTR (orgfun, 0)), ! get_identifier (XSTR (orgfun, 0)), args_size.constant, 0, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), outmode != VOIDmode ? hard_libcall_value (outmode) : NULL_RTX, *************** *** 2744,2748 **** will set inhibit_defer_pop to that value. */ ! emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), args_size.constant, struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), --- 2832,2838 ---- will set inhibit_defer_pop to that value. */ ! emit_call_1 (fun, ! get_identifier (XSTR (orgfun, 0)), ! get_identifier (XSTR (orgfun, 0)), args_size.constant, struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), *************** *** 2897,2901 **** { arg->save_area = assign_stack_temp (BLKmode, ! arg->size.constant, 1); preserve_temp_slots (arg->save_area); emit_block_move (validize_mem (arg->save_area), stack_area, --- 2987,2993 ---- { arg->save_area = assign_stack_temp (BLKmode, ! arg->size.constant, 0); ! MEM_IN_STRUCT_P (arg->save_area) ! = AGGREGATE_TYPE_P (TREE_TYPE (arg->tree_value)); preserve_temp_slots (arg->save_area); emit_block_move (validize_mem (arg->save_area), stack_area, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cccp.1 gcc-2.7.0/cccp.1 *** gcc-2.6.3/cccp.1 Tue May 31 19:29:50 1994 --- gcc-2.7.0/cccp.1 Thu Mar 30 07:22:44 1995 *************** *** 105,109 **** .TP \(bu ! Conditional compilation. Using special preprocessor commands, you can include or exclude parts of the program according to various conditions. --- 105,109 ---- .TP \(bu ! Conditional compilation. Using special preprocessing directives, you can include or exclude parts of the program according to various conditions. *************** *** 388,392 **** Assert (in the same way as the \c .B #assert\c ! \& command) the predicate \c .I name\c --- 388,392 ---- Assert (in the same way as the \c .B #assert\c ! \& directive) the predicate \c .I name\c *************** *** 405,409 **** `\|\c .B #define\c ! \&\|' commands for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the --- 405,409 ---- `\|\c .B #define\c ! \&\|' directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the *************** *** 429,433 **** .B #define\c \&\|' ! commands and the result of preprocessing. Both kinds of output go to the standard output file. .PP --- 429,433 ---- .B #define\c \&\|' ! directives and the result of preprocessing. Both kinds of output go to the standard output file. .PP diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cccp.c gcc-2.7.0/cccp.c *** gcc-2.6.3/cccp.c Fri Nov 18 18:54:36 1994 --- gcc-2.7.0/cccp.c Thu Jun 15 07:16:31 1995 *************** *** 1,4 **** /* C Compatible Compiler Preprocessor (CCCP) ! Copyright (C) 1986, 87, 89, 92, 93, 1994 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, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. Written by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 *************** *** 16,20 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. In other words, you are welcome to use, share and improve this program. --- 16,21 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. In other words, you are welcome to use, share and improve this program. *************** *** 58,65 **** #include "pcp.h" - #ifndef STDC_VALUE - #define STDC_VALUE 1 - #endif - /* By default, colon separates directories in a path. */ #ifndef PATH_SEPARATOR --- 59,62 ---- *************** *** 67,75 **** #endif - /* In case config.h defines these. */ - #undef bcopy - #undef bzero - #undef bcmp - #include #include --- 64,67 ---- *************** *** 78,97 **** #include ! #ifndef VMS ! #ifndef USG ! #include /* for __DATE__ and __TIME__ */ ! #include #else ! #include ! #include ! #endif /* USG */ ! #endif /* not VMS */ /* This defines "errno" properly for VMS, and gives us EACCES. */ #include /* VMS-specific definitions */ #ifdef VMS - #include #include #define O_RDONLY 0 /* Open arg for Read/Only */ --- 70,235 ---- #include ! /* The following symbols should be autoconfigured: ! HAVE_FCNTL_H ! HAVE_STDLIB_H ! HAVE_SYS_TIME_H ! HAVE_UNISTD_H ! STDC_HEADERS ! TIME_WITH_SYS_TIME ! In the mean time, we'll get by with approximations based ! on existing GCC configuration symbols. */ ! ! #ifdef POSIX ! # ifndef HAVE_STDLIB_H ! # define HAVE_STDLIB_H 1 ! # endif ! # ifndef HAVE_UNISTD_H ! # define HAVE_UNISTD_H 1 ! # endif ! # ifndef STDC_HEADERS ! # define STDC_HEADERS 1 ! # endif ! #endif /* defined (POSIX) */ ! ! #if defined (POSIX) || (defined (USG) && !defined (VMS)) ! # ifndef HAVE_FCNTL_H ! # define HAVE_FCNTL_H 1 ! # endif ! #endif ! ! #ifndef RLIMIT_STACK ! # include #else ! # if TIME_WITH_SYS_TIME ! # include ! # include ! # else ! # if HAVE_SYS_TIME_H ! # include ! # else ! # include ! # endif ! # endif ! # include ! #endif + #if HAVE_FCNTL_H + # include + #endif + /* This defines "errno" properly for VMS, and gives us EACCES. */ #include + #if HAVE_STDLIB_H + # include + #else + char *getenv (); + #endif + + #if STDC_HEADERS + # include + # ifndef bcmp + # define bcmp(a, b, n) memcmp (a, b, n) + # endif + # ifndef bcopy + # define bcopy(s, d, n) memcpy (d, s, n) + # endif + # ifndef bzero + # define bzero(d, n) memset (d, 0, n) + # endif + #else /* !STDC_HEADERS */ + char *index (); + char *rindex (); + + # if !defined (BSTRING) && (defined (USG) || defined (VMS)) + + # ifndef bcmp + # define bcmp my_bcmp + static int + my_bcmp (a, b, n) + register char *a; + register char *b; + register unsigned n; + { + while (n-- > 0) + if (*a++ != *b++) + return 1; + + return 0; + } + # endif /* !defined (bcmp) */ + + # ifndef bcopy + # define bcopy my_bcopy + static void + my_bcopy (s, d, n) + register char *s; + register char *d; + register unsigned n; + { + while (n-- > 0) + *d++ = *s++; + } + # endif /* !defined (bcopy) */ + + # ifndef bzero + # define bzero my_bzero + static void + my_bzero (b, length) + register char *b; + register unsigned length; + { + while (length-- > 0) + *b++ = 0; + } + # endif /* !defined (bzero) */ + + # endif /* !defined (BSTRING) && (defined (USG) || defined (VMS)) */ + #endif /* ! STDC_HEADERS */ + + #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) + # define __attribute__(x) + #endif + + #ifndef PROTO + # if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) + # define PROTO(ARGS) ARGS + # else + # define PROTO(ARGS) () + # endif + #endif + + #if defined (__STDC__) && defined (HAVE_VPRINTF) + # include + # define VA_START(va_list, var) va_start (va_list, var) + # define PRINTF_ALIST(msg) char *msg, ... + # define PRINTF_DCL(msg) + # define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (printf, m, n))) + #else + # include + # define VA_START(va_list, var) va_start (va_list) + # define PRINTF_ALIST(msg) msg, va_alist + # define PRINTF_DCL(msg) char *msg; va_dcl + # define PRINTF_PROTO(ARGS, m, n) () __attribute__ ((format (printf, m, n))) + # define vfprintf(file, msg, args) \ + { \ + char *a0 = va_arg(args, char *); \ + char *a1 = va_arg(args, char *); \ + char *a2 = va_arg(args, char *); \ + char *a3 = va_arg(args, char *); \ + fprintf (file, msg, a0, a1, a2, a3); \ + } + #endif + + #define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2) + #define PRINTF_PROTO_2(ARGS) PRINTF_PROTO(ARGS, 2, 3) + #define PRINTF_PROTO_3(ARGS) PRINTF_PROTO(ARGS, 3, 4) + + #if HAVE_UNISTD_H + # include + #endif + /* VMS-specific definitions */ #ifdef VMS #include #define O_RDONLY 0 /* Open arg for Read/Only */ *************** *** 103,106 **** --- 241,246 ---- #define freopen(fname,mode,ofile) VMS_freopen (fname,mode,ofile) #define strncat(dst,src,cnt) VMS_strncat (dst,src,cnt) + #define fstat(fd,stbuf) VMS_fstat (fd,stbuf) + static int VMS_fstat (), VMS_stat (); static char * VMS_strncat (); static int VMS_read (); *************** *** 117,123 **** #endif /* __GNUC__ */ #endif /* VMS */ - - extern char *index (); - extern char *rindex (); #ifndef O_RDONLY --- 257,260 ---- *************** *** 174,198 **** #endif - /* Forward declarations. */ - - char *xmalloc (); - void error (); - void warning (); - /* External declarations. */ - extern char *getenv (); - extern FILE *fdopen (); extern char *version_string; - extern struct tm *localtime (); #ifndef VMS #ifndef HAVE_STRERROR extern int sys_nerr; ! #if defined(bsd4_4) || defined(__NetBSD__) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif ! #else /* HAVE_STERRROR */ char *strerror (); #endif --- 311,326 ---- #endif /* External declarations. */ extern char *version_string; #ifndef VMS #ifndef HAVE_STRERROR extern int sys_nerr; ! #if defined(bsd4_4) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif ! #else /* HAVE_STRERROR */ char *strerror (); #endif *************** *** 200,343 **** char *strerror (int,...); #endif ! extern int parse_escape (); ! extern HOST_WIDE_INT parse_c_expression (); #ifndef errno extern int errno; #endif - - /* Forward declarations. */ - - struct directive; - struct file_buf; - struct arglist; - struct argdata; - - #if defined(USG) || defined(VMS) - #ifndef BSTRING - void bcopy (); - void bzero (); - int bcmp (); - #endif - #endif - - /* These functions are declared to return int instead of void since they - are going to be placed in a table and some old compilers have trouble with - pointers to functions returning void. */ - - static int do_define (); - static int do_line (); - static int do_include (); - static int do_undef (); - static int do_error (); - static int do_pragma (); - static int do_ident (); - static int do_if (); - static int do_xifdef (); - static int do_else (); - static int do_elif (); - static int do_endif (); - static int do_sccs (); - static int do_once (); - static int do_assert (); - static int do_unassert (); - static int do_warning (); - - static void add_import (); - static void append_include_chain (); - static void deps_output (); - static void make_undef (); - static void make_definition (); - static void make_assertion (); - static void path_include (); - static void initialize_builtins (); - static void initialize_char_syntax (); - static void dump_arg_n (); - static void dump_defn_1 (); - static void delete_macro (); - static void trigraph_pcp (); - static void rescan (); - static void finclude (); - static void validate_else (); - static int comp_def_part (); - static void error_from_errno (); - static void error_with_line (); - void pedwarn (); - void pedwarn_with_line (); - static void pedwarn_with_file_and_line (); - static void fatal (); - void fancy_abort (); - static void pfatal_with_name (); - static void perror_with_name (); - static void pipe_closed (); - static void print_containing_files (); - static int lookup_import (); - static int redundant_include_p (); - static is_system_include (); - static struct file_name_map *read_name_map (); - static char *read_filename_string (); - static int open_include_file (); - static int check_preconditions (); - static void pcfinclude (); - static void pcstring_used (); - static void write_output (); - static int check_macro_name (); - static int compare_defs (); - static int compare_token_lists (); - static HOST_WIDE_INT eval_if_expression (); - static int discard_comments (); - static int change_newlines (); - static int line_for_error (); - static int hashf (); - static int file_size_and_mode (); - - static struct arglist *read_token_list (); - static void free_token_list (); - - static struct hashnode *install (); - struct hashnode *lookup (); - - static struct assertion_hashnode *assertion_install (); - static struct assertion_hashnode *assertion_lookup (); - - static char *xrealloc (); - static char *xcalloc (); - static char *savestring (); - - static void delete_assertion (); - static void macroexpand (); - static void dump_all_macros (); - static void conditional_skip (); - static void skip_if_group (); - static void output_line_command (); - - /* Last arg to output_line_command. */ - enum file_change_code {same_file, enter_file, leave_file}; - - static int grow_outbuf (); - static int handle_directive (); - static void memory_full (); - - static U_CHAR *macarg1 (); - static char *macarg (); - - static U_CHAR *skip_to_end_of_comment (); - static U_CHAR *skip_quoted_string (); - static U_CHAR *skip_paren_group (); - static char *quote_string (); - - static char *check_precompiled (); - /* static struct macrodef create_definition (); [moved below] */ - static void dump_single_macro (); - static void output_dots (); - #ifndef FAILURE_EXIT_CODE - #define FAILURE_EXIT_CODE 33 /* gnu cc command understands this */ - #endif - - #ifndef SUCCESS_EXIT_CODE - #define SUCCESS_EXIT_CODE 0 /* 0 means success on Unix. */ - #endif - /* Name under which this program was invoked. */ --- 328,338 ---- char *strerror (int,...); #endif ! int parse_escape PROTO((char **)); ! HOST_WIDE_INT parse_c_expression PROTO((char *)); #ifndef errno extern int errno; #endif /* Name under which this program was invoked. */ *************** *** 395,399 **** /* Nonzero means don't output line number information. */ ! static int no_line_commands; /* Nonzero means output the text in failing conditionals, --- 390,394 ---- /* Nonzero means don't output line number information. */ ! static int no_line_directives; /* Nonzero means output the text in failing conditionals, *************** *** 509,513 **** static struct file_buf { char *fname; ! /* Filename specified with #line command. */ char *nominal_fname; /* Record where in the search path this file was found. --- 504,508 ---- static struct file_buf { char *fname; ! /* Filename specified with #line directive. */ char *nominal_fname; /* Record where in the search path this file was found. *************** *** 678,685 **** int symlen; }; ! static struct macrodef create_definition (); ! /* Structure allocated for every #define. For a simple replacement such as --- 673,687 ---- int symlen; }; + + enum sharp_token_type { + NO_SHARP_TOKEN = 0, /* token not present */ ! SHARP_TOKEN = '#', /* token spelled with # only */ ! WHITE_SHARP_TOKEN, /* token spelled with # and white space */ ! PERCENT_COLON_TOKEN = '%', /* token spelled with %: only */ ! WHITE_PERCENT_COLON_TOKEN /* token spelled with %: and white space */ ! }; ! /* Structure allocated for every #define. For a simple replacement such as *************** *** 715,722 **** struct reflist { struct reflist *next; ! char stringify; /* nonzero if this arg was preceded by a ! # operator. */ ! char raw_before; /* Nonzero if a ## operator before arg. */ ! char raw_after; /* Nonzero if a ## operator after arg. */ char rest_args; /* Nonzero if this arg. absorbs the rest */ int nchars; /* Number of literal chars to copy before --- 717,725 ---- struct reflist { struct reflist *next; ! ! enum sharp_token_type stringify; /* set if a # operator before arg */ ! enum sharp_token_type raw_before; /* set if a ## operator before arg */ ! enum sharp_token_type raw_after; /* set if a ## operator after arg */ ! char rest_args; /* Nonzero if this arg. absorbs the rest */ int nchars; /* Number of literal chars to copy before *************** *** 736,740 **** of a hash node. Actually, this may be useless now. */ union hashval { - int ival; char *cpval; DEFINITION *defn; --- 739,742 ---- *************** *** 758,762 **** /* The structure of a node in the hash table. The hash table ! has entries for all tokens defined by #define commands (type T_MACRO), plus some special tokens like __LINE__ (these each have their own type, and the appropriate code is run when that type of node is seen. --- 760,764 ---- /* The structure of a node in the hash table. The hash table ! has entries for all tokens defined by #define directives (type T_MACRO), plus some special tokens like __LINE__ (these each have their own type, and the appropriate code is run when that type of node is seen. *************** *** 796,799 **** --- 798,802 ---- T_USER_LABEL_PREFIX_TYPE, /* `__USER_LABEL_PREFIX__' */ T_REGISTER_PREFIX_TYPE, /* `__REGISTER_PREFIX__' */ + T_IMMEDIATE_PREFIX_TYPE, /* `__IMMEDIATE_PREFIX__' */ T_TIME, /* `__TIME__' */ T_CONST, /* Constant value, used by `__STDC__' */ *************** *** 876,879 **** --- 879,888 ---- #define REGISTER_PREFIX "" #endif + + /* The string value for __IMMEDIATE_PREFIX__ */ + + #ifndef IMMEDIATE_PREFIX + #define IMMEDIATE_PREFIX "" + #endif /* In the definition of a #assert name, this structure forms *************** *** 918,924 **** /* `struct directive' defines one #-directive, including how to handle it. */ struct directive { int length; /* Length of name */ ! int (*func)(); /* Function to handle directive */ char *name; /* Name of directive */ enum node_type type; /* Code which describes which directive. */ --- 927,935 ---- /* `struct directive' defines one #-directive, including how to handle it. */ + #define DO_PROTO PROTO((U_CHAR *, U_CHAR *, FILE_BUF *, struct directive *)) + struct directive { int length; /* Length of name */ ! int (*func) DO_PROTO; /* Function to handle directive */ char *name; /* Name of directive */ enum node_type type; /* Code which describes which directive. */ *************** *** 928,931 **** --- 939,965 ---- }; + /* These functions are declared to return int instead of void since they + are going to be placed in the table and some old compilers have trouble with + pointers to functions returning void. */ + + static int do_assert DO_PROTO; + static int do_define DO_PROTO; + static int do_elif DO_PROTO; + static int do_else DO_PROTO; + static int do_endif DO_PROTO; + static int do_error DO_PROTO; + static int do_ident DO_PROTO; + static int do_if DO_PROTO; + static int do_include DO_PROTO; + static int do_line DO_PROTO; + static int do_pragma DO_PROTO; + #ifdef SCCS_DIRECTIVE + static int do_sccs DO_PROTO; + #endif + static int do_unassert DO_PROTO; + static int do_undef DO_PROTO; + static int do_warning DO_PROTO; + static int do_xifdef DO_PROTO; + /* Here is the actual list of #-directives, most-often-used first. */ *************** *** 956,960 **** /* When a directive handler is called, ! this points to the # that started the directive. */ U_CHAR *directive_start; --- 990,994 ---- /* When a directive handler is called, ! this points to the # (or the : of the %:) that started the directive. */ U_CHAR *directive_start; *************** *** 967,970 **** --- 1001,1006 ---- /* table to tell if c is horizontal or vertical space. */ static U_CHAR is_space[256]; + /* names of some characters */ + static char *char_name[256]; #define SKIP_WHITE_SPACE(p) do { while (is_hor_space[*p]) p++; } while (0) *************** *** 988,995 **** #endif - static FILE_BUF expand_to_temp_buffer (); - static DEFINITION *collect_expansion (); - /* Stack of conditionals currently in progress (including both successful and failing conditionals). */ --- 1024,1028 ---- *************** *** 1024,1027 **** --- 1057,1206 ---- static int ignore_srcdir; + static int safe_read PROTO((int, char *, int)); + static void safe_write PROTO((int, char *, int)); + + int main PROTO((int, char **)); + + static void path_include PROTO((char *)); + + static U_CHAR *index0 PROTO((U_CHAR *, int, size_t)); + + static void trigraph_pcp PROTO((FILE_BUF *)); + + static void newline_fix PROTO((U_CHAR *)); + static void name_newline_fix PROTO((U_CHAR *)); + + static char *get_lintcmd PROTO((U_CHAR *, U_CHAR *, U_CHAR **, int *, int *)); + + static void rescan PROTO((FILE_BUF *, int)); + + static FILE_BUF expand_to_temp_buffer PROTO((U_CHAR *, U_CHAR *, int, int)); + + static int handle_directive PROTO((FILE_BUF *, FILE_BUF *)); + + static struct tm *timestamp PROTO((void)); + static void special_symbol PROTO((HASHNODE *, FILE_BUF *)); + + static int redundant_include_p PROTO((char *)); + static is_system_include PROTO((char *)); + + static char *read_filename_string PROTO((int, FILE *)); + static struct file_name_map *read_name_map PROTO((char *)); + static int open_include_file PROTO((char *, struct file_name_list *)); + + static void finclude PROTO((int, char *, FILE_BUF *, int, struct file_name_list *)); + static void record_control_macro PROTO((char *, U_CHAR *)); + + static int import_hash PROTO((char *)); + static int lookup_import PROTO((char *, struct file_name_list *)); + static void add_import PROTO((int, char *)); + + static char *check_precompiled PROTO((int, char *, char **)); + static int check_preconditions PROTO((char *)); + static void pcfinclude PROTO((U_CHAR *, U_CHAR *, U_CHAR *, FILE_BUF *)); + static void pcstring_used PROTO((HASHNODE *)); + static void write_output PROTO((void)); + static void pass_thru_directive PROTO((U_CHAR *, U_CHAR *, FILE_BUF *, struct directive *)); + + static MACRODEF create_definition PROTO((U_CHAR *, U_CHAR *, FILE_BUF *)); + + static int check_macro_name PROTO((U_CHAR *, char *)); + static int compare_defs PROTO((DEFINITION *, DEFINITION *)); + static int comp_def_part PROTO((int, U_CHAR *, int, U_CHAR *, int, int)); + + static DEFINITION *collect_expansion PROTO((U_CHAR *, U_CHAR *, int, struct arglist *)); + + int check_assertion PROTO((U_CHAR *, int, int, struct arglist *)); + static int compare_token_lists PROTO((struct arglist *, struct arglist *)); + + static struct arglist *read_token_list PROTO((U_CHAR **, U_CHAR *, int *)); + static void free_token_list PROTO((struct arglist *)); + + static ASSERTION_HASHNODE *assertion_install PROTO((U_CHAR *, int, int)); + static ASSERTION_HASHNODE *assertion_lookup PROTO((U_CHAR *, int, int)); + static void delete_assertion PROTO((ASSERTION_HASHNODE *)); + + static void do_once PROTO((void)); + + static HOST_WIDE_INT eval_if_expression PROTO((U_CHAR *, int)); + static void conditional_skip PROTO((FILE_BUF *, int, enum node_type, U_CHAR *, FILE_BUF *)); + static void skip_if_group PROTO((FILE_BUF *, int, FILE_BUF *)); + static void validate_else PROTO((U_CHAR *)); + + static U_CHAR *skip_to_end_of_comment PROTO((FILE_BUF *, int *, int)); + static U_CHAR *skip_quoted_string PROTO((U_CHAR *, U_CHAR *, int, int *, int *, int *)); + static char *quote_string PROTO((char *, char *)); + static U_CHAR *skip_paren_group PROTO((FILE_BUF *)); + + /* Last arg to output_line_directive. */ + enum file_change_code {same_file, enter_file, leave_file}; + static void output_line_directive PROTO((FILE_BUF *, FILE_BUF *, int, enum file_change_code)); + + static void macroexpand PROTO((HASHNODE *, FILE_BUF *)); + + struct argdata; + static char *macarg PROTO((struct argdata *, int)); + + static U_CHAR *macarg1 PROTO((U_CHAR *, U_CHAR *, int *, int *, int *, int)); + + static int discard_comments PROTO((U_CHAR *, int, int)); + + static int change_newlines PROTO((U_CHAR *, int)); + + char *my_strerror PROTO((int)); + void error PRINTF_PROTO_1((char *, ...)); + static void verror PROTO((char *, va_list)); + static void error_from_errno PROTO((char *)); + void warning PRINTF_PROTO_1((char *, ...)); + static void vwarning PROTO((char *, va_list)); + static void error_with_line PRINTF_PROTO_2((int, char *, ...)); + static void verror_with_line PROTO((int, char *, va_list)); + static void vwarning_with_line PROTO((int, char *, va_list)); + void pedwarn PRINTF_PROTO_1((char *, ...)); + void pedwarn_with_line PRINTF_PROTO_2((int, char *, ...)); + static void pedwarn_with_file_and_line PRINTF_PROTO_3((char *, int, char *, ...)); + + static void print_containing_files PROTO((void)); + + static int line_for_error PROTO((int)); + static int grow_outbuf PROTO((FILE_BUF *, int)); + + static HASHNODE *install PROTO((U_CHAR *, int, enum node_type, char *, int)); + HASHNODE *lookup PROTO((U_CHAR *, int, int)); + static void delete_macro PROTO((HASHNODE *)); + static int hashf PROTO((U_CHAR *, int, int)); + + static void dump_single_macro PROTO((HASHNODE *, FILE *)); + static void dump_all_macros PROTO((void)); + static void dump_defn_1 PROTO((U_CHAR *, int, int, FILE *)); + static void dump_arg_n PROTO((DEFINITION *, int, FILE *)); + + static void initialize_char_syntax PROTO((void)); + static void initialize_builtins PROTO((FILE_BUF *, FILE_BUF *)); + + static void make_definition PROTO((char *, FILE_BUF *)); + static void make_undef PROTO((char *, FILE_BUF *)); + + static void make_assertion PROTO((char *, char *)); + + static void append_include_chain PROTO((struct file_name_list *, struct file_name_list *)); + + static void deps_output PROTO((char *, int)); + + static void fatal PRINTF_PROTO_1((char *, ...)) __attribute__ ((noreturn)); + void fancy_abort PROTO((void)) __attribute__ ((noreturn)); + static void perror_with_name PROTO((char *)); + static void pfatal_with_name PROTO((char *)) __attribute__ ((noreturn)); + static void pipe_closed PROTO((int)) __attribute__ ((noreturn)); + + static void memory_full PROTO((void)) __attribute__ ((noreturn)); + GENERIC_PTR xmalloc PROTO((size_t)); + static GENERIC_PTR xrealloc PROTO((GENERIC_PTR, size_t)); + static GENERIC_PTR xcalloc PROTO((size_t, size_t)); + static char *savestring PROTO((char *)); + + static int file_size_and_mode PROTO((int, int *, long int *)); + static void output_dots PROTO((FILE *, int)); + /* Read LEN bytes at PTR from descriptor DESC, for file FILENAME, retrying if necessary. Return a negative value if an error occurs, *************** *** 1086,1090 **** long st_size; char *in_fname; ! char *p; int f, i; FILE_BUF *fp; --- 1265,1269 ---- long st_size; char *in_fname; ! char *cp; int f, i; FILE_BUF *fp; *************** *** 1136,1161 **** #endif ! p = argv[0] + strlen (argv[0]); ! while (p != argv[0] && p[-1] != '/' #ifdef DIR_SEPARATOR ! && p[-1] != DIR_SEPARATOR #endif ) ! --p; ! progname = p; #ifdef VMS { /* Remove directories from PROGNAME. */ ! char *s; ! ! progname = savestring (argv[0]); ! if (!(s = rindex (progname, ']'))) ! s = rindex (progname, ':'); ! if (s) ! strcpy (progname, s+1); ! if (s = rindex (progname, '.')) ! *s = '\0'; } #endif --- 1315,1344 ---- #endif ! cp = argv[0] + strlen (argv[0]); ! while (cp != argv[0] && cp[-1] != '/' #ifdef DIR_SEPARATOR ! && cp[-1] != DIR_SEPARATOR #endif ) ! --cp; ! progname = cp; #ifdef VMS { /* Remove directories from PROGNAME. */ ! char *p; ! char *s = progname; ! if ((p = rindex (s, ':')) != 0) s = p + 1; /* skip device */ ! if ((p = rindex (s, ']')) != 0) s = p + 1; /* skip directory */ ! if ((p = rindex (s, '>')) != 0) s = p + 1; /* alternate (int'n'l) dir */ ! s = progname = savestring (s); ! if ((p = rindex (s, ';')) != 0) *p = '\0'; /* strip version number */ ! if ((p = rindex (s, '.')) != 0 /* strip type iff ".exe" */ ! && (p[1] == 'e' || p[1] == 'E') ! && (p[2] == 'x' || p[2] == 'X') ! && (p[3] == 'e' || p[3] == 'E') ! && !p[4]) ! *p = '\0'; } #endif *************** *** 1169,1173 **** dollars_in_ident = DOLLARS_IN_IDENTIFIERS > 0; ! no_line_commands = 0; no_trigraphs = 1; dump_macros = dump_none; --- 1352,1356 ---- dollars_in_ident = DOLLARS_IN_IDENTIFIERS > 0; ! no_line_directives = 0; no_trigraphs = 1; dump_macros = dump_none; *************** *** 1228,1232 **** dirtmp->control_macro = 0; dirtmp->c_system_include_path = 1; ! dirtmp->fname = (char *) xmalloc (strlen (argv[i+1]) + 1); strcpy (dirtmp->fname, argv[++i]); dirtmp->got_name_map = 0; --- 1411,1415 ---- dirtmp->control_macro = 0; dirtmp->c_system_include_path = 1; ! dirtmp->fname = xmalloc (strlen (argv[i+1]) + 1); strcpy (dirtmp->fname, argv[++i]); dirtmp->got_name_map = 0; *************** *** 1261,1266 **** fatal ("Directory name missing after `-iwithprefix' option"); ! dirtmp->fname = (char *) xmalloc (strlen (argv[i+1]) ! + strlen (prefix) + 1); strcpy (dirtmp->fname, prefix); strcat (dirtmp->fname, argv[++i]); --- 1444,1448 ---- fatal ("Directory name missing after `-iwithprefix' option"); ! dirtmp->fname = xmalloc (strlen (argv[i+1]) + strlen (prefix) + 1); strcpy (dirtmp->fname, prefix); strcat (dirtmp->fname, argv[++i]); *************** *** 1296,1301 **** fatal ("Directory name missing after `-iwithprefixbefore' option"); ! dirtmp->fname = (char *) xmalloc (strlen (argv[i+1]) ! + strlen (prefix) + 1); strcpy (dirtmp->fname, prefix); strcat (dirtmp->fname, argv[++i]); --- 1478,1482 ---- fatal ("Directory name missing after `-iwithprefixbefore' option"); ! dirtmp->fname = xmalloc (strlen (argv[i+1]) + strlen (prefix) + 1); strcpy (dirtmp->fname, prefix); strcat (dirtmp->fname, argv[++i]); *************** *** 1351,1355 **** ((pcp_fname[0] != '-' || pcp_fname[1] != '\0') ? fopen (pcp_fname, "w") ! : fdopen (dup (fileno (stdout)), "w")); if (pcp_outfile == 0) pfatal_with_name (pcp_fname); --- 1532,1536 ---- ((pcp_fname[0] != '-' || pcp_fname[1] != '\0') ? fopen (pcp_fname, "w") ! : stdout); if (pcp_outfile == 0) pfatal_with_name (pcp_fname); *************** *** 1471,1475 **** char *p = argv[i] + 2; char c; ! while (c = *p++) { /* Arg to -d specifies what parts of macros to dump */ switch (c) { --- 1652,1656 ---- char *p = argv[i] + 2; char c; ! while ((c = *p++)) { /* Arg to -d specifies what parts of macros to dump */ switch (c) { *************** *** 1560,1564 **** case 'P': ! no_line_commands = 1; break; --- 1741,1745 ---- case 'P': ! no_line_directives = 1; break; *************** *** 1633,1643 **** but that seems pointless: it comes before them, so it overrides them anyway. */ ! #ifdef WINNT ! p = (char *) getenv ("Include"); ! #else ! p = (char *) getenv ("CPATH"); ! #endif ! if (p != 0 && ! no_standard_includes) ! path_include (p); /* Now that dollars_in_ident is known, initialize is_idchar. */ --- 1814,1820 ---- but that seems pointless: it comes before them, so it overrides them anyway. */ ! cp = getenv ("CPATH"); ! if (cp && ! no_standard_includes) ! path_include (cp); /* Now that dollars_in_ident is known, initialize is_idchar. */ *************** *** 1686,1690 **** *p++= 0; if (debug_output) ! output_line_command (fp, &outbuf, 0, same_file); make_definition (q, &outbuf); while (*p == ' ' || *p == '\t') --- 1863,1867 ---- *p++= 0; if (debug_output) ! output_line_directive (fp, &outbuf, 0, same_file); make_definition (q, &outbuf); while (*p == ' ' || *p == '\t') *************** *** 1746,1755 **** if (pend_undefs[i]) { if (debug_output) ! output_line_command (fp, &outbuf, 0, same_file); make_undef (pend_undefs[i], &outbuf); } if (pend_defs[i]) { if (debug_output) ! output_line_command (fp, &outbuf, 0, same_file); make_definition (pend_defs[i], &outbuf); } --- 1923,1932 ---- if (pend_undefs[i]) { if (debug_output) ! output_line_directive (fp, &outbuf, 0, same_file); make_undef (pend_undefs[i], &outbuf); } if (pend_defs[i]) { if (debug_output) ! output_line_directive (fp, &outbuf, 0, same_file); make_definition (pend_defs[i], &outbuf); } *************** *** 1854,1858 **** = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); int this_len = strlen (specd_prefix) + strlen (p->fname) - default_len; ! char *str = (char *) xmalloc (this_len + 1); strcpy (str, specd_prefix); strcat (str, p->fname + default_len); --- 2031,2035 ---- = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); int this_len = strlen (specd_prefix) + strlen (p->fname) - default_len; ! char *str = xmalloc (this_len + 1); strcpy (str, specd_prefix); strcat (str, p->fname + default_len); *************** *** 1911,1915 **** if (fd < 0) { perror_with_name (pend_files[i]); ! return FAILURE_EXIT_CODE; } finclude (fd, pend_files[i], &outbuf, 0, NULL_PTR); --- 2088,2092 ---- if (fd < 0) { perror_with_name (pend_files[i]); ! return FATAL_EXIT_CODE; } finclude (fd, pend_files[i], &outbuf, 0, NULL_PTR); *************** *** 1958,1962 **** if (*s != 0) { deps_target = s + 1; ! output_file = (char *) xmalloc (s - spec + 1); bcopy (spec, output_file, s - spec); output_file[s - spec] = 0; --- 2135,2139 ---- if (*s != 0) { deps_target = s + 1; ! output_file = xmalloc (s - spec + 1); bcopy (spec, output_file, s - spec); output_file[s - spec] = 0; *************** *** 1975,1979 **** if (print_deps) { deps_allocated_size = 200; ! deps_buffer = (char *) xmalloc (deps_allocated_size); deps_buffer[0] = 0; deps_size = 0; --- 2152,2156 ---- if (print_deps) { deps_allocated_size = 200; ! deps_buffer = xmalloc (deps_allocated_size); deps_buffer[0] = 0; deps_size = 0; *************** *** 2056,2060 **** fp->buf = (U_CHAR *) xmalloc (bsize + 2); for (;;) { ! cnt = safe_read (f, fp->buf + size, bsize - size); if (cnt < 0) goto perror; /* error! */ size += cnt; --- 2233,2237 ---- fp->buf = (U_CHAR *) xmalloc (bsize + 2); for (;;) { ! cnt = safe_read (f, (char *) fp->buf + size, bsize - size); if (cnt < 0) goto perror; /* error! */ size += cnt; *************** *** 2068,2072 **** For the sake of VMS, st_size is just an upper bound. */ fp->buf = (U_CHAR *) xmalloc (st_size + 2); ! fp->length = safe_read (f, fp->buf, st_size); if (fp->length < 0) goto perror; } --- 2245,2249 ---- For the sake of VMS, st_size is just an upper bound. */ fp->buf = (U_CHAR *) xmalloc (st_size + 2); ! fp->length = safe_read (f, (char *) fp->buf, st_size); if (fp->length < 0) goto perror; } *************** *** 2096,2100 **** pfatal_with_name (out_fname); ! output_line_command (fp, &outbuf, 0, same_file); /* Scan the -include files before the main input. */ --- 2273,2277 ---- pfatal_with_name (out_fname); ! output_line_directive (fp, &outbuf, 0, same_file); /* Scan the -include files before the main input. */ *************** *** 2106,2110 **** if (fd < 0) { perror_with_name (pend_includes[i]); ! return FAILURE_EXIT_CODE; } finclude (fd, pend_includes[i], &outbuf, 0, NULL_PTR); --- 2283,2287 ---- if (fd < 0) { perror_with_name (pend_includes[i]); ! return FATAL_EXIT_CODE; } finclude (fd, pend_includes[i], &outbuf, 0, NULL_PTR); *************** *** 2153,2157 **** if (errors) ! exit (FAILURE_EXIT_CODE); exit (SUCCESS_EXIT_CODE); --- 2330,2334 ---- if (errors) ! exit (FATAL_EXIT_CODE); exit (SUCCESS_EXIT_CODE); *************** *** 2182,2191 **** if (p == q) { /* An empty name in the path stands for the current directory. */ ! name = (char *) xmalloc (2); name[0] = '.'; name[1] = 0; } else { /* Otherwise use the directory that is named. */ ! name = (char *) xmalloc (q - p + 1); bcopy (p, name, q - p); name[q - p] = 0; --- 2359,2368 ---- if (p == q) { /* An empty name in the path stands for the current directory. */ ! name = xmalloc (2); name[0] = '.'; name[1] = 0; } else { /* Otherwise use the directory that is named. */ ! name = xmalloc (q - p + 1); bcopy (p, name, q - p); name[q - p] = 0; *************** *** 2220,2235 **** U_CHAR *s; int c; ! int n; { for (;;) { ! char *q = index (s, c); if (q) return (U_CHAR *) q; else { ! int l = strlen (s); if (l == n) return 0; l++; ! s += l; n -= l; } --- 2397,2413 ---- U_CHAR *s; int c; ! size_t n; { + char *p = (char *) s; for (;;) { ! char *q = index (p, c); if (q) return (U_CHAR *) q; else { ! size_t l = strlen (p); if (l == n) return 0; l++; ! p += l; n -= l; } *************** *** 2255,2259 **** fptr = bptr = sptr = buf->buf; lptr = fptr + buf->length; ! while ((sptr = (U_CHAR *) index0 (sptr, '?', lptr - sptr)) != NULL) { if (*++sptr != '?') continue; --- 2433,2437 ---- fptr = bptr = sptr = buf->buf; lptr = fptr + buf->length; ! while ((sptr = index0 (sptr, '?', (size_t) (lptr - sptr))) != NULL) { if (*++sptr != '?') continue; *************** *** 2411,2427 **** /* Oh, I wish C had lexical functions... hell, I'll just open-code the set */ ! if ((linsize >= 10) && !strncmp (ibp, "NOTREACHED", 10)) { *cmdlen = 10; return "NOTREACHED"; } ! if ((linsize >= 8) && !strncmp (ibp, "ARGSUSED", 8)) { *cmdlen = 8; return "ARGSUSED"; } ! if ((linsize >= 11) && !strncmp (ibp, "LINTLIBRARY", 11)) { *cmdlen = 11; return "LINTLIBRARY"; } ! if ((linsize >= 7) && !strncmp (ibp, "VARARGS", 7)) { *cmdlen = 7; ibp += 7; linsize -= 7; --- 2589,2605 ---- /* Oh, I wish C had lexical functions... hell, I'll just open-code the set */ ! if ((linsize >= 10) && !bcmp (ibp, "NOTREACHED", 10)) { *cmdlen = 10; return "NOTREACHED"; } ! if ((linsize >= 8) && !bcmp (ibp, "ARGSUSED", 8)) { *cmdlen = 8; return "ARGSUSED"; } ! if ((linsize >= 11) && !bcmp (ibp, "LINTLIBRARY", 11)) { *cmdlen = 11; return "LINTLIBRARY"; } ! if ((linsize >= 7) && !bcmp (ibp, "VARARGS", 7)) { *cmdlen = 7; ibp += 7; linsize -= 7; *************** *** 2577,2583 **** --- 2755,2774 ---- break; + case '%': + if (ident_length || ip->macro || traditional) + goto randomchar; + while (*ibp == '\\' && ibp[1] == '\n') { + ibp += 2; + ++ip->lineno; + } + if (*ibp != ':') + break; + /* Treat this %: digraph as if it were #. */ + /* Fall through. */ + case '#': if (assertions_flag) { /* Copy #foo (bar lose) without macro expansion. */ + obp[-1] = '#'; /* In case it was '%'. */ SKIP_WHITE_SPACE (ibp); while (is_idchar[*ibp]) *************** *** 2594,2605 **** /* If this is expanding a macro definition, don't recognize ! preprocessor directives. */ if (ip->macro != 0) goto randomchar; ! /* If this is expand_into_temp_buffer, recognize them only after an actual newline at this level, not at the beginning of the input level. */ ! if (ip->fname == 0 && beg_of_line == ip->buf) goto randomchar; if (ident_length) goto specialchar; --- 2785,2800 ---- /* If this is expanding a macro definition, don't recognize ! preprocessing directives. */ if (ip->macro != 0) goto randomchar; ! /* If this is expand_into_temp_buffer, ! don't recognize them either. Warn about them only after an actual newline at this level, not at the beginning of the input level. */ ! if (! ip->fname) { ! if (ip->buf != beg_of_line) ! warning ("preprocessing directive not recognized within macro arg"); goto randomchar; + } if (ident_length) goto specialchar; *************** *** 2617,2621 **** bp = beg_of_line; /* If -traditional, require # to be at beginning of line. */ ! if (!traditional) while (1) { if (is_hor_space[*bp]) --- 2812,2816 ---- bp = beg_of_line; /* If -traditional, require # to be at beginning of line. */ ! if (!traditional) { while (1) { if (is_hor_space[*bp]) *************** *** 2634,2637 **** --- 2829,2844 ---- else break; } + if (c == '%') { + if (bp[0] != '%') + break; + while (bp[1] == '\\' && bp[2] == '\n') + bp += 2; + if (bp + 1 != ibp) + break; + /* %: appears at start of line; skip past the ':' too. */ + bp++; + ibp++; + } + } if (bp + 1 != ibp) goto randomchar; *************** *** 2659,2663 **** break; } ! ++obp; /* Copy the '#' after all */ /* Don't expand an identifier that could be a macro directive. (Section 3.8.3 of the ANSI C standard) */ --- 2866,2870 ---- break; } ! *obp++ = '#'; /* Copy # (even if it was originally %:). */ /* Don't expand an identifier that could be a macro directive. (Section 3.8.3 of the ANSI C standard) */ *************** *** 2856,2860 **** messes up the line count. */ op->bufp = obp; ! output_line_command (ip, op, 0, same_file); check_expand (op, limit - ibp + 2); obp = op->bufp; --- 3063,3067 ---- messes up the line count. */ op->bufp = obp; ! output_line_directive (ip, op, 0, same_file); check_expand (op, limit - ibp + 2); obp = op->bufp; *************** *** 2881,2885 **** switch (*ibp++) { case '/': ! if (warn_comments && ibp < limit && *ibp == '*') warning ("`/*' within comment"); break; --- 3088,3092 ---- switch (*ibp++) { case '/': ! if (warn_comments && *ibp == '*') warning ("`/*' within comment"); break; *************** *** 2929,2934 **** if (ident_length == 0) { ! while (ibp < limit) { ! while (ibp < limit && ibp[0] == '\\' && ibp[1] == '\n') { ++ip->lineno; ibp += 2; --- 3136,3141 ---- if (ident_length == 0) { ! for (;;) { ! while (ibp[0] == '\\' && ibp[1] == '\n') { ++ip->lineno; ibp += 2; *************** *** 2943,2951 **** if it follows an e. */ if (c == 'e' || c == 'E') { ! while (ibp < limit && ibp[0] == '\\' && ibp[1] == '\n') { ++ip->lineno; ibp += 2; } ! if (ibp < limit && (*ibp == '+' || *ibp == '-')) { *obp++ = *ibp++; /* But traditional C does not let the token go past the sign. */ --- 3150,3158 ---- if it follows an e. */ if (c == 'e' || c == 'E') { ! while (ibp[0] == '\\' && ibp[1] == '\n') { ++ip->lineno; ibp += 2; } ! if (*ibp == '+' || *ibp == '-') { *obp++ = *ibp++; /* But traditional C does not let the token go past the sign. */ *************** *** 3036,3040 **** if (ip->lineno != op->lineno) { op->bufp = obp; ! output_line_command (ip, op, 1, same_file); check_expand (op, limit - ibp); obp = op->bufp; --- 3243,3247 ---- if (ip->lineno != op->lineno) { op->bufp = obp; ! output_line_directive (ip, op, 1, same_file); check_expand (op, limit - ibp); obp = op->bufp; *************** *** 3116,3120 **** if (!pcp_outfile || pcp_inside_if) { - startagain: for (hp = hashtab[MAKE_POS (hash) % HASHSIZE]; hp != NULL; hp = hp->next) { --- 3323,3326 ---- *************** *** 3205,3209 **** } /* A comment: copy it unchanged or discard it. */ ! else if (*ibp == '/' && ibp+1 != limit && ibp[1] == '*') { if (put_out_comments) { *obp++ = '/'; --- 3411,3415 ---- } /* A comment: copy it unchanged or discard it. */ ! else if (*ibp == '/' && ibp[1] == '*') { if (put_out_comments) { *obp++ = '/'; *************** *** 3289,3301 **** /* Prevent accidental token-pasting with a character before the macro call. */ ! if (!traditional && obp != op->buf ! && (obp[-1] == '-' || obp[1] == '+' || obp[1] == '&' ! || obp[-1] == '|' || obp[1] == '<' || obp[1] == '>')) { ! /* If we are expanding a macro arg, make a newline marker ! to separate the tokens. If we are making real output, ! a plain space will do. */ ! if (output_marks) ! *obp++ = '\n'; ! *obp++ = ' '; } --- 3495,3511 ---- /* Prevent accidental token-pasting with a character before the macro call. */ ! if (!traditional && obp != op->buf) { ! switch (obp[-1]) { ! case '!': case '%': case '&': case '*': ! case '+': case '-': case '/': case ':': ! case '<': case '=': case '>': case '^': ! case '|': ! /* If we are expanding a macro arg, make a newline marker ! to separate the tokens. If we are making real output, ! a plain space will do. */ ! if (output_marks) ! *obp++ = '\n'; ! *obp++ = ' '; ! } } *************** *** 3328,3332 **** if (if_stack != ip->if_stack) { ! char *str = "unknown"; switch (if_stack->type) --- 3538,3542 ---- if (if_stack != ip->if_stack) { ! char *str; switch (if_stack->type) *************** *** 3347,3350 **** --- 3557,3562 ---- str = "elif"; break; + default: + abort (); } *************** *** 3435,3444 **** /* * Process a # directive. Expects IP->bufp to point after the '#', as in ! * `#define foo bar'. Passes to the command handler * (do_define, do_include, etc.): the addresses of the 1st and ! * last chars of the command (starting immediately after the # ! * keyword), plus op and the keyword table pointer. If the command * contains comments it is copied into a temporary buffer sans comments ! * and the temporary buffer is passed to the command handler instead. * Likewise for backslash-newlines. * --- 3647,3656 ---- /* * Process a # directive. Expects IP->bufp to point after the '#', as in ! * `#define foo bar'. Passes to the directive handler * (do_define, do_include, etc.): the addresses of the 1st and ! * last chars of the directive (starting immediately after the # ! * keyword), plus op and the keyword table pointer. If the directive * contains comments it is copied into a temporary buffer sans comments ! * and the temporary buffer is passed to the directive handler instead. * Likewise for backslash-newlines. * *************** *** 3456,3462 **** U_CHAR *resume_p; ! /* Nonzero means we must copy the entire command to get rid of comments or backslash-newlines. */ ! int copy_command = 0; U_CHAR *ident, *after_ident; --- 3668,3674 ---- U_CHAR *resume_p; ! /* Nonzero means we must copy the entire directive to get rid of comments or backslash-newlines. */ ! int copy_directive = 0; U_CHAR *ident, *after_ident; *************** *** 3470,3476 **** while (1) { if (is_hor_space[*bp]) { ! if ((*bp == '\f' || *bp == '\v') && pedantic) ! pedwarn ("%s in preprocessing directive", ! *bp == '\f' ? "formfeed" : "vertical tab"); bp++; } else if (*bp == '/' && (bp[1] == '*' --- 3682,3687 ---- while (1) { if (is_hor_space[*bp]) { ! if (*bp != ' ' && *bp != '\t' && pedantic) ! pedwarn ("%s in preprocessing directive", char_name[*bp]); bp++; } else if (*bp == '/' && (bp[1] == '*' *************** *** 3535,3539 **** if (*p == '\n') { if (pedantic && !lang_asm) ! warning ("invalid preprocessor directive"); return 0; } --- 3746,3750 ---- if (*p == '\n') { if (pedantic && !lang_asm) ! warning ("invalid preprocessing directive"); return 0; } *************** *** 3541,3545 **** if (!lang_asm) ! error ("invalid preprocessor directive name"); return 0; --- 3752,3756 ---- if (!lang_asm) ! error ("invalid preprocessing directive name"); return 0; *************** *** 3551,3555 **** */ for (kt = directive_table; kt->length > 0; kt++) { ! if (kt->length == ident_length && !strncmp (kt->name, ident, ident_length)) { register U_CHAR *buf; register U_CHAR *limit; --- 3762,3766 ---- */ for (kt = directive_table; kt->length > 0; kt++) { ! if (kt->length == ident_length && !bcmp (kt->name, ident, ident_length)) { register U_CHAR *buf; register U_CHAR *limit; *************** *** 3569,3578 **** keep_comments = traditional && kt->traditional_comments; /* #import is defined only in Objective C, or when on the NeXT. */ ! if (kt->type == T_IMPORT && !(objc || lookup ("__NeXT__", -1, -1))) break; ! /* Find the end of this command (first newline not backslashed and not in a string or comment). ! Set COPY_COMMAND if the command must be copied (it contains a backslash-newline or a comment). */ --- 3780,3790 ---- keep_comments = traditional && kt->traditional_comments; /* #import is defined only in Objective C, or when on the NeXT. */ ! if (kt->type == T_IMPORT ! && !(objc || lookup ((U_CHAR *) "__NeXT__", -1, -1))) break; ! /* Find the end of this directive (first newline not backslashed and not in a string or comment). ! Set COPY_DIRECTIVE if the directive must be copied (it contains a backslash-newline or a comment). */ *************** *** 3585,3589 **** if (*bp == '\n') { ip->lineno++; ! copy_command = 1; bp++; } else if (traditional) --- 3797,3801 ---- if (*bp == '\n') { ip->lineno++; ! copy_directive = 1; bp++; } else if (traditional) *************** *** 3594,3598 **** case '\'': case '\"': ! bp = skip_quoted_string (bp - 1, limit, ip->lineno, &ip->lineno, ©_command, &unterminated); /* Don't bother calling the directive if we already got an error message due to unterminated string. Skip everything and pretend --- 3806,3810 ---- case '\'': case '\"': ! bp = skip_quoted_string (bp - 1, limit, ip->lineno, &ip->lineno, ©_directive, &unterminated); /* Don't bother calling the directive if we already got an error message due to unterminated string. Skip everything and pretend *************** *** 3616,3620 **** if (*bp == '\\' && bp[1] == '\n') { ip->lineno++; ! copy_command = 1; bp++; } --- 3828,3832 ---- if (*bp == '\\' && bp[1] == '\n') { ip->lineno++; ! copy_directive = 1; bp++; } *************** *** 3632,3636 **** skip_to_end_of_comment (ip, &ip->lineno, 0); bp = ip->bufp; ! /* No need to copy the command because of a comment at the end; just don't include the comment in the directive. */ if (bp == limit || *bp == '\n') { --- 3844,3848 ---- skip_to_end_of_comment (ip, &ip->lineno, 0); bp = ip->bufp; ! /* No need to copy the directive because of a comment at the end; just don't include the comment in the directive. */ if (bp == limit || *bp == '\n') { *************** *** 3640,3652 **** /* Don't remove the comments if -traditional. */ if (! keep_comments) ! copy_command++; } break; case '\f': case '\v': if (pedantic) ! pedwarn ("%s in preprocessing directive", ! c == '\f' ? "formfeed" : "vertical tab"); break; --- 3852,3864 ---- /* Don't remove the comments if -traditional. */ if (! keep_comments) ! copy_directive++; } break; case '\f': + case '\r': case '\v': if (pedantic) ! pedwarn ("%s in preprocessing directive", char_name[c]); break; *************** *** 3694,3702 **** } /* Don't we need a newline or #line? */ ! if (copy_command) { register U_CHAR *xp = buf; ! /* Need to copy entire command into temp buffer before dispatching */ ! cp = (U_CHAR *) alloca (bp - buf + 5); /* room for cmd plus some slop */ buf = cp; --- 3906,3914 ---- } /* Don't we need a newline or #line? */ ! if (copy_directive) { register U_CHAR *xp = buf; ! /* Need to copy entire directive into temp buffer before dispatching */ ! cp = (U_CHAR *) alloca (bp - buf + 5); /* room for directive plus some slop */ buf = cp; *************** *** 3739,3743 **** SKIP_WHITE_SPACE (xp); } ! } else { *cp++ = *xp++; } --- 3951,3955 ---- SKIP_WHITE_SPACE (xp); } ! } else if (traditional && xp < bp) { *cp++ = *xp++; } *************** *** 3765,3769 **** || (cplusplus_comments && *xp == '/')) { ip->bufp = xp + 1; ! /* If we already copied the command through, already_output != 0 prevents outputting comment now. */ skip_to_end_of_comment (ip, already_output, 0); --- 3977,3981 ---- || (cplusplus_comments && *xp == '/')) { ip->bufp = xp + 1; ! /* If we already copied the directive through, already_output != 0 prevents outputting comment now. */ skip_to_end_of_comment (ip, already_output, 0); *************** *** 3826,3834 **** } /* Don't we need a newline or #line? */ ! /* Call the appropriate command handler. buf now points to either the appropriate place in the input buffer, or to the temp buffer if it was necessary to make one. cp points to the first char after the contents of the (possibly ! copied) command, in either case. */ (*kt->func) (buf, cp, op, kt); check_expand (op, ip->length - (ip->bufp - ip->buf)); --- 4038,4046 ---- } /* Don't we need a newline or #line? */ ! /* Call the appropriate directive handler. buf now points to either the appropriate place in the input buffer, or to the temp buffer if it was necessary to make one. cp points to the first char after the contents of the (possibly ! copied) directive, in either case. */ (*kt->func) (buf, cp, op, kt); check_expand (op, ip->length - (ip->bufp - ip->buf)); *************** *** 3951,3960 **** break; case T_CONST: ! buf = (char *) alloca (4 * sizeof (int)); ! sprintf (buf, "%d", hp->value.ival); if (pcp_inside_if && pcp_outfile) /* Output a precondition for this macro use */ ! fprintf (pcp_outfile, "#define %s %d\n", hp->name, hp->value.ival); break; --- 4163,4175 ---- break; + case T_IMMEDIATE_PREFIX_TYPE: + buf = IMMEDIATE_PREFIX; + break; + case T_CONST: ! buf = hp->value.cpval; if (pcp_inside_if && pcp_outfile) /* Output a precondition for this macro use */ ! fprintf (pcp_outfile, "#define %s %s\n", hp->name, buf); break; *************** *** 3988,3992 **** if (!is_idstart[*ip->bufp]) goto oops; ! if (hp = lookup (ip->bufp, -1, -1)) { if (pcp_outfile && pcp_inside_if && (hp->type == T_CONST --- 4203,4207 ---- if (!is_idstart[*ip->bufp]) goto oops; ! if ((hp = lookup (ip->bufp, -1, -1))) { if (pcp_outfile && pcp_inside_if && (hp->type == T_CONST *************** *** 4061,4069 **** int retried = 0; /* Have already tried macro expanding the include line*/ - FILE_BUF trybuf; /* It got expanded into here */ int angle_brackets = 0; /* 0 for "...", 1 for <...> */ int pcf = -1; char *pcfbuf; ! int pcfbuflimit; int pcfnum; f= -1; /* JF we iz paranoid! */ --- 4276,4283 ---- int retried = 0; /* Have already tried macro expanding the include line*/ int angle_brackets = 0; /* 0 for "...", 1 for <...> */ int pcf = -1; char *pcfbuf; ! char *pcfbuflimit; int pcfnum; f= -1; /* JF we iz paranoid! */ *************** *** 4137,4140 **** --- 4351,4361 ---- #ifndef VMS ep = rindex (nam, '/'); + #ifdef DIR_SEPARATOR + if (ep == NULL) ep = rindex (nam, DIR_SEPARATOR); + else { + char *tmp = rindex (nam, DIR_SEPARATOR); + if (tmp != NULL && tmp > ep) ep = tmp; + } + #endif #else /* VMS */ ep = rindex (nam, ']'); *************** *** 4178,4183 **** * decwindow include files. It defaults to '#include ' (so the * code from case '<' is repeated here) and generates a warning. */ ! if (isalpha(*(--fbeg))) { fend = fbeg; while (fend != limit && (!isspace(*fend))) fend++; --- 4399,4405 ---- * decwindow include files. It defaults to '#include ' (so the * code from case '<' is repeated here) and generates a warning. + * (Note: macro expansion of `xyz' takes precedence.) */ ! if (retried && isalpha(*(--fbeg))) { fend = fbeg; while (fend != limit && (!isspace(*fend))) fend++; *************** *** 4198,4205 **** return 0; } else { ! trybuf = expand_to_temp_buffer (buf, limit, 0, 0); buf = (U_CHAR *) alloca (trybuf.bufp - trybuf.buf + 1); ! bcopy ((char *) trybuf.buf, (char *) buf, trybuf.bufp - trybuf.buf); ! limit = buf + (trybuf.bufp - trybuf.buf); free (trybuf.buf); retried++; --- 4420,4451 ---- return 0; } else { ! /* Expand buffer and then remove any newline markers. ! We can't just tell expand_to_temp_buffer to omit the markers, ! since it would put extra spaces in include file names. */ ! FILE_BUF trybuf; ! U_CHAR *src; ! trybuf = expand_to_temp_buffer (buf, limit, 1, 0); ! src = trybuf.buf; buf = (U_CHAR *) alloca (trybuf.bufp - trybuf.buf + 1); ! limit = buf; ! while (src != trybuf.bufp) { ! switch ((*limit++ = *src++)) { ! case '\n': ! limit--; ! src++; ! break; ! ! case '\'': ! case '\"': ! { ! U_CHAR *src1 = skip_quoted_string (src - 1, trybuf.bufp, 0, ! NULL_PTR, NULL_PTR, NULL_PTR); ! while (src != src1) ! *limit++ = *src++; ! } ! break; ! } ! } ! *limit = 0; free (trybuf.buf); retried++; *************** *** 4232,4236 **** /* Allocate this permanently, because it gets stored in the definitions of macros. */ ! fname = (char *) xmalloc (max_include_len + flen + 4); /* + 2 above for slash and terminating null. */ /* + 2 added for '.h' on VMS (to support '#include filename') */ --- 4478,4482 ---- /* Allocate this permanently, because it gets stored in the definitions of macros. */ ! fname = xmalloc (max_include_len + flen + 4); /* + 2 above for slash and terminating null. */ /* + 2 added for '.h' on VMS (to support '#include filename') */ *************** *** 4238,4243 **** /* If specified file name is absolute, just open it. */ ! if (*fbeg == '/') { ! strncpy (fname, fbeg, flen); fname[flen] = 0; if (redundant_include_p (fname)) --- 4484,4493 ---- /* If specified file name is absolute, just open it. */ ! if (*fbeg == '/' ! #ifdef DIR_SEPARATOR ! || *fbeg == DIR_SEPARATOR ! #endif ! ) { ! strncpy (fname, (char *) fbeg, flen); fname[flen] = 0; if (redundant_include_p (fname)) *************** *** 4266,4270 **** fname[0] = 0; } ! strncat (fname, fbeg, flen); #ifdef VMS /* Change this 1/2 Unix 1/2 VMS file specification into a --- 4516,4520 ---- fname[0] = 0; } ! strncat (fname, (char *) fbeg, flen); #ifdef VMS /* Change this 1/2 Unix 1/2 VMS file specification into a *************** *** 4283,4286 **** --- 4533,4541 ---- } #endif /* VMS */ + /* ??? There are currently 3 separate mechanisms for avoiding processing + of redundant include files: #import, #pragma once, and + redundant_include_p. It would be nice if they were unified. */ + if (redundant_include_p (fname)) + return 0; if (importing) f = lookup_import (fname, searchptr); *************** *** 4293,4300 **** warning ("Header file %s exists, but is not readable", fname); #endif - if (redundant_include_p (fname)) { - close (f); - return 0; - } if (f >= 0) break; --- 4548,4551 ---- *************** *** 4305,4309 **** /* A file that was not found. */ ! strncpy (fname, fbeg, flen); fname[flen] = 0; /* If generating dependencies and -MG was specified, we assume missing --- 4556,4560 ---- /* A file that was not found. */ ! strncpy (fname, (char *) fbeg, flen); fname[flen] = 0; /* If generating dependencies and -MG was specified, we assume missing *************** *** 4326,4331 **** if (searchptr->fname[0] == 0) continue; ! p = xmalloc (strlen (searchptr->fname) ! + strlen (fname) + 2); strcpy (p, searchptr->fname); strcat (p, "/"); --- 4577,4582 ---- if (searchptr->fname[0] == 0) continue; ! p = (char *) alloca (strlen (searchptr->fname) ! + strlen (fname) + 2); strcpy (p, searchptr->fname); strcat (p, "/"); *************** *** 4356,4361 **** error ("No include path in which to find %s", fname); } else { - struct stat stat_f; - /* Check to see if this include file is a once-only include file. If so, give up. */ --- 4607,4610 ---- *************** *** 4408,4439 **** pcfnum = 0; - fstat (f, &stat_f); - if (!no_precomp) ! do { ! sprintf (pcftry, "%s%d", fname, pcfnum++); ! ! pcf = open (pcftry, O_RDONLY, 0666); ! if (pcf != -1) ! { ! struct stat s; ! fstat (pcf, &s); ! if (bcmp ((char *) &stat_f.st_ino, (char *) &s.st_ino, ! sizeof (s.st_ino)) ! || stat_f.st_dev != s.st_dev) ! { ! pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit); ! /* Don't need it any more. */ ! close (pcf); ! } ! else ! { ! /* Don't need it at all. */ ! close (pcf); ! break; ! } ! } ! } while (pcf != -1 && !pcfbuf); /* Actually process the file */ --- 4657,4692 ---- pcfnum = 0; if (!no_precomp) ! { ! struct stat stat_f; ! fstat (f, &stat_f); ! ! do { ! sprintf (pcftry, "%s%d", fname, pcfnum++); ! ! pcf = open (pcftry, O_RDONLY, 0666); ! if (pcf != -1) ! { ! struct stat s; ! ! fstat (pcf, &s); ! if (bcmp ((char *) &stat_f.st_ino, (char *) &s.st_ino, ! sizeof (s.st_ino)) ! || stat_f.st_dev != s.st_dev) ! { ! pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit); ! /* Don't need it any more. */ ! close (pcf); ! } ! else ! { ! /* Don't need it at all. */ ! close (pcf); ! break; ! } ! } ! } while (pcf != -1 && !pcfbuf); ! } /* Actually process the file */ *************** *** 4441,4445 **** pcfname = xmalloc (strlen (pcftry) + 1); strcpy (pcfname, pcftry); ! pcfinclude (pcfbuf, pcfbuflimit, fname, op); } else --- 4694,4699 ---- pcfname = xmalloc (strlen (pcftry) + 1); strcpy (pcfname, pcftry); ! pcfinclude ((U_CHAR *) pcfbuf, (U_CHAR *) pcfbuflimit, ! (U_CHAR *) fname, op); } else *************** *** 4492,4502 **** register unsigned length = strlen (sys_dir); ! if (! strncmp (sys_dir, filename, length) && filename[length] == '/') ! { ! if (searchptr->c_system_include_path) ! return 2; ! else ! return 1; ! } } return 0; --- 4746,4760 ---- register unsigned length = strlen (sys_dir); ! if (! strncmp (sys_dir, filename, length) ! && (filename[length] == '/' ! #ifdef DIR_SEPARATOR ! || filename[length] == DIR_SEPARATOR ! #endif ! )) { ! if (searchptr->c_system_include_path) ! return 2; ! else ! return 1; ! } } return 0; *************** *** 4680,4683 **** --- 4938,4948 ---- /usr/include/sys/header.gcc. */ p = rindex (filename, '/'); + #ifdef DIR_SEPARATOR + if (! p) p = rindex (filename, DIR_SEPARATOR); + else { + char *tmp = rindex (filename, DIR_SEPARATOR); + if (tmp != NULL && tmp > p) p = tmp; + } + #endif if (! p) p = filename; *************** *** 4756,4760 **** /* Read the file contents, knowing that st_size is an upper bound on the number of bytes we can read. */ ! fp->length = safe_read (f, fp->buf, st_size); if (fp->length < 0) goto nope; } --- 5021,5025 ---- /* Read the file contents, knowing that st_size is an upper bound on the number of bytes we can read. */ ! fp->length = safe_read (f, (char *) fp->buf, st_size); if (fp->length < 0) goto nope; } *************** *** 4774,4778 **** for (;;) { ! i = safe_read (f, fp->buf + st_size, bsize - st_size); if (i < 0) goto nope; /* error! */ --- 5039,5043 ---- for (;;) { ! i = safe_read (f, (char *) fp->buf + st_size, bsize - st_size); if (i < 0) goto nope; /* error! */ *************** *** 4807,4811 **** trigraph_pcp (fp); ! output_line_command (fp, op, 0, enter_file); rescan (op, 0); --- 5072,5076 ---- trigraph_pcp (fp); ! output_line_directive (fp, op, 0, enter_file); rescan (op, 0); *************** *** 4818,4822 **** indepth--; input_file_stack_tick++; ! output_line_command (&instack[indepth], op, 0, leave_file); free (fp->buf); return; --- 5083,5087 ---- indepth--; input_file_stack_tick++; ! output_line_directive (&instack[indepth], op, 0, leave_file); free (fp->buf); return; *************** *** 4940,4944 **** fstat (fd, &sb); i = (struct import_file *)xmalloc (sizeof (struct import_file)); ! i->name = (char *)xmalloc (strlen (fname)+1); strcpy (i->name, fname); bcopy ((char *) &sb.st_ino, (char *) &i->inode, sizeof (sb.st_ino)); --- 5205,5209 ---- fstat (fd, &sb); i = (struct import_file *)xmalloc (sizeof (struct import_file)); ! i->name = xmalloc (strlen (fname)+1); strcpy (i->name, fname); bcopy ((char *) &sb.st_ino, (char *) &i->inode, sizeof (sb.st_ino)); *************** *** 5023,5027 **** while (*prec) { ! lineend = (char *) index (prec, '\n'); if (*prec++ != '#') { --- 5288,5292 ---- while (*prec) { ! lineend = index (prec, '\n'); if (*prec++ != '#') { *************** *** 5033,5037 **** prec += 6; ! mdef = create_definition (prec, lineend, NULL_PTR); if (mdef.defn == 0) --- 5298,5302 ---- prec += 6; ! mdef = create_definition ((U_CHAR *) prec, (U_CHAR *) lineend, NULL_PTR); if (mdef.defn == 0) *************** *** 5058,5062 **** len = prec - name; ! if (lookup (name, len, -1)) return 0; } else { --- 5323,5327 ---- len = prec - name; ! if (lookup ((U_CHAR *) name, len, -1)) return 0; } else { *************** *** 5110,5114 **** /* Now get the string. */ ! str = (STRINGDEF *) cp; string_start = cp += sizeof (STRINGDEF); --- 5375,5379 ---- /* Now get the string. */ ! str = (STRINGDEF *) (GENERIC_PTR) cp; string_start = cp += sizeof (STRINGDEF); *************** *** 5145,5149 **** /* Otherwise, for each key, */ for (; nkeys--; free (tmpbuf.buf), cp = endofthiskey + 1) { ! KEYDEF *kp = (KEYDEF *) cp; HASHNODE *hp; --- 5410,5414 ---- /* Otherwise, for each key, */ for (; nkeys--; free (tmpbuf.buf), cp = endofthiskey + 1) { ! KEYDEF *kp = (KEYDEF *) (GENERIC_PTR) cp; HASHNODE *hp; *************** *** 5153,5157 **** /* Find the end of the key. At the end of this for loop we advance CP to the start of the next key using this variable. */ ! endofthiskey = cp + strlen (cp); kp->str = str; --- 5418,5422 ---- /* Find the end of the key. At the end of this for loop we advance CP to the start of the next key using this variable. */ ! endofthiskey = cp + strlen ((char *) cp); kp->str = str; *************** *** 5171,5175 **** if (hp == NULL) { kp->chain = 0; ! install (tmpbuf.bufp, -1, T_PCSTRING, 0, (char *) kp, -1); } else if (hp->type == T_PCSTRING) { --- 5436,5440 ---- if (hp == NULL) { kp->chain = 0; ! install (tmpbuf.bufp, -1, T_PCSTRING, (char *) kp, -1); } else if (hp->type == T_PCSTRING) { *************** *** 5181,5188 **** } } ! /* This output_line_command serves to switch us back to the current input file in case some of these strings get output (which will ! result in line commands for the header file being output). */ ! output_line_command (&instack[indepth], op, 0, enter_file); } --- 5446,5453 ---- } } ! /* This output_line_directive serves to switch us back to the current input file in case some of these strings get output (which will ! result in line directives for the header file being output). */ ! output_line_directive (&instack[indepth], op, 0, enter_file); } *************** *** 5207,5212 **** STRINGDEF *next_string; U_CHAR *cur_buf_loc; ! int line_command_len = 80; ! char *line_command = xmalloc (line_command_len); int len; --- 5472,5477 ---- STRINGDEF *next_string; U_CHAR *cur_buf_loc; ! int line_directive_len = 80; ! char *line_directive = xmalloc (line_directive_len); int len; *************** *** 5222,5235 **** && cur_buf_loc - outbuf.buf == next_string->output_mark) { if (next_string->writeflag) { ! len = 4 * strlen (next_string->filename) + 32; ! while (len > line_command_len) ! line_command = xrealloc (line_command, ! line_command_len *= 2); ! sprintf (line_command, "\n# %d ", next_string->lineno); ! strcpy (quote_string (line_command + strlen (line_command), ! next_string->filename), "\n"); ! safe_write (fileno (stdout), line_command, strlen (line_command)); ! safe_write (fileno (stdout), next_string->contents, next_string->len); } next_string = next_string->chain; --- 5487,5501 ---- && cur_buf_loc - outbuf.buf == next_string->output_mark) { if (next_string->writeflag) { ! len = 4 * strlen ((char *) next_string->filename) + 32; ! while (len > line_directive_len) ! line_directive = xrealloc (line_directive, ! line_directive_len *= 2); ! sprintf (line_directive, "\n# %d ", next_string->lineno); ! strcpy (quote_string (line_directive + strlen (line_directive), ! (char *) next_string->filename), "\n"); ! safe_write (fileno (stdout), line_directive, strlen (line_directive)); ! safe_write (fileno (stdout), ! (char *) next_string->contents, next_string->len); } next_string = next_string->chain; *************** *** 5241,5249 **** : outbuf.bufp - cur_buf_loc); ! safe_write (fileno (stdout), cur_buf_loc, len); cur_buf_loc += len; } } ! free (line_command); } --- 5507,5515 ---- : outbuf.bufp - cur_buf_loc); ! safe_write (fileno (stdout), (char *) cur_buf_loc, len); cur_buf_loc += len; } } ! free (line_directive); } *************** *** 5358,5362 **** /* do we have a "special" rest-args extension here? */ if (limit - bp > REST_EXTENSION_LENGTH && ! strncmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) { rest_args = 1; temp->rest_args = 1; --- 5624,5628 ---- /* do we have a "special" rest-args extension here? */ if (limit - bp > REST_EXTENSION_LENGTH && ! bcmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) { rest_args = 1; temp->rest_args = 1; *************** *** 5376,5379 **** --- 5642,5650 ---- bp++; SKIP_WHITE_SPACE (bp); + /* A comma at this point can only be followed by an identifier. */ + if (!is_idstart[*bp]) { + error ("badly punctuated parameter list in `#define'"); + goto nope; + } } if (bp >= limit) { *************** *** 5386,5396 **** for (otemp = temp->next; otemp != NULL; otemp = otemp->next) if (temp->length == otemp->length && ! strncmp (temp->name, otemp->name, temp->length) == 0) { ! U_CHAR *name; ! ! name = (U_CHAR *) alloca (temp->length + 1); ! (void) strncpy (name, temp->name, temp->length); ! name[temp->length] = '\0'; ! error ("duplicate argument name `%s' in `#define'", name); goto nope; } --- 5657,5663 ---- for (otemp = temp->next; otemp != NULL; otemp = otemp->next) if (temp->length == otemp->length && ! bcmp (temp->name, otemp->name, temp->length) == 0) { ! error ("duplicate argument name `%.*s' in `#define'", ! temp->length, temp->name); goto nope; } *************** *** 5399,5405 **** ++bp; /* skip paren */ ! /* Skip spaces and tabs if any. */ ! while (bp < limit && (*bp == ' ' || *bp == '\t')) ! ++bp; /* now everything from bp before limit is the definition. */ defn = collect_expansion (bp, limit, argno, arg_ptrs); --- 5666,5670 ---- ++bp; /* skip paren */ ! SKIP_WHITE_SPACE (bp); /* now everything from bp before limit is the definition. */ defn = collect_expansion (bp, limit, argno, arg_ptrs); *************** *** 5428,5439 **** if (bp < limit) { ! switch (*bp) ! { ! case '\t': case ' ': case '\r': ! /* Skip spaces and tabs. */ ! while (++bp < limit && (*bp == ' ' || *bp == '\t' || *bp == '\r')) ! continue; ! break; ! case '!': case '"': case '#': case '%': case '&': case '\'': case ')': case '*': case '+': case ',': case '-': case '.': --- 5693,5701 ---- if (bp < limit) { ! if (is_hor_space[*bp]) { ! bp++; ! SKIP_WHITE_SPACE (bp); ! } else { ! switch (*bp) { case '!': case '"': case '#': case '%': case '&': case '\'': case ')': case '*': case '+': case ',': case '-': case '.': *************** *** 5450,5453 **** --- 5712,5716 ---- break; } + } } /* Now everything from bp before limit is the definition. */ *************** *** 5472,5477 **** } ! /* Process a #define command. ! BUF points to the contents of the #define command, as a contiguous string. LIMIT points to the first character past the end of the definition. KEYWORD is the keyword-table entry for #define. */ --- 5735,5740 ---- } ! /* Process a #define directive. ! BUF points to the contents of the #define directive, as a contiguous string. LIMIT points to the first character past the end of the definition. KEYWORD is the keyword-table entry for #define. */ *************** *** 5486,5490 **** MACRODEF mdef; ! /* If this is a precompiler run (with -pcp) pass thru #define commands. */ if (pcp_outfile && op) pass_thru_directive (buf, limit, op, keyword); --- 5749,5753 ---- MACRODEF mdef; ! /* If this is a precompiler run (with -pcp) pass thru #define directives. */ if (pcp_outfile && op) pass_thru_directive (buf, limit, op, keyword); *************** *** 5511,5516 **** /* Print the warning if it's not ok. */ if (!ok) { - U_CHAR *msg; /* what pain... */ - /* If we are passing through #define and #undef directives, do that for this re-definition now. */ --- 5774,5777 ---- *************** *** 5518,5526 **** pass_thru_directive (buf, limit, op, keyword); ! msg = (U_CHAR *) alloca (mdef.symlen + 22); ! *msg = '`'; ! bcopy ((char *) mdef.symnam, (char *) (msg + 1), mdef.symlen); ! strcpy ((char *) (msg + mdef.symlen + 1), "' redefined"); ! pedwarn (msg); if (hp->type == T_MACRO) pedwarn_with_file_and_line (hp->value.defn->file, hp->value.defn->line, --- 5779,5783 ---- pass_thru_directive (buf, limit, op, keyword); ! pedwarn ("`%.*s' redefined", mdef.symlen, mdef.symnam); if (hp->type == T_MACRO) pedwarn_with_file_and_line (hp->value.defn->file, hp->value.defn->line, *************** *** 5535,5539 **** if (debug_output && op) pass_thru_directive (buf, limit, op, keyword); ! install (mdef.symnam, mdef.symlen, T_MACRO, 0, (char *) mdef.defn, hashcode); } --- 5792,5796 ---- if (debug_output && op) pass_thru_directive (buf, limit, op, keyword); ! install (mdef.symnam, mdef.symlen, T_MACRO, (char *) mdef.defn, hashcode); } *************** *** 5563,5576 **** if (sym_length == 0) error ("invalid %s name", usage); ! else if (!is_idstart[*symname]) { ! U_CHAR *msg; /* what pain... */ ! msg = (U_CHAR *) alloca (sym_length + 1); ! bcopy ((char *) symname, (char *) msg, sym_length); ! msg[sym_length] = 0; ! error ("invalid %s name `%s'", usage, msg); ! } else { ! if (! strncmp (symname, "defined", 7) && sym_length == 7) ! error ("invalid %s name `defined'", usage); ! } return sym_length; } --- 5820,5826 ---- if (sym_length == 0) error ("invalid %s name", usage); ! else if (!is_idstart[*symname] ! || (sym_length == 7 && ! bcmp (symname, "defined", 7))) ! error ("invalid %s name `%.*s'", usage, sym_length, symname); return sym_length; } *************** *** 5594,5598 **** for (a1 = d1->pattern, a2 = d2->pattern; a1 && a2; a1 = a1->next, a2 = a2->next) { ! if (!((a1->nchars == a2->nchars && ! strncmp (p1, p2, a1->nchars)) || ! comp_def_part (first, p1, a1->nchars, p2, a2->nchars, 0)) || a1->argno != a2->argno --- 5844,5848 ---- for (a1 = d1->pattern, a2 = d2->pattern; a1 && a2; a1 = a1->next, a2 = a2->next) { ! if (!((a1->nchars == a2->nchars && ! bcmp (p1, p2, a1->nchars)) || ! comp_def_part (first, p1, a1->nchars, p2, a2->nchars, 0)) || a1->argno != a2->argno *************** *** 5659,5672 **** and NAMELEN is its length in characters. ! Note that comments and backslash-newlines have already been deleted ! from the argument. */ ! ! /* Leading and trailing Space, Tab, etc. are converted to markers ! Newline Space, Newline Tab, etc. ! Newline Space makes a space in the final output ! but is discarded if stringified. (Newline Tab is similar but ! makes a Tab instead.) ! If there is no trailing whitespace, a Newline Space is added at the end to prevent concatenation that would be contrary to the standard. */ --- 5909,5916 ---- and NAMELEN is its length in characters. ! Note that comments, backslash-newlines, and leading white space ! have already been deleted from the argument. */ ! /* If there is no trailing whitespace, a Newline Space is added at the end to prevent concatenation that would be contrary to the standard. */ *************** *** 5684,5687 **** --- 5928,5934 ---- /* Pointer to first nonspace after last single-# seen. */ U_CHAR *stringify = 0; + /* How those tokens were spelled. */ + enum sharp_token_type concat_sharp_token_type = NO_SHARP_TOKEN; + enum sharp_token_type stringify_sharp_token_type = NO_SHARP_TOKEN; int maxsize; int expected_delimiter = '\0'; *************** *** 5696,5712 **** /* Find the beginning of the trailing whitespace. */ - /* Find end of leading whitespace. */ limit = end; p = buf; while (p < limit && is_space[limit[-1]]) limit--; - while (p < limit && is_space[*p]) p++; /* Allocate space for the text in the macro definition. ! Leading and trailing whitespace chars need 2 bytes each. ! Each other input char may or may not need 1 byte, so this is an upper bound. ! The extra 2 are for invented trailing newline-marker and final null. */ maxsize = (sizeof (DEFINITION) - + 2 * (end - limit) + 2 * (p - buf) + (limit - p) + 3); defn = (DEFINITION *) xcalloc (1, maxsize); --- 5943,5955 ---- /* Find the beginning of the trailing whitespace. */ limit = end; p = buf; while (p < limit && is_space[limit[-1]]) limit--; /* Allocate space for the text in the macro definition. ! Each input char may or may not need 1 byte, so this is an upper bound. ! The extra 3 are for invented trailing newline-marker and final null. */ maxsize = (sizeof (DEFINITION) + (limit - p) + 3); defn = (DEFINITION *) xcalloc (1, maxsize); *************** *** 5716,5730 **** lastp = exp_p; ! p = buf; ! ! /* Convert leading whitespace to Newline-markers. */ ! while (p < limit && is_space[*p]) { ! *exp_p++ = '\n'; ! *exp_p++ = *p++; ! } ! ! if (limit - p >= 2 && p[0] == '#' && p[1] == '#') { error ("`##' at start of macro definition"); ! p += 2; } --- 5959,5967 ---- lastp = exp_p; ! if (p[0] == '#' ! ? p[1] == '#' ! : p[0] == '%' && p[1] == ':' && p[2] == '%' && p[3] == ':') { error ("`##' at start of macro definition"); ! p += p[0] == '#' ? 2 : 4; } *************** *** 5755,5763 **** break; case '#': /* # is ordinary inside a string. */ if (expected_delimiter) break; ! if (p < limit && *p == '#') { /* ##: concatenate preceding and following tokens. */ /* Take out the first #, discard preceding whitespace. */ --- 5992,6021 ---- break; + case '%': + if (!expected_delimiter && *p == ':') { + /* %: is not a digraph if preceded by an odd number of '<'s. */ + U_CHAR *p0 = p - 1; + while (buf < p0 && p0[-1] == '<') + p0--; + if ((p - p0) & 1) { + /* Treat %:%: as ## and %: as #. */ + if (p[1] == '%' && p[2] == ':') { + p += 2; + goto sharp_sharp_token; + } + if (nargs >= 0) { + p++; + goto sharp_token; + } + } + } + break; + case '#': /* # is ordinary inside a string. */ if (expected_delimiter) break; ! if (*p == '#') { ! sharp_sharp_token: /* ##: concatenate preceding and following tokens. */ /* Take out the first #, discard preceding whitespace. */ *************** *** 5767,5772 **** /* Skip the second #. */ p++; ! /* Discard following whitespace. */ ! SKIP_WHITE_SPACE (p); concat = p; if (p == limit) --- 6025,6034 ---- /* Skip the second #. */ p++; ! concat_sharp_token_type = c; ! if (is_hor_space[*p]) { ! concat_sharp_token_type++; ! p++; ! SKIP_WHITE_SPACE (p); ! } concat = p; if (p == limit) *************** *** 5775,5781 **** /* Single #: stringify following argument ref. Don't leave the # in the expansion. */ exp_p--; ! SKIP_WHITE_SPACE (p); ! if (p == limit || ! is_idstart[*p]) error ("`#' operator is not followed by a macro argument name"); else --- 6037,6049 ---- /* Single #: stringify following argument ref. Don't leave the # in the expansion. */ + sharp_token: exp_p--; ! stringify_sharp_token_type = c; ! if (is_hor_space[*p]) { ! stringify_sharp_token_type++; ! p++; ! SKIP_WHITE_SPACE (p); ! } ! if (! is_idstart[*p] || nargs == 0) error ("`#' operator is not followed by a macro argument name"); else *************** *** 5845,5870 **** if (arg->name[0] == c && arg->length == id_len ! && strncmp (arg->name, id_beg, id_len) == 0) { ! if (expected_delimiter && warn_stringify) { ! if (traditional) { ! warning ("macro argument `%.*s' is stringified.", ! id_len, arg->name); ! } else { ! warning ("macro arg `%.*s' would be stringified with -traditional.", ! id_len, arg->name); } } - /* If ANSI, don't actually substitute inside a string. */ - if (!traditional && expected_delimiter) - break; /* make a pat node for this arg and append it to the end of the pat list */ tpat = (struct reflist *) xmalloc (sizeof (struct reflist)); tpat->next = NULL; ! tpat->raw_before = concat == id_beg; ! tpat->raw_after = 0; tpat->rest_args = arg->rest_args; ! tpat->stringify = (traditional ? expected_delimiter != '\0' ! : stringify == id_beg); if (endpat == NULL) --- 6113,6146 ---- if (arg->name[0] == c && arg->length == id_len ! && bcmp (arg->name, id_beg, id_len) == 0) { ! enum sharp_token_type tpat_stringify; ! if (expected_delimiter) { ! if (warn_stringify) { ! if (traditional) { ! warning ("macro argument `%.*s' is stringified.", ! id_len, arg->name); ! } else { ! warning ("macro arg `%.*s' would be stringified with -traditional.", ! id_len, arg->name); ! } } + /* If ANSI, don't actually substitute inside a string. */ + if (!traditional) + break; + tpat_stringify = SHARP_TOKEN; + } else { + tpat_stringify + = (stringify == id_beg + ? stringify_sharp_token_type : NO_SHARP_TOKEN); } /* make a pat node for this arg and append it to the end of the pat list */ tpat = (struct reflist *) xmalloc (sizeof (struct reflist)); tpat->next = NULL; ! tpat->raw_before ! = concat == id_beg ? concat_sharp_token_type : NO_SHARP_TOKEN; ! tpat->raw_after = NO_SHARP_TOKEN; tpat->rest_args = arg->rest_args; ! tpat->stringify = tpat_stringify; if (endpat == NULL) *************** *** 5879,5884 **** register U_CHAR *p1 = p; SKIP_WHITE_SPACE (p1); ! if (p1 + 2 <= limit && p1[0] == '#' && p1[1] == '#') ! tpat->raw_after = 1; } lastp = exp_p; /* place to start copying from next time */ --- 6155,6162 ---- register U_CHAR *p1 = p; SKIP_WHITE_SPACE (p1); ! if (p1[0]=='#' ! ? p1[1]=='#' ! : p1[0]=='%' && p1[1]==':' && p1[2]=='%' && p1[3]==':') ! tpat->raw_after = p1[0] + (p != p1); } lastp = exp_p; /* place to start copying from next time */ *************** *** 5902,5908 **** if (!traditional && expected_delimiter == 0) { ! /* There is no trailing whitespace, so invent some in ANSI mode. ! But not if "inside a string" (which in ANSI mode ! happens only for -D option). */ *exp_p++ = '\n'; *exp_p++ = ' '; --- 6180,6186 ---- if (!traditional && expected_delimiter == 0) { ! /* If ANSI, put in a newline-space marker to prevent token pasting. ! But not if "inside a string" (which in ANSI mode happens only for ! -D option). */ *exp_p++ = '\n'; *exp_p++ = ' '; *************** *** 5989,5993 **** hp = assertion_lookup (symname, sym_length, hashcode); if (hp == NULL) { ! if (sym_length == 7 && ! strncmp (symname, "defined", sym_length)) error ("`defined' redefined as assertion"); hp = assertion_install (symname, sym_length, hashcode); --- 6267,6271 ---- hp = assertion_lookup (symname, sym_length, hashcode); if (hp == NULL) { ! if (sym_length == 7 && ! bcmp (symname, "defined", 7)) error ("`defined' redefined as assertion"); hp = assertion_install (symname, sym_length, hashcode); *************** *** 6153,6157 **** if (l1->length != l2->length) return 0; ! if (strncmp (l1->name, l2->name, l1->length)) return 0; l1 = l1->next; --- 6431,6435 ---- if (l1->length != l2->length) return 0; ! if (bcmp (l1->name, l2->name, l1->length)) return 0; l1 = l1->next; *************** *** 6305,6309 **** bucket = assertion_hashtab[hash]; while (bucket) { ! if (bucket->length == len && strncmp (bucket->name, name, len) == 0) return bucket; bucket = bucket->next; --- 6583,6587 ---- bucket = assertion_hashtab[hash]; while (bucket) { ! if (bucket->length == len && bcmp (bucket->name, name, len) == 0) return bucket; bucket = bucket->next; *************** *** 6331,6335 **** /* ! * interpret #line command. Remembers previously seen fnames * in its very own hash table. */ --- 6609,6613 ---- /* ! * interpret #line directive. Remembers previously seen fnames * in its very own hash table. */ *************** *** 6356,6360 **** if (!isdigit (*bp)) { ! error ("invalid format `#line' command"); return 0; } --- 6634,6638 ---- if (!isdigit (*bp)) { ! error ("invalid format `#line' directive"); return 0; } *************** *** 6363,6371 **** To put the next line at the specified line number, we must store a line number now that is one less. */ ! new_lineno = atoi (bp) - 1; /* NEW_LINENO is one less than the actual line number here. */ if (pedantic && new_lineno < 0) ! pedwarn ("line number out of range in `#line' command"); /* skip over the line number. */ --- 6641,6649 ---- To put the next line at the specified line number, we must store a line number now that is one less. */ ! new_lineno = atoi ((char *) bp) - 1; /* NEW_LINENO is one less than the actual line number here. */ if (pedantic && new_lineno < 0) ! pedwarn ("line number out of range in `#line' directive"); /* skip over the line number. */ *************** *** 6375,6379 **** #if 0 /* #line 10"foo.c" is supposed to be allowed. */ if (*bp && !is_space[*bp]) { ! error ("invalid format `#line' command"); return; } --- 6653,6657 ---- #if 0 /* #line 10"foo.c" is supposed to be allowed. */ if (*bp && !is_space[*bp]) { ! error ("invalid format `#line' directive"); return; } *************** *** 6396,6400 **** switch ((*p++ = *bp++)) { case '\0': ! error ("invalid format `#line' command"); return 0; --- 6674,6678 ---- switch ((*p++ = *bp++)) { case '\0': ! error ("invalid format `#line' directive"); return 0; *************** *** 6421,6425 **** if (*bp) { if (pedantic) ! pedwarn ("garbage at end of `#line' command"); if (*bp == '1') file_change = enter_file; --- 6699,6703 ---- if (*bp) { if (pedantic) ! pedwarn ("garbage at end of `#line' directive"); if (*bp == '1') file_change = enter_file; *************** *** 6431,6435 **** ip->system_header_p = 2; else { ! error ("invalid format `#line' command"); return 0; } --- 6709,6713 ---- ip->system_header_p = 2; else { ! error ("invalid format `#line' directive"); return 0; } *************** *** 6448,6452 **** } if (*bp) { ! error ("invalid format `#line' command"); return 0; } --- 6726,6730 ---- } if (*bp) { ! error ("invalid format `#line' directive"); return 0; } *************** *** 6457,6461 **** for (hp = *hash_bucket; hp != NULL; hp = hp->next) if (hp->length == fname_length && ! strncmp (hp->value.cpval, fname, fname_length) == 0) { ip->nominal_fname = hp->value.cpval; break; --- 6735,6739 ---- for (hp = *hash_bucket; hp != NULL; hp = hp->next) if (hp->length == fname_length && ! bcmp (hp->value.cpval, fname, fname_length) == 0) { ip->nominal_fname = hp->value.cpval; break; *************** *** 6472,6481 **** } } else if (*bp) { ! error ("invalid format `#line' command"); return 0; } ip->lineno = new_lineno; ! output_line_command (ip, op, 0, file_change); check_expand (op, ip->length - (ip->bufp - ip->buf)); return 0; --- 6750,6759 ---- } } else if (*bp) { ! error ("invalid format `#line' directive"); return 0; } ip->lineno = new_lineno; ! output_line_directive (ip, op, 0, file_change); check_expand (op, ip->length - (ip->bufp - ip->buf)); return 0; *************** *** 6498,6502 **** U_CHAR *orig_buf = buf; ! /* If this is a precompiler run (with -pcp) pass thru #undef commands. */ if (pcp_outfile && op) pass_thru_directive (buf, limit, op, keyword); --- 6776,6780 ---- U_CHAR *orig_buf = buf; ! /* If this is a precompiler run (with -pcp) pass thru #undef directives. */ if (pcp_outfile && op) pass_thru_directive (buf, limit, op, keyword); *************** *** 6507,6511 **** while ((hp = lookup (buf, sym_length, -1)) != NULL) { /* If we are generating additional info for debugging (with -g) we ! need to pass through all effective #undef commands. */ if (debug_output && op) pass_thru_directive (orig_buf, limit, op, keyword); --- 6785,6789 ---- while ((hp = lookup (buf, sym_length, -1)) != NULL) { /* If we are generating additional info for debugging (with -g) we ! need to pass through all effective #undef directives. */ if (debug_output && op) pass_thru_directive (orig_buf, limit, op, keyword); *************** *** 6569,6573 **** avoid ever including it again. */ ! static int do_once () { --- 6847,6851 ---- avoid ever including it again. */ ! static void do_once () { *************** *** 6592,6596 **** new->c_system_include_path = 0; } - return 0; } --- 6870,6873 ---- *************** *** 6598,6607 **** static int ! do_ident (buf, limit) U_CHAR *buf, *limit; { FILE_BUF trybuf; int len; - FILE_BUF *op = &outbuf; /* Allow #ident in system headers, since that's not user's fault. */ --- 6875,6885 ---- static int ! do_ident (buf, limit, op, keyword) U_CHAR *buf, *limit; + FILE_BUF *op; + struct directive *keyword; { FILE_BUF trybuf; int len; /* Allow #ident in system headers, since that's not user's fault. */ *************** *** 6633,6642 **** static int ! do_pragma (buf, limit) U_CHAR *buf, *limit; { ! while (*buf == ' ' || *buf == '\t') ! buf++; ! if (!strncmp (buf, "once", 4)) { /* Allow #pragma once in system headers, since that's not the user's fault. */ --- 6911,6921 ---- static int ! do_pragma (buf, limit, op, keyword) U_CHAR *buf, *limit; + FILE_BUF *op; + struct directive *keyword; { ! SKIP_WHITE_SPACE (buf); ! if (!strncmp ((char *) buf, "once", 4)) { /* Allow #pragma once in system headers, since that's not the user's fault. */ *************** *** 6646,6650 **** } ! if (!strncmp (buf, "implementation", 14)) { /* Be quiet about `#pragma implementation' for a file only if it hasn't been included yet. */ --- 6925,6929 ---- } ! if (!strncmp ((char *) buf, "implementation", 14)) { /* Be quiet about `#pragma implementation' for a file only if it hasn't been included yet. */ *************** *** 6656,6660 **** fname = p + 1; ! if (p = (U_CHAR *) index (fname, '\"')) *p = '\0'; --- 6935,6939 ---- fname = p + 1; ! if ((p = (U_CHAR *) index ((char *) fname, '\"'))) *p = '\0'; *************** *** 6662,6666 **** inc_fname = (U_CHAR *) rindex (ptr->fname, '/'); inc_fname = inc_fname ? inc_fname + 1 : (U_CHAR *) ptr->fname; ! if (inc_fname && !strcmp (inc_fname, fname)) warning ("`#pragma implementation' for `%s' appears after file is included", fname); --- 6941,6945 ---- inc_fname = (U_CHAR *) rindex (ptr->fname, '/'); inc_fname = inc_fname ? inc_fname + 1 : (U_CHAR *) ptr->fname; ! if (inc_fname && !strcmp ((char *) inc_fname, (char *) fname)) warning ("`#pragma implementation' for `%s' appears after file is included", fname); *************** *** 6698,6705 **** #endif /* Just ignore #sccs, on systems where we define it at all. */ static int ! do_sccs () { if (pedantic) --- 6977,6989 ---- #endif + #ifdef SCCS_DIRECTIVE + /* Just ignore #sccs, on systems where we define it at all. */ static int ! do_sccs (buf, limit, op, keyword) ! U_CHAR *buf, *limit; ! FILE_BUF *op; ! struct directive *keyword; { if (pedantic) *************** *** 6707,6717 **** return 0; } /* ! * handle #if command by * 1) inserting special `defined' keyword into the hash table * that gets turned into 0 or 1 by special_symbol (thus, * if the luser has a symbol called `defined' already, it won't ! * work inside the #if command) * 2) rescan the input into a temporary output buffer * 3) pass the output buffer to the yacc parser and collect a value --- 6991,7003 ---- return 0; } + + #endif /* defined (SCCS_DIRECTIVE) */ /* ! * handle #if directive by * 1) inserting special `defined' keyword into the hash table * that gets turned into 0 or 1 by special_symbol (thus, * if the luser has a symbol called `defined' already, it won't ! * work inside the #if directive) * 2) rescan the input into a temporary output buffer * 3) pass the output buffer to the yacc parser and collect a value *************** *** 6772,6776 **** else { ++if_stack->if_succeeded; /* continue processing input */ ! output_line_command (ip, op, 1, same_file); } } --- 7058,7062 ---- else { ++if_stack->if_succeeded; /* continue processing input */ ! output_line_directive (ip, op, 1, same_file); } } *************** *** 6791,6795 **** HOST_WIDE_INT value; ! save_defined = install ("defined", -1, T_SPEC_DEFINED, 0, NULL_PTR, -1); pcp_inside_if = 1; temp_obuf = expand_to_temp_buffer (buf, buf + length, 0, 1); --- 7077,7082 ---- HOST_WIDE_INT value; ! save_defined = install ((U_CHAR *) "defined", -1, T_SPEC_DEFINED, ! NULL_PTR, -1); pcp_inside_if = 1; temp_obuf = expand_to_temp_buffer (buf, buf + length, 0, 1); *************** *** 6797,6801 **** delete_macro (save_defined); /* clean up special symbol */ ! value = parse_c_expression (temp_obuf.buf); free (temp_obuf.buf); --- 7084,7088 ---- delete_macro (save_defined); /* clean up special symbol */ ! value = parse_c_expression ((char *) temp_obuf.buf); free (temp_obuf.buf); *************** *** 6829,6833 **** if (is_space[c]) ; ! else if (c == '/' && p != ip->bufp && *p == '*') { /* Skip this comment. */ int junk = 0; --- 7116,7124 ---- if (is_space[c]) ; ! /* Make no special provision for backslash-newline here; this is ! slower if backslash-newlines are present, but it's correct, ! and it's not worth it to tune for the rare backslash-newline. */ ! else if (c == '/' ! && (*p == '*' || (cplusplus_comments && *p == '/'))) { /* Skip this comment. */ int junk = 0; *************** *** 6924,6928 **** } else { ++if_stack->if_succeeded; ! output_line_command (ip, &outbuf, 1, same_file); } } --- 7215,7219 ---- } else { ++if_stack->if_succeeded; ! output_line_directive (ip, &outbuf, 1, same_file); } } *************** *** 6963,6967 **** op->bufp += len; op->lineno++; ! output_line_command (ip, op, 1, 0); } --- 7254,7258 ---- op->bufp += len; op->lineno++; ! output_line_directive (ip, op, 1, 0); } *************** *** 6994,7003 **** beg_of_line = bp; break; ! case '#': ip->bufp = bp - 1; ! /* # keyword: a # must be first nonblank char on the line */ if (beg_of_line == 0) break; /* Scan from start of line, skipping whitespace, comments and backslash-newlines, and see if we reach this #. --- 7285,7303 ---- beg_of_line = bp; break; ! case '%': ! if (beg_of_line == 0 || traditional) ! break; ip->bufp = bp - 1; ! while (bp[0] == '\\' && bp[1] == '\n') ! bp += 2; ! if (*bp == ':') ! goto sharp_token; ! break; ! case '#': /* # keyword: a # must be first nonblank char on the line */ if (beg_of_line == 0) break; + ip->bufp = bp - 1; + sharp_token: /* Scan from start of line, skipping whitespace, comments and backslash-newlines, and see if we reach this #. *************** *** 7005,7009 **** bp = beg_of_line; /* If -traditional, require # to be at beginning of line. */ ! if (!traditional) while (1) { if (is_hor_space[*bp]) --- 7305,7309 ---- bp = beg_of_line; /* If -traditional, require # to be at beginning of line. */ ! if (!traditional) { while (1) { if (is_hor_space[*bp]) *************** *** 7022,7025 **** --- 7322,7326 ---- else break; } + } if (bp != ip->bufp) { bp = ip->bufp + 1; /* Reset bp to after the #. */ *************** *** 7028,7031 **** --- 7329,7340 ---- bp = ip->bufp + 1; /* Point after the '#' */ + if (ip->bufp[0] == '%') { + /* Skip past the ':' again. */ + while (*bp == '\\') { + ip->lineno++; + bp += 2; + } + bp++; + } /* Skip whitespace and \-newline. */ *************** *** 7100,7104 **** if (*p == '\n') { if (pedantic && !lang_asm) ! pedwarn ("invalid preprocessor directive"); continue; } --- 7409,7413 ---- if (*p == '\n') { if (pedantic && !lang_asm) ! pedwarn ("invalid preprocessing directive"); continue; } *************** *** 7106,7110 **** if (!lang_asm && pedantic) ! pedwarn ("invalid preprocessor directive name"); continue; } --- 7415,7419 ---- if (!lang_asm && pedantic) ! pedwarn ("invalid preprocessing directive name"); continue; } *************** *** 7113,7117 **** IF_STACK_FRAME *temp; if (ident_length == kt->length ! && strncmp (cp, kt->name, kt->length) == 0) { /* If we are asked to return on next directive, do so now. */ if (any) --- 7422,7426 ---- IF_STACK_FRAME *temp; if (ident_length == kt->length ! && bcmp (cp, kt->name, kt->length) == 0) { /* If we are asked to return on next directive, do so now. */ if (any) *************** *** 7152,7155 **** --- 7461,7467 ---- free (temp); break; + + default: + break; } break; *************** *** 7158,7162 **** /* Don't let erroneous code go by. */ if (kt->length < 0 && !lang_asm && pedantic) ! pedwarn ("invalid preprocessor directive name"); } } --- 7470,7474 ---- /* Don't let erroneous code go by. */ if (kt->length < 0 && !lang_asm && pedantic) ! pedwarn ("invalid preprocessing directive name"); } } *************** *** 7232,7236 **** else { ++if_stack->if_succeeded; /* continue processing input */ ! output_line_command (ip, op, 1, same_file); } return 0; --- 7544,7548 ---- else { ++if_stack->if_succeeded; /* continue processing input */ ! output_line_directive (ip, op, 1, same_file); } return 0; *************** *** 7238,7242 **** /* ! * unstack after #endif command */ --- 7550,7554 ---- /* ! * unstack after #endif directive */ *************** *** 7267,7277 **** while (p != ep) { U_CHAR c = *p++; ! switch (c) { ! case ' ': ! case '\t': ! case '\n': ! break; ! case '/': ! if (p != ep && *p == '*') { /* Skip this comment. */ int junk = 0; --- 7579,7585 ---- while (p != ep) { U_CHAR c = *p++; ! if (!is_space[c]) { ! if (c == '/' ! && (*p == '*' || (cplusplus_comments && *p == '/'))) { /* Skip this comment. */ int junk = 0; *************** *** 7280,7287 **** p = skip_to_end_of_comment (ip, &junk, 1); ip->bufp = save_bufp; ! } ! break; ! default: ! goto fail; } } --- 7588,7593 ---- p = skip_to_end_of_comment (ip, &junk, 1); ip->bufp = save_bufp; ! } else ! goto fail; } } *************** *** 7300,7304 **** } free (temp); ! output_line_command (&instack[indepth], op, 1, same_file); } return 0; --- 7606,7610 ---- } free (temp); ! output_line_directive (&instack[indepth], op, 1, same_file); } return 0; *************** *** 7307,7311 **** /* When an #else or #endif is found while skipping failed conditional, if -pedantic was specified, this is called to warn about text after ! the command name. P points to the first char after the command name. */ static void --- 7613,7617 ---- /* When an #else or #endif is found while skipping failed conditional, if -pedantic was specified, this is called to warn about text after ! the directive name. P points to the first char after the directive name. */ static void *************** *** 7504,7508 **** } else if (c == '\n') { if (traditional) { ! /* Unterminated strings and character constants are 'legal'. */ bp--; /* Don't consume the newline. */ if (eofp) --- 7810,7814 ---- } else if (c == '\n') { if (traditional) { ! /* Unterminated strings and character constants are 'valid'. */ bp--; /* Don't consume the newline. */ if (eofp) *************** *** 7616,7620 **** /* ! * write out a #line command, for instance, after an #include file. * If CONDITIONAL is nonzero, we can omit the #line if it would * appear to be a no-op, and we can output a few newlines instead --- 7922,7926 ---- /* ! * write out a #line directive, for instance, after an #include file. * If CONDITIONAL is nonzero, we can omit the #line if it would * appear to be a no-op, and we can output a few newlines instead *************** *** 7624,7628 **** static void ! output_line_command (ip, op, conditional, file_change) FILE_BUF *ip, *op; int conditional; --- 7930,7934 ---- static void ! output_line_directive (ip, op, conditional, file_change) FILE_BUF *ip, *op; int conditional; *************** *** 7630,7636 **** { int len; ! char *line_cmd_buf, *line_end; ! if (no_line_commands || ip->fname == NULL || no_output) { --- 7936,7942 ---- { int len; ! char *line_directive_buf, *line_end; ! if (no_line_directives || ip->fname == NULL || no_output) { *************** *** 7644,7648 **** /* If the inherited line number is a little too small, ! output some newlines instead of a #line command. */ if (ip->lineno > op->lineno && ip->lineno < op->lineno + 8) { check_expand (op, 10); --- 7950,7954 ---- /* If the inherited line number is a little too small, ! output some newlines instead of a #line directive. */ if (ip->lineno > op->lineno && ip->lineno < op->lineno + 8) { check_expand (op, 10); *************** *** 7662,7672 **** } ! line_cmd_buf = (char *) alloca (4 * strlen (ip->nominal_fname) + 100); ! #ifdef OUTPUT_LINE_COMMANDS ! sprintf (line_cmd_buf, "#line %d ", ip->lineno); ! #else ! sprintf (line_cmd_buf, "# %d ", ip->lineno); ! #endif ! line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf), ip->nominal_fname); if (file_change != same_file) { --- 7968,7974 ---- } ! line_directive_buf = (char *) alloca (4 * strlen (ip->nominal_fname) + 100); ! sprintf (line_directive_buf, "# %d ", ip->lineno); ! line_end = quote_string (line_directive_buf + strlen (line_directive_buf), ip->nominal_fname); if (file_change != same_file) { *************** *** 7687,7695 **** #endif *line_end++ = '\n'; ! len = line_end - line_cmd_buf; check_expand (op, len + 1); if (op->bufp > op->buf && op->bufp[-1] != '\n') *op->bufp++ = '\n'; ! bcopy ((char *) line_cmd_buf, (char *) op->bufp, len); op->bufp += len; op->lineno = ip->lineno; --- 7989,7997 ---- #endif *line_end++ = '\n'; ! len = line_end - line_directive_buf; check_expand (op, len + 1); if (op->bufp > op->buf && op->bufp[-1] != '\n') *op->bufp++ = '\n'; ! bcopy ((char *) line_directive_buf, (char *) op->bufp, len); op->bufp += len; op->lineno = ip->lineno; *************** *** 7714,7718 **** U_CHAR *free1, *free2; char newlines; - char comments; char use_count; }; --- 8016,8019 ---- *************** *** 7858,7862 **** if (ap->stringify) xbuf_len += args[ap->argno].stringified_length; ! else if (ap->raw_before || ap->raw_after || traditional) /* Add 4 for two newline-space markers to prevent token concatenation. */ --- 8159,8163 ---- if (ap->stringify) xbuf_len += args[ap->argno].stringified_length; ! else if (ap->raw_before != 0 || ap->raw_after != 0 || traditional) /* Add 4 for two newline-space markers to prevent token concatenation. */ *************** *** 7904,7910 **** delete the last run of nonwhite chars. */ if (rest_zero && totlen > count_before ! && ((ap->rest_args && ap->raw_before) || (last_ap != NULL && last_ap->rest_args ! && last_ap->raw_after))) { /* Delete final whitespace. */ while (totlen > count_before && is_space[xbuf[totlen - 1]]) { --- 8205,8211 ---- delete the last run of nonwhite chars. */ if (rest_zero && totlen > count_before ! && ((ap->rest_args && ap->raw_before != 0) || (last_ap != NULL && last_ap->rest_args ! && last_ap->raw_after != 0))) { /* Delete final whitespace. */ while (totlen > count_before && is_space[xbuf[totlen - 1]]) { *************** *** 7984,7991 **** if (!traditional) xbuf[totlen++] = '\"'; /* insert ending quote */ ! } else if (ap->raw_before || ap->raw_after || traditional) { U_CHAR *p1 = arg->raw; U_CHAR *l1 = p1 + arg->raw_length; ! if (ap->raw_before) { while (p1 != l1 && is_space[*p1]) p1++; while (p1 != l1 && is_idchar[*p1]) --- 8285,8292 ---- if (!traditional) xbuf[totlen++] = '\"'; /* insert ending quote */ ! } else if (ap->raw_before != 0 || ap->raw_after != 0 || traditional) { U_CHAR *p1 = arg->raw; U_CHAR *l1 = p1 + arg->raw_length; ! if (ap->raw_before != 0) { while (p1 != l1 && is_space[*p1]) p1++; while (p1 != l1 && is_idchar[*p1]) *************** *** 8002,8006 **** xbuf[totlen++] = ' '; } ! if (ap->raw_after) { /* Arg is concatenated after: delete trailing whitespace, whitespace markers, and no-reexpansion markers. */ --- 8303,8307 ---- xbuf[totlen++] = ' '; } ! if (ap->raw_after != 0) { /* Arg is concatenated after: delete trailing whitespace, whitespace markers, and no-reexpansion markers. */ *************** *** 8023,8027 **** bcopy ((char *) p1, (char *) (xbuf + totlen), l1 - p1); totlen += l1 - p1; ! if (!traditional && !ap->raw_after) { /* Ordinary expanded use of the argument. Put in newline-space markers to prevent token pasting. */ --- 8324,8328 ---- bcopy ((char *) p1, (char *) (xbuf + totlen), l1 - p1); totlen += l1 - p1; ! if (!traditional && ap->raw_after == 0) { /* Ordinary expanded use of the argument. Put in newline-space markers to prevent token pasting. */ *************** *** 8068,8072 **** rest_zero = 0; if (! (rest_zero && last_ap != NULL && last_ap->rest_args ! && last_ap->raw_after)) xbuf[totlen++] = exp[i]; } --- 8369,8373 ---- rest_zero = 0; if (! (rest_zero && last_ap != NULL && last_ap->rest_args ! && last_ap->raw_after != 0)) xbuf[totlen++] = exp[i]; } *************** *** 8131,8134 **** --- 8432,8436 ---- int newlines = 0; int comments = 0; + char *result = 0; /* Try to parse as much of the argument as exists at this *************** *** 8163,8168 **** while (bp == ip->buf + ip->length) { if (instack[indepth].macro == 0) { ! free (buffer); ! return "unterminated macro call"; } ip->macro->type = T_MACRO; --- 8465,8470 ---- while (bp == ip->buf + ip->length) { if (instack[indepth].macro == 0) { ! result = "unterminated macro call"; ! break; } ip->macro->type = T_MACRO; *************** *** 8194,8198 **** argptr->free1 = buffer; argptr->newlines = newlines; - argptr->comments = comments; if ((newlines || comments) && ip->fname != 0) argptr->raw_length --- 8496,8499 ---- *************** *** 8241,8245 **** argptr->stringified_length = totlen; } ! return 0; } --- 8542,8546 ---- argptr->stringified_length = totlen; } ! return result; } *************** *** 8298,8301 **** --- 8599,8604 ---- bp++; } + /* Now count the newline that we are about to skip. */ + ++*newlines; break; } *************** *** 8414,8419 **** if (ibp[0] != '*' || ibp + 1 >= limit) break; ! /* Comments are equivalent to spaces. */ ! obp[-1] = ' '; ibp++; while (ibp + 1 < limit) { --- 8717,8726 ---- if (ibp[0] != '*' || ibp + 1 >= limit) break; ! /* Comments are equivalent to spaces. ! For -traditional, a comment is equivalent to nothing. */ ! if (traditional) ! obp--; ! else ! obp[-1] = ' '; ibp++; while (ibp + 1 < limit) { *************** *** 8546,8552 **** void ! error (msg, arg1, arg2, arg3) char *msg; ! char *arg1, *arg2, *arg3; { int i; --- 8853,8870 ---- void ! error (PRINTF_ALIST (msg)) ! PRINTF_DCL (msg) ! { ! va_list args; ! ! VA_START (args, msg); ! verror (msg, args); ! va_end (args); ! } ! ! static void ! verror (msg, args) char *msg; ! va_list args; { int i; *************** *** 8563,8567 **** if (ip != NULL) fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno); ! fprintf (stderr, msg, arg1, arg2, arg3); fprintf (stderr, "\n"); errors++; --- 8881,8885 ---- if (ip != NULL) fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno); ! vfprintf (stderr, msg, args); fprintf (stderr, "\n"); errors++; *************** *** 8596,8602 **** void ! warning (msg, arg1, arg2, arg3) char *msg; ! char *arg1, *arg2, *arg3; { int i; --- 8914,8931 ---- void ! warning (PRINTF_ALIST (msg)) ! PRINTF_DCL (msg) ! { ! va_list args; ! ! VA_START (args, msg); ! vwarning (msg, args); ! va_end (args); ! } ! ! static void ! vwarning (msg, args) char *msg; ! va_list args; { int i; *************** *** 8620,8632 **** fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno); fprintf (stderr, "warning: "); ! fprintf (stderr, msg, arg1, arg2, arg3); fprintf (stderr, "\n"); } static void ! error_with_line (line, msg, arg1, arg2, arg3) int line; char *msg; ! char *arg1, *arg2, *arg3; { int i; --- 8949,8977 ---- fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno); fprintf (stderr, "warning: "); ! vfprintf (stderr, msg, args); fprintf (stderr, "\n"); } static void ! #if defined (__STDC__) && defined (HAVE_VPRINTF) ! error_with_line (int line, PRINTF_ALIST (msg)) ! #else ! error_with_line (line, PRINTF_ALIST (msg)) ! int line; ! PRINTF_DCL (msg) ! #endif ! { ! va_list args; ! ! VA_START (args, msg); ! verror_with_line (line, msg, args); ! va_end (args); ! } ! ! static void ! verror_with_line (line, msg, args) int line; char *msg; ! va_list args; { int i; *************** *** 8643,8647 **** if (ip != NULL) fprintf (stderr, "%s:%d: ", ip->nominal_fname, line); ! fprintf (stderr, msg, arg1, arg2, arg3); fprintf (stderr, "\n"); errors++; --- 8988,8992 ---- if (ip != NULL) fprintf (stderr, "%s:%d: ", ip->nominal_fname, line); ! vfprintf (stderr, msg, args); fprintf (stderr, "\n"); errors++; *************** *** 8649,8656 **** static void ! warning_with_line (line, msg, arg1, arg2, arg3) int line; char *msg; ! char *arg1, *arg2, *arg3; { int i; --- 8994,9001 ---- static void ! vwarning_with_line (line, msg, args) int line; char *msg; ! va_list args; { int i; *************** *** 8674,8678 **** fprintf (stderr, "%s:%d: ", ip->nominal_fname, line); fprintf (stderr, "warning: "); ! fprintf (stderr, msg, arg1, arg2, arg3); fprintf (stderr, "\n"); } --- 9019,9023 ---- fprintf (stderr, "%s:%d: ", ip->nominal_fname, line); fprintf (stderr, "warning: "); ! vfprintf (stderr, msg, args); fprintf (stderr, "\n"); } *************** *** 8681,8704 **** void ! pedwarn (msg, arg1, arg2, arg3) ! char *msg; ! char *arg1, *arg2, *arg3; { if (pedantic_errors) ! error (msg, arg1, arg2, arg3); else ! warning (msg, arg1, arg2, arg3); } void ! pedwarn_with_line (line, msg, arg1, arg2, arg3) int line; ! char *msg; ! char *arg1, *arg2, *arg3; { if (pedantic_errors) ! error_with_line (line, msg, arg1, arg2, arg3); else ! warning_with_line (line, msg, arg1, arg2, arg3); } --- 9026,9059 ---- void ! pedwarn (PRINTF_ALIST (msg)) ! PRINTF_DCL (msg) { + va_list args; + + VA_START (args, msg); if (pedantic_errors) ! verror (msg, args); else ! vwarning (msg, args); ! va_end (args); } void ! #if defined (__STDC__) && defined (HAVE_VPRINTF) ! pedwarn_with_line (int line, PRINTF_ALIST (msg)) ! #else ! pedwarn_with_line (line, PRINTF_ALIST (msg)) int line; ! PRINTF_DCL (msg) ! #endif { + va_list args; + + VA_START (args, msg); if (pedantic_errors) ! verror_with_line (line, msg, args); else ! vwarning_with_line (line, msg, args); ! va_end (args); } *************** *** 8707,8716 **** static void ! pedwarn_with_file_and_line (file, line, msg, arg1, arg2, arg3) char *file; int line; ! char *msg; ! char *arg1, *arg2, *arg3; { if (!pedantic_errors && inhibit_warnings) return; --- 9062,9076 ---- static void ! #if defined (__STDC__) && defined (HAVE_VPRINTF) ! pedwarn_with_file_and_line (char *file, int line, PRINTF_ALIST (msg)) ! #else ! pedwarn_with_file_and_line (file, line, PRINTF_ALIST (msg)) char *file; int line; ! PRINTF_DCL (msg) ! #endif { + va_list args; + if (!pedantic_errors && inhibit_warnings) return; *************** *** 8721,8730 **** if (!pedantic_errors) fprintf (stderr, "warning: "); ! fprintf (stderr, msg, arg1, arg2, arg3); fprintf (stderr, "\n"); } /* Print the file names and line numbers of the #include ! commands which led to the current file. */ static void --- 9081,9092 ---- if (!pedantic_errors) fprintf (stderr, "warning: "); ! VA_START (args, msg); ! vfprintf (stderr, msg, args); ! va_end (args); fprintf (stderr, "\n"); } /* Print the file names and line numbers of the #include ! directives which led to the current file. */ static void *************** *** 8853,8861 **** */ static HASHNODE * ! install (name, len, type, ivalue, value, hash) U_CHAR *name; int len; enum node_type type; - int ivalue; char *value; int hash; --- 9215,9222 ---- */ static HASHNODE * ! install (name, len, type, value, hash) U_CHAR *name; int len; enum node_type type; char *value; int hash; *************** *** 8886,8893 **** hp->type = type; hp->length = len; ! if (hp->type == T_CONST) ! hp->value.ival = ivalue; ! else ! hp->value.cpval = value; hp->name = ((U_CHAR *) hp) + sizeof (HASHNODE); p = hp->name; --- 9247,9251 ---- hp->type = type; hp->length = len; ! hp->value.cpval = value; hp->name = ((U_CHAR *) hp) + sizeof (HASHNODE); p = hp->name; *************** *** 8928,8932 **** bucket = hashtab[hash]; while (bucket) { ! if (bucket->length == len && strncmp (bucket->name, name, len) == 0) return bucket; bucket = bucket->next; --- 9286,9290 ---- bucket = hashtab[hash]; while (bucket) { ! if (bucket->length == len && bcmp (bucket->name, name, len) == 0) return bucket; bucket = bucket->next; *************** *** 9036,9048 **** if (ap->nchars != 0) concat = 0; ! if (ap->stringify) ! fprintf (of, " #"); ! if (ap->raw_before && !concat) ! fprintf (of, " ## "); concat = 0; } dump_arg_n (defn, ap->argno, of); ! if (!traditional && ap->raw_after) { ! fprintf (of, " ## "); concat = 1; } --- 9394,9437 ---- if (ap->nchars != 0) concat = 0; ! if (ap->stringify) { ! switch (ap->stringify) { ! case SHARP_TOKEN: fprintf (of, "#"); break; ! case WHITE_SHARP_TOKEN: fprintf (of, "# "); break; ! case PERCENT_COLON_TOKEN: fprintf (of, "%%:"); break; ! case WHITE_PERCENT_COLON_TOKEN: fprintf (of, "%%: "); break; ! default: abort (); ! } ! } ! if (ap->raw_before != 0) { ! if (concat) { ! switch (ap->raw_before) { ! case WHITE_SHARP_TOKEN: ! case WHITE_PERCENT_COLON_TOKEN: ! fprintf (of, " "); ! break; ! default: ! break; ! } ! } else { ! switch (ap->raw_before) { ! case SHARP_TOKEN: fprintf (of, "##"); break; ! case WHITE_SHARP_TOKEN: fprintf (of, "## "); break; ! case PERCENT_COLON_TOKEN: fprintf (of, "%%:%%:"); break; ! case WHITE_PERCENT_COLON_TOKEN: fprintf (of, "%%:%%: "); break; ! default: abort (); ! } ! } ! } concat = 0; } dump_arg_n (defn, ap->argno, of); ! if (!traditional && ap->raw_after != 0) { ! switch (ap->raw_after) { ! case SHARP_TOKEN: fprintf (of, "##"); break; ! case WHITE_SHARP_TOKEN: fprintf (of, " ##"); break; ! case PERCENT_COLON_TOKEN: fprintf (of, "%%:%%:"); break; ! case WHITE_PERCENT_COLON_TOKEN: fprintf (of, " %%:%%:"); break; ! default: abort (); ! } concat = 1; } *************** *** 9116,9120 **** register U_CHAR *p = defn->args.argnames; while (argnum + 1 < defn->nargs) { ! p = (U_CHAR *) index (p, ' ') + 1; argnum++; } --- 9505,9509 ---- register U_CHAR *p = defn->args.argnames; while (argnum + 1 < defn->nargs) { ! p = (U_CHAR *) index ((char *) p, ' ') + 1; argnum++; } *************** *** 9165,9168 **** --- 9554,9561 ---- is_space['\n'] = 1; is_space['\r'] = 1; + + char_name['\v'] = "vertical tab"; + char_name['\f'] = "formfeed"; + char_name['\r'] = "carriage return"; } *************** *** 9174,9204 **** FILE_BUF *outp; { ! install ("__LINE__", -1, T_SPECLINE, 0, NULL_PTR, -1); ! install ("__DATE__", -1, T_DATE, 0, NULL_PTR, -1); ! install ("__FILE__", -1, T_FILE, 0, NULL_PTR, -1); ! install ("__BASE_FILE__", -1, T_BASE_FILE, 0, NULL_PTR, -1); ! install ("__INCLUDE_LEVEL__", -1, T_INCLUDE_LEVEL, 0, NULL_PTR, -1); ! install ("__VERSION__", -1, T_VERSION, 0, NULL_PTR, -1); #ifndef NO_BUILTIN_SIZE_TYPE ! install ("__SIZE_TYPE__", -1, T_SIZE_TYPE, 0, NULL_PTR, -1); #endif #ifndef NO_BUILTIN_PTRDIFF_TYPE ! install ("__PTRDIFF_TYPE__ ", -1, T_PTRDIFF_TYPE, 0, NULL_PTR, -1); #endif ! install ("__WCHAR_TYPE__", -1, T_WCHAR_TYPE, 0, NULL_PTR, -1); ! install ("__USER_LABEL_PREFIX__",-1,T_USER_LABEL_PREFIX_TYPE,0,NULL_PTR, -1); ! install ("__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE, 0, NULL_PTR, -1); ! install ("__TIME__", -1, T_TIME, 0, NULL_PTR, -1); ! if (!traditional) ! install ("__STDC__", -1, T_CONST, STDC_VALUE, NULL_PTR, -1); if (objc) ! install ("__OBJC__", -1, T_CONST, 1, NULL_PTR, -1); /* This is supplied using a -D by the compiler driver so that it is present only when truly compiling with GNU C. */ ! /* install ("__GNUC__", -1, T_CONST, 2, NULL_PTR, -1); */ if (debug_output) { char directive[2048]; register struct directive *dp = &directive_table[0]; struct tm *timebuf = timestamp (); --- 9567,9604 ---- FILE_BUF *outp; { ! install ((U_CHAR *) "__LINE__", -1, T_SPECLINE, NULL_PTR, -1); ! install ((U_CHAR *) "__DATE__", -1, T_DATE, NULL_PTR, -1); ! install ((U_CHAR *) "__FILE__", -1, T_FILE, NULL_PTR, -1); ! install ((U_CHAR *) "__BASE_FILE__", -1, T_BASE_FILE, NULL_PTR, -1); ! install ((U_CHAR *) "__INCLUDE_LEVEL__", -1, T_INCLUDE_LEVEL, NULL_PTR, -1); ! install ((U_CHAR *) "__VERSION__", -1, T_VERSION, NULL_PTR, -1); #ifndef NO_BUILTIN_SIZE_TYPE ! install ((U_CHAR *) "__SIZE_TYPE__", -1, T_SIZE_TYPE, NULL_PTR, -1); #endif #ifndef NO_BUILTIN_PTRDIFF_TYPE ! install ((U_CHAR *) "__PTRDIFF_TYPE__ ", -1, T_PTRDIFF_TYPE, NULL_PTR, -1); #endif ! install ((U_CHAR *) "__WCHAR_TYPE__", -1, T_WCHAR_TYPE, NULL_PTR, -1); ! install ((U_CHAR *) "__USER_LABEL_PREFIX__", -1, T_USER_LABEL_PREFIX_TYPE, ! NULL_PTR, -1); ! install ((U_CHAR *) "__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE, ! NULL_PTR, -1); ! install ((U_CHAR *) "__IMMEDIATE_PREFIX__", -1, T_IMMEDIATE_PREFIX_TYPE, ! NULL_PTR, -1); ! install ((U_CHAR *) "__TIME__", -1, T_TIME, NULL_PTR, -1); ! if (!traditional) { ! install ((U_CHAR *) "__STDC__", -1, T_CONST, "1", -1); ! install ((U_CHAR *) "__STDC_VERSION__", -1, T_CONST, "199409L", -1); ! } if (objc) ! install ((U_CHAR *) "__OBJC__", -1, T_CONST, "1", -1); /* This is supplied using a -D by the compiler driver so that it is present only when truly compiling with GNU C. */ ! /* install ((U_CHAR *) "__GNUC__", -1, T_CONST, "2", -1); */ if (debug_output) { char directive[2048]; + U_CHAR *udirective = (U_CHAR *) directive; register struct directive *dp = &directive_table[0]; struct tm *timebuf = timestamp (); *************** *** 9206,9248 **** sprintf (directive, " __BASE_FILE__ \"%s\"\n", instack[0].nominal_fname); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); sprintf (directive, " __VERSION__ \"%s\"\n", version_string); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); #ifndef NO_BUILTIN_SIZE_TYPE sprintf (directive, " __SIZE_TYPE__ %s\n", SIZE_TYPE); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); #endif #ifndef NO_BUILTIN_PTRDIFF_TYPE sprintf (directive, " __PTRDIFF_TYPE__ %s\n", PTRDIFF_TYPE); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); #endif sprintf (directive, " __WCHAR_TYPE__ %s\n", wchar_type); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); sprintf (directive, " __DATE__ \"%s %2d %4d\"\n", monthnames[timebuf->tm_mon], timebuf->tm_mday, timebuf->tm_year + 1900); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); sprintf (directive, " __TIME__ \"%02d:%02d:%02d\"\n", timebuf->tm_hour, timebuf->tm_min, timebuf->tm_sec); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); if (!traditional) { sprintf (directive, " __STDC__ 1"); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); } --- 9606,9655 ---- sprintf (directive, " __BASE_FILE__ \"%s\"\n", instack[0].nominal_fname); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); sprintf (directive, " __VERSION__ \"%s\"\n", version_string); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); #ifndef NO_BUILTIN_SIZE_TYPE sprintf (directive, " __SIZE_TYPE__ %s\n", SIZE_TYPE); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); #endif #ifndef NO_BUILTIN_PTRDIFF_TYPE sprintf (directive, " __PTRDIFF_TYPE__ %s\n", PTRDIFF_TYPE); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); #endif sprintf (directive, " __WCHAR_TYPE__ %s\n", wchar_type); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); sprintf (directive, " __DATE__ \"%s %2d %4d\"\n", monthnames[timebuf->tm_mon], timebuf->tm_mday, timebuf->tm_year + 1900); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); sprintf (directive, " __TIME__ \"%02d:%02d:%02d\"\n", timebuf->tm_hour, timebuf->tm_min, timebuf->tm_sec); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], ! outp, dp); if (!traditional) { sprintf (directive, " __STDC__ 1"); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], outp, dp); } *************** *** 9250,9255 **** { sprintf (directive, " __OBJC__ 1"); ! output_line_command (inp, outp, 0, same_file); ! pass_thru_directive (directive, &directive[strlen (directive)], outp, dp); } --- 9657,9662 ---- { sprintf (directive, " __OBJC__ 1"); ! output_line_directive (inp, outp, 0, same_file); ! pass_thru_directive (udirective, &udirective[strlen (directive)], outp, dp); } *************** *** 9266,9270 **** static void make_definition (str, op) ! U_CHAR *str; FILE_BUF *op; { --- 9673,9677 ---- static void make_definition (str, op) ! char *str; FILE_BUF *op; { *************** *** 9273,9278 **** U_CHAR *buf, *p; ! buf = str; ! p = str; if (!is_idstart[*p]) { error ("malformed option `-D %s'", str); --- 9680,9684 ---- U_CHAR *buf, *p; ! p = buf = (U_CHAR *) str; if (!is_idstart[*p]) { error ("malformed option `-D %s'", str); *************** *** 9285,9289 **** ; if (*p++ != ')') ! p = str; /* Error */ } if (*p == 0) { --- 9691,9695 ---- ; if (*p++ != ')') ! p = (U_CHAR *) str; /* Error */ } if (*p == 0) { *************** *** 9298,9311 **** /* Copy the entire option so we can modify it. */ buf = (U_CHAR *) alloca (2 * strlen (str) + 1); ! strncpy (buf, str, p - str); /* Change the = to a space. */ ! buf[p - str] = ' '; /* Scan for any backslash-newline and remove it. */ p++; ! q = &buf[p - str]; while (*p) { if (*p == '\"' || *p == '\'') { int unterminated = 0; ! U_CHAR *p1 = skip_quoted_string (p, p + strlen (p), 0, NULL_PTR, NULL_PTR, &unterminated); if (unterminated) --- 9704,9717 ---- /* Copy the entire option so we can modify it. */ buf = (U_CHAR *) alloca (2 * strlen (str) + 1); ! strncpy ((char *) buf, str, p - (U_CHAR *) str); /* Change the = to a space. */ ! buf[p - (U_CHAR *) str] = ' '; /* Scan for any backslash-newline and remove it. */ p++; ! q = &buf[p - (U_CHAR *) str]; while (*p) { if (*p == '\"' || *p == '\'') { int unterminated = 0; ! U_CHAR *p1 = skip_quoted_string (p, p + strlen ((char *) p), 0, NULL_PTR, NULL_PTR, &unterminated); if (unterminated) *************** *** 9335,9339 **** ip->buf = ip->bufp = buf; ! ip->length = strlen (buf); ip->lineno = 1; ip->macro = 0; --- 9741,9745 ---- ip->buf = ip->bufp = buf; ! ip->length = strlen ((char *) buf); ip->lineno = 1; ip->macro = 0; *************** *** 9346,9350 **** /* Pass NULL instead of OP, since this is a "predefined" macro. */ ! do_define (buf, buf + strlen (buf), NULL_PTR, kt); --indepth; } --- 9752,9756 ---- /* Pass NULL instead of OP, since this is a "predefined" macro. */ ! do_define (buf, buf + strlen ((char *) buf), NULL_PTR, kt); --indepth; } *************** *** 9354,9358 **** static void make_undef (str, op) ! U_CHAR *str; FILE_BUF *op; { --- 9760,9764 ---- static void make_undef (str, op) ! char *str; FILE_BUF *op; { *************** *** 9363,9367 **** ip->nominal_fname = ip->fname = "*undef*"; ! ip->buf = ip->bufp = str; ip->length = strlen (str); ip->lineno = 1; --- 9769,9773 ---- ip->nominal_fname = ip->fname = "*undef*"; ! ip->buf = ip->bufp = (U_CHAR *) str; ip->length = strlen (str); ip->lineno = 1; *************** *** 9374,9378 **** ; ! do_undef (str, str + strlen (str), op, kt); --indepth; } --- 9780,9784 ---- ; ! do_undef ((U_CHAR *) str, (U_CHAR *) str + strlen (str), op, kt); --indepth; } *************** *** 9384,9388 **** make_assertion (option, str) char *option; ! U_CHAR *str; { FILE_BUF *ip; --- 9790,9794 ---- make_assertion (option, str) char *option; ! char *str; { FILE_BUF *ip; *************** *** 9410,9414 **** while (is_idchar[*++p]) ; ! while (*p == ' ' || *p == '\t') p++; if (! (*p == 0 || *p == '(')) { error ("malformed option `%s %s'", option, str); --- 9816,9820 ---- while (is_idchar[*++p]) ; ! SKIP_WHITE_SPACE (p); if (! (*p == 0 || *p == '(')) { error ("malformed option `%s %s'", option, str); *************** *** 9420,9424 **** ip->buf = ip->bufp = buf; ! ip->length = strlen (buf); ip->lineno = 1; ip->macro = 0; --- 9826,9830 ---- ip->buf = ip->bufp = buf; ! ip->length = strlen ((char *) buf); ip->lineno = 1; ip->macro = 0; *************** *** 9432,9436 **** /* pass NULL as output ptr to do_define since we KNOW it never does any output.... */ ! do_assert (buf, buf + strlen (buf) , NULL_PTR, kt); --indepth; } --- 9838,9842 ---- /* pass NULL as output ptr to do_define since we KNOW it never does any output.... */ ! do_assert (buf, buf + strlen ((char *) buf) , NULL_PTR, kt); --indepth; } *************** *** 9471,9476 **** /* Add output to `deps_buffer' for the -M switch. STRING points to the text to be output. ! SPACER is ':' for targets, ' ' for dependencies, zero for text ! to be inserted literally. */ static void --- 9877,9881 ---- /* Add output to `deps_buffer' for the -M switch. STRING points to the text to be output. ! SPACER is ':' for targets, ' ' for dependencies. */ static void *************** *** 9487,9558 **** #define MAX_OUTPUT_COLUMNS 72 #endif ! if (spacer ! && deps_column > 0 ! && (deps_column + size) > MAX_OUTPUT_COLUMNS) ! { ! deps_output (" \\\n ", 0); ! deps_column = 0; } if (deps_size + size + 8 > deps_allocated_size) { deps_allocated_size = (deps_size + size + 50) * 2; ! deps_buffer = (char *) xrealloc (deps_buffer, deps_allocated_size); } ! if (spacer == ' ' && deps_column > 0) deps_buffer[deps_size++] = ' '; bcopy (string, &deps_buffer[deps_size], size); deps_size += size; deps_column += size; ! if (spacer == ':') deps_buffer[deps_size++] = ':'; deps_buffer[deps_size] = 0; } - #if defined(USG) || defined(VMS) - #ifndef BSTRING - - void - bzero (b, length) - register char *b; - register unsigned length; - { - while (length-- > 0) - *b++ = 0; - } - - void - bcopy (b1, b2, length) - register char *b1; - register char *b2; - register unsigned length; - { - while (length-- > 0) - *b2++ = *b1++; - } - - int - bcmp (b1, b2, length) /* This could be a macro! */ - register char *b1; - register char *b2; - register unsigned length; - { - while (length-- > 0) - if (*b1++ != *b2++) - return 1; - - return 0; - } - #endif /* not BSTRING */ - #endif /* USG or VMS */ - - static void ! fatal (str, arg) ! char *str, *arg; { fprintf (stderr, "%s: ", progname); ! fprintf (stderr, str, arg); fprintf (stderr, "\n"); ! exit (FAILURE_EXIT_CODE); } --- 9892,9934 ---- #define MAX_OUTPUT_COLUMNS 72 #endif ! if (MAX_OUTPUT_COLUMNS - 1 /*spacer*/ - 2 /*` \'*/ < deps_column + size ! && 1 < deps_column) { ! bcopy (" \\\n ", &deps_buffer[deps_size], 4); ! deps_size += 4; ! deps_column = 1; ! if (spacer == ' ') ! spacer = 0; } if (deps_size + size + 8 > deps_allocated_size) { deps_allocated_size = (deps_size + size + 50) * 2; ! deps_buffer = xrealloc (deps_buffer, deps_allocated_size); } ! if (spacer == ' ') { deps_buffer[deps_size++] = ' '; + deps_column++; + } bcopy (string, &deps_buffer[deps_size], size); deps_size += size; deps_column += size; ! if (spacer == ':') { deps_buffer[deps_size++] = ':'; + deps_column++; + } deps_buffer[deps_size] = 0; } static void ! fatal (PRINTF_ALIST (msg)) ! PRINTF_DCL (msg) { + va_list args; + fprintf (stderr, "%s: ", progname); ! VA_START (args, msg); ! vfprintf (stderr, msg, args); ! va_end (args); fprintf (stderr, "\n"); ! exit (FATAL_EXIT_CODE); } *************** *** 9583,9587 **** exit (vaxc$errno); #else ! exit (FAILURE_EXIT_CODE); #endif } --- 9959,9963 ---- exit (vaxc$errno); #else ! exit (FATAL_EXIT_CODE); #endif } *************** *** 9604,9657 **** ! char * xmalloc (size) ! unsigned size; { ! register char *ptr = (char *) malloc (size); ! if (ptr != 0) return (ptr); ! memory_full (); ! /*NOTREACHED*/ ! return 0; } ! static char * xrealloc (old, size) ! char *old; ! unsigned size; { ! register char *ptr = (char *) realloc (old, size); ! if (ptr != 0) return (ptr); ! memory_full (); ! /*NOTREACHED*/ ! return 0; } ! static char * xcalloc (number, size) ! unsigned number, size; { ! register unsigned total = number * size; ! register char *ptr = (char *) malloc (total); ! if (ptr != 0) { ! if (total > 100) ! bzero (ptr, total); ! else { ! /* It's not too long, so loop, zeroing by longs. ! It must be safe because malloc values are always well aligned. */ ! register long *zp = (long *) ptr; ! register long *zl = (long *) (ptr + total - 4); ! register int i = total - 4; ! while (zp < zl) ! *zp++ = 0; ! if (i < 0) ! i = 0; ! while (i < total) ! ptr[i++] = 0; ! } ! return ptr; ! } ! memory_full (); ! /*NOTREACHED*/ ! return 0; } --- 9980,10014 ---- ! GENERIC_PTR xmalloc (size) ! size_t size; { ! register GENERIC_PTR ptr = (GENERIC_PTR) malloc (size); ! if (!ptr) ! memory_full (); ! return ptr; } ! static GENERIC_PTR xrealloc (old, size) ! GENERIC_PTR old; ! size_t size; { ! register GENERIC_PTR ptr = (GENERIC_PTR) realloc (old, size); ! if (!ptr) ! memory_full (); ! return ptr; } ! static GENERIC_PTR xcalloc (number, size) ! size_t number, size; { ! register size_t total = number * size; ! register GENERIC_PTR ptr = (GENERIC_PTR) malloc (total); ! if (!ptr) ! memory_full (); ! bzero (ptr, total); ! return ptr; } *************** *** 9660,9664 **** char *input; { ! unsigned size = strlen (input); char *output = xmalloc (size + 1); strcpy (output, input); --- 10017,10021 ---- char *input; { ! size_t size = strlen (input); char *output = xmalloc (size + 1); strcpy (output, input); *************** *** 9943,9949 **** { #undef fopen /* Get back the REAL fopen routine */ ! if (strcmp (type, "w") == 0) ! return fopen (fname, type, "mbc=16", "deq=64", "fop=tef", "shr=nil"); ! return fopen (fname, type, "mbc=16"); } --- 10300,10313 ---- { #undef fopen /* Get back the REAL fopen routine */ ! /* The gcc-vms-1.42 distribution's header files prototype fopen with two ! fixed arguments, which matches ANSI's specification but not VAXCRTL's ! pre-ANSI implementation. This hack circumvents the mismatch problem. */ ! FILE *(*vmslib_fopen)() = (FILE *(*)()) fopen; ! ! if (*type == 'w') ! return (*vmslib_fopen) (fname, type, "mbc=32", ! "deq=64", "fop=tef", "shr=nil"); ! else ! return (*vmslib_fopen) (fname, type, "mbc=32"); } *************** *** 9960,9964 **** /* Avoid run-time library bug, where copying M out of N+M characters with N >= 65535 results in VAXCRTL's strncat falling into an infinite loop. ! gcc-cpp exercises this particular bug. */ static char * --- 10324,10328 ---- /* Avoid run-time library bug, where copying M out of N+M characters with N >= 65535 results in VAXCRTL's strncat falling into an infinite loop. ! gcc-cpp exercises this particular bug. [Fixed in V5.5-2's VAXCRTL.] */ static char * *************** *** 9976,9979 **** --- 10340,10422 ---- if (n < 0) *d = '\0'; return dst; + } + + /* more VMS hackery */ + #include + #include + + extern unsigned long sys$parse(), sys$search(); + + /* Work around another library bug. If a file is located via a searchlist, + and if the device it's on is not the same device as the one specified + in the first element of that searchlist, then both stat() and fstat() + will fail to return info about it. `errno' will be set to EVMSERR, and + `vaxc$errno' will be set to SS$_NORMAL due yet another bug in stat()! + We can get around this by fully parsing the filename and then passing + that absolute name to stat(). + + Without this fix, we can end up failing to find header files, which is + bad enough, but then compounding the problem by reporting the reason for + failure as "normal successful completion." */ + + #undef fstat /* get back to library version */ + + static int + VMS_fstat (fd, statbuf) + int fd; + struct stat *statbuf; + { + int result = fstat (fd, statbuf); + + if (result < 0) + { + FILE *fp; + char nambuf[NAM$C_MAXRSS+1]; + + if ((fp = fdopen (fd, "r")) != 0 && fgetname (fp, nambuf) != 0) + result = VMS_stat (nambuf, statbuf); + /* No fclose(fp) here; that would close(fd) as well. */ + } + + return result; + } + + static int + VMS_stat (name, statbuf) + const char *name; + struct stat *statbuf; + { + int result = stat (name, statbuf); + + if (result < 0) + { + struct FAB fab; + struct NAM nam; + char exp_nam[NAM$C_MAXRSS+1], /* expanded name buffer for sys$parse */ + res_nam[NAM$C_MAXRSS+1]; /* resultant name buffer for sys$search */ + + fab = cc$rms_fab; + fab.fab$l_fna = (char *) name; + fab.fab$b_fns = (unsigned char) strlen (name); + fab.fab$l_nam = (void *) &nam; + nam = cc$rms_nam; + nam.nam$l_esa = exp_nam, nam.nam$b_ess = sizeof exp_nam - 1; + nam.nam$l_rsa = res_nam, nam.nam$b_rss = sizeof res_nam - 1; + nam.nam$b_nop = NAM$M_PWD | NAM$M_NOCONCEAL; + if (sys$parse (&fab) & 1) + { + if (sys$search (&fab) & 1) + { + res_nam[nam.nam$b_rsl] = '\0'; + result = stat (res_nam, statbuf); + } + /* Clean up searchlist context cached by the system. */ + nam.nam$b_nop = NAM$M_SYNCHK; + fab.fab$l_fna = 0, fab.fab$b_fns = 0; + (void) sys$parse (&fab); + } + } + + return result; } #endif /* VMS */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cexp.y gcc-2.7.0/cexp.y *** gcc-2.6.3/cexp.y Tue Sep 20 19:02:25 1994 --- gcc-2.7.0/cexp.y Thu Jun 15 07:17:09 1995 *************** *** 1,4 **** /* Parse C expressions for CCCP. ! Copyright (C) 1987, 1992, 1994 Free Software Foundation. This program is free software; you can redistribute it and/or modify it --- 1,4 ---- /* Parse C expressions for CCCP. ! Copyright (C) 1987, 1992, 1994, 1995 Free Software Foundation. This program is free software; you can redistribute it and/or modify it *************** *** 14,18 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. In other words, you are welcome to use, share and improve this program. --- 14,19 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. In other words, you are welcome to use, share and improve this program. *************** *** 87,90 **** --- 88,95 ---- static int keyword_parsing = 0; + /* Nonzero means do not evaluate this expression. + This is a count, since unevaluated expressions can nest. */ + static int skip_evaluation; + /* some external tables of character types */ extern unsigned char is_idstart[], is_idchar[], is_hor_space[]; *************** *** 143,148 **** struct name {U_CHAR *address; int length;} name; struct arglist *keywords; - int voidval; - char *sval; } --- 148,151 ---- *************** *** 228,232 **** { if ($3.value == 0) { ! error ("division by zero in #if"); $3.value = 1; } --- 231,236 ---- { if ($3.value == 0) { ! if (!skip_evaluation) ! error ("division by zero in #if"); $3.value = 1; } *************** *** 243,247 **** { if ($3.value == 0) { ! error ("division by zero in #if"); $3.value = 1; } --- 247,252 ---- { if ($3.value == 0) { ! if (!skip_evaluation) ! error ("division by zero in #if"); $3.value = 1; } *************** *** 316,328 **** { $$.value = $1.value | $3.value; $$.unsignedp = $1.unsignedp || $3.unsignedp; } ! | exp AND exp ! { $$.value = ($1.value && $3.value); $$.unsignedp = 0; } ! | exp OR exp ! { $$.value = ($1.value || $3.value); $$.unsignedp = 0; } ! | exp '?' exp ':' exp ! { $$.value = $1.value ? $3.value : $5.value; ! $$.unsignedp = $3.unsignedp || $5.unsignedp; } | INT { $$ = yylval.integer; } --- 321,344 ---- { $$.value = $1.value | $3.value; $$.unsignedp = $1.unsignedp || $3.unsignedp; } ! | exp AND ! { skip_evaluation += !$1.value; } ! exp ! { skip_evaluation -= !$1.value; ! $$.value = ($1.value && $4.value); $$.unsignedp = 0; } ! | exp OR ! { skip_evaluation += !!$1.value; } ! exp ! { skip_evaluation -= !!$1.value; ! $$.value = ($1.value || $4.value); $$.unsignedp = 0; } ! | exp '?' ! { skip_evaluation += !$1.value; } ! exp ':' ! { skip_evaluation += !!$1.value - !$1.value; } ! exp ! { skip_evaluation -= !!$1.value; ! $$.value = $1.value ? $4.value : $7.value; ! $$.unsignedp = $4.unsignedp || $7.unsignedp; } | INT { $$ = yylval.integer; } *************** *** 868,871 **** --- 884,888 ---- { error (s); + skip_evaluation = 0; longjmp (parse_return_error, 1); } *************** *** 874,878 **** integer_overflow () { ! if (pedantic) pedwarn ("integer overflow in preprocessor expression"); } --- 891,895 ---- integer_overflow () { ! if (!skip_evaluation && pedantic) pedwarn ("integer overflow in preprocessor expression"); } *************** *** 883,901 **** unsigned long b; { if (b >= HOST_BITS_PER_LONG) ! { ! if (! a->unsignedp && a->value != 0) ! integer_overflow (); ! return 0; ! } else if (a->unsignedp) return (unsigned long) a->value << b; else ! { ! long l = a->value << b; ! if (l >> b != a->value) ! integer_overflow (); ! return l; ! } } --- 900,912 ---- unsigned long b; { + /* It's unclear from the C standard whether shifts can overflow. + The following code ignores overflow; perhaps a C standard + interpretation ruling is needed. */ if (b >= HOST_BITS_PER_LONG) ! return 0; else if (a->unsignedp) return (unsigned long) a->value << b; else ! return a->value << b; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/collect2.c gcc-2.7.0/collect2.c *** gcc-2.6.3/collect2.c Thu Oct 20 18:05:46 1994 --- gcc-2.7.0/collect2.c Thu Jun 15 07:17:35 1995 *************** *** 3,9 **** routines. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Chris Smith (csmith@convex.com). ! Heavily modified by Michael Meissner (meissner@osf.org), Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). --- 3,9 ---- routines. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Chris Smith (csmith@convex.com). ! Heavily modified by Michael Meissner (meissner@cygnus.com), Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). *************** *** 22,30 **** 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. */ /* Build tables of static constructors and destructors and run ld. */ #include #include --- 22,32 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Build tables of static constructors and destructors and run ld. */ + #include "config.h" #include #include *************** *** 38,46 **** #endif #ifndef errno extern int errno; #endif ! #if defined(bsd4_4) || defined(__NetBSD__) extern const char *const sys_errlist[]; #else --- 40,54 ---- #endif + #define COLLECT + + #include "demangle.h" + #include "obstack.h" + #ifndef errno extern int errno; #endif ! #ifndef HAVE_STRERROR ! #if defined(bsd4_4) extern const char *const sys_errlist[]; #else *************** *** 48,62 **** #endif extern int sys_nerr; ! ! #define COLLECT ! #include "config.h" ! #ifndef __STDC__ ! #define generic char #define const - - #else - #define generic void #endif --- 56,69 ---- #endif extern int sys_nerr; ! #else ! char *strerror(); ! #endif ! /* Obstack allocation and deallocation routines. */ ! #define obstack_chunk_alloc xmalloc ! #define obstack_chunk_free free ! #if !defined (__STDC__) && !defined (const) #define const #endif *************** *** 108,111 **** --- 115,119 ---- #ifdef CROSS_COMPILE + #undef SUNOS4_SHARED_LIBRARIES #undef OBJECT_FORMAT_COFF #undef OBJECT_FORMAT_ROSE *************** *** 183,187 **** cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or niether. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" --- 191,195 ---- cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or neither. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" *************** *** 189,192 **** --- 197,209 ---- #endif + #if defined (LDD_SUFFIX) || SUNOS4_SHARED_LIBRARIES + #define SCAN_LIBRARIES + #endif + + #ifdef USE_COLLECT2 + int do_collecting = 1; + #else + int do_collecting = 0; + #endif /* Linked lists of constructor and destructor names. */ *************** *** 210,213 **** --- 227,232 ---- enum pass { PASS_FIRST, /* without constructors */ + PASS_OBJ, /* individual objects */ + PASS_LIB, /* looking for shared libraries */ PASS_SECOND /* with constructors linked in */ }; *************** *** 220,239 **** extern char *version_string; ! static int vflag; /* true if -v */ static int rflag; /* true if -r */ static int strip_flag; /* true if -s */ ! static int debug; /* true if -debug */ static int temp_filename_length; /* Length of temp_filename */ static char *temp_filename; /* Base of temp filenames */ static char *c_file; /* .c for constructor/destructor list. */ static char *o_file; /* .o for constructor/destructor list. */ static char *output_file; /* Output file for ld. */ static char *nm_file_name; /* pathname of nm */ static char *strip_file_name; /* pathname of strip */ static struct head constructors; /* list of constructors found */ static struct head destructors; /* list of destructors found */ extern char *getenv (); --- 239,274 ---- extern char *version_string; ! int vflag; /* true if -v */ static int rflag; /* true if -r */ static int strip_flag; /* true if -s */ ! int debug; /* true if -debug */ + static int shared_obj; /* true if -shared */ + static int temp_filename_length; /* Length of temp_filename */ static char *temp_filename; /* Base of temp filenames */ static char *c_file; /* .c for constructor/destructor list. */ static char *o_file; /* .o for constructor/destructor list. */ + static char *export_file; /* .x for AIX export list. */ + static int auto_export = 1; /* true if exporting everything. */ + char *ldout; /* File for ld errors. */ static char *output_file; /* Output file for ld. */ static char *nm_file_name; /* pathname of nm */ + static char *ldd_file_name; /* pathname of ldd (or equivalent) */ static char *strip_file_name; /* pathname of strip */ + char *c_file_name; /* pathname of gcc */ + static char *initname, *fininame; /* names of init and fini funcs */ static struct head constructors; /* list of constructors found */ static struct head destructors; /* list of destructors found */ + static struct head exports; /* list of exported symbols */ + + struct obstack temporary_obstack; + struct obstack permanent_obstack; + char * temporary_firstobj; + + /* Defined in the automatically-generated underscore.c. */ + extern int prepends_underscore; extern char *getenv (); *************** *** 257,261 **** }; ! static void my_exit PROTO((int)); static void handler PROTO((int)); static int is_ctor_dtor PROTO((char *)); --- 292,298 ---- }; ! void collect_exit PROTO((int)); ! void collect_execute PROTO((char *, char **, char *)); ! void dump_file PROTO((char *)); static void handler PROTO((int)); static int is_ctor_dtor PROTO((char *)); *************** *** 265,268 **** --- 302,306 ---- static void add_prefix PROTO((struct path_prefix *, char *)); static void prefix_from_env PROTO((char *, struct path_prefix *)); + static void prefix_from_string PROTO((char *, struct path_prefix *)); static void do_wait PROTO((char *)); static void fork_execute PROTO((char *, char **)); *************** *** 272,282 **** static void write_list_with_asm PROTO((FILE *, char *, struct id *)); static void write_c_file PROTO((FILE *, char *)); static void scan_prog_file PROTO((char *, enum pass)); ! generic *xcalloc (); ! generic *xmalloc (); extern char *index (); extern char *rindex (); #ifdef NO_DUP2 --- 310,323 ---- static void write_list_with_asm PROTO((FILE *, char *, struct id *)); static void write_c_file PROTO((FILE *, char *)); + static void write_export_file PROTO((FILE *)); static void scan_prog_file PROTO((char *, enum pass)); + static void scan_libraries PROTO((char *)); ! char *xcalloc (); ! char *xmalloc (); extern char *index (); extern char *rindex (); + extern void free (); #ifdef NO_DUP2 *************** *** 326,331 **** /* Delete tempfiles and exit function. */ ! static void ! my_exit (status) int status; { --- 367,372 ---- /* Delete tempfiles and exit function. */ ! void ! collect_exit (status) int status; { *************** *** 336,339 **** --- 377,389 ---- maybe_unlink (o_file); + if (export_file != 0 && export_file[0]) + maybe_unlink (export_file); + + if (ldout != 0 && ldout[0]) + { + dump_file (ldout); + maybe_unlink (ldout); + } + if (status != 0 && output_file != 0 && output_file[0]) maybe_unlink (output_file); *************** *** 345,349 **** /* Die when sys call fails. */ ! static void fatal_perror (string, arg1, arg2, arg3) char *string, *arg1, *arg2, *arg3; --- 395,399 ---- /* Die when sys call fails. */ ! void fatal_perror (string, arg1, arg2, arg3) char *string, *arg1, *arg2, *arg3; *************** *** 354,363 **** fprintf (stderr, string, arg1, arg2, arg3); fprintf (stderr, ": %s\n", my_strerror (e)); ! my_exit (1); } /* Just die. */ ! static void fatal (string, arg1, arg2, arg3) char *string, *arg1, *arg2, *arg3; --- 404,413 ---- fprintf (stderr, string, arg1, arg2, arg3); fprintf (stderr, ": %s\n", my_strerror (e)); ! collect_exit (1); } /* Just die. */ ! void fatal (string, arg1, arg2, arg3) char *string, *arg1, *arg2, *arg3; *************** *** 366,375 **** fprintf (stderr, string, arg1, arg2, arg3); fprintf (stderr, "\n"); ! my_exit (1); } /* Write error message. */ ! static void error (string, arg1, arg2, arg3, arg4) char *string, *arg1, *arg2, *arg3, *arg4; --- 416,425 ---- fprintf (stderr, string, arg1, arg2, arg3); fprintf (stderr, "\n"); ! collect_exit (1); } /* Write error message. */ ! void error (string, arg1, arg2, arg3, arg4) char *string, *arg1, *arg2, *arg3, *arg4; *************** *** 400,403 **** --- 450,456 ---- maybe_unlink (o_file); + if (ldout != 0 && ldout[0]) + maybe_unlink (ldout); + signal (signo, SIG_DFL); kill (getpid (), signo); *************** *** 405,430 **** ! generic * xcalloc (size1, size2) int size1, size2; { ! generic *ptr = (generic *) calloc (size1, size2); if (ptr) return ptr; fatal ("out of memory"); ! return (generic *)0; } ! generic * xmalloc (size) ! int size; { ! generic *ptr = (generic *) malloc (size); if (ptr) return ptr; fatal ("out of memory"); ! return (generic *)0; } --- 458,501 ---- ! char * xcalloc (size1, size2) int size1, size2; { ! char *ptr = (char *) calloc (size1, size2); if (ptr) return ptr; fatal ("out of memory"); ! return (char *)0; } ! char * xmalloc (size) ! unsigned size; { ! char *ptr = (char *) malloc (size); if (ptr) return ptr; fatal ("out of memory"); ! return (char *)0; ! } ! ! char * ! xrealloc (ptr, size) ! char *ptr; ! unsigned size; ! { ! register char *value = (char *) realloc (ptr, size); ! if (value == 0) ! fatal ("virtual memory exhausted"); ! return value; ! } ! ! int ! file_exists (name) ! char *name; ! { ! return access (name, R_OK) == 0; } *************** *** 442,445 **** --- 513,573 ---- } + void + dump_file (name) + char *name; + { + FILE *stream = fopen (name, "r"); + int no_demangle = !! getenv ("COLLECT_NO_DEMANGLE"); + + if (stream == 0) + return; + while (1) + { + int c; + while (c = getc (stream), + c != EOF && (isalnum (c) || c == '_' || c == '$' || c == '.')) + obstack_1grow (&temporary_obstack, c); + if (obstack_object_size (&temporary_obstack) > 0) + { + char *word, *p, *result; + obstack_1grow (&temporary_obstack, '\0'); + word = obstack_finish (&temporary_obstack); + + if (*word == '.') + ++word, putc ('.', stderr); + p = word; + if (*p == '_' && prepends_underscore) + ++p; + + if (no_demangle) + result = 0; + else + result = cplus_demangle (p, DMGL_PARAMS | DMGL_ANSI); + + if (result) + { + int diff; + fputs (result, stderr); + + diff = strlen (word) - strlen (result); + while (diff > 0) + --diff, putc (' ', stderr); + while (diff < 0 && c == ' ') + ++diff, c = getc (stream); + + free (result); + } + else + fputs (word, stderr); + + fflush (stderr); + obstack_free (&temporary_obstack, temporary_firstobj); + } + if (c == EOF) + break; + putc (c, stderr); + } + } + /* Decide whether the given symbol is: a constructor (1), a destructor (2), or neither (0). */ *************** *** 468,471 **** --- 596,601 ---- { "GLOBAL_$D$", sizeof ("GLOBAL_$D$")-1, 2, 0 }, #endif + { "GLOBAL__FI_", sizeof ("GLOBAL__FI_")-1, 3, 0 }, + { "GLOBAL__FD_", sizeof ("GLOBAL__FD_")-1, 4, 0 }, #ifdef CFRONT_LOSSAGE /* Don't collect cfront initialization functions. cfront has its own linker procedure to collect them; *************** *** 741,774 **** if (p) ! { ! char *startp, *endp; ! char *nstore = (char *) xmalloc (strlen (p) + 3); ! startp = endp = p; ! while (1) { ! if (*endp == PATH_SEPARATOR || *endp == 0) { ! strncpy (nstore, startp, endp-startp); ! if (endp == startp) ! { ! strcpy (nstore, "./"); ! } ! else if (endp[-1] != '/') ! { ! nstore[endp-startp] = '/'; ! nstore[endp-startp+1] = 0; ! } ! else ! nstore[endp-startp] = 0; ! ! add_prefix (pprefix, nstore); ! if (*endp == 0) ! break; ! endp = startp = endp + 1; } else ! endp++; } } } --- 871,910 ---- if (p) ! prefix_from_string (p, pprefix); ! } ! ! static void ! prefix_from_string (p, pprefix) ! char *p; ! struct path_prefix *pprefix; ! { ! char *startp, *endp; ! char *nstore = (char *) xmalloc (strlen (p) + 3); ! startp = endp = p; ! while (1) ! { ! if (*endp == PATH_SEPARATOR || *endp == 0) { ! strncpy (nstore, startp, endp-startp); ! if (endp == startp) { ! strcpy (nstore, "./"); ! } ! else if (endp[-1] != '/') ! { ! nstore[endp-startp] = '/'; ! nstore[endp-startp+1] = 0; } else ! nstore[endp-startp] = 0; ! ! add_prefix (pprefix, nstore); ! if (*endp == 0) ! break; ! endp = startp = endp + 1; } + else + endp++; } } *************** *** 785,796 **** char *real_ld_suffix = "real-ld"; char *full_real_ld_suffix = real_ld_suffix; ! #if 0 ! char *gld_suffix = "gld"; ! char *full_gld_suffix = gld_suffix; ! #endif char *nm_suffix = "nm"; char *full_nm_suffix = nm_suffix; char *gnm_suffix = "gnm"; char *full_gnm_suffix = gnm_suffix; char *strip_suffix = "strip"; char *full_strip_suffix = strip_suffix; --- 921,933 ---- char *real_ld_suffix = "real-ld"; char *full_real_ld_suffix = real_ld_suffix; ! char *collect_ld_suffix = "collect-ld"; char *nm_suffix = "nm"; char *full_nm_suffix = nm_suffix; char *gnm_suffix = "gnm"; char *full_gnm_suffix = gnm_suffix; + #ifdef LDD_SUFFIX + char *ldd_suffix = LDD_SUFFIX; + char *full_ldd_suffix = ldd_suffix; + #endif char *strip_suffix = "strip"; char *full_strip_suffix = strip_suffix; *************** *** 798,804 **** char *full_gstrip_suffix = gstrip_suffix; char *arg; ! FILE *outf; char *ld_file_name; - char *c_file_name; char *collect_name; char *collect_names; --- 935,940 ---- char *full_gstrip_suffix = gstrip_suffix; char *arg; ! FILE *outf, *exportf; char *ld_file_name; char *collect_name; char *collect_names; *************** *** 806,813 **** char **c_argv; char **c_ptr; ! char **ld1_argv = (char **) xcalloc (sizeof (char *), argc+2); char **ld1 = ld1_argv; ! char **ld2_argv = (char **) xcalloc (sizeof (char *), argc+5); char **ld2 = ld2_argv; int first_file; int num_c_args = argc+7; --- 942,951 ---- char **c_argv; char **c_ptr; ! char **ld1_argv = (char **) xcalloc (sizeof (char *), argc+3); char **ld1 = ld1_argv; ! char **ld2_argv = (char **) xcalloc (sizeof (char *), argc+6); char **ld2 = ld2_argv; + char **object_lst = (char **) xcalloc (sizeof (char *), argc); + char **object = object_lst; int first_file; int num_c_args = argc+7; *************** *** 820,823 **** --- 958,966 ---- output_file = "a.out"; + obstack_begin (&temporary_obstack, 0); + obstack_begin (&permanent_obstack, 0); + temporary_firstobj = (char *) obstack_alloc (&temporary_obstack, 0); + current_demangling_style = gnu_demangling; + /* We must check that we do not call ourselves in an infinite recursion loop. We append the name used for us to the COLLECT_NAMES *************** *** 944,947 **** --- 1087,1098 ---- strcat (full_gnm_suffix, gnm_suffix); + #ifdef LDD_SUFFIX + full_ldd_suffix + = xcalloc (strlen (ldd_suffix) + strlen (target_machine) + 2, 1); + strcpy (full_ldd_suffix, target_machine); + strcat (full_ldd_suffix, "-"); + strcat (full_ldd_suffix, ldd_suffix); + #endif + full_strip_suffix = xcalloc (strlen (strip_suffix) + strlen (target_machine) + 2, 1); *************** *** 964,982 **** if (ld_file_name == 0) #endif ! #if 0 ! /* Search the (target-specific) compiler dirs for `gld'. */ ! ld_file_name = find_a_file (&cpath, gld_suffix); ! /* Search the ordinary system bin directories ! for `gld' (if native linking) or `TARGET-gld' (if cross). */ ! if (ld_file_name == 0) ! ld_file_name = find_a_file (&path, full_gld_suffix); ! #else ! ld_file_name = 0; ! #endif ! /* Likewise for `real-ld'. */ if (ld_file_name == 0) ! ld_file_name = find_a_file (&cpath, real_ld_suffix); ! if (ld_file_name == 0) ! ld_file_name = find_a_file (&path, full_real_ld_suffix); /* Search the compiler directories for `ld'. We have protection against recursive calls in find_a_file. */ --- 1115,1123 ---- if (ld_file_name == 0) #endif ! /* Search the (target-specific) compiler dirs for ld'. */ ! ld_file_name = find_a_file (&cpath, real_ld_suffix); ! /* Likewise for `collect-ld'. */ if (ld_file_name == 0) ! ld_file_name = find_a_file (&cpath, collect_ld_suffix); /* Search the compiler directories for `ld'. We have protection against recursive calls in find_a_file. */ *************** *** 1012,1015 **** --- 1153,1162 ---- nm_file_name = find_a_file (&path, full_nm_suffix); + #ifdef LDD_SUFFIX + ldd_file_name = find_a_file (&cpath, ldd_suffix); + if (ldd_file_name == 0) + ldd_file_name = find_a_file (&path, full_ldd_suffix); + #endif + #ifdef REAL_STRIP_FILE_NAME strip_file_name = find_a_file (&path, REAL_STRIP_FILE_NAME); *************** *** 1053,1058 **** --- 1200,1209 ---- c_file = xcalloc (temp_filename_length + sizeof (".c"), 1); o_file = xcalloc (temp_filename_length + sizeof (".o"), 1); + export_file = xmalloc (temp_filename_length + sizeof (".x")); + ldout = xmalloc (temp_filename_length + sizeof (".ld")); + sprintf (ldout, "%s.ld", temp_filename); sprintf (c_file, "%s.c", temp_filename); sprintf (o_file, "%s.o", temp_filename); + sprintf (export_file, "%s.x", temp_filename); *c_ptr++ = c_file_name; *c_ptr++ = "-c"; *************** *** 1089,1094 **** break; case 'o': ! output_file = (arg[2] == '\0') ? argv[1] : &arg[2]; break; --- 1240,1268 ---- break; + #ifdef COLLECT_EXPORT_LIST + case 'b': + if ((!strncmp (arg, "-bE:", 4) + || !strncmp (arg, "-bexport:", 9)) + && strcmp (arg, "-bexport:/usr/lib/libg.exp")) + auto_export = 0; + break; + #endif + + case 'l': + if (first_file) + { + /* place o_file BEFORE this argument! */ + first_file = 0; + ld2--; + *ld2++ = o_file; + *ld2++ = arg; + } + break; + case 'o': ! if (arg[2] == '\0') ! output_file = *ld1++ = *ld2++ = *++argv; ! else ! output_file = &arg[2]; break; *************** *** 1099,1103 **** case 's': ! if (arg[2] == '\0') { /* We must strip after the nm run, otherwise C++ linking --- 1273,1277 ---- case 's': ! if (arg[2] == '\0' && do_collecting) { /* We must strip after the nm run, otherwise C++ linking *************** *** 1115,1124 **** } } ! else if (first_file ! && (p = rindex (arg, '.')) != (char *)0 ! && strcmp (p, ".o") == 0) { ! first_file = 0; ! *ld2++ = o_file; } } --- 1289,1310 ---- } } ! else if ((p = rindex (arg, '.')) != (char *)0 ! && (strcmp (p, ".o") == 0 || strcmp (p, ".a") == 0)) { ! if (first_file) ! { ! first_file = 0; ! if (p[1] == 'o') ! *ld2++ = o_file; ! else ! { ! /* place o_file BEFORE this argument! */ ! ld2--; ! *ld2++ = o_file; ! *ld2++ = arg; ! } ! } ! if (p[1] == 'o') ! *object++ = arg; } } *************** *** 1133,1136 **** --- 1319,1324 ---- if (*p == '-' && (p[1] == 'm' || p[1] == 'f')) *c_ptr++ = savestring (p, q - p); + if (strncmp (p, "-shared", sizeof ("shared") - 1) == 0) + shared_obj = 1; if (*q) q++; *************** *** 1138,1143 **** } *c_ptr++ = c_file; ! *c_ptr = *ld1 = *ld2 = (char *)0; if (vflag) --- 1326,1351 ---- } + #ifdef COLLECT_EXPORT_LIST + /* The AIX linker will discard static constructors in object files if + nothing else in the file is referenced, so look at them first. */ + while (object_lst < object) + scan_prog_file (*object_lst++, PASS_OBJ); + + { + char *buf = alloca (strlen (export_file) + 5); + sprintf (buf, "-bE:%s", export_file); + *ld1++ = buf; + *ld2++ = buf; + exportf = fopen (export_file, "w"); + if (exportf == (FILE *)0) + fatal_perror ("%s", export_file); + write_export_file (exportf); + if (fclose (exportf)) + fatal_perror ("closing %s", export_file); + } + #endif + *c_ptr++ = c_file; ! *object = *c_ptr = *ld1 = (char *)0; if (vflag) *************** *** 1159,1162 **** --- 1367,1374 ---- fprintf (stderr, "nm_file_name = %s\n", (nm_file_name ? nm_file_name : "not found")); + #ifdef LDD_SUFFIX + fprintf (stderr, "ldd_file_name = %s\n", + (ldd_file_name ? ldd_file_name : "not found")); + #endif fprintf (stderr, "strip_file_name = %s\n", (strip_file_name ? strip_file_name : "not found")); *************** *** 1189,1205 **** } ! /* Load the program, searching all libraries. ! Examine the namelist with nm and search it for static constructors ! and destructors to call. ! Write the constructor and destructor tables to a .s file and reload. */ ! ! fork_execute ("ld", ld1_argv); ! /* If -r, don't build the constructor or destructor list, just return now. */ ! if (rflag) return 0; scan_prog_file (output_file, PASS_FIRST); if (debug) { --- 1401,1426 ---- } ! /* Load the program, searching all libraries. */ ! collect_execute ("ld", ld1_argv, ldout); ! do_wait ("ld"); ! dump_file (ldout); ! unlink (ldout); ! ! /* If -r or they'll be run via some other method, don't build the ! constructor or destructor list, just return now. */ ! if (rflag || ! do_collecting) return 0; + /* Examine the namelist with nm and search it for static constructors + and destructors to call. + Write the constructor and destructor tables to a .s file and reload. */ + scan_prog_file (output_file, PASS_FIRST); + #ifdef SCAN_LIBRARIES + scan_libraries (output_file); + #endif + if (debug) { *************** *** 1208,1212 **** } ! if (constructors.number == 0 && destructors.number == 0) { /* Strip now if it was requested on the command line. */ --- 1429,1440 ---- } ! if (constructors.number == 0 && destructors.number == 0 ! #ifdef LDD_SUFFIX ! /* If we will be running these functions ourselves, we want to emit ! stubs into the shared library so that we don't have to relink ! dependent programs when we add static objects. */ ! && ! shared_obj ! #endif ! ) { /* Strip now if it was requested on the command line. */ *************** *** 1232,1235 **** --- 1460,1488 ---- fatal_perror ("closing %s", c_file); + /* Tell the linker that we have initializer and finalizer functions. */ + #ifdef LD_INIT_SWITCH + *ld2++ = LD_INIT_SWITCH; + *ld2++ = initname; + *ld2++ = LD_FINI_SWITCH; + *ld2++ = fininame; + #endif + *ld2 = (char*)0; + + #ifdef COLLECT_EXPORT_LIST + if (shared_obj) + { + add_to_list (&exports, initname); + add_to_list (&exports, fininame); + add_to_list (&exports, "_GLOBAL__DI"); + add_to_list (&exports, "_GLOBAL__DD"); + exportf = fopen (export_file, "w"); + if (exportf == (FILE *)0) + fatal_perror ("%s", export_file); + write_export_file (exportf); + if (fclose (exportf)) + fatal_perror ("closing %s", export_file); + } + #endif + if (debug) { *************** *** 1238,1241 **** --- 1491,1499 ---- write_c_file (stderr, "stderr"); fprintf (stderr, "========== end of c_file\n\n"); + #ifdef COLLECT_EXPORT_LIST + fprintf (stderr, "\n========== export_file = %s\n", export_file); + write_export_file (stderr); + fprintf (stderr, "========== end of export_file\n\n"); + #endif } *************** *** 1252,1255 **** --- 1510,1514 ---- maybe_unlink (c_file); maybe_unlink (o_file); + maybe_unlink (export_file); return 0; } *************** *** 1258,1263 **** /* Wait for a process to finish, and exit if a non-zero status is found. */ ! static void ! do_wait (prog) char *prog; { --- 1517,1522 ---- /* Wait for a process to finish, and exit if a non-zero status is found. */ ! int ! collect_wait (prog) char *prog; { *************** *** 1283,1298 **** #endif ! my_exit (127); } if (WIFEXITED (status)) ! { ! int ret = WEXITSTATUS (status); ! if (ret != 0) ! { ! error ("%s returned %d exit status", prog, ret); ! my_exit (ret); ! } ! } } } --- 1542,1563 ---- #endif ! collect_exit (127); } if (WIFEXITED (status)) ! return WEXITSTATUS (status); ! } ! return 0; ! } ! ! static void ! do_wait (prog) ! char *prog; ! { ! int ret = collect_wait (prog); ! if (ret != 0) ! { ! error ("%s returned %d exit status", prog, ret); ! collect_exit (ret); } } *************** *** 1301,1308 **** /* Fork and execute a program, and wait for the reply. */ ! static void ! fork_execute (prog, argv) char *prog; char **argv; { int pid; --- 1566,1574 ---- /* Fork and execute a program, and wait for the reply. */ ! void ! collect_execute (prog, argv, redir) char *prog; char **argv; + char *redir; { int pid; *************** *** 1345,1355 **** if (pid == 0) /* child context */ { execvp (argv[0], argv); fatal_perror ("executing %s", prog); } do_wait (prog); } - /* Unlink a file unless we are debugging. */ --- 1611,1636 ---- if (pid == 0) /* child context */ { + if (redir) + { + unlink (redir); + if (freopen (redir, "a", stdout) == NULL) + fatal_perror ("redirecting stdout"); + if (freopen (redir, "a", stderr) == NULL) + fatal_perror ("redirecting stderr"); + } + execvp (argv[0], argv); fatal_perror ("executing %s", prog); } + } + static void + fork_execute (prog, argv) + char *prog; + char **argv; + { + collect_execute (prog, argv, NULL); do_wait (prog); } /* Unlink a file unless we are debugging. */ *************** *** 1430,1437 **** } /* Write the constructor/destructor tables. */ static void ! write_c_file (stream, name) FILE *stream; char *name; --- 1711,1816 ---- } + /* Write out the constructor and destructor tables statically (for a shared + object), along with the functions to execute them. */ + + static void + write_c_file_stat (stream, name) + FILE *stream; + char *name; + { + char *prefix, *p, *q; + + /* Figure out name of output_file, stripping off .so version. */ + p = rindex (output_file, '/'); + if (p == 0) + p = (char *) output_file; + else + p++; + q = p; + while (q) + { + q = index (q,'.'); + if (q == 0) + { + q = p + strlen (p); + break; + } + else + { + if (strncmp (q, ".so", 3) == 0) + { + q += 3; + break; + } + else + q++; + } + } + /* q points to null at end of the string (or . of the .so version) */ + prefix = xmalloc (q - p + 1); + strncpy (prefix, p, q - p); + prefix[q - p] = 0; + for (q = prefix; *q; q++) + if (!isalnum (*q)) + *q = '_'; + if (debug) + fprintf (stderr, "\nwrite_c_file - output name is %s, prefix is %s\n", + output_file, prefix); + + #define INIT_NAME_FORMAT "_GLOBAL__FI_%s" + initname = xmalloc (strlen (prefix) + sizeof (INIT_NAME_FORMAT) - 2); + sprintf (initname, INIT_NAME_FORMAT, prefix); + + #define FINI_NAME_FORMAT "_GLOBAL__FD_%s" + fininame = xmalloc (strlen (prefix) + sizeof (FINI_NAME_FORMAT) - 2); + sprintf (fininame, FINI_NAME_FORMAT, prefix); + + free (prefix); + + /* Write the tables as C code */ + + fprintf (stream, "static int count;\n"); + fprintf (stream, "typedef void entry_pt();\n"); + write_list_with_asm (stream, "extern entry_pt ", constructors.first); + fprintf (stream, "void %s() {\n", initname); + if (constructors.number > 0) + { + fprintf (stream, "\tstatic entry_pt *ctors[] = {\n"); + write_list (stream, "\t\t", constructors.first); + fprintf (stream, "\t};\n"); + fprintf (stream, "\tentry_pt **p;\n"); + fprintf (stream, "\tif (count++ != 0) return;\n"); + fprintf (stream, "\tp = ctors + %d;\n", constructors.number); + fprintf (stream, "\twhile (p > ctors) (*--p)();\n"); + } + else + fprintf (stream, "\t++count;\n"); + fprintf (stream, "}\n"); + write_list_with_asm (stream, "extern entry_pt ", destructors.first); + fprintf (stream, "void %s() {\n", fininame); + if (destructors.number > 0) + { + fprintf (stream, "\tstatic entry_pt *dtors[] = {\n"); + write_list (stream, "\t\t", destructors.first); + fprintf (stream, "\t};\n"); + fprintf (stream, "\tentry_pt **p;\n"); + fprintf (stream, "\tif (--count != 0) return;\n"); + fprintf (stream, "\tp = dtors;\n"); + fprintf (stream, "\twhile (p < dtors + %d) (*p++)();\n", + destructors.number); + } + fprintf (stream, "}\n"); + + if (shared_obj) + { + fprintf (stream, "void _GLOBAL__DI() {\n\t%s();\n}\n", initname); + fprintf (stream, "void _GLOBAL__DD() {\n\t%s();\n}\n", fininame); + } + } + /* Write the constructor/destructor tables. */ static void ! write_c_file_glob (stream, name) FILE *stream; char *name; *************** *** 1459,1462 **** --- 1838,1862 ---- } + static void + write_c_file (stream, name) + FILE *stream; + char *name; + { + #ifndef LD_INIT_SWITCH + if (! shared_obj) + write_c_file_glob (stream, name); + else + #endif + write_c_file_stat (stream, name); + } + + static void + write_export_file (stream) + FILE *stream; + { + struct id *list = exports.first; + for (; list; list = list->next) + fprintf (stream, "%s\n", list->name); + } #ifdef OBJECT_FORMAT_NONE *************** *** 1485,1489 **** FILE *inf; ! if (which_pass != PASS_FIRST) return; --- 1885,1889 ---- FILE *inf; ! if (which_pass == PASS_SECOND) return; *************** *** 1492,1496 **** fatal ("cannot find `nm'"); ! nm_argv[argc++] = "nm"; if (NM_FLAGS[0] != '\0') nm_argv[argc++] = NM_FLAGS; --- 1892,1896 ---- fatal ("cannot find `nm'"); ! nm_argv[argc++] = nm_file_name; if (NM_FLAGS[0] != '\0') nm_argv[argc++] = NM_FLAGS; *************** *** 1512,1517 **** char *str; ! fprintf (stderr, "%s", nm_file_name); ! for (p_argv = &nm_argv[1]; (str = *p_argv) != (char *)0; p_argv++) fprintf (stderr, " %s", str); --- 1912,1916 ---- char *str; ! for (p_argv = &nm_argv[0]; (str = *p_argv) != (char *)0; p_argv++) fprintf (stderr, " %s", str); *************** *** 1571,1577 **** for (p = buf; (ch = *p) != '\0' && ch != '\n' && ch != '_'; p++) ! ; ! if (ch == '\0' || ch == '\n') continue; --- 1970,1977 ---- for (p = buf; (ch = *p) != '\0' && ch != '\n' && ch != '_'; p++) ! if (ch == ' ' && p[1] == 'U' && p[2] == ' ') ! break; ! if (ch != '_') continue; *************** *** 1588,1596 **** { case 1: ! add_to_list (&constructors, name); break; case 2: add_to_list (&destructors, name); break; --- 1988,2014 ---- { case 1: ! if (which_pass != PASS_LIB) ! add_to_list (&constructors, name); break; case 2: + if (which_pass != PASS_LIB) + add_to_list (&destructors, name); + break; + + case 3: + if (which_pass != PASS_LIB) + fatal ("init function found in object %s", prog_name); + #ifndef LD_INIT_SWITCH + add_to_list (&constructors, name); + #endif + break; + + case 4: + if (which_pass != PASS_LIB) + fatal ("fini function found in object %s", prog_name); + #ifndef LD_FINI_SWITCH add_to_list (&destructors, name); + #endif break; *************** *** 1617,1620 **** --- 2035,2430 ---- } + #if SUNOS4_SHARED_LIBRARIES + + /* Routines to scan the SunOS 4 _DYNAMIC structure to find shared libraries + that the output file depends upon and their initialization/finalization + routines, if any. */ + + #include + #include + #include + #include + #include + #include + #include + + /* pointers to the object file */ + unsigned object; /* address of memory mapped file */ + unsigned objsize; /* size of memory mapped to file */ + char * code; /* pointer to code segment */ + char * data; /* pointer to data segment */ + struct nlist *symtab; /* pointer to symbol table */ + struct link_dynamic *ld; + struct link_dynamic_2 *ld_2; + struct head libraries; + + /* Map the file indicated by NAME into memory and store its address. */ + + static void + mapfile (name) + char *name; + { + int fp; + struct stat s; + if ((fp = open (name, O_RDONLY)) == -1) + fatal ("unable to open file '%s'", name); + if (fstat (fp, &s) == -1) + fatal ("unable to stat file '%s'", name); + + objsize = s.st_size; + object = (unsigned) mmap (0, objsize, PROT_READ|PROT_WRITE, MAP_PRIVATE, + fp, 0); + if (object == -1) + fatal ("unable to mmap file '%s'", name); + + close (fp); + } + + /* Helpers for locatelib. */ + + static char *libname; + + static int + libselect (d) + struct direct *d; + { + return (strncmp (libname, d->d_name, strlen (libname)) == 0); + } + + static int + libcompare (d1, d2) + struct direct **d1, **d2; + { + int i1, i2 = strlen (libname); + char *e1 = (*d1)->d_name + i2; + char *e2 = (*d2)->d_name + i2; + + while (*e1 && *e2) + { + ++e1; + ++e2; + i1 = strtol (e1, &e1, 10); + i2 = strtol (e2, &e2, 10); + if (i1 != i2) + return i1 - i2; + } + + if (*e1) + return 1; + else if (*e2) + return -1; + else + return 0; + } + + /* Given the name NAME of a dynamic dependency, find its pathname and add + it to the list of libraries. */ + + static void + locatelib (name) + char *name; + { + static char **l; + static int cnt; + char buf[MAXPATHLEN]; + char *p, *q; + char **pp; + + if (l == 0) + { + char *ld_rules; + char *ldr = 0; + /* counting elements in array, need 1 extra for null */ + cnt = 1; + ld_rules = (char *) (ld_2->ld_rules + code); + if (ld_rules) + { + cnt++; + for (; *ld_rules != 0; ld_rules++) + if (*ld_rules == ':') + cnt++; + ld_rules = (char *) (ld_2->ld_rules + code); + ldr = (char *) malloc (strlen (ld_rules) + 1); + strcpy (ldr, ld_rules); + } + p = getenv ("LD_LIBRARY_PATH"); + q = 0; + if (p) + { + cnt++; + for (q = p ; *q != 0; q++) + if (*q == ':') + cnt++; + q = (char *) malloc (strlen (p) + 1); + strcpy (q, p); + } + l = (char **) malloc ((cnt + 3) * sizeof (char *)); + pp = l; + if (ldr) + { + *pp++ = ldr; + for (; *ldr != 0; ldr++) + if (*ldr == ':') + { + *ldr++ = 0; + *pp++ = ldr; + } + } + if (q) + { + *pp++ = q; + for (; *q != 0; q++) + if (*q == ':') + { + *q++ = 0; + *pp++ = p; + } + } + /* built in directories are /lib, /usr/lib, and /usr/local/lib */ + *pp++ = "/lib"; + *pp++ = "/usr/lib"; + *pp++ = "/usr/local/lib"; + *pp = 0; + } + libname = name; + for (pp = l; *pp != 0 ; pp++) + { + struct direct **namelist; + int entries; + if ((entries = scandir (*pp, &namelist, libselect, libcompare)) > 0) + { + sprintf (buf, "%s/%s", *pp, namelist[entries - 1]->d_name); + add_to_list (&libraries, buf); + if (debug) + fprintf (stderr, "%s\n", buf); + break; + } + } + if (*pp == 0) + { + if (debug) + fprintf (stderr, "not found\n"); + else + fatal ("dynamic dependency %s not found", name); + } + } + + /* Scan the _DYNAMIC structure of the output file to find shared libraries + that it depends upon and any constructors or destructors they contain. */ + + static void + scan_libraries (prog_name) + char *prog_name; + { + struct exec *header; + char *base; + struct link_object *lo; + char buff[MAXPATHLEN]; + struct id *list; + + mapfile (prog_name); + header = (struct exec *)object; + if (N_BADMAG (*header)) + fatal ("bad magic number in file '%s'", prog_name); + if (header->a_dynamic == 0) + return; + + code = (char *) (N_TXTOFF (*header) + (long) header); + data = (char *) (N_DATOFF (*header) + (long) header); + symtab = (struct nlist *) (N_SYMOFF (*header) + (long) header); + + if (header->a_magic == ZMAGIC && header->a_entry == 0x20) + { + /* shared object */ + ld = (struct link_dynamic *) (symtab->n_value + code); + base = code; + } + else + { + /* executable */ + ld = (struct link_dynamic *) data; + base = code-PAGSIZ; + } + + if (debug) + fprintf (stderr, "dynamic dependencies.\n"); + + ld_2 = (struct link_dynamic_2 *) ((long) ld->ld_un.ld_2 + (long)base); + for (lo = (struct link_object *) ld_2->ld_need; lo; + lo = (struct link_object *) lo->lo_next) + { + char *name; + lo = (struct link_object *) ((long) lo + code); + name = (char *) (code + lo->lo_name); + if (lo->lo_library) + { + if (debug) + fprintf (stderr, "\t-l%s.%d => ", name, lo->lo_major); + sprintf (buff, "lib%s.so.%d.%d", name, lo->lo_major, lo->lo_minor); + locatelib (buff); + } + else + { + if (debug) + fprintf (stderr, "\t%s\n", name); + add_to_list (&libraries, name); + } + } + + if (debug) + fprintf (stderr, "\n"); + + /* now iterate through the library list adding their symbols to + the list. */ + for (list = libraries.first; list; list = list->next) + scan_prog_file (list->name, PASS_LIB); + } + + #else /* SUNOS4_SHARED_LIBRARIES */ + #ifdef LDD_SUFFIX + + /* Use the List Dynamic Dependencies program to find shared libraries that + the output file depends upon and their initialization/finalization + routines, if any. */ + + static void + scan_libraries (prog_name) + char *prog_name; + { + static struct head libraries; /* list of shared libraries found */ + struct id *list; + void (*int_handler) (); + void (*quit_handler) (); + char *ldd_argv[4]; + int pid; + int argc = 0; + int pipe_fd[2]; + char buf[1024]; + FILE *inf; + + /* If we don't have an `ldd', complain. */ + if (ldd_file_name == 0) + { + error ("cannot find `ldd'"); + return; + } + + ldd_argv[argc++] = ldd_file_name; + ldd_argv[argc++] = prog_name; + ldd_argv[argc++] = (char *) 0; + + if (pipe (pipe_fd) < 0) + fatal_perror ("pipe"); + + inf = fdopen (pipe_fd[0], "r"); + if (inf == (FILE *) 0) + fatal_perror ("fdopen"); + + /* Trace if needed. */ + if (vflag) + { + char **p_argv; + char *str; + + for (p_argv = &ldd_argv[0]; (str = *p_argv) != (char *) 0; p_argv++) + fprintf (stderr, " %s", str); + + fprintf (stderr, "\n"); + } + + fflush (stdout); + fflush (stderr); + + /* Spawn child ldd on pipe */ + pid = vfork (); + if (pid == -1) + { + #ifdef vfork + fatal_perror ("fork"); + #else + fatal_perror ("vfork"); + #endif + } + + if (pid == 0) /* child context */ + { + /* setup stdout */ + if (dup2 (pipe_fd[1], 1) < 0) + fatal_perror ("dup2 (%d, 1)", pipe_fd[1]); + + if (close (pipe_fd[0]) < 0) + fatal_perror ("close (%d)", pipe_fd[0]); + + if (close (pipe_fd[1]) < 0) + fatal_perror ("close (%d)", pipe_fd[1]); + + execv (ldd_file_name, ldd_argv); + fatal_perror ("executing %s", ldd_file_name); + } + + /* Parent context from here on. */ + int_handler = (void (*) ()) signal (SIGINT, SIG_IGN); + #ifdef SIGQUIT + quit_handler = (void (*) ()) signal (SIGQUIT, SIG_IGN); + #endif + + if (close (pipe_fd[1]) < 0) + fatal_perror ("close (%d)", pipe_fd[1]); + + if (debug) + fprintf (stderr, "\nldd output with constructors/destructors.\n"); + + /* Read each line of ldd output. */ + while (fgets (buf, sizeof buf, inf) != (char *) 0) + { + int ch, ch2; + char *name, *end, *p = buf; + + /* Extract names of libraries and add to list. */ + PARSE_LDD_OUTPUT (p); + if (p == 0) + continue; + + name = p; + if (strncmp (name, "not found", sizeof ("not found") - 1) == 0) + fatal ("dynamic dependency %s not found", buf); + + /* Find the end of the symbol name. */ + for (end = p; + (ch2 = *end) != '\0' && ch2 != '\n' && !isspace (ch2) && ch2 != '|'; + end++) + continue; + *end = '\0'; + + if (access (name, R_OK) == 0) + add_to_list (&libraries, name); + else + fatal ("unable to open dynamic dependency '%s'", buf); + + if (debug) + fprintf (stderr, "\t%s\n", buf); + } + if (debug) + fprintf (stderr, "\n"); + + if (fclose (inf) != 0) + fatal_perror ("fclose of pipe"); + + do_wait (ldd_file_name); + + signal (SIGINT, int_handler); + #ifdef SIGQUIT + signal (SIGQUIT, quit_handler); + #endif + + /* now iterate through the library list adding their symbols to + the list. */ + for (list = libraries.first; list; list = list->next) + scan_prog_file (list->name, PASS_LIB); + } + + #endif /* LDD_SUFFIX */ + #endif /* SUNOS4_SHARED_LIBRARIES */ + #endif /* OBJECT_FORMAT_NONE */ *************** *** 1664,1668 **** int sym_index, sym_count; ! if (which_pass != PASS_FIRST) return; --- 2474,2478 ---- int sym_index, sym_count; ! if (which_pass != PASS_FIRST && which_pass != PASS_OBJ) return; *************** *** 1692,1699 **** continue; /* should never happen */ ! #ifdef _AIX ! /* All AIX function names begin with a dot. */ ! if (*name++ != '.') ! continue; #endif --- 2502,2510 ---- continue; /* should never happen */ ! #ifdef XCOFF_DEBUGGING_INFO ! /* All AIX function names have a duplicate entry beginning ! with a dot. */ ! if (*name == '.') ! ++name; #endif *************** *** 1702,1712 **** --- 2513,2529 ---- case 1: add_to_list (&constructors, name); + if (which_pass == PASS_OBJ) + add_to_list (&exports, name); break; case 2: add_to_list (&destructors, name); + if (which_pass == PASS_OBJ) + add_to_list (&exports, name); break; default: /* not a constructor or destructor */ + if (which_pass == PASS_OBJ && auto_export) + add_to_list (&exports, name); continue; } *************** *** 2394,2401 **** } ! free ((generic *)ptr->start); } ! free ((generic *)ptr); } --- 3211,3218 ---- } ! free (ptr->start); } ! free (ptr); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/combine.c gcc-2.7.0/combine.c *** gcc-2.6.3/combine.c Wed Nov 30 19:13:30 1994 --- gcc-2.7.0/combine.c Thu Jun 15 07:18:33 1995 *************** *** 1,4 **** /* Optimize by combining instructions for GNU compiler. ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Optimize by combining instructions for GNU compiler. ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 121,125 **** static int total_attempts, total_merges, total_extras, total_successes; ! /* Define a defulat value for REVERSIBLE_CC_MODE. We can never assume that a condition code mode is safe to reverse unless the md tells us so. */ --- 122,126 ---- static int total_attempts, total_merges, total_extras, total_successes; ! /* Define a default value for REVERSIBLE_CC_MODE. We can never assume that a condition code mode is safe to reverse unless the md tells us so. */ *************** *** 136,143 **** static int *uid_cuid; /* Get the cuid of an insn. */ ! #define INSN_CUID(INSN) (uid_cuid[INSN_UID (INSN)]) /* Maximum register number, which is the size of the tables below. */ --- 137,147 ---- static int *uid_cuid; + static int max_uid_cuid; /* Get the cuid of an insn. */ ! #define INSN_CUID(INSN) (INSN_UID (INSN) > max_uid_cuid \ ! ? (abort(), 0) \ ! : uid_cuid[INSN_UID (INSN)]) /* Maximum register number, which is the size of the tables below. */ *************** *** 171,174 **** --- 175,183 ---- static rtx subst_insn; + /* This is an insn that belongs before subst_insn, but is not currently + on the insn chain. */ + + static rtx subst_prev_insn; + /* This is the lowest CUID that `subst' is currently dealing with. get_last_value will not return a value if the register was set at or *************** *** 413,417 **** static rtx simplify_shift_const PROTO((rtx, enum rtx_code, enum machine_mode, rtx, int)); ! static int recog_for_combine PROTO((rtx *, rtx, rtx *)); static rtx gen_lowpart_for_combine PROTO((enum machine_mode, rtx)); static rtx gen_rtx_combine PVPROTO((enum rtx_code code, enum machine_mode mode, --- 422,426 ---- static rtx simplify_shift_const PROTO((rtx, enum rtx_code, enum machine_mode, rtx, int)); ! static int recog_for_combine PROTO((rtx *, rtx, rtx *, int *)); static rtx gen_lowpart_for_combine PROTO((enum machine_mode, rtx)); static rtx gen_rtx_combine PVPROTO((enum rtx_code code, enum machine_mode mode, *************** *** 489,492 **** --- 498,502 ---- uid_cuid = (int *) alloca ((i + 1) * sizeof (int)); + max_uid_cuid = i; nonzero_bits_mode = mode_for_size (HOST_BITS_PER_WIDE_INT, MODE_INT, 0); *************** *** 510,518 **** label_tick = 1; setup_incoming_promotions (); for (insn = f, i = 0; insn; insn = NEXT_INSN (insn)) { ! INSN_CUID (insn) = ++i; subst_low_cuid = i; subst_insn = insn; --- 520,532 ---- label_tick = 1; + /* We need to initialize it here, because record_dead_and_set_regs may call + get_last_value. */ + subst_prev_insn = NULL_RTX; + setup_incoming_promotions (); for (insn = f, i = 0; insn; insn = NEXT_INSN (insn)) { ! uid_cuid[INSN_UID (insn)] = ++i; subst_low_cuid = i; subst_insn = insn; *************** *** 1205,1208 **** --- 1219,1224 ---- /* Notes that I1, I2 or I3 is a MULT operation. */ int have_mult = 0; + /* Number of clobbers of SCRATCH we had to add. */ + int i3_scratches = 0, i2_scratches = 0, other_scratches = 0; int maxreg; *************** *** 1355,1360 **** as I2 will not cause a problem. */ ! i1 = gen_rtx (INSN, VOIDmode, INSN_UID (i2), 0, i2, ! XVECEXP (PATTERN (i2), 0, 1), -1, 0, 0); SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 0)); --- 1371,1377 ---- as I2 will not cause a problem. */ ! subst_prev_insn = i1 ! = gen_rtx (INSN, VOIDmode, INSN_UID (i2), 0, i2, ! XVECEXP (PATTERN (i2), 0, 1), -1, 0, 0); SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 0)); *************** *** 1672,1676 **** /* Is the result of combination a valid instruction? */ ! insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); /* If the result isn't valid, see if it is a PARALLEL of two SETs where --- 1689,1694 ---- /* Is the result of combination a valid instruction? */ ! insn_code_number ! = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); /* If the result isn't valid, see if it is a PARALLEL of two SETs where *************** *** 1693,1697 **** { newpat = XVECEXP (newpat, 0, 0); ! insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } --- 1711,1716 ---- { newpat = XVECEXP (newpat, 0, 0); ! insn_code_number ! = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); } *************** *** 1706,1710 **** { newpat = XVECEXP (newpat, 0, 1); ! insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } --- 1725,1730 ---- { newpat = XVECEXP (newpat, 0, 1); ! insn_code_number ! = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); } *************** *** 1775,1779 **** SUBST (regno_reg_rtx[REGNO (i2dest)], ni2dest); ! i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); /* If I2 or I3 has multiple SETs, we won't know how to track --- 1795,1800 ---- SUBST (regno_reg_rtx[REGNO (i2dest)], ni2dest); ! i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes, ! &i2_scratches); /* If I2 or I3 has multiple SETs, we won't know how to track *************** *** 1781,1787 **** if (i2_code_number >= 0 && i2set && i3set) ! insn_code_number = recog_for_combine (&newi3pat, i3, ! &new_i3_notes); ! if (insn_code_number >= 0) newpat = newi3pat; --- 1802,1807 ---- if (i2_code_number >= 0 && i2set && i3set) ! insn_code_number = recog_for_combine (&newi3pat, i3, &new_i3_notes, ! &i3_scratches); if (insn_code_number >= 0) newpat = newi3pat; *************** *** 1854,1863 **** newi2pat = gen_rtx_combine (SET, VOIDmode, newdest, *split); SUBST (*split, newdest); ! i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); /* If the split point was a MULT and we didn't have one before, don't use one now. */ if (i2_code_number >= 0 && ! (split_code == MULT && ! have_mult)) ! insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } } --- 1874,1885 ---- newi2pat = gen_rtx_combine (SET, VOIDmode, newdest, *split); SUBST (*split, newdest); ! i2_code_number ! = recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches); /* If the split point was a MULT and we didn't have one before, don't use one now. */ if (i2_code_number >= 0 && ! (split_code == MULT && ! have_mult)) ! insn_code_number ! = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); } } *************** *** 1913,1919 **** SUBST (SET_SRC (newpat), gen_lowpart_for_combine (GET_MODE (SET_SRC (newpat)), ni2dest)); ! i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); if (i2_code_number >= 0) ! insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); if (insn_code_number >= 0) --- 1935,1944 ---- SUBST (SET_SRC (newpat), gen_lowpart_for_combine (GET_MODE (SET_SRC (newpat)), ni2dest)); ! i2_code_number ! = recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches); ! if (i2_code_number >= 0) ! insn_code_number ! = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); if (insn_code_number >= 0) *************** *** 1989,1995 **** newpat = XVECEXP (newpat, 0, 0); ! i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); if (i2_code_number >= 0) ! insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } --- 2014,2023 ---- newpat = XVECEXP (newpat, 0, 0); ! i2_code_number ! = recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches); ! if (i2_code_number >= 0) ! insn_code_number ! = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); } *************** *** 2013,2018 **** CLEAR_HARD_REG_SET (newpat_used_regs); ! other_code_number = recog_for_combine (&other_pat, undobuf.other_insn, ! &new_other_notes); if (other_code_number < 0 && ! check_asm_operands (other_pat)) --- 2041,2047 ---- CLEAR_HARD_REG_SET (newpat_used_regs); ! other_code_number ! = recog_for_combine (&other_pat, undobuf.other_insn, ! &new_other_notes, &other_scratches); if (other_code_number < 0 && ! check_asm_operands (other_pat)) *************** *** 2316,2319 **** --- 2345,2354 ---- note_stores (newi2pat, set_nonzero_bits_and_sign_copies); + /* If we added any (clobber (scratch)), add them to the max for a + block. This is a very pessimistic calculation, since we might + have had them already and this might not be the worst block, but + it's not worth doing any better. */ + max_scratch += i3_scratches + i2_scratches + other_scratches; + /* If I3 is now an unconditional jump, ensure that it has a BARRIER following it since it may have initially been a *************** *** 2328,2331 **** --- 2363,2370 ---- combine_successes++; + /* Clear this here, so that subsequent get_last_value calls are not + affected. */ + subst_prev_insn = NULL_RTX; + if (added_links_insn && (newi2pat == 0 || INSN_CUID (added_links_insn) < INSN_CUID (i2)) *************** *** 2355,2358 **** --- 2394,2401 ---- obfree (undobuf.storage); undobuf.num_undo = 0; + + /* Clear this here, so that subsequent get_last_value calls are not + affected. */ + subst_prev_insn = NULL_RTX; } *************** *** 2405,2409 **** address is not valid, perhaps will can split it up using the machine-specific way to split large constants. We use ! the first psuedo-reg (one of the virtual regs) as a placeholder; it will not remain in the result. */ if (GET_CODE (XEXP (x, 0)) == PLUS --- 2448,2452 ---- address is not valid, perhaps will can split it up using the machine-specific way to split large constants. We use ! the first pseudo-reg (one of the virtual regs) as a placeholder; it will not remain in the result. */ if (GET_CODE (XEXP (x, 0)) == PLUS *************** *** 2509,2515 **** unsigned HOST_WIDE_INT mask = ((HOST_WIDE_INT) 1 << len) - 1; ! #if BITS_BIG_ENDIAN ! pos = GET_MODE_BITSIZE (mode) - len - pos; ! #endif if (src == mask) --- 2552,2557 ---- unsigned HOST_WIDE_INT mask = ((HOST_WIDE_INT) 1 << len) - 1; ! if (BITS_BIG_ENDIAN) ! pos = GET_MODE_BITSIZE (mode) - len - pos; if (src == mask) *************** *** 2580,2586 **** pos = INTVAL (XEXP (SET_SRC (x), 2)); ! #if BITS_BIG_ENDIAN ! pos = GET_MODE_BITSIZE (GET_MODE (inner)) - len - pos; ! #endif unsignedp = (code == ZERO_EXTRACT); } --- 2622,2627 ---- pos = INTVAL (XEXP (SET_SRC (x), 2)); ! if (BITS_BIG_ENDIAN) ! pos = GET_MODE_BITSIZE (GET_MODE (inner)) - len - pos; unsignedp = (code == ZERO_EXTRACT); } *************** *** 3166,3175 **** return gen_rtx (CLOBBER, mode, const0_rtx); ! #if BYTES_BIG_ENDIAN ! if (GET_MODE_SIZE (mode) < UNITS_PER_WORD) ! endian_offset += UNITS_PER_WORD - GET_MODE_SIZE (mode); ! if (GET_MODE_SIZE (GET_MODE (inner)) < UNITS_PER_WORD) ! endian_offset -= UNITS_PER_WORD - GET_MODE_SIZE (GET_MODE (inner)); ! #endif /* Note if the plus_constant doesn't make a valid address then this combination won't be accepted. */ --- 3207,3218 ---- return gen_rtx (CLOBBER, mode, const0_rtx); ! if (BYTES_BIG_ENDIAN) ! { ! if (GET_MODE_SIZE (mode) < UNITS_PER_WORD) ! endian_offset += UNITS_PER_WORD - GET_MODE_SIZE (mode); ! if (GET_MODE_SIZE (GET_MODE (inner)) < UNITS_PER_WORD) ! endian_offset -= (UNITS_PER_WORD ! - GET_MODE_SIZE (GET_MODE (inner))); ! } /* Note if the plus_constant doesn't make a valid address then this combination won't be accepted. */ *************** *** 3247,3254 **** if (CONSTANT_P (SUBREG_REG (x)) && subreg_lowpart_p (x) && GET_MODE_SIZE (mode) < GET_MODE_SIZE (op0_mode) ! #if WORDS_BIG_ENDIAN ! && GET_MODE_BITSIZE (op0_mode) <= BITS_PER_WORD ! #endif ! ) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); --- 3290,3295 ---- if (CONSTANT_P (SUBREG_REG (x)) && subreg_lowpart_p (x) && GET_MODE_SIZE (mode) < GET_MODE_SIZE (op0_mode) ! && (! WORDS_BIG_ENDIAN ! || GET_MODE_BITSIZE (op0_mode) <= BITS_PER_WORD)) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); *************** *** 3440,3443 **** --- 3481,3491 ---- break; + case TRUNCATE: + if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) + SUBST (XEXP (x, 0), + force_to_mode (XEXP (x, 0), GET_MODE (XEXP (x, 0)), + GET_MODE_MASK (mode), NULL_RTX, 0)); + break; + case FLOAT_TRUNCATE: /* (float_truncate:SF (float_extend:DF foo:SF)) = foo:SF. */ *************** *** 3995,3999 **** /* Look for MIN or MAX. */ ! if ((! FLOAT_MODE_P (mode) | flag_fast_math) && comparison_p && rtx_equal_p (XEXP (cond, 0), true) --- 4043,4047 ---- /* Look for MIN or MAX. */ ! if ((! FLOAT_MODE_P (mode) || flag_fast_math) && comparison_p && rtx_equal_p (XEXP (cond, 0), true) *************** *** 4260,4265 **** { rtx pat = PATTERN (other_insn), note = 0; ! if ((recog_for_combine (&pat, other_insn, ¬e) < 0 && ! check_asm_operands (pat))) { --- 4308,4314 ---- { rtx pat = PATTERN (other_insn), note = 0; + int scratches; ! if ((recog_for_combine (&pat, other_insn, ¬e, &scratches) < 0 && ! check_asm_operands (pat))) { *************** *** 4333,4336 **** --- 4382,4393 ---- < GET_MODE_SIZE (GET_MODE (SUBREG_REG (src)))) #endif + #ifdef CLASS_CANNOT_CHANGE_SIZE + && ! (GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER + && (TEST_HARD_REG_BIT + (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE], + REGNO (dest))) + && (GET_MODE_SIZE (GET_MODE (src)) + != GET_MODE_SIZE (GET_MODE (SUBREG_REG (src))))) + #endif && (GET_CODE (dest) == REG || (GET_CODE (dest) == SUBREG *************** *** 4373,4383 **** if (GET_CODE (dest) != PC && GET_CODE (src) == IF_THEN_ELSE - #ifdef HAVE_conditional_move - && ! HAVE_conditional_move - #endif && GET_MODE_CLASS (GET_MODE (src)) == MODE_INT && (GET_CODE (XEXP (src, 0)) == EQ || GET_CODE (XEXP (src, 0)) == NE) && XEXP (XEXP (src, 0), 1) == const0_rtx && GET_MODE (src) == GET_MODE (XEXP (XEXP (src, 0), 0)) && (num_sign_bit_copies (XEXP (XEXP (src, 0), 0), GET_MODE (XEXP (XEXP (src, 0), 0))) --- 4430,4440 ---- if (GET_CODE (dest) != PC && GET_CODE (src) == IF_THEN_ELSE && GET_MODE_CLASS (GET_MODE (src)) == MODE_INT && (GET_CODE (XEXP (src, 0)) == EQ || GET_CODE (XEXP (src, 0)) == NE) && XEXP (XEXP (src, 0), 1) == const0_rtx && GET_MODE (src) == GET_MODE (XEXP (XEXP (src, 0), 0)) + #ifdef HAVE_conditional_move + && ! can_conditionally_move_p (GET_MODE (src)) + #endif && (num_sign_bit_copies (XEXP (XEXP (src, 0), 0), GET_MODE (XEXP (XEXP (src, 0), 0))) *************** *** 4488,4491 **** --- 4545,4552 ---- if (GET_CODE (x) != AND) return x; + + if (GET_RTX_CLASS (GET_CODE (x)) == 'c' + || GET_RTX_CLASS (GET_CODE (x)) == '2') + op0 = XEXP (x, 0), op1 = XEXP (x, 1); } *************** *** 4778,4784 **** SUBST (XEXP (x, 0), gen_rtx (USE, GET_MODE (x), XEXP (x, 0))); ! #if BITS_BIG_ENDIAN ! pos = GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - len - pos; ! #endif break; --- 4839,4845 ---- SUBST (XEXP (x, 0), gen_rtx (USE, GET_MODE (x), XEXP (x, 0))); ! if (BITS_BIG_ENDIAN) ! pos = GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - len - pos; ! break; *************** *** 4872,4891 **** inner = gen_rtx (USE, GET_MODE (SET_DEST (x)), inner); ! #if BITS_BIG_ENDIAN ! if (GET_CODE (pos) == CONST_INT) ! pos = GEN_INT (GET_MODE_BITSIZE (GET_MODE (inner)) - len ! - INTVAL (pos)); ! else if (GET_CODE (pos) == MINUS ! && GET_CODE (XEXP (pos, 1)) == CONST_INT ! && (INTVAL (XEXP (pos, 1)) ! == GET_MODE_BITSIZE (GET_MODE (inner)) - len)) ! /* If position is ADJUST - X, new position is X. */ ! pos = XEXP (pos, 0); ! else ! pos = gen_binary (MINUS, GET_MODE (pos), ! GEN_INT (GET_MODE_BITSIZE (GET_MODE (inner)) ! - len), ! pos); ! #endif } --- 4933,4953 ---- inner = gen_rtx (USE, GET_MODE (SET_DEST (x)), inner); ! if (BITS_BIG_ENDIAN) ! { ! if (GET_CODE (pos) == CONST_INT) ! pos = GEN_INT (GET_MODE_BITSIZE (GET_MODE (inner)) - len ! - INTVAL (pos)); ! else if (GET_CODE (pos) == MINUS ! && GET_CODE (XEXP (pos, 1)) == CONST_INT ! && (INTVAL (XEXP (pos, 1)) ! == GET_MODE_BITSIZE (GET_MODE (inner)) - len)) ! /* If position is ADJUST - X, new position is X. */ ! pos = XEXP (pos, 0); ! else ! pos = gen_binary (MINUS, GET_MODE (pos), ! GEN_INT (GET_MODE_BITSIZE (GET_MODE (inner)) ! - len), ! pos); ! } } *************** *** 5170,5187 **** orig_pos = pos; ! #if BITS_BIG_ENDIAN ! /* If position is constant, compute new position. Otherwise, build ! subtraction. */ ! if (pos_rtx == 0) ! pos = (MAX (GET_MODE_BITSIZE (is_mode), GET_MODE_BITSIZE (wanted_mem_mode)) ! - len - pos); ! else ! pos_rtx ! = gen_rtx_combine (MINUS, GET_MODE (pos_rtx), ! GEN_INT (MAX (GET_MODE_BITSIZE (is_mode), ! GET_MODE_BITSIZE (wanted_mem_mode)) ! - len), ! pos_rtx); ! #endif /* If INNER has a wider mode, make it smaller. If this is a constant --- 5232,5251 ---- orig_pos = pos; ! if (BITS_BIG_ENDIAN) ! { ! /* If position is constant, compute new position. Otherwise, ! build subtraction. */ ! if (pos_rtx == 0) ! pos = (MAX (GET_MODE_BITSIZE (is_mode), ! GET_MODE_BITSIZE (wanted_mem_mode)) ! - len - pos); ! else ! pos_rtx ! = gen_rtx_combine (MINUS, GET_MODE (pos_rtx), ! GEN_INT (MAX (GET_MODE_BITSIZE (is_mode), ! GET_MODE_BITSIZE (wanted_mem_mode)) ! - len), ! pos_rtx); ! } /* If INNER has a wider mode, make it smaller. If this is a constant *************** *** 5203,5211 **** /* If bytes are big endian and we had a paradoxical SUBREG, we must adjust OFFSET to compensate. */ ! #if BYTES_BIG_ENDIAN ! if (! spans_byte && GET_MODE_SIZE (inner_mode) < GET_MODE_SIZE (is_mode)) offset -= GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (inner_mode); - #endif /* If this is a constant position, we can move to the desired byte. */ --- 5267,5274 ---- /* If bytes are big endian and we had a paradoxical SUBREG, we must adjust OFFSET to compensate. */ ! if (BYTES_BIG_ENDIAN ! && ! spans_byte && GET_MODE_SIZE (inner_mode) < GET_MODE_SIZE (is_mode)) offset -= GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (inner_mode); /* If this is a constant position, we can move to the desired byte. */ *************** *** 5216,5224 **** } ! #if BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN ! if (! spans_byte && is_mode != wanted_mem_mode) offset = (GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (wanted_mem_mode) - offset); - #endif if (offset != 0 || inner_mode != wanted_mem_mode) --- 5279,5287 ---- } ! if (BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN ! && ! spans_byte ! && is_mode != wanted_mem_mode) offset = (GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (wanted_mem_mode) - offset); if (offset != 0 || inner_mode != wanted_mem_mode) *************** *** 5398,5402 **** new = make_compound_operation (XEXP (SUBREG_REG (XEXP (x, 0)), 0), next_code); ! new = make_extraction (mode, new, 0, XEXP (SUBREG_REG (XEXP (x, 0)), 1), i, 1, 0, in_code == COMPARE); --- 5461,5465 ---- new = make_compound_operation (XEXP (SUBREG_REG (XEXP (x, 0)), 0), next_code); ! new = make_extraction (GET_MODE (SUBREG_REG (XEXP (x, 0))), new, 0, XEXP (SUBREG_REG (XEXP (x, 0)), 1), i, 1, 0, in_code == COMPARE); *************** *** 5702,5713 **** return x; - #if ! BITS_BIG_ENDIAN case USE: /* X is a (use (mem ..)) that was made from a bit-field extraction that spanned the boundary of the MEM. If we are now masking so it is within that boundary, we don't need the USE any more. */ ! if ((mask & ~ GET_MODE_MASK (GET_MODE (XEXP (x, 0)))) == 0) return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); ! #endif case SIGN_EXTEND: --- 5765,5776 ---- return x; case USE: /* X is a (use (mem ..)) that was made from a bit-field extraction that spanned the boundary of the MEM. If we are now masking so it is within that boundary, we don't need the USE any more. */ ! if (! BITS_BIG_ENDIAN ! && (mask & ~ GET_MODE_MASK (GET_MODE (XEXP (x, 0)))) == 0) return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); ! break; case SIGN_EXTEND: *************** *** 5744,5749 **** remains an AND of MASK, delete it since it is redundant. */ ! if (GET_CODE (XEXP (x, 1)) == CONST_INT ! && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT) { x = simplify_and_const_int (x, op_mode, XEXP (x, 0), --- 5807,5811 ---- remains an AND of MASK, delete it since it is redundant. */ ! if (GET_CODE (XEXP (x, 1)) == CONST_INT) { x = simplify_and_const_int (x, op_mode, XEXP (x, 0), *************** *** 5764,5768 **** if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT ! && GET_MODE_MASK (GET_MODE (x)) != mask) { HOST_WIDE_INT cval = (INTVAL (XEXP (x, 1)) --- 5826,5831 ---- if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT ! && GET_MODE_MASK (GET_MODE (x)) != mask ! && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT) { HOST_WIDE_INT cval = (INTVAL (XEXP (x, 1)) *************** *** 5792,5803 **** aligned to that boundary, mask C1 to that boundary as well. This may eliminate that PLUS and, later, the AND. */ ! if (GET_CODE (XEXP (x, 1)) == CONST_INT ! && exact_log2 (- mask) >= 0 ! && (nonzero_bits (XEXP (x, 0), mode) & ~ mask) == 0 ! && (INTVAL (XEXP (x, 1)) & ~ mask) != 0) ! return force_to_mode (plus_constant (XEXP (x, 0), ! INTVAL (XEXP (x, 1)) & mask), ! mode, mask, reg, next_select); /* ... fall through ... */ --- 5855,5879 ---- aligned to that boundary, mask C1 to that boundary as well. This may eliminate that PLUS and, later, the AND. */ ! ! { ! int width = GET_MODE_BITSIZE (mode); ! unsigned HOST_WIDE_INT smask = mask; ! ! /* If MODE is narrower than HOST_WIDE_INT and mask is a negative ! number, sign extend it. */ + if (width < HOST_BITS_PER_WIDE_INT + && (smask & ((HOST_WIDE_INT) 1 << (width - 1))) != 0) + smask |= (HOST_WIDE_INT) -1 << width; + + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && exact_log2 (- smask) >= 0 + && (nonzero_bits (XEXP (x, 0), mode) & ~ mask) == 0 + && (INTVAL (XEXP (x, 1)) & ~ mask) != 0) + return force_to_mode (plus_constant (XEXP (x, 0), + INTVAL (XEXP (x, 1)) & mask), + mode, mask, reg, next_select); + } + /* ... fall through ... */ *************** *** 6110,6114 **** /* If this is a COMPARE, do nothing, since the IF_THEN_ELSE we would ! make can't possibly match and would supress other optimizations. */ else if (code == COMPARE) ; --- 6186,6190 ---- /* If this is a COMPARE, do nothing, since the IF_THEN_ELSE we would ! make can't possibly match and would suppress other optimizations. */ else if (code == COMPARE) ; *************** *** 6533,6537 **** != GET_MODE_CLASS (GET_MODE (SUBREG_REG (lhs)))) || (GET_MODE_SIZE (GET_MODE (lhs)) ! < GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs)))) || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD) return x; --- 6609,6613 ---- != GET_MODE_CLASS (GET_MODE (SUBREG_REG (lhs)))) || (GET_MODE_SIZE (GET_MODE (lhs)) ! > GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs)))) || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD) return x; *************** *** 6595,6598 **** --- 6671,6675 ---- { unsigned HOST_WIDE_INT nonzero; + int width = GET_MODE_BITSIZE (mode); int i; *************** *** 6612,6615 **** --- 6689,6705 ---- nonzero = nonzero_bits (varop, mode) & GET_MODE_MASK (mode); + /* If this would be an entire word for the target, but is not for + the host, then sign-extend on the host so that the number will look + the same way on the host that it would on the target. + + For example, when building a 64 bit alpha hosted 32 bit sparc + targeted compiler, then we want the 32 bit unsigned value -1 to be + represented as a 64 bit value -1, and not as 0x00000000ffffffff. + The later confuses the sparc backend. */ + + if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT && BITS_PER_WORD == width + && (nonzero & ((HOST_WIDE_INT) 1 << (width - 1)))) + nonzero |= ((HOST_WIDE_INT) (-1) << width); + /* Turn off all bits in the constant that are known to already be zero. Thus, if the AND isn't needed at all, we will have CONSTOP == NONZERO_BITS *************** *** 6749,6756 **** #endif ! return nonzero & ~ (sp_alignment - 1); } #endif /* If X is a register whose nonzero bits value is current, use it. Otherwise, if X is a register whose value we can find, use that --- 6839,6854 ---- #endif ! nonzero &= ~ (sp_alignment - 1); } #endif + #ifdef POINTERS_EXTEND_UNSIGNED + /* If pointers extend unsigned and this is a pointer in Pmode, say that + all the bits above ptr_mode are known to be zero. */ + if (POINTERS_EXTEND_UNSIGNED && GET_MODE (x) == Pmode + && REGNO_POINTER_FLAG (REGNO (x))) + nonzero &= GET_MODE_MASK (ptr_mode); + #endif + /* If X is a register whose nonzero bits value is current, use it. Otherwise, if X is a register whose value we can find, use that *************** *** 7088,7091 **** --- 7186,7197 ---- case REG: + #ifdef POINTERS_EXTEND_UNSIGNED + /* If pointers extend signed and this is a pointer in Pmode, say that + all the bits above ptr_mode are known to be sign bit copies. */ + if (! POINTERS_EXTEND_UNSIGNED && GET_MODE (x) == Pmode && mode == Pmode + && REGNO_POINTER_FLAG (REGNO (x))) + return GET_MODE_BITSIZE (Pmode) - GET_MODE_BITSIZE (ptr_mode) + 1; + #endif + if (reg_last_set_value[REGNO (x)] != 0 && reg_last_set_mode[REGNO (x)] == mode *************** *** 7140,7143 **** --- 7246,7250 ---- #ifdef WORD_REGISTER_OPERATIONS + #ifdef LOAD_EXTEND_OP /* For paradoxical SUBREGs on machines where all register operations affect the entire register, just look inside. Note that we are *************** *** 7145,7152 **** will remain relative to that mode, not the inner mode. */ ! if (GET_MODE_SIZE (GET_MODE (x)) ! > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) return num_sign_bit_copies (SUBREG_REG (x), mode); #endif break; --- 7252,7266 ---- will remain relative to that mode, not the inner mode. */ ! /* This works only if loads sign extend. Otherwise, if we get a ! reload for the inner part, it may be loaded from the stack, and ! then we lose all sign bit copies that existed before the store ! to the stack. */ ! ! if ((GET_MODE_SIZE (GET_MODE (x)) ! > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! && LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND) return num_sign_bit_copies (SUBREG_REG (x), mode); #endif + #endif break; *************** *** 7381,7384 **** --- 7495,7499 ---- enum rtx_code op0 = *pop0; HOST_WIDE_INT const0 = *pconst0; + int width = GET_MODE_BITSIZE (mode); const0 &= GET_MODE_MASK (mode); *************** *** 7470,7473 **** --- 7585,7601 ---- op0 = NIL; + /* If this would be an entire word for the target, but is not for + the host, then sign-extend on the host so that the number will look + the same way on the host that it would on the target. + + For example, when building a 64 bit alpha hosted 32 bit sparc + targeted compiler, then we want the 32 bit unsigned value -1 to be + represented as a 64 bit value -1, and not as 0x00000000ffffffff. + The later confuses the sparc backend. */ + + if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT && BITS_PER_WORD == width + && (const0 & ((HOST_WIDE_INT) 1 << (width - 1)))) + const0 |= ((HOST_WIDE_INT) (-1) << width); + *pop0 = op0; *pconst0 = const0; *************** *** 7536,7543 **** /* We need to determine what mode we will do the shift in. If the ! shift is a ASHIFTRT or ROTATE, we must always do it in the mode it ! was originally done in. Otherwise, we can do it in MODE, the widest ! mode encountered. */ ! shift_mode = (code == ASHIFTRT || code == ROTATE ? result_mode : mode); /* Handle cases where the count is greater than the size of the mode --- 7664,7673 ---- /* We need to determine what mode we will do the shift in. If the ! shift is a right shift or a ROTATE, we must always do it in the mode ! it was originally done in. Otherwise, we can do it in MODE, the ! widest mode encountered. */ ! shift_mode ! = (code == ASHIFTRT || code == LSHIFTRT || code == ROTATE ! ? result_mode : mode); /* Handle cases where the count is greater than the size of the mode *************** *** 7628,7641 **** MODE_INT, 1)) != BLKmode) { ! #if BYTES_BIG_ENDIAN ! new = gen_rtx (MEM, tmode, XEXP (varop, 0)); ! #else ! new = gen_rtx (MEM, tmode, ! plus_constant (XEXP (varop, 0), ! count / BITS_PER_UNIT)); RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (varop); MEM_VOLATILE_P (new) = MEM_VOLATILE_P (varop); MEM_IN_STRUCT_P (new) = MEM_IN_STRUCT_P (varop); - #endif varop = gen_rtx_combine (code == ASHIFTRT ? SIGN_EXTEND : ZERO_EXTEND, mode, new); --- 7758,7770 ---- MODE_INT, 1)) != BLKmode) { ! if (BYTES_BIG_ENDIAN) ! new = gen_rtx (MEM, tmode, XEXP (varop, 0)); ! else ! new = gen_rtx (MEM, tmode, ! plus_constant (XEXP (varop, 0), ! count / BITS_PER_UNIT)); RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (varop); MEM_VOLATILE_P (new) = MEM_VOLATILE_P (varop); MEM_IN_STRUCT_P (new) = MEM_IN_STRUCT_P (varop); varop = gen_rtx_combine (code == ASHIFTRT ? SIGN_EXTEND : ZERO_EXTEND, mode, new); *************** *** 7655,7666 **** && tmode == GET_MODE (XEXP (varop, 0))) { ! #if BITS_BIG_ENDIAN ! new = XEXP (varop, 0); ! #else ! new = copy_rtx (XEXP (varop, 0)); ! SUBST (XEXP (new, 0), ! plus_constant (XEXP (new, 0), ! count / BITS_PER_UNIT)); ! #endif varop = gen_rtx_combine (code == ASHIFTRT ? SIGN_EXTEND --- 7784,7796 ---- && tmode == GET_MODE (XEXP (varop, 0))) { ! if (BITS_BIG_ENDIAN) ! new = XEXP (varop, 0); ! else ! { ! new = copy_rtx (XEXP (varop, 0)); ! SUBST (XEXP (new, 0), ! plus_constant (XEXP (new, 0), ! count / BITS_PER_UNIT)); ! } varop = gen_rtx_combine (code == ASHIFTRT ? SIGN_EXTEND *************** *** 7791,7795 **** If the mode of this shift is not the mode of the outer shift, ! we can't do this if either shift is ASHIFTRT or ROTATE. Finally, we can't do any of these if the mode is too wide --- 7921,7925 ---- If the mode of this shift is not the mode of the outer shift, ! we can't do this if either shift is a right shift or ROTATE. Finally, we can't do any of these if the mode is too wide *************** *** 7802,7806 **** { if (GET_MODE (varop) != result_mode ! && (code == ASHIFTRT || code == ROTATE)) break; --- 7932,7937 ---- { if (GET_MODE (varop) != result_mode ! && (code == ASHIFTRT || code == LSHIFTRT ! || code == ROTATE)) break; *************** *** 7814,7818 **** || GET_MODE_BITSIZE (mode) > HOST_BITS_PER_WIDE_INT || (GET_MODE (varop) != result_mode ! && (first_code == ASHIFTRT || first_code == ROTATE || code == ROTATE))) break; --- 7945,7950 ---- || GET_MODE_BITSIZE (mode) > HOST_BITS_PER_WIDE_INT || (GET_MODE (varop) != result_mode ! && (first_code == ASHIFTRT || first_code == LSHIFTRT ! || first_code == ROTATE || code == ROTATE))) break; *************** *** 8080,8088 **** /* We need to determine what mode to do the shift in. If the shift is ! a ASHIFTRT or ROTATE, we must always do it in the mode it was originally ! done in. Otherwise, we can do it in MODE, the widest mode encountered. ! The code we care about is that of the shift that will actually be done, ! not the shift that was originally requested. */ ! shift_mode = (code == ASHIFTRT || code == ROTATE ? result_mode : mode); /* We have now finished analyzing the shift. The result should be --- 8212,8222 ---- /* We need to determine what mode to do the shift in. If the shift is ! a right shift or ROTATE, we must always do it in the mode it was ! originally done in. Otherwise, we can do it in MODE, the widest mode ! encountered. The code we care about is that of the shift that will ! actually be done, not the shift that was originally requested. */ ! shift_mode ! = (code == ASHIFTRT || code == LSHIFTRT || code == ROTATE ! ? result_mode : mode); /* We have now finished analyzing the shift. The result should be *************** *** 8152,8156 **** { if (GET_MODE_BITSIZE (result_mode) < HOST_BITS_PER_WIDE_INT) ! outer_const &= GET_MODE_MASK (result_mode); if (outer_op == AND) --- 8286,8307 ---- { if (GET_MODE_BITSIZE (result_mode) < HOST_BITS_PER_WIDE_INT) ! { ! int width = GET_MODE_BITSIZE (result_mode); ! ! outer_const &= GET_MODE_MASK (result_mode); ! ! /* If this would be an entire word for the target, but is not for ! the host, then sign-extend on the host so that the number will ! look the same way on the host that it would on the target. ! ! For example, when building a 64 bit alpha hosted 32 bit sparc ! targeted compiler, then we want the 32 bit unsigned value -1 to be ! represented as a 64 bit value -1, and not as 0x00000000ffffffff. ! The later confuses the sparc backend. */ ! ! if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT && BITS_PER_WORD == width ! && (outer_const & ((HOST_WIDE_INT) 1 << (width - 1)))) ! outer_const |= ((HOST_WIDE_INT) (-1) << width); ! } if (outer_op == AND) *************** *** 8179,8190 **** the CLOBBERs are placed. The value is the final insn code from the pattern ultimately matched, or -1. */ static int ! recog_for_combine (pnewpat, insn, pnotes) rtx *pnewpat; rtx insn; rtx *pnotes; { register rtx pat = *pnewpat; --- 8330,8345 ---- the CLOBBERs are placed. + PADDED_SCRATCHES is set to the number of (clobber (scratch)) patterns + we had to add. + The value is the final insn code from the pattern ultimately matched, or -1. */ static int ! recog_for_combine (pnewpat, insn, pnotes, padded_scratches) rtx *pnewpat; rtx insn; rtx *pnotes; + int *padded_scratches; { register rtx pat = *pnewpat; *************** *** 8194,8197 **** --- 8349,8354 ---- rtx notes = 0; + *padded_scratches = 0; + /* If PAT is a PARALLEL, check to see if it contains the CLOBBER we use to indicate that something didn't match. If we find such a *************** *** 8255,8258 **** --- 8412,8417 ---- && ! reg_dead_at_p (XEXP (XVECEXP (newpat, 0, i), 0), insn)) return -1; + else if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) == SCRATCH) + (*padded_scratches)++; notes = gen_rtx (EXPR_LIST, REG_UNUSED, XEXP (XVECEXP (newpat, 0, i), 0), notes); *************** *** 8309,8312 **** --- 8468,8479 ---- result = gen_lowpart_common (mode, x); + if (result != 0 + && GET_CODE (result) == SUBREG + && GET_CODE (SUBREG_REG (result)) == REG + && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER + && (GET_MODE_SIZE (GET_MODE (result)) + != GET_MODE_SIZE (GET_MODE (SUBREG_REG (result))))) + reg_changes_size[REGNO (SUBREG_REG (result))] = 1; + if (result) return result; *************** *** 8328,8341 **** return gen_rtx (SUBREG, mode, x, 0); ! #if WORDS_BIG_ENDIAN ! offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) ! - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); ! #endif ! #if BYTES_BIG_ENDIAN ! /* Adjust the address so that the address-after-the-data ! is unchanged. */ ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))); ! #endif new = gen_rtx (MEM, mode, plus_constant (XEXP (x, 0), offset)); RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x); --- 8495,8508 ---- return gen_rtx (SUBREG, mode, x, 0); ! if (WORDS_BIG_ENDIAN) ! offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) ! - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); ! if (BYTES_BIG_ENDIAN) ! { ! /* Adjust the address so that the address-after-the-data is ! unchanged. */ ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))); ! } new = gen_rtx (MEM, mode, plus_constant (XEXP (x, 0), offset)); RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x); *************** *** 8897,8909 **** can't know what mode to use for the endianness adjustment. */ - #if ! BITS_BIG_ENDIAN || defined (HAVE_extzv) if (GET_CODE (XEXP (op0, 0)) == CONST_INT && XEXP (op0, 1) == const1_rtx && equality_comparison_p && const_op == 0 ! && (i = exact_log2 (INTVAL (XEXP (op0, 0)))) >= 0) { ! #if BITS_BIG_ENDIAN ! i = (GET_MODE_BITSIZE ! (insn_operand_mode[(int) CODE_FOR_extzv][1]) - 1 - i); #endif --- 9064,9081 ---- can't know what mode to use for the endianness adjustment. */ if (GET_CODE (XEXP (op0, 0)) == CONST_INT && XEXP (op0, 1) == const1_rtx && equality_comparison_p && const_op == 0 ! && (i = exact_log2 (INTVAL (XEXP (op0, 0)))) >= 0 ! && (! BITS_BIG_ENDIAN ! #ifdef HAVE_extzv ! || HAVE_extzv ! #endif ! )) { ! #ifdef HAVE_extzv ! if (BITS_BIG_ENDIAN) ! i = (GET_MODE_BITSIZE ! (insn_operand_mode[(int) CODE_FOR_extzv][1]) - 1 - i); #endif *************** *** 8916,8920 **** continue; } - #endif /* ... fall through ... */ --- 9088,9091 ---- *************** *** 9835,9849 **** return 0; ! /* If the value was set in a later insn that the ones we are processing, we can't use it even if the register was only set once, but make a quick check to see if the previous insn set it to something. This is commonly ! the case when the same pseudo is used by repeated insns. */ if (INSN_CUID (reg_last_set[regno]) >= subst_low_cuid) { rtx insn, set; for (insn = prev_nonnote_insn (subst_insn); ! insn && INSN_CUID (insn) >= subst_low_cuid; insn = prev_nonnote_insn (insn)) ; --- 10006,10037 ---- return 0; ! /* If the value was set in a later insn than the ones we are processing, we can't use it even if the register was only set once, but make a quick check to see if the previous insn set it to something. This is commonly ! the case when the same pseudo is used by repeated insns. + This does not work if there exists an instruction which is temporarily + not on the insn chain. */ + if (INSN_CUID (reg_last_set[regno]) >= subst_low_cuid) { rtx insn, set; + /* We can not do anything useful in this case, because there is + an instruction which is not on the insn chain. */ + if (subst_prev_insn) + return 0; + + /* Skip over USE insns. They are not useful here, and they may have + been made by combine, in which case they do not have a INSN_CUID + value. We can't use prev_real_insn, because that would incorrectly + take us backwards across labels. Skip over BARRIERs also, since + they could have been made by combine. If we see one, we must be + optimizing dead code, so it doesn't matter what we do. */ for (insn = prev_nonnote_insn (subst_insn); ! insn && ((GET_CODE (insn) == INSN ! && GET_CODE (PATTERN (insn)) == USE) ! || GET_CODE (insn) == BARRIER ! || INSN_CUID (insn) >= subst_low_cuid); insn = prev_nonnote_insn (insn)) ; *************** *** 9856,9860 **** /* Make sure that VALUE doesn't reference X. Replace any ! expliit references with a CLOBBER. If there are any remaining references (rare), don't use the value. */ --- 10044,10048 ---- /* Make sure that VALUE doesn't reference X. Replace any ! explicit references with a CLOBBER. If there are any remaining references (rare), don't use the value. */ *************** *** 9944,9948 **** /* Function called via note_stores from reg_dead_at_p. ! If DEST is within [reg_dead_rengno, reg_dead_endregno), set reg_dead_flag to 1 if X is a CLOBBER and to -1 it is a SET. */ --- 10132,10136 ---- /* Function called via note_stores from reg_dead_at_p. ! If DEST is within [reg_dead_regno, reg_dead_endregno), set reg_dead_flag to 1 if X is a CLOBBER and to -1 it is a SET. */ *************** *** 9999,10003 **** /* Scan backwards until we find a REG_DEAD note, SET, CLOBBER, label, or beginning of function. */ ! for (; insn && GET_CODE (insn) != CODE_LABEL; insn = prev_nonnote_insn (insn)) { --- 10187,10191 ---- /* Scan backwards until we find a REG_DEAD note, SET, CLOBBER, label, or beginning of function. */ ! for (; insn && GET_CODE (insn) != CODE_LABEL && GET_CODE (insn) != BARRIER; insn = prev_nonnote_insn (insn)) { *************** *** 10174,10180 **** register int regno = REGNO (x); register rtx where_dead = reg_last_death[regno]; ! if (where_dead && INSN_CUID (where_dead) >= from_cuid ! && INSN_CUID (where_dead) < INSN_CUID (to_insn)) { rtx note = remove_death (regno, where_dead); --- 10362,10381 ---- register int regno = REGNO (x); register rtx where_dead = reg_last_death[regno]; + register rtx before_dead, after_dead; ! /* WHERE_DEAD could be a USE insn made by combine, so first we ! make sure that we have insns with valid INSN_CUID values. */ ! before_dead = where_dead; ! while (before_dead && INSN_UID (before_dead) > max_uid_cuid) ! before_dead = PREV_INSN (before_dead); ! after_dead = where_dead; ! while (after_dead && INSN_UID (after_dead) > max_uid_cuid) ! after_dead = NEXT_INSN (after_dead); ! ! if (before_dead && after_dead ! && INSN_CUID (before_dead) >= from_cuid ! && (INSN_CUID (after_dead) < INSN_CUID (to_insn) ! || (where_dead != after_dead ! && INSN_CUID (after_dead) == INSN_CUID (to_insn)))) { rtx note = remove_death (regno, where_dead); *************** *** 10510,10556 **** if (place == 0) ! for (tem = prev_nonnote_insn (i3); ! tem && (GET_CODE (tem) == INSN ! || GET_CODE (tem) == CALL_INSN); ! tem = prev_nonnote_insn (tem)) ! { ! /* If the register is being set at TEM, see if that is all ! TEM is doing. If so, delete TEM. Otherwise, make this ! into a REG_UNUSED note instead. */ ! if (reg_set_p (XEXP (note, 0), PATTERN (tem))) ! { ! rtx set = single_set (tem); ! ! /* Verify that it was the set, and not a clobber that ! modified the register. */ ! ! if (set != 0 && ! side_effects_p (SET_SRC (set)) ! && rtx_equal_p (XEXP (note, 0), SET_DEST (set))) ! { ! /* Move the notes and links of TEM elsewhere. ! This might delete other dead insns recursively. ! First set the pattern to something that won't use ! any register. */ ! ! PATTERN (tem) = pc_rtx; ! ! distribute_notes (REG_NOTES (tem), tem, tem, ! NULL_RTX, NULL_RTX, NULL_RTX); ! distribute_links (LOG_LINKS (tem)); ! ! PUT_CODE (tem, NOTE); ! NOTE_LINE_NUMBER (tem) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (tem) = 0; ! } ! else ! { ! PUT_REG_NOTE_KIND (note, REG_UNUSED); ! ! /* If there isn't already a REG_UNUSED note, put one ! here. */ ! if (! find_regno_note (tem, REG_UNUSED, ! REGNO (XEXP (note, 0)))) ! place = tem; ! break; } } --- 10711,10758 ---- if (place == 0) ! { ! for (tem = prev_nonnote_insn (i3); ! place == 0 && tem ! && (GET_CODE (tem) == INSN || GET_CODE (tem) == CALL_INSN); ! tem = prev_nonnote_insn (tem)) ! { ! /* If the register is being set at TEM, see if that is all ! TEM is doing. If so, delete TEM. Otherwise, make this ! into a REG_UNUSED note instead. */ ! if (reg_set_p (XEXP (note, 0), PATTERN (tem))) ! { ! rtx set = single_set (tem); ! ! /* Verify that it was the set, and not a clobber that ! modified the register. */ ! ! if (set != 0 && ! side_effects_p (SET_SRC (set)) ! && rtx_equal_p (XEXP (note, 0), SET_DEST (set))) ! { ! /* Move the notes and links of TEM elsewhere. ! This might delete other dead insns recursively. ! First set the pattern to something that won't use ! any register. */ ! ! PATTERN (tem) = pc_rtx; ! ! distribute_notes (REG_NOTES (tem), tem, tem, ! NULL_RTX, NULL_RTX, NULL_RTX); ! distribute_links (LOG_LINKS (tem)); ! ! PUT_CODE (tem, NOTE); ! NOTE_LINE_NUMBER (tem) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (tem) = 0; ! } ! else ! { ! PUT_REG_NOTE_KIND (note, REG_UNUSED); ! ! /* If there isn't already a REG_UNUSED note, put one ! here. */ ! if (! find_regno_note (tem, REG_UNUSED, ! REGNO (XEXP (note, 0)))) ! place = tem; ! break; } } *************** *** 10562,10566 **** break; } ! } /* If the register is set or already dead at PLACE, we needn't do --- 10764,10786 ---- break; } ! } ! ! /* If we haven't found an insn for the death note and it ! is still a REG_DEAD note, but we have hit a CODE_LABEL, ! insert a USE insn for the register at that label and ! put the death node there. This prevents problems with ! call-state tracking in caller-save.c. */ ! if (REG_NOTE_KIND (note) == REG_DEAD && place == 0 && tem != 0) ! { ! place ! = emit_insn_after (gen_rtx (USE, VOIDmode, XEXP (note, 0)), ! tem); ! ! /* If this insn was emitted between blocks, then update ! basic_block_head of the current block to include it. */ ! if (basic_block_end[this_basic_block - 1] == tem) ! basic_block_head[this_basic_block] = place; ! } ! } /* If the register is set or already dead at PLACE, we needn't do diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/conditions.h gcc-2.7.0/conditions.h *** gcc-2.6.3/conditions.h Mon Oct 12 17:31:04 1992 --- gcc-2.7.0/conditions.h Thu Jun 15 07:19:23 1995 *************** *** 16,20 **** 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. */ /* None of the things in the files exist if we don't use CC0. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* None of the things in the files exist if we don't use CC0. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/1750a/1750a.c gcc-2.7.0/config/1750a/1750a.c *** gcc-2.6.3/config/1750a/1750a.c Tue Sep 20 19:29:59 1994 --- gcc-2.7.0/config/1750a/1750a.c Thu Jun 15 09:05:41 1995 *************** *** 1,4 **** /* Subroutines for insn-output.c for MIL-STD-1750. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by O.M.Kellogg, DASA (okellogg@salyko.cube.net). --- 1,4 ---- /* Subroutines for insn-output.c for MIL-STD-1750. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by O.M.Kellogg, DASA (okellogg@salyko.cube.net). *************** *** 17,25 **** 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. */ #ifndef FILE #include #endif #define __datalbl --- 17,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef FILE #include #endif + #include #define __datalbl *************** *** 39,43 **** enum section current_section = Normal; char *sectname[4] = ! {"Normal", "Init", "Konst", "Static"}; int --- 41,45 ---- enum section current_section = Normal; char *sectname[4] = ! {"Init", "Normal", "Konst", "Static"}; int *************** *** 196,200 **** char * ! movcnt_regno_adjust (rtx * op) { static char outstr[40]; --- 198,203 ---- char * ! movcnt_regno_adjust (op) ! rtx *op; { static char outstr[40]; *************** *** 217,221 **** char * ! mod_regno_adjust (char *instr, rtx * op) { static char outstr[40]; --- 220,226 ---- char * ! mod_regno_adjust (instr, op) ! char *instr; ! rtx *op; { static char outstr[40]; *************** *** 236,240 **** instructions. */ int ! memop_valid (register rtx op) { if (GET_MODE (op) != Pmode && GET_MODE (op) != VOIDmode) --- 241,246 ---- instructions. */ int ! memop_valid (op) ! rtx op; { if (GET_MODE (op) != Pmode && GET_MODE (op) != VOIDmode) *************** *** 268,272 **** /* extra predicate for recog: */ int ! nonindirect_operand (register rtx op, enum machine_mode mode) { int retval; --- 274,280 ---- /* extra predicate for recog: */ int ! nonindirect_operand (op, mode) ! rtx op; ! enum machine_mode mode; { int retval; *************** *** 288,292 **** /* predicate for the STC instruction: */ int ! small_nonneg_const (register rtx op, enum machine_mode mode) { if (GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) <= 15) --- 296,302 ---- /* predicate for the STC instruction: */ int ! small_nonneg_const (op, mode) ! rtx op; ! enum machine_mode mode; { if (GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) <= 15) *************** *** 299,303 **** int ! find_jmplbl (int labelnum) { int i, found = 0; --- 309,314 ---- int ! find_jmplbl (labelnum) ! int labelnum; { int i, found = 0; *************** *** 315,319 **** char * ! branch_or_jump (char *condition, int targetlabel_number) { static char buf[30]; --- 326,332 ---- char * ! branch_or_jump (condition, targetlabel_number) ! char *condition; ! int targetlabel_number; { static char buf[30]; *************** *** 487,490 **** --- 500,507 ---- XSTR (y, 0), REGNO (x)); break; + case LABEL_REF: + output_address (XEXP (y, 0)); + fprintf (file, ",r%d ; P_O_A reg + label", REGNO (x)); + break; default: fprintf (file, "[P_O_A reg%d+UFO code=%d]", *************** *** 493,496 **** --- 510,515 ---- break; case LABEL_REF: + output_address (XEXP (x, 0)); + break; case SYMBOL_REF: switch (GET_CODE (y)) *************** *** 549,552 **** --- 568,574 ---- fprintf (file, " ;P_O_A const"); break; + case CODE_LABEL: + fprintf (file, "L%d", XINT (addr, 3)); + break; default: fprintf (file, " p_o_a UFO, code=%d val=0x%x", *************** *** 556,588 **** } - - /* - ASM_FILE_END(file) - FILE *file; - { - if (datalbl_ndx >= 0) { - int i, cum_size=0; - fprintf(file,"\n\tstatic\ninit_srel\n"); - for (i = 0; i <= datalbl_ndx; i++) { - if (datalbl[i].name == NULL) - { - fprintf (stderr, "asm_file_end intern err (datalbl)\n"); - exit (0); - } - fprintf(file,"%s\t block %d\n", - datalbl[i].name,datalbl[i].size); - cum_size += datalbl[i].size; - } - fprintf(file,"\n\tinit\n"); - fprintf(file,"\tLIM R0,init_srel ;dst\n"); - fprintf(file,"\tLIM R1,%d ;cnt\n",cum_size); - fprintf(file,"\tLIM R2,K%s ;src\n",datalbl[0].name); - fprintf(file,"\tMOV R0,R2\n"); - fprintf(file,"\n\tnormal\n"); - datalbl_ndx = -1; - for (i = 0; i < DATALBL_ARRSIZ; i++) - datalbl[i].size = 0; - } - fprintf(file,"\n\tend\n"); - } - */ --- 578,579 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/1750a/1750a.h gcc-2.7.0/config/1750a/1750a.h *** gcc-2.6.3/config/1750a/1750a.h Tue Sep 20 19:30:51 1994 --- gcc-2.7.0/config/1750a/1750a.h Thu Jun 15 09:05:57 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by O.M.Kellogg, DASA (okellogg@salyko.cube.net). --- 1,4 ---- /* Definitions of target machine for GNU compiler. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by O.M.Kellogg, DASA (okellogg@salyko.cube.net). *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 251,255 **** /* Define this to be 1 if all structure return values must be in memory. */ ! #define DEFAUT_PCC_STRUCT_RETURN 0 /*****************************************************************************/ --- 252,256 ---- /* Define this to be 1 if all structure return values must be in memory. */ ! #define DEFAULT_PCC_STRUCT_RETURN 0 /*****************************************************************************/ *************** *** 423,431 **** /* 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,SIZE) 0 /* Define how to find the value returned by a function. --- 424,433 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 588,596 **** #define FUNCTION_EPILOGUE(FILE, SIZE) { \ if (SIZE > 0) \ fprintf(FILE,"\t%s\tr14,%d ; free up local-var space\n", \ (SIZE <= 16 ? "aisp" : "aim"),SIZE); \ - fprintf(FILE,"\tlr\tr15,r14 ; set stack to return addr\n"); \ - fprintf(FILE,"\tpopm\tr14,r14 ; restore prev. frame ptr\n"); \ fprintf(FILE,"\turs\tr15\n"); } --- 590,598 ---- #define FUNCTION_EPILOGUE(FILE, SIZE) { \ + fprintf(FILE,"\tlr\tr15,r14 ; set stack ptr to frame ptr\n"); \ + fprintf(FILE,"\tpopm\tr14,r14 ; restore previous frame ptr\n"); \ if (SIZE > 0) \ fprintf(FILE,"\t%s\tr14,%d ; free up local-var space\n", \ (SIZE <= 16 ? "aisp" : "aim"),SIZE); \ fprintf(FILE,"\turs\tr15\n"); } *************** *** 789,793 **** /* 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 --- 791,795 ---- /* Define this as 1 if `char' should by default be signed; else as 0. */ ! #define DEFAULT_SIGNED_CHAR 1 /* Max number of bytes we can move from memory to memory *************** *** 932,958 **** #define EXTRA_SECTION_FUNCTIONS \ ! void const_section() \ ! { \ ! fprintf(asm_out_file,"\tkonst\n"); \ current_section = Konst; \ ! } \ ! check_section(enum section sect) \ ! { \ ! if (current_section != sect) { \ fprintf(asm_out_file,"\t%s\n",sectname[(int)sect]); \ ! current_section = sect; \ ! } \ ! switch (sect) { \ ! case Init: \ ! case Normal: \ ! in_section = in_text; \ ! break; \ ! case Static: \ ! in_section = in_data; \ ! break; \ ! case Konst: \ ! in_section = in_readonly_data; \ ! break; \ ! } \ } --- 934,961 ---- #define EXTRA_SECTION_FUNCTIONS \ ! void const_section() \ ! { \ ! fprintf(asm_out_file,"\tkonst\n"); \ current_section = Konst; \ ! } \ ! check_section(sect) \ ! enum section sect; \ ! { \ ! if (current_section != sect) { \ fprintf(asm_out_file,"\t%s\n",sectname[(int)sect]); \ ! current_section = sect; \ ! } \ ! switch (sect) { \ ! case Init: \ ! case Normal: \ ! in_section = in_text; \ ! break; \ ! case Static: \ ! in_section = in_data; \ ! break; \ ! case Konst: \ ! in_section = in_readonly_data; \ ! break; \ ! } \ } *************** *** 967,972 **** #define TEXT_SECTION_ASM_OP "\n\tnormal ; text_section\n" ! /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\n\tstatic ; data_section\n" /* How to refer to registers in assembler output. --- 970,978 ---- #define TEXT_SECTION_ASM_OP "\n\tnormal ; text_section\n" ! /* Output before writable data. ! 1750 Note: This is actually read-only data. The copying from read-only ! to writable memory is done elsewhere (in ASM_FILE_END.) ! */ ! #define DATA_SECTION_ASM_OP "\n\tkonst ; data_section\n" /* How to refer to registers in assembler output. *************** *** 1068,1071 **** --- 1074,1095 ---- sprintf (LABEL, "%s%d", PREFIX, NUM) + /* Output at the end of a jump table. + 1750: To be uncommented when we can put jump tables in Konst. + #define ASM_OUTPUT_CASE_END(FILE,NUM,INSN) \ + fprintf (FILE, "\tnormal\t; case_end\n") + */ + + /* Currently, it is not possible to put jump tables in section Konst. + This is because there is a one-to-one relation between sections Konst + and Static (i.e., all Konst data are copied to Static, and the order + of data is the same between the two sections.) However, jump tables are + not copied to Static, which destroys the equivalence between Konst and + Static. When a more intelligent Konst-to-Static copying mechanism is + implemented (i.e. one that excludes the copying of jumptables), then + ASM_OUTPUT_CASE_END shall be defined, and JUMP_LABELS_IN_TEXT_SECTION + shall be undefined. */ + + #define JUMP_TABLES_IN_TEXT_SECTION 1 + /* This is how to output an assembler line defining a 1750A `float' constant. */ *************** *** 1106,1121 **** datalbl[datalbl_ndx].size = LEN; \ } \ ! for (i = 0; i < LEN; i++) \ if (PTR[i] >= 32 && PTR[i] < 127) \ ! fprintf(FILE,"\tdata\t%d\t; '%c'\n",PTR[i],PTR[i]); \ else \ ! fprintf(FILE,"\tdata\t%d\t; (ascii)\n",PTR[i]); \ } while (0) ! /* This is how to output an assembler line defining an `int' constant. */ ! #define ASM_OUTPUT_INT(FILE,VALUE) do { \ if (! label_pending) \ ! fprintf(FILE,";in ASM_OUTPUT_INT without label_pending\n"); \ else { \ label_pending = 0; \ --- 1130,1161 ---- datalbl[datalbl_ndx].size = LEN; \ } \ ! for (i = 0; i < LEN; i++) { \ ! if ((i % 15) == 0) { \ ! if (i != 0) \ ! fprintf(FILE,"\n"); \ ! fprintf(FILE,"\tdata\t"); \ ! } \ ! else \ ! fprintf(FILE,","); \ if (PTR[i] >= 32 && PTR[i] < 127) \ ! fprintf(FILE,"'%c'",PTR[i]); \ else \ ! fprintf(FILE,"%d",PTR[i]); \ ! } \ ! fprintf(FILE,"\n"); \ } while (0) ! /* This is how to output an assembler line defining a `char', `short', or ! `int' constant. ! 1750 NOTE: The reason why this macro also outputs `short' and `int' ! constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the ! usual 8.) This behavior is different from the usual, where ! ASM_OUTPUT_CHAR only outputs character constants. The name ! of this macro should perhaps be `ASM_OUTPUT_QUARTER_INT' or so. ! */ ! #define ASM_OUTPUT_CHAR(FILE,VALUE) do { \ if (! label_pending) \ ! fprintf(FILE,";in ASM_OUTPUT_CHAR without label_pending\n"); \ else { \ label_pending = 0; \ *************** *** 1125,1152 **** fprintf(FILE, "\n"); } while (0) ! /* This is how to output an assembler line defining a `long int' constant. */ ! #define ASM_OUTPUT_LONG_INT(FILE,VALUE) do { \ if (! label_pending) \ ! fprintf(FILE,";in ASM_OUTPUT_LONG_INT without label_pending\n");\ else { \ label_pending = 0; \ datalbl[datalbl_ndx].size = 2; \ } \ ! fprintf(FILE, "\tdatal\t"); output_addr_const(FILE,VALUE); \ ! fprintf(FILE, "\n"); } while (0) ! ! /* Likewise for `short' and `char' constants. */ ! ! #define ASM_OUTPUT_SHORT(FILE,VALUE) ASM_OUTPUT_INT(FILE,VALUE) ! ! /* For 1750, we treat char same as word. Tektronix 1750 ! Assembler does a better (packing) job with strings. */ ! #define ASM_OUTPUT_CHAR(FILE,VALUE) ASM_OUTPUT_INT(FILE,VALUE) /* This is how to output an assembler line for a numeric constant byte. */ ! /* 1750: For the time being, treating this same as word. Tektronix 1750 ! Assembler does a better (packing) job with strings. */ ! #define ASM_OUTPUT_BYTE(FILE,VALUE) ASM_OUTPUT_INT(FILE,VALUE) /* This is how to output an insn to push a register on the stack. --- 1165,1187 ---- fprintf(FILE, "\n"); } while (0) ! /* This is how to output an assembler line defining a `long int' constant. ! 1750 NOTE: The reason why this macro outputs `long' instead of `short' ! constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the ! usual 8.) The name of this macro should perhaps be `ASM_OUTPUT_HALF_INT'. ! */ ! #define ASM_OUTPUT_SHORT(FILE,VALUE) do { \ if (! label_pending) \ ! fprintf(FILE,";in ASM_OUTPUT_SHORT without label_pending\n");\ else { \ label_pending = 0; \ datalbl[datalbl_ndx].size = 2; \ } \ ! fprintf(FILE, "\tdatal\t%d\n",INTVAL(VALUE)); \ ! } while (0) /* This is how to output an assembler line for a numeric constant byte. */ ! ! #define ASM_OUTPUT_BYTE(FILE,VALUE) ASM_OUTPUT_CHAR(FILE,VALUE) /* This is how to output an insn to push a register on the stack. *************** *** 1186,1190 **** #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) do { \ ! fprintf (FILE, "\tcommon %s,%d\n", NAME, SIZE); \ } while (0) --- 1221,1226 ---- #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) do { \ ! check_section(Static); \ ! fprintf (FILE, "\tcommon %s,%d\n", NAME, SIZE); \ } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/1750a/1750a.md gcc-2.7.0/config/1750a/1750a.md *** gcc-2.6.3/config/1750a/1750a.md Mon Nov 7 17:46:45 1994 --- gcc-2.7.0/config/1750a/1750a.md Thu Jun 15 16:44:33 1995 *************** *** 18,22 **** ;; 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. --- 18,23 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 950,954 **** ;; Bit field instructions, general cases. ! ;; "o,d" constraint causes a nonoffsetable memref to match the "o" ;; so that its address is reloaded. --- 951,955 ---- ;; Bit field instructions, general cases. ! ;; "o,d" constraint causes a nonoffsettable memref to match the "o" ;; so that its address is reloaded. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/1750a/xm-1750a.h gcc-2.7.0/config/1750a/xm-1750a.h *** gcc-2.6.3/config/1750a/xm-1750a.h --- gcc-2.7.0/config/1750a/xm-1750a.h Thu Jun 15 09:06:11 1995 *************** *** 0 **** --- 1,23 ---- + /* Configuration for GNU C-compiler for MIL-STD-1750a. + Copyright (C) 1995 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + */ + + #error Gcc cannot run on a 1750a due to size problems! diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/a29k-udi.h gcc-2.7.0/config/a29k/a29k-udi.h *** gcc-2.6.3/config/a29k/a29k-udi.h --- gcc-2.7.0/config/a29k/a29k-udi.h Thu Jun 15 09:06:26 1995 *************** *** 0 **** --- 1,104 ---- + /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU + running over UDI using COFF. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "a29k/a29k.h" + + /* Output DBX (stabs) debugging information if doing -gstabs. */ + + #define DBX_DEBUGGING_INFO + + /* Generate SDB debugging information by default. */ + + #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG + + /* Support the ctors and dtors sections for g++. */ + + #define CTORS_SECTION_ASM_OP "\t.use .ctors" + #define DTORS_SECTION_ASM_OP "\t.use .dtors" + + /* A list of other sections which the compiler might be "in" at any + given time. */ + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS readonly_data, in_ctors, in_dtors + + /* A list of extra section function definitions. */ + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + READONLY_DATA_FUNCTION \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + + #define READONLY_DATA_FUNCTION \ + void \ + literal_section () \ + { \ + if (in_section != readonly_data) \ + { \ + fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ + in_section = readonly_data; \ + } \ + } \ + + #define CTORS_SECTION_FUNCTION \ + void \ + ctors_section () \ + { \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ + } + + #define DTORS_SECTION_FUNCTION \ + void \ + dtors_section () \ + { \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ + } + + #define INT_ASM_OP ".word" + + /* A C statement (sans semicolon) to output an element in the table of + global constructors. */ + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. */ + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/a29k.c gcc-2.7.0/config/a29k/a29k.c *** gcc-2.6.3/config/a29k/a29k.c Tue Jun 14 22:31:04 1994 --- gcc-2.7.0/config/a29k/a29k.c Thu Jun 15 09:06:43 1995 *************** *** 1,4 **** /* Subroutines used for code generation on AMD Am29000. ! Copyright (C) 1987, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) --- 1,4 ---- /* Subroutines used for code generation on AMD Am29000. ! Copyright (C) 1987, 88, 90-94, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) *************** *** 17,21 **** 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 --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 221,225 **** case MODE_INT: return REGNO (op) >= R_Q && REGNO (op) <= R_EXO; ! detault: return 0; } --- 222,226 ---- case MODE_INT: return REGNO (op) >= R_Q && REGNO (op) <= R_EXO; ! default: return 0; } *************** *** 807,812 **** } ! /* Shorten the maximum size of the frame. */ ! for (i = R_AR (0) - start - count; i < R_AR (0) - start; i++) { fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; --- 808,818 ---- } ! /* Shorten the maximum size of the frame. ! Remember that R_AR(-1,-2) are place holders for the caller's lr0,lr1. ! Make sure to keep the frame rounded to an even boundary. Rounding up ! to an 8 byte boundary will use a slot. Otherwise a frame with 121 local ! regs and 5 arguments will overrun the stack (121+1 + 5 + 2 > 128). */ ! /* ??? An alternative would be to never allocate one reg. */ ! for (i = (R_AR (0) - 2 - start - count) & ~1; i < R_AR (0) - 2 - start; i++) { fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; *************** *** 1099,1103 **** union real_extract u; ! bcopy (&CONST_DOUBLE_LOW (x), &u, sizeof u); fprintf (file, "$double1(%.20e)", u.d); } --- 1105,1109 ---- union real_extract u; ! bcopy ((char *) &CONST_DOUBLE_LOW (x), (char *) &u, sizeof u); fprintf (file, "$double1(%.20e)", u.d); } *************** *** 1163,1167 **** else fprintf (file, "$double%d", SUBREG_WORD (XEXP (x, 0))); ! bcopy (&CONST_DOUBLE_LOW (SUBREG_REG (XEXP (x, 0))), &u, sizeof u); fprintf (file, "(%.20e)", u.d); } --- 1169,1174 ---- else fprintf (file, "$double%d", SUBREG_WORD (XEXP (x, 0))); ! bcopy ((char *) &CONST_DOUBLE_LOW (SUBREG_REG (XEXP (x, 0))), ! (char *) &u, sizeof u); fprintf (file, "(%.20e)", u.d); } *************** *** 1172,1176 **** union real_extract u; ! bcopy (&CONST_DOUBLE_LOW (x), &u, sizeof u); fprintf (file, "$%s(%.20e)", GET_MODE (x) == SFmode ? "float" : "double0", u.d); --- 1179,1183 ---- union real_extract u; ! bcopy ((char *) &CONST_DOUBLE_LOW (x), (char *) &u, sizeof u); fprintf (file, "$%s(%.20e)", GET_MODE (x) == SFmode ? "float" : "double0", u.d); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/a29k.h gcc-2.7.0/config/a29k/a29k.h *** gcc-2.6.3/config/a29k/a29k.h Tue Jun 14 22:31:18 1994 --- gcc-2.7.0/config/a29k/a29k.h Thu Jun 15 09:07:00 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU. ! Copyright (C) 1988, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) --- 1,4 ---- /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU. ! Copyright (C) 1988, 90-94, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 91,94 **** --- 92,100 ---- #define TARGET_SOFT_FLOAT (target_flags & 512) + /* This means that we should not emit the multm or mutmu instructions + that some embedded systems' trap handlers don't support. */ + + #define TARGET_MULTM ((target_flags & 1024) == 0) + #define TARGET_SWITCHES \ { {"dw", 1}, \ *************** *** 110,113 **** --- 116,120 ---- {"no-reuse-arg-regs", 256}, \ {"soft-float", 512}, \ + {"no-multm", 1024}, \ {"", TARGET_DEFAULT}} *************** *** 725,733 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 732,741 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 778,787 **** On the 29k, we use this to set all argument registers to fixed and ! set the last 16 local regs (lr112-lr127) to available. Some ! will later be changed to call-saved by FUNCTION_INCOMING_ARG. */ ! #define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,IGNORE) \ { int i; \ ! for (i = R_AR (0); i < R_AR (16); i++) \ { \ fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; \ --- 786,797 ---- On the 29k, we use this to set all argument registers to fixed and ! set the last 16 local regs, less two, (lr110-lr125) to available. Some ! will later be changed to call-saved by FUNCTION_INCOMING_ARG. ! lr126,lr127 are always fixed, they are place holders for the caller's ! lr0,lr1. */ ! #define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,IGNORE) \ { int i; \ ! for (i = R_AR (0) - 2; i < R_AR (16); i++) \ { \ fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; \ *************** *** 790,794 **** SET_HARD_REG_BIT (call_fixed_reg_set, i); \ } \ ! for (i = R_LR (112); i < R_LR (128); i++) \ { \ fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 0; \ --- 800,804 ---- SET_HARD_REG_BIT (call_fixed_reg_set, i); \ } \ ! for (i = R_LR (110); i < R_LR (126); i++) \ { \ fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 0; \ *************** *** 1083,1090 **** #define MAX_REGS_PER_ADDRESS 1 ! /* Recognize any constant value that is a valid address. ! None are on the 29K. */ ! #define CONSTANT_ADDRESS_P(X) 0 /* Include all constant integers and constant doubles */ --- 1093,1100 ---- #define MAX_REGS_PER_ADDRESS 1 ! /* Recognize any constant value that is a valid address. */ ! #define CONSTANT_ADDRESS_P(X) \ ! (GET_CODE (X) == CONST_INT && (unsigned) INTVAL (X) < 0x100) /* Include all constant integers and constant doubles */ *************** *** 1433,1436 **** --- 1443,1452 ---- extern int a29k_debug_reg_map[]; #define DBX_REGISTER_NUMBER(REGNO) a29k_debug_reg_map[REGNO] + + /* This how to write an assembler directive to FILE to switch to + section NAME for DECL. */ + + #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ + fprintf (FILE, "\t.sect %s, bss\n\t.use %s\n", NAME, NAME) /* This is how to output the definition of a user-level label named NAME, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/a29k.md gcc-2.7.0/config/a29k/a29k.md *** gcc-2.6.3/config/a29k/a29k.md Mon Jul 11 16:06:14 1994 --- gcc-2.7.0/config/a29k/a29k.md Thu Jun 15 16:44:54 1995 *************** *** 17,21 **** ;; 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. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. *************** *** 1121,1144 **** "multiply %0,%1,%2") - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (subreg:SI - (mult:DI - (sign_extend:DI (match_operand:SI 1 "gpc_reg_operand" "%r")) - (sign_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r"))) 0)) - (clobber (match_scratch:SI 3 "=&q"))] - "" - "multm %0,%1,%2") - - (define_insn "" - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") - (subreg:SI - (mult:DI - (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "%r")) - (zero_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r"))) 0)) - (clobber (match_scratch:SI 3 "=&q"))] - "" - "multmu %0,%1,%2") - (define_insn "mulsidi3" [(set (match_operand:DI 0 "gpc_reg_operand" "=r") --- 1122,1125 ---- *************** *** 1146,1150 **** (sign_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r")))) (clobber (match_scratch:SI 3 "=&q"))] ! "" "multiply %L0,%1,%2\;multm %0,%1,%2" [(set_attr "type" "multi")]) --- 1127,1131 ---- (sign_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r")))) (clobber (match_scratch:SI 3 "=&q"))] ! "TARGET_MULTM" "multiply %L0,%1,%2\;multm %0,%1,%2" [(set_attr "type" "multi")]) *************** *** 1160,1170 **** (clobber (reg:SI 180))]) (parallel [(set (match_dup 4) ! (subreg:SI (mult:DI ! (sign_extend:DI (match_dup 1)) ! (sign_extend:DI (match_dup 2))) 0)) (clobber (reg:SI 180))])] " { operands[3] = operand_subword (operands[0], 1, 1, DImode); ! operands[4] = operand_subword (operands[1], 0, 1, DImode); } ") (define_insn "umulsidi3" --- 1141,1153 ---- (clobber (reg:SI 180))]) (parallel [(set (match_dup 4) ! (truncate:SI ! (lshiftrt:DI ! (mult:DI (sign_extend:DI (match_dup 1)) ! (sign_extend:DI (match_dup 2))) ! (const_int 32)))) (clobber (reg:SI 180))])] " { operands[3] = operand_subword (operands[0], 1, 1, DImode); ! operands[4] = operand_subword (operands[0], 0, 1, DImode); } ") (define_insn "umulsidi3" *************** *** 1173,1177 **** (zero_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r")))) (clobber (match_scratch:SI 3 "=&q"))] ! "" "multiplu %L0,%1,%2\;multmu %0,%1,%2" [(set_attr "type" "multi")]) --- 1156,1160 ---- (zero_extend:DI (match_operand:SI 2 "gpc_reg_operand" "r")))) (clobber (match_scratch:SI 3 "=&q"))] ! "TARGET_MULTM" "multiplu %L0,%1,%2\;multmu %0,%1,%2" [(set_attr "type" "multi")]) *************** *** 1187,1196 **** (clobber (reg:SI 180))]) (parallel [(set (match_dup 4) ! (subreg:SI (mult:DI (zero_extend:DI (match_dup 1)) ! (zero_extend:DI (match_dup 2))) 0)) (clobber (reg:SI 180))])] " { operands[3] = operand_subword (operands[0], 1, 1, DImode); ! operands[4] = operand_subword (operands[1], 0, 1, DImode); } ") (define_insn "smulsi3_highpart" --- 1170,1182 ---- (clobber (reg:SI 180))]) (parallel [(set (match_dup 4) ! (truncate:SI ! (lshiftrt:DI ! (mult:DI (zero_extend:DI (match_dup 1)) ! (zero_extend:DI (match_dup 2))) ! (const_int 32)))) (clobber (reg:SI 180))])] " { operands[3] = operand_subword (operands[0], 1, 1, DImode); ! operands[4] = operand_subword (operands[0], 0, 1, DImode); } ") (define_insn "smulsi3_highpart" *************** *** 1202,1206 **** (const_int 32)))) (clobber (match_scratch:SI 3 "=&q"))] ! "" "multm %0,%1,%2") --- 1188,1192 ---- (const_int 32)))) (clobber (match_scratch:SI 3 "=&q"))] ! "TARGET_MULTM" "multm %0,%1,%2") *************** *** 1213,1217 **** (const_int 32)))) (clobber (match_scratch:SI 3 "=&q"))] ! "" "multmu %0,%1,%2") --- 1199,1203 ---- (const_int 32)))) (clobber (match_scratch:SI 3 "=&q"))] ! "TARGET_MULTM" "multmu %0,%1,%2") diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/t-a29k gcc-2.7.0/config/a29k/t-a29k *** gcc-2.6.3/config/a29k/t-a29k --- gcc-2.7.0/config/a29k/t-a29k Wed May 31 14:54:59 1995 *************** *** 0 **** --- 1,5 ---- + LIBGCC1 = libgcc1.null + CROSS_LIBGCC1 = libgcc1.null + + # We need crt0.o. + LIBGCC1_TEST = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/t-a29kbare gcc-2.7.0/config/a29k/t-a29kbare *** gcc-2.6.3/config/a29k/t-a29kbare --- gcc-2.7.0/config/a29k/t-a29kbare Wed May 31 14:55:03 1995 *************** *** 0 **** --- 1,19 ---- + LIBGCC1 = libgcc1.null + CROSS_LIBGCC1 = libgcc1.null + + # We need crt0.o. + LIBGCC1_TEST = + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... + + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/t-vx29k gcc-2.7.0/config/a29k/t-vx29k *** gcc-2.6.3/config/a29k/t-vx29k --- gcc-2.7.0/config/a29k/t-vx29k Wed May 31 14:55:06 1995 *************** *** 0 **** --- 1,19 ---- + LIBGCC1 = libgcc1.null + CROSS_LIBGCC1 = libgcc1.null + + # We need crt0.o. + LIBGCC1_TEST = + + # We don't want to put exit in libgcc.a for VxWorks, because VxWorks + # does not have _exit. + LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 -Dexit=unused_exit + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/unix.h gcc-2.7.0/config/a29k/unix.h *** gcc-2.6.3/config/a29k/unix.h Thu Dec 23 07:33:33 1993 --- gcc-2.7.0/config/a29k/unix.h Thu Jun 15 09:07:17 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix. ! Copyright (C) 1991, 1993 Free Software Foundation, Inc. ! Contributed by Richard Kenner (kenner@nyu.edu) This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix. ! Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. ! Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 76,79 **** --- 77,84 ---- #define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1; + + /* Default to -fno-pcc-struct-return, since we don't have to worry about + compatibility. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 #if 0 /* This would be needed except that the 29k doesn't have strict diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/vx29k.h gcc-2.7.0/config/a29k/vx29k.h *** gcc-2.6.3/config/a29k/vx29k.h --- gcc-2.7.0/config/a29k/vx29k.h Thu Jun 15 09:07:36 1995 *************** *** 0 **** --- 1,41 ---- + /* Definitions of target machine for GNU compiler. Vxworks 29k version. + Copyright (C) 1994, 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file just exists to give specs for the 29k running on VxWorks. */ + + #include "a29k/a29k-udi.h" + + /* Names to predefine in the preprocessor for this target machine. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-D_AM29K -D_AM29000 -Acpu(a29k) -Amachine(a29k) -D__vxworks -D__vxworks_5" + + /* VxWorks does all the library stuff itself. */ + + #undef LIB_SPEC + #define LIB_SPEC "" + + /* VxWorks provides the functionality of crt0.o and friends itself. */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "crtbegin.o%s" + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "crtend.o%s" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/x-unix gcc-2.7.0/config/a29k/x-unix *** gcc-2.6.3/config/a29k/x-unix Thu Jan 28 07:36:48 1993 --- gcc-2.7.0/config/a29k/x-unix Sat Nov 19 05:34:53 1994 *************** *** 1,2 **** # Needed for missing functions in Sym1. ! CLIB=-lsysv -liberty -lld --- 1,2 ---- # Needed for missing functions in Sym1. ! CLIB=-liberty -lld diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/xm-a29k.h gcc-2.7.0/config/a29k/xm-a29k.h *** gcc-2.6.3/config/a29k/xm-a29k.h Sat Jun 26 11:43:29 1993 --- gcc-2.7.0/config/a29k/xm-a29k.h Thu Jun 15 09:07:50 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/a29k/xm-unix.h gcc-2.7.0/config/a29k/xm-unix.h *** gcc-2.6.3/config/a29k/xm-unix.h Sat Jun 26 11:43:06 1993 --- gcc-2.7.0/config/a29k/xm-unix.h Thu Jun 15 09:08:02 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/alpha.c gcc-2.7.0/config/alpha/alpha.c *** gcc-2.6.3/config/alpha/alpha.c Thu Nov 17 14:45:49 1994 --- gcc-2.7.0/config/alpha/alpha.c Fri Jun 16 06:57:32 1995 *************** *** 1,4 **** /* Subroutines used for code generation on the DEC Alpha. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- /* Subroutines used for code generation on the DEC Alpha. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 59,62 **** --- 60,64 ---- extern char *version_string; + extern int rtx_equal_function_value_matters; /* Declarations of static functions. */ *************** *** 136,143 **** { if (GET_CODE (op) == CONST_INT) ! return ((unsigned HOST_WIDE_INT) (INTVAL (op) + 0x8000) < 0x10000 ! || ((INTVAL (op) & 0xffff) == 0 ! && (INTVAL (op) >> 31 == -1 ! || INTVAL (op) >> 31 == 0))); return register_operand (op, mode); --- 138,144 ---- { if (GET_CODE (op) == CONST_INT) ! return (CONST_OK_FOR_LETTER_P (INTVAL (op), 'K') ! || CONST_OK_FOR_LETTER_P (INTVAL (op), 'L') ! || CONST_OK_FOR_LETTER_P (INTVAL (op), 'O')); return register_operand (op, mode); *************** *** 323,327 **** case SYMBOL_REF: case CONST: ! return mode == DImode; case REG: --- 324,329 ---- case SYMBOL_REF: case CONST: ! /* This handles both the Windows/NT and OSF cases. */ ! return mode == ptr_mode || mode == DImode; case REG: *************** *** 354,357 **** --- 356,360 ---- { return (GET_CODE (op) == SYMBOL_REF + && ! profile_flag && ! profile_block_flag && (SYMBOL_REF_FLAG (op) || op == XEXP (DECL_RTL (current_function_decl), 0))); *************** *** 369,373 **** return (GET_CODE (op) == SYMBOL_REF ! || (GET_CODE (op) == REG && REGNO (op) == 27)); } --- 372,377 ---- return (GET_CODE (op) == SYMBOL_REF ! || (GET_CODE (op) == REG ! && (REGNO (op) == 27 || WINDOWS_NT))); } *************** *** 656,666 **** /* Try to output insns to set TARGET equal to the constant C if it can be ! done in less than N insns. Returns 1 if it can be done and the ! insns have been emitted. If it would take more than N insns, zero is ! returned and no insns and emitted. */ ! int ! alpha_emit_set_const (target, c, n) rtx target; HOST_WIDE_INT c; int n; --- 660,672 ---- /* Try to output insns to set TARGET equal to the constant C if it can be ! done in less than N insns. Do all computations in MODE. Returns the place ! where the output has been placed if it can be done and the insns have been ! emitted. If it would take more than N insns, zero is returned and no ! insns and emitted. */ ! rtx ! alpha_emit_set_const (target, mode, c, n) rtx target; + enum machine_mode mode; HOST_WIDE_INT c; int n; *************** *** 668,671 **** --- 674,682 ---- HOST_WIDE_INT new = c; int i, bits; + /* Use a pseudo if highly optimizing and still generating RTL. */ + rtx subtarget + = (flag_expensive_optimizations && rtx_equal_function_value_matters + ? 0 : target); + rtx temp; #if HOST_BITS_PER_WIDE_INT == 64 *************** *** 674,678 **** cross-compiling on a narrow machine. */ ! if (GET_MODE (target) == SImode) c = (c & 0xffffffff) - 2 * (c & 0x80000000); #endif --- 685,689 ---- cross-compiling on a narrow machine. */ ! if (mode == SImode) c = (c & 0xffffffff) - 2 * (c & 0x80000000); #endif *************** *** 680,687 **** /* If this is a sign-extended 32-bit constant, we can do this in at most three insns, so do it if we have enough insns left. We always have ! a sign-extended 32-bit constant when compiling on a narrow machine. */ ! if (HOST_BITS_PER_WIDE_INT != 64 ! || c >> 31 == -1 || c >> 31 == 0) { HOST_WIDE_INT low = (c & 0xffff) - 2 * (c & 0x8000); --- 691,700 ---- /* If this is a sign-extended 32-bit constant, we can do this in at most three insns, so do it if we have enough insns left. We always have ! a sign-extended 32-bit constant when compiling on a narrow machine. ! Note that we cannot handle the constant 0x80000000. */ ! if ((HOST_BITS_PER_WIDE_INT != 64 ! || c >> 31 == -1 || c >> 31 == 0) ! && c != 0x80000000u) { HOST_WIDE_INT low = (c & 0xffff) - 2 * (c & 0x8000); *************** *** 702,729 **** if (c == low || (low == 0 && extra == 0)) ! { ! emit_move_insn (target, GEN_INT (c)); ! return 1; ! } else if (n >= 2 + (extra != 0)) { ! emit_move_insn (target, GEN_INT (low)); if (extra != 0) ! emit_insn (gen_add2_insn (target, GEN_INT (extra << 16))); ! emit_insn (gen_add2_insn (target, GEN_INT (high << 16))); ! return 1; } } ! /* If we couldn't do it that way, try some other methods (that depend on ! being able to compute in the target's word size). But if we have no ! instructions left, don't bother. Also, don't even try if this is ! SImode (in which case we should have already done something, but ! do a sanity check here). */ ! if (n == 1 || HOST_BITS_PER_WIDE_INT < 64 || GET_MODE (target) != DImode) return 0; /* First, see if can load a value into the target that is the same as the constant except that all bytes that are 0 are changed to be 0xff. If we --- 715,742 ---- if (c == low || (low == 0 && extra == 0)) ! return copy_to_suggested_reg (GEN_INT (c), target, mode); else if (n >= 2 + (extra != 0)) { ! temp = copy_to_suggested_reg (GEN_INT (low), subtarget, mode); ! if (extra != 0) ! temp = expand_binop (mode, add_optab, temp, GEN_INT (extra << 16), ! subtarget, 0, OPTAB_WIDEN); ! return expand_binop (mode, add_optab, temp, GEN_INT (high << 16), ! target, 0, OPTAB_WIDEN); } } ! /* If we couldn't do it that way, try some other methods. But if we have ! no instructions left, don't bother. Likewise, if this is SImode and ! we can't make pseudos, we can't do anything since the expand_binop ! and expand_unop calls will widen and try to make pseudos. */ ! if (n == 1 ! || (mode == SImode && ! rtx_equal_function_value_matters)) return 0; + #if HOST_BITS_PER_WIDE_INT == 64 /* First, see if can load a value into the target that is the same as the constant except that all bytes that are 0 are changed to be 0xff. If we *************** *** 734,744 **** new |= (HOST_WIDE_INT) 0xff << i; ! if (alpha_emit_set_const (target, new, n - 1)) ! { ! emit_insn (gen_anddi3 (target, target, GEN_INT (c | ~ new))); ! return 1; ! } ! /* Find, see if we can load a related constant and then shift and possibly negate it to get the constant we want. Try this once each increasing numbers of insns. */ --- 747,756 ---- new |= (HOST_WIDE_INT) 0xff << i; ! if ((temp = alpha_emit_set_const (subtarget, mode, new, n - 1)) != 0) ! return expand_binop (mode, and_optab, temp, GEN_INT (c | ~ new), ! target, 0, OPTAB_WIDEN); ! #endif ! /* Next, see if we can load a related constant and then shift and possibly negate it to get the constant we want. Try this once each increasing numbers of insns. */ *************** *** 747,757 **** { /* First try complementing. */ ! if (alpha_emit_set_const (target, ~ c, i)) ! { ! emit_insn (gen_one_cmpldi2 (target, target)); ! return 1; ! } ! /* First try to form a constant and do a left shift. We can do this if some low-order bits are zero; the exact_log2 call below tells us that information. The bits we are shifting out could be any --- 759,766 ---- { /* First try complementing. */ ! if ((temp = alpha_emit_set_const (subtarget, mode, ~ c, i)) != 0) ! return expand_unop (mode, one_cmpl_optab, temp, target, 0); ! /* Next try to form a constant and do a left shift. We can do this if some low-order bits are zero; the exact_log2 call below tells us that information. The bits we are shifting out could be any *************** *** 764,775 **** if ((bits = exact_log2 (c & - c)) > 0) for (; bits > 0; bits--) ! if (alpha_emit_set_const (target, c >> bits, i) ! || alpha_emit_set_const (target, ! ((unsigned HOST_WIDE_INT) c) >> bits, ! i)) ! { ! emit_insn (gen_ashldi3 (target, target, GEN_INT (bits))); ! return 1; ! } /* Now try high-order zero bits. Here we try the shifted-in bits as --- 773,785 ---- if ((bits = exact_log2 (c & - c)) > 0) for (; bits > 0; bits--) ! if ((temp = (alpha_emit_set_const ! (subtarget, mode, ! (unsigned HOST_WIDE_INT) c >> bits, i))) != 0 ! || ((temp = (alpha_emit_set_const ! (subtarget, mode, ! ((unsigned HOST_WIDE_INT) c) >> bits, i))) ! != 0)) ! return expand_binop (mode, ashl_optab, temp, GEN_INT (bits), ! target, 0, OPTAB_WIDEN); /* Now try high-order zero bits. Here we try the shifted-in bits as *************** *** 778,790 **** if ((bits = HOST_BITS_PER_WIDE_INT - floor_log2 (c) - 1) > 0) for (; bits > 0; bits--) ! if (alpha_emit_set_const (target, c << bits, i) ! || alpha_emit_set_const (target, ! ((c << bits) ! | (((HOST_WIDE_INT) 1 << bits) - 1)), ! i)) ! { ! emit_insn (gen_lshrdi3 (target, target, GEN_INT (bits))); ! return 1; ! } /* Now try high-order 1 bits. We get that with a sign-extension. --- 788,800 ---- if ((bits = HOST_BITS_PER_WIDE_INT - floor_log2 (c) - 1) > 0) for (; bits > 0; bits--) ! if ((temp = alpha_emit_set_const (subtarget, mode, ! c << bits, i)) != 0 ! || ((temp = (alpha_emit_set_const ! (subtarget, mode, ! ((c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1)), ! i))) ! != 0)) ! return expand_binop (mode, lshr_optab, temp, GEN_INT (bits), ! target, 0, OPTAB_WIDEN); /* Now try high-order 1 bits. We get that with a sign-extension. *************** *** 793,805 **** if ((bits = HOST_BITS_PER_WIDE_INT - floor_log2 (~ c) - 2) > 0) for (; bits > 0; bits--) ! if (alpha_emit_set_const (target, c << bits, i) ! || alpha_emit_set_const (target, ! ((c << bits) ! | (((HOST_WIDE_INT) 1 << bits) - 1)), ! i)) ! { ! emit_insn (gen_ashrdi3 (target, target, GEN_INT (bits))); ! return 1; ! } } --- 803,815 ---- if ((bits = HOST_BITS_PER_WIDE_INT - floor_log2 (~ c) - 2) > 0) for (; bits > 0; bits--) ! if ((temp = alpha_emit_set_const (subtarget, mode, ! c << bits, i)) != 0 ! || ((temp = (alpha_emit_set_const ! (subtarget, mode, ! ((c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1)), ! i))) ! != 0)) ! return expand_binop (mode, ashr_optab, temp, GEN_INT (bits), ! target, 0, OPTAB_WIDEN); } *************** *** 1054,1057 **** --- 1064,1084 ---- break; + case 'c': + /* Similar to `c', but swap. We can't get unsigned here either. */ + if (GET_RTX_CLASS (GET_CODE (x)) != '<') + output_operand_lossage ("invalid %%D value"); + + fprintf (file, "%s", GET_RTX_NAME (swap_condition (GET_CODE (x)))); + break; + + case 'd': + /* Similar, but reverse and swap. We can't get unsigned here either. */ + if (GET_RTX_CLASS (GET_CODE (x)) != '<') + output_operand_lossage ("invalid %%D value"); + + fprintf (file, "%s", + GET_RTX_NAME (swap_condition (reverse_condition ((GET_CODE (x)))))); + break; + case 'E': /* Write the divide or modulus operator. */ *************** *** 1126,1133 **** argsize above, but which are not actually stored on the stack. */ ! addr = (current_function_args_info <= 6 ? plus_constant (virtual_incoming_args_rtx, 6 * UNITS_PER_WORD) : plus_constant (virtual_incoming_args_rtx, - (6 * UNITS_PER_WORD))); /* Allocate the va_list constructor */ block = assign_stack_local (BLKmode, 2 * UNITS_PER_WORD, BITS_PER_WORD); --- 1153,1162 ---- argsize above, but which are not actually stored on the stack. */ ! addr = (current_function_args_info <= 5 + stdarg ? plus_constant (virtual_incoming_args_rtx, 6 * UNITS_PER_WORD) : plus_constant (virtual_incoming_args_rtx, - (6 * UNITS_PER_WORD))); + addr = force_operand (addr, NULL_RTX); + /* Allocate the va_list constructor */ block = assign_stack_local (BLKmode, 2 * UNITS_PER_WORD, BITS_PER_WORD); *************** *** 1135,1147 **** RTX_UNCHANGING_P (XEXP (block, 0)) = 1; ! /* Store the address of the first integer register in the ! __va_base member. */ ! emit_move_insn (change_address (block, Pmode, XEXP (block, 0)), ! force_operand (addr, NULL_RTX)); /* Store the argsize as the __va_offset member. */ ! emit_move_insn (change_address (block, Pmode, plus_constant (XEXP (block, 0), ! UNITS_PER_WORD)), force_operand (argsize, NULL_RTX)); --- 1164,1181 ---- RTX_UNCHANGING_P (XEXP (block, 0)) = 1; ! /* Store the address of the first integer register in the __base member. ! Note that our offsets are correct for both 32- and 64-bit pointers ! due to the alignment of the __offset field (a long). */ + #ifdef POINTERS_EXTEND_UNSIGNED + addr = convert_memory_address (ptr_mode, addr); + #endif + + emit_move_insn (change_address (block, ptr_mode, XEXP (block, 0)), addr); + /* Store the argsize as the __va_offset member. */ ! emit_move_insn (change_address (block, ptr_mode, plus_constant (XEXP (block, 0), ! GET_MODE_SIZE (ptr_mode))), force_operand (argsize, NULL_RTX)); *************** *** 1186,1189 **** --- 1220,1224 ---- return (reload_completed && alpha_sa_size () == 0 && get_frame_size () == 0 + && current_function_outgoing_args_size == 0 && current_function_pretend_args_size == 0); } *************** *** 1192,1196 **** cross-compiler. Otherwise, use the versions in /usr/include/stamp.h. */ ! #ifndef CROSS_COMPILE #include #endif --- 1227,1231 ---- cross-compiler. Otherwise, use the versions in /usr/include/stamp.h. */ ! #if !defined(CROSS_COMPILE) && !defined(_WIN32) #include #endif *************** *** 1295,1299 **** Outputting the lineno helps debugging of one line functions as they would otherwise get no line number at all. Please note that we would ! like to put out last_linenum from final.c, but it is not accesible. */ if (write_symbols == SDB_DEBUG) --- 1330,1334 ---- Outputting the lineno helps debugging of one line functions as they would otherwise get no line number at all. Please note that we would ! like to put out last_linenum from final.c, but it is not accessible. */ if (write_symbols == SDB_DEBUG) *************** *** 1323,1328 **** /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first. Even if we are a static function, we still need to do this in case ! our address is taken and passed to something like qsort. */ alpha_function_needs_gp = 0; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) --- 1358,1365 ---- /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first. Even if we are a static function, we still need to do this in case ! our address is taken and passed to something like qsort. + We never need a GP for Windows/NT. */ + alpha_function_needs_gp = 0; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) *************** *** 1338,1347 **** } ! if (alpha_function_needs_gp) ! fprintf (file, "\tldgp $29,0($27)\n"); ! /* Put a label after the GP load so we can enter the function at it. */ ! assemble_name (file, alpha_function_name); ! fprintf (file, "..ng:\n"); /* Adjust the stack by the frame size. If the frame size is > 4096 --- 1375,1387 ---- } ! if (WINDOWS_NT == 0) ! { ! if (alpha_function_needs_gp) ! fprintf (file, "\tldgp $29,0($27)\n"); ! /* Put a label after the GP load so we can enter the function at it. */ ! assemble_name (file, alpha_function_name); ! fprintf (file, "..ng:\n"); ! } /* Adjust the stack by the frame size. If the frame size is > 4096 *************** *** 1359,1375 **** { int probed = 4096; - int regnum = 2; /* $1 is static chain, so start with $2. */ ! fprintf (file, "\tldq $%d,-%d($30)\n", regnum++, probed); while (probed + 8192 < frame_size) ! fprintf (file, "\tldq $%d,-%d($30)\n", regnum++, probed += 8192); /* We only have to do this probe if we aren't saving registers. */ if (sa_size == 0 && probed + 4096 < frame_size) ! fprintf (file, "\tldq $%d,-%d($30)\n", regnum++, probed += 4096); ! ! if (regnum > 9) ! abort (); } --- 1399,1411 ---- { int probed = 4096; ! fprintf (file, "\tstq $31,-%d($30)\n", probed); while (probed + 8192 < frame_size) ! fprintf (file, "\tstq $31,-%d($30)\n", probed += 8192); /* We only have to do this probe if we aren't saving registers. */ if (sa_size == 0 && probed + 4096 < frame_size) ! fprintf (file, "\tstq $31,-%d($30)\n", frame_size); } *************** *** 1395,1399 **** fprintf (file, "..sc:\n"); ! fprintf (file, "\tldq $6,-8192($4)\n"); fprintf (file, "\tsubq $5,1,$5\n"); fprintf (file, "\tlda $4,-8192($4)\n"); --- 1431,1435 ---- fprintf (file, "..sc:\n"); ! fprintf (file, "\tstq $31,-8192($4)\n"); fprintf (file, "\tsubq $5,1,$5\n"); fprintf (file, "\tlda $4,-8192($4)\n"); *************** *** 1403,1410 **** fprintf (file, "..sc\n"); - fprintf (file, "\tlda $30,-%d($4)\n", leftover); - if (leftover > 4096 && sa_size == 0) ! fprintf (file, "\tldq $2,%d($30)\n", leftover - 4096); } --- 1439,1446 ---- fprintf (file, "..sc\n"); if (leftover > 4096 && sa_size == 0) ! fprintf (file, "\tstq $31,-%d($4)\n", leftover); ! ! fprintf (file, "\tlda $30,-%d($4)\n", leftover); } *************** *** 1491,1495 **** if (insn == 0 || GET_CODE (insn) != BARRIER) { ! int fp_offset; /* If we have a frame pointer, restore SP from it. */ --- 1527,1531 ---- if (insn == 0 || GET_CODE (insn) != BARRIER) { ! int fp_offset = 0; /* If we have a frame pointer, restore SP from it. */ *************** *** 1538,1542 **** now. This must be done in one instruction immediately before the SP update. */ ! if (restore_fp) fprintf (file, "\tldq $15,%d($30)\n", fp_offset); --- 1574,1578 ---- now. This must be done in one instruction immediately before the SP update. */ ! if (restore_fp && fp_offset) fprintf (file, "\tldq $15,%d($30)\n", fp_offset); *************** *** 1560,1563 **** --- 1596,1602 ---- fprintf (file, "\n"); inside_function = FALSE; + + /* Show that we know this function if it is called again. */ + SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/alpha.h gcc-2.7.0/config/alpha/alpha.h *** gcc-2.6.3/config/alpha/alpha.h Wed Nov 30 18:40:14 1994 --- gcc-2.7.0/config/alpha/alpha.h Thu Jun 15 09:08:45 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for DEC Alpha. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- /* Definitions of target machine for GNU compiler, for DEC Alpha. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 43,47 **** /* No point in running CPP on our assembler output. */ ! #define ASM_SPEC "-nocpp" /* Under OSF/1, -p and -pg require -lprof1. */ --- 44,48 ---- /* No point in running CPP on our assembler output. */ ! #define ASM_SPEC "-nocpp %{pg}" /* Under OSF/1, -p and -pg require -lprof1. */ *************** *** 53,58 **** -call_shared as appropriate. Also pass -pg. */ #define LINK_SPEC \ ! "-G 8 %{O*:-O3} %{!O*:-O1} %{!shared:-init __main} %{static:-non_shared} \ ! %{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg}" #define STARTFILE_SPEC \ --- 54,67 ---- -call_shared as appropriate. Also pass -pg. */ #define LINK_SPEC \ ! "-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \ ! %{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \ ! %{rpath*}" ! ! #define WORD_SWITCH_TAKES_ARG(STR) \ ! (!strcmp (STR, "rpath") || !strcmp (STR, "include") \ ! || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \ ! || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \ ! || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \ ! || !strcmp (STR, "isystem")) #define STARTFILE_SPEC \ *************** *** 62,65 **** --- 71,79 ---- #define TARGET_VERSION + /* Default this to not be compiling for Windows/NT. */ + #ifndef WINDOWS_NT + #define WINDOWS_NT 0 + #endif + /* Define the location for the startup file on OSF/1 for Alpha. */ *************** *** 326,330 **** $0 (likewise, but return value) $21-$16 (likewise, but input args) ! $27 (procedure value) $9-$14 (saved integer registers) $26 (return PC) --- 340,344 ---- $0 (likewise, but return value) $21-$16 (likewise, but input args) ! $27 (procedure value in OSF, nonsaved in NT) $9-$14 (saved integer registers) $26 (return PC) *************** *** 489,493 **** : (C) == 'K' ? (unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000 \ : (C) == 'L' ? (((VALUE) & 0xffff) == 0 \ ! && (((VALUE)) >> 31 == -1 || (VALUE) >> 31 == 0)) \ : (C) == 'M' ? zap_mask (VALUE) \ : (C) == 'N' ? (unsigned HOST_WIDE_INT) (~ (VALUE)) < 0x100 \ --- 503,509 ---- : (C) == 'K' ? (unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000 \ : (C) == 'L' ? (((VALUE) & 0xffff) == 0 \ ! && (((VALUE)) >> 31 == -1 || (VALUE) >> 31 == 0) \ ! && ((HOST_BITS_PER_WIDE_INT == 64 \ ! || (unsigned) (VALUE) != 0x80000000u))) \ : (C) == 'M' ? zap_mask (VALUE) \ : (C) == 'N' ? (unsigned HOST_WIDE_INT) (~ (VALUE)) < 0x100 \ *************** *** 538,542 **** usually requires a scratch register. The exceptions are loading QImode and HImode from an aligned address to a general register. ! We also cannot load an unaligned address into an FP register. */ #define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,IN) \ --- 554,559 ---- usually requires a scratch register. The exceptions are loading QImode and HImode from an aligned address to a general register. ! We also cannot load an unaligned address or a paradoxical SUBREG into an ! FP register. */ #define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,IN) \ *************** *** 554,557 **** --- 571,577 ---- : ((CLASS) == FLOAT_REGS && GET_CODE (IN) == MEM \ && GET_CODE (XEXP (IN, 0)) == AND) ? GENERAL_REGS \ + : ((CLASS) == FLOAT_REGS && GET_CODE (IN) == SUBREG \ + && (GET_MODE_SIZE (GET_MODE (IN)) \ + > GET_MODE_SIZE (GET_MODE (SUBREG_REG (IN))))) ? GENERAL_REGS \ : NO_REGS) *************** *** 568,572 **** : ((CLASS) == FLOAT_REGS && GET_CODE (OUT) == MEM \ && GET_CODE (XEXP (OUT, 0)) == AND) ? GENERAL_REGS \ ! : NO_REGS) /* If we are copying between general and FP registers, we need a memory --- 588,595 ---- : ((CLASS) == FLOAT_REGS && GET_CODE (OUT) == MEM \ && GET_CODE (XEXP (OUT, 0)) == AND) ? GENERAL_REGS \ ! : ((CLASS) == FLOAT_REGS && GET_CODE (OUT) == SUBREG \ ! && (GET_MODE_SIZE (GET_MODE (OUT)) \ ! > GET_MODE_SIZE (GET_MODE (SUBREG_REG (OUT))))) ? GENERAL_REGS \ ! : NO_REGS) /* If we are copying between general and FP registers, we need a memory *************** *** 582,585 **** --- 605,609 ---- #define SECONDARY_MEMORY_NEEDED_MODE(MODE) \ (GET_MODE_CLASS (MODE) == MODE_FLOAT ? (MODE) \ + : GET_MODE_SIZE (MODE) >= 4 ? (MODE) \ : mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (MODE), 0)) *************** *** 702,710 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 726,735 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 718,727 **** #define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx (REG, \ ! ((TREE_CODE (VALTYPE) == INTEGER_TYPE \ ! || TREE_CODE (VALTYPE) == ENUMERAL_TYPE \ ! || TREE_CODE (VALTYPE) == BOOLEAN_TYPE \ ! || TREE_CODE (VALTYPE) == CHAR_TYPE \ ! || TREE_CODE (VALTYPE) == POINTER_TYPE \ ! || TREE_CODE (VALTYPE) == OFFSET_TYPE) \ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ ? word_mode : TYPE_MODE (VALTYPE), \ --- 743,747 ---- #define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx (REG, \ ! (INTEGRAL_MODE_P (TYPE_MODE (VALTYPE)) \ && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \ ? word_mode : TYPE_MODE (VALTYPE), \ *************** *** 883,886 **** --- 903,913 ---- } + /* Try to output insns to set TARGET equal to the constant C if it can be + done in less than N insns. Do all computations in MODE. Returns the place + where the output has been placed if it can be done and the insns have been + emitted. If it would take more than N insns, zero is returned and no + insns and emitted. */ + extern struct rtx_def *alpha_emit_set_const (); + /* Generate necessary RTL for __builtin_saveregs(). ARGLIST is the argument list; see expr.c. */ *************** *** 916,932 **** /* Output assembler code to FILE to increment profiler label # LABELNO ! for profiling a function entry. Profiling for gprof does not ! require LABELNO so we don't reference it at all. This does, ! however, mean that -p won't work. But OSF/1 doesn't support the ! traditional prof anyways, so there is no good reason to be ! backwards compatible. */ ! ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! do { \ ! fputs ("\tlda $28,_mcount\n", (FILE)); \ ! fputs ("\tjsr $28,($28),_mcount\n", (FILE)); \ ! fputs ("\tldgp $29,0($27)\n", (FILE)); \ ! } while (0); /* Output assembler code to FILE to initialize this source file's --- 943,950 ---- /* Output assembler code to FILE to increment profiler label # LABELNO ! for profiling a function entry. Under OSF/1, profiling is enabled ! by simply passing -pg to the assembler and linker. */ + #define FUNCTION_PROFILER(FILE, LABELNO) /* Output assembler code to FILE to initialize this source file's *************** *** 1292,1296 **** On the Alpha, the table is really GP-relative, not relative to the PC of the table, but we pretend that it is PC-relative; this should be OK, ! but we hsould try to find some better way sometime. */ #define CASE_VECTOR_PC_RELATIVE --- 1310,1314 ---- On the Alpha, the table is really GP-relative, not relative to the PC of the table, but we pretend that it is PC-relative; this should be OK, ! but we should try to find some better way sometime. */ #define CASE_VECTOR_PC_RELATIVE *************** *** 1437,1443 **** #define RTX_COSTS(X,CODE,OUTER_CODE) \ ! case PLUS: \ ! case MINUS: \ ! if (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \ return COSTS_N_INSNS (6); \ else if (GET_CODE (XEXP (X, 0)) == MULT \ --- 1455,1460 ---- #define RTX_COSTS(X,CODE,OUTER_CODE) \ ! case PLUS: case MINUS: \ ! if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (6); \ else if (GET_CODE (XEXP (X, 0)) == MULT \ *************** *** 1447,1451 **** break; \ case MULT: \ ! if (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \ return COSTS_N_INSNS (6); \ return COSTS_N_INSNS (23); \ --- 1464,1468 ---- break; \ case MULT: \ ! if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (6); \ return COSTS_N_INSNS (23); \ *************** *** 1457,1464 **** case ASHIFTRT: case LSHIFTRT: case IF_THEN_ELSE: \ return COSTS_N_INSNS (2); \ ! case DIV: \ ! case UDIV: \ ! case MOD: \ ! case UMOD: \ if (GET_MODE (X) == SFmode) \ return COSTS_N_INSNS (34); \ --- 1474,1478 ---- case ASHIFTRT: case LSHIFTRT: case IF_THEN_ELSE: \ return COSTS_N_INSNS (2); \ ! case DIV: case UDIV: case MOD: case UMOD: \ if (GET_MODE (X) == SFmode) \ return COSTS_N_INSNS (34); \ *************** *** 1468,1472 **** return COSTS_N_INSNS (70); \ case MEM: \ ! return COSTS_N_INSNS (3); /* Control the assembler format that we output. */ --- 1482,1493 ---- return COSTS_N_INSNS (70); \ case MEM: \ ! return COSTS_N_INSNS (3); \ ! case FLOAT: case UNSIGNED_FLOAT: case FIX: case UNSIGNED_FIX: \ ! case FLOAT_EXTEND: case FLOAT_TRUNCATE: \ ! return COSTS_N_INSNS (6); \ ! case NEG: case ABS: \ ! if (FLOAT_MODE_P (GET_MODE (X))) \ ! return COSTS_N_INSNS (6); \ ! break; /* Control the assembler format that we output. */ *************** *** 1504,1508 **** /* Define an extra section for read-only data, a routine to enter it, and ! indicate that it is for read-only data. */ #define EXTRA_SECTIONS readonly_data --- 1525,1533 ---- /* Define an extra section for read-only data, a routine to enter it, and ! indicate that it is for read-only data. ! ! The first timem we enter the readonly data sectiono for a file, we write ! eight bytes of zero. This works around a bug in DEC's assembler in ! some versions of OSF/1 V3.x. */ #define EXTRA_SECTIONS readonly_data *************** *** 1514,1518 **** --- 1539,1551 ---- if (in_section != readonly_data) \ { \ + static int firsttime = 1; \ + \ fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ + if (firsttime) \ + { \ + firsttime = 0; \ + ASM_OUTPUT_DOUBLE_INT (asm_out_file, const0_rtx); \ + } \ + \ in_section = readonly_data; \ } \ *************** *** 1524,1532 **** special. We use this to see indicate we can branch to this function without setting PV or restoring GP. */ - /* For 2.6, don't do this if we're compiling C++. */ #define ENCODE_SECTION_INFO(DECL) \ ! if (TREE_CODE (DECL) == FUNCTION_DECL && ! TREE_PUBLIC (DECL) \ ! && strcmp (lang_identify (), "cplusplus") != 0) \ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; --- 1557,1563 ---- special. We use this to see indicate we can branch to this function without setting PV or restoring GP. */ #define ENCODE_SECTION_INFO(DECL) \ ! if (TREE_CODE (DECL) == FUNCTION_DECL && ! TREE_PUBLIC (DECL)) \ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; *************** *** 1637,1643 **** #define ASM_OUTPUT_INT(FILE,VALUE) \ ! fprintf (FILE, "\t.long %d\n", \ ! (GET_CODE (VALUE) == CONST_INT \ ! ? INTVAL (VALUE) & 0xffffffff : (abort (), 0))) /* This is how to output an assembler line defining a `long' constant. */ --- 1668,1674 ---- #define ASM_OUTPUT_INT(FILE,VALUE) \ ! ( fprintf (FILE, "\t.long "), \ ! output_addr_const (FILE, (VALUE)), \ ! fprintf (FILE, "\n")) /* This is how to output an assembler line defining a `long' constant. */ *************** *** 1733,1738 **** --- 1764,1774 ---- /* This is how to output an element of a case-vector that is relative. */ + #if WINDOWS_NT #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ + fprintf (FILE, "\t.long $%d\n", (VALUE) + 32) + #else + #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ fprintf (FILE, "\t.gprel32 $%d\n", (VALUE) + 32) + #endif /* This is how to output an assembler line *************** *** 2027,2030 **** /* The linker will stick __main into the .init section. */ #define HAS_INIT_SECTION ! #define INIT_NAME_FORMAT "__init_%s" ! #define FINI_NAME_FORMAT "__fini_%s" --- 2063,2069 ---- /* The linker will stick __main into the .init section. */ #define HAS_INIT_SECTION ! #define LD_INIT_SWITCH "-init" ! #define LD_FINI_SWITCH "-fini" ! ! /* We do want to link in libgcc when building shared libraries under OSF/1. */ ! #define LIBGCC_SPEC "-lgcc" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/alpha.md gcc-2.7.0/config/alpha/alpha.md *** gcc-2.6.3/config/alpha/alpha.md Thu Nov 17 14:45:56 1994 --- gcc-2.7.0/config/alpha/alpha.md Thu Jun 15 16:45:25 1995 *************** *** 1,4 **** ;; Machine description for DEC Alpha for GNU C compiler ! ;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- ;; Machine description for DEC Alpha for GNU C compiler ! ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** ;; 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. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. *************** *** 276,283 **** (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=&r") ! (plus:DI (plus:DI (match_operand:DI 1 "register_operand" "r") ! (match_operand:DI 2 "register_operand" "r")) ! (match_operand:DI 3 "add_operand" "rIOKL")))] "reload_in_progress" "#" --- 277,284 ---- (define_insn "" ! [(set (match_operand:DI 0 "some_operand" "=&r") ! (plus:DI (plus:DI (match_operand:DI 1 "some_operand" "r") ! (match_operand:DI 2 "some_operand" "r")) ! (match_operand:DI 3 "some_operand" "rIOKL")))] "reload_in_progress" "#" *************** *** 295,303 **** (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=&r") (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "some_operand" "rJ") (match_operand:SI 2 "const48_operand" "I")) ! (match_operand:SI 3 "register_operand" "r")) ! (match_operand:SI 4 "add_operand" "rIOKL")))] "reload_in_progress" "#" --- 296,304 ---- (define_insn "" ! [(set (match_operand:SI 0 "some_operand" "=&r") (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "some_operand" "rJ") (match_operand:SI 2 "const48_operand" "I")) ! (match_operand:SI 3 "some_operand" "r")) ! (match_operand:SI 4 "some_operand" "rIOKL")))] "reload_in_progress" "#" *************** *** 317,327 **** (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=&r") (sign_extend:DI (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "some_operand" "rJ") (match_operand:SI 2 "const48_operand" "I")) ! (match_operand:SI 3 "register_operand" "r")) ! (match_operand:SI 4 "add_operand" "rIOKL"))))] "reload_in_progress" "#" --- 318,328 ---- (define_insn "" ! [(set (match_operand:DI 0 "some_operand" "=&r") (sign_extend:DI (plus:SI (plus:SI (mult:SI (match_operand:SI 1 "some_operand" "rJ") (match_operand:SI 2 "const48_operand" "I")) ! (match_operand:SI 3 "some_operand" "r")) ! (match_operand:SI 4 "some_operand" "rIOKL"))))] "reload_in_progress" "#" *************** *** 345,355 **** (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=&r") (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "some_operand" "rJ") (match_operand:DI 2 "const48_operand" "I")) ! (match_operand:DI 3 "register_operand" "r")) ! (match_operand:DI 4 "add_operand" "rIOKL")))] "reload_in_progress" ! "s%2addq %r1,%3,%0\;addq %0,%4,%0" [(set_attr "type" "iaddlog")]) --- 346,356 ---- (define_insn "" ! [(set (match_operand:DI 0 "some_operand" "=&r") (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "some_operand" "rJ") (match_operand:DI 2 "const48_operand" "I")) ! (match_operand:DI 3 "some_operand" "r")) ! (match_operand:DI 4 "some_operand" "rIOKL")))] "reload_in_progress" ! "#" [(set_attr "type" "iaddlog")]) *************** *** 786,804 **** [(set_attr "type" "iaddlog,shiftcm")]) ! (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (sign_extend:DI ! (subreg:SI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") ! (match_operand:DI 2 "const_int_operand" "P")) ! 0)))] ! "INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3" ! "* ! { ! if (operands[2] == const1_rtx) ! return \"addl %r1,%r1,%0\"; ! else ! return \"s%P2addl %r1,0,%0\"; ! }" ! [(set_attr "type" "iaddlog")]) (define_insn "lshrdi3" --- 787,808 ---- [(set_attr "type" "iaddlog,shiftcm")]) ! ;; ??? The following pattern is made by combine, but earlier phases ! ;; (specifically flow) can't handle it. This occurs in jump.c. Deal ! ;; with this in a better way at some point. ! ;;(define_insn "" ! ;; [(set (match_operand:DI 0 "register_operand" "=r") ! ;; (sign_extend:DI ! ;; (subreg:SI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") ! ;; (match_operand:DI 2 "const_int_operand" "P")) ! ;; 0)))] ! ;; "INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3" ! ;; "* ! ;;{ ! ;; if (operands[2] == const1_rtx) ! ;; return \"addl %r1,%r1,%0\"; ! ;; else ! ;; return \"s%P2addl %r1,0,%0\"; ! ;; }" ! ;; [(set_attr "type" "iaddlog")]) (define_insn "lshrdi3" *************** *** 1302,1317 **** [(set_attr "type" "icmp")]) (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=r,r") (if_then_else:DI (match_operator 2 "signed_comparison_operator" ! [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ") ! (const_int 0)]) ! (match_operand:DI 1 "reg_or_8bit_operand" "rI,0") ! (match_operand:DI 4 "reg_or_8bit_operand" "0,rI")))] ! "" "@ cmov%C2 %r3,%1,%0 ! cmov%D2 %r3,%4,%0") (define_insn "" --- 1306,1341 ---- [(set_attr "type" "icmp")]) + ;; This pattern exists so conditional moves of SImode values are handled. + ;; Comparisons are still done in DImode though. + (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") (if_then_else:DI (match_operator 2 "signed_comparison_operator" ! [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") ! (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) ! (match_operand:SI 1 "reg_or_8bit_operand" "rI,0,rI,0") ! (match_operand:SI 5 "reg_or_8bit_operand" "0,rI,0,rI")))] ! "operands[3] == const0_rtx || operands[4] == const0_rtx" ! "@ ! cmov%C2 %r3,%1,%0 ! cmov%D2 %r3,%5,%0 ! cmov%c2 %r4,%1,%0 ! cmov%d2 %r4,%5,%0") ! ! (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") ! (if_then_else:DI ! (match_operator 2 "signed_comparison_operator" ! [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") ! (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) ! (match_operand:DI 1 "reg_or_8bit_operand" "rI,0,rI,0") ! (match_operand:DI 5 "reg_or_8bit_operand" "0,rI,0,rI")))] ! "operands[3] == const0_rtx || operands[4] == const0_rtx" "@ cmov%C2 %r3,%1,%0 ! cmov%D2 %r3,%5,%0 ! cmov%c2 %r4,%1,%0 ! cmov%d2 %r4,%5,%0") (define_insn "" *************** *** 2200,2203 **** --- 2224,2403 ---- }") + ;; These are the main define_expand's used to make conditional moves. + + (define_expand "movsicc" + [(set (match_dup 4) (match_operand 1 "comparison_operator" "")) + (set (match_operand:SI 0 "register_operand" "") + (if_then_else:DI (match_dup 5) + (match_operand:SI 2 "reg_or_8bit_operand" "") + (match_operand:SI 3 "reg_or_8bit_operand" "")))] + "" + " + { + rtx op0,op1; + enum rtx_code code = GET_CODE (operands[1]), code2 = NE; + + if (alpha_compare_fp_p) + FAIL; + switch (code) + { + case EQ: case LE: case LT: + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case NE: + code = code2 = EQ; + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case GE: + code = LE; + op0 = force_reg (DImode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + case GT: + code = LT; + op0 = force_reg (DImode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + default: + FAIL; + } + operands[1] = gen_rtx (code, DImode, op0, op1); + operands[4] = gen_reg_rtx (DImode); + operands[5] = gen_rtx (code2, VOIDmode, operands[4], CONST0_RTX (DImode)); + }") + + (define_expand "movdicc" + [(set (match_dup 4) (match_operand 1 "comparison_operator" "")) + (set (match_operand:DI 0 "register_operand" "") + (if_then_else:DI (match_dup 5) + (match_operand:DI 2 "reg_or_8bit_operand" "") + (match_operand:DI 3 "reg_or_8bit_operand" "")))] + "" + " + { + rtx op0,op1; + enum rtx_code code = GET_CODE (operands[1]), code2 = NE; + + if (alpha_compare_fp_p) + FAIL; + switch (code) + { + case EQ: case LE: case LT: + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case NE: + code = code2 = EQ; + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case GE: + code = LE; + op0 = force_reg (DImode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + case GT: + code = LT; + op0 = force_reg (DImode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + default: + FAIL; + } + operands[1] = gen_rtx (code, DImode, op0, op1); + operands[4] = gen_reg_rtx (DImode); + operands[5] = gen_rtx (code2, VOIDmode, operands[4], CONST0_RTX (DImode)); + }") + + (define_expand "movsfcc" + [(set (match_dup 4) (match_operand 1 "comparison_operator" "")) + (set (match_operand:SF 0 "register_operand" "") + (if_then_else:SF (match_dup 5) + (match_operand:SF 2 "reg_or_fp0_operand" "") + (match_operand:SF 3 "reg_or_fp0_operand" "")))] + "" + " + { + rtx op0,op1; + enum rtx_code code = GET_CODE (operands[1]), code2 = NE; + + if (!alpha_compare_fp_p) + FAIL; + switch (code) + { + case EQ: case LE: case LT: + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case NE: + /* There isn't a cmptne insn. */ + code = code2 = EQ; + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case GE: + code = LE; + op0 = force_reg (DFmode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + case GT: + code = LT; + op0 = force_reg (DFmode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + default: + FAIL; + } + operands[1] = gen_rtx (code, DFmode, op0, op1); + operands[4] = gen_reg_rtx (DFmode); + operands[5] = gen_rtx (code2, VOIDmode, operands[4], CONST0_RTX (DFmode)); + }") + + (define_expand "movdfcc" + [(set (match_dup 4) (match_operand 1 "comparison_operator" "")) + (set (match_operand:DF 0 "register_operand" "") + (if_then_else:DF (match_dup 5) + (match_operand:DF 2 "reg_or_fp0_operand" "") + (match_operand:DF 3 "reg_or_fp0_operand" "")))] + "" + " + { + rtx op0,op1; + enum rtx_code code = GET_CODE (operands[1]), code2 = NE; + + if (!alpha_compare_fp_p) + FAIL; + switch (code) + { + case EQ: case LE: case LT: + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case NE: + /* There isn't a cmptne insn. */ + code = code2 = EQ; + op0 = alpha_compare_op0; + op1 = alpha_compare_op1; + break; + case GE: + code = LE; + op0 = force_reg (DFmode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + case GT: + code = LT; + op0 = force_reg (DFmode, alpha_compare_op1); + op1 = alpha_compare_op0; + break; + default: + FAIL; + } + operands[1] = gen_rtx (code, DFmode, op0, op1); + operands[4] = gen_reg_rtx (DFmode); + operands[5] = gen_rtx (code2, VOIDmode, operands[4], CONST0_RTX (DFmode)); + }") + ;; These define_split definitions are used in cases when comparisons have ;; not be stated in the correct way and we need to reverse the second *************** *** 2404,2410 **** }") ! ;; Here are the CALL and unconditional branch insns. (define_expand "call" [(parallel [(call (mem:DI (match_operand 0 "" "")) (match_operand 1 "" "")) --- 2604,2624 ---- }") ! ;; Here are the CALL and unconditional branch insns. Calls on NT and OSF ! ;; work differently, so we have different patterns for each. (define_expand "call" + [(use (match_operand:DI 0 "" "")) + (use (match_operand 1 "" ""))] + "" + " + { if (WINDOWS_NT) + emit_call_insn (gen_call_nt (operands[0], operands[1])); + else + emit_call_insn (gen_call_osf (operands[0], operands[1])); + + DONE; + }") + + (define_expand "call_osf" [(parallel [(call (mem:DI (match_operand 0 "" "")) (match_operand 1 "" "")) *************** *** 2427,2431 **** --- 2641,2673 ---- }") + (define_expand "call_nt" + [(parallel [(call (mem:DI (match_operand:DI 0 "" "")) + (match_operand 1 "" "")) + (clobber (reg:DI 26))])] + "" + " + { if (GET_CODE (operands[0]) != MEM) + abort (); + operands[0] = XEXP (operands[0], 0); + + if (GET_CODE (operands[0]) != SYMBOL_REF) + operands[0] = force_reg (Pmode, operands[0]); + }") + (define_expand "call_value" + [(use (match_operand 0 "" "")) + (use (match_operand:DI 1 "" "")) + (use (match_operand 2 "" ""))] + "" + " + { if (WINDOWS_NT) + emit_call_insn (gen_call_value_nt (operands[0], operands[1], operands[2])); + else + emit_call_insn (gen_call_value_osf (operands[0], operands[1], + operands[2])); + DONE; + }") + + (define_expand "call_value_osf" [(parallel [(set (match_operand 0 "" "") (call (mem:DI (match_operand 1 "" "")) *************** *** 2449,2452 **** --- 2691,2709 ---- }") + (define_expand "call_value_nt" + [(parallel [(set (match_operand 0 "" "") + (call (mem:DI (match_operand:DI 1 "" "")) + (match_operand 2 "" ""))) + (clobber (reg:DI 26))])] + "" + " + { if (GET_CODE (operands[1]) != MEM) + abort (); + + operands[1] = XEXP (operands[1], 0); + if (GET_CODE (operands[1]) != SYMBOL_REF) + operands[1] = force_reg (Pmode, operands[1]); + }") + (define_insn "" [(call (mem:DI (match_operand:DI 0 "call_operand" "r,R,i")) *************** *** 2454,2458 **** (clobber (reg:DI 27)) (clobber (reg:DI 26))] ! "" "@ jsr $26,($27),0\;ldgp $29,0($26) --- 2711,2715 ---- (clobber (reg:DI 27)) (clobber (reg:DI 26))] ! "! WINDOWS_NT" "@ jsr $26,($27),0\;ldgp $29,0($26) *************** *** 2462,2465 **** --- 2719,2732 ---- (define_insn "" + [(call (mem:DI (match_operand:DI 0 "call_operand" "r,i")) + (match_operand 1 "" "")) + (clobber (reg:DI 26))] + "WINDOWS_NT" + "@ + jsr $26,(%0) + bsr $26,%0" + [(set_attr "type" "jsr")]) + + (define_insn "" [(set (match_operand 0 "register_operand" "=rf,rf,rf") (call (mem:DI (match_operand:DI 1 "call_operand" "r,R,i")) *************** *** 2467,2471 **** (clobber (reg:DI 27)) (clobber (reg:DI 26))] ! "" "@ jsr $26,($27),0\;ldgp $29,0($26) --- 2734,2738 ---- (clobber (reg:DI 27)) (clobber (reg:DI 26))] ! "! WINDOWS_NT" "@ jsr $26,($27),0\;ldgp $29,0($26) *************** *** 2474,2477 **** --- 2741,2755 ---- [(set_attr "type" "jsr,jsr,ibr")]) + (define_insn "" + [(set (match_operand 0 "register_operand" "=rf,rf") + (call (mem:DI (match_operand:DI 1 "call_operand" "r,i")) + (match_operand 2 "" ""))) + (clobber (reg:DI 26))] + "WINDOWS_NT" + "@ + jsr $26,(%1) + bsr $26,%1" + [(set_attr "type" "jsr")]) + ;; Call subroutine returning any type. *************** *** 2537,2540 **** --- 2815,2832 ---- (define_expand "tablejump" + [(use (match_operand:SI 0 "register_operand" "")) + (use (match_operand:SI 1 "" ""))] + "" + " + { + if (WINDOWS_NT) + emit_jump_insn (gen_tablejump_nt (operands[0], operands[1])); + else + emit_jump_insn (gen_tablejump_osf (operands[0], operands[1])); + + DONE; + }") + + (define_expand "tablejump_osf" [(set (match_dup 3) (sign_extend:DI (match_operand:SI 0 "register_operand" ""))) *************** *** 2547,2550 **** --- 2839,2852 ---- { operands[3] = gen_reg_rtx (DImode); }") + (define_expand "tablejump_nt" + [(set (match_dup 3) + (sign_extend:DI (match_operand:SI 0 "register_operand" ""))) + (parallel [(set (pc) + (match_dup 3)) + (use (label_ref (match_operand 1 "" "")))])] + "" + " + { operands[3] = gen_reg_rtx (DImode); }") + (define_insn "" [(set (pc) *************** *** 2552,2556 **** (label_ref:DI (match_operand 1 "" "")))) (clobber (match_scratch:DI 2 "=r"))] ! "next_active_insn (insn) != 0 && GET_CODE (PATTERN (next_active_insn (insn))) == ADDR_DIFF_VEC && PREV_INSN (next_active_insn (insn)) == operands[1]" --- 2854,2858 ---- (label_ref:DI (match_operand 1 "" "")))) (clobber (match_scratch:DI 2 "=r"))] ! "! WINDOWS_NT && next_active_insn (insn) != 0 && GET_CODE (PATTERN (next_active_insn (insn))) == ADDR_DIFF_VEC && PREV_INSN (next_active_insn (insn)) == operands[1]" *************** *** 2591,2594 **** --- 2893,2939 ---- [(set_attr "type" "ibr")]) + (define_insn "" + [(set (pc) + (match_operand:DI 0 "register_operand" "r")) + (use (label_ref (match_operand 1 "" "")))] + "WINDOWS_NT && next_active_insn (insn) != 0 + && GET_CODE (PATTERN (next_active_insn (insn))) == ADDR_DIFF_VEC + && PREV_INSN (next_active_insn (insn)) == operands[1]" + "* + { rtx best_label = 0; + rtx jump_table_insn = next_active_insn (operands[1]); + + if (GET_CODE (jump_table_insn) == JUMP_INSN + && GET_CODE (PATTERN (jump_table_insn)) == ADDR_DIFF_VEC) + { + rtx jump_table = PATTERN (jump_table_insn); + int n_labels = XVECLEN (jump_table, 1); + int best_count = -1; + int i, j; + + for (i = 0; i < n_labels; i++) + { + int count = 1; + + for (j = i + 1; j < n_labels; j++) + if (XEXP (XVECEXP (jump_table, 1, i), 0) + == XEXP (XVECEXP (jump_table, 1, j), 0)) + count++; + + if (count > best_count) + best_count = count, best_label = XVECEXP (jump_table, 1, i); + } + } + + if (best_label) + { + operands[2] = best_label; + return \"jmp $31,(%0),%2\"; + } + else + return \"jmp $31,(%0),0\"; + }" + [(set_attr "type" "ibr")]) + ;; Cache flush. Used by INITIALIZE_TRAMPOLINE. 0x86 is PAL_imb, but we don't ;; want to have to include pal.h in our .s file. *************** *** 2654,2669 **** }") ! ;; There is a problem with 32-bit values in FP registers. We keep such ! ;; values in the register as a quadword. This is done on loads by using ! ;; the cvtlq instruction. On stores, we can't do anything directly from ! ;; floating-point registers. Disallow such an operation and let reload ! ;; use an integer register instead. Don't encourage 32-bit values to ! ;; be placed in FP registers at all. (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,*f,*f,*f") ! (match_operand:SI 1 "input_operand" "r,J,I,K,L,m,rJ,*f,J,m"))] ! "register_operand (operands[0], SImode) ! || reg_or_0_operand (operands[1], SImode)" "@ bis %1,%1,%0 --- 2999,3026 ---- }") ! (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,f,f,f,m") ! (match_operand:SI 1 "input_operand" "r,J,I,K,L,m,rJ,f,J,m,fG"))] ! "! WINDOWS_NT && (register_operand (operands[0], SImode) ! || reg_or_0_operand (operands[1], SImode))" ! "@ ! bis %1,%1,%0 ! bis $31,$31,%0 ! bis $31,%1,%0 ! lda %0,%1 ! ldah %0,%h1 ! ldl %0,%1 ! stl %r1,%0 ! cpys %1,%1,%0 ! cpys $f31,$f31,%0 ! lds %0,%1 ! sts %R1,%0" ! [(set_attr "type" "iaddlog,iaddlog,iaddlog,iaddlog,iaddlog,ld,st,fpop,fpop,ld,st")]) (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,r,m,f,f,f,m") ! (match_operand:SI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,m,fG"))] ! "WINDOWS_NT && (register_operand (operands[0], SImode) ! || reg_or_0_operand (operands[1], SImode))" "@ bis %1,%1,%0 *************** *** 2672,2681 **** lda %0,%1 ldah %0,%h1 ldl %0,%1 stl %r1,%0 cpys %1,%1,%0 cpys $f31,$f31,%0 ! lds %0,%1\;cvtlq %0,%0" ! [(set_attr "type" "iaddlog,iaddlog,iaddlog,iaddlog,iaddlog,ld,st,fpop,fpop,ld")]) (define_insn "" --- 3029,3040 ---- lda %0,%1 ldah %0,%h1 + lda %0,%1 ldl %0,%1 stl %r1,%0 cpys %1,%1,%0 cpys $f31,$f31,%0 ! lds %0,%1 ! sts %R1,%0" ! [(set_attr "type" "iaddlog,iaddlog,iaddlog,iaddlog,iaddlog,ldsym,ld,st,fpop,fpop,ld,st")]) (define_insn "" *************** *** 2724,2731 **** else if (GET_CODE (operands[1]) == CONST_INT) { ! if (alpha_emit_set_const (operands[0], INTVAL (operands[1]), 3)) DONE; - else - abort (); } }") --- 3083,3090 ---- else if (GET_CODE (operands[1]) == CONST_INT) { ! operands[1] ! = alpha_emit_set_const (operands[0], SImode, INTVAL (operands[1]), 3); ! if (rtx_equal_p (operands[0], operands[1])) DONE; } }") *************** *** 2741,2745 **** (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 3)))] " ! { if (alpha_emit_set_const (operands[0], INTVAL (operands[1]), 2)) DONE; else --- 3100,3107 ---- (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 3)))] " ! { rtx tem ! = alpha_emit_set_const (operands[0], SImode, INTVAL (operands[1]), 2); ! ! if (tem == operands[0]) DONE; else *************** *** 2776,2779 **** --- 3138,3143 ---- " { + rtx tem; + if (GET_CODE (operands[0]) == MEM && ! reg_or_0_operand (operands[1], DImode)) *************** *** 2783,2788 **** ; else if (GET_CODE (operands[1]) == CONST_INT ! && alpha_emit_set_const (operands[0], INTVAL (operands[1]), 3)) ! DONE; else if (CONSTANT_P (operands[1])) { --- 3147,3158 ---- ; else if (GET_CODE (operands[1]) == CONST_INT ! && (tem = alpha_emit_set_const (operands[0], DImode, ! INTVAL (operands[1]), 3)) != 0) ! { ! if (rtx_equal_p (tem, operands[0])) ! DONE; ! else ! operands[1] = tem; ! } else if (CONSTANT_P (operands[1])) { *************** *** 2810,2814 **** (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))] " ! { if (alpha_emit_set_const (operands[0], INTVAL (operands[1]), 2)) DONE; else --- 3180,3187 ---- (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))] " ! { rtx tem ! = alpha_emit_set_const (operands[0], DImode, INTVAL (operands[1]), 2); ! ! if (tem == operands[0]) DONE; else *************** *** 3187,3191 **** rtx addr = get_unaligned_address (operands[1]); /* It is possible that one of the registers we got for operands[2] ! might co-incide with that of operands[0] (which is why we made it TImode). Pick the other one to use as our scratch. */ rtx scratch = gen_rtx (REG, DImode, --- 3560,3564 ---- rtx addr = get_unaligned_address (operands[1]); /* It is possible that one of the registers we got for operands[2] ! might coincide with that of operands[0] (which is why we made it TImode). Pick the other one to use as our scratch. */ rtx scratch = gen_rtx (REG, DImode, *************** *** 3307,3315 **** " { ! operands[0] = gen_rtx (MEM, DImode, plus_constant (stack_pointer_rtx, INTVAL (operands[0]))); ! MEM_VOLATILE_P (operands[0]) = 1; ! operands[1] = gen_reg_rtx (DImode); }") --- 3680,3688 ---- " { ! operands[1] = gen_rtx (MEM, DImode, plus_constant (stack_pointer_rtx, INTVAL (operands[0]))); ! MEM_VOLATILE_P (operands[1]) = 1; ! operands[0] = const0_rtx; }") *************** *** 3342,3346 **** if (probed + 4096 < INTVAL (operands[0])) ! emit_insn (gen_probe_stack (GEN_INT (- (probed += 4096)))); } --- 3715,3719 ---- if (probed + 4096 < INTVAL (operands[0])) ! emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[0])))); } *************** *** 3351,3404 **** rtx out_label = 0; rtx loop_label = gen_label_rtx (); ! rtx count = gen_reg_rtx (DImode); ! rtx access = gen_reg_rtx (Pmode); ! rtx memref = gen_rtx (MEM, DImode, access); ! ! MEM_VOLATILE_P (memref) = 1; ! /* If the amount to be allocated is not a constant, we only need to ! do something special if it is >= 4096. */ if (GET_CODE (operands[0]) != CONST_INT) { - operands[0] = force_reg (DImode, operands[0]); out_label = gen_label_rtx (); ! emit_insn (gen_cmpdi (operands[0], ! force_reg (DImode, GEN_INT (4096)))); ! emit_jump_insn (gen_ble (out_label)); ! ! /* Compute COUNT = (N + 4096) / 8192. N is known positive. */ ! emit_insn (gen_adddi3 (count, operands[0], GEN_INT (4096))); ! emit_insn (gen_lshrdi3 (count, count, GEN_INT (13))); } - else - emit_move_insn (count, GEN_INT ((INTVAL (operands[0]) + 4096) >> 13)); - /* ACCESS = SP + 4096. */ - emit_insn (gen_adddi3 (access, stack_pointer_rtx, GEN_INT (4096))); emit_label (loop_label); ! ! /* Each iteration subtracts 8192 from ACCESS and references it. */ ! emit_insn (gen_adddi3 (count, count, constm1_rtx)); ! emit_insn (gen_adddi3 (access, access, GEN_INT (-8192))); ! emit_move_insn (gen_reg_rtx (DImode), memref); ! emit_insn (gen_cmpdi (count, const0_rtx)); ! emit_jump_insn (gen_bgt (loop_label)); if (out_label) emit_label (out_label); ! /* We need to subtract operands[0] from SP. We know it isn't a ! constant less than 32768, so we know we have to load it into ! a register. */ ! ! emit_insn (gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx, ! force_reg (Pmode, operands[0]))); ! ! /* Now, unless we have a constant and we know that we are within ! 4096 from the end, we need to access sp + 4096. */ ! if (! (GET_CODE (operands[0]) == CONST_INT ! && (INTVAL (operands[0]) % 8192) < 4096)) ! emit_insn (gen_probe_stack (GEN_INT (4096))); DONE; --- 3724,3757 ---- rtx out_label = 0; rtx loop_label = gen_label_rtx (); ! rtx want = gen_reg_rtx (Pmode); ! rtx tmp = gen_reg_rtx (Pmode); ! rtx memref; ! emit_insn (gen_subdi3 (want, stack_pointer_rtx, ! force_reg (Pmode, operands[0]))); ! emit_insn (gen_adddi3 (tmp, stack_pointer_rtx, GEN_INT (-4096))); if (GET_CODE (operands[0]) != CONST_INT) { out_label = gen_label_rtx (); ! emit_insn (gen_cmpdi (want, tmp)); ! emit_jump_insn (gen_bgeu (out_label)); } emit_label (loop_label); ! memref = gen_rtx (MEM, DImode, tmp); ! MEM_VOLATILE_P (memref) = 1; ! emit_move_insn (memref, const0_rtx); ! emit_insn (gen_adddi3 (tmp, tmp, GEN_INT(-8192))); ! emit_insn (gen_cmpdi (tmp, want)); ! emit_jump_insn (gen_bgtu (loop_label)); ! memref = gen_rtx (MEM, DImode, want); ! MEM_VOLATILE_P (memref) = 1; ! emit_move_insn (memref, const0_rtx); if (out_label) emit_label (out_label); ! emit_move_insn (stack_pointer_rtx, want); DONE; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/config-nt.bat gcc-2.7.0/config/alpha/config-nt.bat *** gcc-2.6.3/config/alpha/config-nt.bat --- gcc-2.7.0/config/alpha/config-nt.bat Mon May 22 18:54:08 1995 *************** *** 0 **** --- 1,51 ---- + echo Configuring GCC for Windows NT on Alpha + rem This batch file assumes a unix-type "sed" program + + echo #include "alpha/xm-winnt.h" >config.h + echo #include "alpha/xm-winnt.h" >hconfig.h + echo #include "alpha/xm-winnt.h" >tconfig.h + echo #include "alpha/winnt.h" >tm.h + + rem This batch file assumes a unix-type "sed" program + + echo # Makefile generated by "config-nt.bat"> Makefile + echo all.nt: cpp.exe cc1.exe xgcc.exe ld.exe>> Makefile + sed -f config/alpha/config-nt.sed Makefile.in >> Makefile + + set LANG= + + echo # >specs.h + echo # >options.h + + if not exist cp\make-lang.in goto no_cp + if exist cp\lang-specs.h echo #include "cp/lang-specs.h">>specs.h + if exist cp\lang-options.h echo #include "cp/lang-options.h">>options.h + sed -f config/alpha/config-nt.sed cp\make-lang.in >> Makefile + sed -f config/alpha/config-nt.sed cp\makefile.in > cp\Makefile + set LANG=%LANG% c++.& + :no_cp + + if not exist ada\make-lang.in goto no_ada + if exist ada\lang-specs.h echo #include "ada/lang-specs.h">>specs.h + if exist ada\lang-options.h echo #include "ada/lang-options.h">>options.h + sed -f config/alpha/config-nt.sed ada\make-lang.in >> Makefile + sed -f config/alpha/config-nt.sed ada\makefile.in > ada\Makefile + set LANG=%LANG% ada.& + :no_ada + + if not exist f\make-lang.in goto no_f + if exist f\lang-specs.h echo #include "f/lang-specs.h">>specs.h + if exist f\lang-options.h echo #include "f/lang-options.h">>options.h + sed -f config/alpha/config-nt.sed f\make-lang.in >> Makefile + sed -f config/alpha/config-nt.sed f\makefile.in > f\Makefile + set LANG=%LANG% f.& + :no_f + + echo lang.mostlyclean: %LANG% | sed "s/&/mostlyclean/g" >> Makefile + echo lang.clean: %LANG% | sed "s/&/clean/g" >> Makefile + echo lang.distclean: %LANG% | sed "s/&/distclean/g" >> Makefile + echo lang.realclean: %LANG% | sed "s/&/realclean/g" >> Makefile + + echo #define MULTILIB_SELECT ". ;" > multilib.h1 + copy multilib.h1 multilib.h + del multilib.h1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/config-nt.sed gcc-2.7.0/config/alpha/config-nt.sed *** gcc-2.6.3/config/alpha/config-nt.sed --- gcc-2.7.0/config/alpha/config-nt.sed Mon May 22 18:54:11 1995 *************** *** 0 **** --- 1,133 ---- + /^Makefile/,/^ rm -f config.run/d + s/rm -f/del/ + s/|| cp/|| copy/ + /^config.status/,/ fi/d + s/config.status//g + s/\/dev\/null/NUL/g + s/$(srcdir)\/c-parse/c-parse/g + s/$(srcdir)\/c-gperf/c-gperf/g + /^multilib.h/ s/multilib/not-multilib/ + /^target=/ c\ + target=winnt3.5 + /^xmake_file=/ d + /^tmake_file=/ d + /^out_file/ c\ + out_file=config/alpha/alpha.c + /^out_object_file/ c\ + out_object_file=alpha.obj + /^md_file/ c\ + md_file=config/alpha/alpha.md + /^tm_file/ c\ + tm_file=config/alpha/winnt.h + /^build_xm_file/ c\ + build_xm_file=config/alpha/xm-winnt.h + /^host_xm_file/ c\ + host_xm_file=config/alpha/xm-winnt.h + /^lang_specs_files=/ d + /^lang_options_files=/ d + /^version=/ c\ + version=2.6.3 + s/CC = cc/CC = cl/ + s/^SHELL =.*/SHELL =/ + s/CFLAGS = -g/CFLAGS =/ + s/:\$/: \$/g + s/<\ *\$(srcdir)\//< $(srcdir)\\/g + s/^ \$(srcdir)\/move-if-change/ copy/ + s/^USE_/# USE_/ + s/`echo \$(srcdir)\///g + s/ | sed 's,\^\\\.\/,,'`//g + s/^ cd \$(srcdir)[ ]*;/ / + /^stamp-attrtab/,/copy/ { + /\\$/d + / fi/d + /copy/ i\ + \ genattrtab $(md_file) > tmp-attrtab.c + } + /^enquire[ ]*:/ s/\$(GCC_PARTS)//g + /^enquire.o[ ]*:/ s/\$(GCC_PASSES)//g + /^GCC_FOR_TARGET =/ c\ + GCC_FOR_TARGET = gcc + s/; *@true// + /^OBJS.*stamp-objlist/ s?`cat ../stamp-objlist`?@../stamp-objlist? + s/^\(SUBDIR_OBSTACK *=\).*$/\1 ..\/obstack.o/ + s/^\(SUBDIR_USE_ALLOCA *=\).*$/\1/ + s/^\(SUBDIR_MALLOC *=\).*$/\1/ + /####target/ i\ + STMP_FIXPROTO = \ + OTHER_FIXINCLUDES_DIRS=/MSTOOLS/h \ + RANLIB = : \ + RANLIB_TEST = false \ + OLDCC = cl \ + MAKE = make \ + SYMLINK = copy \ + INSTALL = $(srcdir)/install.sh -c \ + exeext = .exe \ + objext = .obj \ + oldobjext = .obj \ + \ + CC = cl \ + CFLAGS = -Dalpha -DWIN32 -D_WIN32 -DWINNT -D_ALPHA_ \\\ + -DALMOST_STDC \ + CLIB = oldnames.lib libc.lib kernel32.lib \ + LDFLAGS = -subsystem:console -entry:mainCRTStartup \\\ + -stack:1000000,1000000 \ + \ + EXTRA_PROGRAMS=ld.exe \ + \ + ld.obj: $(srcdir)/config/winnt/ld.c \ + \ $(CC) $(CFLAGS) \\\ + \ -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/ld.c \ + ld.exe: ld.obj \ + link32 -out:ld.exe ld.obj $(LDFLAGS) $(CLIB) + \ + EXTRA_OBJS=winnt.obj \ + winnt.obj: $(srcdir)/config/alpha/winnt.c \ + \ $(CC) $(CFLAGS) \\\ + \ -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/alpha/winnt.c + s/^C c:/Cc:/ + s/\${OBJS}/\$(OBJS)/g + s/\${SYSTEM_HEADER_DIR}/\$(SYSTEM_HEADER_DIR)/g + s/\${HOST_CC}/\$(HOST_CC)/g + s/ \${srcdir}\// /g + s/\${mainversion}/\$(mainversion)/g + s/\ $(srcdir)\/move-if-change$// + s/\$(srcdir)\/move-if-change/copy/g + /^# USE_HOST_OBSTACK/ i\ + USE_HOST_OBSTACK=obstack.obj + /^# USE_ALLOCA/ i\ + USE_ALLOCA=alloca.obj + /^# USE_HOST_ALLOCA/ i\ + USE_HOST_ALLOCA=alloca.obj + s/^ALLOCA =/ALLOCA = alloca.obj/ + s/^ALLOCA_FINISH = true/ALLOCA_FINISH =/ + s/ \.\// / + s/^bi-\([a-z]*\) *:/bi-\1.exe :/ + s/ bi-\([a-z]*\)$/ bi-\1.exe/ + s/ bi-\([a-z]*\) / bi-\1.exe /g + s/^gen\([a-z]*\) *:/gen\1.exe :/ + s/ gen\([a-z]*\)$/ gen\1.exe/ + s/ gen\([a-z]*\) / gen\1.exe /g + s/genmultilib.exe/genmultilib/g + s/^cccp *:/cccp.exe :/ + s/cccp$/cccp.exe/ + s/cccp /cccp.exe / + s/CCCP=cccp.exe/CCCP=cccp/ + s/^cpp *:/cpp.exe :/ + s/cpp$/cpp.exe/ + s/cpp /cpp.exe / + s/^cc1 *:/cc1.exe :/ + s/cc1$/cc1.exe/ + s/cc1 /cc1.exe / + s/^cc1obj *:/cc1obj.exe :/ + s/cc1obj$/cc1obj.exe/ + s/cc1obj /cc1obj.exe / + s/^xgcc *:/xgcc.exe :/ + s/xgcc$/xgcc.exe/ + s/xgcc /xgcc.exe / + s/\.o *:/.obj :/ + s/\.o$/.obj/ + s/\.o /.obj /g + s/-rm -f cpp.exe/del cpp.exe/ + s/\$(CC) \$(ALL_CFLAGS) \$(LDFLAGS) -o /link32 $(LDFLAGS) -out:/ + s/\$(HOST_CC) \$(HOST_CFLAGS) \$(HOST_LDFLAGS) -o /link32 $(HOST_LDFLAGS) -out:/ + s/^\ // diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/gdb-osf12.h gcc-2.7.0/config/alpha/gdb-osf12.h *** gcc-2.6.3/config/alpha/gdb-osf12.h Thu Oct 20 17:51:36 1994 --- gcc-2.7.0/config/alpha/gdb-osf12.h Thu Jun 15 09:09:10 1995 *************** *** 18,22 **** 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 "alpha/osf12.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "alpha/osf12.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/gdb-osf2.h gcc-2.7.0/config/alpha/gdb-osf2.h *** gcc-2.6.3/config/alpha/gdb-osf2.h Wed Feb 9 10:26:27 1994 --- gcc-2.7.0/config/alpha/gdb-osf2.h Thu Jun 15 09:09:32 1995 *************** *** 18,22 **** 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 "alpha/osf2.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "alpha/osf2.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/gdb.h gcc-2.7.0/config/alpha/gdb.h *** gcc-2.6.3/config/alpha/gdb.h Tue Oct 12 18:37:40 1993 --- gcc-2.7.0/config/alpha/gdb.h Thu Jun 15 09:09:46 1995 *************** *** 18,22 **** 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 "alpha/alpha.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "alpha/alpha.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/osf12.h gcc-2.7.0/config/alpha/osf12.h *** gcc-2.6.3/config/alpha/osf12.h Thu Oct 20 17:51:36 1994 --- gcc-2.7.0/config/alpha/osf12.h Thu Jun 15 09:10:00 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for DEC Alpha. ! Copyright (C) 1992, 1993 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) --- 1,4 ---- /* Definitions of target machine for GNU compiler, for DEC Alpha. ! Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 27,30 **** #undef LINK_SPEC #define LINK_SPEC \ ! "-G 8 -O1 %{!shared:-init __main} %{static:-non_shared} ! %{!static:%{shared:-shared} %{!shared:-call_shared}}" --- 28,31 ---- #undef LINK_SPEC #define LINK_SPEC \ ! "-G 8 -O1 %{static:-non_shared} %{rpath*} \ ! %{!static:%{shared:-shared} %{!shared:-call_shared}} %{taso}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/osf2.h gcc-2.7.0/config/alpha/osf2.h *** gcc-2.6.3/config/alpha/osf2.h Fri Sep 9 20:33:31 1994 --- gcc-2.7.0/config/alpha/osf2.h Thu Jun 15 09:10:11 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/winnt.h gcc-2.7.0/config/alpha/winnt.h *** gcc-2.6.3/config/alpha/winnt.h --- gcc-2.7.0/config/alpha/winnt.h Thu Jun 15 09:10:31 1995 *************** *** 0 **** --- 1,72 ---- + /* Definitions of target machine for GNU compiler, for DEC Alpha + running Windows/NT. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Say this is Windows/NT for the other config files. */ + #define WINDOWS_NT 1 + + #include "alpha/alpha.h" + + /* Names to predefine in the preprocessor for this target machine. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-DWIN32 -D_WIN32\ + -DWINNT -D__STDC__=0 -DALMOST_STDC\ + -D_ALPHA_ -D__alpha -D__alpha__ -D_LONGLONG -Asystem(winnt) -Acpu(alpha)\ + -Amachine(alpha)" + + #undef ASM_SPEC + #undef ASM_FINAL_SPEC + #define ASM_SPEC "-nopp -nologo" + + /* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */ + #undef POINTER_SIZE + #define POINTER_SIZE 32 + #define POINTERS_EXTEND_UNSIGNED 0 + + /* "long" is 32 bits. */ + #undef LONG_TYPE_SIZE + #define LONG_TYPE_SIZE 32 + + /* We can't do any debugging. */ + #undef SDB_DEBUGGING_INFO + #undef DBX_DEBUGGING_INFO + #undef MIPS_DEBUGGING_INFO + + #include "winnt/winnt.h" + + #undef ASM_FILE_START + #define ASM_FILE_START(FILE) \ + { \ + alpha_write_verstamp (FILE); \ + fprintf (FILE, "\t.set noreorder\n"); \ + fprintf (FILE, "\t.set volatile\n"); \ + fprintf (FILE, "\t.set noat\n"); \ + fprintf (FILE, "\t.globl\t__fltused\n"); \ + ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \ + } + + #undef LIB_SPEC + #define LIB_SPEC "%{mwindows:-subsystem:windows -entry:WinMainCRTStartup \ + USER32.LIB GDI32.LIB COMDLG32.LIB WINSPOOL.LIB} \ + %{!mwindows:-subsystem:console -entry:mainCRTStartup} \ + %{mcrtmt:LIBCMT.LIB KERNEL32.LIB} %{!mcrtmt:LIBC.LIB KERNEL32.LIB} \ + %{v}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/x-winnt gcc-2.7.0/config/alpha/x-winnt *** gcc-2.6.3/config/alpha/x-winnt --- gcc-2.7.0/config/alpha/x-winnt Mon May 22 18:54:14 1995 *************** *** 0 **** --- 1,35 ---- + STMP_FIXPROTO = + OTHER_FIXINCLUDES_DIRS=/MSTOOLS/h + RANLIB = : + RANLIB_TEST = false + OLDCC = cl + MAKE = make + SHELL = sh + SYMLINK = cp + INSTALL = $(srcdir)/install.sh -c + .SUFFIXES: .obj + .c.obj: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< + .adb.obj: + $(CC) -c $(ALL_ADAFLAGS) $< + .ads.obj: + $(CC) -c $(ALL_ADAFLAGS) $< + exeext = .exe + objext = .obj + + CC = gcc + CLIB = + LDFLAGS = + + EXTRA_PROGRAMS=ld.exe + + ld.o: $(srcdir)/config/winnt/ld.c + $(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/ld.c + + ld.exe: ld.o + $(CC) -o ld.exe ld.o + + LIB2FUNCS_EXTRA=${srcdir}/config/winnt/spawnv.c + + spawnv.o: $(srcdir)/config/winnt/spawnv.c + $(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/spawnv.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/xm-alpha.h gcc-2.7.0/config/alpha/xm-alpha.h *** gcc-2.6.3/config/alpha/xm-alpha.h Fri Jul 1 13:53:58 1994 --- gcc-2.7.0/config/alpha/xm-alpha.h Thu Jun 15 09:10:52 1995 *************** *** 1,4 **** /* Configuration for GNU C-compiler for DEC Alpha. ! Copyright (C) 1990, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu). --- 1,4 ---- /* Configuration for GNU C-compiler for DEC Alpha. ! Copyright (C) 1990, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu). *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 39,47 **** /* Arguments to use with `exit'. */ #define SUCCESS_EXIT_CODE 0 ! #define FAILURE_EXIT_CODE 2 ! #define FATAL_EXIT_CODE 3 /* If not compiled with GNU C, use the builtin alloca. */ ! #ifndef __GNUC__ #include #else --- 40,47 ---- /* Arguments to use with `exit'. */ #define SUCCESS_EXIT_CODE 0 ! #define FATAL_EXIT_CODE 33 /* If not compiled with GNU C, use the builtin alloca. */ ! #if !defined(__GNUC__) && !defined(_WIN32) #include #else *************** *** 65,66 **** --- 65,78 ---- #include "string.h" #endif + + /* OSF/1 has vprintf. */ + + #define HAVE_VPRINTF + + /* OSF/1 has putenv. */ + + #define HAVE_PUTENV + + /* OSF/1 is POSIX.1 compliant. */ + + #define POSIX diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/alpha/xm-winnt.h gcc-2.7.0/config/alpha/xm-winnt.h *** gcc-2.6.3/config/alpha/xm-winnt.h --- gcc-2.7.0/config/alpha/xm-winnt.h Thu Jun 15 09:10:40 1995 *************** *** 0 **** --- 1,35 ---- + /* Configuration for GNU compiler for an Alpha running Windows NT 3.x. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Douglas B. Rupp (drupp@cs.washington.edu) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "alpha/xm-alpha.h" + #include "winnt/xm-winnt.h" + + #undef HOST_BITS_PER_LONG + #define HOST_BITS_PER_LONG 32 + + #undef POSIX + + #define access _access + #define close _close + #define mktemp _mktemp + #define open _open + #define read _read + #define write _write diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/aoutos.h gcc-2.7.0/config/aoutos.h *** gcc-2.6.3/config/aoutos.h Wed Mar 23 13:13:05 1994 --- gcc-2.7.0/config/aoutos.h Thu Jun 15 08:47:39 1995 *************** *** 19,23 **** 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. */ /* To use this file, make up a file with a name like: --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* To use this file, make up a file with a name like: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/arm.c gcc-2.7.0/config/arm/arm.c *** gcc-2.6.3/config/arm/arm.c Sun Oct 2 11:10:08 1994 --- gcc-2.7.0/config/arm/arm.c Thu Jun 15 09:16:23 1995 *************** *** 19,23 **** 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 --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 60,64 **** enum processor_type arm_cpu; ! /* Waht type of floating point are we compiling for? */ enum floating_point_type arm_fpu; --- 61,65 ---- enum processor_type arm_cpu; ! /* What type of floating point are we compiling for? */ enum floating_point_type arm_fpu; *************** *** 1144,1147 **** --- 1145,1174 ---- } + /* Return TRUE for a valid operand of a DFmode operation when -msoft-float. + Either: REG, CONST_DOUBLE or MEM(DImode_address). + Note that this disallows MEM(REG+REG), but allows + MEM(PRE/POST_INC/DEC(REG)). */ + + int + soft_df_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (s_register_operand (op, mode)) + return TRUE; + + switch (GET_CODE (op)) + { + case CONST_DOUBLE: + return TRUE; + + case MEM: + return memory_address_p (DFmode, XEXP (op, 0)); + + default: + return FALSE; + } + } + /* Return TRUE for valid index operands. */ *************** *** 1857,1861 **** fputc ('\t', stream); ! fprintf (stream, instr, ARM_REG_PREFIX); fputs (", {", stream); for (i = 0; i < 16; i++) --- 1884,1888 ---- fputc ('\t', stream); ! fprintf (stream, instr, REGISTER_PREFIX); fputs (", {", stream); for (i = 0; i < 16; i++) *************** *** 1864,1868 **** if (not_first) fprintf (stream, ", "); ! fprintf (stream, "%s%s", ARM_REG_PREFIX, reg_names[i]); not_first = TRUE; } --- 1891,1895 ---- if (not_first) fprintf (stream, ", "); ! fprintf (stream, "%s%s", REGISTER_PREFIX, reg_names[i]); not_first = TRUE; } *************** *** 2400,2404 **** shift. >=32 is not a valid shift for "asl", so we must try and output a shift that produces the correct arithmetical result. ! Using lsr #32 is idendical except for the fact that the carry bit is not set correctly if we set the flags; but we never use the carry bit from such an operation, so we can ignore that. */ --- 2427,2431 ---- shift. >=32 is not a valid shift for "asl", so we must try and output a shift that produces the correct arithmetical result. ! Using lsr #32 is identical except for the fact that the carry bit is not set correctly if we set the flags; but we never use the carry bit from such an operation, so we can ignore that. */ *************** *** 2720,2723 **** --- 2747,2756 ---- } + /* Return nonzero if optimizing and the current function is volatile. + Such functions never return, and many memory cycles can be saved + by not storing register values that will never be needed again. + This optimization was added to speed up context switching in a + kernel application. */ + int arm_volatile_func () *************** *** 2764,2776 **** lr_save_eliminated = 0; ! fprintf (f, "\t%c args = %d, pretend = %d, frame = %d\n", ! ARM_COMMENT_CHAR, current_function_args_size, current_function_pretend_args_size, frame_size); ! fprintf (f, "\t%c frame_needed = %d, current_function_anonymous_args = %d\n", ! ARM_COMMENT_CHAR, frame_pointer_needed, current_function_anonymous_args); if (volatile_func) ! fprintf (f, "\t%c Volatile function.\n", ARM_COMMENT_CHAR); if (current_function_anonymous_args && current_function_pretend_args_size) --- 2797,2809 ---- lr_save_eliminated = 0; ! fprintf (f, "\t%s args = %d, pretend = %d, frame = %d\n", ! ASM_COMMENT_START, current_function_args_size, current_function_pretend_args_size, frame_size); ! fprintf (f, "\t%s frame_needed = %d, current_function_anonymous_args = %d\n", ! ASM_COMMENT_START, frame_pointer_needed, current_function_anonymous_args); if (volatile_func) ! fprintf (f, "\t%s Volatile function.\n", ASM_COMMENT_START); if (current_function_anonymous_args && current_function_pretend_args_size) *************** *** 2805,2810 **** if (lr_save_eliminated) ! fprintf (f,"\t%c I don't think this function clobbers lr\n", ! ARM_COMMENT_CHAR); } --- 2838,2843 ---- if (lr_save_eliminated) ! fprintf (f,"\t%s I don't think this function clobbers lr\n", ! ASM_COMMENT_START); } *************** *** 2852,2857 **** if (regs_ever_live[reg] && ! call_used_regs[reg]) { ! fprintf (f, "\tldfe\t%s%s, [%sfp, #-%d]\n", ARM_REG_PREFIX, ! reg_names[reg], ARM_REG_PREFIX, floats_offset); floats_offset += 12; code_size += 4; --- 2885,2890 ---- if (regs_ever_live[reg] && ! call_used_regs[reg]) { ! fprintf (f, "\tldfe\t%s%s, [%sfp, #-%d]\n", REGISTER_PREFIX, ! reg_names[reg], REGISTER_PREFIX, floats_offset); floats_offset += 12; code_size += 4; *************** *** 2876,2881 **** if (regs_ever_live[reg] && ! call_used_regs[reg]) { ! fprintf (f, "\tldfe\t%s%s, [%ssp], #12\n", ARM_REG_PREFIX, ! reg_names[reg], ARM_REG_PREFIX); code_size += 4; } --- 2909,2914 ---- if (regs_ever_live[reg] && ! call_used_regs[reg]) { ! fprintf (f, "\tldfe\t%s%s, [%ssp], #12\n", REGISTER_PREFIX, ! reg_names[reg], REGISTER_PREFIX); code_size += 4; } *************** *** 2903,2907 **** fprintf (f, TARGET_6 ? "\tmov\t%spc, %slr\n" : "\tmovs\t%spc, %slr\n", ! ARM_REG_PREFIX, ARM_REG_PREFIX, f); code_size += 4; } --- 2936,2940 ---- fprintf (f, TARGET_6 ? "\tmov\t%spc, %slr\n" : "\tmovs\t%spc, %slr\n", ! REGISTER_PREFIX, REGISTER_PREFIX, f); code_size += 4; } *************** *** 3007,3011 **** { /* If we have to push any regs, then we must push lr as well, or ! we won't get a propper return. */ live_regs_mask |= 0x4000; emit_multi_reg_push (live_regs_mask); --- 3040,3044 ---- { /* If we have to push any regs, then we must push lr as well, or ! we won't get a proper return. */ live_regs_mask |= 0x4000; emit_multi_reg_push (live_regs_mask); *************** *** 3044,3048 **** /* If CODE is 'd', then the X is a condition operand and the instruction should only be executed if the condition is true. ! if CODE is 'D', then the X is a condition operand and the instruciton should only be executed if the condition is false: however, if the mode of the comparison is CCFPEmode, then always execute the instruction -- we --- 3077,3081 ---- /* If CODE is 'd', then the X is a condition operand and the instruction should only be executed if the condition is true. ! if CODE is 'D', then the X is a condition operand and the instruction should only be executed if the condition is false: however, if the mode of the comparison is CCFPEmode, then always execute the instruction -- we *************** *** 3050,3054 **** in these cases the instruction pattern will take care to make sure that an instruction containing %d will follow, thereby undoing the effects of ! doing this instrucion unconditionally. If CODE is 'N' then X is a floating point operand that must be negated before output. --- 3083,3087 ---- in these cases the instruction pattern will take care to make sure that an instruction containing %d will follow, thereby undoing the effects of ! doing this instruction unconditionally. If CODE is 'N' then X is a floating point operand that must be negated before output. *************** *** 3065,3073 **** { case '@': ! fputc (ARM_COMMENT_CHAR, stream); return; case '|': ! fputs (ARM_REG_PREFIX, stream); return; --- 3098,3106 ---- { case '@': ! fputs (ASM_COMMENT_START, stream); return; case '|': ! fputs (REGISTER_PREFIX, stream); return; *************** *** 3135,3144 **** if (REGNO (x) > 15) abort (); ! fputs (ARM_REG_PREFIX, stream); fputs (reg_names[REGNO (x) + 1], stream); return; case 'm': ! fputs (ARM_REG_PREFIX, stream); if (GET_CODE (XEXP (x, 0)) == REG) fputs (reg_names[REGNO (XEXP (x, 0))], stream); --- 3168,3177 ---- if (REGNO (x) > 15) abort (); ! fputs (REGISTER_PREFIX, stream); fputs (reg_names[REGNO (x) + 1], stream); return; case 'm': ! fputs (REGISTER_PREFIX, stream); if (GET_CODE (XEXP (x, 0)) == REG) fputs (reg_names[REGNO (XEXP (x, 0))], stream); *************** *** 3148,3153 **** case 'M': ! fprintf (stream, "{%s%s-%s%s}", ARM_REG_PREFIX, reg_names[REGNO (x)], ! ARM_REG_PREFIX, reg_names[REGNO (x) - 1 + ((GET_MODE_SIZE (GET_MODE (x)) + GET_MODE_SIZE (SImode) - 1) --- 3181,3186 ---- case 'M': ! fprintf (stream, "{%s%s-%s%s}", REGISTER_PREFIX, reg_names[REGNO (x)], ! REGISTER_PREFIX, reg_names[REGNO (x) - 1 + ((GET_MODE_SIZE (GET_MODE (x)) + GET_MODE_SIZE (SImode) - 1) *************** *** 3178,3182 **** if (GET_CODE (x) == REG) { ! fputs (ARM_REG_PREFIX, stream); fputs (reg_names[REGNO (x)], stream); } --- 3211,3215 ---- if (GET_CODE (x) == REG) { ! fputs (REGISTER_PREFIX, stream); fputs (reg_names[REGNO (x)], stream); } *************** *** 3238,3242 **** { real_name = xmalloc (2 + strlen (name)); ! strcpy (real_name, "_"); strcat (real_name, name); } --- 3271,3275 ---- { real_name = xmalloc (2 + strlen (name)); ! strcpy (real_name, USER_LABEL_PREFIX); strcat (real_name, name); } *************** *** 3289,3293 **** /* When generating the instructions, we never mask out the bits that we ! think will be always zero, then if a mistake has occured somewhere, the assembler will spot it and generate an error. */ --- 3322,3326 ---- /* When generating the instructions, we never mask out the bits that we ! think will be always zero, then if a mistake has occurred somewhere, the assembler will spot it and generate an error. */ *************** *** 3341,3345 **** int size, rounded; { ! fprintf (stream, "\n\t.bss\t%c .lcomm\n", ARM_COMMENT_CHAR); assemble_name (stream, name); fprintf (stream, ":\t.space\t%d\n", rounded); --- 3374,3378 ---- int size, rounded; { ! fprintf (stream, "\n\t.bss\t%s .lcomm\n", ASM_COMMENT_START); assemble_name (stream, name); fprintf (stream, ":\t.space\t%d\n", rounded); *************** *** 3491,3495 **** return; ! /* This jump might be paralled with a clobber of the condition codes the jump should always come first */ if (GET_CODE (body) == PARALLEL && XVECLEN (body, 0) > 0) --- 3524,3528 ---- return; ! /* This jump might be paralleled with a clobber of the condition codes the jump should always come first */ if (GET_CODE (body) == PARALLEL && XVECLEN (body, 0) > 0) *************** *** 3709,3713 **** /* restore recog_operand (getting the attributes of other insns can destroy this array, but final.c assumes that it remains intact ! accross this call; since the insn has been recognized already we call recog direct). */ recog (PATTERN (insn), insn, NULL_PTR); --- 3742,3746 ---- /* restore recog_operand (getting the attributes of other insns can destroy this array, but final.c assumes that it remains intact ! across this call; since the insn has been recognized already we call recog direct). */ recog (PATTERN (insn), insn, NULL_PTR); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/arm.h gcc-2.7.0/config/arm/arm.h *** gcc-2.6.3/config/arm/arm.h Sun Oct 2 11:10:16 1994 --- gcc-2.7.0/config/arm/arm.h Thu Jun 15 09:16:42 1995 *************** *** 1,6 **** /* Definitions of target machine for GNU compiler, for Acorn RISC Machine. ! Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) ! and Martin Simmons (@harleqn.co.uk). More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk) --- 1,6 ---- /* Definitions of target machine for GNU compiler, for Acorn RISC Machine. ! Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) ! and Martin Simmons (@harleqn.co.uk). More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk) *************** *** 19,23 **** 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. */ /* Sometimes the directive `riscos' is checked. This does not imply that this --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Sometimes the directive `riscos' is checked. This does not imply that this *************** *** 93,104 **** #define TARGET_SHORT_BY_BYTES (target_flags & 0x200) ! /* ARM_EXTRA_TARGET_SWITCHES is used in riscix.h to define some options which ! are passed to the preprocessor and the assembler post-processor. They ! aren't needed in the main pass of the compiler, but if we don't define ! them in target switches cc1 complains about them. For the sake of ! argument lets allocate bit 31 of target flags for such options. */ ! ! #ifndef ARM_EXTRA_TARGET_SWITCHES ! #define ARM_EXTRA_TARGET_SWITCHES #endif --- 94,108 ---- #define TARGET_SHORT_BY_BYTES (target_flags & 0x200) ! /* Nonzero if GCC should use a floating point library. ! GCC will assume the fp regs don't exist and will not emit any fp insns. ! Note that this is different than fp emulation which still uses fp regs ! and insns - the kernel catches the trap and performs the operation. */ ! #define TARGET_SOFT_FLOAT (target_flags & 0x400) ! #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) ! ! /* SUBTARGET_SWITCHES is used to add flags on a per-config basis. ! Bit 31 is reserved. See riscix.h. */ ! #ifndef SUBTARGET_SWITCHES ! #define SUBTARGET_SWITCHES #endif *************** *** 115,119 **** {"short-load-words", -(0x200)}, \ {"no-short-load-words", (0x200)}, \ ! ARM_EXTRA_TARGET_SWITCHES \ {"", TARGET_DEFAULT } \ } --- 119,125 ---- {"short-load-words", -(0x200)}, \ {"no-short-load-words", (0x200)}, \ ! {"soft-float", (0x400)}, \ ! {"hard-float", -(0x400)}, \ ! SUBTARGET_SWITCHES \ {"", TARGET_DEFAULT } \ } *************** *** 222,231 **** /* Define this if most significant byte of a word is the lowest numbered. ! Most ARM processors are run in little endian mode, but it should now be ! possible to build the compiler to support big endian code. (Note: This ! is currently a compiler-build-time option, not a run-time one. */ ! #ifndef BYTES_BIG_ENDIAN #define BYTES_BIG_ENDIAN 0 - #endif /* Define this if most significant word of a multiword number is the lowest --- 228,235 ---- /* Define this if most significant byte of a word is the lowest numbered. ! Most ARM processors are run in little endian mode, so that is the default. ! If you want to have it run-time selectable, change the definition in a ! cover file to be TARGET_BIG_ENDIAN. */ #define BYTES_BIG_ENDIAN 0 /* Define this if most significant word of a multiword number is the lowest *************** *** 365,371 **** XXX Is this still needed? */ #define CONDITIONAL_REGISTER_USAGE \ ! { \ ! if (obey_regdecls) \ ! fixed_regs[0] = 1; \ } --- 369,381 ---- XXX Is this still needed? */ #define CONDITIONAL_REGISTER_USAGE \ ! { \ ! if (obey_regdecls) \ ! fixed_regs[0] = 1; \ ! if (TARGET_SOFT_FLOAT) \ ! { \ ! int regno; \ ! for (regno = 16; regno < 24; ++regno) \ ! fixed_regs[regno] = call_used_regs[regno] = 1; \ ! } \ } *************** *** 557,561 **** #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,X) \ (((MODE) == DFmode && (CLASS) == GENERAL_REGS \ ! && true_regnum (X) == -1) ? GENERAL_REGS \ : ((MODE) == HImode && true_regnum (X) == -1) ? GENERAL_REGS : NO_REGS) --- 567,572 ---- #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,X) \ (((MODE) == DFmode && (CLASS) == GENERAL_REGS \ ! && true_regnum (X) == -1 && TARGET_HARD_FLOAT) \ ! ? GENERAL_REGS \ : ((MODE) == HImode && true_regnum (X) == -1) ? GENERAL_REGS : NO_REGS) *************** *** 605,608 **** --- 616,620 ---- /* Value is the number of byte of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 611,615 **** On the ARM, the caller does not pop any of its arguments that were passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE, SIZE) 0 /* Define how to find the value returned by a function. --- 623,627 ---- On the ARM, the caller does not pop any of its arguments that were passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 618,623 **** otherwise, FUNC is 0. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! (GET_MODE_CLASS (TYPE_MODE (VALTYPE)) == MODE_FLOAT \ ! ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0)) --- 630,635 ---- otherwise, FUNC is 0. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! (GET_MODE_CLASS (TYPE_MODE (VALTYPE)) == MODE_FLOAT && TARGET_HARD_FLOAT \ ! ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0)) *************** *** 625,630 **** assuming the value has mode MODE. */ #define LIBCALL_VALUE(MODE) \ ! (GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! ? gen_rtx (REG, MODE, 16) \ : gen_rtx (REG, MODE, 0)) --- 637,642 ---- assuming the value has mode MODE. */ #define LIBCALL_VALUE(MODE) \ ! (GET_MODE_CLASS (MODE) == MODE_FLOAT && TARGET_HARD_FLOAT \ ! ? gen_rtx (REG, MODE, 16) \ : gen_rtx (REG, MODE, 0)) *************** *** 632,636 **** On the ARM, only r0 and f0 can return results. */ #define FUNCTION_VALUE_REGNO_P(REGNO) \ ! ((REGNO) == 0 || (REGNO) == 16) /* Define where to put the arguments to a function. --- 644,648 ---- On the ARM, only r0 and f0 can return results. */ #define FUNCTION_VALUE_REGNO_P(REGNO) \ ! ((REGNO) == 0 || ((REGNO) == 16) && TARGET_HARD_FLOAT) /* Define where to put the arguments to a function. *************** *** 724,728 **** #define FUNCTION_PROFILER(STREAM,LABELNO) \ { \ ! fprintf(STREAM, "\tmov\t%sip, %slr\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ fprintf(STREAM, "\tbl\tmcount\n"); \ fprintf(STREAM, "\t.word\tLP%d\n", (LABELNO)); \ --- 736,740 ---- #define FUNCTION_PROFILER(STREAM,LABELNO) \ { \ ! fprintf(STREAM, "\tmov\t%sip, %slr\n", REGISTER_PREFIX, REGISTER_PREFIX); \ fprintf(STREAM, "\tbl\tmcount\n"); \ fprintf(STREAM, "\t.word\tLP%d\n", (LABELNO)); \ *************** *** 823,830 **** #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fprintf ((FILE), "\tldr\t%sr8, [%spc, #0]\n", ARM_REG_PREFIX, \ ! ARM_REG_PREFIX); \ ! fprintf ((FILE), "\tldr\t%spc, [%spc, #0]\n", ARM_REG_PREFIX, \ ! ARM_REG_PREFIX); \ fprintf ((FILE), "\t.word\t0\n"); \ fprintf ((FILE), "\t.word\t0\n"); \ --- 835,842 ---- #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fprintf ((FILE), "\tldr\t%sr8, [%spc, #0]\n", \ ! REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf ((FILE), "\tldr\t%spc, [%spc, #0]\n", \ ! REGISTER_PREFIX, REGISTER_PREFIX); \ fprintf ((FILE), "\t.word\t0\n"); \ fprintf ((FILE), "\t.word\t0\n"); \ *************** *** 1268,1272 **** /* All address computations that can be done are free, but rtx cost returns ! the same for practically all of them. So we weight the differnt types of address here in the order (most pref first): PRE/POST_INC/DEC, SHIFT or NON-INT sum, INT sum, REG, MEM or LABEL. */ --- 1280,1284 ---- /* All address computations that can be done are free, but rtx cost returns ! the same for practically all of them. So we weight the different types of address here in the order (most pref first): PRE/POST_INC/DEC, SHIFT or NON-INT sum, INT sum, REG, MEM or LABEL. */ *************** *** 1296,1302 **** /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. ! CCFPEmode should be used with floating inequalites, CCFPmode should be used with floating equalities. ! CC_NOOVmode should be used with SImode integer equalites CCmode should be used otherwise. */ --- 1308,1314 ---- /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. ! CCFPEmode should be used with floating inequalities, CCFPmode should be used with floating equalities. ! CC_NOOVmode should be used with SImode integer equalities. CCmode should be used otherwise. */ *************** *** 1343,1346 **** --- 1355,1359 ---- {"shift_operator", {ASHIFT, ASHIFTRT, LSHIFTRT, ROTATERT, MULT}}, \ {"di_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, MEM}}, \ + {"soft_df_operand", {SUBREG, REG, CONST_DOUBLE, MEM}}, \ {"load_multiple_operation", {PARALLEL}}, \ {"store_multiple_operation", {PARALLEL}}, \ *************** *** 1365,1377 **** { \ extern char *version_string; \ ! fprintf (STREAM,"%c Generated by gcc %s for ARM/%s\n", \ ! ARM_COMMENT_CHAR, version_string, ARM_OS_NAME); \ ! fprintf (STREAM,"%srfp\t.req\t%sr9\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ ! fprintf (STREAM,"%ssl\t.req\t%sr10\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ ! fprintf (STREAM,"%sfp\t.req\t%sr11\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ ! fprintf (STREAM,"%sip\t.req\t%sr12\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ ! fprintf (STREAM,"%ssp\t.req\t%sr13\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ ! fprintf (STREAM,"%slr\t.req\t%sr14\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ ! fprintf (STREAM,"%spc\t.req\t%sr15\n", ARM_REG_PREFIX, ARM_REG_PREFIX); \ } --- 1378,1390 ---- { \ extern char *version_string; \ ! fprintf (STREAM,"%s Generated by gcc %s for ARM/%s\n", \ ! ASM_COMMENT_START, version_string, ARM_OS_NAME); \ ! fprintf (STREAM,"%srfp\t.req\t%sr9\n", REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf (STREAM,"%ssl\t.req\t%sr10\n", REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf (STREAM,"%sfp\t.req\t%sr11\n", REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf (STREAM,"%sip\t.req\t%sr12\n", REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf (STREAM,"%ssp\t.req\t%sr13\n", REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf (STREAM,"%slr\t.req\t%sr14\n", REGISTER_PREFIX, REGISTER_PREFIX); \ ! fprintf (STREAM,"%spc\t.req\t%sr15\n", REGISTER_PREFIX, REGISTER_PREFIX); \ } *************** *** 1383,1386 **** --- 1396,1403 ---- #define DATA_SECTION_ASM_OP ".data" + #define REGISTER_PREFIX "" + #define USER_LABEL_PREFIX "_" + #define LOCAL_LABEL_PREFIX "" + /* The assembler's names for the registers. */ #ifndef REGISTER_NAMES *************** *** 1462,1466 **** /* Output a reference to a label. */ #define ASM_OUTPUT_LABELREF(STREAM,NAME) \ ! fprintf (STREAM, "_%s", NAME) /* Make an internal label into a string. */ --- 1479,1483 ---- /* Output a reference to a label. */ #define ASM_OUTPUT_LABELREF(STREAM,NAME) \ ! fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, NAME) /* Make an internal label into a string. */ *************** *** 1497,1507 **** /* Output a push or a pop instruction (only used when profiling). */ ! #define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \ ! fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", ARM_REG_PREFIX, ARM_REG_PREFIX, \ ! reg_names[REGNO]) ! ! #define ASM_OUTPUT_REG_POP(STREAM,REGNO) \ ! fprintf(STREAM,"\tldmfd\t%ssp!,{%s%s}\n", ARM_REG_PREFIX, ARM_REG_PREFIX, \ ! reg_names[REGNO]) /* Output a relative address. Not needed since jump tables are absolute --- 1514,1524 ---- /* Output a push or a pop instruction (only used when profiling). */ ! #define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \ ! fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", \ ! REGISTER_PREFIX, REGISTER_PREFIX, reg_names[REGNO]) ! ! #define ASM_OUTPUT_REG_POP(STREAM,REGNO) \ ! fprintf(STREAM,"\tldmfd\t%ssp!,{%s%s}\n", \ ! REGISTER_PREFIX, REGISTER_PREFIX, reg_names[REGNO]) /* Output a relative address. Not needed since jump tables are absolute *************** *** 1526,1534 **** REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ if (sizeof (int) == sizeof (long)) \ ! fprintf (STREAM, "\t.long 0x%x,0x%x,0x%x\t%c long double %s\n", \ ! l[2], l[1], l[0], ARM_COMMENT_CHAR, dstr); \ else \ ! fprintf (STREAM, "\t.long 0x%lx,0x%lx,0x%lx\t%c long double %s\n",\ ! l[0], l[1], l[2], ARM_COMMENT_CHAR, dstr); \ } while (0) --- 1543,1551 ---- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ if (sizeof (int) == sizeof (long)) \ ! fprintf (STREAM, "\t.long 0x%x,0x%x,0x%x\t%s long double %s\n", \ ! l[2], l[1], l[0], ASM_COMMENT_START, dstr); \ else \ ! fprintf (STREAM, "\t.long 0x%lx,0x%lx,0x%lx\t%s long double %s\n",\ ! l[0], l[1], l[2], ASM_COMMENT_START, dstr); \ } while (0) *************** *** 1541,1549 **** REAL_VALUE_TO_DECIMAL (VALUE, "%.14g", dstr); \ if (sizeof (int) == sizeof (long)) \ ! fprintf (STREAM, "\t.long 0x%x, 0x%x\t%c double %s\n", l[0], \ ! l[1], ARM_COMMENT_CHAR, dstr); \ else \ ! fprintf (STREAM, "\t.long 0x%lx, 0x%lx\t%c double %s\n", l[0], \ ! l[1], ARM_COMMENT_CHAR, dstr); \ } while (0) --- 1558,1566 ---- REAL_VALUE_TO_DECIMAL (VALUE, "%.14g", dstr); \ if (sizeof (int) == sizeof (long)) \ ! fprintf (STREAM, "\t.long 0x%x, 0x%x\t%s double %s\n", l[0], \ ! l[1], ASM_COMMENT_START, dstr); \ else \ ! fprintf (STREAM, "\t.long 0x%lx, 0x%lx\t%s double %s\n", l[0], \ ! l[1], ASM_COMMENT_START, dstr); \ } while (0) *************** *** 1555,1563 **** REAL_VALUE_TO_DECIMAL (VALUE, "%.7g", dstr); \ if (sizeof (int) == sizeof (long)) \ ! fprintf (STREAM, "\t.word 0x%x\t%c float %s\n", l, \ ! ARM_COMMENT_CHAR, dstr); \ else \ ! fprintf (STREAM, "\t.word 0x%lx\t%c float %s\n", l, \ ! ARM_COMMENT_CHAR, dstr); \ } while (0); --- 1572,1580 ---- REAL_VALUE_TO_DECIMAL (VALUE, "%.7g", dstr); \ if (sizeof (int) == sizeof (long)) \ ! fprintf (STREAM, "\t.word 0x%x\t%s float %s\n", l, \ ! ASM_COMMENT_START, dstr); \ else \ ! fprintf (STREAM, "\t.word 0x%lx\t%s float %s\n", l, \ ! ASM_COMMENT_START, dstr); \ } while (0); *************** *** 1613,1617 **** (fprintf (STREAM, "\t.comm\t"), \ assemble_name ((STREAM), (NAME)), \ ! fprintf(STREAM, ", %d\t%c%d\n", ROUNDED, ARM_COMMENT_CHAR, SIZE)) /* Output a local common block. /bin/as can't do this, so hack a `.space' into --- 1630,1634 ---- (fprintf (STREAM, "\t.comm\t"), \ assemble_name ((STREAM), (NAME)), \ ! fprintf(STREAM, ", %d\t%s %d\n", ROUNDED, ASM_COMMENT_START, SIZE)) /* Output a local common block. /bin/as can't do this, so hack a `.space' into *************** *** 1646,1656 **** final_prescan_insn (INSN, OPVEC, NOPERANDS) ! #ifndef ARM_COMMENT_CHAR ! #define ARM_COMMENT_CHAR '@' ! #endif ! ! /* Default is for register names not to have a prefix. */ ! #ifndef ARM_REG_PREFIX ! #define ARM_REG_PREFIX "" #endif --- 1663,1668 ---- final_prescan_insn (INSN, OPVEC, NOPERANDS) ! #ifndef ASM_COMMENT_START ! #define ASM_COMMENT_START "@" #endif *************** *** 1675,1679 **** \ if (GET_CODE (X) == REG) \ ! fprintf (STREAM, "[%s%s, #0]", ARM_REG_PREFIX, \ reg_names[REGNO (X)]); \ else if (GET_CODE (X) == PLUS || is_minus) \ --- 1687,1691 ---- \ if (GET_CODE (X) == REG) \ ! fprintf (STREAM, "[%s%s, #0]", REGISTER_PREFIX, \ reg_names[REGNO (X)]); \ else if (GET_CODE (X) == PLUS || is_minus) \ *************** *** 1697,1708 **** if (is_minus) \ offset = -offset; \ ! fprintf (STREAM, "[%s%s, #%d]", ARM_REG_PREFIX, \ base_reg_name, offset); \ break; \ \ case REG: \ ! fprintf (STREAM, "[%s%s, %s%s%s]", ARM_REG_PREFIX, \ base_reg_name, is_minus ? "-" : "", \ ! ARM_REG_PREFIX, reg_names[REGNO (index)] ); \ break; \ \ --- 1709,1720 ---- if (is_minus) \ offset = -offset; \ ! fprintf (STREAM, "[%s%s, #%d]", REGISTER_PREFIX, \ base_reg_name, offset); \ break; \ \ case REG: \ ! fprintf (STREAM, "[%s%s, %s%s%s]", REGISTER_PREFIX, \ base_reg_name, is_minus ? "-" : "", \ ! REGISTER_PREFIX, reg_names[REGNO (index)] ); \ break; \ \ *************** *** 1713,1718 **** case ROTATERT: \ { \ ! fprintf (STREAM, "[%s%s, %s%s%s", ARM_REG_PREFIX, \ ! base_reg_name, is_minus ? "-" : "", ARM_REG_PREFIX,\ reg_names[REGNO (XEXP (index, 0))]); \ arm_print_operand (STREAM, index, 'S'); \ --- 1725,1730 ---- case ROTATERT: \ { \ ! fprintf (STREAM, "[%s%s, %s%s%s", REGISTER_PREFIX, \ ! base_reg_name, is_minus ? "-" : "", REGISTER_PREFIX,\ reg_names[REGNO (XEXP (index, 0))]); \ arm_print_operand (STREAM, index, 'S'); \ *************** *** 1734,1743 **** \ if (GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC) \ ! fprintf (STREAM, "[%s%s, #%s%d]!", ARM_REG_PREFIX, \ reg_names[REGNO (XEXP (X, 0))], \ GET_CODE (X) == PRE_DEC ? "-" : "", \ GET_MODE_SIZE (output_memory_reference_mode)); \ else \ ! fprintf (STREAM, "[%s%s], #%s%d", ARM_REG_PREFIX, \ reg_names[REGNO (XEXP (X, 0))], \ GET_CODE (X) == POST_DEC ? "-" : "", \ --- 1746,1755 ---- \ if (GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC) \ ! fprintf (STREAM, "[%s%s, #%s%d]!", REGISTER_PREFIX, \ reg_names[REGNO (XEXP (X, 0))], \ GET_CODE (X) == PRE_DEC ? "-" : "", \ GET_MODE_SIZE (output_memory_reference_mode)); \ else \ ! fprintf (STREAM, "[%s%s], #%s%d", REGISTER_PREFIX, \ reg_names[REGNO (XEXP (X, 0))], \ GET_CODE (X) == POST_DEC ? "-" : "", \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/arm.md gcc-2.7.0/config/arm/arm.md *** gcc-2.6.3/config/arm/arm.md Mon Oct 24 06:12:43 1994 --- gcc-2.7.0/config/arm/arm.md Thu Jun 15 16:46:30 1995 *************** *** 1,4 **** ;;- Machine description for Advanced RISC Machines' ARM for GNU compiler ! ;; Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) ;; and Martin Simmons (@harleqn.co.uk). --- 1,4 ---- ;;- Machine description for Advanced RISC Machines' ARM for GNU compiler ! ;; Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. ;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) ;; and Martin Simmons (@harleqn.co.uk). *************** *** 19,23 **** ;; 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. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. --- 19,24 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. *************** *** 55,59 **** ; elimination scanning. ! ; NOCOND means that the condition codes are niether altered nor affect the ; output of this insn --- 56,60 ---- ; elimination scanning. ! ; NOCOND means that the condition codes are neither altered nor affect the ; output of this insn *************** *** 356,360 **** (plus:SF (match_operand:SF 1 "s_register_operand" "f,f") (match_operand:SF 2 "fpu_add_operand" "fG,H")))] ! "" "@ adf%?s\\t%0, %1, %2 --- 357,361 ---- (plus:SF (match_operand:SF 1 "s_register_operand" "f,f") (match_operand:SF 2 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ adf%?s\\t%0, %1, %2 *************** *** 366,370 **** (plus:DF (match_operand:DF 1 "s_register_operand" "f,f") (match_operand:DF 2 "fpu_add_operand" "fG,H")))] ! "" "@ adf%?d\\t%0, %1, %2 --- 367,371 ---- (plus:DF (match_operand:DF 1 "s_register_operand" "f,f") (match_operand:DF 2 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ adf%?d\\t%0, %1, %2 *************** *** 377,381 **** (match_operand:SF 1 "s_register_operand" "f,f")) (match_operand:DF 2 "fpu_add_operand" "fG,H")))] ! "" "@ adf%?d\\t%0, %1, %2 --- 378,382 ---- (match_operand:SF 1 "s_register_operand" "f,f")) (match_operand:DF 2 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ adf%?d\\t%0, %1, %2 *************** *** 388,392 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "adf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) --- 389,393 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "adf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) *************** *** 398,402 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "adf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) --- 399,403 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "adf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) *************** *** 406,410 **** (plus:XF (match_operand:XF 1 "s_register_operand" "f,f") (match_operand:XF 2 "fpu_add_operand" "fG,H")))] ! "ENABLE_XF_PATTERNS" "@ adf%?e\\t%0, %1, %2 --- 407,411 ---- (plus:XF (match_operand:XF 1 "s_register_operand" "f,f") (match_operand:XF 2 "fpu_add_operand" "fG,H")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "@ adf%?e\\t%0, %1, %2 *************** *** 545,549 **** (minus:SF (match_operand:SF 1 "fpu_rhs_operand" "f,G") (match_operand:SF 2 "fpu_rhs_operand" "fG,f")))] ! "" "@ suf%?s\\t%0, %1, %2 --- 546,550 ---- (minus:SF (match_operand:SF 1 "fpu_rhs_operand" "f,G") (match_operand:SF 2 "fpu_rhs_operand" "fG,f")))] ! "TARGET_HARD_FLOAT" "@ suf%?s\\t%0, %1, %2 *************** *** 555,559 **** (minus:DF (match_operand:DF 1 "fpu_rhs_operand" "f,G") (match_operand:DF 2 "fpu_rhs_operand" "fG,f")))] ! "" "@ suf%?d\\t%0, %1, %2 --- 556,560 ---- (minus:DF (match_operand:DF 1 "fpu_rhs_operand" "f,G") (match_operand:DF 2 "fpu_rhs_operand" "fG,f")))] ! "TARGET_HARD_FLOAT" "@ suf%?d\\t%0, %1, %2 *************** *** 566,570 **** (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "" "suf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) --- 567,571 ---- (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "suf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) *************** *** 575,579 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f,f"))))] ! "" "@ suf%?d\\t%0, %1, %2 --- 576,580 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f,f"))))] ! "TARGET_HARD_FLOAT" "@ suf%?d\\t%0, %1, %2 *************** *** 587,591 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "suf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) --- 588,592 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "suf%?d\\t%0, %1, %2" [(set_attr "type" "farith")]) *************** *** 595,599 **** (minus:XF (match_operand:XF 1 "fpu_rhs_operand" "f,G") (match_operand:XF 2 "fpu_rhs_operand" "fG,f")))] ! "ENABLE_XF_PATTERNS" "@ suf%?e\\t%0, %1, %2 --- 596,600 ---- (minus:XF (match_operand:XF 1 "fpu_rhs_operand" "f,G") (match_operand:XF 2 "fpu_rhs_operand" "fG,f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "@ suf%?e\\t%0, %1, %2 *************** *** 677,681 **** (mult:SF (match_operand:SF 1 "s_register_operand" "f") (match_operand:SF 2 "fpu_rhs_operand" "fG")))] ! "" "fml%?s\\t%0, %1, %2" [(set_attr "type" "ffmul")]) --- 678,682 ---- (mult:SF (match_operand:SF 1 "s_register_operand" "f") (match_operand:SF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "fml%?s\\t%0, %1, %2" [(set_attr "type" "ffmul")]) *************** *** 685,689 **** (mult:DF (match_operand:DF 1 "s_register_operand" "f") (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) --- 686,690 ---- (mult:DF (match_operand:DF 1 "s_register_operand" "f") (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) *************** *** 694,698 **** (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) --- 695,699 ---- (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) *************** *** 703,707 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) --- 704,708 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) *************** *** 713,717 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) --- 714,718 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "muf%?d\\t%0, %1, %2" [(set_attr "type" "fmul")]) *************** *** 721,725 **** (mult:XF (match_operand:XF 1 "s_register_operand" "f") (match_operand:XF 2 "fpu_rhs_operand" "fG")))] ! "ENABLE_XF_PATTERNS" "muf%?e\\t%0, %1, %2" [(set_attr "type" "fmul")]) --- 722,726 ---- (mult:XF (match_operand:XF 1 "s_register_operand" "f") (match_operand:XF 2 "fpu_rhs_operand" "fG")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "muf%?e\\t%0, %1, %2" [(set_attr "type" "fmul")]) *************** *** 731,735 **** (div:SF (match_operand:SF 1 "fpu_rhs_operand" "f,G") (match_operand:SF 2 "fpu_rhs_operand" "fG,f")))] ! "" "@ fdv%?s\\t%0, %1, %2 --- 732,736 ---- (div:SF (match_operand:SF 1 "fpu_rhs_operand" "f,G") (match_operand:SF 2 "fpu_rhs_operand" "fG,f")))] ! "TARGET_HARD_FLOAT" "@ fdv%?s\\t%0, %1, %2 *************** *** 741,745 **** (div:DF (match_operand:DF 1 "fpu_rhs_operand" "f,G") (match_operand:DF 2 "fpu_rhs_operand" "fG,f")))] ! "" "@ dvf%?d\\t%0, %1, %2 --- 742,746 ---- (div:DF (match_operand:DF 1 "fpu_rhs_operand" "f,G") (match_operand:DF 2 "fpu_rhs_operand" "fG,f")))] ! "TARGET_HARD_FLOAT" "@ dvf%?d\\t%0, %1, %2 *************** *** 752,756 **** (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "" "dvf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) --- 753,757 ---- (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "dvf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) *************** *** 761,765 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "rdf%?d\\t%0, %2, %1" [(set_attr "type" "fdivd")]) --- 762,766 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "rdf%?d\\t%0, %2, %1" [(set_attr "type" "fdivd")]) *************** *** 771,775 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "dvf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) --- 772,776 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "dvf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) *************** *** 779,783 **** (div:XF (match_operand:XF 1 "fpu_rhs_operand" "f,G") (match_operand:XF 2 "fpu_rhs_operand" "fG,f")))] ! "ENABLE_XF_PATTERNS" "@ dvf%?e\\t%0, %1, %2 --- 780,784 ---- (div:XF (match_operand:XF 1 "fpu_rhs_operand" "f,G") (match_operand:XF 2 "fpu_rhs_operand" "fG,f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "@ dvf%?e\\t%0, %1, %2 *************** *** 791,795 **** (mod:SF (match_operand:SF 1 "s_register_operand" "f") (match_operand:SF 2 "fpu_rhs_operand" "fG")))] ! "" "rmf%?s\\t%0, %1, %2" [(set_attr "type" "fdivs")]) --- 792,796 ---- (mod:SF (match_operand:SF 1 "s_register_operand" "f") (match_operand:SF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "rmf%?s\\t%0, %1, %2" [(set_attr "type" "fdivs")]) *************** *** 799,803 **** (mod:DF (match_operand:DF 1 "s_register_operand" "f") (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) --- 800,804 ---- (mod:DF (match_operand:DF 1 "s_register_operand" "f") (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) *************** *** 808,812 **** (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) --- 809,813 ---- (match_operand:SF 1 "s_register_operand" "f")) (match_operand:DF 2 "fpu_rhs_operand" "fG")))] ! "TARGET_HARD_FLOAT" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) *************** *** 817,821 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) --- 818,822 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) *************** *** 827,831 **** (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) --- 828,832 ---- (float_extend:DF (match_operand:SF 2 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "rmf%?d\\t%0, %1, %2" [(set_attr "type" "fdivd")]) *************** *** 835,839 **** (mod:XF (match_operand:XF 1 "s_register_operand" "f") (match_operand:XF 2 "fpu_rhs_operand" "fG")))] ! "ENABLE_XF_PATTERNS" "rmf%?e\\t%0, %1, %2" [(set_attr "type" "fdivx")]) --- 836,840 ---- (mod:XF (match_operand:XF 1 "s_register_operand" "f") (match_operand:XF 2 "fpu_rhs_operand" "fG")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "rmf%?e\\t%0, %1, %2" [(set_attr "type" "fdivx")]) *************** *** 1464,1468 **** [(set (match_operand:SF 0 "s_register_operand" "=f") (neg:SF (match_operand:SF 1 "s_register_operand" "f")))] ! "" "mnf%?s\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1465,1469 ---- [(set (match_operand:SF 0 "s_register_operand" "=f") (neg:SF (match_operand:SF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "mnf%?s\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1471,1475 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (neg:DF (match_operand:DF 1 "s_register_operand" "f")))] ! "" "mnf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1472,1476 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (neg:DF (match_operand:DF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "mnf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1479,1483 **** (neg:DF (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "" "mnf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1480,1484 ---- (neg:DF (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "mnf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1486,1490 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (neg:XF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "mnf%?e\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1487,1491 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (neg:XF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "mnf%?e\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1520,1524 **** [(set (match_operand:SF 0 "s_register_operand" "=f") (abs:SF (match_operand:SF 1 "s_register_operand" "f")))] ! "" "abs%?s\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1521,1525 ---- [(set (match_operand:SF 0 "s_register_operand" "=f") (abs:SF (match_operand:SF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "abs%?s\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1527,1531 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (abs:DF (match_operand:DF 1 "s_register_operand" "f")))] ! "" "abs%?d\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1528,1532 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (abs:DF (match_operand:DF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "abs%?d\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1535,1539 **** (abs:DF (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "" "abs%?d\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1536,1540 ---- (abs:DF (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "abs%?d\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1542,1546 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (abs:XF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "abs%?e\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1543,1547 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (abs:XF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "abs%?e\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1549,1553 **** [(set (match_operand:SF 0 "s_register_operand" "=f") (sqrt:SF (match_operand:SF 1 "s_register_operand" "f")))] ! "" "sqt%?s\\t%0, %1" [(set_attr "type" "float_em")]) --- 1550,1554 ---- [(set (match_operand:SF 0 "s_register_operand" "=f") (sqrt:SF (match_operand:SF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "sqt%?s\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1556,1560 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (sqrt:DF (match_operand:DF 1 "s_register_operand" "f")))] ! "" "sqt%?d\\t%0, %1" [(set_attr "type" "float_em")]) --- 1557,1561 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (sqrt:DF (match_operand:DF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "sqt%?d\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1564,1568 **** (sqrt:DF (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "" "sqt%?d\\t%0, %1" [(set_attr "type" "float_em")]) --- 1565,1569 ---- (sqrt:DF (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "sqt%?d\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1571,1575 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (sqrt:XF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "sqt%?e\\t%0, %1" [(set_attr "type" "float_em")]) --- 1572,1576 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (sqrt:XF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "sqt%?e\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1578,1582 **** [(set (match_operand:SF 0 "s_register_operand" "=f") (unspec:SF [(match_operand:SF 1 "s_register_operand" "f")] 0))] ! "" "sin%?s\\t%0, %1" [(set_attr "type" "float_em")]) --- 1579,1583 ---- [(set (match_operand:SF 0 "s_register_operand" "=f") (unspec:SF [(match_operand:SF 1 "s_register_operand" "f")] 0))] ! "TARGET_HARD_FLOAT" "sin%?s\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1585,1589 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (unspec:DF [(match_operand:DF 1 "s_register_operand" "f")] 0))] ! "" "sin%?d\\t%0, %1" [(set_attr "type" "float_em")]) --- 1586,1590 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (unspec:DF [(match_operand:DF 1 "s_register_operand" "f")] 0))] ! "TARGET_HARD_FLOAT" "sin%?d\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1593,1597 **** (unspec:DF [(float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))] 0))] ! "" "sin%?d\\t%0, %1" [(set_attr "type" "float_em")]) --- 1594,1598 ---- (unspec:DF [(float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))] 0))] ! "TARGET_HARD_FLOAT" "sin%?d\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1600,1604 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (unspec:XF [(match_operand:XF 1 "s_register_operand" "f")] 0))] ! "ENABLE_XF_PATTERNS" "sin%?e\\t%0, %1" [(set_attr "type" "float_em")]) --- 1601,1605 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (unspec:XF [(match_operand:XF 1 "s_register_operand" "f")] 0))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "sin%?e\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1607,1611 **** [(set (match_operand:SF 0 "s_register_operand" "=f") (unspec:SF [(match_operand:SF 1 "s_register_operand" "f")] 1))] ! "" "cos%?s\\t%0, %1" [(set_attr "type" "float_em")]) --- 1608,1612 ---- [(set (match_operand:SF 0 "s_register_operand" "=f") (unspec:SF [(match_operand:SF 1 "s_register_operand" "f")] 1))] ! "TARGET_HARD_FLOAT" "cos%?s\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1614,1618 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (unspec:DF [(match_operand:DF 1 "s_register_operand" "f")] 1))] ! "" "cos%?d\\t%0, %1" [(set_attr "type" "float_em")]) --- 1615,1619 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (unspec:DF [(match_operand:DF 1 "s_register_operand" "f")] 1))] ! "TARGET_HARD_FLOAT" "cos%?d\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1622,1626 **** (unspec:DF [(float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))] 1))] ! "" "cos%?d\\t%0, %1" [(set_attr "type" "float_em")]) --- 1623,1627 ---- (unspec:DF [(float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))] 1))] ! "TARGET_HARD_FLOAT" "cos%?d\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1629,1633 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (unspec:XF [(match_operand:XF 1 "s_register_operand" "f")] 1))] ! "ENABLE_XF_PATTERNS" "cos%?e\\t%0, %1" [(set_attr "type" "float_em")]) --- 1630,1634 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (unspec:XF [(match_operand:XF 1 "s_register_operand" "f")] 1))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "cos%?e\\t%0, %1" [(set_attr "type" "float_em")]) *************** *** 1670,1674 **** [(set (match_operand:SF 0 "s_register_operand" "=f") (float:SF (match_operand:SI 1 "s_register_operand" "r")))] ! "" "flt%?s\\t%0, %1" [(set_attr "type" "r_2_f")]) --- 1671,1675 ---- [(set (match_operand:SF 0 "s_register_operand" "=f") (float:SF (match_operand:SI 1 "s_register_operand" "r")))] ! "TARGET_HARD_FLOAT" "flt%?s\\t%0, %1" [(set_attr "type" "r_2_f")]) *************** *** 1677,1681 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (float:DF (match_operand:SI 1 "s_register_operand" "r")))] ! "" "flt%?d\\t%0, %1" [(set_attr "type" "r_2_f")]) --- 1678,1682 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (float:DF (match_operand:SI 1 "s_register_operand" "r")))] ! "TARGET_HARD_FLOAT" "flt%?d\\t%0, %1" [(set_attr "type" "r_2_f")]) *************** *** 1684,1688 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (float:XF (match_operand:SI 1 "s_register_operand" "r")))] ! "ENABLE_XF_PATTERNS" "flt%?e\\t%0, %1" [(set_attr "type" "r_2_f")]) --- 1685,1689 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (float:XF (match_operand:SI 1 "s_register_operand" "r")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "flt%?e\\t%0, %1" [(set_attr "type" "r_2_f")]) *************** *** 1691,1695 **** [(set (match_operand:SI 0 "s_register_operand" "=r") (fix:SI (match_operand:SF 1 "s_register_operand" "f")))] ! "" "fix%?z\\t%0, %1" [(set_attr "type" "f_2_r")]) --- 1692,1696 ---- [(set (match_operand:SI 0 "s_register_operand" "=r") (fix:SI (match_operand:SF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "fix%?z\\t%0, %1" [(set_attr "type" "f_2_r")]) *************** *** 1698,1702 **** [(set (match_operand:SI 0 "s_register_operand" "=r") (fix:SI (match_operand:DF 1 "s_register_operand" "f")))] ! "" "fix%?z\\t%0, %1" [(set_attr "type" "f_2_r")]) --- 1699,1703 ---- [(set (match_operand:SI 0 "s_register_operand" "=r") (fix:SI (match_operand:DF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "fix%?z\\t%0, %1" [(set_attr "type" "f_2_r")]) *************** *** 1705,1709 **** [(set (match_operand:SI 0 "s_register_operand" "=r") (fix:SI (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "fix%?z\\t%0, %1" [(set_attr "type" "f_2_r")]) --- 1706,1710 ---- [(set (match_operand:SI 0 "s_register_operand" "=r") (fix:SI (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "fix%?z\\t%0, %1" [(set_attr "type" "f_2_r")]) *************** *** 1715,1719 **** (float_truncate:SF (match_operand:DF 1 "s_register_operand" "f")))] ! "" "mvf%?s\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1716,1720 ---- (float_truncate:SF (match_operand:DF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "mvf%?s\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1723,1727 **** (float_truncate:SF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "mvf%?s\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1724,1728 ---- (float_truncate:SF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "mvf%?s\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1731,1735 **** (float_truncate:DF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "mvf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1732,1736 ---- (float_truncate:DF (match_operand:XF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "mvf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1902,1906 **** [(set (match_operand:DF 0 "s_register_operand" "=f") (float_extend:DF (match_operand:SF 1 "s_register_operand" "f")))] ! "" "mvf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1903,1907 ---- [(set (match_operand:DF 0 "s_register_operand" "=f") (float_extend:DF (match_operand:SF 1 "s_register_operand" "f")))] ! "TARGET_HARD_FLOAT" "mvf%?d\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1909,1913 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (float_extend:XF (match_operand:SF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "mvf%?e\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1910,1914 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (float_extend:XF (match_operand:SF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "mvf%?e\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 1916,1920 **** [(set (match_operand:XF 0 "s_register_operand" "=f") (float_extend:XF (match_operand:DF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS" "mvf%?e\\t%0, %1" [(set_attr "type" "ffarith")]) --- 1917,1921 ---- [(set (match_operand:XF 0 "s_register_operand" "=f") (float_extend:XF (match_operand:DF 1 "s_register_operand" "f")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "mvf%?e\\t%0, %1" [(set_attr "type" "ffarith")]) *************** *** 2105,2109 **** ;; In both this routine and the next, we must be careful not to spill ! ;; a memory address of reg+large_const into a seperate PLUS insn, since this ;; can generate unrecognizable rtl. --- 2106,2110 ---- ;; In both this routine and the next, we must be careful not to spill ! ;; a memory address of reg+large_const into a separate PLUS insn, since this ;; can generate unrecognizable rtl. *************** *** 2410,2415 **** " if (GET_CODE (operands[1]) == CONST_DOUBLE ! && ((GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) < 16) || ! (const_double_rtx_ok_for_fpu (operands[1]) || neg_const_double_rtx_ok_for_fpu (operands[1])))) --- 2411,2417 ---- " if (GET_CODE (operands[1]) == CONST_DOUBLE ! && (TARGET_SOFT_FLOAT ! || (GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) < 16) || ! (const_double_rtx_ok_for_fpu (operands[1]) || neg_const_double_rtx_ok_for_fpu (operands[1])))) *************** *** 2439,2443 **** [(set (match_operand:SF 0 "general_operand" "=f,f,f,m,f,r,r,r,m") (match_operand:SF 1 "general_operand" "fG,H,m,f,r,f,r,m,r"))] ! "GET_CODE (operands[0]) != MEM || register_operand (operands[1], SFmode)" "@ mvf%?s\\t%0, %1 --- 2441,2446 ---- [(set (match_operand:SF 0 "general_operand" "=f,f,f,m,f,r,r,r,m") (match_operand:SF 1 "general_operand" "fG,H,m,f,r,f,r,m,r"))] ! "TARGET_HARD_FLOAT ! && (GET_CODE (operands[0]) != MEM || register_operand (operands[1], SFmode))" "@ mvf%?s\\t%0, %1 *************** *** 2454,2457 **** --- 2457,2476 ---- "ffarith,ffarith,f_load,f_store,r_mem_f,f_mem_r,*,load,store1")]) + ;; Exactly the same as above, except that all `f' cases are deleted. + ;; This is necessary to prevent reload from ever trying to use a `f' reg + ;; when -msoft-float. + + (define_insn "*movsf_soft_insn" + [(set (match_operand:SF 0 "general_operand" "=r,r,m") + (match_operand:SF 1 "general_operand" "r,m,r"))] + "TARGET_SOFT_FLOAT + && (GET_CODE (operands[0]) != MEM || register_operand (operands[1], SFmode))" + "@ + mov%?\\t%0, %1 + ldr%?\\t%0, %1\\t%@ float + str%?\\t%1, %0\\t%@ float" + [(set_attr "length" "4,4,4") + (set_attr "type" "*,load,store1")]) + (define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") *************** *** 2460,2465 **** " if (GET_CODE (operands[1]) == CONST_DOUBLE ! && ((GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) < 16) || ! (const_double_rtx_ok_for_fpu (operands[1]) || neg_const_double_rtx_ok_for_fpu (operands[1])))) --- 2479,2485 ---- " if (GET_CODE (operands[1]) == CONST_DOUBLE ! && (TARGET_SOFT_FLOAT ! || (GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) < 16) || ! (const_double_rtx_ok_for_fpu (operands[1]) || neg_const_double_rtx_ok_for_fpu (operands[1])))) *************** *** 2508,2512 **** (match_operand:DF 1 "general_operand" "Q,r,?o,?f,!G,!H,m,f,r,f,??r"))] ! "GET_CODE (operands[0]) != MEM || register_operand (operands[1], DFmode)" "* { --- 2528,2533 ---- (match_operand:DF 1 "general_operand" "Q,r,?o,?f,!G,!H,m,f,r,f,??r"))] ! "TARGET_HARD_FLOAT ! && (GET_CODE (operands[0]) != MEM || register_operand (operands[1], DFmode))" "* { *************** *** 2548,2555 **** "load,store2,load,ffarith,ffarith,ffarith,f_load,f_store,r_mem_f,f_mem_r,*")]) (define_expand "movxf" [(set (match_operand:XF 0 "general_operand" "") (match_operand:XF 1 "general_operand" ""))] ! "ENABLE_XF_PATTERNS" "") --- 2569,2588 ---- "load,store2,load,ffarith,ffarith,ffarith,f_load,f_store,r_mem_f,f_mem_r,*")]) + ;; Software floating point version. This is essentially the same as movdi. + ;; Do not use `f' as a constraint to prevent reload from ever trying to use + ;; an `f' reg. + + (define_insn "*movdf_soft_insn" + [(set (match_operand:DF 0 "soft_df_operand" "=r,r,o<>,r") + (match_operand:DF 1 "soft_df_operand" "r,o<>,r,F"))] + "TARGET_SOFT_FLOAT" + "* return output_move_double (operands);" + [(set_attr "length" "8,8,8,32") + (set_attr "type" "*,load,store2,*")]) + (define_expand "movxf" [(set (match_operand:XF 0 "general_operand" "") (match_operand:XF 1 "general_operand" ""))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "") *************** *** 2560,2564 **** [(set (match_operand:XF 0 "general_operand" "=f,f,f,m,f,r,r") (match_operand:XF 1 "general_operand" "fG,H,m,f,r,f,r"))] ! "ENABLE_XF_PATTERNS || reload_completed" "* switch (which_alternative) --- 2593,2597 ---- [(set (match_operand:XF 0 "general_operand" "=f,f,f,m,f,r,r") (match_operand:XF 1 "general_operand" "fG,H,m,f,r,f,r"))] ! "TARGET_HARD_FLOAT && (ENABLE_XF_PATTERNS || reload_completed)" "* switch (which_alternative) *************** *** 2766,2770 **** (compare:CC (match_operand:SF 0 "s_register_operand" "") (match_operand:SF 1 "fpu_rhs_operand" "")))] ! "" " { --- 2799,2803 ---- (compare:CC (match_operand:SF 0 "s_register_operand" "") (match_operand:SF 1 "fpu_rhs_operand" "")))] ! "TARGET_HARD_FLOAT" " { *************** *** 2780,2784 **** (compare:CC (match_operand:DF 0 "s_register_operand" "") (match_operand:DF 1 "fpu_rhs_operand" "")))] ! "" " { --- 2813,2817 ---- (compare:CC (match_operand:DF 0 "s_register_operand" "") (match_operand:DF 1 "fpu_rhs_operand" "")))] ! "TARGET_HARD_FLOAT" " { *************** *** 2794,2798 **** (compare:CC (match_operand:XF 0 "s_register_operand" "") (match_operand:XF 1 "fpu_rhs_operand" "")))] ! "ENABLE_XF_PATTERNS" " { --- 2827,2831 ---- (compare:CC (match_operand:XF 0 "s_register_operand" "") (match_operand:XF 1 "fpu_rhs_operand" "")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" " { *************** *** 2846,2850 **** (compare:CCFP (match_operand:SF 0 "s_register_operand" "f,f") (match_operand:SF 1 "fpu_add_operand" "fG,H")))] ! "" "@ cmf%?\\t%0, %1 --- 2879,2883 ---- (compare:CCFP (match_operand:SF 0 "s_register_operand" "f,f") (match_operand:SF 1 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ cmf%?\\t%0, %1 *************** *** 2857,2861 **** (compare:CCFP (match_operand:DF 0 "s_register_operand" "f,f") (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "" "@ cmf%?\\t%0, %1 --- 2890,2894 ---- (compare:CCFP (match_operand:DF 0 "s_register_operand" "f,f") (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ cmf%?\\t%0, %1 *************** *** 2869,2873 **** (match_operand:SF 0 "s_register_operand" "f,f")) (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "" "@ cmf%?\\t%0, %1 --- 2902,2906 ---- (match_operand:SF 0 "s_register_operand" "f,f")) (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ cmf%?\\t%0, %1 *************** *** 2881,2885 **** (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "" "cmf%?\\t%0, %1" [(set_attr "conds" "set") --- 2914,2918 ---- (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "cmf%?\\t%0, %1" [(set_attr "conds" "set") *************** *** 2890,2894 **** (compare:CCFP (match_operand:XF 0 "s_register_operand" "f,f") (match_operand:XF 1 "fpu_add_operand" "fG,H")))] ! "ENABLE_XF_PATTERNS" "@ cmf%?\\t%0, %1 --- 2923,2927 ---- (compare:CCFP (match_operand:XF 0 "s_register_operand" "f,f") (match_operand:XF 1 "fpu_add_operand" "fG,H")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "@ cmf%?\\t%0, %1 *************** *** 2901,2905 **** (compare:CCFPE (match_operand:SF 0 "s_register_operand" "f,f") (match_operand:SF 1 "fpu_add_operand" "fG,H")))] ! "" "@ cmf%?e\\t%0, %1 --- 2934,2938 ---- (compare:CCFPE (match_operand:SF 0 "s_register_operand" "f,f") (match_operand:SF 1 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ cmf%?e\\t%0, %1 *************** *** 2912,2916 **** (compare:CCFPE (match_operand:DF 0 "s_register_operand" "f,f") (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "" "@ cmf%?e\\t%0, %1 --- 2945,2949 ---- (compare:CCFPE (match_operand:DF 0 "s_register_operand" "f,f") (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ cmf%?e\\t%0, %1 *************** *** 2924,2928 **** (match_operand:SF 0 "s_register_operand" "f,f")) (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "" "@ cmf%?e\\t%0, %1 --- 2957,2961 ---- (match_operand:SF 0 "s_register_operand" "f,f")) (match_operand:DF 1 "fpu_add_operand" "fG,H")))] ! "TARGET_HARD_FLOAT" "@ cmf%?e\\t%0, %1 *************** *** 2936,2940 **** (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "" "cmf%?e\\t%0, %1" [(set_attr "conds" "set") --- 2969,2973 ---- (float_extend:DF (match_operand:SF 1 "s_register_operand" "f"))))] ! "TARGET_HARD_FLOAT" "cmf%?e\\t%0, %1" [(set_attr "conds" "set") *************** *** 2945,2949 **** (compare:CCFPE (match_operand:XF 0 "s_register_operand" "f,f") (match_operand:XF 1 "fpu_add_operand" "fG,H")))] ! "ENABLE_XF_PATTERNS" "@ cmf%?e\\t%0, %1 --- 2978,2982 ---- (compare:CCFPE (match_operand:XF 0 "s_register_operand" "f,f") (match_operand:XF 1 "fpu_add_operand" "fG,H")))] ! "ENABLE_XF_PATTERNS && TARGET_HARD_FLOAT" "@ cmf%?e\\t%0, %1 *************** *** 3280,3283 **** --- 3313,3408 ---- + ;; Conditional move insns + + (define_expand "movsicc" + [(set (match_operand:SI 0 "register_operand" "") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:SI 2 "arm_not_operand" "") + (match_operand:SI 3 "register_operand" "")))] + "" + " + { + enum rtx_code code = GET_CODE (operands[1]); + rtx ccreg = gen_rtx (REG, + SELECT_CC_MODE (code, arm_compare_op0, arm_compare_op1), + CC_REGNUM); + + operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); + }") + + (define_expand "movsfcc" + [(set (match_operand:SF 0 "register_operand" "") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:SF 2 "nonmemory_operand" "") + (match_operand:SF 3 "register_operand" "")))] + "" + " + { + enum rtx_code code = GET_CODE (operands[1]); + rtx ccreg = gen_rtx (REG, + SELECT_CC_MODE (code, arm_compare_op0, arm_compare_op1), + CC_REGNUM); + + operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); + }") + + (define_expand "movdfcc" + [(set (match_operand:DF 0 "register_operand" "") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:DF 2 "nonmemory_operand" "") + (match_operand:DF 3 "register_operand" "")))] + "TARGET_HARD_FLOAT" + " + { + enum rtx_code code = GET_CODE (operands[1]); + rtx ccreg = gen_rtx (REG, + SELECT_CC_MODE (code, arm_compare_op0, arm_compare_op1), + CC_REGNUM); + + operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx); + }") + + (define_insn "*movsicc_insn" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:SI 2 "arm_not_operand" "rI,K") + (match_operand:SI 3 "register_operand" "0,0")))] + "" + "@ + mov%d1\\t%0, %2 + mvn%d1\\t%0, #%B2" + [(set_attr "type" "*,*") + (set_attr "conds" "use,use")]) + + (define_insn "*movsfcc_hard_insn" + [(set (match_operand:SF 0 "register_operand" "=f") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:SF 2 "register_operand" "f") + (match_operand:SF 3 "register_operand" "0")))] + "TARGET_HARD_FLOAT" + "mvf%d1s\\t%0, %2" + [(set_attr "type" "ffarith") + (set_attr "conds" "use")]) + + (define_insn "*movsfcc_soft_insn" + [(set (match_operand:SF 0 "register_operand" "=r") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:SF 2 "register_operand" "r") + (match_operand:SF 3 "register_operand" "0")))] + "TARGET_SOFT_FLOAT" + "mov%d1\\t%0, %2" + [(set_attr "type" "*") + (set_attr "conds" "use")]) + + (define_insn "*movdfcc_insn" + [(set (match_operand:DF 0 "register_operand" "=f") + (if_then_else (match_operand 1 "comparison_operator" "") + (match_operand:DF 2 "register_operand" "f") + (match_operand:DF 3 "register_operand" "0")))] + "TARGET_HARD_FLOAT" + "mvf%d1d\\t%0, %2" + [(set_attr "type" "ffarith") + (set_attr "conds" "use")]) + ;; Jump and linkage insns *************** *** 3869,3873 **** ;; Don't match these patterns if we can use a conditional compare, since they ! ;; tell the final prescan branch elimator code that full branch inlining ;; can't be done. --- 3994,3998 ---- ;; Don't match these patterns if we can use a conditional compare, since they ! ;; tell the final prescan branch eliminator code that full branch inlining ;; can't be done. *************** *** 4106,4110 **** ;; Don't match these patterns if we can use a conditional compare, since they ! ;; tell the final prescan branch elimator code that full branch inlining ;; can't be done. --- 4231,4235 ---- ;; Don't match these patterns if we can use a conditional compare, since they ! ;; tell the final prescan branch eliminator code that full branch inlining ;; can't be done. *************** *** 4269,4273 **** "* /* If we have an operation where (op x 0) is the identity operation and ! the condtional operator is LT or GE and we are comparing against zero and everything is in registers then we can do this in two instructions */ if (operands[3] == const0_rtx --- 4394,4398 ---- "* /* If we have an operation where (op x 0) is the identity operation and ! the conditional operator is LT or GE and we are comparing against zero and everything is in registers then we can do this in two instructions */ if (operands[3] == const0_rtx *************** *** 4314,4318 **** "* /* If we have an operation where (op x 0) is the identity operation and ! the condtional operator is LT or GE and we are comparing against zero and everything is in registers then we can do this in two instructions */ if (operands[5] == const0_rtx --- 4439,4443 ---- "* /* If we have an operation where (op x 0) is the identity operation and ! the conditional operator is LT or GE and we are comparing against zero and everything is in registers then we can do this in two instructions */ if (operands[5] == const0_rtx *************** *** 5185,5189 **** ;; since restoring the frame frees the memory, which is not what we want. ;; Sometimes the return might have been targeted by the final prescan: ! ;; if so then emit a propper return insn as well. ;; Unfortunately, if the frame pointer is required, we don't know if the ;; current function has any implicit stack pointer adjustments that will --- 5310,5314 ---- ;; since restoring the frame frees the memory, which is not what we want. ;; Sometimes the return might have been targeted by the final prescan: ! ;; if so then emit a proper return insn as well. ;; Unfortunately, if the frame pointer is required, we don't know if the ;; current function has any implicit stack pointer adjustments that will *************** *** 5295,5299 **** ;; execution continues at the branch; this avoids a prefetch stall. ;; We use the length attribute (via short_branch ()) to establish whether or ! ;; not this is possible, this is the same asthe sparc does. (define_peephole --- 5420,5424 ---- ;; execution continues at the branch; this avoids a prefetch stall. ;; We use the length attribute (via short_branch ()) to establish whether or ! ;; not this is possible, this is the same as the sparc does. (define_peephole diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/lib1funcs.asm gcc-2.7.0/config/arm/lib1funcs.asm *** gcc-2.6.3/config/arm/lib1funcs.asm --- gcc-2.7.0/config/arm/lib1funcs.asm Thu Jun 15 09:17:09 1995 *************** *** 0 **** --- 1,1598 ---- + @ libgcc1 routines for ARM cpu. + @ Division and remainder, from Appendix E of the Sparc Version 8 + @ Architecture Manual, with fixes from Gordon Irlam. + @ Rewritten for the ARM by Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + /* Copyright (C) 1995 Free Software Foundation, Inc. + + This file 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 2, or (at your option) any + later version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file with other programs, and to distribute + those programs without any restriction coming from the use of this + file. (The General Public License restrictions do apply in other + respects; for example, they cover modification of the file, and + distribution when not linked into another program.) + + This file 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; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + + /* + * Input: dividend and divisor in r0 and r1 respectively. + * + * m4 parameters: + * NAME name of function to generate + * OP OP=div => r0 / r1; OP=mod => r0 % r1 + * S S=true => signed; S=false => unsigned + * + * Algorithm parameters: + * N how many bits per iteration we try to get (4) + * WORDSIZE total number of bits (32) + * + * Derived constants: + * TOPBITS number of bits in the top `decade' of a number + * + * Important variables: + * Q the partial quotient under development (initially 0) + * R the remainder so far, initially the dividend + * ITER number of main division loop iterations required; + * equal to ceil(log2(quotient) / N). Note that this + * is the log base (2^N) of the quotient. + * V the current comparand, initially divisor*2^(ITER*N-1) + * + * Cost: + * Current estimate for non-large dividend is + * ceil(log2(quotient) / N) * (10 + 7N/2) + C + * A large dividend is one greater than 2^(31-TOPBITS) and takes a + * different path, as the upper bits of the quotient must be developed + * one bit at a time. + */ + + /* + define(N, `4')dnl + define(WORDSIZE, `32')dnl + define(TOPBITS, eval(WORDSIZE - N*((WORDSIZE-1)/N)))dnl + dnl + define(dividend, `r0')dnl + define(divisor, `r1')dnl + define(Q, `r2')dnl + define(R, `r3')dnl + define(ITER, `ip')dnl + define(V, `lr')dnl + dnl + dnl m4 reminder: ifelse(a,b,c,d) => if a is b, then c, else d + define(T, `r4')dnl + define(SC, `r5')dnl + ifelse(S, `true', `define(SIGN, `r6')')dnl + define(REGLIST, `ifelse(S, `true', `{r4, r5, r6,', `{r4, r5,')')dnl + define(ret, `ldmia sp!, REGLIST pc}')dnl + dnl + dnl This is the recursive definition for developing quotient digits. + dnl + dnl Parameters: + dnl $1 the current depth, 1 <= $1 <= N + dnl $2 the current accumulation of quotient bits + dnl N max depth + dnl + dnl We add a new bit to $2 and either recurse or insert the bits in + dnl the quotient. R, Q, and V are inputs and outputs as defined above; + dnl the condition codes are expected to reflect the input R, and are + dnl modified to reflect the output R. + dnl + define(DEVELOP_QUOTIENT_BITS, + ` @ depth $1, accumulated bits $2 + mov V, V, lsr #1 + blt L.$1.eval(2^N+$2+999) + @ remainder is positive + subs R, R, V + ifelse($1, N, + ` ifelse(eval(2*$2+1<0), `0', + `add Q, Q, `#'eval($2*2+1)', + `sub Q, Q, `#'eval(-($2*2+1))') + + b 9f + ', ` DEVELOP_QUOTIENT_BITS(incr($1), `eval(2*$2+1)')') + L.$1.eval(2^N+$2+999): + @ remainder is negative + adds R, R, V + ifelse($1, N, + ` ifelse(eval(2*$2-1<0), `0', + `add Q, Q, `#'eval($2*2-1)', + `sub Q, Q, `#'eval(-($2*2-1))') + b 9f + + ', ` DEVELOP_QUOTIENT_BITS(incr($1), `eval(2*$2-1)')') + ifelse($1, 1, `9:')')dnl + + #include "trap.h" + + ip .req r12 + sp .req r13 + lr .req r14 + pc .req r15 + .text + .globl NAME + .align 0 + NAME: + stmdb sp!, REGLIST lr} + ifelse(S, `true', + ` @ compute sign of result; if neither is negative, no problem + eor SIGN, divisor, dividend @ compute sign + cmp divisor, #0 + rsbmi divisor, divisor, #0 + beq Ldiv_zero + mov V, divisor + movs R, dividend + rsbmi R, R, #0 @ make dividend nonnegative + ', + ` @ Ready to divide. Compute size of quotient; scale comparand. + movs V, divisor + mov R, dividend + beq Ldiv_zero + ') + + cmp R, V @ if divisor exceeds dividend, done + mov Q, #0 + bcc Lgot_result @ (and algorithm fails otherwise) + mov T, `#'(1 << (WORDSIZE - TOPBITS - 1)) + cmp R, T + mov ITER, #0 + bcc Lnot_really_big + + @ `Here the dividend is >= 2^(31-N) or so. We must be careful here, + @ as our usual N-at-a-shot divide step will cause overflow and havoc. + @ The number of bits in the result here is N*ITER+SC, where SC <= N. + @ Compute ITER in an unorthodox manner: know we need to shift V into + @ the top decade: so do not even bother to compare to R.' + mov SC, #1 + 1: + cmp V, T + bcs 3f + mov V, V, lsl `#'N + add ITER, ITER, #1 + b 1b + + @ Now compute SC. + 2: adds V, V, V + add SC, SC, #1 + bcc Lnot_too_big + + @ We get here if the divisor overflowed while shifting. + @ This means that R has the high-order bit set. + @ Restore V and subtract from R. + mov T, T, lsl `#'TOPBITS + mov V, V, lsr #1 + add V, T, V + sub SC, SC, #1 + b Ldo_single_div + + Lnot_too_big: + 3: cmp V, R + bcc 2b + @ beq Ldo_single_div + + /-* NB: these are commented out in the V8-Sparc manual as well *-/ + /-* (I do not understand this) *-/ + @ V > R: went too far: back up 1 step + @ srl V, 1, V + @ dec SC + @ do single-bit divide steps + @ + @ We have to be careful here. We know that R >= V, so we can do the + @ first divide step without thinking. BUT, the others are conditional, + @ and are only done if R >= 0. Because both R and V may have the high- + @ order bit set in the first step, just falling into the regular + @ division loop will mess up the first time around. + @ So we unroll slightly... + Ldo_single_div: + subs SC, SC, #1 + blt Lend_regular_divide + sub R, R, V + mov Q, #1 + b Lend_single_divloop + Lsingle_divloop: + cmp R, #0 + mov Q, Q, lsl #1 + mov V, V, lsr #1 + @ R >= 0 + subpl R, R, V + addpl Q, Q, #1 + @ R < 0 + addmi R, R, V + submi Q, Q, #1 + Lend_single_divloop: + subs SC, SC, #1 + bge Lsingle_divloop + b Lend_regular_divide + + 1: + add ITER, ITER, #1 + Lnot_really_big: + mov V, V, lsl `#'N + cmp V, R + bls 1b + @ + @ HOW CAN ITER EVER BE -1 HERE ????? + @ + cmn ITER, #1 + beq Lgot_result + + Ldivloop: + cmp R, #0 @ set up for initial iteration + mov Q, Q, lsl `#'N + DEVELOP_QUOTIENT_BITS(1, 0) + Lend_regular_divide: + subs ITER, ITER, #1 + bge Ldivloop + cmp R, #0 + @ non-restoring fixup here (one instruction only!) + ifelse(OP, `div', + ` sublt Q, Q, #1 + ', ` addlt R, divisor, R + ') + + Lgot_result: + ifelse(S, `true', + ` @ check to see if answer should be < 0 + cmp SIGN, #0 + ifelse(OP, `div', `rsbmi Q, Q, #0', `rsbmi R, R, #0') + ') + ifelse(OP, `div', `mov r0, Q', `mov r0, R') + ret + + Ldiv_zero: + @ Divide by zero trap. If it returns, return 0 (about as + @ wrong as possible, but that is what SunOS does...). + bl ___div0 + mov r0, #0 + ret + */ + + #ifdef L_udivsi3 + + ip .req r12 + sp .req r13 + lr .req r14 + pc .req r15 + .text + .globl ___udivsi3 + .align 0 + ___udivsi3: + stmdb sp!, {r4, r5, lr} + @ Ready to divide. Compute size of quotient; scale comparand. + movs lr, r1 + mov r3, r0 + beq Ldiv_zero + + + cmp r3, lr @ if r1 exceeds r0, done + mov r2, #0 + bcc Lgot_result @ (and algorithm fails otherwise) + mov r4, #(1 << (32 - 4 - 1)) + cmp r3, r4 + mov ip, #0 + bcc Lnot_really_big + + @ Here the dividend is >= 2^(31-N) or so. We must be careful here, + @ as our usual N-at-a-shot divide step will cause overflow and havoc. + @ The number of bits in the result here is N*ITER+SC, where SC <= N. + @ Compute ITER in an unorthodox manner: know we need to shift V into + @ the top decade: so do not even bother to compare to R. + mov r5, #1 + 1: + cmp lr, r4 + bcs 3f + mov lr, lr, lsl #4 + add ip, ip, #1 + b 1b + + @ Now compute r5. + 2: adds lr, lr, lr + add r5, r5, #1 + bcc Lnot_too_big + + @ We get here if the r1 overflowed while shifting. + @ This means that r3 has the high-order bit set. + @ Restore lr and subtract from r3. + mov r4, r4, lsl #4 + mov lr, lr, lsr #1 + add lr, r4, lr + sub r5, r5, #1 + b Ldo_single_div + + Lnot_too_big: + 3: cmp lr, r3 + bcc 2b + @ beq Ldo_single_div + + /* NB: these are commented out in the V8-Sparc manual as well */ + /* (I do not understand this) */ + @ lr > r3: went too far: back up 1 step + @ srl lr, 1, lr + @ dec r5 + @ do single-bit divide steps + @ + @ We have to be careful here. We know that r3 >= lr, so we can do the + @ first divide step without thinking. BUT, the others are conditional, + @ and are only done if r3 >= 0. Because both r3 and lr may have the high- + @ order bit set in the first step, just falling into the regular + @ division loop will mess up the first time around. + @ So we unroll slightly... + Ldo_single_div: + subs r5, r5, #1 + blt Lend_regular_divide + sub r3, r3, lr + mov r2, #1 + b Lend_single_divloop + Lsingle_divloop: + cmp r3, #0 + mov r2, r2, lsl #1 + mov lr, lr, lsr #1 + @ r3 >= 0 + subpl r3, r3, lr + addpl r2, r2, #1 + @ r3 < 0 + addmi r3, r3, lr + submi r2, r2, #1 + Lend_single_divloop: + subs r5, r5, #1 + bge Lsingle_divloop + b Lend_regular_divide + + 1: + add ip, ip, #1 + Lnot_really_big: + mov lr, lr, lsl #4 + cmp lr, r3 + bls 1b + @ + @ HOW CAN ip EVER BE -1 HERE ????? + @ + cmn ip, #1 + beq Lgot_result + + Ldivloop: + cmp r3, #0 @ set up for initial iteration + mov r2, r2, lsl #4 + @ depth 1, accumulated bits 0 + mov lr, lr, lsr #1 + blt L.1.1015 + @ remainder is positive + subs r3, r3, lr + @ depth 2, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.2.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.3.1018 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 7 + mov lr, lr, lsr #1 + blt L.4.1022 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #15 + + b 9f + + L.4.1022: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #13 + b 9f + + + + L.3.1018: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 5 + mov lr, lr, lsr #1 + blt L.4.1020 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #11 + + b 9f + + L.4.1020: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #9 + b 9f + + + + + L.2.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.3.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.4.1018 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #7 + + b 9f + + L.4.1018: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #5 + b 9f + + + + L.3.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.4.1016 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #3 + + b 9f + + L.4.1016: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #1 + b 9f + + + + + + L.1.1015: + @ remainder is negative + adds r3, r3, lr + @ depth 2, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.2.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.3.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.4.1014 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #1 + + b 9f + + L.4.1014: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #3 + b 9f + + + + L.3.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.4.1012 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #5 + + b 9f + + L.4.1012: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #7 + b 9f + + + + + L.2.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.3.1012 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -5 + mov lr, lr, lsr #1 + blt L.4.1010 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #9 + + b 9f + + L.4.1010: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #11 + b 9f + + + + L.3.1012: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -7 + mov lr, lr, lsr #1 + blt L.4.1008 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #13 + + b 9f + + L.4.1008: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #15 + b 9f + + + + + + 9: + Lend_regular_divide: + subs ip, ip, #1 + bge Ldivloop + cmp r3, #0 + @ non-restoring fixup here (one instruction only!) + sublt r2, r2, #1 + + + Lgot_result: + + mov r0, r2 + ldmia sp!, {r4, r5, pc} + + Ldiv_zero: + @ Divide by zero trap. If it returns, return 0 (about as + @ wrong as possible, but that is what SunOS does...). + bl ___div0 + mov r0, #0 + ldmia sp!, {r4, r5, pc} + + #endif /* L_udivsi3 */ + + #ifdef L_divsi3 + + ip .req r12 + sp .req r13 + lr .req r14 + pc .req r15 + .text + .globl ___divsi3 + .align 0 + ___divsi3: + stmdb sp!, {r4, r5, r6, lr} + @ compute sign of result; if neither is negative, no problem + eor r6, r1, r0 @ compute sign + cmp r1, #0 + rsbmi r1, r1, #0 + beq Ldiv_zero + mov lr, r1 + movs r3, r0 + rsbmi r3, r3, #0 @ make dividend nonnegative + + + cmp r3, lr @ if r1 exceeds r0, done + mov r2, #0 + bcc Lgot_result @ (and algorithm fails otherwise) + mov r4, #(1 << (32 - 4 - 1)) + cmp r3, r4 + mov ip, #0 + bcc Lnot_really_big + + @ Here the dividend is >= 2^(31-N) or so. We must be careful here, + @ as our usual N-at-a-shot divide step will cause overflow and havoc. + @ The number of bits in the result here is N*ITER+SC, where SC <= N. + @ Compute ITER in an unorthodox manner: know we need to shift V into + @ the top decade: so do not even bother to compare to R. + mov r5, #1 + 1: + cmp lr, r4 + bcs 3f + mov lr, lr, lsl #4 + add ip, ip, #1 + b 1b + + @ Now compute r5. + 2: adds lr, lr, lr + add r5, r5, #1 + bcc Lnot_too_big + + @ We get here if the r1 overflowed while shifting. + @ This means that r3 has the high-order bit set. + @ Restore lr and subtract from r3. + mov r4, r4, lsl #4 + mov lr, lr, lsr #1 + add lr, r4, lr + sub r5, r5, #1 + b Ldo_single_div + + Lnot_too_big: + 3: cmp lr, r3 + bcc 2b + @ beq Ldo_single_div + + /* NB: these are commented out in the V8-Sparc manual as well */ + /* (I do not understand this) */ + @ lr > r3: went too far: back up 1 step + @ srl lr, 1, lr + @ dec r5 + @ do single-bit divide steps + @ + @ We have to be careful here. We know that r3 >= lr, so we can do the + @ first divide step without thinking. BUT, the others are conditional, + @ and are only done if r3 >= 0. Because both r3 and lr may have the high- + @ order bit set in the first step, just falling into the regular + @ division loop will mess up the first time around. + @ So we unroll slightly... + Ldo_single_div: + subs r5, r5, #1 + blt Lend_regular_divide + sub r3, r3, lr + mov r2, #1 + b Lend_single_divloop + Lsingle_divloop: + cmp r3, #0 + mov r2, r2, lsl #1 + mov lr, lr, lsr #1 + @ r3 >= 0 + subpl r3, r3, lr + addpl r2, r2, #1 + @ r3 < 0 + addmi r3, r3, lr + submi r2, r2, #1 + Lend_single_divloop: + subs r5, r5, #1 + bge Lsingle_divloop + b Lend_regular_divide + + 1: + add ip, ip, #1 + Lnot_really_big: + mov lr, lr, lsl #4 + cmp lr, r3 + bls 1b + @ + @ HOW CAN ip EVER BE -1 HERE ????? + @ + cmn ip, #1 + beq Lgot_result + + Ldivloop: + cmp r3, #0 @ set up for initial iteration + mov r2, r2, lsl #4 + @ depth 1, accumulated bits 0 + mov lr, lr, lsr #1 + blt L.1.1015 + @ remainder is positive + subs r3, r3, lr + @ depth 2, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.2.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.3.1018 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 7 + mov lr, lr, lsr #1 + blt L.4.1022 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #15 + + b 9f + + L.4.1022: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #13 + b 9f + + + + L.3.1018: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 5 + mov lr, lr, lsr #1 + blt L.4.1020 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #11 + + b 9f + + L.4.1020: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #9 + b 9f + + + + + L.2.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.3.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.4.1018 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #7 + + b 9f + + L.4.1018: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #5 + b 9f + + + + L.3.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.4.1016 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #3 + + b 9f + + L.4.1016: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #1 + b 9f + + + + + + L.1.1015: + @ remainder is negative + adds r3, r3, lr + @ depth 2, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.2.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.3.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.4.1014 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #1 + + b 9f + + L.4.1014: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #3 + b 9f + + + + L.3.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.4.1012 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #5 + + b 9f + + L.4.1012: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #7 + b 9f + + + + + L.2.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.3.1012 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -5 + mov lr, lr, lsr #1 + blt L.4.1010 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #9 + + b 9f + + L.4.1010: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #11 + b 9f + + + + L.3.1012: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -7 + mov lr, lr, lsr #1 + blt L.4.1008 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #13 + + b 9f + + L.4.1008: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #15 + b 9f + + + + + + 9: + Lend_regular_divide: + subs ip, ip, #1 + bge Ldivloop + cmp r3, #0 + @ non-restoring fixup here (one instruction only!) + sublt r2, r2, #1 + + + Lgot_result: + @ check to see if answer should be < 0 + cmp r6, #0 + rsbmi r2, r2, #0 + + mov r0, r2 + ldmia sp!, {r4, r5, r6, pc} + + Ldiv_zero: + @ Divide by zero trap. If it returns, return 0 (about as + @ wrong as possible, but that is what SunOS does...). + bl ___div0 + mov r0, #0 + ldmia sp!, {r4, r5, r6, pc} + + #endif /* L_divsi3 */ + + #ifdef L_umodsi3 + + ip .req r12 + sp .req r13 + lr .req r14 + pc .req r15 + .text + .globl ___umodsi3 + .align 0 + ___umodsi3: + stmdb sp!, {r4, r5, lr} + @ Ready to divide. Compute size of quotient; scale comparand. + movs lr, r1 + mov r3, r0 + beq Ldiv_zero + + + cmp r3, lr @ if r1 exceeds r0, done + mov r2, #0 + bcc Lgot_result @ (and algorithm fails otherwise) + mov r4, #(1 << (32 - 4 - 1)) + cmp r3, r4 + mov ip, #0 + bcc Lnot_really_big + + @ Here the dividend is >= 2^(31-N) or so. We must be careful here, + @ as our usual N-at-a-shot divide step will cause overflow and havoc. + @ The number of bits in the result here is N*ITER+SC, where SC <= N. + @ Compute ITER in an unorthodox manner: know we need to shift V into + @ the top decade: so do not even bother to compare to R. + mov r5, #1 + 1: + cmp lr, r4 + bcs 3f + mov lr, lr, lsl #4 + add ip, ip, #1 + b 1b + + @ Now compute r5. + 2: adds lr, lr, lr + add r5, r5, #1 + bcc Lnot_too_big + + @ We get here if the r1 overflowed while shifting. + @ This means that r3 has the high-order bit set. + @ Restore lr and subtract from r3. + mov r4, r4, lsl #4 + mov lr, lr, lsr #1 + add lr, r4, lr + sub r5, r5, #1 + b Ldo_single_div + + Lnot_too_big: + 3: cmp lr, r3 + bcc 2b + @ beq Ldo_single_div + + /* NB: these are commented out in the V8-Sparc manual as well */ + /* (I do not understand this) */ + @ lr > r3: went too far: back up 1 step + @ srl lr, 1, lr + @ dec r5 + @ do single-bit divide steps + @ + @ We have to be careful here. We know that r3 >= lr, so we can do the + @ first divide step without thinking. BUT, the others are conditional, + @ and are only done if r3 >= 0. Because both r3 and lr may have the high- + @ order bit set in the first step, just falling into the regular + @ division loop will mess up the first time around. + @ So we unroll slightly... + Ldo_single_div: + subs r5, r5, #1 + blt Lend_regular_divide + sub r3, r3, lr + mov r2, #1 + b Lend_single_divloop + Lsingle_divloop: + cmp r3, #0 + mov r2, r2, lsl #1 + mov lr, lr, lsr #1 + @ r3 >= 0 + subpl r3, r3, lr + addpl r2, r2, #1 + @ r3 < 0 + addmi r3, r3, lr + submi r2, r2, #1 + Lend_single_divloop: + subs r5, r5, #1 + bge Lsingle_divloop + b Lend_regular_divide + + 1: + add ip, ip, #1 + Lnot_really_big: + mov lr, lr, lsl #4 + cmp lr, r3 + bls 1b + @ + @ HOW CAN ip EVER BE -1 HERE ????? + @ + cmn ip, #1 + beq Lgot_result + + Ldivloop: + cmp r3, #0 @ set up for initial iteration + mov r2, r2, lsl #4 + @ depth 1, accumulated bits 0 + mov lr, lr, lsr #1 + blt L.1.1015 + @ remainder is positive + subs r3, r3, lr + @ depth 2, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.2.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.3.1018 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 7 + mov lr, lr, lsr #1 + blt L.4.1022 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #15 + + b 9f + + L.4.1022: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #13 + b 9f + + + + L.3.1018: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 5 + mov lr, lr, lsr #1 + blt L.4.1020 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #11 + + b 9f + + L.4.1020: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #9 + b 9f + + + + + L.2.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.3.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.4.1018 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #7 + + b 9f + + L.4.1018: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #5 + b 9f + + + + L.3.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.4.1016 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #3 + + b 9f + + L.4.1016: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #1 + b 9f + + + + + + L.1.1015: + @ remainder is negative + adds r3, r3, lr + @ depth 2, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.2.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.3.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.4.1014 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #1 + + b 9f + + L.4.1014: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #3 + b 9f + + + + L.3.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.4.1012 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #5 + + b 9f + + L.4.1012: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #7 + b 9f + + + + + L.2.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.3.1012 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -5 + mov lr, lr, lsr #1 + blt L.4.1010 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #9 + + b 9f + + L.4.1010: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #11 + b 9f + + + + L.3.1012: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -7 + mov lr, lr, lsr #1 + blt L.4.1008 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #13 + + b 9f + + L.4.1008: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #15 + b 9f + + + + + + 9: + Lend_regular_divide: + subs ip, ip, #1 + bge Ldivloop + cmp r3, #0 + @ non-restoring fixup here (one instruction only!) + addlt r3, r1, r3 + + + Lgot_result: + + mov r0, r3 + ldmia sp!, {r4, r5, pc} + + Ldiv_zero: + @ Divide by zero trap. If it returns, return 0 (about as + @ wrong as possible, but that is what SunOS does...). + bl ___div0 + mov r0, #0 + ldmia sp!, {r4, r5, pc} + + #endif /* L_umodsi3 */ + + #ifdef L_modsi3 + + ip .req r12 + sp .req r13 + lr .req r14 + pc .req r15 + .text + .globl ___modsi3 + .align 0 + ___modsi3: + stmdb sp!, {r4, r5, r6, lr} + @ compute sign of result; if neither is negative, no problem + eor r6, r1, r0 @ compute sign + cmp r1, #0 + rsbmi r1, r1, #0 + beq Ldiv_zero + mov lr, r1 + movs r3, r0 + rsbmi r3, r3, #0 @ make dividend nonnegative + + + cmp r3, lr @ if r1 exceeds r0, done + mov r2, #0 + bcc Lgot_result @ (and algorithm fails otherwise) + mov r4, #(1 << (32 - 4 - 1)) + cmp r3, r4 + mov ip, #0 + bcc Lnot_really_big + + @ Here the dividend is >= 2^(31-N) or so. We must be careful here, + @ as our usual N-at-a-shot divide step will cause overflow and havoc. + @ The number of bits in the result here is N*ITER+SC, where SC <= N. + @ Compute ITER in an unorthodox manner: know we need to shift V into + @ the top decade: so do not even bother to compare to R. + mov r5, #1 + 1: + cmp lr, r4 + bcs 3f + mov lr, lr, lsl #4 + add ip, ip, #1 + b 1b + + @ Now compute r5. + 2: adds lr, lr, lr + add r5, r5, #1 + bcc Lnot_too_big + + @ We get here if the r1 overflowed while shifting. + @ This means that r3 has the high-order bit set. + @ Restore lr and subtract from r3. + mov r4, r4, lsl #4 + mov lr, lr, lsr #1 + add lr, r4, lr + sub r5, r5, #1 + b Ldo_single_div + + Lnot_too_big: + 3: cmp lr, r3 + bcc 2b + @ beq Ldo_single_div + + /* NB: these are commented out in the V8-Sparc manual as well */ + /* (I do not understand this) */ + @ lr > r3: went too far: back up 1 step + @ srl lr, 1, lr + @ dec r5 + @ do single-bit divide steps + @ + @ We have to be careful here. We know that r3 >= lr, so we can do the + @ first divide step without thinking. BUT, the others are conditional, + @ and are only done if r3 >= 0. Because both r3 and lr may have the high- + @ order bit set in the first step, just falling into the regular + @ division loop will mess up the first time around. + @ So we unroll slightly... + Ldo_single_div: + subs r5, r5, #1 + blt Lend_regular_divide + sub r3, r3, lr + mov r2, #1 + b Lend_single_divloop + Lsingle_divloop: + cmp r3, #0 + mov r2, r2, lsl #1 + mov lr, lr, lsr #1 + @ r3 >= 0 + subpl r3, r3, lr + addpl r2, r2, #1 + @ r3 < 0 + addmi r3, r3, lr + submi r2, r2, #1 + Lend_single_divloop: + subs r5, r5, #1 + bge Lsingle_divloop + b Lend_regular_divide + + 1: + add ip, ip, #1 + Lnot_really_big: + mov lr, lr, lsl #4 + cmp lr, r3 + bls 1b + @ + @ HOW CAN ip EVER BE -1 HERE ????? + @ + cmn ip, #1 + beq Lgot_result + + Ldivloop: + cmp r3, #0 @ set up for initial iteration + mov r2, r2, lsl #4 + @ depth 1, accumulated bits 0 + mov lr, lr, lsr #1 + blt L.1.1015 + @ remainder is positive + subs r3, r3, lr + @ depth 2, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.2.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.3.1018 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 7 + mov lr, lr, lsr #1 + blt L.4.1022 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #15 + + b 9f + + L.4.1022: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #13 + b 9f + + + + L.3.1018: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 5 + mov lr, lr, lsr #1 + blt L.4.1020 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #11 + + b 9f + + L.4.1020: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #9 + b 9f + + + + + L.2.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.3.1016 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits 3 + mov lr, lr, lsr #1 + blt L.4.1018 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #7 + + b 9f + + L.4.1018: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #5 + b 9f + + + + L.3.1016: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits 1 + mov lr, lr, lsr #1 + blt L.4.1016 + @ remainder is positive + subs r3, r3, lr + add r2, r2, #3 + + b 9f + + L.4.1016: + @ remainder is negative + adds r3, r3, lr + add r2, r2, #1 + b 9f + + + + + + L.1.1015: + @ remainder is negative + adds r3, r3, lr + @ depth 2, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.2.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 3, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.3.1014 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -1 + mov lr, lr, lsr #1 + blt L.4.1014 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #1 + + b 9f + + L.4.1014: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #3 + b 9f + + + + L.3.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.4.1012 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #5 + + b 9f + + L.4.1012: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #7 + b 9f + + + + + L.2.1014: + @ remainder is negative + adds r3, r3, lr + @ depth 3, accumulated bits -3 + mov lr, lr, lsr #1 + blt L.3.1012 + @ remainder is positive + subs r3, r3, lr + @ depth 4, accumulated bits -5 + mov lr, lr, lsr #1 + blt L.4.1010 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #9 + + b 9f + + L.4.1010: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #11 + b 9f + + + + L.3.1012: + @ remainder is negative + adds r3, r3, lr + @ depth 4, accumulated bits -7 + mov lr, lr, lsr #1 + blt L.4.1008 + @ remainder is positive + subs r3, r3, lr + sub r2, r2, #13 + + b 9f + + L.4.1008: + @ remainder is negative + adds r3, r3, lr + sub r2, r2, #15 + b 9f + + + + + + 9: + Lend_regular_divide: + subs ip, ip, #1 + bge Ldivloop + cmp r3, #0 + @ non-restoring fixup here (one instruction only!) + addlt r3, r1, r3 + + + Lgot_result: + @ check to see if answer should be < 0 + cmp r6, #0 + rsbmi r3, r3, #0 + + mov r0, r3 + ldmia sp!, {r4, r5, r6, pc} + + Ldiv_zero: + @ Divide by zero trap. If it returns, return 0 (about as + @ wrong as possible, but that is what SunOS does...). + bl ___div0 + mov r0, #0 + ldmia sp!, {r4, r5, r6, pc} + + #endif /* L_modsi3 */ + + #ifdef L_divmodsi_tools + + .globl ___div0 + .align 0 + ___div0: + mov pc, lr + + #endif /* L_divmodsi_tools */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/riscix.h gcc-2.7.0/config/arm/riscix.h *** gcc-2.6.3/config/arm/riscix.h Mon Jun 27 11:14:28 1994 --- gcc-2.7.0/config/arm/riscix.h Thu Jun 15 09:31:07 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. ARM RISCiX version. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) --- 1,4 ---- /* Definitions of target machine for GNU compiler. ARM RISCiX version. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) *************** *** 19,23 **** 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. */ /* Translation to find startup files. On RISC iX boxes, --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Translation to find startup files. On RISC iX boxes, *************** *** 59,63 **** #endif ! /* RISCiX has some wierd symbol name munging, that is done to the object module after assembly, which enables multiple libraries to be supported within one (possibly shared) library. It basically changes the symbol name of --- 60,64 ---- #endif ! /* RISCiX has some weird symbol name munging, that is done to the object module after assembly, which enables multiple libraries to be supported within one (possibly shared) library. It basically changes the symbol name of *************** *** 83,90 **** #endif ! /* None of these is actually used in cc1, so they modify bit 31 */ ! #define ARM_EXTRA_TARGET_SWITCHES \ {"bsd", 0x80000000}, {"xopen", 0x80000000}, {"no-symrename", 0x80000000}, - --- 84,92 ---- #endif ! /* None of these is actually used in cc1. If we don't define them in target ! switches cc1 complains about them. For the sake of argument lets allocate ! bit 31 of target flags for such options. */ ! #define SUBTARGET_SWITCHES \ {"bsd", 0x80000000}, {"xopen", 0x80000000}, {"no-symrename", 0x80000000}, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/riscix1-1.h gcc-2.7.0/config/arm/riscix1-1.h *** gcc-2.6.3/config/arm/riscix1-1.h Sun Oct 3 12:29:37 1993 --- gcc-2.7.0/config/arm/riscix1-1.h Thu Jun 15 09:31:20 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. ARM RISCiX 1.1x version. ! Copyright (C) 1993 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) --- 1,4 ---- /* Definitions of target machine for GNU compiler. ARM RISCiX 1.1x version. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) *************** *** 19,23 **** 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. */ /* RISCix 1.1x is basically the same as 1.2x except that it doesn't have --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* RISCix 1.1x is basically the same as 1.2x except that it doesn't have *************** *** 42,48 **** but everything still compiles. */ /* None of these is actually used in cc1, so they modify bit 31 */ ! #define ARM_EXTRA_TARGET_SWITCHES \ {"bsd", 0x80000000}, - --- 43,48 ---- but everything still compiles. */ /* None of these is actually used in cc1, so they modify bit 31 */ ! #define SUBTARGET_SWITCHES \ {"bsd", 0x80000000}, *************** *** 76,80 **** cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or niether. */ #ifndef NAME__MAIN #define NAME__MAIN "__gccmain" --- 76,80 ---- cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or neither. */ #ifndef NAME__MAIN #define NAME__MAIN "__gccmain" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/rix-gas.h gcc-2.7.0/config/arm/rix-gas.h *** gcc-2.6.3/config/arm/rix-gas.h Thu Jun 23 12:01:46 1994 --- gcc-2.7.0/config/arm/rix-gas.h Thu Jun 15 09:31:36 1995 *************** *** 19,23 **** 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. */ /* Limit the length of a stabs entry (for the broken Acorn assembler) */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Limit the length of a stabs entry (for the broken Acorn assembler) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/semi.h gcc-2.7.0/config/arm/semi.h *** gcc-2.6.3/config/arm/semi.h --- gcc-2.7.0/config/arm/semi.h Thu Jun 15 09:31:46 1995 *************** *** 0 **** --- 1,38 ---- + /* Definitions of target machine for GNU compiler. ARM on semi-hosted platform + Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Richard Earnshaw (richard.earnshaw@armltd.co.uk) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define STARTFILE_SPEC "crt0.o%s" + + #define LIB_SPEC "-lc" + + #define LINK_SPEC "-X" + + #define CPP_PREDEFINES \ + "-Darm -Dsemi -Acpu(arm) -Amachine(arm)" + + #define TARGET_VERSION fputs (" (ARM/semi-hosted)", stderr); + + #define TARGET_DEFAULT 8 /* APCS-32 (ARM 6) */ + + /* Currently we have no support for atexit. */ + #define EXIT_BODY {} + + #include "arm/arm.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/t-semi gcc-2.7.0/config/arm/t-semi *** gcc-2.6.3/config/arm/t-semi --- gcc-2.7.0/config/arm/t-semi Sat May 13 05:34:58 1995 *************** *** 0 **** --- 1,11 ---- + # Just for these, we omit the frame pointer since it makes such a big + # difference. It is then pointless adding debugging. + LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0 \ + -Dinhibit_libc + + # Don't build enquire + ENQUIRE= + + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = arm/lib1funcs.asm + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _divmodsi_tools diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/arm/xm-arm.h gcc-2.7.0/config/arm/xm-arm.h *** gcc-2.6.3/config/arm/xm-arm.h Fri Oct 14 10:33:49 1994 --- gcc-2.7.0/config/arm/xm-arm.h Thu Jun 15 09:32:04 1995 *************** *** 19,23 **** 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. */ /* #defines that need visibility everywhere. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/clipper/clipper.c gcc-2.7.0/config/clipper/clipper.c *** gcc-2.6.3/config/clipper/clipper.c Fri Jul 9 18:17:16 1993 --- gcc-2.7.0/config/clipper/clipper.c Thu Jun 15 09:32:20 1995 *************** *** 18,22 **** 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 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/clipper/clipper.h gcc-2.7.0/config/clipper/clipper.h *** gcc-2.6.3/config/clipper/clipper.h Wed Aug 17 18:31:02 1994 --- gcc-2.7.0/config/clipper/clipper.h Thu Jun 15 09:32:35 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Clipper version. ! Copyright (C) 1987, 1988, 1991, 1993, 1994 Free Software Foundation, Inc. Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) --- 1,4 ---- /* Definitions of target machine for GNU compiler. Clipper version. ! Copyright (C) 1987, 88, 91, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) *************** *** 17,21 **** 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. */ extern struct rtx_def *clipper_builtin_saveregs (); --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ extern struct rtx_def *clipper_builtin_saveregs (); *************** *** 128,132 **** #define STACK_BOUNDARY 64 ! /* Define this macro if it is advisible to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared --- 129,133 ---- #define STACK_BOUNDARY 64 ! /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared *************** *** 380,388 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 381,390 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 484,487 **** --- 486,490 ---- && (GET_MODE_CLASS(MODE)==MODE_INT || GET_MODE_CLASS(MODE)==MODE_FLOAT) \ && (GET_MODE_SIZE (MODE) <= 8) \ + && ((TYPE) == NULL || !AGGREGATE_TYPE_P(TYPE)) \ && ((MODE) != DImode || (CUM).num == 0)) \ { \ *************** *** 523,526 **** --- 526,530 ---- && (GET_MODE_CLASS(MODE)==MODE_INT || GET_MODE_CLASS(MODE)==MODE_FLOAT) \ && (GET_MODE_SIZE (MODE) <= 8) \ + && ((TYPE) == NULL || !AGGREGATE_TYPE_P(TYPE)) \ && ((MODE) != DImode || (CUM).num == 0)) \ ? gen_rtx (REG, (MODE), \ *************** *** 601,615 **** #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fputs ("\tcall sp,.+4\n", FILE); \ fputs ("\tmovw (sp),r3\n", FILE); \ fputs ("\taddq $4,sp\n", FILE); \ ! fputs ("\tloadw 32(r3),r2\n", FILE); \ ! fputs ("\tloadw 36(r3),r3\n", FILE); \ fputs ("\tb (r3)\n", FILE); \ } /* Length in units of the trampoline for entering a nested function. */ ! #define TRAMPOLINE_SIZE 44 /* Alignment required for a trampoline. 128 is used to find the --- 605,620 ---- #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fputs ("\t.word 0x459F,0x0004\t# call sp,.+4\n", FILE); \ fputs ("\tmovw (sp),r3\n", FILE); \ fputs ("\taddq $4,sp\n", FILE); \ ! fputs ("\tloadw 20(r3),r2\n", FILE); \ ! fputs ("\tloadw 24(r3),r3\n", FILE); \ fputs ("\tb (r3)\n", FILE); \ + fputs ("\t.long 0,0\n", FILE); \ } /* Length in units of the trampoline for entering a nested function. */ ! #define TRAMPOLINE_SIZE 32 /* Alignment required for a trampoline. 128 is used to find the *************** *** 629,634 **** #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ ! emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 36)), CXT); \ ! emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 40)), FNADDR); \ } --- 634,639 ---- #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ ! emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 24)), CXT); \ ! emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 28)), FNADDR); \ } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/clipper/clipper.md gcc-2.7.0/config/clipper/clipper.md *** gcc-2.6.3/config/clipper/clipper.md Fri Nov 11 14:14:27 1994 --- gcc-2.7.0/config/clipper/clipper.md Thu Jun 15 16:47:15 1995 *************** *** 17,21 **** ;; 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. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 60,64 **** ;; ! ;; clipper seems to be a tradional risc processor ;; we define a functional unit 'memory' ;; --- 61,65 ---- ;; ! ;; clipper seems to be a traditional risc processor ;; we define a functional unit 'memory' ;; *************** *** 306,310 **** }") ! ;; If an operand is a MEM but not offsetable, we can't load it into ;; a register, so we must force the third alternative to be the one ;; reloaded. Hence we show the first as more expensive. --- 307,311 ---- }") ! ;; If an operand is a MEM but not offsettable, we can't load it into ;; a register, so we must force the third alternative to be the one ;; reloaded. Hence we show the first as more expensive. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/clipper/clix.h gcc-2.7.0/config/clipper/clix.h *** gcc-2.6.3/config/clipper/clix.h Mon Dec 13 18:55:59 1993 --- gcc-2.7.0/config/clipper/clix.h Thu Jun 15 09:33:01 1995 *************** *** 16,20 **** 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 "clipper/clipper.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "clipper/clipper.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/convex/convex.c gcc-2.7.0/config/convex/convex.c *** gcc-2.6.3/config/convex/convex.c Sun Mar 13 08:32:32 1994 --- gcc-2.7.0/config/convex/convex.c Thu Jun 15 09:33:16 1995 *************** *** 16,20 **** 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 "config.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/convex/convex.h gcc-2.7.0/config/convex/convex.h *** gcc-2.6.3/config/convex/convex.h Sun Sep 4 08:38:27 1994 --- gcc-2.7.0/config/convex/convex.h Thu Jun 15 09:33:27 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Convex version. ! Copyright (C) 1988, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Convex version. ! Copyright (C) 1988, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 744,752 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE, SIZE) (SIZE) /* Define how to find the value returned by a function. --- 745,754 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/convex/convex.md gcc-2.7.0/config/convex/convex.md *** gcc-2.6.3/config/convex/convex.md Sun Sep 4 08:33:10 1994 --- gcc-2.7.0/config/convex/convex.md Thu Jun 15 16:48:00 1995 *************** *** 1,4 **** ;;- Machine description for GNU compiler, Convex Version ! ;; Copyright (C) 1988, 1994 Free Software Foundation, Inc. ;; This file is part of GNU CC. --- 1,4 ---- ;;- Machine description for GNU compiler, Convex Version ! ;; Copyright (C) 1988, 1994, 1995 Free Software Foundation, Inc. ;; This file is part of GNU CC. *************** *** 16,20 **** ;; 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. ;; Attribute specifications --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;; Attribute specifications *************** *** 1269,1273 **** ;; ((a >> b) ^ signbit) - signbit ;; where signbit is (1 << 63) >> b ! ;; Works for 0..63. Does not work for 64; unfortunate but legal. (define_expand "ashrdi3" --- 1270,1274 ---- ;; ((a >> b) ^ signbit) - signbit ;; where signbit is (1 << 63) >> b ! ;; Works for 0..63. Does not work for 64; unfortunate but valid. (define_expand "ashrdi3" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/convex/xm-convex.h gcc-2.7.0/config/convex/xm-convex.h *** gcc-2.6.3/config/convex/xm-convex.h Sat Jun 26 11:41:06 1993 --- gcc-2.7.0/config/convex/xm-convex.h Thu Jun 15 09:33:47 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/dsp16xx/dsp16xx.c gcc-2.7.0/config/dsp16xx/dsp16xx.c *** gcc-2.6.3/config/dsp16xx/dsp16xx.c Thu Nov 17 11:12:26 1994 --- gcc-2.7.0/config/dsp16xx/dsp16xx.c Thu Jun 15 09:34:34 1995 *************** *** 1,4 **** /* Subroutines for assembler code output on the DSP1610. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Michael Collison (collison@world.std.com). --- 1,4 ---- /* Subroutines for assembler code output on the DSP1610. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Collison (collison@world.std.com). *************** *** 17,21 **** 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. */ /* Some output-actions in dsp1600.md need these. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Some output-actions in dsp1600.md need these. */ *************** *** 261,265 **** default: ! fatal ("Illegal register class letter %c", c); return NO_REGS; } --- 262,266 ---- default: ! fatal ("Invalid register class letter %c", c); return NO_REGS; } *************** *** 397,401 **** case YL_REG: ! /* Register 'yl' is illegal for QImode, so we should never see it. */ --- 398,402 ---- case YL_REG: ! /* Register 'yl' is invalid for QImode, so we should never see it. */ *************** *** 1473,1477 **** offset = INTVAL(XEXP(addr,1)) + 1; else ! fatal ("Illegal addressing mode"); fprintf (asm_out_file, "\t*(%d)=%s\n", offset + 31, reg_names[REGNO(operands[1]) + 1]); --- 1474,1478 ---- offset = INTVAL(XEXP(addr,1)) + 1; else ! fatal ("Invalid addressing mode"); fprintf (asm_out_file, "\t*(%d)=%s\n", offset + 31, reg_names[REGNO(operands[1]) + 1]); *************** *** 1675,1682 **** offset = 31 + offset; else ! fatal ("Illegal offset in ybase addressing"); } else ! fatal ("Illegal register in ybase addresing"); fprintf (file, "*(%d)", offset); --- 1676,1683 ---- offset = 31 + offset; else ! fatal ("Invalid offset in ybase addressing"); } else ! fatal ("Invalid register in ybase addressing"); fprintf (file, "*(%d)", offset); *************** *** 1850,1854 **** } else ! fatal ("Illegal shift operator in emit_1600_core_shift"); while (shift_amount != 0) --- 1851,1855 ---- } else ! fatal ("Invalid shift operator in emit_1600_core_shift"); while (shift_amount != 0) *************** *** 2129,2133 **** emit_insn (gen_rtx (SET, VOIDmode, cc0_rtx, x)); else ! fatal ("Illegal mode for gen_tst_reg"); return cc0_rtx; --- 2130,2134 ---- emit_insn (gen_rtx (SET, VOIDmode, cc0_rtx, x)); else ! fatal ("Invalid mode for gen_tst_reg"); return cc0_rtx; *************** *** 2200,2204 **** } else ! fatal ("Illegal mode for integer comparison in gen_compare_reg"); return cc0_rtx; --- 2201,2205 ---- } else ! fatal ("Invalid mode for integer comparison in gen_compare_reg"); return cc0_rtx; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/dsp16xx/dsp16xx.h gcc-2.7.0/config/dsp16xx/dsp16xx.h *** gcc-2.6.3/config/dsp16xx/dsp16xx.h Thu Nov 17 11:12:28 1994 --- gcc-2.7.0/config/dsp16xx/dsp16xx.h Thu Jun 15 09:34:49 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. AT&T DSP1600. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Michael Collison (collison@world.std.com). --- 1,4 ---- /* Definitions of target machine for GNU compiler. AT&T DSP1600. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Collison (collison@world.std.com). *************** *** 17,21 **** 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. */ extern char *low_reg_names[]; --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ extern char *low_reg_names[]; *************** *** 109,114 **** #define CROSS_LINK_SPEC "%{!c:%{!M:%{!MM:%{!E:%{!S:ld1600 %l %X %{o*} %{m} \ %{r} %{s} %{t} %{u*} %{x}\ ! %{!A:%{!nostdlib:%S}} %{static:}\ ! %{L*} %D %o %{!nostdlib:-le1600 %L -le1600 %{!A:%E}}\n }}}}}" /* Nothing complicated here, just link with libc.a under normal --- 110,116 ---- #define CROSS_LINK_SPEC "%{!c:%{!M:%{!MM:%{!E:%{!S:ld1600 %l %X %{o*} %{m} \ %{r} %{s} %{t} %{u*} %{x}\ ! %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:}\ ! %{L*} %D %o %{!nostdlib:-le1600 %L -le1600}\ ! %{!A:%{!nostdlib:%{!nostartfiles:%E}}}\n }}}}}" /* Nothing complicated here, just link with libc.a under normal *************** *** 201,205 **** #define TARGET_BMU (target_flags & MASK_BMU) ! /* Optimize to conseverve memory */ #define TARGET_OPTIMIZE_MEMORY (target_flags & MASK_OPTIMIZE_MEMORY) --- 203,207 ---- #define TARGET_BMU (target_flags & MASK_BMU) ! /* Optimize to conserve memory */ #define TARGET_OPTIMIZE_MEMORY (target_flags & MASK_OPTIMIZE_MEMORY) *************** *** 331,335 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 16 --- 333,337 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 16 *************** *** 599,603 **** using these registers when the target switches are opposed to them.) If the user tells us there is no BMU, we can't use ! ar0-ar3 for regsiter allocation */ #define CONDITIONAL_REGISTER_USAGE \ --- 601,605 ---- using these registers when the target switches are opposed to them.) If the user tells us there is no BMU, we can't use ! ar0-ar3 for register allocation */ #define CONDITIONAL_REGISTER_USAGE \ *************** *** 1113,1120 **** /* 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, STACK_SIZE) 0 /* Define how to find the value returned by a function. --- 1115,1123 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 1159,1164 **** #define FIRST_REG_FOR_FUNCTION_ARG REG_Y ! /* Define the profitablity of saving registers around calls. ! NOTE: For now we turin this off because of a bug in the caller-saves code and also because i'm not sure it is helpful on the 1610. */ --- 1162,1167 ---- #define FIRST_REG_FOR_FUNCTION_ARG REG_Y ! /* Define the profitability of saving registers around calls. ! NOTE: For now we turn this off because of a bug in the caller-saves code and also because i'm not sure it is helpful on the 1610. */ *************** *** 1470,1474 **** return COSTS_N_INSNS (2); ! /* Like CONST_COSTS but applies to nonsonstant RTL expressions. This can be used, for example to indicate how costly a multiply instruction is. */ --- 1473,1477 ---- return COSTS_N_INSNS (2); ! /* Like CONST_COSTS but applies to nonconstant RTL expressions. This can be used, for example to indicate how costly a multiply instruction is. */ *************** *** 1896,1900 **** /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. We should ! not have to do any alignemnt since the 1610 is a word machine. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) --- 1899,1903 ---- /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. We should ! not have to do any alignment since the 1610 is a word machine. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) *************** *** 1937,1943 **** #define EASY_DIV_EXPR TRUNC_DIV_EXPR - /* Define this if the library function 'vprintf' is available on your system. */ - #define HAVE_VPRINTF - /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ --- 1940,1943 ---- *************** *** 1947,1952 **** or bitwise 'and' instruction that truncates the count of a shift operation to a width equal to the number of bits needed to represent the size of the ! object being shifted. Do not define this macro unless the trucation applies ! to both shoft operations and bit-field operations (if any). */ /* #define SHIFT_COUNT_TRUNCATED */ --- 1947,1952 ---- or bitwise 'and' instruction that truncates the count of a shift operation to a width equal to the number of bits needed to represent the size of the ! object being shifted. Do not define this macro unless the truncation applies ! to both shift operations and bit-field operations (if any). */ /* #define SHIFT_COUNT_TRUNCATED */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/dsp16xx/dsp16xx.md gcc-2.7.0/config/dsp16xx/dsp16xx.md *** gcc-2.6.3/config/dsp16xx/dsp16xx.md Mon Nov 7 17:46:56 1994 --- gcc-2.7.0/config/dsp16xx/dsp16xx.md Thu Jun 15 16:48:21 1995 *************** *** 1,4 **** ;;- Machine description for the AT&T DSP1600 for GNU C compiler ! ;; Copyright (C) 1994 Free Software Foundation, Inc. ;; Contributed by Michael Collison (collison@world.std.com). --- 1,4 ---- ;;- Machine description for the AT&T DSP1600 for GNU C compiler ! ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. ;; Contributed by Michael Collison (collison@world.std.com). *************** *** 17,21 **** ;; 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. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 185,189 **** } else ! fatal (\"Illegal register for compare\"); } else if (GET_CODE(operands[0]) == CONST_INT) --- 186,190 ---- } else ! fatal (\"Invalid register for compare\"); } else if (GET_CODE(operands[0]) == CONST_INT) *************** *** 212,216 **** } else ! fatal (\"Illegal register for compare\"); } else if (GET_CODE (operands[1]) == MEM) --- 213,217 ---- } else ! fatal (\"Invalid register for compare\"); } else if (GET_CODE (operands[1]) == MEM) *************** *** 963,968 **** { case 0: ! /* We have to use the move mneumonic otherwise the 1610 will ! attempt to transfer all 32-bits of 'y', 'p' or an accumualtor , which we don't want */ if (REGNO(operands[1]) == REG_Y || REGNO(operands[1]) == REG_PROD --- 964,969 ---- { case 0: ! /* We have to use the move mnemonic otherwise the 1610 will ! attempt to transfer all 32-bits of 'y', 'p' or an accumulator , which we don't want */ if (REGNO(operands[1]) == REG_Y || REGNO(operands[1]) == REG_PROD *************** *** 1009,1014 **** { case 0: ! /* We have to use the move mneumonic otherwise the 1610 will ! attempt to transfer all 32-bits of 'y', 'p' or an accumualtor , which we don't want */ if (REGNO(operands[1]) == REG_Y || REGNO(operands[1]) == REG_PROD --- 1010,1015 ---- { case 0: ! /* We have to use the move mnemonic otherwise the 1610 will ! attempt to transfer all 32-bits of 'y', 'p' or an accumulator , which we don't want */ if (REGNO(operands[1]) == REG_Y || REGNO(operands[1]) == REG_PROD diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/dsp16xx/xm-dsp16xx.h gcc-2.7.0/config/dsp16xx/xm-dsp16xx.h *** gcc-2.6.3/config/dsp16xx/xm-dsp16xx.h Fri Sep 9 13:27:54 1994 --- gcc-2.7.0/config/dsp16xx/xm-dsp16xx.h Thu Jun 15 09:35:15 1995 *************** *** 17,21 **** 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. */ /* #defines that need visibility everywhere. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/elxsi/elxsi.c gcc-2.7.0/config/elxsi/elxsi.c *** gcc-2.6.3/config/elxsi/elxsi.c Sat Nov 7 14:13:09 1992 --- gcc-2.7.0/config/elxsi/elxsi.c Thu Jun 15 09:35:36 1995 *************** *** 19,23 **** 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 --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/elxsi/elxsi.h gcc-2.7.0/config/elxsi/elxsi.h *** gcc-2.6.3/config/elxsi/elxsi.h Sat Oct 2 04:17:48 1993 --- gcc-2.7.0/config/elxsi/elxsi.h Thu Jun 15 09:36:05 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. Elxsi version. ! Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc. ! This port, done by Mike Stump in 1988, and is the first 64 bit port of GNU CC. Based upon the VAX port. --- 1,5 ---- /* Definitions of target machine for GNU compiler. Elxsi version. ! Copyright (C) 1987, 1988, 1992, 1995 Free Software Foundation, Inc. ! This port, done by Mike Stump in 1988, is the first 64 bit port of GNU CC. Based upon the VAX port. *************** *** 19,23 **** 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. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 303,306 **** --- 304,308 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 308,312 **** On the Vax, the RET insn always pops all the args for any function. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. --- 310,314 ---- On the Vax, the RET insn always pops all the args for any function. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. *************** *** 442,446 **** /* this conditional is ONLY here because there is a BUG; \ EXIT_IGNORE_STACK is ignored itself when the first part of \ ! the condition is true! (atleast in version 1.35) */ \ /* the 8*10 is for 64 bits of .r5 - .r14 */ \ if (current_function_calls_alloca || (SIZE)>=(256-8*10)) { \ --- 444,448 ---- /* this conditional is ONLY here because there is a BUG; \ EXIT_IGNORE_STACK is ignored itself when the first part of \ ! the condition is true! (at least in version 1.35) */ \ /* the 8*10 is for 64 bits of .r5 - .r14 */ \ if (current_function_calls_alloca || (SIZE)>=(256-8*10)) { \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/elxsi/elxsi.md gcc-2.7.0/config/elxsi/elxsi.md *** gcc-2.6.3/config/elxsi/elxsi.md Mon Nov 7 17:47:04 1994 --- gcc-2.7.0/config/elxsi/elxsi.md Thu Jun 15 16:48:58 1995 *************** *** 19,23 **** ;; 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. --- 19,24 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/elxsi/xm-elxsi.h gcc-2.7.0/config/elxsi/xm-elxsi.h *** gcc-2.6.3/config/elxsi/xm-elxsi.h Sat Jun 26 11:40:45 1993 --- gcc-2.7.0/config/elxsi/xm-elxsi.h Thu Jun 15 09:36:14 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/fp-bit.c gcc-2.7.0/config/fp-bit.c *** gcc-2.6.3/config/fp-bit.c Mon Sep 12 14:25:17 1994 --- gcc-2.7.0/config/fp-bit.c Thu Jun 15 08:48:00 1995 *************** *** 25,29 **** You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, if you link this library with other files, --- 25,30 ---- You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with other files, *************** *** 436,440 **** if (fraction == 0) { ! /* Attatched to a zero fraction - means infinity */ dst->class = CLASS_INFINITY; } --- 437,441 ---- if (fraction == 0) { ! /* Attached to a zero fraction - means infinity */ dst->class = CLASS_INFINITY; } *************** *** 486,489 **** --- 487,493 ---- if (isinf (a)) { + /* Adding infinities with opposite signs yields a NaN. */ + if (isinf (b) && a->sign != b->sign) + return nan (); return a; } *************** *** 567,571 **** tmp->fraction.ll = -tfraction; } ! /* and renomalize it */ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll) --- 571,575 ---- tmp->fraction.ll = -tfraction; } ! /* and renormalize it */ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/fx80/fx80.c gcc-2.7.0/config/fx80/fx80.c *** gcc-2.6.3/config/fx80/fx80.c Sun Mar 13 08:33:03 1994 --- gcc-2.7.0/config/fx80/fx80.c Thu Jun 15 09:36:37 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/fx80/fx80.h gcc-2.7.0/config/fx80/fx80.h *** gcc-2.6.3/config/fx80/fx80.h Sat Jul 30 14:11:43 1994 --- gcc-2.7.0/config/fx80/fx80.h Thu Jun 15 09:36:59 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Alliant FX version. ! Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. Adapted from m68k.h by Paul Petersen (petersen@uicsrd.csrd.uiuc.edu) and Joe Weening (weening@gang-of-four.stanford.edu). --- 1,4 ---- /* Definitions of target machine for GNU compiler. Alliant FX version. ! Copyright (C) 1989, 1993, 1994, 1995 Free Software Foundation, Inc. Adapted from m68k.h by Paul Petersen (petersen@uicsrd.csrd.uiuc.edu) and Joe Weening (weening@gang-of-four.stanford.edu). *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 432,435 **** --- 433,437 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 441,445 **** descriptors that are pushed after the arguments. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. --- 443,447 ---- descriptors that are pushed after the arguments. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. *************** *** 900,904 **** (OVERFLOW) = 1, (D) = 0.0; \ else if (((d) < 0) && ((d) > -1.1754943508222873e-38)) \ ! (OVEFLOW) = 1, (D) = 0.0; \ } --- 902,906 ---- (OVERFLOW) = 1, (D) = 0.0; \ else if (((d) < 0) && ((d) > -1.1754943508222873e-38)) \ ! (OVERFLOW) = 1, (D) = 0.0; \ } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/fx80/fx80.md gcc-2.7.0/config/fx80/fx80.md *** gcc-2.6.3/config/fx80/fx80.md Wed Aug 17 17:40:28 1994 --- gcc-2.7.0/config/fx80/fx80.md Thu Jun 15 16:49:18 1995 *************** *** 18,22 **** ;; 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. --- 18,23 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/fx80/xm-fx80.h gcc-2.7.0/config/fx80/xm-fx80.h *** gcc-2.6.3/config/fx80/xm-fx80.h Sat Jun 26 11:40:14 1993 --- gcc-2.7.0/config/fx80/xm-fx80.h Thu Jun 15 09:37:10 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/gmicro/gmicro.c gcc-2.7.0/config/gmicro/gmicro.c *** gcc-2.6.3/config/gmicro/gmicro.c Mon Jul 27 22:43:06 1992 --- gcc-2.7.0/config/gmicro/gmicro.c Thu Jun 15 09:37:36 1995 *************** *** 22,26 **** 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. */ --- 22,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/gmicro/gmicro.h gcc-2.7.0/config/gmicro/gmicro.h *** gcc-2.6.3/config/gmicro/gmicro.h Sat Jul 30 15:04:14 1994 --- gcc-2.7.0/config/gmicro/gmicro.h Thu Jun 15 09:37:50 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Gmicro (TRON) version. ! Copyright (C) 1987, 1988, 1989 Free Software Foundation, Inc. Contributed by Masanobu Yuhara, Fujitsu Laboratories LTD. (yuhara@flab.fujitsu.co.jp) --- 1,4 ---- /* Definitions of target machine for GNU compiler. Gmicro (TRON) version. ! Copyright (C) 1987, 1988, 1989, 1995 Free Software Foundation, Inc. Contributed by Masanobu Yuhara, Fujitsu Laboratories LTD. (yuhara@flab.fujitsu.co.jp) *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 444,447 **** --- 445,449 ---- /* Value is the number of byte of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 458,462 **** for the Gmicro. The option name may be changed in the future. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ --- 460,464 ---- for the Gmicro. The option name may be changed in the future. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/gmicro/gmicro.md gcc-2.7.0/config/gmicro/gmicro.md *** gcc-2.6.3/config/gmicro/gmicro.md Sun Apr 10 07:08:52 1994 --- gcc-2.7.0/config/gmicro/gmicro.md Thu Jun 15 16:49:59 1995 *************** *** 20,24 **** ;; 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. --- 20,25 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/gnu.h gcc-2.7.0/config/gnu.h *** gcc-2.6.3/config/gnu.h --- gcc-2.7.0/config/gnu.h Fri Apr 21 13:18:08 1995 *************** *** 0 **** --- 1,30 ---- + /* Configuration common to all targets running the GNU system. */ + + /* Macro to produce CPP_PREDEFINES for GNU on a given machine. */ + #define GNU_CPP_PREDEFINES(machine) \ + "-D" machine " -Acpu(" machine ") -Amachine(" machine ")" \ + "-Dunix -Asystem(unix) \ + -DMACH -Asystem(mach) \ + -D__GNU__ -Asystem(gnu)" + + /* Provide GCC options for standard feature-test macros. */ + #undef CPP_SPEC + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}" + + /* Default C library spec. Use -lbsd-compat for gcc -bsd. */ + #undef LIB_SPEC + #define LIB_SPEC "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" + + /* Standard include directory. In GNU, "/usr" is a four-letter word. */ + #undef STANDARD_INCLUDE_DIR + #define STANDARD_INCLUDE_DIR "/include" + + + /* We have atexit. */ + #define HAVE_ATEXIT + + /* Implicit library calls should use memcpy, not bcopy, etc. */ + #define TARGET_MEM_FUNCTIONS + + /* The system headers under GNU are C++-aware. */ + #define NO_IMPLICIT_EXTERN_C diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/gofast.h gcc-2.7.0/config/gofast.h *** gcc-2.6.3/config/gofast.h --- gcc-2.7.0/config/gofast.h Thu Jun 15 08:48:59 1995 *************** *** 0 **** --- 1,96 ---- + /* US Software GOFAST floating point library support. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is used by fp-bit.c. */ + #define US_SOFTWARE_GOFAST + + /* The US Software GOFAST library requires special optabs support. + There is no negation libcall, and several others have names different + from gcc. This file consolidates the support in one place. + + The basic plan is to leave gcc proper alone and via some hook fix things + after the optabs have been set up. Our main entry point is + INIT_GOFAST_OPTABS. */ + + #define INIT_GOFAST_OPTABS \ + do { \ + GOFAST_CLEAR_NEG_FLOAT_OPTAB; \ + GOFAST_RENAME_LIBCALLS; \ + } while (0) + + #define GOFAST_CLEAR_NEG_FLOAT_OPTAB \ + do { \ + int mode; \ + for (mode = SFmode; (int) mode <= (int) TFmode; \ + mode = (enum machine_mode) ((int) mode + 1)) \ + neg_optab->handlers[(int) mode].libfunc = NULL_RTX; \ + } while (0) + + #define GOFAST_RENAME_LIBCALLS \ + add_optab->handlers[(int) SFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpadd"); \ + add_optab->handlers[(int) DFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpadd"); \ + sub_optab->handlers[(int) SFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpsub"); \ + sub_optab->handlers[(int) DFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpsub"); \ + smul_optab->handlers[(int) SFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpmul"); \ + smul_optab->handlers[(int) DFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpmul"); \ + flodiv_optab->handlers[(int) SFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpdiv"); \ + flodiv_optab->handlers[(int) DFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpdiv"); \ + cmp_optab->handlers[(int) SFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + cmp_optab->handlers[(int) DFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + \ + extendsfdf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fptodp"); \ + truncdfsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dptofp"); \ + \ + eqsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + nesf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + gtsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + gesf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + ltsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + lesf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fpcmp"); \ + \ + eqdf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + nedf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + gtdf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + gedf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + ltdf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + ledf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dpcmp"); \ + \ + eqxf2_libfunc = NULL_RTX; \ + nexf2_libfunc = NULL_RTX; \ + gtxf2_libfunc = NULL_RTX; \ + gexf2_libfunc = NULL_RTX; \ + ltxf2_libfunc = NULL_RTX; \ + lexf2_libfunc = NULL_RTX; \ + \ + eqtf2_libfunc = NULL_RTX; \ + netf2_libfunc = NULL_RTX; \ + gttf2_libfunc = NULL_RTX; \ + getf2_libfunc = NULL_RTX; \ + lttf2_libfunc = NULL_RTX; \ + letf2_libfunc = NULL_RTX; \ + \ + floatsisf_libfunc = gen_rtx (SYMBOL_REF, Pmode, "sitofp"); \ + floatsidf_libfunc = gen_rtx (SYMBOL_REF, Pmode, "litodp"); \ + fixsfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fptosi"); \ + fixdfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dptoli"); \ + fixunssfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fptoui"); \ + fixunsdfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dptoul"); \ + + /* End of GOFAST_RENAME_LIBCALLS */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/h8300/h8300.c gcc-2.7.0/config/h8300/h8300.c *** gcc-2.6.3/config/h8300/h8300.c Tue Jul 19 20:30:00 1994 --- gcc-2.7.0/config/h8300/h8300.c Thu Jun 15 09:38:12 1995 *************** *** 18,22 **** 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 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 577,583 **** pragma_saveall = 1; ! /* ??? This is deprecated. Use section attributes. */ if (strcmp (pbuf, "section") == 0) { while (c && !isalpha (c)) c = getc (file); --- 578,590 ---- pragma_saveall = 1; ! /* ??? This is deprecated. Delete for gcc 2.8. */ if (strcmp (pbuf, "section") == 0) { + static int printed_p = 0; + if (!printed_p) + { + warning ("#pragma section is deprecated, use section attributes"); + printed_p = 1; + } while (c && !isalpha (c)) c = getc (file); *************** *** 590,594 **** } pbuf[psize] = 0; ! named_section (pbuf); } ungetc (c, file); --- 597,601 ---- } pbuf[psize] = 0; ! named_section (NULL_TREE, pbuf); } ungetc (c, file); *************** *** 864,868 **** case 'L': /* 'L' must always be used twice in a single pattern. It generates ! the same lable twice, and then will generate a unique label the next time it is used. */ asm_fprintf (file, "tl%d", (lab++) / 2); --- 871,875 ---- case 'L': /* 'L' must always be used twice in a single pattern. It generates ! the same label twice, and then will generate a unique label the next time it is used. */ asm_fprintf (file, "tl%d", (lab++) / 2); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/h8300/h8300.h gcc-2.7.0/config/h8300/h8300.h *** gcc-2.6.3/config/h8300/h8300.h Mon Jul 11 18:47:05 1994 --- gcc-2.7.0/config/h8300/h8300.h Thu Jun 15 09:38:24 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler. Hitachi H8/300 version generating coff ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). --- 1,5 ---- /* Definitions of target machine for GNU compiler. Hitachi H8/300 version generating coff ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). *************** *** 19,23 **** 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. */ /* Which cpu to compile for. --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Which cpu to compile for. *************** *** 152,156 **** /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_H8300H ? 4 : 2) ! #define MAX_UNITS_PER_WORD 4 /* Width in bits of a pointer. --- 153,157 ---- /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_H8300H ? 4 : 2) ! #define MIN_UNITS_PER_WORD 2 /* Width in bits of a pointer. *************** *** 447,450 **** --- 448,452 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 453,457 **** On the H8 the return does not pop anything. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Definitions for register eliminations. --- 455,459 ---- On the H8 the return does not pop anything. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Definitions for register eliminations. *************** *** 1023,1034 **** } \ - #if 0 - #define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) \ - do { named_section(".init"); fprintf(FILE,"\t.word\t%s\n", NAME); } while (0) - #else #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { ctors_section(); \ fprintf(FILE, "\t%s\t_%s\n", ASM_WORD_OP, NAME); } while (0) - #endif #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ --- 1025,1031 ---- *************** *** 1043,1049 **** extern pfunc __ctors_end[]; \ pfunc *p; \ ! for (p = __ctors; p < __ctors_end; p++) \ { \ ! (*p)(); \ } \ } --- 1040,1046 ---- extern pfunc __ctors_end[]; \ pfunc *p; \ ! for (p = __ctors_end; p > __ctors; ) \ { \ ! (*--p)(); \ } \ } *************** *** 1080,1088 **** #define SDB_DELIM "\n" ! /* Assemble generic sections. ! This is currently only used to support section attributes. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, NAME) \ ! fprintf (FILE, ".section\t%s\n", NAME) /* This is how to output the definition of a user-level label named NAME, --- 1077,1095 ---- #define SDB_DELIM "\n" ! /* Output DBX (stabs) debugging information if doing -gstabs. */ ! ! #define DBX_DEBUGGING_INFO ! ! /* Generate SDB debugging information by default. */ ! ! #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG ! ! /* A C statement to output something to the assembler file to switch to section ! NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or ! NULL_TREE. Some target formats do not support arbitrary sections. Do not ! define this macro in such cases. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ ! fprintf (FILE, "\t.section %s\n", NAME) /* This is how to output the definition of a user-level label named NAME, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/h8300/h8300.md gcc-2.7.0/config/h8300/h8300.md *** gcc-2.6.3/config/h8300/h8300.md Fri Jul 22 14:32:11 1994 --- gcc-2.7.0/config/h8300/h8300.md Thu Jun 15 16:50:27 1995 *************** *** 1,4 **** ;; GCC machine description for Hitachi H8/300 ! ;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Steve Chamberlain (sac@cygnus.com), --- 1,4 ---- ;; GCC machine description for Hitachi H8/300 ! ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ;; Contributed by Steve Chamberlain (sac@cygnus.com), *************** *** 19,23 **** ;; 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. --- 19,24 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 383,388 **** (define_insn "movsf_h8300h" ! [(set (match_operand:SF 0 "general_operand_dst" "=r,r,r,o,<") ! (match_operand:SF 1 "general_operand_src" "I,r,ion,r,r"))] "TARGET_H8300H && (register_operand (operands[0], SFmode) --- 384,389 ---- (define_insn "movsf_h8300h" ! [(set (match_operand:SF 0 "general_operand_dst" "=r,r,r,o,<,r") ! (match_operand:SF 1 "general_operand_src" "I,r,ion,r,r,>"))] "TARGET_H8300H && (register_operand (operands[0], SFmode) *************** *** 393,399 **** mov.l %S1,%S0 mov.l %S1,%S0 mov.l %S1,%S0" [(set_attr "type" "move") ! (set_attr "length" "2,2,8,8,4") (set_attr "cc" "set")]) --- 394,401 ---- mov.l %S1,%S0 mov.l %S1,%S0 + mov.l %S1,%S0 mov.l %S1,%S0" [(set_attr "type" "move") ! (set_attr "length" "2,2,8,8,4,4") (set_attr "cc" "set")]) *************** *** 1270,1274 **** (define_insn "tablejump_h8300" ! [(set (pc) (match_operand:HI 0 "register_operand" "")) (use (label_ref (match_operand 1 "" "")))] "TARGET_H8300" --- 1272,1276 ---- (define_insn "tablejump_h8300" ! [(set (pc) (match_operand:HI 0 "register_operand" "r")) (use (label_ref (match_operand 1 "" "")))] "TARGET_H8300" *************** *** 1279,1283 **** (define_insn "tablejump_h8300h" ! [(set (pc) (match_operand:SI 0 "register_operand" "")) (use (label_ref (match_operand 1 "" "")))] "TARGET_H8300H" --- 1281,1285 ---- (define_insn "tablejump_h8300h" ! [(set (pc) (match_operand:SI 0 "register_operand" "r")) (use (label_ref (match_operand 1 "" "")))] "TARGET_H8300H" *************** *** 1630,1634 **** ;; ----------------------------------------------------------------- ;; The H8/300 has given 1/8th of its opcode space to bitfield ! ;; instuctions so let's use them as well as we can ;; BCC and BCS patterns. --- 1632,1636 ---- ;; ----------------------------------------------------------------- ;; The H8/300 has given 1/8th of its opcode space to bitfield ! ;; instructions so let's use them as well as we can ;; BCC and BCS patterns. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/h8300/lib1funcs.asm gcc-2.7.0/config/h8300/lib1funcs.asm *** gcc-2.6.3/config/h8300/lib1funcs.asm Sat Jul 16 16:44:14 1994 --- gcc-2.7.0/config/h8300/lib1funcs.asm Thu Jun 15 09:39:23 1995 *************** *** 25,29 **** You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, if you link this library with other files, --- 25,30 ---- You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with other files, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/h8300/xm-h8300.h gcc-2.7.0/config/h8300/xm-h8300.h *** gcc-2.6.3/config/h8300/xm-h8300.h Sun Aug 15 01:38:39 1993 --- gcc-2.7.0/config/h8300/xm-h8300.h Thu Jun 15 09:38:45 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i370/i370.md gcc-2.7.0/config/i370/i370.md *** gcc-2.6.3/config/i370/i370.md Mon Nov 7 17:47:12 1994 --- gcc-2.7.0/config/i370/i370.md Thu Jun 15 16:50:51 1995 *************** *** 2,6 **** ;; Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Jan Stein (jan@cd.chalmers.se). ! ;; Modifed for MVS C/370 by Dave Pitts (pitts@mcdata.com) ;; This file is part of GNU CC. --- 2,6 ---- ;; Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Jan Stein (jan@cd.chalmers.se). ! ;; Modified for MVS C/370 by Dave Pitts (pitts@mcdata.com) ;; This file is part of GNU CC. *************** *** 18,22 **** ;; 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. ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code --- 18,23 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code *************** *** 43,47 **** ;; %X -- Print a constant byte integer in hex. ;; ! ;; We have a special contraint for pattern matching. ;; ;; s_operand -- Matches a valid S operand in a RS, SI or SS type instruction. --- 44,48 ---- ;; %X -- Print a constant byte integer in hex. ;; ! ;; We have a special constraint for pattern matching. ;; ;; s_operand -- Matches a valid S operand in a RS, SI or SS type instruction. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i370/mvs.h gcc-2.7.0/config/i370/mvs.h *** gcc-2.6.3/config/i370/mvs.h Wed Jul 27 19:05:26 1994 --- gcc-2.7.0/config/i370/mvs.h Thu Jun 15 09:39:40 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. System/370 version. ! Copyright (C) 1989, 1993 Free Software Foundation, Inc. Contributed by Jan Stein (jan@cd.chalmers.se). Modified for C/370 MVS by Dave Pitts (pitts@mcdata.com) --- 1,4 ---- /* Definitions of target machine for GNU compiler. System/370 version. ! Copyright (C) 1989, 1993, 1995 Free Software Foundation, Inc. Contributed by Jan Stein (jan@cd.chalmers.se). Modified for C/370 MVS by Dave Pitts (pitts@mcdata.com) *************** *** 18,22 **** 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. */ #ifdef sun --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifdef sun *************** *** 60,64 **** extern int current_function_outgoing_args_size; ! /* Compile using char instructins (mvc, nc, oc, xc). On 4341 use this since these are more than twice as fast as load-op-store. On 3090 don't use this since load-op-store is much faster. */ --- 61,65 ---- extern int current_function_outgoing_args_size; ! /* Compile using char instructions (mvc, nc, oc, xc). On 4341 use this since these are more than twice as fast as load-op-store. On 3090 don't use this since load-op-store is much faster. */ *************** *** 95,99 **** #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressible storage unit. */ #define BITS_PER_UNIT 8 --- 96,100 ---- #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressable storage unit. */ #define BITS_PER_UNIT 8 *************** *** 448,452 **** arguments described by the number-of-args field in the call. */ ! #define RETURN_POPS_ARGS(FUNTYPE, STACKSIZE) 0 /* Define how to find the value returned by a function. VALTYPE is the --- 449,453 ---- arguments described by the number-of-args field in the call. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. VALTYPE is the *************** *** 656,660 **** #define FUNCTION_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "Error: No profiling availble.\n") /* Define EXIT_IGNORE_STACK if, when returning from a function, the stack --- 657,661 ---- #define FUNCTION_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "Error: No profiling available.\n") /* Define EXIT_IGNORE_STACK if, when returning from a function, the stack *************** *** 1170,1174 **** { \ if (j % MVS_ASCII_TEXT_LENGTH == 0) \ ! fprintf (FILE, "\tDC\tC'%c", c); \ if ( c == '\'' ) \ fprintf (FILE, "%c%c", c, c); \ --- 1171,1175 ---- { \ if (j % MVS_ASCII_TEXT_LENGTH == 0) \ ! fprintf (FILE, "\tDC\tC'", c); \ if ( c == '\'' ) \ fprintf (FILE, "%c%c", c, c); \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i370/mvs370.c gcc-2.7.0/config/i370/mvs370.c *** gcc-2.6.3/config/i370/mvs370.c Sun Oct 3 15:42:29 1993 --- gcc-2.7.0/config/i370/mvs370.c Thu Jun 15 09:40:11 1995 *************** *** 18,22 **** 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 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 75,79 **** static label_node_t *free_anchor = 0; ! /* Assembler source file decriptor. */ static FILE *assembler_source = 0; --- 76,80 ---- static label_node_t *free_anchor = 0; ! /* Assembler source file descriptor. */ static FILE *assembler_source = 0; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i370/xm-mvs.h gcc-2.7.0/config/i370/xm-mvs.h *** gcc-2.6.3/config/i370/xm-mvs.h Sat Jun 26 11:38:45 1993 --- gcc-2.7.0/config/i370/xm-mvs.h Thu Jun 15 09:39:54 1995 *************** *** 2,6 **** Copyright (C) 1989, 1993 Free Software Foundation, Inc. Contributed by Jan Stein (jan@cd.chalmers.se). ! Modifed for MVS C/370 by Dave Pitts (pitts@mcdata.com) This file is part of GNU CC. --- 2,6 ---- Copyright (C) 1989, 1993 Free Software Foundation, Inc. Contributed by Jan Stein (jan@cd.chalmers.se). ! Modified for MVS C/370 by Dave Pitts (pitts@mcdata.com) This file is part of GNU CC. *************** *** 18,22 **** 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. */ /* #defines that need visibility everywhere. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/aix386.h gcc-2.7.0/config/i386/aix386.h *** gcc-2.6.3/config/i386/aix386.h Thu Jun 17 16:18:55 1993 --- gcc-2.7.0/config/i386/aix386.h Thu Jun 15 09:44:12 1995 *************** *** 17,21 **** 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. */ /* --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/aix386ng.h gcc-2.7.0/config/i386/aix386ng.h *** gcc-2.6.3/config/i386/aix386ng.h Sat Oct 2 04:18:14 1993 --- gcc-2.7.0/config/i386/aix386ng.h Thu Jun 15 09:44:23 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/att.h gcc-2.7.0/config/i386/att.h *** gcc-2.6.3/config/i386/att.h Fri Sep 24 00:57:44 1993 --- gcc-2.7.0/config/i386/att.h Thu Jun 15 09:44:35 1995 *************** *** 16,20 **** 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 common aspects of all 386 Unix assemblers. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Include common aspects of all 386 Unix assemblers. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/bsd.h gcc-2.7.0/config/i386/bsd.h *** gcc-2.6.3/config/i386/bsd.h Sun Oct 3 19:50:23 1993 --- gcc-2.7.0/config/i386/bsd.h Thu Jun 15 09:44:47 1995 *************** *** 18,22 **** 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 common aspects of all 386 Unix assemblers. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Include common aspects of all 386 Unix assemblers. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/config-nt.bat gcc-2.7.0/config/i386/config-nt.bat *** gcc-2.6.3/config/i386/config-nt.bat Tue Oct 11 19:10:00 1994 --- gcc-2.7.0/config/i386/config-nt.bat Mon May 22 18:54:18 1995 *************** *** 1,32 **** ! echo Configuring GCC for Windows NT on Intel x86 ! rem This batch file assumes a unix-type "sed" program ! ! copy config\i386\xm-winnt.h config.h ! copy config\i386\xm-winnt.h hconfig.h ! copy config\i386\xm-winnt.h tconfig.h ! copy config\i386\winnt.h tm.h ! copy config\i386\i386.md md ! copy config\i386\i386.c aux-output.c ! ! rem This batch file assumes a unix-type "sed" program ! ! echo # Makefile generated by "config-nt.bat"> Makefile ! echo all.nt: cccp.exe cc1.exe xgcc.exe ld-winnt.exe>> Makefile ! sed -f config/i386/config-nt.sed Makefile.in >> Makefile ! ! set LANG= ! ! if not exist cp\make-lang.in goto no_cp ! sed -f config/i386/config-nt.sed cp\make-lang.in >> Makefile ! sed -f config/i386/config-nt.sed cp\makefile.in > cp\Makefile ! set LANG=%LANG% c++.& ! :no_cp ! ! echo lang.mostlyclean: %LANG% | sed "s/&/mostlyclean/g" >> Makefile ! echo lang.clean: %LANG% | sed "s/&/clean/g" >> Makefile ! echo lang.distclean: %LANG% | sed "s/&/distclean/g" >> Makefile ! echo lang.realclean: %LANG% | sed "s/&/realclean/g" >> Makefile ! ! echo #define MULTILIB_SELECT ". ;" > multilib.h1 ! copy multilib.h1 multilib.h ! del multilib.h1 --- 1,51 ---- ! echo Configuring GCC for Windows NT on Intel x86 ! rem This batch file assumes a unix-type "sed" program ! ! echo #include "i386/xm-winnt.h" >config.h ! echo #include "i386/xm-winnt.h" >hconfig.h ! echo #include "i386/xm-winnt.h" >tconfig.h ! echo #include "i386/winnt.h" >tm.h ! ! rem This batch file assumes a unix-type "sed" program ! ! echo # Makefile generated by "config-nt.bat"> Makefile ! echo all.nt: cpp.exe cc1.exe xgcc.exe ld.exe>> Makefile ! sed -f config/i386/config-nt.sed Makefile.in >> Makefile ! ! set LANG= ! ! echo # >specs.h ! echo # >options.h ! ! if not exist cp\make-lang.in goto no_cp ! if exist cp\lang-specs.h echo #include "cp/lang-specs.h">>specs.h ! if exist cp\lang-options.h echo #include "cp/lang-options.h">>options.h ! sed -f config/i386/config-nt.sed cp\make-lang.in >> Makefile ! sed -f config/i386/config-nt.sed cp\makefile.in > cp\Makefile ! set LANG=%LANG% c++.& ! :no_cp ! ! if not exist ada\make-lang.in goto no_ada ! if exist ada\lang-specs.h echo #include "ada/lang-specs.h">>specs.h ! if exist ada\lang-options.h echo #include "ada/lang-options.h">>options.h ! sed -f config/i386/config-nt.sed ada\make-lang.in >> Makefile ! sed -f config/i386/config-nt.sed ada\makefile.in > ada\Makefile ! set LANG=%LANG% ada.& ! :no_ada ! ! if not exist f\make-lang.in goto no_f ! if exist f\lang-specs.h echo #include "f/lang-specs.h">>specs.h ! if exist f\lang-options.h echo #include "f/lang-options.h">>options.h ! sed -f config/i386/config-nt.sed f\make-lang.in >> Makefile ! sed -f config/i386/config-nt.sed f\makefile.in > f\Makefile ! set LANG=%LANG% f.& ! :no_f ! ! echo lang.mostlyclean: %LANG% | sed "s/&/mostlyclean/g" >> Makefile ! echo lang.clean: %LANG% | sed "s/&/clean/g" >> Makefile ! echo lang.distclean: %LANG% | sed "s/&/distclean/g" >> Makefile ! echo lang.realclean: %LANG% | sed "s/&/realclean/g" >> Makefile ! ! echo #define MULTILIB_SELECT ". ;" > multilib.h1 ! copy multilib.h1 multilib.h ! del multilib.h1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/config-nt.sed gcc-2.7.0/config/i386/config-nt.sed *** gcc-2.6.3/config/i386/config-nt.sed Sun Oct 30 10:10:31 1994 --- gcc-2.7.0/config/i386/config-nt.sed Mon May 22 18:54:22 1995 *************** *** 1,11 **** ! #/\.o[ ]*:/ s/config.status// /^multilib.h/ s/multilib/not-multilib/ /^target=/ c\ ! target=winnt3.1 /^xmake_file=/ d /^tmake_file=/ d /^version=/ c\ ! version=2.6.1 s/CC = cc/CC = cl/ s/CFLAGS = -g/CFLAGS =/ s/:\$/: \$/g --- 1,33 ---- ! /^Makefile/,/^ rm -f config.run/d ! s/rm -f/del/ ! s/|| cp/|| copy/ ! /^config.status/,/ fi/d ! s/config.status//g ! s/\/dev\/null/NUL/g ! s/$(srcdir)\/c-parse/c-parse/g ! s/$(srcdir)\/c-gperf/c-gperf/g /^multilib.h/ s/multilib/not-multilib/ /^target=/ c\ ! target=winnt3.5 /^xmake_file=/ d /^tmake_file=/ d + /^out_file/ c\ + out_file=config/i386/i386.c + /^out_object_file/ c\ + out_object_file=i386.obj + /^md_file/ c\ + md_file=config/i386/i386.md + /^tm_file/ c\ + tm_file=config/i386/winnt.h + /^build_xm_file/ c\ + build_xm_file=config/i386/xm-winnt.h + /^host_xm_file/ c\ + host_xm_file=config/i386/xm-winnt.h + /^lang_specs_files=/ d + /^lang_options_files=/ d /^version=/ c\ ! version=2.6.3 s/CC = cc/CC = cl/ + s/^SHELL =.*/SHELL =/ s/CFLAGS = -g/CFLAGS =/ s/:\$/: \$/g *************** *** 17,24 **** s/^ cd \$(srcdir)[ ]*;/ / /^stamp-attrtab/,/copy/ { ! /\\/d ! /fi/d /copy/ i\ ! genattrtab md > tmp-attrtab.c } /^enquire[ ]*:/ s/\$(GCC_PARTS)//g --- 39,46 ---- s/^ cd \$(srcdir)[ ]*;/ / /^stamp-attrtab/,/copy/ { ! /\\$/d ! / fi/d /copy/ i\ ! \ genattrtab $(md_file) > tmp-attrtab.c } /^enquire[ ]*:/ s/\$(GCC_PARTS)//g *************** *** 32,46 **** s/^\(SUBDIR_MALLOC *=\).*$/\1/ /####target/ i\ ! EXTRA_PROGRAMS="ld-winnt.exe" \ \ ld.obj: $(srcdir)/config/winnt/ld.c \ ! cl -D_SYSV -DWINNT -D_M_IX86_ -D_X86_ -D__STDC__=0 -DALMOST_STDC \\\ ! -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/ld.c \ \ ! ld-winnt.exe: ld.obj \ ! link32 -align:0x1000 -subsystem:console -entry:mainCRTStartup \\\ ! -stack:1000000,1000000 -out:ld-winnt.exe ld.obj libc.lib kernel32.lib \ ! copy ld-winnt.exe ld.exe ! /####host/ r config/i386/x-winnt s/^C c:/Cc:/ s/\${OBJS}/\$(OBJS)/g --- 54,89 ---- s/^\(SUBDIR_MALLOC *=\).*$/\1/ /####target/ i\ ! STMP_FIXPROTO = \ ! OTHER_FIXINCLUDES_DIRS=/MSTOOLS/h \ ! RANLIB = : \ ! RANLIB_TEST = false \ ! OLDCC = cl \ ! MAKE = make \ ! SYMLINK = copy \ ! INSTALL = $(srcdir)/install.sh -c \ ! exeext = .exe \ ! objext = .obj \ ! oldobjext = .obj \ \ + CC = cl \ + CFLAGS = -Di386 -DWIN32 -D_WIN32 -DWINNT -D_M_IX86=300 -D_X86_=1 \\\ + -DALMOST_STDC -D_MSC_VER=800 \ + CLIB = libc.lib kernel32.lib \ + LDFLAGS = -align:0x1000 -subsystem:console -entry:mainCRTStartup \\\ + -stack:1000000,1000000 \ + \ + EXTRA_PROGRAMS=ld.exe \ + \ ld.obj: $(srcdir)/config/winnt/ld.c \ ! \ $(CC) $(CFLAGS) \\\ ! \ -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/ld.c \ ! \ ! ld.exe: ld.obj \ ! link -out:ld.exe ld.obj $(LDFLAGS) $(CLIB) \ \ ! EXTRA_OBJS=winnt.obj \ ! winnt.obj: $(srcdir)/config/i386/winnt.c \ ! \ $(CC) $(CFLAGS) \\\ ! \ -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/i386/winnt.c s/^C c:/Cc:/ s/\${OBJS}/\$(OBJS)/g *************** *** 70,73 **** --- 113,117 ---- s/cccp$/cccp.exe/ s/cccp /cccp.exe / + s/CCCP=cccp.exe/CCCP=cccp/ s/^cpp *:/cpp.exe :/ s/cpp$/cpp.exe/ *************** *** 86,91 **** s/\.o /.obj /g s/-rm -f cpp.exe/del cpp.exe/ ! s/ln cccp.exe cpp.exe/copy cccp.exe cpp.exe/ ! s/\$(CC) \$(ALL_CFLAGS) \$(LDFLAGS) -o /link32 $(LDFLAGS) -out:/ ! s/\$(HOST_CC) \$(HOST_CFLAGS) \$(HOST_LDFLAGS) -o /link32 $(HOST_LDFLAGS) -out:/ s/^\ // --- 130,134 ---- s/\.o /.obj /g s/-rm -f cpp.exe/del cpp.exe/ ! s/\$(CC) \$(ALL_CFLAGS) \$(LDFLAGS) -o /link $(LDFLAGS) -out:/ ! s/\$(HOST_CC) \$(HOST_CFLAGS) \$(HOST_LDFLAGS) -o /link $(HOST_LDFLAGS) -out:/ s/^\ // diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/freebsd.h gcc-2.7.0/config/i386/freebsd.h *** gcc-2.6.3/config/i386/freebsd.h Tue Nov 15 19:07:01 1994 --- gcc-2.7.0/config/i386/freebsd.h Thu Jun 15 09:44:56 1995 *************** *** 18,22 **** 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 goes away when the math-emulator is fixed */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This goes away when the math-emulator is fixed */ *************** *** 119,123 **** #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" ! #define WEAK_ASM_OP ".weak" /* The following macro defines the format used to output the second --- 120,129 ---- #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" ! ! /* This is how we tell the assembler that a symbol is weak. */ ! ! #define ASM_WEAKEN_LABEL(FILE,NAME) \ ! do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ ! fputc ('\n', FILE); } while (0) /* The following macro defines the format used to output the second diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/gas.h gcc-2.7.0/config/i386/gas.h *** gcc-2.6.3/config/i386/gas.h Sun Jan 23 18:39:19 1994 --- gcc-2.7.0/config/i386/gas.h Thu Jun 15 09:45:16 1995 *************** *** 16,20 **** 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. */ /* Note that i386/seq-gas.h is a GAS configuration that does not use this --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Note that i386/seq-gas.h is a GAS configuration that does not use this *************** *** 83,89 **** #undef ASM_OUTPUT_ALIGN_CODE ! #define ASM_OUTPUT_ALIGN_CODE(FILE) \ ! fprintf ((FILE), "\t.align %d,0x90\n", \ ! TARGET_486 ? 4 : 2); /* Use log of 16 or log of 4 as arg. */ /* Align start of loop at 4-byte boundary. */ --- 84,89 ---- #undef ASM_OUTPUT_ALIGN_CODE ! #define ASM_OUTPUT_ALIGN_CODE(FILE) \ ! fprintf ((FILE), "\t.align %d,0x90\n", i386_align_jumps) /* Align start of loop at 4-byte boundary. */ *************** *** 91,95 **** #undef ASM_OUTPUT_LOOP_ALIGN #define ASM_OUTPUT_LOOP_ALIGN(FILE) \ ! fprintf ((FILE), "\t.align 2,0x90\n"); /* Use log of 4 as arg. */ /* A C statement or statements which output an assembler instruction --- 91,96 ---- #undef ASM_OUTPUT_LOOP_ALIGN #define ASM_OUTPUT_LOOP_ALIGN(FILE) \ ! fprintf ((FILE), "\t.align %d,0x90\n", i386_align_loops) ! /* A C statement or statements which output an assembler instruction diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/gnu.h gcc-2.7.0/config/i386/gnu.h *** gcc-2.6.3/config/i386/gnu.h Fri Oct 7 19:15:23 1994 --- gcc-2.7.0/config/i386/gnu.h Fri May 12 18:56:20 1995 *************** *** 1,17 **** ! /* Configuration for an i386 running GNU as the target machine. */ ! /* We do want to add an underscore to the front of each user symbol. ! i386/gas.h checks this. */ ! #define YES_UNDERSCORES ! #include "i386/gstabs.h" ! /* Get perform_* macros to build libgcc.a. */ ! #include "i386/perform.h" - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -Di386 -DMACH -Asystem(unix) -Asystem(mach) -Acpu(i386) -Amachine(i386) -D__GNU__ -D__HURD__ -Asystem(gnu)" ! /* Don't default to pcc-struct-return, because gcc is the only compiler, and ! we want to retain compatibility with older gcc versions. */ ! #define DEFAULT_PCC_STRUCT_RETURN 0 --- 1,20 ---- ! /* Configuration for an i386 running GNU with ELF as the target machine. */ ! /* This does it mostly for us. */ ! #include ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES GNU_CPP_PREDEFINES("i386") ! #undef LINK_SPEC ! #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ ! %{!shared: \ ! %{!ibcs: \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /lib/ld.so} \ ! %{!rpath:-rpath /lib/}} %{static:-static}}}" ! /* Get machine-independent configuration parameters for the GNU system. */ ! #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/go32.h gcc-2.7.0/config/i386/go32.h *** gcc-2.6.3/config/i386/go32.h Fri Jul 22 09:32:54 1994 --- gcc-2.7.0/config/i386/go32.h Fri May 12 13:24:30 1995 *************** *** 4,7 **** --- 4,9 ---- #define NO_IMPLICIT_EXTERN_C + #define HANDLE_SYSV_PRAGMA + #define YES_UNDERSCORES diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/i386-aout.h gcc-2.7.0/config/i386/i386-aout.h *** gcc-2.6.3/config/i386/i386-aout.h --- gcc-2.7.0/config/i386/i386-aout.h Thu Jun 15 09:45:34 1995 *************** *** 0 **** --- 1,34 ---- + /* Definitions for "naked" Intel 386 using a.out (or coff encap'd + a.out) object format and stabs debugging info. + + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + /* This is tested by gas.h. */ + #define YES_UNDERSCORES + + #include "i386/gstabs.h" + + /* Specify predefined symbols in preprocessor. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Di386" + + /* end of i386-aout.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/i386-coff.h gcc-2.7.0/config/i386/i386-coff.h *** gcc-2.6.3/config/i386/i386-coff.h --- gcc-2.7.0/config/i386/i386-coff.h Thu Jun 15 09:45:51 1995 *************** *** 0 **** --- 1,97 ---- + /* Definitions for "naked" Intel 386 using coff object format files + and coff debugging info. + + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #include "i386/gas.h" + + /* Specify predefined symbols in preprocessor. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Di386" + + #undef DBX_DEBUGGING_INFO + #define SDB_DEBUGGING_INFO + + /* Support the ctors and dtors sections for g++. */ + + #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" + #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" + + /* A list of other sections which the compiler might be "in" at any + given time. */ + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_ctors, in_dtors + + /* A list of extra section function definitions. */ + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + + #define CTORS_SECTION_FUNCTION \ + void \ + ctors_section () \ + { \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ + } + + #define DTORS_SECTION_FUNCTION \ + void \ + dtors_section () \ + { \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ + } + + #define INT_ASM_OP ".long" + + /* A C statement (sans semicolon) to output an element in the table of + global constructors. */ + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. */ + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + + /* end of i386-coff.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/i386.c gcc-2.7.0/config/i386/i386.c *** gcc-2.6.3/config/i386/i386.c Sat Nov 5 13:57:47 1994 --- gcc-2.7.0/config/i386/i386.c Thu Jun 15 09:46:11 1995 *************** *** 1,4 **** /* Subroutines for insn-output.c for Intel X86. ! Copyright (C) 1988, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Subroutines for insn-output.c for Intel X86. ! Copyright (C) 1988, 1992, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,23 **** 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 #include #include "config.h" #include "rtl.h" --- 16,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include #include + #include #include "config.h" #include "rtl.h" *************** *** 80,86 **** /* Register allocation order */ ! char *i386_reg_alloc_order = (char *)0; static char regs_allocated[FIRST_PSEUDO_REGISTER]; /* Sometimes certain combinations of command options do not make --- 82,101 ---- /* Register allocation order */ ! char *i386_reg_alloc_order; static char regs_allocated[FIRST_PSEUDO_REGISTER]; + /* # of registers to use to pass arguments. */ + char *i386_regparm_string; /* # registers to use to pass args */ + int i386_regparm; /* i386_regparm_string as a number */ + + /* Alignment to use for loops and jumps */ + char *i386_align_loops_string; /* power of two alignment for loops */ + char *i386_align_jumps_string; /* power of two alignment for non-loop jumps */ + char *i386_align_funcs_string; /* power of two alignment for functions */ + + int i386_align_loops; /* power of two alignment for loops */ + int i386_align_jumps; /* power of two alignment for non-loop jumps */ + int i386_align_funcs; /* power of two alignment for functions */ + /* Sometimes certain combinations of command options do not make *************** *** 97,100 **** --- 112,117 ---- { int ch, i, regno; + char *p; + int def_align; #ifdef SUBTARGET_OVERRIDE_OPTIONS *************** *** 126,129 **** --- 143,189 ---- } } + + /* Validate -mregparm= value */ + if (i386_regparm_string) + { + i386_regparm = atoi (i386_regparm_string); + if (i386_regparm < 0 || i386_regparm > REGPARM_MAX) + fatal ("-mregparm=%d is not between 0 and %d", i386_regparm, REGPARM_MAX); + } + + def_align = (TARGET_386) ? 2 : 4; + + /* Validate -malign-loops= value, or provide default */ + if (i386_align_loops_string) + { + i386_align_loops = atoi (i386_align_loops_string); + if (i386_align_loops < 0 || i386_align_loops > MAX_CODE_ALIGN) + fatal ("-malign-loops=%d is not between 0 and %d", + i386_align_loops, MAX_CODE_ALIGN); + } + else + i386_align_loops = 2; + + /* Validate -malign-jumps= value, or provide default */ + if (i386_align_jumps_string) + { + i386_align_jumps = atoi (i386_align_jumps_string); + if (i386_align_jumps < 0 || i386_align_jumps > MAX_CODE_ALIGN) + fatal ("-malign-jumps=%d is not between 0 and %d", + i386_align_jumps, MAX_CODE_ALIGN); + } + else + i386_align_jumps = def_align; + + /* Validate -malign-functions= value, or provide default */ + if (i386_align_funcs_string) + { + i386_align_funcs = atoi (i386_align_funcs_string); + if (i386_align_funcs < 0 || i386_align_funcs > MAX_CODE_ALIGN) + fatal ("-malign-functions=%d is not between 0 and %d", + i386_align_funcs, MAX_CODE_ALIGN); + } + else + i386_align_funcs = def_align; } *************** *** 221,224 **** --- 281,584 ---- + /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific + attribute for DECL. The attributes in ATTRIBUTES have previously been + assigned to DECL. */ + + int + i386_valid_decl_attribute_p (decl, attributes, identifier, args) + tree decl; + tree attributes; + tree identifier; + tree args; + { + return 0; + } + + /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific + attribute for TYPE. The attributes in ATTRIBUTES have previously been + assigned to TYPE. */ + + int + i386_valid_type_attribute_p (type, attributes, identifier, args) + tree type; + tree attributes; + tree identifier; + tree args; + { + if (TREE_CODE (type) != FUNCTION_TYPE + && TREE_CODE (type) != FIELD_DECL + && TREE_CODE (type) != TYPE_DECL) + return 0; + + /* Stdcall attribute says callee is responsible for popping arguments + if they are not variable. */ + if (is_attribute_p ("stdcall", identifier)) + return (args == NULL_TREE); + + /* Cdecl attribute says the callee is a normal C declaration */ + if (is_attribute_p ("cdecl", identifier)) + return (args == NULL_TREE); + + /* Regparm attribute specifies how many integer arguments are to be + passed in registers */ + if (is_attribute_p ("regparm", identifier)) + { + tree cst; + + if (!args || TREE_CODE (args) != TREE_LIST + || TREE_CHAIN (args) != NULL_TREE + || TREE_VALUE (args) == NULL_TREE) + return 0; + + cst = TREE_VALUE (args); + if (TREE_CODE (cst) != INTEGER_CST) + return 0; + + if (TREE_INT_CST_HIGH (cst) != 0 + || TREE_INT_CST_LOW (cst) < 0 + || TREE_INT_CST_LOW (cst) > REGPARM_MAX) + return 0; + + return 1; + } + + return 0; + } + + /* Return 0 if the attributes for two types are incompatible, 1 if they + are compatible, and 2 if they are nearly compatible (which causes a + warning to be generated). */ + + int + i386_comp_type_attributes (type1, type2) + tree type1; + tree type2; + { + return 1; + } + + + /* Value is the number of bytes of arguments automatically + popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), + 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. + SIZE is the number of bytes of arguments passed on the stack. + + On the 80386, the RTD insn may be used to pop them if the number + of args is fixed, but if the number is variable then the caller + must pop them all. RTD can't be used for library calls now + because the library is compiled with the Unix compiler. + Use of RTD is a selectable option, since it is incompatible with + standard Unix calling sequences. If the option is not selected, + the caller must always pop the args. + + The attribute stdcall is equivalent to RTD on a per module basis. */ + + int + i386_return_pops_args (fundecl, funtype, size) + tree fundecl; + tree funtype; + int size; + { + int rtd = TARGET_RTD; + + if (TREE_CODE (funtype) == IDENTIFIER_NODE) + return 0; + + if (fundecl && TREE_CODE_CLASS (TREE_CODE (fundecl)) == 'd') + { + /* Cdecl functions override -mrtd, and never pop the stack */ + if (lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype))) + return 0; + + /* Stdcall functions will pop the stack if not variable args */ + if (lookup_attribute ("stdcall", TYPE_ATTRIBUTES (funtype))) + rtd = 1; + } + + if (rtd) + { + if (TYPE_ARG_TYPES (funtype) == NULL_TREE + || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (funtype))) == void_type_node)) + return size; + + if (aggregate_value_p (TREE_TYPE (funtype))) + return GET_MODE_SIZE (Pmode); + } + + return 0; + } + + + /* Argument support functions. */ + + /* 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. */ + + void + init_cumulative_args (cum, fntype, libname) + CUMULATIVE_ARGS *cum; /* argument info to initialize */ + tree fntype; /* tree ptr for function decl */ + rtx libname; /* SYMBOL_REF of library name or 0 */ + { + static CUMULATIVE_ARGS zero_cum; + tree param, next_param; + + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, "\ninit_cumulative_args ("); + if (fntype) + { + tree ret_type = TREE_TYPE (fntype); + fprintf (stderr, "fntype code = %s, ret code = %s", + tree_code_name[ (int)TREE_CODE (fntype) ], + tree_code_name[ (int)TREE_CODE (ret_type) ]); + } + else + fprintf (stderr, "no fntype"); + + if (libname) + fprintf (stderr, ", libname = %s", XSTR (libname, 0)); + } + + *cum = zero_cum; + + /* Set up the number of registers to use for passing arguments. */ + cum->nregs = i386_regparm; + if (fntype) + { + tree attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (fntype)); + if (attr) + cum->nregs = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr))); + } + + /* Determine if this function has variable arguments. This is + indicated by the last argument being 'void_type_mode' if there + are no variable arguments. If there are variable arguments, then + we won't pass anything in registers */ + + if (cum->nregs) + { + for (param = (fntype) ? TYPE_ARG_TYPES (fntype) : 0; + param != (tree)0; + param = next_param) + { + next_param = TREE_CHAIN (param); + if (next_param == (tree)0 && TREE_VALUE (param) != void_type_node) + cum->nregs = 0; + } + } + + if (TARGET_DEBUG_ARG) + fprintf (stderr, ", nregs=%d )\n", cum->nregs); + + return; + } + + /* 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.) */ + + void + function_arg_advance (cum, mode, type, named) + CUMULATIVE_ARGS *cum; /* current arg information */ + enum machine_mode mode; /* current arg mode */ + tree type; /* type of the argument or 0 if lib support */ + int named; /* whether or not the argument was named */ + { + int bytes = (mode == BLKmode) ? int_size_in_bytes (type) : GET_MODE_SIZE (mode); + int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + + if (TARGET_DEBUG_ARG) + fprintf (stderr, + "function_adv( size=%d, words=%2d, nregs=%d, mode=%4s, named=%d )\n\n", + words, cum->words, cum->nregs, GET_MODE_NAME (mode), named); + + cum->words += words; + cum->nregs -= words; + cum->regno += words; + + if (cum->nregs <= 0) + { + cum->nregs = 0; + cum->regno = 0; + } + + return; + } + + /* Define where to put the arguments 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). */ + + struct rtx_def * + function_arg (cum, mode, type, named) + CUMULATIVE_ARGS *cum; /* current arg information */ + enum machine_mode mode; /* current arg mode */ + tree type; /* type of the argument or 0 if lib support */ + int named; /* != 0 for normal args, == 0 for ... args */ + { + rtx ret = NULL_RTX; + int bytes = (mode == BLKmode) ? int_size_in_bytes (type) : GET_MODE_SIZE (mode); + int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + + switch (mode) + { + default: /* for now, pass fp/complex values on the stack */ + break; + + case BLKmode: + case DImode: + case SImode: + case HImode: + case QImode: + if (words <= cum->nregs) + ret = gen_rtx (REG, mode, cum->regno); + break; + } + + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, + "function_arg( size=%d, words=%2d, nregs=%d, mode=%4s, named=%d", + words, cum->words, cum->nregs, GET_MODE_NAME (mode), named); + + if (ret) + fprintf (stderr, ", reg=%%e%s", reg_names[ REGNO(ret) ]); + else + fprintf (stderr, ", stack"); + + fprintf (stderr, " )\n"); + } + + return ret; + } + + /* 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. */ + + int + function_arg_partial_nregs (cum, mode, type, named) + CUMULATIVE_ARGS *cum; /* current arg information */ + enum machine_mode mode; /* current arg mode */ + tree type; /* type of the argument or 0 if lib support */ + int named; /* != 0 for normal args, == 0 for ... args */ + { + return 0; + } + + /* Output an insn whose source is a 386 integer register. SRC is the rtx for the register, and TEMPLATE is the op-code template. SRC may *************** *** 420,424 **** rtx addreg0 = 0, addreg1 = 0; int dest_overlapped_low = 0; ! int size = GET_MODE_SIZE (GET_MODE (operands[1])); middlehalf[0] = 0; --- 780,784 ---- rtx addreg0 = 0, addreg1 = 0; int dest_overlapped_low = 0; ! int size = GET_MODE_SIZE (GET_MODE (operands[0])); middlehalf[0] = 0; *************** *** 576,593 **** latehalf[1] = adj_offsettable_operand (operands[1], 4); else if (optype1 == CNSTOP) ! { ! if (GET_CODE (operands[1]) == CONST_DOUBLE) ! split_double (operands[1], &operands[1], &latehalf[1]); ! else if (CONSTANT_P (operands[1])) ! { ! /* ??? jrv: Can this really happen? A DImode constant ! that isn't a CONST_DOUBLE? */ ! if (GET_CODE (operands[1]) == CONST_INT ! && INTVAL (operands[1]) < 0) ! latehalf[1] = constm1_rtx; ! else ! latehalf[1] = const0_rtx; ! } ! } else latehalf[1] = operands[1]; --- 936,940 ---- latehalf[1] = adj_offsettable_operand (operands[1], 4); else if (optype1 == CNSTOP) ! split_double (operands[1], &operands[1], &latehalf[1]); else latehalf[1] = operands[1]; *************** *** 1464,1468 **** } else if (scale) ! abort (); /* scale w/o index illegal */ /* Validate scale factor */ --- 1811,1815 ---- } else if (scale) ! abort (); /* scale w/o index invalid */ /* Validate scale factor */ *************** *** 1927,1930 **** --- 2274,2278 ---- w -- print the operand as if it's a "word" (HImode) even if it isn't. c -- don't print special prefixes before constant operands. + J -- print the appropriate jump operand. */ *************** *** 2022,2025 **** --- 2370,2389 ---- case 'P': break; + + case 'J': + switch (GET_CODE (x)) + { + case NE: fputs ("jne", file); return; + case EQ: fputs ("je", file); return; + case GE: fputs ("jge", file); return; + case GT: fputs ("jg", file); return; + case LE: fputs ("jle", file); return; + case LT: fputs ("jl", file); return; + case GEU: fputs ("jae", file); return; + case GTU: fputs ("ja", file); return; + case LEU: fputs ("jbe", file); return; + case LTU: fputs ("jb", file); return; + } + abort (); default: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/i386.h gcc-2.7.0/config/i386/i386.h *** gcc-2.6.3/config/i386/i386.h Wed Oct 19 16:52:09 1994 --- gcc-2.7.0/config/i386/i386.h Thu Jun 15 09:46:26 1995 *************** *** 1,4 **** ! /* Definitions of target machine for GNU compiler for Intel X86 (386, 486, pentium) ! Copyright (C) 1988, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- ! /* Definitions of target machine for GNU compiler for Intel X86 ! (386, 486, Pentium). ! Copyright (C) 1988, 1992, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 58,62 **** /* Macros used in the machine description to test the flags. */ ! /* configure can arrage to make this 2, to force a 486. */ #ifndef TARGET_CPU_DEFAULT #define TARGET_CPU_DEFAULT 0 --- 60,64 ---- /* Macros used in the machine description to test the flags. */ ! /* configure can arrange to make this 2, to force a 486. */ #ifndef TARGET_CPU_DEFAULT #define TARGET_CPU_DEFAULT 0 *************** *** 66,72 **** #define MASK_80387 000000000001 /* Hardware floating point */ #define MASK_486 000000000002 /* 80486 specific */ ! #define MASK_NOTUSED 000000000004 /* bit not currently used */ #define MASK_RTD 000000000010 /* Use ret that pops args */ ! #define MASK_REGPARM 000000000020 /* Pass args in eax, edx */ #define MASK_SVR3_SHLIB 000000000040 /* Uninit locals into bss */ #define MASK_IEEE_FP 000000000100 /* IEEE fp comparisons */ --- 68,74 ---- #define MASK_80387 000000000001 /* Hardware floating point */ #define MASK_486 000000000002 /* 80486 specific */ ! #define MASK_NOTUSED1 000000000004 /* bit not currently used */ #define MASK_RTD 000000000010 /* Use ret that pops args */ ! #define MASK_ALIGN_DOUBLE 000000000020 /* align doubles to 2 word boundary */ #define MASK_SVR3_SHLIB 000000000040 /* Uninit locals into bss */ #define MASK_IEEE_FP 000000000100 /* IEEE fp comparisons */ *************** *** 78,81 **** --- 80,84 ---- #define MASK_NO_WIDE_MULTIPLY 000002000000 /* Disable 32x32->64 multiplies */ #define MASK_NO_MOVE 000004000000 /* Don't generate mem->mem */ + #define MASK_DEBUG_ARG 000010000000 /* Debug function_arg */ /* Use the floating point instructions */ *************** *** 87,95 **** #define TARGET_RTD (target_flags & MASK_RTD) ! /* Compile passing first two args in regs 0 and 1. ! This exists only to test compiler features that will ! be needed for RISC chips. It is not usable ! and is not intended to be usable on this cpu. */ ! #define TARGET_REGPARM (target_flags & MASK_RTD) /* Put uninitialized locals into bss, not data. --- 90,97 ---- #define TARGET_RTD (target_flags & MASK_RTD) ! /* Align doubles to a two word boundary. This breaks compatibility with ! the published ABI's for structures containing doubles, but produces ! faster code on the pentium. */ ! #define TARGET_ALIGN_DOUBLE (target_flags & MASK_ALIGN_DOUBLE) /* Put uninitialized locals into bss, not data. *************** *** 121,124 **** --- 123,129 ---- #define TARGET_DEBUG_ADDR (target_flags & MASK_DEBUG_ADDR) + /* Debug FUNCTION_ARG macros */ + #define TARGET_DEBUG_ARG (target_flags & MASK_DEBUG_ARG) + /* Hack macros for tuning code generation */ #define TARGET_MOVE ((target_flags & MASK_NO_MOVE) == 0) /* Don't generate memory->memory */ *************** *** 140,145 **** { "rtd", MASK_RTD }, \ { "no-rtd", -MASK_RTD }, \ ! { "regparm", MASK_REGPARM }, \ ! { "no-regparm", -MASK_REGPARM }, \ { "svr3-shlib", MASK_SVR3_SHLIB }, \ { "no-svr3-shlib", -MASK_SVR3_SHLIB }, \ --- 145,150 ---- { "rtd", MASK_RTD }, \ { "no-rtd", -MASK_RTD }, \ ! { "align-double", MASK_ALIGN_DOUBLE }, \ ! { "no-align-double", -MASK_ALIGN_DOUBLE }, \ { "svr3-shlib", MASK_SVR3_SHLIB }, \ { "no-svr3-shlib", -MASK_SVR3_SHLIB }, \ *************** *** 156,159 **** --- 161,166 ---- { "move", -MASK_NO_MOVE }, \ { "no-move", MASK_NO_MOVE }, \ + { "debug-arg", MASK_DEBUG_ARG }, \ + { "no-debug-arg", -MASK_DEBUG_ARG }, \ SUBTARGET_SWITCHES \ { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT}} *************** *** 169,174 **** by appending `-m' to the specified name. */ #define TARGET_OPTIONS \ ! { { "reg-alloc=", &i386_reg_alloc_order }, \ ! SUBTARGET_OPTIONS } /* Sometimes certain combinations of command options do not make --- 176,186 ---- by appending `-m' to the specified name. */ #define TARGET_OPTIONS \ ! { { "reg-alloc=", &i386_reg_alloc_order }, \ ! { "regparm=", &i386_regparm_string }, \ ! { "align-loops=", &i386_align_loops_string }, \ ! { "align-jumps=", &i386_align_jumps_string }, \ ! { "align-functions=", &i386_align_funcs_string }, \ ! SUBTARGET_OPTIONS \ ! } /* Sometimes certain combinations of command options do not make *************** *** 238,242 **** For i486, we get better performance by aligning to a cache line (i.e. 16 byte) boundary. */ ! #define FUNCTION_BOUNDARY (TARGET_486 ? 128 : 32) /* Alignment of field after `int : 0' in a structure. */ --- 250,254 ---- For i486, we get better performance by aligning to a cache line (i.e. 16 byte) boundary. */ ! #define FUNCTION_BOUNDARY (1 << (i386_align_funcs + 3)) /* Alignment of field after `int : 0' in a structure. */ *************** *** 248,253 **** might need to be aligned. No data type wants to be aligned rounder than this. The i386 supports 64-bit floating point ! quantities, but these can be aligned on any 32-bit boundary. */ ! #define BIGGEST_ALIGNMENT 32 /* Set this non-zero if move instructions will actually fail to work --- 260,268 ---- might need to be aligned. No data type wants to be aligned rounder than this. The i386 supports 64-bit floating point ! quantities, but these can be aligned on any 32-bit boundary. ! The published ABIs say that doubles should be aligned on word ! boundaries, but the Pentium gets better performance with them ! aligned on 64 bit boundaries. */ ! #define BIGGEST_ALIGNMENT (TARGET_ALIGN_DOUBLE ? 64 : 32) /* Set this non-zero if move instructions will actually fail to work *************** *** 260,272 **** #define PCC_BITFIELD_TYPE_MATTERS 1 /* Align loop starts for optimal branching. */ ! #define ASM_OUTPUT_LOOP_ALIGN(FILE) \ ! ASM_OUTPUT_ALIGN (FILE, 2) /* This is how to align an instruction for optimal branching. On i486 we'll get better performance by aligning on a cache line (i.e. 16 byte) boundary. */ ! #define ASM_OUTPUT_ALIGN_CODE(FILE) \ ! ASM_OUTPUT_ALIGN ((FILE), (TARGET_486 ? 4 : 2)) /* Standard register usage. */ --- 275,289 ---- #define PCC_BITFIELD_TYPE_MATTERS 1 + /* Maximum power of 2 that code can be aligned to. */ + #define MAX_CODE_ALIGN 6 /* 64 byte alignment */ + /* Align loop starts for optimal branching. */ ! #define ASM_OUTPUT_LOOP_ALIGN(FILE) ASM_OUTPUT_ALIGN (FILE, i386_align_loops) /* This is how to align an instruction for optimal branching. On i486 we'll get better performance by aligning on a cache line (i.e. 16 byte) boundary. */ ! #define ASM_OUTPUT_ALIGN_CODE(FILE) ASM_OUTPUT_ALIGN ((FILE), i386_align_jumps) ! /* Standard register usage. */ *************** *** 702,706 **** should be used. Only define this macro to some other expression if pseudo allocated by `local-alloc.c' end up in memory because ! their hard registers were needed for spill regisers. If this macro returns nonzero for those classes, those pseudos will only be allocated by `global.c', which knows how to reallocate the --- 719,723 ---- should be used. Only define this macro to some other expression if pseudo allocated by `local-alloc.c' end up in memory because ! their hard registers were needed for spill registers. If this macro returns nonzero for those classes, those pseudos will only be allocated by `global.c', which knows how to reallocate the *************** *** 751,754 **** --- 768,772 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 761,773 **** Use of RTD is a selectable option, since it is incompatible with standard Unix calling sequences. If the option is not selected, ! the caller must always pop the args. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ ! (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ ! : (TARGET_RTD \ ! && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ ! || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ ! == void_type_node))) ? (SIZE) \ ! : (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) /* Define how to find the value returned by a function. --- 779,788 ---- Use of RTD is a selectable option, since it is incompatible with standard Unix calling sequences. If the option is not selected, ! the caller must always pop the args. ! ! The attribute stdcall is equivalent to RTD on a per module basis. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ! (i386_return_pops_args (FUNDECL, FUNTYPE, SIZE)) /* Define how to find the value returned by a function. *************** *** 791,800 **** #define APPLY_RESULT_SIZE (8+108) ! /* 1 if N is a possible register number for function argument passing. ! On the 80386, no registers are used in this way. ! *NOTE* -mregparm does not work. ! It exists only to test register calling conventions. */ ! ! #define FUNCTION_ARG_REGNO_P(N) 0 /* Define a data type for recording info about an argument list --- 806,811 ---- #define APPLY_RESULT_SIZE (8+108) ! /* 1 if N is a possible register number for function argument passing. */ ! #define FUNCTION_ARG_REGNO_P(N) ((N) >= 0 && (N) < REGPARM_MAX) /* Define a data type for recording info about an argument list *************** *** 802,820 **** 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 the 80386, this is a single integer, which is a number of bytes ! of arguments scanned so far. */ - #define CUMULATIVE_ARGS int - /* 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. ! ! On the 80386, the offset starts at 0. */ #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \ ! ((CUM) = 0) /* Update the data in CUM to advance over an argument --- 813,830 ---- 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. */ ! typedef struct i386_args { ! int words; /* # words passed so far */ ! int nregs; /* # registers available for passing */ ! int regno; /* next available register number */ ! } CUMULATIVE_ARGS; /* 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,LIBNAME) \ ! (init_cumulative_args (&CUM, FNTYPE, LIBNAME)) /* Update the data in CUM to advance over an argument *************** *** 823,829 **** #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! ((CUM) += ((MODE) != BLKmode \ ! ? (GET_MODE_SIZE (MODE) + 3) & ~3 \ ! : (int_size_in_bytes (TYPE) + 3) & ~3)) /* Define where to put the arguments to a function. --- 833,837 ---- #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! (function_arg_advance (&CUM, MODE, TYPE, NAMED)) /* Define where to put the arguments to a function. *************** *** 840,851 **** (otherwise it is an extra parameter matching an ellipsis). */ - - /* On the 80386 all args are pushed, except if -mregparm is specified - then the first two words of arguments are passed in EAX, EDX. - *NOTE* -mregparm does not work. - It exists only to test register calling conventions. */ - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! ((TARGET_REGPARM && (CUM) < 8) ? gen_rtx (REG, (MODE), (CUM) / 4) : 0) /* For an arg passed partly in registers and partly in memory, --- 848,853 ---- (otherwise it is an extra parameter matching an ellipsis). */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! (function_arg (&CUM, MODE, TYPE, NAMED)) /* For an arg passed partly in registers and partly in memory, *************** *** 853,863 **** For args passed entirely in registers or entirely in memory, zero. */ - #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! ((TARGET_REGPARM && (CUM) < 8 \ ! && 8 < ((CUM) + ((MODE) == BLKmode \ ! ? int_size_in_bytes (TYPE) \ ! : GET_MODE_SIZE (MODE)))) \ ! ? 2 - (CUM) / 4 : 0) /* This macro generates the assembly code for function entry. --- 855,860 ---- For args passed entirely in registers or entirely in memory, zero. */ #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED)) /* This macro generates the assembly code for function entry. *************** *** 1313,1316 **** --- 1310,1348 ---- + /* If defined, a C expression whose value is nonzero if IDENTIFIER + with arguments ARGS is a valid machine specific attribute for DECL. + The attributes in ATTRIBUTES have previously been assigned to DECL. */ + + #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \ + (i386_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS)) + + /* If defined, a C expression whose value is nonzero if IDENTIFIER + with arguments ARGS is a valid machine specific attribute for TYPE. + The attributes in ATTRIBUTES have previously been assigned to TYPE. */ + + #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, NAME, ARGS) \ + (i386_valid_type_attribute_p (TYPE, ATTRIBUTES, NAME, ARGS)) + + /* If defined, a C expression whose value is zero if the attributes on + TYPE1 and TYPE2 are incompatible, one if they are compatible, and + two if they are nearly compatible (which causes a warning to be + generated). */ + + #define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \ + (i386_comp_type_attributes (TYPE1, TYPE2)) + + /* If defined, a C statement that assigns default attributes to newly + defined TYPE. */ + + /* #define SET_DEFAULT_TYPE_ATTRIBUTES (TYPE) */ + + /* Max number of args passed in registers. If this is more than 3, we will + have problems with ebx (register #4), since it is a caller save register and + is also used as the pic register in ELF. So for now, don't allow more than + 3 registers to be passed in registers. */ + + #define REGPARM_MAX 3 + + /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ *************** *** 1383,1387 **** shouldn't be put through pseudo regs where they can be cse'd. Desirable on the 386 because a CALL with a constant address is ! not much slower than one with a register address. */ #define NO_FUNCTION_CSE --- 1415,1420 ---- shouldn't be put through pseudo regs where they can be cse'd. Desirable on the 386 because a CALL with a constant address is ! not much slower than one with a register address. On a 486, ! it is faster to call with a constant address than indirect. */ #define NO_FUNCTION_CSE *************** *** 1389,1404 **** switch on CODE. */ ! #define RTX_COSTS(X,CODE,OUTER_CODE) \ ! case MULT: \ ! return COSTS_N_INSNS (10); \ ! case DIV: \ ! case UDIV: \ ! case MOD: \ ! case UMOD: \ ! return COSTS_N_INSNS (40); \ ! case PLUS: \ ! if (GET_CODE (XEXP (X, 0)) == REG \ ! && GET_CODE (XEXP (X, 1)) == CONST_INT) \ ! return 1; \ break; --- 1422,1446 ---- switch on CODE. */ ! #define RTX_COSTS(X,CODE,OUTER_CODE) \ ! case MULT: \ ! return COSTS_N_INSNS (20); \ ! case DIV: \ ! case UDIV: \ ! case MOD: \ ! case UMOD: \ ! return COSTS_N_INSNS (20); \ ! case ASHIFTRT: \ ! case LSHIFTRT: \ ! case ASHIFT: \ ! return (4 + rtx_cost (XEXP (X, 0), OUTER_CODE) \ ! + rtx_cost (XEXP (X, 1), OUTER_CODE)); \ ! case PLUS: \ ! if (GET_CODE (XEXP (X, 0)) == MULT \ ! && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \ ! && (INTVAL (XEXP (XEXP (X, 0), 1)) == 2 \ ! || INTVAL (XEXP (XEXP (X, 0), 1)) == 4 \ ! || INTVAL (XEXP (XEXP (X, 0), 1)) == 8)) \ ! return (2 + rtx_cost (XEXP (XEXP (X, 0), 0), OUTER_CODE) \ ! + rtx_cost (XEXP (X, 1), OUTER_CODE)); \ break; *************** *** 1818,1821 **** --- 1860,1871 ---- extern void override_options (); extern void order_regs_for_local_alloc (); + extern int i386_valid_decl_attribute_p (); + extern int i386_valid_type_attribute_p (); + extern int i386_return_pops_args (); + extern int i386_comp_type_attributes (); + extern void init_cumulative_args (); + extern void function_arg_advance (); + extern struct rtx_def *function_arg (); + extern int function_arg_partial_nregs (); extern void output_op_from_reg (); extern void output_to_reg (); *************** *** 1855,1858 **** --- 1905,1916 ---- /* Variables in i386.c */ extern char *i386_reg_alloc_order; /* register allocation order */ + extern char *i386_regparm_string; /* # registers to use to pass args */ + extern char *i386_align_loops_string; /* power of two alignment for loops */ + extern char *i386_align_jumps_string; /* power of two alignment for non-loop jumps */ + extern char *i386_align_funcs_string; /* power of two alignment for functions */ + extern int i386_regparm; /* i386_regparm_string as a number */ + extern int i386_align_loops; /* power of two alignment for loops */ + extern int i386_align_jumps; /* power of two alignment for non-loop jumps */ + extern int i386_align_funcs; /* power of two alignment for functions */ extern char *hi_reg_name[]; /* names for 16 bit regs */ extern char *qi_reg_name[]; /* names for 8 bit regs (low) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/i386.md gcc-2.7.0/config/i386/i386.md *** gcc-2.6.3/config/i386/i386.md Mon Oct 31 16:16:33 1994 --- gcc-2.7.0/config/i386/i386.md Thu Jun 15 16:51:33 1995 *************** *** 1,4 **** ;; GCC machine description for Intel X86. ! ;; Copyright (C) 1988, 1994 Free Software Foundation, Inc. ;; Mostly by William Schelter. --- 1,4 ---- ;; GCC machine description for Intel X86. ! ;; Copyright (C) 1988, 1994, 1995 Free Software Foundation, Inc. ;; Mostly by William Schelter. *************** *** 17,21 **** ;; 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. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 39,42 **** --- 40,45 ---- ;; 'S' Print the opcode suffix for a 32-bit float opcode. ;; 'Q' Print the opcode suffix for a 64-bit float opcode. + ;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode. + ;; 'J' Print the appropriate jump operand. ;; 'b' Print the QImode name of the register for the indicated operand. *************** *** 46,50 **** ;; 'h' Print the QImode name for a "high" register, either ah, bh, ch or dh. ;; 'y' Print "st(0)" instead of "st" as a register. - ;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode. ;; UNSPEC usage: --- 49,52 ---- *************** *** 2383,2387 **** (plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,o,riF,o,or,riF,riF,o") (match_operand:DI 2 "general_operand" "o,riF,o,0,0,0,oriF,riF,o,o"))) ! (clobber (match_scratch:SI 3 "=X,X,&r,X,X,&r,X,X,&r,&r"))] "" "* --- 2385,2389 ---- (plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,o,riF,o,or,riF,riF,o") (match_operand:DI 2 "general_operand" "o,riF,o,0,0,0,oriF,riF,o,o"))) ! (clobber (match_scratch:SI 3 "=X,X,&r,X,&r,&r,X,&r,&r,&r"))] "" "* *************** *** 2406,2410 **** xops[3] = low[1]; ! if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) { output_asm_insn (AS2 (mov%L1,%3,%1), xops); --- 2408,2412 ---- xops[3] = low[1]; ! if (GET_CODE (operands[0]) != MEM) { output_asm_insn (AS2 (mov%L1,%3,%1), xops); *************** *** 2634,2638 **** (minus:DI (match_operand:DI 1 "general_operand" "0,0,roiF,riF,o") (match_operand:DI 2 "general_operand" "o,riF,roiF,riF,o"))) ! (clobber (match_scratch:SI 3 "=X,X,X,X,&r"))] "" "* --- 2636,2640 ---- (minus:DI (match_operand:DI 1 "general_operand" "0,0,roiF,riF,o") (match_operand:DI 2 "general_operand" "o,riF,roiF,riF,o"))) ! (clobber (match_scratch:SI 3 "=X,X,X,&r,&r"))] "" "* *************** *** 2651,2655 **** xops[3] = low[1]; ! if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) { output_asm_insn (AS2 (mov%L1,%3,%1), xops); --- 2653,2657 ---- xops[3] = low[1]; ! if (GET_CODE (operands[0]) != MEM) { output_asm_insn (AS2 (mov%L1,%3,%1), xops); *************** *** 3490,3493 **** --- 3492,3502 ---- "fsin") + (define_insn "sinxf2" + [(set (match_operand:XF 0 "register_operand" "=f") + (unspec:XF [(match_operand:XF 1 "register_operand" "0")] 1))] + "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 + && (TARGET_IEEE_FP || flag_fast_math) " + "fsin") + (define_insn "cosdf2" [(set (match_operand:DF 0 "register_operand" "=f") *************** *** 3511,3514 **** --- 3520,3530 ---- && (TARGET_IEEE_FP || flag_fast_math) " "fcos") + + (define_insn "cosxf2" + [(set (match_operand:XF 0 "register_operand" "=f") + (unspec:XF [(match_operand:XF 1 "register_operand" "0")] 2))] + "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 + && (TARGET_IEEE_FP || flag_fast_math) " + "fcos") ;;- one complement instructions *************** *** 4895,4898 **** --- 4911,4981 ---- }") + (define_expand "decrement_and_branch_until_zero" + [(parallel [(set (pc) + (if_then_else (ge (plus:SI (match_operand:SI 0 "general_operand" "") + (const_int -1)) + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int -1)))])] + "" + "") + + (define_insn "" + [(set (pc) + (if_then_else (match_operator 0 "comparison_operator" + [(plus:SI (match_operand:SI 1 "general_operand" "+r,m") + (match_operand:SI 2 "general_operand" "rmi,ri")) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc))) + (set (match_dup 1) + (plus:SI (match_dup 1) + (match_dup 2)))] + "" + "* + { + CC_STATUS_INIT; + if (operands[2] == constm1_rtx) + output_asm_insn (AS1 (dec%L1,%1), operands); + + else if (operands[1] == const1_rtx) + output_asm_insn (AS1 (inc%L1,%1), operands); + + else + output_asm_insn (AS2 (add%L1,%2,%1), operands); + + return AS1 (%J0,%l3); + }") + + (define_insn "" + [(set (pc) + (if_then_else (match_operator 0 "comparison_operator" + [(minus:SI (match_operand:SI 1 "general_operand" "+r,m") + (match_operand:SI 2 "general_operand" "rmi,ri")) + (const_int 0)]) + (label_ref (match_operand 3 "" "")) + (pc))) + (set (match_dup 1) + (minus:SI (match_dup 1) + (match_dup 2)))] + "" + "* + { + CC_STATUS_INIT; + if (operands[2] == const1_rtx) + output_asm_insn (AS1 (dec%L1,%1), operands); + + else if (operands[1] == constm1_rtx) + output_asm_insn (AS1 (inc%L1,%1), operands); + + else + output_asm_insn (AS2 (sub%L1,%2,%1), operands); + + return AS1 (%J0,%l3); + }") + ;; Implement switch statements when generating PIC code. Switches are ;; implemented by `tablejump' when not using -fpic. *************** *** 5223,5227 **** int i; ! emit_call_insn (gen_call (operands[0], const0_rtx, NULL, const0_rtx)); for (i = 0; i < XVECLEN (operands[2], 0); i++) --- 5306,5317 ---- int i; ! /* In order to give reg-stack an easier job in validating two ! coprocessor registers as containing a possible return value, ! simply pretend the untyped call returns a complex long double ! value. */ ! emit_call_insn (TARGET_80387 ! ? gen_call_value (gen_rtx (REG, XCmode, FIRST_FLOAT_REG), ! operands[0], const0_rtx) ! : gen_call (operands[0], const0_rtx)); for (i = 0; i < XVECLEN (operands[2], 0); i++) *************** *** 5440,5443 **** --- 5530,5537 ---- "operands[2] = gen_reg_rtx (SImode);") + ;; Note, you cannot optimize away the branch following the bsfl by assuming + ;; that the destination is not modified if the input is 0, since not all + ;; x86 implementations do this. + (define_insn "" [(set (match_operand:SI 0 "general_operand" "=&r") *************** *** 5454,5458 **** xops[1] = operands[1]; xops[2] = constm1_rtx; - /* Can there be a way to avoid the jump here? */ output_asm_insn (AS2 (bsf%L0,%1,%0), xops); #ifdef LOCAL_LABEL_PREFIX --- 5548,5551 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/isc.h gcc-2.7.0/config/i386/isc.h *** gcc-2.6.3/config/i386/isc.h Wed Oct 20 01:09:26 1993 --- gcc-2.7.0/config/i386/isc.h Mon May 29 12:38:21 1995 *************** *** 7,13 **** #define STARTFILE_SPEC \ "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ ! %{!posix:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\ ! %{p:-L/lib/libp} %{pg:-L/lib/libp}}}\ ! %{shlib:%{posix:crtp1.o%s}%{!posix:crt1.o%s}} crtbegin.o%s" #define ENDFILE_SPEC "crtend.o%s crtn.o%s" --- 7,15 ---- #define STARTFILE_SPEC \ "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ ! %{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ ! %{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\ ! %{p:-L/lib/libp} %{pg:-L/lib/libp}}}}\ ! %{shlib:%{Xp:crtp1.o%s}%{posix:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}\ ! crtbegin.o%s" #define ENDFILE_SPEC "crtend.o%s crtn.o%s" *************** *** 15,20 **** /* Library spec */ #undef LIB_SPEC ! #define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} -lc -lg" /* ISC 2.2 uses `char' for `wchar_t'. */ #undef WCHAR_TYPE --- 17,25 ---- /* Library spec */ #undef LIB_SPEC ! #define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg" + #undef CPP_SPEC + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}" + /* ISC 2.2 uses `char' for `wchar_t'. */ #undef WCHAR_TYPE *************** *** 32,36 **** #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ --- 37,41 ---- #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ *************** *** 61,62 **** --- 66,89 ---- #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE 64 + + /* The ISC assembler does not like a .file directive with a name + longer than 14 characters. Truncating it will not permit + debugging to work properly, but at least we won't get an error + message. */ + + #undef ASM_FILE_START + #define ASM_FILE_START(FILE) \ + do { \ + char c; \ + int max = 0; \ + char *string = dump_base_name; \ + \ + fputs ("\t.file\t\"", FILE); \ + \ + while ((c = *string++) != 0 && max++ < 14) { \ + if (c == '\"' || c == '\\') \ + putc ('\\', FILE); \ + putc (c, FILE); \ + } \ + fputs ("\"\n", FILE); \ + } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/iscdbx.h gcc-2.7.0/config/i386/iscdbx.h *** gcc-2.6.3/config/i386/iscdbx.h Tue Sep 21 23:42:28 1993 --- gcc-2.7.0/config/i386/iscdbx.h Thu Jun 15 09:46:50 1995 *************** *** 18,22 **** 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. */ /* Mostly it's like AT&T Unix System V with dbx-in-coff. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Mostly it's like AT&T Unix System V with dbx-in-coff. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/linux-aout.h gcc-2.7.0/config/i386/linux-aout.h *** gcc-2.6.3/config/i386/linux-aout.h --- gcc-2.7.0/config/i386/linux-aout.h Thu Jun 15 09:47:16 1995 *************** *** 0 **** --- 1,76 ---- + /* Definitions for Intel 386 running Linux + Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + Contributed by H.J. Lu (hjl@nynexst.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is tested by i386/gas.h. */ + #define YES_UNDERSCORES + + #include + #include /* some common stuff */ + + /* Specify predefined symbols in preprocessor. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)" + + #undef CPP_SPEC + #if TARGET_CPU_DEFAULT == 2 + #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}" + #else + #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}" + #endif + + #undef SIZE_TYPE + #define SIZE_TYPE "unsigned int" + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "int" + + #undef WCHAR_TYPE + #define WCHAR_TYPE "long int" + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE BITS_PER_WORD + + /* Don't default to pcc-struct-return, because gcc is the only compiler, + and we want to retain compatibility with older gcc versions. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 + + #undef LIB_SPEC + + #if 1 + /* We no longer link with libc_p.a or libg.a by default. If you + * want to profile or debug the Linux C library, please add + * -lc_p or -ggdb to LDFLAGS at the link time, respectively. + */ + #define LIB_SPEC \ + "%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}" + #else + #define LIB_SPEC \ + "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ + %{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}" + #endif + + + #undef LINK_SPEC + #define LINK_SPEC "-m i386linux" + + /* Get perform_* macros to build libgcc.a. */ + #include "i386/perform.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/linux-oldld.h gcc-2.7.0/config/i386/linux-oldld.h *** gcc-2.6.3/config/i386/linux-oldld.h --- gcc-2.7.0/config/i386/linux-oldld.h Thu Jun 15 09:47:32 1995 *************** *** 0 **** --- 1,76 ---- + /* Definitions for Intel 386 running Linux with pre-BFD a.out linkers + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Michael Meissner (meissner@cygnus.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is tested by i386/gas.h. */ + #define YES_UNDERSCORES + + #include + #include /* some common stuff */ + + /* Specify predefined symbols in preprocessor. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)" + + #undef CPP_SPEC + #if TARGET_CPU_DEFAULT == 2 + #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}" + #else + #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}" + #endif + + #undef SIZE_TYPE + #define SIZE_TYPE "unsigned int" + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "int" + + #undef WCHAR_TYPE + #define WCHAR_TYPE "long int" + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE BITS_PER_WORD + + /* Don't default to pcc-struct-return, because gcc is the only compiler, + and we want to retain compatibility with older gcc versions. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 + + #undef LIB_SPEC + + #if 1 + /* We no longer link with libc_p.a or libg.a by default. If you + * want to profile or debug the Linux C library, please add + * -lc_p or -ggdb to LDFLAGS at the link time, respectively. + */ + #define LIB_SPEC \ + "%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}" + #else + #define LIB_SPEC \ + "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ + %{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}" + #endif + + + #undef LINK_SPEC + #define LINK_SPEC "" + + /* Get perform_* macros to build libgcc.a. */ + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/linux.h gcc-2.7.0/config/i386/linux.h *** gcc-2.6.3/config/i386/linux.h Mon Oct 10 10:10:04 1994 --- gcc-2.7.0/config/i386/linux.h Thu Jun 15 09:47:44 1995 *************** *** 1,5 **** ! /* Definitions for Intel 386 running Linux ! Copyright (C) 1992, 1994 Free Software Foundation, Inc. ! Contributed by H.J. Lu (hjl@nynexst.com) This file is part of GNU CC. --- 1,6 ---- ! /* Definitions for Intel 386 running Linux with ELF format ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. ! Contributed by Eric Youngdale. ! Modified for stabs-in-ELF by H.J. Lu. This file is part of GNU CC. *************** *** 17,111 **** 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. */ ! #if 0 /* The FSF has fixed the known bugs. But ....... */ ! /* Linux has a hacked gas 1.38.1, which can handle repz, repnz ! and fildll. */ - #define GOOD_GAS - #endif - - /* Don't assume anything about the header files. */ - #define NO_IMPLICIT_EXTERN_C - - /* This is tested by i386/gas.h. */ - #define YES_UNDERSCORES - - #ifndef LINUX_ELF - #include "i386/gstabs.h" - #endif - - /* Specify predefined symbols in preprocessor. */ - - #undef CPP_PREDEFINES - #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)" - - #undef CPP_SPEC - #if TARGET_CPU_DEFAULT == 2 - #define CPP_SPEC "%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}" - #else - #define CPP_SPEC "%{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}" - #endif - #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" ! #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" ! #undef WCHAR_TYPE #define WCHAR_TYPE "long int" ! #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD ! ! #undef HAVE_ATEXIT ! #define HAVE_ATEXIT ! ! /* Linux uses ctype from glibc.a. I am not sure how complete it is. ! For now, we play safe. It may change later. */ ! #if 0 ! #undef MULTIBYTE_CHARS ! #define MULTIBYTE_CHARS 1 #endif ! #undef LIB_SPEC #define LIB_SPEC \ ! "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ ! %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}" ! ! #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}" ! ! ! /* There are conflicting reports about whether this system uses ! a different assembler syntax. wilson@cygnus.com says # is right. */ ! #undef COMMENT_BEGIN ! #define COMMENT_BEGIN "#" ! ! #undef ASM_APP_ON ! #define ASM_APP_ON "#APP\n" ! ! #undef ASM_APP_OFF ! #define ASM_APP_OFF "#NO_APP\n" ! ! /* Don't default to pcc-struct-return, because gcc is the only compiler, and ! we want to retain compatibility with older gcc versions. */ ! #ifndef LINUX_ELF ! #define DEFAULT_PCC_STRUCT_RETURN 0 #endif ! /* We need that too. */ ! #define HANDLE_SYSV_PRAGMA ! ! #undef LINK_SPEC ! ! /* We want to pass -v to linker */ ! #if TARGET_CPU_DEFAULT == 2 ! #define LINK_SPEC "%{v:-dll-verbose} %{!m386:-m486}" #else ! #define LINK_SPEC "%{v:-dll-verbose} %{m486:-m486}" #endif --- 18,210 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #define LINUX_DEFAULT_ELF ! /* A lie, I guess, but the general idea behind linux/ELF is that we are ! supposed to be outputting something that will assemble under SVr4. ! This gets us pretty close. */ ! #include /* Base i386 target machine definitions */ ! #include /* Use the i386 AT&T assembler syntax */ ! #include /* some common stuff */ ! ! #undef TARGET_VERSION ! #define TARGET_VERSION fprintf (stderr, " (i386 Linux/ELF)"); ! ! /* The svr4 ABI for the i386 says that records and unions are returned ! in memory. */ ! #undef DEFAULT_PCC_STRUCT_RETURN ! #define DEFAULT_PCC_STRUCT_RETURN 1 ! ! /* This is how to output an element of a case-vector that is relative. ! This is only used for PIC code. See comments by the `casesi' insn in ! i386.md for an explanation of the expression this outputs. */ ! #undef ASM_OUTPUT_ADDR_DIFF_ELT ! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ ! fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) ! ! /* Indicate that jump tables go in the text section. This is ! necessary when compiling PIC code. */ ! #define JUMP_TABLES_IN_TEXT_SECTION ! ! /* Copy this from the svr4 specifications... */ ! /* Define the register numbers to be used in Dwarf debugging information. ! The SVR4 reference port C compiler uses the following register numbers ! in its Dwarf output code: ! 0 for %eax (gnu regno = 0) ! 1 for %ecx (gnu regno = 2) ! 2 for %edx (gnu regno = 1) ! 3 for %ebx (gnu regno = 3) ! 4 for %esp (gnu regno = 7) ! 5 for %ebp (gnu regno = 6) ! 6 for %esi (gnu regno = 4) ! 7 for %edi (gnu regno = 5) ! The following three DWARF register numbers are never generated by ! the SVR4 C compiler or by the GNU compilers, but SDB on x86/svr4 ! believes these numbers have these meanings. ! 8 for %eip (no gnu equivalent) ! 9 for %eflags (no gnu equivalent) ! 10 for %trapno (no gnu equivalent) ! It is not at all clear how we should number the FP stack registers ! for the x86 architecture. If the version of SDB on x86/svr4 were ! a bit less brain dead with respect to floating-point then we would ! have a precedent to follow with respect to DWARF register numbers ! for x86 FP registers, but the SDB on x86/svr4 is so completely ! broken with respect to FP registers that it is hardly worth thinking ! of it as something to strive for compatibility with. ! The version of x86/svr4 SDB I have at the moment does (partially) ! seem to believe that DWARF register number 11 is associated with ! the x86 register %st(0), but that's about all. Higher DWARF ! register numbers don't seem to be associated with anything in ! particular, and even for DWARF regno 11, SDB only seems to under- ! stand that it should say that a variable lives in %st(0) (when ! asked via an `=' command) if we said it was in DWARF regno 11, ! but SDB still prints garbage when asked for the value of the ! variable in question (via a `/' command). ! (Also note that the labels SDB prints for various FP stack regs ! when doing an `x' command are all wrong.) ! Note that these problems generally don't affect the native SVR4 ! C compiler because it doesn't allow the use of -O with -g and ! because when it is *not* optimizing, it allocates a memory ! location for each floating-point variable, and the memory ! location is what gets described in the DWARF AT_location ! attribute for the variable in question. ! Regardless of the severe mental illness of the x86/svr4 SDB, we ! do something sensible here and we use the following DWARF ! register numbers. Note that these are all stack-top-relative ! numbers. ! 11 for %st(0) (gnu regno = 8) ! 12 for %st(1) (gnu regno = 9) ! 13 for %st(2) (gnu regno = 10) ! 14 for %st(3) (gnu regno = 11) ! 15 for %st(4) (gnu regno = 12) ! 16 for %st(5) (gnu regno = 13) ! 17 for %st(6) (gnu regno = 14) ! 18 for %st(7) (gnu regno = 15) ! */ ! #undef DBX_REGISTER_NUMBER ! #define DBX_REGISTER_NUMBER(n) \ ! ((n) == 0 ? 0 \ ! : (n) == 1 ? 2 \ ! : (n) == 2 ? 1 \ ! : (n) == 3 ? 3 \ ! : (n) == 4 ? 6 \ ! : (n) == 5 ? 7 \ ! : (n) == 6 ? 5 \ ! : (n) == 7 ? 4 \ ! : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \ ! : (-1)) ! ! /* Output assembler code to FILE to increment profiler label # LABELNO ! for profiling a function entry. */ ! ! #undef FUNCTION_PROFILER ! #define FUNCTION_PROFILER(FILE, LABELNO) \ ! { \ ! if (flag_pic) \ ! { \ ! fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ ! LPREFIX, (LABELNO)); \ ! fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ ! } \ ! else \ ! { \ ! fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ ! fprintf (FILE, "\tcall mcount\n"); \ ! } \ ! } #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" ! #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" ! #undef WCHAR_TYPE #define WCHAR_TYPE "long int" ! #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)" ! #undef CPP_SPEC ! #if TARGET_CPU_DEFAULT == 2 ! #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}" ! #else ! #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}" #endif ! #undef LIB_SPEC ! #if 1 ! /* We no longer link with libc_p.a or libg.a by default. If you ! * want to profile or debug the Linux C library, please add ! * -lc_p or -ggdb to LDFLAGS at the link time, respectively. ! */ #define LIB_SPEC \ ! "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \ ! %{!ggdb:-lc} %{ggdb:-lg}}" ! #else ! #define LIB_SPEC \ ! "%{!shared: \ ! %{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ ! %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}" #endif ! /* Provide a LINK_SPEC appropriate for Linux. Here we provide support ! for the special GCC options -static and -shared, which allow us to ! link things in one of these three modes by applying the appropriate ! combinations of options at link-time. We like to support here for ! as many of the other GNU linker options as possible. But I don't ! have the time to search for those flags. I am sure how to add ! support for -soname shared_object_name. H.J. ! ! I took out %{v:%{!V:-V}}. It is too much :-(. They can use ! -Wl,-V. ! ! When the -shared link option is used a final link is not being ! done. */ ! ! /* If ELF is the default format, we should not use /lib/elf. */ ! ! #undef LINK_SPEC ! #ifndef LINUX_DEFAULT_ELF ! #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ ! %{!shared: \ ! %{!ibcs: \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /lib/elf/ld-linux.so.1} \ ! %{!rpath:-rpath /lib/elf/}} %{static:-static}}}" #else ! #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ ! %{!shared: \ ! %{!ibcs: \ ! %{!static: \ ! %{rdynamic:-export-dynamic} \ ! %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ ! %{static:-static}}}" #endif Only in gcc-2.6.3/config/i386: linuxelf.h diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/lynx-ng.h gcc-2.7.0/config/i386/lynx-ng.h *** gcc-2.6.3/config/i386/lynx-ng.h Fri Sep 23 16:11:28 1994 --- gcc-2.7.0/config/i386/lynx-ng.h Thu Jun 15 09:48:15 1995 *************** *** 1,4 **** /* Definitions for Intel 386 running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for Intel 386 running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,23 **** 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 "i386/gstabs.h" ! #include "lynx-ng.h" #undef CPP_PREDEFINES --- 16,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include ! #include #undef CPP_PREDEFINES diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/lynx.h gcc-2.7.0/config/i386/lynx.h *** gcc-2.6.3/config/i386/lynx.h Mon Jul 11 16:45:37 1994 --- gcc-2.7.0/config/i386/lynx.h Thu Jun 15 09:48:07 1995 *************** *** 1,4 **** /* Definitions for Intel 386 running LynxOS. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for Intel 386 running LynxOS. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,23 **** 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 "i386/gstabs.h" ! #include "lynx.h" #undef CPP_PREDEFINES --- 16,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include ! #include #undef CPP_PREDEFINES Only in gcc-2.6.3/config/i386: netbsd-i386.h diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/netbsd.h gcc-2.7.0/config/i386/netbsd.h *** gcc-2.6.3/config/i386/netbsd.h --- gcc-2.7.0/config/i386/netbsd.h Tue May 9 18:12:48 1995 *************** *** 0 **** --- 1,79 ---- + /* This goes away when the math-emulator is fixed */ + #define TARGET_CPU_DEFAULT 0400 /* TARGET_NO_FANCY_MATH_387 */ + + /* This is tested by i386gas.h. */ + #define YES_UNDERSCORES + + #include + + /* Get perform_* macros to build libgcc.a. */ + #include + + /* Get generic NetBSD definitions. */ + #include + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dunix -Di386 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)" + + #undef SIZE_TYPE + #define SIZE_TYPE "unsigned int" + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "int" + + #undef WCHAR_TYPE + #define WCHAR_TYPE "short unsigned int" + + #define WCHAR_UNSIGNED 1 + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 16 + + #define HANDLE_SYSV_PRAGMA + + /* There are conflicting reports about whether this system uses + a different assembler syntax. wilson@cygnus.com says # is right. */ + #undef COMMENT_BEGIN + #define COMMENT_BEGIN "#" + + #undef ASM_APP_ON + #define ASM_APP_ON "#APP\n" + + #undef ASM_APP_OFF + #define ASM_APP_OFF "#NO_APP\n" + + /* The following macros are stolen from i386v4.h */ + /* These have to be defined to get PIC code correct */ + + /* This is how to output an element of a case-vector that is relative. + This is only used for PIC code. See comments by the `casesi' insn in + i386.md for an explanation of the expression this outputs. */ + + #undef ASM_OUTPUT_ADDR_DIFF_ELT + #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ + fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) + + /* Indicate that jump tables go in the text section. This is + necessary when compiling PIC code. */ + + #define JUMP_TABLES_IN_TEXT_SECTION + + /* Don't default to pcc-struct-return, because gcc is the only compiler, and + we want to retain compatibility with older gcc versions. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 + + /* Profiling routines, partially copied from i386/osfrose.h. */ + + /* Redefine this to use %eax instead of %edx. */ + #undef FUNCTION_PROFILER + #define FUNCTION_PROFILER(FILE, LABELNO) \ + { \ + if (flag_pic) \ + { \ + fprintf (FILE, "\tcall mcount@PLT\n"); \ + } \ + else \ + { \ + fprintf (FILE, "\tcall mcount\n"); \ + } \ + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/next.h gcc-2.7.0/config/i386/next.h *** gcc-2.6.3/config/i386/next.h Sun Oct 3 19:50:28 1993 --- gcc-2.7.0/config/i386/next.h Thu Jun 15 09:48:32 1995 *************** *** 1,4 **** /* Target definitions for GNU compiler for Intel x86 CPU running NeXTSTEP ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Target definitions for GNU compiler for Intel x86 CPU running NeXTSTEP ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 "i386/gas.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/gas.h" *************** *** 215,219 **** #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE \ ? 0 \ --- 216,220 ---- #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE \ ? 0 \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/os2.h gcc-2.7.0/config/i386/os2.h *** gcc-2.6.3/config/i386/os2.h Tue Feb 22 07:30:51 1994 --- gcc-2.7.0/config/i386/os2.h Thu Jun 15 09:48:50 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler for an Intel i386 or later processor running OS/2 2.x. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Samuel Figueroa (figueroa@cs.nyu.edu) --- 1,5 ---- /* Definitions of target machine for GNU compiler for an Intel i386 or later processor running OS/2 2.x. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Samuel Figueroa (figueroa@cs.nyu.edu) *************** *** 18,22 **** 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. */ #ifndef DEFAULT_TARGET_MACHINE --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef DEFAULT_TARGET_MACHINE *************** *** 27,34 **** #endif #ifndef LIB_SPEC ! #define LIB_SPEC "libc" #endif #ifndef STARTFILE_SPEC ! #define STARTFILE_SPEC "" #endif #ifndef MD_EXEC_PREFIX --- 28,35 ---- #endif #ifndef LIB_SPEC ! #define LIB_SPEC "libgcc libc" #endif #ifndef STARTFILE_SPEC ! #define STARTFILE_SPEC "libcrt.lib" #endif #ifndef MD_EXEC_PREFIX *************** *** 55,59 **** #define PCC_BITFIELD_TYPE_MATTERS (maximum_field_alignment == 0) ! /* Define this macro if it is advisible to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared --- 56,60 ---- #define PCC_BITFIELD_TYPE_MATTERS (maximum_field_alignment == 0) ! /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/osfelf.h gcc-2.7.0/config/i386/osfelf.h *** gcc-2.6.3/config/i386/osfelf.h Tue Jul 12 10:54:57 1994 --- gcc-2.7.0/config/i386/osfelf.h Thu Jun 15 09:48:59 1995 *************** *** 17,21 **** 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 "config/i386/osfrose.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config/i386/osfrose.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/osfrose.h gcc-2.7.0/config/i386/osfrose.h *** gcc-2.6.3/config/i386/osfrose.h Wed Oct 26 17:14:11 1994 --- gcc-2.7.0/config/i386/osfrose.h Thu Jun 15 09:49:20 1995 *************** *** 17,21 **** 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 "halfpic.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "halfpic.h" *************** *** 95,99 **** #define HANDLE_SYSV_PRAGMA ! #define HANDLE_PRAGMA_WEAK TARGET_ELF /* Change default predefines. */ --- 96,100 ---- #define HANDLE_SYSV_PRAGMA ! #define SUPPORTS_WEAK TARGET_ELF /* Change default predefines. */ *************** *** 412,416 **** #define ASM_OUTPUT_ALIGN_CODE(STREAM) \ fprintf (STREAM, "\t.align\t%d\n", \ ! (TARGET_486 && TARGET_LARGE_ALIGN) ? 4 : 2) /* A C expression to output text to align the location counter in the --- 413,417 ---- #define ASM_OUTPUT_ALIGN_CODE(STREAM) \ fprintf (STREAM, "\t.align\t%d\n", \ ! (!TARGET_LARGE_ALIGN && i386_align_jumps > 2) ? 2 : i386_align_jumps) /* A C expression to output text to align the location counter in the *************** *** 423,427 **** #undef ASM_OUTPUT_LOOP_ALIGN #define ASM_OUTPUT_LOOP_ALIGN(STREAM) \ ! fprintf (STREAM, "\t.align\t2\n") /* A C statement to output to the stdio stream STREAM an assembler --- 424,428 ---- #undef ASM_OUTPUT_LOOP_ALIGN #define ASM_OUTPUT_LOOP_ALIGN(STREAM) \ ! fprintf (STREAM, "\t.align\t%d\n", i386_align_loops) /* A C statement to output to the stdio stream STREAM an assembler *************** *** 618,623 **** #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" - #define WEAK_ASM_OP ".weak" #define SET_ASM_OP ".set" /* The following macro defines the format used to output the second --- 619,629 ---- #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" #define SET_ASM_OP ".set" + + /* This is how we tell the assembler that a symbol is weak. */ + + #define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) /* The following macro defines the format used to output the second diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/perform.h gcc-2.7.0/config/i386/perform.h *** gcc-2.6.3/config/i386/perform.h Sat Nov 20 16:37:42 1993 --- gcc-2.7.0/config/i386/perform.h Thu Jun 15 09:49:39 1995 *************** *** 16,20 **** 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. */ /* Defines to be able to build libgcc.a with GCC. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Defines to be able to build libgcc.a with GCC. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sco.h gcc-2.7.0/config/i386/sco.h *** gcc-2.6.3/config/i386/sco.h Thu Feb 24 08:40:59 1994 --- gcc-2.7.0/config/i386/sco.h Thu Jun 15 09:49:55 1995 *************** *** 1,5 **** ! /* Definitions for Intel 386 running SCO Unix System V. */ /* Mostly it's like AT&T Unix System V. */ --- 1,22 ---- ! /* Definitions for Intel 386 running SCO Unix System V. ! Copyright (C) 1988, 1992, 1994, 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + /* Mostly it's like AT&T Unix System V. */ *************** *** 87,91 **** #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ --- 104,108 ---- #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sco4.h gcc-2.7.0/config/i386/sco4.h *** gcc-2.6.3/config/i386/sco4.h Sat Oct 1 20:41:10 1994 --- gcc-2.7.0/config/i386/sco4.h Thu Jun 15 09:50:08 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sco4dbx.h gcc-2.7.0/config/i386/sco4dbx.h *** gcc-2.6.3/config/i386/sco4dbx.h Sat Oct 2 04:18:50 1993 --- gcc-2.7.0/config/i386/sco4dbx.h Thu Jun 15 09:50:17 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/scodbx.h gcc-2.7.0/config/i386/scodbx.h *** gcc-2.6.3/config/i386/scodbx.h Thu Feb 24 08:41:04 1994 --- gcc-2.7.0/config/i386/scodbx.h Thu Jun 15 09:50:29 1995 *************** *** 1,5 **** /* Definitions for Intel 386 running SCO Unix System V, using dbx-in-coff encapsulation. ! Copyright (C) 1992 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for Intel 386 running SCO Unix System V, using dbx-in-coff encapsulation. ! Copyright (C) 1992, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,21 **** 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 "i386/svr3dbx.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/svr3dbx.h" *************** *** 74,78 **** #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ --- 75,79 ---- #undef RETURN_POPS_ARGS ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sequent.h gcc-2.7.0/config/i386/sequent.h *** gcc-2.6.3/config/i386/sequent.h Sat Apr 9 09:12:52 1994 --- gcc-2.7.0/config/i386/sequent.h Thu Jun 15 09:50:58 1995 *************** *** 16,20 **** 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 "i386/i386.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/i386.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sol2-c1.asm gcc-2.7.0/config/i386/sol2-c1.asm *** gcc-2.6.3/config/i386/sol2-c1.asm Fri Feb 5 18:47:47 1993 --- gcc-2.7.0/config/i386/sol2-c1.asm Thu Jun 15 09:51:23 1995 *************** *** 24,28 **** ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files --- 24,29 ---- ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 59 Temple Place - Suite 330, ! ! Boston, MA 02111-1307, USA. ! ! As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sol2-ci.asm gcc-2.7.0/config/i386/sol2-ci.asm *** gcc-2.6.3/config/i386/sol2-ci.asm Fri Feb 5 18:47:48 1993 --- gcc-2.7.0/config/i386/sol2-ci.asm Thu Jun 15 09:51:47 1995 *************** *** 24,28 **** ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files --- 24,29 ---- ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 59 Temple Place - Suite 330, ! ! Boston, MA 02111-1307, USA. ! ! As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sol2-cn.asm gcc-2.7.0/config/i386/sol2-cn.asm *** gcc-2.6.3/config/i386/sol2-cn.asm Fri Feb 5 18:47:48 1993 --- gcc-2.7.0/config/i386/sol2-cn.asm Thu Jun 15 09:52:14 1995 *************** *** 24,28 **** ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files --- 24,29 ---- ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 59 Temple Place - Suite 330, ! ! Boston, MA 02111-1307, USA. ! ! As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sol2.h gcc-2.7.0/config/i386/sol2.h *** gcc-2.6.3/config/i386/sol2.h Mon Jan 31 18:16:31 1994 --- gcc-2.7.0/config/i386/sol2.h Thu Jun 15 09:52:26 1995 *************** *** 18,22 **** 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 "i386/sysv4.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/sysv4.h" *************** *** 32,35 **** --- 33,37 ---- #define FORCE_INIT_SECTION_ALIGN do { asm (ALIGN_ASM_OP ## " 16"); } while (0) + #define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN /* Add "sun" to the list of symbols defined for SVR4. */ *************** *** 45,53 **** #undef LIB_SPEC #define LIB_SPEC \ ! "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \ ! %{!shared:%{!symbolic:-lc}} \ ! crtend.o%s \ ! %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}" /* This should be the same as in svr4.h, except with -R added. */ #undef LINK_SPEC --- 47,55 ---- #undef LIB_SPEC #define LIB_SPEC \ ! "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}" + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}" + /* This should be the same as in svr4.h, except with -R added. */ #undef LINK_SPEC *************** *** 56,61 **** %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy} \ ! %{symbolic:-Bsymbolic -G -dy} \ %{G:-G} \ %{YP,*} \ --- 58,63 ---- %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy -z text} \ ! %{symbolic:-Bsymbolic -G -dy -z text} \ %{G:-G} \ %{YP,*} \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sun.h gcc-2.7.0/config/i386/sun.h *** gcc-2.6.3/config/i386/sun.h Sat Oct 2 04:18:59 1993 --- gcc-2.7.0/config/i386/sun.h Thu Jun 15 09:52:44 1995 *************** *** 1,4 **** /* Definitions for Intel 386 running SunOS 4.0. ! Copyright (C) 1988 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for Intel 386 running SunOS 4.0. ! Copyright (C) 1988, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 40,44 **** /* Extra switches to give the assembler. */ ! #define ASM_SPEC "-i386" /* Specify predefined symbols in preprocessor. */ --- 41,45 ---- /* Extra switches to give the assembler. */ ! #define ASM_SPEC "%{R} -i386 %{keep-local-as-symbols:-L}" /* Specify predefined symbols in preprocessor. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sun386.h gcc-2.7.0/config/i386/sun386.h *** gcc-2.6.3/config/i386/sun386.h Mon Sep 27 20:10:46 1993 --- gcc-2.7.0/config/i386/sun386.h Thu Jun 15 09:53:01 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/svr3dbx.h gcc-2.7.0/config/i386/svr3dbx.h *** gcc-2.6.3/config/i386/svr3dbx.h Wed Sep 22 09:06:46 1993 --- gcc-2.7.0/config/i386/svr3dbx.h Thu Jun 15 09:53:16 1995 *************** *** 16,20 **** 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 "i386/svr3gas.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/svr3gas.h" *************** *** 49,53 **** #define ASM_OUTPUT_ALIGN_CODE(FILE) \ fprintf ((FILE), "\t.align %d,0x90\n", \ ! TARGET_486 ? 16 : 4); /* Use log of 16 or log of 4 as arg. */ /* Align start of loop at 4-byte boundary. */ --- 50,54 ---- #define ASM_OUTPUT_ALIGN_CODE(FILE) \ fprintf ((FILE), "\t.align %d,0x90\n", \ ! 1 << i386_align_jumps) /* Align start of loop at 4-byte boundary. */ *************** *** 55,59 **** #undef ASM_OUTPUT_LOOP_ALIGN #define ASM_OUTPUT_LOOP_ALIGN(FILE) \ ! fprintf ((FILE), "\t.align 4,0x90\n"); --- 56,60 ---- #undef ASM_OUTPUT_LOOP_ALIGN #define ASM_OUTPUT_LOOP_ALIGN(FILE) \ ! fprintf ((FILE), "\t.align %d,0x90\n", 1 << i386_align_loops); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/svr3gas.h gcc-2.7.0/config/i386/svr3gas.h *** gcc-2.6.3/config/i386/svr3gas.h Fri Mar 18 18:29:10 1994 --- gcc-2.7.0/config/i386/svr3gas.h Thu Jun 15 09:53:35 1995 *************** *** 16,20 **** 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 "i386/gas.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/gas.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sysv3.h gcc-2.7.0/config/i386/sysv3.h *** gcc-2.6.3/config/i386/sysv3.h Sat Oct 2 04:19:02 1993 --- gcc-2.7.0/config/i386/sysv3.h Thu Jun 15 09:53:53 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 54,57 **** --- 55,66 ---- #undef ASM_FILE_START_1 #define ASM_FILE_START_1(FILE) + + /* We want to be able to get DBX debugging information via -gstabs. */ + + #undef DBX_DEBUGGING_INFO + #define DBX_DEBUGGING_INFO + + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG /* longjmp may fail to restore the registers if called from the same diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/sysv4.h gcc-2.7.0/config/i386/sysv4.h *** gcc-2.6.3/config/i386/sysv4.h Wed Mar 23 13:13:19 1994 --- gcc-2.7.0/config/i386/sysv4.h Thu Jun 15 09:54:04 1995 *************** *** 18,22 **** 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 "i386/i386.h" /* Base i386 target machine definitions */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i386/i386.h" /* Base i386 target machine definitions */ *************** *** 134,138 **** of it as something to strive for compatibility with. ! The verison of x86/svr4 SDB I have at the moment does (partially) seem to believe that DWARF register number 11 is associated with the x86 register %st(0), but that's about all. Higher DWARF --- 135,139 ---- of it as something to strive for compatibility with. ! The version of x86/svr4 SDB I have at the moment does (partially) seem to believe that DWARF register number 11 is associated with the x86 register %st(0), but that's about all. Higher DWARF diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-crtpic gcc-2.7.0/config/i386/t-crtpic *** gcc-2.6.3/config/i386/t-crtpic --- gcc-2.7.0/config/i386/t-crtpic Mon Mar 13 18:09:52 1995 *************** *** 0 **** --- 1,9 ---- + # The pushl in CTOR initialization interferes with frame pointer elimination. + + # We need to use -fPIC when we are using gcc to compile the routines in + # crtstuff.c. This is only really needed when we are going to use gcc/g++ + # to produce a shared library, but since we don't know ahead of time when + # we will be doing that, we just always use -fPIC when compiling the + # routines in crtstuff.c. + + CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-crtstuff gcc-2.7.0/config/i386/t-crtstuff *** gcc-2.6.3/config/i386/t-crtstuff --- gcc-2.7.0/config/i386/t-crtstuff Sun Nov 20 06:54:38 1994 *************** *** 0 **** --- 1,2 ---- + # The pushl in CTOR initialization interferes with frame pointer elimination. + CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-i386bare gcc-2.7.0/config/i386/t-i386bare *** gcc-2.6.3/config/i386/t-i386bare --- gcc-2.7.0/config/i386/t-i386bare Sat Feb 18 12:14:35 1995 *************** *** 0 **** --- 1,3 ---- + # The i386 md has all of these taken care of, according to sef. + LIBGCC1 = + CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-next gcc-2.7.0/config/i386/t-next *** gcc-2.6.3/config/i386/t-next Thu Sep 9 16:02:25 1993 --- gcc-2.7.0/config/i386/t-next Thu Dec 22 12:15:38 1994 *************** *** 5,6 **** --- 5,9 ---- # Specify other dirs of system header files to be fixed. OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers + + # is sometimes in /usr/include/ansi/limits.h. + LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h -o -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ] diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-sol2 gcc-2.7.0/config/i386/t-sol2 *** gcc-2.6.3/config/i386/t-sol2 Sun Dec 12 07:46:52 1993 --- gcc-2.7.0/config/i386/t-sol2 Mon Mar 13 18:09:55 1995 *************** *** 23,24 **** --- 23,32 ---- sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s $(AS) -o crtn.o crtn.s + + # We need to use -fPIC when we are using gcc to compile the routines in + # crtstuff.c. This is only really needed when we are going to use gcc/g++ + # to produce a shared library, but since we don't know ahead of time when + # we will be doing that, we just always use -fPIC when compiling the + # routines in crtstuff.c. + + CRTSTUFF_T_CFLAGS = -fPIC diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-svr3dbx gcc-2.7.0/config/i386/t-svr3dbx *** gcc-2.6.3/config/i386/t-svr3dbx Wed Sep 22 09:09:58 1993 --- gcc-2.7.0/config/i386/t-svr3dbx Sun Nov 20 06:56:42 1994 *************** *** 1,6 **** # gas 1.38.1 supporting dbx-in-coff requires a link script. - EXTRA_PARTS=svr3.ifile svr3z.ifile - svr3.ifile: $(srcdir)/config/i386/svr3.ifile rm -f svr3.ifile; cp $(srcdir)/config/i386/svr3.ifile . --- 1,4 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-vsta gcc-2.7.0/config/i386/t-vsta *** gcc-2.6.3/config/i386/t-vsta --- gcc-2.7.0/config/i386/t-vsta Thu Nov 17 14:57:17 1994 *************** *** 0 **** --- 1,2 ---- + LIBGCC1 = libgcc1.null + CROSS_LIBGCC1 = libgcc1.null diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/t-winnt gcc-2.7.0/config/i386/t-winnt *** gcc-2.6.3/config/i386/t-winnt --- gcc-2.7.0/config/i386/t-winnt Fri Mar 31 08:40:08 1995 *************** *** 0 **** --- 1,2 ---- + winnt.o: $(srcdir)/config/i386/winnt.c + $(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/i386/winnt.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/unix.h gcc-2.7.0/config/i386/unix.h *** gcc-2.6.3/config/i386/unix.h Fri Sep 30 17:31:32 1994 --- gcc-2.7.0/config/i386/unix.h Thu Jun 15 09:54:19 1995 *************** *** 16,20 **** 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 defines the aspects of assembler syntax --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This file defines the aspects of assembler syntax diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/v3gas.h gcc-2.7.0/config/i386/v3gas.h *** gcc-2.6.3/config/i386/v3gas.h Wed Sep 22 09:10:26 1993 --- gcc-2.7.0/config/i386/v3gas.h Thu Jun 15 09:54:35 1995 *************** *** 1,4 **** /* Definitions for Intel 386 running system V, using gas. ! Copyright (C) 1992 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for Intel 386 running system V, using gas. ! Copyright (C) 1992, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,22 **** 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 "gas.h" /* Add stuff that normally comes from i386v.h */ --- 16,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include /* Add stuff that normally comes from i386v.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/vsta.h gcc-2.7.0/config/i386/vsta.h *** gcc-2.6.3/config/i386/vsta.h --- gcc-2.7.0/config/i386/vsta.h Thu Jun 15 09:54:50 1995 *************** *** 0 **** --- 1,78 ---- + /* Configuration for an i386 running VSTa micro-kernel. + Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Rob Savoye (rob@cygnus.com). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define YES_UNDERSCORES + + #include "i386/gas.h" + + #ifdef CPP_PREDEFINES + #undef CPP_PREDEFINES + #endif + #define CPP_PREDEFINES "-Dunix -Di386 -DVSTA \ + -Asystem(unix) -Asystem(vsta) -Acpu(i386) -Amachine(i386)" + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_ctor, in_dtor + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + CTOR_SECTION_FUNCTION \ + DTOR_SECTION_FUNCTION + + #define CTOR_SECTION_FUNCTION \ + void \ + ctor_section () \ + { \ + if (in_section != in_ctor) \ + { \ + fprintf (asm_out_file, "\t.section .ctor\n"); \ + in_section = in_ctor; \ + } \ + } + + #define DTOR_SECTION_FUNCTION \ + void \ + dtor_section () \ + { \ + if (in_section != in_dtor) \ + { \ + fprintf (asm_out_file, "\t.section .dtor\n"); \ + in_section = in_dtor; \ + } \ + } + + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctor_section (); \ + fprintf (FILE, "%s\t", ASM_LONG); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtor_section (); \ + fprintf (FILE, "%s\t", ASM_LONG); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/winnt.c gcc-2.7.0/config/i386/winnt.c *** gcc-2.6.3/config/i386/winnt.c --- gcc-2.7.0/config/i386/winnt.c Thu Jun 15 09:55:05 1995 *************** *** 0 **** --- 1,60 ---- + /* Subroutines for insn-output.c for Windows NT. + Contributed by Douglas Rupp (drupp@cs.washington.edu) + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + #include "config.h" + #include "rtl.h" + #include "regs.h" + #include "hard-reg-set.h" + #include "output.h" + #include "tree.h" + #include "flags.h" + + /* Return string which is the former assembler name modified with a + suffix consisting of an atsign (@) followed by the number of bytes of + arguments */ + + char * + gen_stdcall_suffix (decl) + tree decl; + { + int total = 0; + char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + char *newsym; + + if (TYPE_ARG_TYPES (TREE_TYPE (decl))) + if (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (decl)))) + == void_type_node) + { + tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl)); + + while (TREE_VALUE (formal_type) != void_type_node) + { + total += TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type))); + formal_type = TREE_CHAIN (formal_type); + } + } + + newsym = xmalloc (strlen (asmname) + 10); + sprintf (newsym, "%s@%d", asmname, total/BITS_PER_UNIT); + return IDENTIFIER_POINTER (get_identifier (newsym)); + } + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/winnt.h gcc-2.7.0/config/i386/winnt.h *** gcc-2.6.3/config/i386/winnt.h Fri Sep 30 17:20:32 1994 --- gcc-2.7.0/config/i386/winnt.h Thu Jun 15 09:55:16 1995 *************** *** 1,6 **** ! /* Definitions of target machine for GNU compiler ! for an Intel i386 or later processor running Windows NT 3.x. ! Copyright (C) 1994 Free Software Foundation, Inc. ! Contributed by Douglas B. Rupp (drupp@cs.washington.edu) This file is part of GNU CC. --- 1,6 ---- ! /* Operating system specific defines to be used when targeting GCC for ! Windows NT 3.x on an i386. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. ! Contributed by Douglas B. Rupp (drupp@cs.washington.edu). This file is part of GNU CC. *************** *** 18,31 **** 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. */ #define YES_UNDERSCORES #include "i386/gas.h" - #include "winnt/winnt.h" #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -Di386 -DWINNT -D_M_IX86 -D_X86_ -D__STDC__=0 \ ! -DALMOST_STDC -Asystem(unix) -Asystem(winnt) -Acpu(i386) -Amachine(i386)" #undef EXTRA_SECTIONS --- 18,45 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define YES_UNDERSCORES #include "i386/gas.h" + #ifdef CPP_PREDEFINES #undef CPP_PREDEFINES ! #endif ! #define CPP_PREDEFINES "-Dunix -Di386 -DWIN32 -D_WIN32 \ ! -DWINNT -D_M_IX86=300 -D_X86_=1 -D__STDC__=0 -DALMOST_STDC -D_MSC_VER=800 \ ! -D__stdcall=__attribute__((__stdcall__)) \ ! -D__cdecl=__attribute__((__cdecl__)) \ ! -Asystem(unix) -Asystem(winnt) -Acpu(i386) -Amachine(i386)" ! ! #define SIZE_TYPE "unsigned int" ! #define PTRDIFF_TYPE "int" ! #define WCHAR_UNSIGNED 1 ! #define WCHAR_TYPE_SIZE 16 ! #define WCHAR_TYPE "short unsigned int" ! #undef LONG_DOUBLE_TYPE_SIZE ! #define LONG_DOUBLE_TYPE_SIZE 64 ! #define HAVE_ATEXIT 1 #undef EXTRA_SECTIONS *************** *** 37,41 **** DTOR_SECTION_FUNCTION - #undef CTOR_SECTION_FUNCTION #define CTOR_SECTION_FUNCTION \ void \ --- 51,54 ---- *************** *** 49,53 **** } - #undef DTOR_SECTION_FUNCTION #define DTOR_SECTION_FUNCTION \ void \ --- 62,65 ---- *************** *** 61,65 **** } - #undef ASM_OUTPUT_CONSTRUCTOR #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { \ --- 73,76 ---- *************** *** 70,74 **** } while (0) - #undef ASM_OUTPUT_DESTRUCTOR #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ do { \ --- 81,84 ---- *************** *** 78,79 **** --- 88,152 ---- fprintf (FILE, "\n"); \ } while (0) + + /* Define this macro if references to a symbol must be treated + differently depending on something about the variable or + function named by the symbol (such as what section it is in). + + On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol + so that we may access it directly in the GOT. + + On i386 running Windows NT, modify the assembler name with a suffix + consisting of an atsign (@) followed by string of digits that represents + the number of bytes of arguments passed to the function, if it has the + attribute STDCALL. */ + + #ifdef ENCODE_SECTION_INFO + #undef ENCODE_SECTION_INFO + #define ENCODE_SECTION_INFO(DECL) \ + do \ + { \ + if (flag_pic) \ + { \ + rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ + ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ + SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ + = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ + || ! TREE_PUBLIC (DECL)); \ + } \ + if (TREE_CODE (DECL) == FUNCTION_DECL) \ + if (lookup_attribute ("stdcall", \ + TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \ + XEXP (DECL_RTL (DECL), 0) = \ + gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \ + } \ + while (0) + #endif + + /* The global __fltused is necessary to cause the printf/scanf routines + for outputting/inputting floating point numbers to be loaded. Since this + is kind of hard to detect, we just do it all the time. */ + + #ifdef ASM_FILE_START + #undef ASM_FILE_START + #endif + #define ASM_FILE_START(FILE) \ + do { fprintf (FILE, "\t.file\t"); \ + output_quoted_string (FILE, dump_base_name); \ + fprintf (FILE, "\n"); \ + fprintf (FILE, ".global\t__fltused\n"); \ + } while (0) + + /* if the switch "-mwindows" is passed to ld, then specify to the Microsoft + linker the proper switches and libraries to build a graphical program */ + + #undef LIB_SPEC + #define LIB_SPEC "%{mwindows:-subsystem:windows -entry:WinMainCRTStartup \ + USER32.LIB GDI32.LIB COMDLG32.LIB WINSPOOL.LIB} \ + %{!mwindows:-subsystem:console -entry:mainCRTStartup} \ + %{mcrtmt:OLDNAMES.LIB LIBCMT.LIB KERNEL32.LIB ADVAPI32.LIB} \ + %{!mcrtmt:OLDNAMES.LIB LIBC.LIB KERNEL32.LIB ADVAPI32.LIB} \ + %{g:-debugtype:coff -debug:full} \ + %{v}" + + #include "winnt/winnt.h" + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/x-isc3 gcc-2.7.0/config/i386/x-isc3 *** gcc-2.6.3/config/i386/x-isc3 Wed Sep 22 09:10:59 1993 --- gcc-2.7.0/config/i386/x-isc3 Mon May 29 12:38:18 1995 *************** *** 1,5 **** CLIB = -lPW # One person said it needs -DPOSIX_JC, but daa@CERF.NET says no. ! X_CFLAGS = -D_SYSV3 ENQUIRE_LDFLAGS = $(LDFLAGS) INSTALL_HEADERS_DIR = install-headers-cpio --- 1,5 ---- CLIB = -lPW # One person said it needs -DPOSIX_JC, but daa@CERF.NET says no. ! X_CFLAGS = -D_SYSV3 -Xp ENQUIRE_LDFLAGS = $(LDFLAGS) INSTALL_HEADERS_DIR = install-headers-cpio Only in gcc-2.6.3/config/i386: x-linux diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/x-vsta gcc-2.7.0/config/i386/x-vsta *** gcc-2.6.3/config/i386/x-vsta --- gcc-2.7.0/config/i386/x-vsta Thu Nov 17 14:57:19 1994 *************** *** 0 **** --- 1 ---- + CLIB=-lm diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/x-winnt gcc-2.7.0/config/i386/x-winnt *** gcc-2.6.3/config/i386/x-winnt Mon Nov 14 19:18:50 1994 --- gcc-2.7.0/config/i386/x-winnt Mon May 22 18:54:25 1995 *************** *** 1,15 **** RANLIB = : RANLIB_TEST = false ! CLIB = libc.lib kernel32.lib ! CC = cl -D_SYSV -DWINNT -D_M_IX86 -D_X86_ -D__STDC__=0 -DALMOST_STDC ! LDFLAGS = -align:0x1000 -subsystem:console -entry:mainCRTStartup \ ! -stack:1000000,1000000 ! EXTRA_PROGRAMS=ld-winnt ld.o: $(srcdir)/config/winnt/ld.c $(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/ld.c ! ld-winnt: ld.o ! $(CC) -o ld-winnt ld.o ! copy ld-winnt.exe ld.exe --- 1,35 ---- + STMP_FIXPROTO = + OTHER_FIXINCLUDES_DIRS=/MSTOOLS/h RANLIB = : RANLIB_TEST = false ! OLDCC = cl ! MAKE = make ! SHELL = sh ! SYMLINK = cp ! INSTALL = $(srcdir)/install.sh -c ! .SUFFIXES: .obj ! .c.obj: ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< ! .adb.obj: ! $(CC) -c $(ALL_ADAFLAGS) $< ! .ads.obj: ! $(CC) -c $(ALL_ADAFLAGS) $< ! exeext = .exe ! objext = .obj ! CC = gcc ! CLIB = ! LDFLAGS = ! ! EXTRA_PROGRAMS=ld.exe ld.o: $(srcdir)/config/winnt/ld.c $(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/ld.c ! ld.exe: ld.o ! $(CC) -o ld.exe ld.o ! ! LIB2FUNCS_EXTRA=${srcdir}/config/winnt/spawnv.c ! ! spawnv.o: $(srcdir)/config/winnt/spawnv.c ! $(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/winnt/spawnv.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-aix.h gcc-2.7.0/config/i386/xm-aix.h *** gcc-2.6.3/config/i386/xm-aix.h Sat Oct 30 12:10:37 1993 --- gcc-2.7.0/config/i386/xm-aix.h Thu Jun 15 09:55:34 1995 *************** *** 16,20 **** 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. */ #define USG --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define USG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-bsd386.h gcc-2.7.0/config/i386/xm-bsd386.h *** gcc-2.6.3/config/i386/xm-bsd386.h --- gcc-2.7.0/config/i386/xm-bsd386.h Sun Apr 2 08:19:39 1995 *************** *** 0 **** --- 1,6 ---- + /* Configuration for GCC for Intel i386 running BSDI's BSD/386 as host. */ + + #include "i386/xm-i386.h" + + #define HAVE_STRERROR + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-freebsd.h gcc-2.7.0/config/i386/xm-freebsd.h *** gcc-2.6.3/config/i386/xm-freebsd.h --- gcc-2.7.0/config/i386/xm-freebsd.h Tue May 9 18:16:59 1995 *************** *** 0 **** --- 1,4 ---- + /* Configuration for GCC for Intel i386 running FreeBSD as host. */ + + #include + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-gnu.h gcc-2.7.0/config/i386/xm-gnu.h *** gcc-2.6.3/config/i386/xm-gnu.h Wed Oct 5 01:26:36 1994 --- gcc-2.7.0/config/i386/xm-gnu.h Tue May 9 18:13:31 1995 *************** *** 1,4 **** /* Configuration for GCC for Intel i386 running GNU as host. */ ! #include "i386/xm-i386.h" ! #include "xm-gnu.h" --- 1,5 ---- /* Configuration for GCC for Intel i386 running GNU as host. */ ! #include ! #include ! diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-i386.h gcc-2.7.0/config/i386/xm-i386.h *** gcc-2.6.3/config/i386/xm-i386.h Sat Jun 26 11:38:04 1993 --- gcc-2.7.0/config/i386/xm-i386.h Thu Jun 15 09:55:53 1995 *************** *** 16,20 **** 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. */ #ifndef i386 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef i386 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-linux.h gcc-2.7.0/config/i386/xm-linux.h *** gcc-2.6.3/config/i386/xm-linux.h Mon Mar 7 17:05:29 1994 --- gcc-2.7.0/config/i386/xm-linux.h Thu Jun 15 09:56:03 1995 *************** *** 1,4 **** /* Configuration for GCC for Intel i386 running Linux. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by H.J. Lu (hjl@nynexst.com) --- 1,4 ---- /* Configuration for GCC for Intel i386 running Linux. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by H.J. Lu (hjl@nynexst.com) *************** *** 17,30 **** 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 "i386/xm-i386.h" ! #include "xm-svr3.h" - #undef BSTRING - #define BSTRING - #undef bcmp - #undef bcopy - #undef bzero - #undef index - #undef rindex --- 17,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include ! #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-lynx.h gcc-2.7.0/config/i386/xm-lynx.h *** gcc-2.6.3/config/i386/xm-lynx.h --- gcc-2.7.0/config/i386/xm-lynx.h Thu Jun 15 09:56:17 1995 *************** *** 0 **** --- 1,33 ---- + /* Configuration for GNU C-compiler for i386 platforms running LynxOS. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + /* This describes the machine the compiler is hosted on. */ + #define HOST_BITS_PER_CHAR 8 + #define HOST_BITS_PER_SHORT 16 + #define HOST_BITS_PER_INT 32 + #define HOST_BITS_PER_LONG 32 + #define HOST_BITS_PER_LONGLONG 64 + + /* target machine dependencies. + tm.h is a symbolic link to the actual target specific file. */ + + #include "tm.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-netbsd.h gcc-2.7.0/config/i386/xm-netbsd.h *** gcc-2.6.3/config/i386/xm-netbsd.h --- gcc-2.7.0/config/i386/xm-netbsd.h Tue May 9 18:15:10 1995 *************** *** 0 **** --- 1,4 ---- + /* Configuration for GCC for Intel i386 running NetBSD as host. */ + + #include + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-os2.h gcc-2.7.0/config/i386/xm-os2.h *** gcc-2.6.3/config/i386/xm-os2.h Tue Feb 22 07:19:50 1994 --- gcc-2.7.0/config/i386/xm-os2.h Thu Jun 15 09:56:34 1995 *************** *** 1,5 **** /* Configuration for GNU compiler for an Intel i386 or later processor running OS/2 2.x. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Samuel Figueroa (figueroa@cs.nyu.edu) --- 1,5 ---- /* Configuration for GNU compiler for an Intel i386 or later processor running OS/2 2.x. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Samuel Figueroa (figueroa@cs.nyu.edu) *************** *** 18,22 **** 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. */ #ifndef OS2 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef OS2 *************** *** 35,38 **** --- 36,40 ---- #define index strchr #define rindex strrchr + #define strcasecmp stricmp #define kill(a,b) raise(b) #define mktemp tmpnam *************** *** 42,50 **** --- 44,57 ---- int spawnvp (int modeflag, char *path, char *argv[]); #endif /* __IBMC__ */ + #ifndef PATH_SEPARATOR #define PATH_SEPARATOR ';' #endif + #ifndef DIR_SEPARATOR + #define DIR_SEPARATOR '\\' + #endif #define EXECUTABLE_SUFFIX ".exe" + #define OBJECT_SUFFIX ".obj" #include "i386/xm-i386.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-osf.h gcc-2.7.0/config/i386/xm-osf.h *** gcc-2.6.3/config/i386/xm-osf.h Sat Feb 12 19:49:23 1994 --- gcc-2.7.0/config/i386/xm-osf.h Thu Jun 15 09:56:53 1995 *************** *** 16,20 **** 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. */ #undef TRUE --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #undef TRUE diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-sun.h gcc-2.7.0/config/i386/xm-sun.h *** gcc-2.6.3/config/i386/xm-sun.h Sun Jan 10 21:37:10 1993 --- gcc-2.7.0/config/i386/xm-sun.h Thu Jun 15 09:57:09 1995 *************** *** 16,20 **** 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. */ #define USG --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define USG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-vsta.h gcc-2.7.0/config/i386/xm-vsta.h *** gcc-2.6.3/config/i386/xm-vsta.h --- gcc-2.7.0/config/i386/xm-vsta.h Thu Jun 15 09:57:29 1995 *************** *** 0 **** --- 1,26 ---- + /* Configuration for GNU C-compiler for Intel 80386. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define NO_STAB_H + + #include "i386/xm-i386.h" + + /* Use semicolons to separate elements of a path. */ + #define PATH_SEPARATOR ';' diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i386/xm-winnt.h gcc-2.7.0/config/i386/xm-winnt.h *** gcc-2.6.3/config/i386/xm-winnt.h Fri Sep 30 17:20:33 1994 --- gcc-2.7.0/config/i386/xm-winnt.h Thu Jun 15 09:57:46 1995 *************** *** 18,22 **** 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 "winnt/xm-winnt.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "winnt/xm-winnt.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/fx2800.h gcc-2.7.0/config/i860/fx2800.h *** gcc-2.6.3/config/i860/fx2800.h Sat Oct 2 04:19:09 1993 --- gcc-2.7.0/config/i860/fx2800.h Thu Jun 15 10:13:24 1995 *************** *** 20,24 **** 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. */ #define OUTPUT_TDESC --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define OUTPUT_TDESC diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/i860.c gcc-2.7.0/config/i860/i860.c *** gcc-2.6.3/config/i860/i860.c Wed Apr 20 11:49:15 1994 --- gcc-2.7.0/config/i860/i860.c Thu Jun 15 10:13:41 1995 *************** *** 22,26 **** 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. */ --- 22,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/i860.h gcc-2.7.0/config/i860/i860.h *** gcc-2.6.3/config/i860/i860.h Wed Mar 23 13:13:50 1994 --- gcc-2.7.0/config/i860/i860.h Thu Jun 15 10:13:55 1995 *************** *** 1,8 **** /* Definitions of target machine for GNU compiler, for Intel 860. ! Copyright (C) 1989, 1991, 1993 Free Software Foundation, Inc. ! ! Written by Richard Stallman (rms@ai.mit.edu). ! ! Hacked substantially by Ron Guilmette (rfg@netcom.com) to cater to the whims of the System V Release 4 assembler. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for Intel 860. ! Copyright (C) 1989, 1991, 1993, 1995 Free Software Foundation, Inc. ! Hacked substantially by Ron Guilmette (rfg@segfault.us.com) to cater to the whims of the System V Release 4 assembler. *************** *** 21,25 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 416,424 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 414,423 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/i860.md gcc-2.7.0/config/i860/i860.md *** gcc-2.6.3/config/i860/i860.md Mon Nov 7 17:47:18 1994 --- gcc-2.7.0/config/i860/i860.md Thu Jun 15 16:52:01 1995 *************** *** 16,20 **** ;; 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. --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 1442,1446 **** ;; (shiftrt (sign_extend (shift )) ) ;; which we expand poorly as four shift insns. ! ;; These patters yeild two shifts: ;; (shiftrt (shift ) ) (define_insn "" --- 1443,1447 ---- ;; (shiftrt (sign_extend (shift )) ) ;; which we expand poorly as four shift insns. ! ;; These patterns yield two shifts: ;; (shiftrt (shift ) ) (define_insn "" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/paragon.h gcc-2.7.0/config/i860/paragon.h *** gcc-2.6.3/config/i860/paragon.h Wed Mar 23 13:14:14 1994 --- gcc-2.7.0/config/i860/paragon.h Thu Jun 15 10:14:15 1995 *************** *** 22,26 **** 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 "i860/i860.h" --- 22,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i860/i860.h" *************** *** 56,60 **** #define STARTFILE_SPEC "-ycrt0.o%s %{mnx:-yoptions/autoinit.o%s}" ! /* libic.a is the PGI intrisic library */ /* libpm.o and guard.o are for the performance monitoring modules (ignored) */ /* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */ --- 57,61 ---- #define STARTFILE_SPEC "-ycrt0.o%s %{mnx:-yoptions/autoinit.o%s}" ! /* libic.a is the PGI intrinsic library */ /* libpm.o and guard.o are for the performance monitoring modules (ignored) */ /* /usr/lib/noieee contains non-IEEE compliant (but faster) math routines */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/sysv3.h gcc-2.7.0/config/i860/sysv3.h *** gcc-2.6.3/config/i860/sysv3.h Wed Mar 23 16:29:48 1994 --- gcc-2.7.0/config/i860/sysv3.h Thu Jun 15 10:14:30 1995 *************** *** 18,22 **** 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 "i860/i860.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i860/i860.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/sysv4.h gcc-2.7.0/config/i860/sysv4.h *** gcc-2.6.3/config/i860/sysv4.h Wed Mar 23 16:30:03 1994 --- gcc-2.7.0/config/i860/sysv4.h Thu Jun 15 10:14:45 1995 *************** *** 18,22 **** 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 "i860/i860.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i860/i860.h" *************** *** 149,156 **** } while (0) #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"a\",\"progbits\"" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"a\",\"progbits\"" /* Add definitions to support the .tdesc section as specified in the svr4 --- 150,172 ---- } while (0) + /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. + + Note that we want to give these sections the SHF_WRITE attribute + because these sections will actually contain data (i.e. tables of + addresses of functions in the current root executable or shared library + file) and, in the case of a shared library, the relocatable addresses + will have to be properly resolved/relocated (and then written into) by + the dynamic linker when it actually attaches the given shared library + to the executing process. (Note that on SVR4, you may wish to use the + `-z text' option to the ELF linker, when building a shared library, as + an additional check that you are doing everything right. But if you do + use the `-z text' option when building a shared library, you will get + errors unless the .ctors and .dtors sections are marked as writable + via the SHF_WRITE attribute.) */ + #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\"" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\"" /* Add definitions to support the .tdesc section as specified in the svr4 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i860/xm-i860.h gcc-2.7.0/config/i860/xm-i860.h *** gcc-2.6.3/config/i860/xm-i860.h Sat Jun 26 11:37:07 1993 --- gcc-2.7.0/config/i860/xm-i860.h Thu Jun 15 10:15:06 1995 *************** *** 16,20 **** 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. */ #ifndef i860 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef i860 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/i960-coff.h gcc-2.7.0/config/i960/i960-coff.h *** gcc-2.6.3/config/i960/i960-coff.h Thu Sep 29 20:10:07 1994 --- gcc-2.7.0/config/i960/i960-coff.h Thu Jun 15 10:15:34 1995 *************** *** 22,26 **** 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 "i960/i960.h" --- 22,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "i960/i960.h" *************** *** 29,32 **** --- 30,99 ---- #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG + + #undef ASM_FILE_START + #define ASM_FILE_START(FILE) \ + output_file_directive ((FILE), main_input_filename) + + /* Support the ctors and dtors sections for g++. */ + + #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" + #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" + + /* A list of other sections which the compiler might be "in" at any + given time. */ + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_ctors, in_dtors + + /* A list of extra section function definitions. */ + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + + #define CTORS_SECTION_FUNCTION \ + void \ + ctors_section () \ + { \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ + } + + #define DTORS_SECTION_FUNCTION \ + void \ + dtors_section () \ + { \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ + } + + #define INT_ASM_OP ".word" + + /* A C statement (sans semicolon) to output an element in the table of + global constructors. */ + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. */ + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) /* end of i960-coff.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/i960.c gcc-2.7.0/config/i960/i960.c *** gcc-2.6.3/config/i960/i960.c Thu Oct 20 16:09:33 1994 --- gcc-2.7.0/config/i960/i960.c Thu Jun 15 10:16:07 1995 *************** *** 1,4 **** /* Subroutines used for code generation on intel 80960. ! Copyright (C) 1992 Free Software Foundation, Inc. Contributed by Steven McGeady, Intel Corp. Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson --- 1,4 ---- /* Subroutines used for code generation on intel 80960. ! Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Steven McGeady, Intel Corp. Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson *************** *** 19,23 **** 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 --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 84,138 **** || current_function_varargs) - #if 0 /* Handle pragmas for compatibility with Intel's compilers. */ /* ??? This is incomplete, since it does not handle all pragmas that the ! intel compilers understand. Also, it needs to be rewritten to accept ! a stream instead of a string for GCC 2. */ void ! process_pragma(str) ! char *str; { ! int align; int i; ! if ((i = sscanf (str, " align %d", &align)) == 1) ! switch (align) ! { ! case 0: /* Return to last alignment. */ ! align = i960_last_maxbitalignment / 8; ! case 16: /* Byte alignments. */ ! case 8: ! case 4: ! case 2: ! case 1: ! i960_last_maxbitalignment = i960_maxbitalignment; ! i960_maxbitalignment = align * 8; ! break; ! default: /* Unknown, silently ignore. */ ! break; ! } ! /* NOTE: ic960 R3.0 pragma align definition: ! #pragma align [(size)] | (identifier=size[,...]) ! #pragma noalign [(identifier)[,...]] ! (all parens are optional) ! - size is [1,2,4,8,16] ! - noalign means size==1 ! - applies only to component elements of a struct (and union?) ! - identifier applies to structure tag (only) ! - missing identifier means next struct ! - alignment rules for bitfields need more investigation */ /* Should be pragma 'far' or equivalent for callx/balx here. */ } - #endif /* Initialize variables before compiling any files. */ --- 85,168 ---- || current_function_varargs) /* Handle pragmas for compatibility with Intel's compilers. */ /* ??? This is incomplete, since it does not handle all pragmas that the ! intel compilers understand. */ void ! process_pragma (finput) ! FILE *finput; { ! int c; int i; ! c = getc (finput); ! while (c == ' ' || c == '\t') ! c = getc (finput); ! ! if (c == 'a' ! && getc (finput) == 'l' ! && getc (finput) == 'i' ! && getc (finput) == 'g' ! && getc (finput) == 'n' ! && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n')) ! { ! char buf[20]; ! char *s = buf; ! int align; ! ! while (c == ' ' || c == '\t') ! c = getc (finput); ! if (c == '(') ! c = getc (finput); ! while (c >= '0' && c <= '9') ! { ! if (s < buf + sizeof buf - 1) ! *s++ = c; ! c = getc (finput); ! } ! *s = '\0'; ! align = atoi (buf); ! switch (align) ! { ! case 0: ! /* Return to last alignment. */ ! align = i960_last_maxbitalignment / 8; ! /* Fall through. */ ! case 16: ! case 8: ! case 4: ! case 2: ! case 1: ! i960_last_maxbitalignment = i960_maxbitalignment; ! i960_maxbitalignment = align * 8; ! break; ! default: ! /* Silently ignore bad values. */ ! break; ! } ! /* NOTE: ic960 R3.0 pragma align definition: ! #pragma align [(size)] | (identifier=size[,...]) ! #pragma noalign [(identifier)[,...]] ! (all parens are optional) ! - size is [1,2,4,8,16] ! - noalign means size==1 ! - applies only to component elements of a struct (and union?) ! - identifier applies to structure tag (only) ! - missing identifier means next struct ! - alignment rules for bitfields need more investigation */ ! } /* Should be pragma 'far' or equivalent for callx/balx here. */ + + ungetc (c, finput); } /* Initialize variables before compiling any files. */ *************** *** 224,229 **** enum machine_mode mode; { ! return (TARGET_NUMERICS && (mode == VOIDmode || mode == GET_MODE (op)) ! && (op == CONST1_RTX (mode))); } --- 254,258 ---- enum machine_mode mode; { ! return (TARGET_NUMERICS && mode == GET_MODE (op) && op == CONST1_RTX (mode)); } *************** *** 235,240 **** enum machine_mode mode; { ! return (TARGET_NUMERICS && (mode == VOIDmode || mode == GET_MODE (op)) ! && (op == CONST0_RTX (mode))); } --- 264,268 ---- enum machine_mode mode; { ! return (TARGET_NUMERICS && mode == GET_MODE (op) && op == CONST0_RTX (mode)); } *************** *** 544,549 **** } ! /* Emit insns to load a constant. Uses several strategies to try to use ! as few insns as possible. */ char * --- 572,577 ---- } ! /* Emit insns to load a constant to non-floating point registers. ! Uses several strategies to try to use as few insns as possible. */ char * *************** *** 555,559 **** enum machine_mode mode = GET_MODE (dst); rtx operands[4]; - union { long l[2]; double d; } x; operands[0] = operands[2] = dst; --- 583,586 ---- *************** *** 568,584 **** return ""; } ! else if (mode == DFmode) { ! rtx first, second; ! if (fp_literal_zero (src, VOIDmode)) { ! if (FP_REG_P (dst)) ! return "movrl %1,%0"; ! else ! return "movl 0,%0"; } ! #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT split_double (src, &first, &second); --- 595,629 ---- return ""; } ! else if (mode == XFmode) { ! REAL_VALUE_TYPE d; ! long value_long[3]; ! int i; ! ! if (fp_literal_zero (src, XFmode)) ! return "movt 0,%0"; ! ! REAL_VALUE_FROM_CONST_DOUBLE (d, src); ! REAL_VALUE_TO_TARGET_LONG_DOUBLE (d, value_long); ! ! output_asm_insn ("# ldconst %1,%0",operands); ! for (i = 0; i < 3; i++) { ! operands[0] = gen_rtx (REG, SImode, REGNO (dst) + i); ! operands[1] = GEN_INT (value_long[i]); ! output_asm_insn (i960_output_ldconst (operands[0], operands[1]), ! operands); } ! return ""; ! } ! else if (mode == DFmode) ! { ! rtx first, second; ! ! if (fp_literal_zero (src, DFmode)) ! return "movl 0,%0"; ! split_double (src, &first, &second); *************** *** 594,602 **** operands); return ""; ! #else ! if (fp_literal_one (src, VOIDmode)) ! return "movrl 0f1.0,%0"; ! fatal ("inline double constants not supported on this host"); ! #endif } else if (mode == TImode) --- 639,657 ---- operands); return ""; ! } ! else if (mode == SFmode) ! { ! REAL_VALUE_TYPE d; ! long value; ! ! REAL_VALUE_FROM_CONST_DOUBLE (d, src); ! REAL_VALUE_TO_TARGET_SINGLE (d, value); ! ! output_asm_insn ("# ldconst %1,%0",operands); ! operands[0] = gen_rtx (REG, SImode, REGNO (dst)); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, value); ! output_asm_insn (i960_output_ldconst (operands[0], operands[1]), ! operands); ! return ""; } else if (mode == TImode) *************** *** 616,631 **** { rtx upperhalf, lowerhalf, xoperands[2]; - char *string; ! if (GET_CODE (src) == CONST_DOUBLE) ! { ! upperhalf = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (src)); ! lowerhalf = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (src)); ! } ! else if (GET_CODE (src) == CONST_INT) ! { ! lowerhalf = src; ! upperhalf = INTVAL (src) < 0 ? constm1_rtx : const0_rtx; ! } else abort (); --- 671,678 ---- { rtx upperhalf, lowerhalf, xoperands[2]; ! if (GET_CODE (src) == CONST_DOUBLE || GET_CODE (src) == CONST_INT) ! split_double (src, &lowerhalf, &upperhalf); ! else abort (); *************** *** 644,670 **** /* The lower word is emitted as normally. */ } - else if (mode == SFmode) - { - #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - REAL_VALUE_TYPE d; - long value; - - REAL_VALUE_FROM_CONST_DOUBLE (d, src); - REAL_VALUE_TO_TARGET_SINGLE (d, value); - - output_asm_insn ("# ldconst %1,%0",operands); - operands[0] = gen_rtx (REG, SImode, REGNO (dst)); - operands[1] = gen_rtx (CONST_INT, VOIDmode, value); - output_asm_insn (i960_output_ldconst (operands[0], operands[1]), - operands); - #else - if (fp_literal_zero (src, VOIDmode)) - return "movr 0f0.0,%0"; - if (fp_literal_one (src, VOIDmode)) - return "movr 0f1.0,%0"; - fatal ("inline float constants not supported on this host"); - #endif - return ""; - } else { --- 691,694 ---- *************** *** 829,833 **** leaf_proc_ok = 0; ! /* Even if nobody uses extra parms, can't have leafroc or tail calls if argblock, because argblock uses g14 implicitly. */ --- 853,857 ---- leaf_proc_ok = 0; ! /* Even if nobody uses extra parms, can't have leafproc or tail calls if argblock, because argblock uses g14 implicitly. */ *************** *** 1451,1462 **** else if (rtxcode == CONST_DOUBLE) { ! double d; ! if (x == CONST0_RTX (DFmode) || x == CONST0_RTX (SFmode)) { fprintf (file, "0f0.0"); return; } ! else if (x == CONST1_RTX (DFmode) || x == CONST1_RTX (SFmode)) { fprintf (file, "0f1.0"); --- 1475,1487 ---- else if (rtxcode == CONST_DOUBLE) { ! REAL_VALUE_TYPE d; ! char dstr[30]; ! if (x == CONST0_RTX (GET_MODE (x))) { fprintf (file, "0f0.0"); return; } ! else if (x == CONST1_RTX (GET_MODE (x))) { fprintf (file, "0f1.0"); *************** *** 1464,1470 **** } - /* This better be a comment. */ REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! fprintf (file, "%#g", d); return; } --- 1489,1495 ---- } REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! REAL_VALUE_TO_DECIMAL (d, "%#g", dstr); ! fprintf (file, "0f%s", dstr); return; } *************** *** 1852,1861 **** (~C_MODES \ & ~ ((1 << (int) DImode) | (1 << (int) TImode) \ ! | (1 << (int) DFmode) | (1 << (int) TFmode))) /* Modes for double-word (and smaller) quantities. */ #define D_MODES \ (~C_MODES \ ! & ~ ((1 << (int) TImode) | (1 << (int) TFmode))) /* Modes for quad-word quantities. */ --- 1877,1886 ---- (~C_MODES \ & ~ ((1 << (int) DImode) | (1 << (int) TImode) \ ! | (1 << (int) DFmode) | (1 << (int) XFmode))) /* Modes for double-word (and smaller) quantities. */ #define D_MODES \ (~C_MODES \ ! & ~ ((1 << (int) TImode) | (1 << (int) XFmode))) /* Modes for quad-word quantities. */ *************** *** 1869,1873 **** /* Modes for quad-float quantities. */ ! #define TF_MODES (DF_MODES | (1 << (int) TFmode) | (1 << (int) DCmode)) unsigned int hard_regno_mode_ok[FIRST_PSEUDO_REGISTER] = { --- 1894,1898 ---- /* Modes for quad-float quantities. */ ! #define XF_MODES (DF_MODES | (1 << (int) XFmode) | (1 << (int) DCmode)) unsigned int hard_regno_mode_ok[FIRST_PSEUDO_REGISTER] = { *************** *** 1877,1881 **** T_MODES, S_MODES, D_MODES, S_MODES, T_MODES, S_MODES, D_MODES, S_MODES, ! TF_MODES, TF_MODES, TF_MODES, TF_MODES, C_MODES}; --- 1902,1906 ---- T_MODES, S_MODES, D_MODES, S_MODES, T_MODES, S_MODES, D_MODES, S_MODES, ! XF_MODES, XF_MODES, XF_MODES, XF_MODES, C_MODES}; *************** *** 2062,2066 **** || (size + ROUND_PARM (cum->ca_nregparms, align)) > NPARM_REGS || MUST_PASS_IN_STACK (mode, type)) ! cum->ca_nstackparms = ROUND_PARM (cum->ca_nstackparms, align) + size; else cum->ca_nregparms = ROUND_PARM (cum->ca_nregparms, align) + size; --- 2087,2096 ---- || (size + ROUND_PARM (cum->ca_nregparms, align)) > NPARM_REGS || MUST_PASS_IN_STACK (mode, type)) ! { ! /* Indicate that all the registers are in use, even if all are not, ! so va_start will compute the right value. */ ! cum->ca_nregparms = NPARM_REGS; ! cum->ca_nstackparms = ROUND_PARM (cum->ca_nstackparms, align) + size; ! } else cum->ca_nregparms = ROUND_PARM (cum->ca_nregparms, align) + size; *************** *** 2101,2126 **** void ! i960_output_double (file, value) FILE *file; ! double value; { ! if (REAL_VALUE_ISINF (value)) ! { ! fprintf (file, "\t.word 0\n"); ! fprintf (file, "\t.word 0x7ff00000 # Infinity\n"); ! } ! else ! fprintf (file, "\t.double 0d%.17e\n", (value)); } void i960_output_float (file, value) FILE *file; ! double value; { ! if (REAL_VALUE_ISINF (value)) ! fprintf (file, "\t.word 0x7f800000 # Infinity\n"); ! else ! fprintf (file, "\t.float 0f%.12e\n", (value)); } --- 2131,2177 ---- void ! i960_output_long_double (file, value) FILE *file; ! REAL_VALUE_TYPE value; { ! long value_long[3]; ! char dstr[30]; ! ! REAL_VALUE_TO_TARGET_LONG_DOUBLE (value, value_long); ! REAL_VALUE_TO_DECIMAL (value, "%.20g", dstr); ! ! fprintf (file, ! "\t.word\t0x%08lx\t\t# %s\n\t.word\t0x%08lx\n\t.word\t0x%08lx\n", ! value_long[0], dstr, value_long[1], value_long[2]); ! fprintf (file, "\t.word\t0x0\n"); } void + i960_output_double (file, value) + FILE *file; + REAL_VALUE_TYPE value; + { + long value_long[2]; + char dstr[30]; + + REAL_VALUE_TO_TARGET_DOUBLE (value, value_long); + REAL_VALUE_TO_DECIMAL (value, "%.20g", dstr); + + fprintf (file, "\t.word\t0x%08lx\t\t# %s\n\t.word\t0x%08lx\n", + value_long[0], dstr, value_long[1]); + } + + void i960_output_float (file, value) FILE *file; ! REAL_VALUE_TYPE value; { ! long value_long; ! char dstr[30]; ! ! REAL_VALUE_TO_TARGET_SINGLE (value, value_long); ! REAL_VALUE_TO_DECIMAL (value, "%.12g", dstr); ! ! fprintf (file, "\t.word\t0x%08lx\t\t# %s (float)\n", value_long, dstr); } *************** *** 2140,2169 **** } ! /* Compute the size of an aggregate type TSIZE. */ ! ! tree ! i960_round_size (tsize) ! tree tsize; ! { ! int size, byte_size, align; ! ! if (TREE_CODE (tsize) != INTEGER_CST) ! return tsize; ! ! size = TREE_INT_CST_LOW (tsize); ! byte_size = (size + BITS_PER_UNIT - 1) / BITS_PER_UNIT; ! align = i960_object_bytes_bitalign (byte_size); ! ! /* Handle #pragma align. */ ! if (align > i960_maxbitalignment) ! align = i960_maxbitalignment; ! ! if (size % align) ! size = ((size / align) + 1) * align; ! ! return size_int (size); ! } ! ! /* Compute the alignment for an aggregate type TSIZE. */ int --- 2191,2197 ---- } ! /* Compute the alignment for an aggregate type TSIZE. ! Alignment is MAX (greatest member alignment, ! MIN (pragma align, structure size alignment)). */ int *************** *** 2172,2182 **** tree tsize; { ! int byte_size; if (TREE_CODE (tsize) != INTEGER_CST) return align; ! byte_size = (TREE_INT_CST_LOW (tsize) + BITS_PER_UNIT - 1) / BITS_PER_UNIT; ! align = i960_object_bytes_bitalign (byte_size); return align; } --- 2200,2217 ---- tree tsize; { ! int new_align; if (TREE_CODE (tsize) != INTEGER_CST) return align; ! new_align = i960_object_bytes_bitalign (TREE_INT_CST_LOW (tsize) ! / BITS_PER_UNIT); ! /* Handle #pragma align. */ ! if (new_align > i960_maxbitalignment) ! new_align = i960_maxbitalignment; ! ! if (align < new_align) ! align = new_align; ! return align; } *************** *** 2194,2235 **** int no_rtl; { ! if (cum->ca_nregparms < NPARM_REGS) ! { ! int first_reg_offset = cum->ca_nregparms; ! if (! (no_rtl)) ! { ! rtx label = gen_label_rtx (); ! rtx regblock; ! ! /* If arg_pointer_rtx == 0, no arguments were passed on the stack ! and we need to allocate a chunk to save the registers (if any ! arguments were passed on the stack the caller would allocate the ! 48 bytes as well). We must allocate all 48 bytes (12*4) because ! arg_pointer_rtx is saved at the front, the anonymous args are ! saved at the end. */ ! emit_insn (gen_cmpsi (arg_pointer_rtx, const0_rtx)); ! emit_jump_insn (gen_bne (label)); ! emit_insn (gen_rtx (SET, VOIDmode, arg_pointer_rtx, ! stack_pointer_rtx)); ! emit_insn (gen_rtx (SET, VOIDmode, stack_pointer_rtx, ! memory_address (SImode, ! plus_constant (stack_pointer_rtx, ! 48)))); ! emit_label (label); ! ! /* Any anonymous args passed in regs? */ ! if (first_reg_offset + 1 < NPARM_REGS) ! { ! rtx regblock; ! regblock = gen_rtx (MEM, BLKmode, ! plus_constant (arg_pointer_rtx, ! (first_reg_offset + 1) * 4)); ! move_block_from_reg (first_reg_offset + 1, regblock, ! NPARM_REGS - first_reg_offset - 1, ! ((NPARM_REGS - first_reg_offset - 1) ! * UNITS_PER_WORD)); ! } ! } } } --- 2229,2273 ---- int no_rtl; { ! /* Note: for a varargs fn with only a va_alist argument, this is 0. */ ! int first_reg = cum->ca_nregparms; ! /* Copy only unnamed register arguments to memory. If there are ! any stack parms, there are no unnamed arguments in registers, and ! an argument block was already allocated by the caller. ! Remember that any arg bigger than 4 words is passed on the stack as ! are all subsequent args. ! ! If there are no stack arguments but there are exactly NPARM_REGS ! registers, either there were no extra arguments or the caller ! allocated an argument block. */ ! ! if (cum->ca_nstackparms == 0 && first_reg < NPARM_REGS && !no_rtl) ! { ! rtx label = gen_label_rtx (); ! rtx regblock; ! ! /* If arg_pointer_rtx == 0, no arguments were passed on the stack ! and we need to allocate a chunk to save the registers (if any ! arguments were passed on the stack the caller would allocate the ! 48 bytes as well). We must allocate all 48 bytes (12*4) because ! va_start assumes it. */ ! emit_insn (gen_cmpsi (arg_pointer_rtx, const0_rtx)); ! emit_jump_insn (gen_bne (label)); ! emit_insn (gen_rtx (SET, VOIDmode, arg_pointer_rtx, ! stack_pointer_rtx)); ! emit_insn (gen_rtx (SET, VOIDmode, stack_pointer_rtx, ! memory_address (SImode, ! plus_constant (stack_pointer_rtx, ! 48)))); ! emit_label (label); ! ! /* ??? Note that we unnecessarily store one extra register for stdarg ! fns. We could optimize this, but it's kept as for now. */ ! regblock = gen_rtx (MEM, BLKmode, ! plus_constant (arg_pointer_rtx, ! first_reg * 4)); ! move_block_from_reg (first_reg, regblock, ! NPARM_REGS - first_reg, ! (NPARM_REGS - first_reg) * UNITS_PER_WORD); } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/i960.h gcc-2.7.0/config/i960/i960.h *** gcc-2.6.3/config/i960/i960.h Thu Oct 20 16:09:40 1994 --- gcc-2.7.0/config/i960/i960.h Thu Jun 15 10:15:53 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for Intel 80960 ! Copyright (C) 1992, 1993 Free Software Foundation, Inc. Contributed by Steven McGeady, Intel Corp. Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson --- 1,4 ---- /* Definitions of target machine for GNU compiler, for Intel 80960 ! Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. Contributed by Steven McGeady, Intel Corp. Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson *************** *** 19,23 **** 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. */ /* Note that some other tm.h files may include this one and then override --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Note that some other tm.h files may include this one and then override *************** *** 54,63 **** #endif ! /* Specs for the compiler, to handle processor variations. */ #define CC1_SPEC \ "%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:%{!mcc:%{!mcf:-mkb}}}}}}}}\ ! %{mbout:%{g*:-gstabs}}\ ! %{mcoff:%{g*:-gcoff}}\ ! %{!mbout:%{!mcoff:%{g*:-gstabs}}}" /* Specs for the assembler, to handle processor variations. --- 55,66 ---- #endif ! /* Specs for the compiler, to handle processor variations. ! If the user gives an explicit -gstabs or -gcoff option, then do not ! try to add an implicit one, as this will fail. */ #define CC1_SPEC \ "%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:%{!mcc:%{!mcf:-mkb}}}}}}}}\ ! %{!gs*:%{!gc*:%{mbout:%{g*:-gstabs}}\ ! %{mcoff:%{g*:-gcoff}}\ ! %{!mbout:%{!mcoff:%{g*:-gstabs}}}}}" /* Specs for the assembler, to handle processor variations. *************** *** 116,119 **** --- 119,125 ---- fprintf (asm_out_file, "\t.type\t0x%x;", (A & 0xf) + 2 * (A & ~0xf)) + /* Handle pragmas for compatibility with Intel's compilers. */ + #define HANDLE_PRAGMA(FILE) process_pragma (FILE) + /* Run-time compilation parameters selecting different hardware subsets. */ *************** *** 251,256 **** {"strict-align", TARGET_FLAG_STRICT_ALIGN}, \ {"no-strict-align", -(TARGET_FLAG_STRICT_ALIGN)}, \ ! {"old-align", TARGET_FLAG_OLD_ALIGN}, \ ! {"no-old-align", -(TARGET_FLAG_OLD_ALIGN)}, \ {"link-relax", 0}, \ {"no-link-relax", 0}, \ --- 257,262 ---- {"strict-align", TARGET_FLAG_STRICT_ALIGN}, \ {"no-strict-align", -(TARGET_FLAG_STRICT_ALIGN)}, \ ! {"old-align", (TARGET_FLAG_OLD_ALIGN|TARGET_FLAG_STRICT_ALIGN)}, \ ! {"no-old-align", -(TARGET_FLAG_OLD_ALIGN|TARGET_FLAG_STRICT_ALIGN)}, \ {"link-relax", 0}, \ {"no-link-relax", 0}, \ *************** *** 302,305 **** --- 308,315 ---- /* Target machine storage layout. */ + /* Define for cross-compilation from a host with a different float format + or endianess, as well as to support 80 bit long doubles on the i960. */ + #define REAL_ARITHMETIC + /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ *************** *** 366,370 **** when given unaligned data. 80960 will work even with unaligned data, but it is slow. */ ! #define STRICT_ALIGNMENT TARGET_OLD_ALIGN /* Specify alignment for string literals (which might be higher than the --- 376,380 ---- when given unaligned data. 80960 will work even with unaligned data, but it is slow. */ ! #define STRICT_ALIGNMENT TARGET_STRICT_ALIGN /* Specify alignment for string literals (which might be higher than the *************** *** 378,381 **** --- 388,397 ---- : (ALIGN)) + /* Make XFmode floating point quantities be 128 bit aligned. */ + #define DATA_ALIGNMENT(TYPE, ALIGN) \ + (TREE_CODE (TYPE) == ARRAY_TYPE \ + && TYPE_MODE (TREE_TYPE (TYPE)) == XFmode \ + && (ALIGN) < 128 ? 128 : (ALIGN)) + /* Macros to determine size of aggregates (structures and unions in C). Normally, these may be defined to simply return the maximum *************** *** 385,396 **** #define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \ ! ((!TARGET_OLD_ALIGN && TREE_CODE (TYPE) == RECORD_TYPE) \ ! ? i960_round_align ((SPECIFIED), TYPE_SIZE (TYPE)) \ ! : MAX ((COMPUTED), (SPECIFIED))) ! ! #define ROUND_TYPE_SIZE(TYPE, SIZE, ALIGN) \ ! ((!TARGET_OLD_ALIGN && TREE_CODE (TYPE) == RECORD_TYPE) \ ! ? (tree) i960_round_size (SIZE) \ ! : round_up ((SIZE), (ALIGN))) /* Standard register usage. */ --- 401,413 ---- #define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \ ! ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode) \ ! ? 128 /* Put 80 bit floating point elements on 128 bit boundaries. */ \ ! : ((!TARGET_OLD_ALIGN && TREE_CODE (TYPE) == RECORD_TYPE) \ ! ? i960_round_align (MAX ((COMPUTED), (SPECIFIED)), TYPE_SIZE (TYPE)) \ ! : MAX ((COMPUTED), (SPECIFIED)))) ! ! #define ROUND_TYPE_SIZE(TYPE, COMPUTED, SPECIFIED) \ ! ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode) \ ! ? build_int_2 (128, 0) : (COMPUTED)) /* Standard register usage. */ *************** *** 475,479 **** /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. On 80960, the cpu registers can hold any mode but the float registers ! can only hold SFmode, DFmode, or TFmode. */ extern unsigned int hard_regno_mode_ok[FIRST_PSEUDO_REGISTER]; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ --- 492,496 ---- /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. On 80960, the cpu registers can hold any mode but the float registers ! can only hold SFmode, DFmode, or XFmode. */ extern unsigned int hard_regno_mode_ok[FIRST_PSEUDO_REGISTER]; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ *************** *** 642,651 **** For the 80960, G is 0.0 and H is 1.0. */ ! #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ! ((TARGET_NUMERICS) && \ ! (((C) == 'G' && ((VALUE) == CONST0_RTX (DFmode) \ ! || (VALUE) == CONST0_RTX (SFmode))) \ ! || ((C) == 'H' && ((VALUE) == CONST1_RTX (DFmode) \ ! || (VALUE) == CONST1_RTX (SFmode))))) /* Given an rtx X being reloaded into a reg required to be --- 659,666 ---- For the 80960, G is 0.0 and H is 1.0. */ ! #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ! ((TARGET_NUMERICS) && \ ! (((C) == 'G' && (VALUE) == CONST0_RTX (GET_MODE (VALUE))) \ ! || ((C) == 'H' && ((VALUE) == CONST1_RTX (GET_MODE (VALUE)))))) /* Given an rtx X being reloaded into a reg required to be *************** *** 721,728 **** /* 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, SIZE) 0 /* Define how to find the value returned by a library function --- 736,744 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a library function *************** *** 938,945 **** It is given that X satisfies CONSTANT_P. ! Anything but a CONST_DOUBLE can be made to work, excepting 0.0 and 1.0. */ #define LEGITIMATE_CONSTANT_P(X) \ ! ((GET_CODE (X) != CONST_DOUBLE) || fp_literal ((X), VOIDmode)) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx --- 954,963 ---- It is given that X satisfies CONSTANT_P. ! Anything but a CONST_DOUBLE can be made to work, excepting 0.0 and 1.0. + ??? This probably should be defined to 1. */ + #define LEGITIMATE_CONSTANT_P(X) \ ! ((GET_CODE (X) != CONST_DOUBLE) || fp_literal ((X), GET_MODE (X))) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx *************** *** 1262,1265 **** --- 1280,1288 ---- #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf (LABEL, "*%s%d", PREFIX, NUM) + + /* This is how to output an assembler line defining a `long double' + constant. */ + + #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) i960_output_long_double(FILE, VALUE) /* This is how to output an assembler line defining a `double' constant. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/i960.md gcc-2.7.0/config/i960/i960.md *** gcc-2.6.3/config/i960/i960.md Thu Oct 13 17:13:30 1994 --- gcc-2.7.0/config/i960/i960.md Thu Jun 15 16:52:20 1995 *************** *** 19,23 **** ;; 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. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. --- 19,24 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. *************** *** 25,29 **** ;; There are very few (4) 'f' registers, they can't be loaded/stored from/to ;; memory, and some instructions explicitly require them, so we get better ! ;; code by discouraging psuedo-registers from being allocated to them. ;; However, we do want to allow all patterns which can store to them to ;; include them in their constraints, so we always use '*f' in a destination --- 26,30 ---- ;; There are very few (4) 'f' registers, they can't be loaded/stored from/to ;; memory, and some instructions explicitly require them, so we get better ! ;; code by discouraging pseudo-registers from being allocated to them. ;; However, we do want to allow all patterns which can store to them to ;; include them in their constraints, so we always use '*f' in a destination *************** *** 1919,1981 **** ;; Tetra (16 byte) float support. ! (define_insn "cmptf" [(set (reg:CC 36) ! (compare:CC (match_operand:TF 0 "register_operand" "f") ! (match_operand:TF 1 "nonmemory_operand" "fG")))] "TARGET_NUMERICS" ! "cmpr %0,%1" [(set_attr "type" "fpcc")]) ! (define_expand "movtf" ! [(set (match_operand:TF 0 "general_operand" "") ! (match_operand:TF 1 "fpmove_src_operand" ""))] "" " { ! if (emit_move_sequence (operands, TFmode)) DONE; }") (define_insn "" ! [(set (match_operand:TF 0 "general_operand" "=r,*f,d,d,m,o") ! (match_operand:TF 1 "fpmove_src_operand" "r,GH,F,m,d,G"))] ! "(current_function_args_size == 0 ! && rtx_equal_function_value_matters == 0) ! && (register_operand (operands[0], TFmode) ! || register_operand (operands[1], TFmode) ! || operands[1] == CONST0_RTX (TFmode))" ! "* ! { ! switch (which_alternative) ! { ! case 0: ! if (FP_REG_P (operands[0]) || FP_REG_P (operands[1])) ! return \"movre %1,%0\"; ! else ! return \"movq %1,%0\"; ! case 1: ! return \"movre %1,%0\"; ! case 2: ! return i960_output_ldconst (operands[0], operands[1]); ! case 3: ! return \"ldq %1,%0\"; ! case 4: ! return \"stq %1,%0\"; ! case 5: ! operands[1] = adj_offsettable_operand (operands[0], 4); ! operands[2] = adj_offsettable_operand (operands[0], 8); ! operands[3] = adj_offsettable_operand (operands[0], 12); ! return \"st g14,%0\;st g14,%1\;st g14,%2\;st g14,%3\"; ! } ! }" ! [(set_attr "type" "move,move,load,fpload,fpstore,fpstore")]) ! ! (define_insn "" ! [(set (match_operand:TF 0 "general_operand" "=r,*f,d,d,m") ! (match_operand:TF 1 "fpmove_src_operand" "r,GH,F,m,d"))] ! "(current_function_args_size != 0 ! || rtx_equal_function_value_matters != 0) ! && (register_operand (operands[0], TFmode) ! || register_operand (operands[1], TFmode))" "* { --- 1920,1958 ---- ;; Tetra (16 byte) float support. ! (define_expand "cmpxf" [(set (reg:CC 36) ! (compare:CC (match_operand:XF 0 "register_operand" "") ! (match_operand:XF 1 "nonmemory_operand" "")))] "TARGET_NUMERICS" ! " ! { ! i960_compare_op0 = operands[0]; ! i960_compare_op1 = operands[1]; ! DONE; ! }") ! ! (define_insn "" ! [(set (reg:CC 36) ! (compare:CC (match_operand:XF 0 "register_operand" "f") ! (match_operand:XF 1 "nonmemory_operand" "fGH")))] ! "TARGET_NUMERICS" ! "cmpr %0,%1" [(set_attr "type" "fpcc")]) ! (define_expand "movxf" ! [(set (match_operand:XF 0 "general_operand" "") ! (match_operand:XF 1 "fpmove_src_operand" ""))] "" " { ! if (emit_move_sequence (operands, XFmode)) DONE; }") (define_insn "" ! [(set (match_operand:XF 0 "general_operand" "=r,f,d,d,m") ! (match_operand:XF 1 "fpmove_src_operand" "r,GH,F,m,d"))] ! "register_operand (operands[0], XFmode) ! || register_operand (operands[1], XFmode)" "* { *************** *** 1992,2005 **** return i960_output_ldconst (operands[0], operands[1]); case 3: ! return \"ldq %1,%0\"; case 4: ! return \"stq %1,%0\"; } }" [(set_attr "type" "move,move,load,fpload,fpstore")]) ! (define_insn "extendsftf2" ! [(set (match_operand:TF 0 "register_operand" "=*f,d") ! (float_extend:TF (match_operand:SF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" --- 1969,1982 ---- return i960_output_ldconst (operands[0], operands[1]); case 3: ! return \"ldt %1,%0\"; case 4: ! return \"stt %1,%0\"; } }" [(set_attr "type" "move,move,load,fpload,fpstore")]) ! (define_insn "extendsfxf2" ! [(set (match_operand:XF 0 "register_operand" "=f,d") ! (float_extend:XF (match_operand:SF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" *************** *** 2009,2015 **** [(set_attr "type" "fpmove")]) ! (define_insn "extenddftf2" ! [(set (match_operand:TF 0 "register_operand" "=*f,d") ! (float_extend:TF (match_operand:DF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" --- 1986,1992 ---- [(set_attr "type" "fpmove")]) ! (define_insn "extenddfxf2" ! [(set (match_operand:XF 0 "register_operand" "=f,d") ! (float_extend:XF (match_operand:DF 1 "register_operand" "d,f")))] "TARGET_NUMERICS" *************** *** 2019,2101 **** [(set_attr "type" "fpmove")]) ! (define_insn "trunctfdf2" [(set (match_operand:DF 0 "register_operand" "=d") (float_truncate:DF ! (match_operand:TF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movrl %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "trunctfsf2" [(set (match_operand:SF 0 "register_operand" "=d") (float_truncate:SF ! (match_operand:TF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movr %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "floatsitf2" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (float:TF (match_operand:SI 1 "register_operand" "d")))] "TARGET_NUMERICS" "cvtir %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fix_trunctfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (fix:SI (fix:TF (match_operand:TF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fixuns_trunctfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (unsigned_fix:SI (fix:TF (match_operand:TF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "addtf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (plus:TF (match_operand:TF 1 "nonmemory_operand" "%fG") ! (match_operand:TF 2 "nonmemory_operand" "fG")))] "TARGET_NUMERICS" "addr %1,%2,%0" [(set_attr "type" "fpadd")]) ! (define_insn "subtf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (minus:TF (match_operand:TF 1 "nonmemory_operand" "fG") ! (match_operand:TF 2 "nonmemory_operand" "fG")))] "TARGET_NUMERICS" "subr %2,%1,%0" [(set_attr "type" "fpadd")]) ! (define_insn "multf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (mult:TF (match_operand:TF 1 "nonmemory_operand" "%fG") ! (match_operand:TF 2 "nonmemory_operand" "fG")))] "TARGET_NUMERICS" "mulr %1,%2,%0" [(set_attr "type" "fpmul")]) ! (define_insn "divtf3" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (div:TF (match_operand:TF 1 "nonmemory_operand" "fG") ! (match_operand:TF 2 "nonmemory_operand" "fG")))] "TARGET_NUMERICS" "divr %2,%1,%0" [(set_attr "type" "fpdiv")]) ! (define_insn "negtf2" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (neg:TF (match_operand:TF 1 "register_operand" "f")))] "TARGET_NUMERICS" "subr %1,0f0.0,%0" [(set_attr "type" "fpadd")]) ! (define_insn "abstf2" ! [(set (match_operand:TF 0 "register_operand" "=f") ! (abs:TF (match_operand:TF 1 "register_operand" "f")))] "(TARGET_NUMERICS)" "cpysre %1,0f0.0,%0" --- 1996,2078 ---- [(set_attr "type" "fpmove")]) ! (define_insn "truncxfdf2" [(set (match_operand:DF 0 "register_operand" "=d") (float_truncate:DF ! (match_operand:XF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movrl %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "truncxfsf2" [(set (match_operand:SF 0 "register_operand" "=d") (float_truncate:SF ! (match_operand:XF 1 "register_operand" "f")))] "TARGET_NUMERICS" "movr %1,%0" [(set_attr "type" "fpmove")]) ! (define_insn "floatsixf2" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (float:XF (match_operand:SI 1 "register_operand" "d")))] "TARGET_NUMERICS" "cvtir %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fix_truncxfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "fixuns_truncxfsi2" [(set (match_operand:SI 0 "register_operand" "=d") ! (unsigned_fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f"))))] "TARGET_NUMERICS" "cvtzri %1,%0" [(set_attr "type" "fpcvt")]) ! (define_insn "addxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (plus:XF (match_operand:XF 1 "nonmemory_operand" "%fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "addr %1,%2,%0" [(set_attr "type" "fpadd")]) ! (define_insn "subxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (minus:XF (match_operand:XF 1 "nonmemory_operand" "fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "subr %2,%1,%0" [(set_attr "type" "fpadd")]) ! (define_insn "mulxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (mult:XF (match_operand:XF 1 "nonmemory_operand" "%fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "mulr %1,%2,%0" [(set_attr "type" "fpmul")]) ! (define_insn "divxf3" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (div:XF (match_operand:XF 1 "nonmemory_operand" "fGH") ! (match_operand:XF 2 "nonmemory_operand" "fGH")))] "TARGET_NUMERICS" "divr %2,%1,%0" [(set_attr "type" "fpdiv")]) ! (define_insn "negxf2" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (neg:XF (match_operand:XF 1 "register_operand" "f")))] "TARGET_NUMERICS" "subr %1,0f0.0,%0" [(set_attr "type" "fpadd")]) ! (define_insn "absxf2" ! [(set (match_operand:XF 0 "register_operand" "=f") ! (abs:XF (match_operand:XF 1 "register_operand" "f")))] "(TARGET_NUMERICS)" "cpysre %1,0f0.0,%0" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/t-960bare gcc-2.7.0/config/i960/t-960bare *** gcc-2.6.3/config/i960/t-960bare Thu Sep 29 20:10:56 1994 --- gcc-2.7.0/config/i960/t-960bare Thu Jan 12 13:25:35 1995 *************** *** 1,4 **** ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c --- 1,4 ---- ! LIBGCC1 = ! CROSS_LIBGCC1 = LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/t-vxworks960 gcc-2.7.0/config/i960/t-vxworks960 *** gcc-2.6.3/config/i960/t-vxworks960 --- gcc-2.7.0/config/i960/t-vxworks960 Thu Jan 12 13:25:38 1995 *************** *** 0 **** --- 1,23 ---- + LIBGCC1 = + CROSS_LIBGCC1 = + + # We don't want to put exit in libgcc.a for VxWorks, because VxWorks + # does not have _exit. + LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 -Dexit=unused_exit + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' > dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + MULTILIB_OPTIONS=mnumerics + MULTILIB_DIRNAMES=float + MULTILIB_MATCHES=mnumerics=msb mnumerics=msc mnumerics=mkb mnumerics=mkc mnumerics=mmc mnumerics=mcb mnumerics=mcc + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/vx960-coff.h gcc-2.7.0/config/i960/vx960-coff.h *** gcc-2.6.3/config/i960/vx960-coff.h --- gcc-2.7.0/config/i960/vx960-coff.h Thu Jun 15 10:16:29 1995 *************** *** 0 **** --- 1,69 ---- + /* Definitions of target machine for GNU compiler. Vxworks i960 version. + Copyright (C) 1994, 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file just exists to give specs for the 960 running on VxWorks. */ + + #include "i960/i960-coff.h" + + /* VxWorks does all the library stuff itself. */ + + #undef LIB_SPEC + #define LIB_SPEC "" + + /* VxWorks provides the functionality of crt0.o and friends itself. */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "" + + /* Predefine vxworks. */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -Dvxworks -Acpu(i960) -Amachine(i960)" + + /* The VxWorks header files expect the compiler to define CPU to a + magic number. */ + + #undef CPP_SPEC + #define CPP_SPEC "%{mic*:-D__i960\ + %{mka:-D__i960KA}%{mkb:-D__i960KB}\ + %{msa:-D__i960SA}%{msb:-D__i960SB}\ + %{mmc:-D__i960MC}\ + %{mca:-D__i960CA}%{mcc:-D__i960CC}\ + %{mcf:-D__i960CF}}\ + %{mka:-D__i960KA__ -D__i960_KA__ %{!ansi:-DCPU=I960KA}}\ + %{mkb:-D__i960KB__ -D__i960_KB__ %{!ansi:-DCPU=I960KB}}\ + %{msa:-D__i960SA__ -D__i960_SA__}\ + %{msb:-D__i960SB__ -D__i960_SB__}\ + %{mmc:-D__i960MC__ -D__i960_MC__}\ + %{mca:-D__i960CA__ -D__i960_CA__ %{!ansi:-DCPU=I960CA}}\ + %{mcc:-D__i960CC__ -D__i960_CC__}\ + %{mcf:-D__i960CF__ -D__i960_CF__}\ + %{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:\ + %{!mcc:%{!mcf:-D__i960_CA -D__i960CA__ %{!ansi:-DCPU=I960CA}\ + %{mic*:-D__i960CA}}}}}}}}}" + + /* Default to -mca. */ + + #undef CC1_SPEC + #define CC1_SPEC \ + "%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:%{!mcc:%{!mcf:-mca}}}}}}}}\ + %{!gs*:%{!gc*:%{mbout:%{g*:-gstabs}}\ + %{mcoff:%{g*:-gcoff}}\ + %{!mbout:%{!mcoff:%{g*:-gcoff}}}}}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/vx960.h gcc-2.7.0/config/i960/vx960.h *** gcc-2.6.3/config/i960/vx960.h --- gcc-2.7.0/config/i960/vx960.h Thu Jun 15 10:16:41 1995 *************** *** 0 **** --- 1,33 ---- + /* Definitions of target machine for GNU compiler. Vxworks i960 version. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file just exists to give specs for the 960 running on VxWorks. */ + + #include "i960/i960.h" + + /* VxWorks does all the library stuff itself. */ + + #undef LIB_SPEC + #define LIB_SPEC "" + + /* VxWorks provides the functionality of crt0.o and friends itself. */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/i960/xm-i960.h gcc-2.7.0/config/i960/xm-i960.h *** gcc-2.6.3/config/i960/xm-i960.h Sat Jun 26 11:36:35 1993 --- gcc-2.7.0/config/i960/xm-i960.h Thu Jun 15 10:16:52 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/linux-aout.h gcc-2.7.0/config/linux-aout.h *** gcc-2.6.3/config/linux-aout.h --- gcc-2.7.0/config/linux-aout.h Thu Jun 15 08:49:23 1995 *************** *** 0 **** --- 1,51 ---- + /* Definitions for Linux + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by H.J. Lu (hjl@nynexst.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Don't assume anything about the header files. */ + #define NO_IMPLICIT_EXTERN_C + + #undef HAVE_ATEXIT + #define HAVE_ATEXIT + + /* Linux uses ctype from glibc.a. I am not sure how complete it is. + For now, we play safe. It may change later. */ + + #if 0 + #undef MULTIBYTE_CHARS + #define MULTIBYTE_CHARS 1 + #endif + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}" + + /* There are conflicting reports about whether this system uses + a different assembler syntax. wilson@cygnus.com says # is right. */ + #undef COMMENT_BEGIN + #define COMMENT_BEGIN "#" + + #undef ASM_APP_ON + #define ASM_APP_ON "#APP\n" + + #undef ASM_APP_OFF + #define ASM_APP_OFF "#NO_APP\n" + + /* We need that too. */ + #define HANDLE_SYSV_PRAGMA diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/linux.h gcc-2.7.0/config/linux.h *** gcc-2.6.3/config/linux.h --- gcc-2.7.0/config/linux.h Thu Jun 15 08:49:57 1995 *************** *** 0 **** --- 1,88 ---- + /* Definitions for Linux with ELF format + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Eric Youngdale. + Modified for stabs-in-ELF by H.J. Lu. + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Don't assume anything about the header files. */ + #define NO_IMPLICIT_EXTERN_C + + #undef HAVE_ATEXIT + #define HAVE_ATEXIT + + /* Linux uses ctype from glibc.a. I am not sure how complete it is. + For now, we play safe. It may change later. */ + + #if 0 + #undef MULTIBYTE_CHARS + #define MULTIBYTE_CHARS 1 + #endif + + /* There are conflicting reports about whether this system uses + a different assembler syntax. wilson@cygnus.com says # is right. */ + #undef COMMENT_BEGIN + #define COMMENT_BEGIN "#" + + #undef ASM_APP_ON + #define ASM_APP_ON "#APP\n" + + #undef ASM_APP_OFF + #define ASM_APP_OFF "#NO_APP\n" + + /* Use stabs instead of DWARF debug format. */ + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "svr4.h" + + #undef MD_EXEC_PREFIX + #undef MD_STARTFILE_PREFIX + + /* Output at beginning of assembler file. */ + /* The .file command should always begin the output. */ + #undef ASM_FILE_START + #define ASM_FILE_START(FILE) \ + do { \ + output_file_directive (FILE, main_input_filename); \ + fprintf (FILE, "\t.version\t\"01.01\"\n"); \ + } while (0) + + #undef LIBGCC_SPEC + #define LIBGCC_SPEC \ + "%{!shared:-lgcc}" + + + /* Provide a STARTFILE_SPEC appropriate for Linux. Here we add + the Linux magical crtbegin.o file (see crtstuff.c) which + provides part of the support for getting C++ file-scope static + object constructed before entering `main'. */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{!shared: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\ + crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" + + /* Provide a ENDFILE_SPEC appropriate for Linux. Here we tack on + the Linux magical crtend.o file (see crtstuff.c) which + provides part of the support for getting C++ file-scope static + object constructed before entering `main', followed by a normal + Linux "finalizer" file, `crtn.o'. */ + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC \ + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/lynx-ng.h gcc-2.7.0/config/lynx-ng.h *** gcc-2.6.3/config/lynx-ng.h Tue Oct 4 15:56:23 1994 --- gcc-2.7.0/config/lynx-ng.h Thu Jun 15 08:50:22 1995 *************** *** 16,20 **** 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 is for backwards compatibility with older Lynx tools, which use --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This is for backwards compatibility with older Lynx tools, which use diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/lynx.h gcc-2.7.0/config/lynx.h *** gcc-2.6.3/config/lynx.h Tue Oct 4 15:56:26 1994 --- gcc-2.7.0/config/lynx.h Thu Jun 15 08:50:49 1995 *************** *** 1,4 **** /* Target independent definitions for LynxOS. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Target independent definitions for LynxOS. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* LynxOS is a multi-platform Unix, similar to SVR3, but not identical. --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* LynxOS is a multi-platform Unix, similar to SVR3, but not identical. *************** *** 37,46 **** #define LIB_SPEC "%{mthreads:-L/lib/thread/} \ %{msystem-v:-lc_v} \ ! %{!msystem-v:%{mposix:-lc_p} -lc}" /* Set the appropriate names for the Lynx startfiles. */ #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{p:pinit1.o%s}%{!p:%{msystem-v:vinit1.o%s}%{!msystem-v:init1.o%s}}" #undef ENDFILE_SPEC --- 38,47 ---- #define LIB_SPEC "%{mthreads:-L/lib/thread/} \ %{msystem-v:-lc_v} \ ! %{!msystem-v:%{mposix:-lc_p} -lc -lm}" /* Set the appropriate names for the Lynx startfiles. */ #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit1.o%s}%{!mthreads:pinit1.o%s}}%{!p:%{msystem-v:vinit1.o%s -e_start}%{!msystem-v:%{mthreads:thread/init1.o%s}%{!mthreads:init1.o%s}}}" #undef ENDFILE_SPEC *************** *** 115,122 **** #undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS \ ! { if (TARGET_SYSTEM_V && profile_flag) \ warning ("-msystem-v and -p are incompatible"); \ if (TARGET_SYSTEM_V && TARGET_THREADS) \ ! warning ("-msystem-v and -mthreads are incompatible"); } /* Define this so that C++ destructors will use atexit, since LynxOS --- 116,125 ---- #undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS \ ! do { \ ! if (TARGET_SYSTEM_V && profile_flag) \ warning ("-msystem-v and -p are incompatible"); \ if (TARGET_SYSTEM_V && TARGET_THREADS) \ ! warning ("-msystem-v and -mthreads are incompatible"); \ ! } while (0) /* Define this so that C++ destructors will use atexit, since LynxOS *************** *** 172,173 **** --- 175,180 ---- #undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_DTORS_BODY + + /* LynxOS doesn't have mcount. */ + #undef FUNCTION_PROFILER + #define FUNCTION_PROFILER(file, profile_label_no) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/3b1.h gcc-2.7.0/config/m68k/3b1.h *** gcc-2.6.3/config/m68k/3b1.h Mon Dec 13 18:58:00 1993 --- gcc-2.7.0/config/m68k/3b1.h Thu Jun 15 15:00:06 1995 *************** *** 19,23 **** 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. */ #define SGS_SWITCH_TABLES /* Different switch table handling */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define SGS_SWITCH_TABLES /* Different switch table handling */ *************** *** 97,105 **** : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ ? downward : none) - - /* Override part of the obstack macros. */ - - #define __PTR_TO_INT(P) ((int)(P)) - #define __INT_TO_PTR(P) ((char *)(P)) /* The 3b1 does not have `atexit'. */ --- 98,101 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/3b1g.h gcc-2.7.0/config/m68k/3b1g.h *** gcc-2.6.3/config/m68k/3b1g.h Sat Oct 2 04:19:37 1993 --- gcc-2.7.0/config/m68k/3b1g.h Thu Jun 15 15:00:53 1995 *************** *** 16,20 **** 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 "m68k/m68k.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" *************** *** 55,62 **** : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ ? downward : none) - - /* Override part of the obstack macros. */ - #define __PTR_TO_INT(P) ((int)(P)) - #define __INT_TO_PTR(P) ((char *)(P)) /* Every structure or union's size must be a multiple of 2 bytes. */ --- 56,59 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/altos3068.h gcc-2.7.0/config/m68k/altos3068.h *** gcc-2.6.3/config/m68k/altos3068.h Sat Oct 2 04:19:40 1993 --- gcc-2.7.0/config/m68k/altos3068.h Thu Jun 15 14:59:08 1995 *************** *** 19,23 **** 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. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/amix.h gcc-2.7.0/config/m68k/amix.h *** gcc-2.6.3/config/m68k/amix.h Mon Dec 13 18:58:45 1993 --- gcc-2.7.0/config/m68k/amix.h Thu Jun 15 15:01:16 1995 *************** *** 18,22 **** 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 "m68k/m68kv4.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68kv4.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/apollo68.h gcc-2.7.0/config/m68k/apollo68.h *** gcc-2.6.3/config/m68k/apollo68.h Mon May 16 11:48:19 1994 --- gcc-2.7.0/config/m68k/apollo68.h Thu Jun 15 15:01:46 1995 *************** *** 16,20 **** 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 "m68k/m68k.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/atari.h gcc-2.7.0/config/m68k/atari.h *** gcc-2.6.3/config/m68k/atari.h Wed Sep 21 05:51:09 1994 --- gcc-2.7.0/config/m68k/atari.h Thu Jun 15 15:02:12 1995 *************** *** 17,21 **** 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 "m68k/m68kv4.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68kv4.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/ccur-GAS.h gcc-2.7.0/config/m68k/ccur-GAS.h *** gcc-2.6.3/config/m68k/ccur-GAS.h Wed Jun 22 20:07:02 1994 --- gcc-2.7.0/config/m68k/ccur-GAS.h Thu Jun 15 15:03:00 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Concurrent 68k version. ! Copyright (C) 1987, 1988 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Concurrent 68k version. ! Copyright (C) 1987, 1988, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ #ifndef MASSCOMP --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef MASSCOMP *************** *** 76,82 **** #define EMPTY_FIELD_BOUNDARY 32 ! /* Allocation boundry in bits for the code of a function */ ! #undef FUNCTION_BOUNDRY ! #define FUNCTION_BOUNDRY 32 /* Make strings long-word aligned so dhrystones will run faster. */ --- 77,83 ---- #define EMPTY_FIELD_BOUNDARY 32 ! /* Allocation boundary in bits for the code of a function */ ! #undef FUNCTION_BOUNDARY ! #define FUNCTION_BOUNDARY 32 /* Make strings long-word aligned so dhrystones will run faster. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/coff.h gcc-2.7.0/config/m68k/coff.h *** gcc-2.6.3/config/m68k/coff.h --- gcc-2.7.0/config/m68k/coff.h Thu Jun 15 15:04:25 1995 *************** *** 0 **** --- 1,151 ---- + /* Definitions of target machine for GNU compiler. + m68k series COFF object files and debugging, version. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file is included after m68k.h by CPU COFF specific files. It + is not a complete target itself. */ + + /* Generate sdb debugging information. */ + + #undef DBX_DEBUGGING_INFO + #define SDB_DEBUGGING_INFO + + /* Output DBX (stabs) debugging information if using -gstabs. */ + + #define DBX_DEBUGGING_INFO + + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG + + /* COFF symbols don't start with an underscore. */ + + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + + /* Use a prefix for local labels, just to be on the save side. */ + + #undef LOCAL_LABEL_PREFIX + #define LOCAL_LABEL_PREFIX "." + + /* Use a register prefix to avoid clashes with external symbols (classic + example: `extern char PC;' in termcap). */ + + #undef REGISTER_PREFIX + #define REGISTER_PREFIX "%" + + /* In the machine description we can't use %R, because it will not be seen + by ASM_FPRINTF. (Isn't that a design bug?). */ + + #undef REGISTER_PREFIX_MD + #define REGISTER_PREFIX_MD "%%" + + /* config/m68k.md has an explicit reference to the program counter, + prefix this by the register prefix. */ + + #define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)" + + /* Here are the new register names. */ + + #undef REGISTER_NAMES + #ifndef SUPPORT_SUN_FPA + #define REGISTER_NAMES \ + {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ + "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ + "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" } + #else /* SUPPORTED_SUN_FPA */ + #define REGISTER_NAMES \ + {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ + "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ + "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \ + "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \ + "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \ + "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \ + "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" } + #endif /* defined SUPPORT_SUN_FPA */ + + #undef ASM_FILE_START + #define ASM_FILE_START(FILE) \ + output_file_directive ((FILE), main_input_filename) + + /* Support the ctors and dtors sections for g++. */ + + #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" + #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" + + /* A list of other sections which the compiler might be "in" at any + given time. */ + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_ctors, in_dtors + + /* A list of extra section function definitions. */ + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + + #define CTORS_SECTION_FUNCTION \ + void \ + ctors_section () \ + { \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ + } + + #define DTORS_SECTION_FUNCTION \ + void \ + dtors_section () \ + { \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ + } + + #define INT_ASM_OP ".long" + + /* A C statement (sans semicolon) to output an element in the table of + global constructors. */ + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. */ + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* Don't assume anything about startfiles. */ + + #define STARTFILE_SPEC "" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/crds.h gcc-2.7.0/config/m68k/crds.h *** gcc-2.6.3/config/m68k/crds.h Thu Nov 10 19:10:10 1994 --- gcc-2.7.0/config/m68k/crds.h Thu Jun 15 15:05:23 1995 *************** *** 18,22 **** 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. */ #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ *************** *** 128,136 **** : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ ? downward : none) - - /* Override part of the obstack macros. */ - - #define __PTR_TO_INT(P) ((int)(P)) - #define __INT_TO_PTR(P) ((char *)(P)) /* Override parts of m68k.h to fit the CRuDS assembler. */ --- 129,132 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/ctix.h gcc-2.7.0/config/m68k/ctix.h *** gcc-2.6.3/config/m68k/ctix.h Sat Oct 2 04:19:50 1993 --- gcc-2.7.0/config/m68k/ctix.h Thu Jun 15 15:06:13 1995 *************** *** 27,31 **** 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 "m68k/3b1g.h" --- 27,32 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/3b1g.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/dpx2.h gcc-2.7.0/config/m68k/dpx2.h *** gcc-2.6.3/config/m68k/dpx2.h Wed Mar 30 17:36:18 1994 --- gcc-2.7.0/config/m68k/dpx2.h Thu Jun 15 15:06:31 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/dpx2cdbx.h gcc-2.7.0/config/m68k/dpx2cdbx.h *** gcc-2.6.3/config/m68k/dpx2cdbx.h Mon May 30 10:40:57 1994 --- gcc-2.7.0/config/m68k/dpx2cdbx.h Thu Jun 15 15:06:50 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/fpgnulib.c gcc-2.7.0/config/m68k/fpgnulib.c *** gcc-2.6.3/config/m68k/fpgnulib.c --- gcc-2.7.0/config/m68k/fpgnulib.c Fri Mar 10 14:04:02 1995 *************** *** 0 **** --- 1,442 ---- + /* This is a stripped down version of floatlib.c. It supplies only those + functions which exist in libgcc, but for which there is not assembly + language versions in m68k/lb1sf68.asm. + + It also includes simplistic support for extended floats (by working in + double precision). You must compile this file again with -DEXTFLOAT + to get this support. */ + + /* + ** gnulib support for software floating point. + ** Copyright (C) 1991 by Pipeline Associates, Inc. All rights reserved. + ** Permission is granted to do *anything* you want with this file, + ** commercial or otherwise, provided this message remains intact. So there! + ** I would appreciate receiving any updates/patches/changes that anyone + ** makes, and am willing to be the repository for said changes (am I + ** making a big mistake?). + ** + ** Pat Wood + ** Pipeline Associates, Inc. + ** pipeline!phw@motown.com or + ** sun!pipeline!phw or + ** uunet!motown!pipeline!phw + ** + ** 05/01/91 -- V1.0 -- first release to gcc mailing lists + ** 05/04/91 -- V1.1 -- added float and double prototypes and return values + ** -- fixed problems with adding and subtracting zero + ** -- fixed rounding in truncdfsf2 + ** -- fixed SWAP define and tested on 386 + */ + + /* + ** The following are routines that replace the gnulib soft floating point + ** routines that are called automatically when -msoft-float is selected. + ** The support single and double precision IEEE format, with provisions + ** for byte-swapped machines (tested on 386). Some of the double-precision + ** routines work at full precision, but most of the hard ones simply punt + ** and call the single precision routines, producing a loss of accuracy. + ** long long support is not assumed or included. + ** Overall accuracy is close to IEEE (actually 68882) for single-precision + ** arithmetic. I think there may still be a 1 in 1000 chance of a bit + ** being rounded the wrong way during a multiply. I'm not fussy enough to + ** bother with it, but if anyone is, knock yourself out. + ** + ** Efficiency has only been addressed where it was obvious that something + ** would make a big difference. Anyone who wants to do this right for + ** best speed should go in and rewrite in assembler. + ** + ** I have tested this only on a 68030 workstation and 386/ix integrated + ** in with -msoft-float. + */ + + /* the following deal with IEEE single-precision numbers */ + #define EXCESS 126L + #define SIGNBIT 0x80000000L + #define HIDDEN (1L << 23L) + #define SIGN(fp) ((fp) & SIGNBIT) + #define EXP(fp) (((fp) >> 23L) & 0xFF) + #define MANT(fp) (((fp) & 0x7FFFFFL) | HIDDEN) + #define PACK(s,e,m) ((s) | ((e) << 23L) | (m)) + + /* the following deal with IEEE double-precision numbers */ + #define EXCESSD 1022 + #define HIDDEND (1L << 20L) + #define EXPDBITS 11 + #define EXPDMASK 0x7FF + #define EXPD(fp) (((fp.l.upper) >> 20L) & 0x7FFL) + #define SIGND(fp) ((fp.l.upper) & SIGNBIT) + #define MANTD(fp) (((((fp.l.upper) & 0xFFFFF) | HIDDEND) << 10) | \ + (fp.l.lower >> 22)) + #define MANTDMASK 0xFFFFF /* mask of upper part */ + + /* the following deal with IEEE extended-precision numbers */ + #define EXCESSX 16382 + #define HIDDENX (1L << 31L) + #define EXPXBITS 15 + #define EXPXMASK 0x7FFF + #define EXPX(fp) (((fp.l.upper) >> 16) & EXPXMASK) + #define SIGNX(fp) ((fp.l.upper) & SIGNBIT) + #define MANTXMASK 0x7FFFFFFF /* mask of upper part */ + + union double_long + { + double d; + struct { + long upper; + unsigned long lower; + } l; + }; + + union float_long { + float f; + long l; + }; + + union long_double_long + { + long double ld; + struct + { + long upper; + unsigned long middle; + unsigned long lower; + } l; + }; + + #ifndef EXTFLOAT + + /* convert int to double */ + double + __floatsidf (int a1) + { + long sign = 0, exp = 31 + EXCESSD; + union double_long dl; + + if (!a1) + { + dl.l.upper = dl.l.lower = 0; + return dl.d; + } + + if (a1 < 0) + { + sign = SIGNBIT; + a1 = -a1; + if (a1 < 0) + { + dl.l.upper = SIGNBIT | ((32 + EXCESSD) << 20L); + dl.l.lower = 0; + return dl.d; + } + } + + while (a1 < 0x1000000) + { + a1 <<= 4; + exp -= 4; + } + + while (a1 < 0x40000000) + { + a1 <<= 1; + exp--; + } + + /* pack up and go home */ + dl.l.upper = sign; + dl.l.upper |= exp << 20L; + dl.l.upper |= (a1 >> 10L) & ~HIDDEND; + dl.l.lower = a1 << 22L; + + return dl.d; + } + + /* convert int to float */ + float + __floatsisf (int l) + { + double foo = __floatsidf (l); + return foo; + } + + /* convert float to double */ + double + __extendsfdf2 (float a1) + { + register union float_long fl1; + register union double_long dl; + register long exp; + + fl1.f = a1; + + if (!fl1.l) + { + dl.l.upper = dl.l.lower = 0; + return dl.d; + } + + dl.l.upper = SIGN (fl1.l); + exp = EXP (fl1.l) - EXCESS + EXCESSD; + dl.l.upper |= exp << 20; + dl.l.upper |= (MANT (fl1.l) & ~HIDDEN) >> 3; + dl.l.lower = MANT (fl1.l) << 29; + + return dl.d; + } + + /* convert double to float */ + float + __truncdfsf2 (double a1) + { + register long exp; + register long mant; + register union float_long fl; + register union double_long dl1; + + dl1.d = a1; + + if (!dl1.l.upper && !dl1.l.lower) + return 0; + + exp = EXPD (dl1) - EXCESSD + EXCESS; + + /* shift double mantissa 6 bits so we can round */ + mant = MANTD (dl1) >> 6; + + /* now round and shift down */ + mant += 1; + mant >>= 1; + + /* did the round overflow? */ + if (mant & 0xFF000000) + { + mant >>= 1; + exp++; + } + + mant &= ~HIDDEN; + + /* pack up and go home */ + fl.l = PACK (SIGND (dl1), exp, mant); + return (fl.f); + } + + /* convert double to int */ + int + __fixdfsi (double a1) + { + register union double_long dl1; + register long exp; + register long l; + + dl1.d = a1; + + if (!dl1.l.upper && !dl1.l.lower) + return 0; + + exp = EXPD (dl1) - EXCESSD - 31; + l = MANTD (dl1); + + if (exp > 0) + { + /* Return largest integer. */ + return SIGND (dl1) ? 0x80000000 : 0x7fffffff; + } + + if (exp <= -32) + return 0; + + /* shift down until exp = 0 */ + if (exp < 0) + l >>= -exp; + + return (SIGND (dl1) ? -l : l); + } + + /* convert float to int */ + int + __fixsfsi (float a1) + { + double foo = a1; + return __fixdfsi (foo); + } + + #else /* EXTFLOAT */ + + /* Primitive extended precision floating point support. + + We assume all numbers are normalized, don't do any rounding, etc. */ + + /* Prototypes for the above in case we use them. */ + double __floatsidf (int); + float __floatsisf (int); + double __extendsfdf2 (float); + float __truncdfsf2 (double); + int __fixdfsi (double); + int __fixsfsi (float); + + /* convert double to long double */ + long double + __extenddfxf2 (double d) + { + register union double_long dl; + register union long_double_long ldl; + register long exp; + + dl.d = d; + /*printf ("dfxf in: %g\n", d);*/ + + if (!dl.l.upper && !dl.l.lower) + return 0; + + ldl.l.upper = SIGND (dl); + exp = EXPD (dl) - EXCESSD + EXCESSX; + ldl.l.upper |= exp << 16; + ldl.l.middle = HIDDENX; + /* 31-20: # mantissa bits in ldl.l.middle - # mantissa bits in dl.l.upper */ + ldl.l.middle |= (dl.l.upper & MANTDMASK) << (31 - 20); + /* 1+20: explicit-integer-bit + # mantissa bits in dl.l.upper */ + ldl.l.middle |= dl.l.lower >> (1 + 20); + /* 32 - 21: # bits of dl.l.lower in ldl.l.middle */ + ldl.l.lower = dl.l.lower << (32 - 21); + + /*printf ("dfxf out: %s\n", dumpxf (ldl.ld));*/ + return ldl.ld; + } + + /* convert long double to double */ + double + __truncxfdf2 (long double ld) + { + register long exp; + register union double_long dl; + register union long_double_long ldl; + + ldl.ld = ld; + /*printf ("xfdf in: %s\n", dumpxf (ld));*/ + + if (!ldl.l.upper && !ldl.l.middle && !ldl.l.lower) + return 0; + + exp = EXPX (ldl) - EXCESSX + EXCESSD; + /* ??? quick and dirty: keep `exp' sane */ + if (exp >= EXPDMASK) + exp = EXPDMASK - 1; + dl.l.upper = SIGNX (ldl); + dl.l.upper |= exp << (32 - (EXPDBITS + 1)); + /* +1-1: add one for sign bit, but take one off for explicit-integer-bit */ + dl.l.upper |= (ldl.l.middle & MANTXMASK) >> (EXPDBITS + 1 - 1); + dl.l.lower = (ldl.l.middle & MANTXMASK) << (32 - (EXPDBITS + 1 - 1)); + dl.l.lower |= ldl.l.lower >> (EXPDBITS + 1 - 1); + + /*printf ("xfdf out: %g\n", dl.d);*/ + return dl.d; + } + + /* convert a float to a long double */ + long double + __extendsfxf2 (float f) + { + long double foo = __extenddfxf2 (__extendsfdf2 (f)); + return foo; + } + + /* convert a long double to a float */ + float + __truncxfsf2 (long double ld) + { + float foo = __truncdfsf2 (__truncxfdf2 (ld)); + return foo; + } + + /* convert an int to a long double */ + long double + __floatsixf (int l) + { + double foo = __floatsidf (l); + return foo; + } + + /* convert a long double to an int */ + int + __fixxfsi (long double ld) + { + int foo = __fixdfsi ((double) ld); + return foo; + } + + /* The remaining provide crude math support by working in double precision. */ + + long double + __addxf3 (long double x1, long double x2) + { + return (double) x1 + (double) x2; + } + + long double + __subxf3 (long double x1, long double x2) + { + return (double) x1 - (double) x2; + } + + long double + __mulxf3 (long double x1, long double x2) + { + return (double) x1 * (double) x2; + } + + long double + __divxf3 (long double x1, long double x2) + { + return (double) x1 / (double) x2; + } + + long double + __negxf2 (long double x1) + { + return - (double) x1; + } + + long + __cmpxf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + long + __eqxf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + long + __nexf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + long + __ltxf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + long + __lexf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + long + __gtxf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + long + __gexf2 (long double x1, long double x2) + { + return __cmpdf2 ((double) x1, (double) x2); + } + + #endif /* EXTFLOAT */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/hp2bsd.h gcc-2.7.0/config/m68k/hp2bsd.h *** gcc-2.6.3/config/m68k/hp2bsd.h Sat Oct 2 04:19:59 1993 --- gcc-2.7.0/config/m68k/hp2bsd.h Thu Jun 15 15:07:05 1995 *************** *** 16,20 **** 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 "m68k/m68k.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/hp320.h gcc-2.7.0/config/m68k/hp320.h *** gcc-2.6.3/config/m68k/hp320.h Thu Nov 10 17:47:34 1994 --- gcc-2.7.0/config/m68k/hp320.h Thu Jun 15 15:07:22 1995 *************** *** 16,20 **** 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. */ /* Define USE_GAS if GCC is supposed to work with the GNU assembler, --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Define USE_GAS if GCC is supposed to work with the GNU assembler, *************** *** 602,606 **** || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X))) ! /* hpux8 and later have C++ compatable include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C --- 603,607 ---- || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X))) ! /* hpux8 and later have C++ compatible include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/hp3bsd44.h gcc-2.7.0/config/m68k/hp3bsd44.h *** gcc-2.6.3/config/m68k/hp3bsd44.h Sat Oct 2 04:20:09 1993 --- gcc-2.7.0/config/m68k/hp3bsd44.h Fri Mar 31 18:34:01 1995 *************** *** 1,3 **** - #include #include "m68k/m68k.h" --- 1,2 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/isi.h gcc-2.7.0/config/m68k/isi.h *** gcc-2.6.3/config/m68k/isi.h Sun Nov 21 06:24:42 1993 --- gcc-2.7.0/config/m68k/isi.h Thu Jun 15 15:07:54 1995 *************** *** 17,21 **** 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 "m68k/m68k.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/lb1sf68.asm gcc-2.7.0/config/m68k/lb1sf68.asm *** gcc-2.6.3/config/m68k/lb1sf68.asm --- gcc-2.7.0/config/m68k/lb1sf68.asm Thu Jun 15 15:08:27 1995 *************** *** 0 **** --- 1,2976 ---- + /* libgcc1 routines for 68000 w/o floating-point hardware. */ + /* Copyright (C) 1994 Free Software Foundation, Inc. + + This file 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 2, or (at your option) any + later version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file with other programs, and to distribute + those programs without any restriction coming from the use of this + file. (The General Public License restrictions do apply in other + respects; for example, they cover modification of the file, and + distribution when not linked into another program.) + + This file 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; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, if you link this library with files + compiled with GCC to produce an executable, this does not cause + the resulting executable to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + + /* Use this one for any 680x0; assumes no floating point hardware. + The trailing " '" appearing on some lines is for ANSI preprocessors. Yuk. + Some of this code comes from MINIX, via the folks at ericsson. + D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992 + */ + + /* These are predefined by new versions of GNU cpp. */ + + #ifndef __USER_LABEL_PREFIX__ + #define __USER_LABEL_PREFIX__ _ + #endif + + #ifndef __REGISTER_PREFIX__ + #define __REGISTER_PREFIX__ + #endif + + #ifndef __IMMEDIATE_PREFIX__ + #define __IMMEDIATE_PREFIX__ # + #endif + + /* ANSI concatenation macros. */ + + #define CONCAT1(a, b) CONCAT2(a, b) + #define CONCAT2(a, b) a ## b + + /* Use the right prefix for global labels. */ + + #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) + + /* Use the right prefix for registers. */ + + #define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) + + /* Use the right prefix for immediate values. */ + + #define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x) + + #define d0 REG (d0) + #define d1 REG (d1) + #define d2 REG (d2) + #define d3 REG (d3) + #define d4 REG (d4) + #define d5 REG (d5) + #define d6 REG (d6) + #define d7 REG (d7) + #define a0 REG (a0) + #define a1 REG (a1) + #define a2 REG (a2) + #define a3 REG (a3) + #define a4 REG (a4) + #define a5 REG (a5) + #define a6 REG (a6) + #define fp REG (fp) + #define sp REG (sp) + + #ifdef L_floatex + + | This is an attempt at a decent floating point (single, double and + | extended double) code for the GNU C compiler. It should be easy to + | adapt to other compilers (but beware of the local labels!). + + | Starting date: 21 October, 1990 + + | It is convenient to introduce the notation (s,e,f) for a floating point + | number, where s=sign, e=exponent, f=fraction. We will call a floating + | point number fpn to abbreviate, independently of the precision. + | Let MAX_EXP be in each case the maximum exponent (255 for floats, 1023 + | for doubles and 16383 for long doubles). We then have the following + | different cases: + | 1. Normalized fpns have 0 < e < MAX_EXP. They correspond to + | (-1)^s x 1.f x 2^(e-bias-1). + | 2. Denormalized fpns have e=0. They correspond to numbers of the form + | (-1)^s x 0.f x 2^(-bias). + | 3. +/-INFINITY have e=MAX_EXP, f=0. + | 4. Quiet NaN (Not a Number) have all bits set. + | 5. Signaling NaN (Not a Number) have s=0, e=MAX_EXP, f=1. + + |============================================================================= + | exceptions + |============================================================================= + + | This is the floating point condition code register (_fpCCR): + | + | struct { + | short _exception_bits; + | short _trap_enable_bits; + | short _sticky_bits; + | short _rounding_mode; + | short _format; + | short _last_operation; + | union { + | float sf; + | double df; + | } _operand1; + | union { + | float sf; + | double df; + | } _operand2; + | } _fpCCR; + + .data + .even + + .globl SYM (_fpCCR) + + SYM (_fpCCR): + __exception_bits: + .word 0 + __trap_enable_bits: + .word 0 + __sticky_bits: + .word 0 + __rounding_mode: + .word ROUND_TO_NEAREST + __format: + .word NIL + __last_operation: + .word NOOP + __operand1: + .long 0 + .long 0 + __operand2: + .long 0 + .long 0 + + | Offsets: + EBITS = __exception_bits - SYM (_fpCCR) + TRAPE = __trap_enable_bits - SYM (_fpCCR) + STICK = __sticky_bits - SYM (_fpCCR) + ROUND = __rounding_mode - SYM (_fpCCR) + FORMT = __format - SYM (_fpCCR) + LASTO = __last_operation - SYM (_fpCCR) + OPER1 = __operand1 - SYM (_fpCCR) + OPER2 = __operand2 - SYM (_fpCCR) + + | The following exception types are supported: + INEXACT_RESULT = 0x0001 + UNDERFLOW = 0x0002 + OVERFLOW = 0x0004 + DIVIDE_BY_ZERO = 0x0008 + INVALID_OPERATION = 0x0010 + + | The allowed rounding modes are: + UNKNOWN = -1 + ROUND_TO_NEAREST = 0 | round result to nearest representable value + ROUND_TO_ZERO = 1 | round result towards zero + ROUND_TO_PLUS = 2 | round result towards plus infinity + ROUND_TO_MINUS = 3 | round result towards minus infinity + + | The allowed values of format are: + NIL = 0 + SINGLE_FLOAT = 1 + DOUBLE_FLOAT = 2 + LONG_FLOAT = 3 + + | The allowed values for the last operation are: + NOOP = 0 + ADD = 1 + MULTIPLY = 2 + DIVIDE = 3 + NEGATE = 4 + COMPARE = 5 + EXTENDSFDF = 6 + TRUNCDFSF = 7 + + |============================================================================= + | __clear_sticky_bits + |============================================================================= + + | The sticky bits are normally not cleared (thus the name), whereas the + | exception type and exception value reflect the last computation. + | This routine is provided to clear them (you can also write to _fpCCR, + | since it is globally visible). + + .globl SYM (__clear_sticky_bit) + + .text + .even + + | void __clear_sticky_bits(void); + SYM (__clear_sticky_bit): + lea SYM (_fpCCR),a0 + movew IMM (0),a0@(STICK) + rts + + |============================================================================= + | $_exception_handler + |============================================================================= + + .globl $_exception_handler + + .text + .even + + | This is the common exit point if an exception occurs. + | NOTE: it is NOT callable from C! + | It expects the exception type in d7, the format (SINGLE_FLOAT, + | DOUBLE_FLOAT or LONG_FLOAT) in d6, and the last operation code in d5. + | It sets the corresponding exception and sticky bits, and the format. + | Depending on the format if fills the corresponding slots for the + | operands which produced the exception (all this information is provided + | so if you write your own exception handlers you have enough information + | to deal with the problem). + | Then checks to see if the corresponding exception is trap-enabled, + | in which case it pushes the address of _fpCCR and traps through + | trap FPTRAP (15 for the moment). + + FPTRAP = 15 + + $_exception_handler: + lea SYM (_fpCCR),a0 + movew d7,a0@(EBITS) | set __exception_bits + orw d7,a0@(STICK) | and __sticky_bits + movew d6,a0@(FORMT) | and __format + movew d5,a0@(LASTO) | and __last_operation + + | Now put the operands in place: + cmpw IMM (SINGLE_FLOAT),d6 + beq 1f + movel a6@(8),a0@(OPER1) + movel a6@(12),a0@(OPER1+4) + movel a6@(16),a0@(OPER2) + movel a6@(20),a0@(OPER2+4) + bra 2f + 1: movel a6@(8),a0@(OPER1) + movel a6@(12),a0@(OPER2) + 2: + | And check whether the exception is trap-enabled: + andw a0@(TRAPE),d7 | is exception trap-enabled? + beq 1f | no, exit + pea SYM (_fpCCR) | yes, push address of _fpCCR + trap IMM (FPTRAP) | and trap + 1: moveml sp@+,d2-d7 | restore data registers + unlk a6 | and return + rts + #endif /* L_floatex */ + + #ifdef L_mulsi3 + .text + .proc + .globl SYM (__mulsi3) + SYM (__mulsi3): + movew sp@(4), d0 /* x0 -> d0 */ + muluw sp@(10), d0 /* x0*y1 */ + movew sp@(6), d1 /* x1 -> d1 */ + muluw sp@(8), d1 /* x1*y0 */ + addw d1, d0 + swap d0 + clrw d0 + movew sp@(6), d1 /* x1 -> d1 */ + muluw sp@(10), d1 /* x1*y1 */ + addl d1, d0 + + rts + #endif /* L_mulsi3 */ + + #ifdef L_udivsi3 + .text + .proc + .globl SYM (__udivsi3) + SYM (__udivsi3): + movel d2, sp@- + movel sp@(12), d1 /* d1 = divisor */ + movel sp@(8), d0 /* d0 = dividend */ + + cmpl IMM (0x10000), d1 /* divisor >= 2 ^ 16 ? */ + jcc L3 /* then try next algorithm */ + movel d0, d2 + clrw d2 + swap d2 + divu d1, d2 /* high quotient in lower word */ + movew d2, d0 /* save high quotient */ + swap d0 + movew sp@(10), d2 /* get low dividend + high rest */ + divu d1, d2 /* low quotient */ + movew d2, d0 + jra L6 + + L3: movel d1, d2 /* use d2 as divisor backup */ + L4: lsrl IMM (1), d1 /* shift divisor */ + lsrl IMM (1), d0 /* shift dividend */ + cmpl IMM (0x10000), d1 /* still divisor >= 2 ^ 16 ? */ + jcc L4 + divu d1, d0 /* now we have 16 bit divisor */ + andl IMM (0xffff), d0 /* mask out divisor, ignore remainder */ + + /* Multiply the 16 bit tentative quotient with the 32 bit divisor. Because of + the operand ranges, this might give a 33 bit product. If this product is + greater than the dividend, the tentative quotient was too large. */ + movel d2, d1 + mulu d0, d1 /* low part, 32 bits */ + swap d2 + mulu d0, d2 /* high part, at most 17 bits */ + swap d2 /* align high part with low part */ + btst IMM (0), d2 /* high part 17 bits? */ + jne L5 /* if 17 bits, quotient was too large */ + addl d2, d1 /* add parts */ + jcs L5 /* if sum is 33 bits, quotient was too large */ + cmpl sp@(8), d1 /* compare the sum with the dividend */ + jls L6 /* if sum > dividend, quotient was too large */ + L5: subql IMM (1), d0 /* adjust quotient */ + + L6: movel sp@+, d2 + rts + #endif /* L_udivsi3 */ + + #ifdef L_divsi3 + .text + .proc + .globl SYM (__divsi3) + SYM (__divsi3): + movel d2, sp@- + + moveb IMM (1), d2 /* sign of result stored in d2 (=1 or =-1) */ + movel sp@(12), d1 /* d1 = divisor */ + jpl L1 + negl d1 + negb d2 /* change sign because divisor <0 */ + L1: movel sp@(8), d0 /* d0 = dividend */ + jpl L2 + negl d0 + negb d2 + + L2: movel d1, sp@- + movel d0, sp@- + jbsr SYM (__udivsi3) /* divide abs(dividend) by abs(divisor) */ + addql IMM (8), sp + + tstb d2 + jpl L3 + negl d0 + + L3: movel sp@+, d2 + rts + #endif /* L_divsi3 */ + + #ifdef L_umodsi3 + .text + .proc + .globl SYM (__umodsi3) + SYM (__umodsi3): + movel sp@(8), d1 /* d1 = divisor */ + movel sp@(4), d0 /* d0 = dividend */ + movel d1, sp@- + movel d0, sp@- + jbsr SYM (__udivsi3) + addql IMM (8), sp + movel sp@(8), d1 /* d1 = divisor */ + movel d1, sp@- + movel d0, sp@- + jbsr SYM (__mulsi3) /* d0 = (a/b)*b */ + addql IMM (8), sp + movel sp@(4), d1 /* d1 = dividend */ + subl d0, d1 /* d1 = a - (a/b)*b */ + movel d1, d0 + rts + #endif /* L_umodsi3 */ + + #ifdef L_modsi3 + .text + .proc + .globl SYM (__modsi3) + SYM (__modsi3): + movel sp@(8), d1 /* d1 = divisor */ + movel sp@(4), d0 /* d0 = dividend */ + movel d1, sp@- + movel d0, sp@- + jbsr SYM (__divsi3) + addql IMM (8), sp + movel sp@(8), d1 /* d1 = divisor */ + movel d1, sp@- + movel d0, sp@- + jbsr SYM (__mulsi3) /* d0 = (a/b)*b */ + addql IMM (8), sp + movel sp@(4), d1 /* d1 = dividend */ + subl d0, d1 /* d1 = a - (a/b)*b */ + movel d1, d0 + rts + #endif /* L_modsi3 */ + + + #ifdef L_double + + .globl SYM (_fpCCR) + .globl $_exception_handler + + QUIET_NaN = 0xffffffff + + D_MAX_EXP = 0x07ff + D_BIAS = 1022 + DBL_MAX_EXP = D_MAX_EXP - D_BIAS + DBL_MIN_EXP = 1 - D_BIAS + DBL_MANT_DIG = 53 + + INEXACT_RESULT = 0x0001 + UNDERFLOW = 0x0002 + OVERFLOW = 0x0004 + DIVIDE_BY_ZERO = 0x0008 + INVALID_OPERATION = 0x0010 + + DOUBLE_FLOAT = 2 + + NOOP = 0 + ADD = 1 + MULTIPLY = 2 + DIVIDE = 3 + NEGATE = 4 + COMPARE = 5 + EXTENDSFDF = 6 + TRUNCDFSF = 7 + + UNKNOWN = -1 + ROUND_TO_NEAREST = 0 | round result to nearest representable value + ROUND_TO_ZERO = 1 | round result towards zero + ROUND_TO_PLUS = 2 | round result towards plus infinity + ROUND_TO_MINUS = 3 | round result towards minus infinity + + | Entry points: + + .globl SYM (__adddf3) + .globl SYM (__subdf3) + .globl SYM (__muldf3) + .globl SYM (__divdf3) + .globl SYM (__negdf2) + .globl SYM (__cmpdf2) + + .text + .even + + | These are common routines to return and signal exceptions. + + Ld$den: + | Return and signal a denormalized number + orl d7,d0 + movew IMM (UNDERFLOW),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (DOUBLE_FLOAT),d6 + jmp $_exception_handler + + Ld$infty: + Ld$overflow: + | Return a properly signed INFINITY and set the exception flags + movel IMM (0x7ff00000),d0 + movel IMM (0),d1 + orl d7,d0 + movew IMM (OVERFLOW),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (DOUBLE_FLOAT),d6 + jmp $_exception_handler + + Ld$underflow: + | Return 0 and set the exception flags + movel IMM (0),d0 + movel d0,d1 + movew IMM (UNDERFLOW),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (DOUBLE_FLOAT),d6 + jmp $_exception_handler + + Ld$inop: + | Return a quiet NaN and set the exception flags + movel IMM (QUIET_NaN),d0 + movel d0,d1 + movew IMM (INVALID_OPERATION),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (DOUBLE_FLOAT),d6 + jmp $_exception_handler + + Ld$div$0: + | Return a properly signed INFINITY and set the exception flags + movel IMM (0x7ff00000),d0 + movel IMM (0),d1 + orl d7,d0 + movew IMM (DIVIDE_BY_ZERO),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (DOUBLE_FLOAT),d6 + jmp $_exception_handler + + |============================================================================= + |============================================================================= + | double precision routines + |============================================================================= + |============================================================================= + + | A double precision floating point number (double) has the format: + | + | struct _double { + | unsigned int sign : 1; /* sign bit */ + | unsigned int exponent : 11; /* exponent, shifted by 126 */ + | unsigned int fraction : 52; /* fraction */ + | } double; + | + | Thus sizeof(double) = 8 (64 bits). + | + | All the routines are callable from C programs, and return the result + | in the register pair d0-d1. They also preserve all registers except + | d0-d1 and a0-a1. + + |============================================================================= + | __subdf3 + |============================================================================= + + | double __subdf3(double, double); + SYM (__subdf3): + bchg IMM (31),sp@(12) | change sign of second operand + | and fall through, so we always add + |============================================================================= + | __adddf3 + |============================================================================= + + | double __adddf3(double, double); + SYM (__adddf3): + link a6,IMM (0) | everything will be done in registers + moveml d2-d7,sp@- | save all data registers and a2 (but d0-d1) + movel a6@(8),d0 | get first operand + movel a6@(12),d1 | + movel a6@(16),d2 | get second operand + movel a6@(20),d3 | + + movel d0,d7 | get d0's sign bit in d7 ' + addl d1,d1 | check and clear sign bit of a, and gain one + addxl d0,d0 | bit of extra precision + beq Ladddf$b | if zero return second operand + + movel d2,d6 | save sign in d6 + addl d3,d3 | get rid of sign bit and gain one bit of + addxl d2,d2 | extra precision + beq Ladddf$a | if zero return first operand + + andl IMM (0x80000000),d7 | isolate a's sign bit ' + swap d6 | and also b's sign bit ' + andw IMM (0x8000),d6 | + orw d6,d7 | and combine them into d7, so that a's sign ' + | bit is in the high word and b's is in the ' + | low word, so d6 is free to be used + movel d7,a0 | now save d7 into a0, so d7 is free to + | be used also + + | Get the exponents and check for denormalized and/or infinity. + + movel IMM (0x001fffff),d6 | mask for the fraction + movel IMM (0x00200000),d7 | mask to put hidden bit back + + movel d0,d4 | + andl d6,d0 | get fraction in d0 + notl d6 | make d6 into mask for the exponent + andl d6,d4 | get exponent in d4 + beq Ladddf$a$den | branch if a is denormalized + cmpl d6,d4 | check for INFINITY or NaN + beq Ladddf$nf | + orl d7,d0 | and put hidden bit back + Ladddf$1: + swap d4 | shift right exponent so that it starts + lsrw IMM (5),d4 | in bit 0 and not bit 20 + | Now we have a's exponent in d4 and fraction in d0-d1 ' + movel d2,d5 | save b to get exponent + andl d6,d5 | get exponent in d5 + beq Ladddf$b$den | branch if b is denormalized + cmpl d6,d5 | check for INFINITY or NaN + beq Ladddf$nf + notl d6 | make d6 into mask for the fraction again + andl d6,d2 | and get fraction in d2 + orl d7,d2 | and put hidden bit back + Ladddf$2: + swap d5 | shift right exponent so that it starts + lsrw IMM (5),d5 | in bit 0 and not bit 20 + + | Now we have b's exponent in d5 and fraction in d2-d3. ' + + | The situation now is as follows: the signs are combined in a0, the + | numbers are in d0-d1 (a) and d2-d3 (b), and the exponents in d4 (a) + | and d5 (b). To do the rounding correctly we need to keep all the + | bits until the end, so we need to use d0-d1-d2-d3 for the first number + | and d4-d5-d6-d7 for the second. To do this we store (temporarily) the + | exponents in a2-a3. + + moveml a2-a3,sp@- | save the address registers + + movel d4,a2 | save the exponents + movel d5,a3 | + + movel IMM (0),d7 | and move the numbers around + movel d7,d6 | + movel d3,d5 | + movel d2,d4 | + movel d7,d3 | + movel d7,d2 | + + | Here we shift the numbers until the exponents are the same, and put + | the largest exponent in a2. + exg d4,a2 | get exponents back + exg d5,a3 | + cmpw d4,d5 | compare the exponents + beq Ladddf$3 | if equal don't shift ' + bhi 9f | branch if second exponent is higher + + | Here we have a's exponent larger than b's, so we have to shift b. We do + | this by using as counter d2: + 1: movew d4,d2 | move largest exponent to d2 + subw d5,d2 | and subtract second exponent + exg d4,a2 | get back the longs we saved + exg d5,a3 | + | if difference is too large we don't shift (actually, we can just exit) ' + cmpw IMM (DBL_MANT_DIG+2),d2 + bge Ladddf$b$small + cmpw IMM (32),d2 | if difference >= 32, shift by longs + bge 5f + 2: cmpw IMM (16),d2 | if difference >= 16, shift by words + bge 6f + bra 3f | enter dbra loop + + 4: lsrl IMM (1),d4 + roxrl IMM (1),d5 + roxrl IMM (1),d6 + roxrl IMM (1),d7 + 3: dbra d2,4b + movel IMM (0),d2 + movel d2,d3 + bra Ladddf$4 + 5: + movel d6,d7 + movel d5,d6 + movel d4,d5 + movel IMM (0),d4 + subw IMM (32),d2 + bra 2b + 6: + movew d6,d7 + swap d7 + movew d5,d6 + swap d6 + movew d4,d5 + swap d5 + movew IMM (0),d4 + swap d4 + subw IMM (16),d2 + bra 3b + + 9: exg d4,d5 + movew d4,d6 + subw d5,d6 | keep d5 (largest exponent) in d4 + exg d4,a2 + exg d5,a3 + | if difference is too large we don't shift (actually, we can just exit) ' + cmpw IMM (DBL_MANT_DIG+2),d6 + bge Ladddf$a$small + cmpw IMM (32),d6 | if difference >= 32, shift by longs + bge 5f + 2: cmpw IMM (16),d6 | if difference >= 16, shift by words + bge 6f + bra 3f | enter dbra loop + + 4: lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + 3: dbra d6,4b + movel IMM (0),d7 + movel d7,d6 + bra Ladddf$4 + 5: + movel d2,d3 + movel d1,d2 + movel d0,d1 + movel IMM (0),d0 + subw IMM (32),d6 + bra 2b + 6: + movew d2,d3 + swap d3 + movew d1,d2 + swap d2 + movew d0,d1 + swap d1 + movew IMM (0),d0 + swap d0 + subw IMM (16),d6 + bra 3b + Ladddf$3: + exg d4,a2 + exg d5,a3 + Ladddf$4: + | Now we have the numbers in d0--d3 and d4--d7, the exponent in a2, and + | the signs in a4. + + | Here we have to decide whether to add or subtract the numbers: + exg d7,a0 | get the signs + exg d6,a3 | a3 is free to be used + movel d7,d6 | + movew IMM (0),d7 | get a's sign in d7 ' + swap d6 | + movew IMM (0),d6 | and b's sign in d6 ' + eorl d7,d6 | compare the signs + bmi Lsubdf$0 | if the signs are different we have + | to subtract + exg d7,a0 | else we add the numbers + exg d6,a3 | + addl d7,d3 | + addxl d6,d2 | + addxl d5,d1 | + addxl d4,d0 | + + movel a2,d4 | return exponent to d4 + movel a0,d7 | + andl IMM (0x80000000),d7 | d7 now has the sign + + moveml sp@+,a2-a3 + + | Before rounding normalize so bit #DBL_MANT_DIG is set (we will consider + | the case of denormalized numbers in the rounding routine itself). + | As in the addition (not in the subtraction!) we could have set + | one more bit we check this: + btst IMM (DBL_MANT_DIG+1),d0 + beq 1f + lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + addw IMM (1),d4 + 1: + lea Ladddf$5,a0 | to return from rounding routine + lea SYM (_fpCCR),a1 | check the rounding mode + movew a1@(6),d6 | rounding mode in d6 + beq Lround$to$nearest + cmpw IMM (ROUND_TO_PLUS),d6 + bhi Lround$to$minus + blt Lround$to$zero + bra Lround$to$plus + Ladddf$5: + | Put back the exponent and check for overflow + cmpw IMM (0x7ff),d4 | is the exponent big? + bge 1f + bclr IMM (DBL_MANT_DIG-1),d0 + lslw IMM (4),d4 | put exponent back into position + swap d0 | + orw d4,d0 | + swap d0 | + bra Ladddf$ret + 1: + movew IMM (ADD),d5 + bra Ld$overflow + + Lsubdf$0: + | Here we do the subtraction. + exg d7,a0 | put sign back in a0 + exg d6,a3 | + subl d7,d3 | + subxl d6,d2 | + subxl d5,d1 | + subxl d4,d0 | + beq Ladddf$ret$1 | if zero just exit + bpl 1f | if positive skip the following + exg d7,a0 | + bchg IMM (31),d7 | change sign bit in d7 + exg d7,a0 | + negl d3 | + negxl d2 | + negxl d1 | and negate result + negxl d0 | + 1: + movel a2,d4 | return exponent to d4 + movel a0,d7 + andl IMM (0x80000000),d7 | isolate sign bit + moveml sp@+,a2-a3 | + + | Before rounding normalize so bit #DBL_MANT_DIG is set (we will consider + | the case of denormalized numbers in the rounding routine itself). + | As in the addition (not in the subtraction!) we could have set + | one more bit we check this: + btst IMM (DBL_MANT_DIG+1),d0 + beq 1f + lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + addw IMM (1),d4 + 1: + lea Lsubdf$1,a0 | to return from rounding routine + lea SYM (_fpCCR),a1 | check the rounding mode + movew a1@(6),d6 | rounding mode in d6 + beq Lround$to$nearest + cmpw IMM (ROUND_TO_PLUS),d6 + bhi Lround$to$minus + blt Lround$to$zero + bra Lround$to$plus + Lsubdf$1: + | Put back the exponent and sign (we don't have overflow). ' + bclr IMM (DBL_MANT_DIG-1),d0 + lslw IMM (4),d4 | put exponent back into position + swap d0 | + orw d4,d0 | + swap d0 | + bra Ladddf$ret + + | If one of the numbers was too small (difference of exponents >= + | DBL_MANT_DIG+1) we return the other (and now we don't have to ' + | check for finiteness or zero). + Ladddf$a$small: + moveml sp@+,a2-a3 + movel a6@(16),d0 + movel a6@(20),d1 + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 | restore data registers + unlk a6 | and return + rts + + Ladddf$b$small: + moveml sp@+,a2-a3 + movel a6@(8),d0 + movel a6@(12),d1 + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 | restore data registers + unlk a6 | and return + rts + + Ladddf$a$den: + movel d7,d4 | d7 contains 0x00200000 + bra Ladddf$1 + + Ladddf$b$den: + movel d7,d5 | d7 contains 0x00200000 + notl d6 + bra Ladddf$2 + + Ladddf$b: + | Return b (if a is zero) + movel d2,d0 + movel d3,d1 + bra 1f + Ladddf$a: + movel a6@(8),d0 + movel a6@(12),d1 + 1: + movew IMM (ADD),d5 + | Check for NaN and +/-INFINITY. + movel d0,d7 | + andl IMM (0x80000000),d7 | + bclr IMM (31),d0 | + cmpl IMM (0x7ff00000),d0 | + bge 2f | + movel d0,d0 | check for zero, since we don't ' + bne Ladddf$ret | want to return -0 by mistake + bclr IMM (31),d7 | + bra Ladddf$ret | + 2: + andl IMM (0x000fffff),d0 | check for NaN (nonzero fraction) + orl d1,d0 | + bne Ld$inop | + bra Ld$infty | + + Ladddf$ret$1: + moveml sp@+,a2-a3 | restore regs and exit + + Ladddf$ret: + | Normal exit. + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + orl d7,d0 | put sign bit back + moveml sp@+,d2-d7 + unlk a6 + rts + + Ladddf$ret$den: + | Return a denormalized number. + lsrl IMM (1),d0 | shift right once more + roxrl IMM (1),d1 | + bra Ladddf$ret + + Ladddf$nf: + movew IMM (ADD),d5 + | This could be faster but it is not worth the effort, since it is not + | executed very often. We sacrifice speed for clarity here. + movel a6@(8),d0 | get the numbers back (remember that we + movel a6@(12),d1 | did some processing already) + movel a6@(16),d2 | + movel a6@(20),d3 | + movel IMM (0x7ff00000),d4 | useful constant (INFINITY) + movel d0,d7 | save sign bits + movel d2,d6 | + bclr IMM (31),d0 | clear sign bits + bclr IMM (31),d2 | + | We know that one of them is either NaN of +/-INFINITY + | Check for NaN (if either one is NaN return NaN) + cmpl d4,d0 | check first a (d0) + bhi Ld$inop | if d0 > 0x7ff00000 or equal and + bne 2f + tstl d1 | d1 > 0, a is NaN + bne Ld$inop | + 2: cmpl d4,d2 | check now b (d1) + bhi Ld$inop | + bne 3f + tstl d3 | + bne Ld$inop | + 3: + | Now comes the check for +/-INFINITY. We know that both are (maybe not + | finite) numbers, but we have to check if both are infinite whether we + | are adding or subtracting them. + eorl d7,d6 | to check sign bits + bmi 1f + andl IMM (0x80000000),d7 | get (common) sign bit + bra Ld$infty + 1: + | We know one (or both) are infinite, so we test for equality between the + | two numbers (if they are equal they have to be infinite both, so we + | return NaN). + cmpl d2,d0 | are both infinite? + bne 1f | if d0 <> d2 they are not equal + cmpl d3,d1 | if d0 == d2 test d3 and d1 + beq Ld$inop | if equal return NaN + 1: + andl IMM (0x80000000),d7 | get a's sign bit ' + cmpl d4,d0 | test now for infinity + beq Ld$infty | if a is INFINITY return with this sign + bchg IMM (31),d7 | else we know b is INFINITY and has + bra Ld$infty | the opposite sign + + |============================================================================= + | __muldf3 + |============================================================================= + + | double __muldf3(double, double); + SYM (__muldf3): + link a6,IMM (0) + moveml d2-d7,sp@- + movel a6@(8),d0 | get a into d0-d1 + movel a6@(12),d1 | + movel a6@(16),d2 | and b into d2-d3 + movel a6@(20),d3 | + movel d0,d7 | d7 will hold the sign of the product + eorl d2,d7 | + andl IMM (0x80000000),d7 | + movel d7,a0 | save sign bit into a0 + movel IMM (0x7ff00000),d7 | useful constant (+INFINITY) + movel d7,d6 | another (mask for fraction) + notl d6 | + bclr IMM (31),d0 | get rid of a's sign bit ' + movel d0,d4 | + orl d1,d4 | + beq Lmuldf$a$0 | branch if a is zero + movel d0,d4 | + bclr IMM (31),d2 | get rid of b's sign bit ' + movel d2,d5 | + orl d3,d5 | + beq Lmuldf$b$0 | branch if b is zero + movel d2,d5 | + cmpl d7,d0 | is a big? + bhi Lmuldf$inop | if a is NaN return NaN + beq Lmuldf$a$nf | we still have to check d1 and b ... + cmpl d7,d2 | now compare b with INFINITY + bhi Lmuldf$inop | is b NaN? + beq Lmuldf$b$nf | we still have to check d3 ... + | Here we have both numbers finite and nonzero (and with no sign bit). + | Now we get the exponents into d4 and d5. + andl d7,d4 | isolate exponent in d4 + beq Lmuldf$a$den | if exponent zero, have denormalized + andl d6,d0 | isolate fraction + orl IMM (0x00100000),d0 | and put hidden bit back + swap d4 | I like exponents in the first byte + lsrw IMM (4),d4 | + Lmuldf$1: + andl d7,d5 | + beq Lmuldf$b$den | + andl d6,d2 | + orl IMM (0x00100000),d2 | and put hidden bit back + swap d5 | + lsrw IMM (4),d5 | + Lmuldf$2: | + addw d5,d4 | add exponents + subw IMM (D_BIAS+1),d4 | and subtract bias (plus one) + + | We are now ready to do the multiplication. The situation is as follows: + | both a and b have bit 52 ( bit 20 of d0 and d2) set (even if they were + | denormalized to start with!), which means that in the product bit 104 + | (which will correspond to bit 8 of the fourth long) is set. + + | Here we have to do the product. + | To do it we have to juggle the registers back and forth, as there are not + | enough to keep everything in them. So we use the address registers to keep + | some intermediate data. + + moveml a2-a3,sp@- | save a2 and a3 for temporary use + movel IMM (0),a2 | a2 is a null register + movel d4,a3 | and a3 will preserve the exponent + + | First, shift d2-d3 so bit 20 becomes bit 31: + rorl IMM (5),d2 | rotate d2 5 places right + swap d2 | and swap it + rorl IMM (5),d3 | do the same thing with d3 + swap d3 | + movew d3,d6 | get the rightmost 11 bits of d3 + andw IMM (0x07ff),d6 | + orw d6,d2 | and put them into d2 + andw IMM (0xf800),d3 | clear those bits in d3 + + movel d2,d6 | move b into d6-d7 + movel d3,d7 | move a into d4-d5 + movel d0,d4 | and clear d0-d1-d2-d3 (to put result) + movel d1,d5 | + movel IMM (0),d3 | + movel d3,d2 | + movel d3,d1 | + movel d3,d0 | + + | We use a1 as counter: + movel IMM (DBL_MANT_DIG-1),a1 + exg d7,a1 + + 1: exg d7,a1 | put counter back in a1 + addl d3,d3 | shift sum once left + addxl d2,d2 | + addxl d1,d1 | + addxl d0,d0 | + addl d7,d7 | + addxl d6,d6 | + bcc 2f | if bit clear skip the following + exg d7,a2 | + addl d5,d3 | else add a to the sum + addxl d4,d2 | + addxl d7,d1 | + addxl d7,d0 | + exg d7,a2 | + 2: exg d7,a1 | put counter in d7 + dbf d7,1b | decrement and branch + + movel a3,d4 | restore exponent + moveml sp@+,a2-a3 + + | Now we have the product in d0-d1-d2-d3, with bit 8 of d0 set. The + | first thing to do now is to normalize it so bit 8 becomes bit + | DBL_MANT_DIG-32 (to do the rounding); later we will shift right. + swap d0 + swap d1 + movew d1,d0 + swap d2 + movew d2,d1 + swap d3 + movew d3,d2 + movew IMM (0),d3 + lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + + | Now round, check for over- and underflow, and exit. + movel a0,d7 | get sign bit back into d7 + movew IMM (MULTIPLY),d5 + + btst IMM (DBL_MANT_DIG+1-32),d0 + beq Lround$exit + lsrl IMM (1),d0 + roxrl IMM (1),d1 + addw IMM (1),d4 + bra Lround$exit + + Lmuldf$inop: + movew IMM (MULTIPLY),d5 + bra Ld$inop + + Lmuldf$b$nf: + movew IMM (MULTIPLY),d5 + movel a0,d7 | get sign bit back into d7 + tstl d3 | we know d2 == 0x7ff00000, so check d3 + bne Ld$inop | if d3 <> 0 b is NaN + bra Ld$overflow | else we have overflow (since a is finite) + + Lmuldf$a$nf: + movew IMM (MULTIPLY),d5 + movel a0,d7 | get sign bit back into d7 + tstl d1 | we know d0 == 0x7ff00000, so check d1 + bne Ld$inop | if d1 <> 0 a is NaN + bra Ld$overflow | else signal overflow + + | If either number is zero return zero, unless the other is +/-INFINITY or + | NaN, in which case we return NaN. + Lmuldf$b$0: + movew IMM (MULTIPLY),d5 + exg d2,d0 | put b (==0) into d0-d1 + exg d3,d1 | and a (with sign bit cleared) into d2-d3 + bra 1f + Lmuldf$a$0: + movel a6@(16),d2 | put b into d2-d3 again + movel a6@(20),d3 | + bclr IMM (31),d2 | clear sign bit + 1: cmpl IMM (0x7ff00000),d2 | check for non-finiteness + bge Ld$inop | in case NaN or +/-INFINITY return NaN + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 + unlk a6 + rts + + | If a number is denormalized we put an exponent of 1 but do not put the + | hidden bit back into the fraction; instead we shift left until bit 21 + | (the hidden bit) is set, adjusting the exponent accordingly. We do this + | to ensure that the product of the fractions is close to 1. + Lmuldf$a$den: + movel IMM (1),d4 + andl d6,d0 + 1: addl d1,d1 | shift a left until bit 20 is set + addxl d0,d0 | + subw IMM (1),d4 | and adjust exponent + btst IMM (20),d0 | + bne Lmuldf$1 | + bra 1b + + Lmuldf$b$den: + movel IMM (1),d5 + andl d6,d2 + 1: addl d3,d3 | shift b left until bit 20 is set + addxl d2,d2 | + subw IMM (1),d5 | and adjust exponent + btst IMM (20),d2 | + bne Lmuldf$2 | + bra 1b + + + |============================================================================= + | __divdf3 + |============================================================================= + + | double __divdf3(double, double); + SYM (__divdf3): + link a6,IMM (0) + moveml d2-d7,sp@- + movel a6@(8),d0 | get a into d0-d1 + movel a6@(12),d1 | + movel a6@(16),d2 | and b into d2-d3 + movel a6@(20),d3 | + movel d0,d7 | d7 will hold the sign of the result + eorl d2,d7 | + andl IMM (0x80000000),d7 + movel d7,a0 | save sign into a0 + movel IMM (0x7ff00000),d7 | useful constant (+INFINITY) + movel d7,d6 | another (mask for fraction) + notl d6 | + bclr IMM (31),d0 | get rid of a's sign bit ' + movel d0,d4 | + orl d1,d4 | + beq Ldivdf$a$0 | branch if a is zero + movel d0,d4 | + bclr IMM (31),d2 | get rid of b's sign bit ' + movel d2,d5 | + orl d3,d5 | + beq Ldivdf$b$0 | branch if b is zero + movel d2,d5 + cmpl d7,d0 | is a big? + bhi Ldivdf$inop | if a is NaN return NaN + beq Ldivdf$a$nf | if d0 == 0x7ff00000 we check d1 + cmpl d7,d2 | now compare b with INFINITY + bhi Ldivdf$inop | if b is NaN return NaN + beq Ldivdf$b$nf | if d2 == 0x7ff00000 we check d3 + | Here we have both numbers finite and nonzero (and with no sign bit). + | Now we get the exponents into d4 and d5 and normalize the numbers to + | ensure that the ratio of the fractions is around 1. We do this by + | making sure that both numbers have bit #DBL_MANT_DIG-32-1 (hidden bit) + | set, even if they were denormalized to start with. + | Thus, the result will satisfy: 2 > result > 1/2. + andl d7,d4 | and isolate exponent in d4 + beq Ldivdf$a$den | if exponent is zero we have a denormalized + andl d6,d0 | and isolate fraction + orl IMM (0x00100000),d0 | and put hidden bit back + swap d4 | I like exponents in the first byte + lsrw IMM (4),d4 | + Ldivdf$1: | + andl d7,d5 | + beq Ldivdf$b$den | + andl d6,d2 | + orl IMM (0x00100000),d2 + swap d5 | + lsrw IMM (4),d5 | + Ldivdf$2: | + subw d5,d4 | subtract exponents + addw IMM (D_BIAS),d4 | and add bias + + | We are now ready to do the division. We have prepared things in such a way + | that the ratio of the fractions will be less than 2 but greater than 1/2. + | At this point the registers in use are: + | d0-d1 hold a (first operand, bit DBL_MANT_DIG-32=0, bit + | DBL_MANT_DIG-1-32=1) + | d2-d3 hold b (second operand, bit DBL_MANT_DIG-32=1) + | d4 holds the difference of the exponents, corrected by the bias + | a0 holds the sign of the ratio + + | To do the rounding correctly we need to keep information about the + | nonsignificant bits. One way to do this would be to do the division + | using four registers; another is to use two registers (as originally + | I did), but use a sticky bit to preserve information about the + | fractional part. Note that we can keep that info in a1, which is not + | used. + movel IMM (0),d6 | d6-d7 will hold the result + movel d6,d7 | + movel IMM (0),a1 | and a1 will hold the sticky bit + + movel IMM (DBL_MANT_DIG-32+1),d5 + + 1: cmpl d0,d2 | is a < b? + bhi 3f | if b > a skip the following + beq 4f | if d0==d2 check d1 and d3 + 2: subl d3,d1 | + subxl d2,d0 | a <-- a - b + bset d5,d6 | set the corresponding bit in d6 + 3: addl d1,d1 | shift a by 1 + addxl d0,d0 | + dbra d5,1b | and branch back + bra 5f + 4: cmpl d1,d3 | here d0==d2, so check d1 and d3 + bhi 3b | if d1 > d2 skip the subtraction + bra 2b | else go do it + 5: + | Here we have to start setting the bits in the second long. + movel IMM (31),d5 | again d5 is counter + + 1: cmpl d0,d2 | is a < b? + bhi 3f | if b > a skip the following + beq 4f | if d0==d2 check d1 and d3 + 2: subl d3,d1 | + subxl d2,d0 | a <-- a - b + bset d5,d7 | set the corresponding bit in d7 + 3: addl d1,d1 | shift a by 1 + addxl d0,d0 | + dbra d5,1b | and branch back + bra 5f + 4: cmpl d1,d3 | here d0==d2, so check d1 and d3 + bhi 3b | if d1 > d2 skip the subtraction + bra 2b | else go do it + 5: + | Now go ahead checking until we hit a one, which we store in d2. + movel IMM (DBL_MANT_DIG),d5 + 1: cmpl d2,d0 | is a < b? + bhi 4f | if b < a, exit + beq 3f | if d0==d2 check d1 and d3 + 2: addl d1,d1 | shift a by 1 + addxl d0,d0 | + dbra d5,1b | and branch back + movel IMM (0),d2 | here no sticky bit was found + movel d2,d3 + bra 5f + 3: cmpl d1,d3 | here d0==d2, so check d1 and d3 + bhi 2b | if d1 > d2 go back + 4: + | Here put the sticky bit in d2-d3 (in the position which actually corresponds + | to it; if you don't do this the algorithm loses in some cases). ' + movel IMM (0),d2 + movel d2,d3 + subw IMM (DBL_MANT_DIG),d5 + addw IMM (63),d5 + cmpw IMM (31),d5 + bhi 2f + 1: bset d5,d3 + bra 5f + subw IMM (32),d5 + 2: bset d5,d2 + 5: + | Finally we are finished! Move the longs in the address registers to + | their final destination: + movel d6,d0 + movel d7,d1 + movel IMM (0),d3 + + | Here we have finished the division, with the result in d0-d1-d2-d3, with + | 2^21 <= d6 < 2^23. Thus bit 23 is not set, but bit 22 could be set. + | If it is not, then definitely bit 21 is set. Normalize so bit 22 is + | not set: + btst IMM (DBL_MANT_DIG-32+1),d0 + beq 1f + lsrl IMM (1),d0 + roxrl IMM (1),d1 + roxrl IMM (1),d2 + roxrl IMM (1),d3 + addw IMM (1),d4 + 1: + | Now round, check for over- and underflow, and exit. + movel a0,d7 | restore sign bit to d7 + movew IMM (DIVIDE),d5 + bra Lround$exit + + Ldivdf$inop: + movew IMM (DIVIDE),d5 + bra Ld$inop + + Ldivdf$a$0: + | If a is zero check to see whether b is zero also. In that case return + | NaN; then check if b is NaN, and return NaN also in that case. Else + | return zero. + movew IMM (DIVIDE),d5 + bclr IMM (31),d2 | + movel d2,d4 | + orl d3,d4 | + beq Ld$inop | if b is also zero return NaN + cmpl IMM (0x7ff00000),d2 | check for NaN + bhi Ld$inop | + blt 1f | + tstl d3 | + bne Ld$inop | + 1: movel IMM (0),d0 | else return zero + movel d0,d1 | + lea SYM (_fpCCR),a0 | clear exception flags + movew IMM (0),a0@ | + moveml sp@+,d2-d7 | + unlk a6 | + rts | + + Ldivdf$b$0: + movew IMM (DIVIDE),d5 + | If we got here a is not zero. Check if a is NaN; in that case return NaN, + | else return +/-INFINITY. Remember that a is in d0 with the sign bit + | cleared already. + movel a0,d7 | put a's sign bit back in d7 ' + cmpl IMM (0x7ff00000),d0 | compare d0 with INFINITY + bhi Ld$inop | if larger it is NaN + tstl d1 | + bne Ld$inop | + bra Ld$div$0 | else signal DIVIDE_BY_ZERO + + Ldivdf$b$nf: + movew IMM (DIVIDE),d5 + | If d2 == 0x7ff00000 we have to check d3. + tstl d3 | + bne Ld$inop | if d3 <> 0, b is NaN + bra Ld$underflow | else b is +/-INFINITY, so signal underflow + + Ldivdf$a$nf: + movew IMM (DIVIDE),d5 + | If d0 == 0x7ff00000 we have to check d1. + tstl d1 | + bne Ld$inop | if d1 <> 0, a is NaN + | If a is INFINITY we have to check b + cmpl d7,d2 | compare b with INFINITY + bge Ld$inop | if b is NaN or INFINITY return NaN + tstl d3 | + bne Ld$inop | + bra Ld$overflow | else return overflow + + | If a number is denormalized we put an exponent of 1 but do not put the + | bit back into the fraction. + Ldivdf$a$den: + movel IMM (1),d4 + andl d6,d0 + 1: addl d1,d1 | shift a left until bit 20 is set + addxl d0,d0 + subw IMM (1),d4 | and adjust exponent + btst IMM (DBL_MANT_DIG-32-1),d0 + bne Ldivdf$1 + bra 1b + + Ldivdf$b$den: + movel IMM (1),d5 + andl d6,d2 + 1: addl d3,d3 | shift b left until bit 20 is set + addxl d2,d2 + subw IMM (1),d5 | and adjust exponent + btst IMM (DBL_MANT_DIG-32-1),d2 + bne Ldivdf$2 + bra 1b + + Lround$exit: + | This is a common exit point for __muldf3 and __divdf3. When they enter + | this point the sign of the result is in d7, the result in d0-d1, normalized + | so that 2^21 <= d0 < 2^22, and the exponent is in the lower byte of d4. + + | First check for underlow in the exponent: + cmpw IMM (-DBL_MANT_DIG-1),d4 + blt Ld$underflow + | It could happen that the exponent is less than 1, in which case the + | number is denormalized. In this case we shift right and adjust the + | exponent until it becomes 1 or the fraction is zero (in the latter case + | we signal underflow and return zero). + movel d7,a0 | + movel IMM (0),d6 | use d6-d7 to collect bits flushed right + movel d6,d7 | use d6-d7 to collect bits flushed right + cmpw IMM (1),d4 | if the exponent is less than 1 we + bge 2f | have to shift right (denormalize) + 1: addw IMM (1),d4 | adjust the exponent + lsrl IMM (1),d0 | shift right once + roxrl IMM (1),d1 | + roxrl IMM (1),d2 | + roxrl IMM (1),d3 | + roxrl IMM (1),d6 | + roxrl IMM (1),d7 | + cmpw IMM (1),d4 | is the exponent 1 already? + beq 2f | if not loop back + bra 1b | + bra Ld$underflow | safety check, shouldn't execute ' + 2: orl d6,d2 | this is a trick so we don't lose ' + orl d7,d3 | the bits which were flushed right + movel a0,d7 | get back sign bit into d7 + | Now call the rounding routine (which takes care of denormalized numbers): + lea Lround$0,a0 | to return from rounding routine + lea SYM (_fpCCR),a1 | check the rounding mode + movew a1@(6),d6 | rounding mode in d6 + beq Lround$to$nearest + cmpw IMM (ROUND_TO_PLUS),d6 + bhi Lround$to$minus + blt Lround$to$zero + bra Lround$to$plus + Lround$0: + | Here we have a correctly rounded result (either normalized or denormalized). + + | Here we should have either a normalized number or a denormalized one, and + | the exponent is necessarily larger or equal to 1 (so we don't have to ' + | check again for underflow!). We have to check for overflow or for a + | denormalized number (which also signals underflow). + | Check for overflow (i.e., exponent >= 0x7ff). + cmpw IMM (0x07ff),d4 + bge Ld$overflow + | Now check for a denormalized number (exponent==0): + movew d4,d4 + beq Ld$den + 1: + | Put back the exponents and sign and return. + lslw IMM (4),d4 | exponent back to fourth byte + bclr IMM (DBL_MANT_DIG-32-1),d0 + swap d0 | and put back exponent + orw d4,d0 | + swap d0 | + orl d7,d0 | and sign also + + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 + unlk a6 + rts + + |============================================================================= + | __negdf2 + |============================================================================= + + | double __negdf2(double, double); + SYM (__negdf2): + link a6,IMM (0) + moveml d2-d7,sp@- + movew IMM (NEGATE),d5 + movel a6@(8),d0 | get number to negate in d0-d1 + movel a6@(12),d1 | + bchg IMM (31),d0 | negate + movel d0,d2 | make a positive copy (for the tests) + bclr IMM (31),d2 | + movel d2,d4 | check for zero + orl d1,d4 | + beq 2f | if zero (either sign) return +zero + cmpl IMM (0x7ff00000),d2 | compare to +INFINITY + blt 1f | if finite, return + bhi Ld$inop | if larger (fraction not zero) is NaN + tstl d1 | if d2 == 0x7ff00000 check d1 + bne Ld$inop | + movel d0,d7 | else get sign and return INFINITY + andl IMM (0x80000000),d7 + bra Ld$infty + 1: lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 + unlk a6 + rts + 2: bclr IMM (31),d0 + bra 1b + + |============================================================================= + | __cmpdf2 + |============================================================================= + + GREATER = 1 + LESS = -1 + EQUAL = 0 + + | int __cmpdf2(double, double); + SYM (__cmpdf2): + link a6,IMM (0) + moveml d2-d7,sp@- | save registers + movew IMM (COMPARE),d5 + movel a6@(8),d0 | get first operand + movel a6@(12),d1 | + movel a6@(16),d2 | get second operand + movel a6@(20),d3 | + | First check if a and/or b are (+/-) zero and in that case clear + | the sign bit. + movel d0,d6 | copy signs into d6 (a) and d7(b) + bclr IMM (31),d0 | and clear signs in d0 and d2 + movel d2,d7 | + bclr IMM (31),d2 | + cmpl IMM (0x7fff0000),d0 | check for a == NaN + bhi Ld$inop | if d0 > 0x7ff00000, a is NaN + beq Lcmpdf$a$nf | if equal can be INFINITY, so check d1 + movel d0,d4 | copy into d4 to test for zero + orl d1,d4 | + beq Lcmpdf$a$0 | + Lcmpdf$0: + cmpl IMM (0x7fff0000),d2 | check for b == NaN + bhi Ld$inop | if d2 > 0x7ff00000, b is NaN + beq Lcmpdf$b$nf | if equal can be INFINITY, so check d3 + movel d2,d4 | + orl d3,d4 | + beq Lcmpdf$b$0 | + Lcmpdf$1: + | Check the signs + eorl d6,d7 + bpl 1f + | If the signs are not equal check if a >= 0 + tstl d6 + bpl Lcmpdf$a$gt$b | if (a >= 0 && b < 0) => a > b + bmi Lcmpdf$b$gt$a | if (a < 0 && b >= 0) => a < b + 1: + | If the signs are equal check for < 0 + tstl d6 + bpl 1f + | If both are negative exchange them + exg d0,d2 + exg d1,d3 + 1: + | Now that they are positive we just compare them as longs (does this also + | work for denormalized numbers?). + cmpl d0,d2 + bhi Lcmpdf$b$gt$a | |b| > |a| + bne Lcmpdf$a$gt$b | |b| < |a| + | If we got here d0 == d2, so we compare d1 and d3. + cmpl d1,d3 + bhi Lcmpdf$b$gt$a | |b| > |a| + bne Lcmpdf$a$gt$b | |b| < |a| + | If we got here a == b. + movel IMM (EQUAL),d0 + moveml sp@+,d2-d7 | put back the registers + unlk a6 + rts + Lcmpdf$a$gt$b: + movel IMM (GREATER),d0 + moveml sp@+,d2-d7 | put back the registers + unlk a6 + rts + Lcmpdf$b$gt$a: + movel IMM (LESS),d0 + moveml sp@+,d2-d7 | put back the registers + unlk a6 + rts + + Lcmpdf$a$0: + bclr IMM (31),d6 + bra Lcmpdf$0 + Lcmpdf$b$0: + bclr IMM (31),d7 + bra Lcmpdf$1 + + Lcmpdf$a$nf: + tstl d1 + bne Ld$inop + bra Lcmpdf$0 + + Lcmpdf$b$nf: + tstl d3 + bne Ld$inop + bra Lcmpdf$1 + + |============================================================================= + | rounding routines + |============================================================================= + + | The rounding routines expect the number to be normalized in registers + | d0-d1-d2-d3, with the exponent in register d4. They assume that the + | exponent is larger or equal to 1. They return a properly normalized number + | if possible, and a denormalized number otherwise. The exponent is returned + | in d4. + + Lround$to$nearest: + | We now normalize as suggested by D. Knuth ("Seminumerical Algorithms"): + | Here we assume that the exponent is not too small (this should be checked + | before entering the rounding routine), but the number could be denormalized. + + | Check for denormalized numbers: + 1: btst IMM (DBL_MANT_DIG-32),d0 + bne 2f | if set the number is normalized + | Normalize shifting left until bit #DBL_MANT_DIG-32 is set or the exponent + | is one (remember that a denormalized number corresponds to an + | exponent of -D_BIAS+1). + cmpw IMM (1),d4 | remember that the exponent is at least one + beq 2f | an exponent of one means denormalized + addl d3,d3 | else shift and adjust the exponent + addxl d2,d2 | + addxl d1,d1 | + addxl d0,d0 | + dbra d4,1b | + 2: + | Now round: we do it as follows: after the shifting we can write the + | fraction part as f + delta, where 1 < f < 2^25, and 0 <= delta <= 2. + | If delta < 1, do nothing. If delta > 1, add 1 to f. + | If delta == 1, we make sure the rounded number will be even (odd?) + | (after shifting). + btst IMM (0),d1 | is delta < 1? + beq 2f | if so, do not do anything + orl d2,d3 | is delta == 1? + bne 1f | if so round to even + movel d1,d3 | + andl IMM (2),d3 | bit 1 is the last significant bit + movel IMM (0),d2 | + addl d3,d1 | + addxl d2,d0 | + bra 2f | + 1: movel IMM (1),d3 | else add 1 + movel IMM (0),d2 | + addl d3,d1 | + addxl d2,d0 + | Shift right once (because we used bit #DBL_MANT_DIG-32!). + 2: lsrl IMM (1),d0 + roxrl IMM (1),d1 + + | Now check again bit #DBL_MANT_DIG-32 (rounding could have produced a + | 'fraction overflow' ...). + btst IMM (DBL_MANT_DIG-32),d0 + beq 1f + lsrl IMM (1),d0 + roxrl IMM (1),d1 + addw IMM (1),d4 + 1: + | If bit #DBL_MANT_DIG-32-1 is clear we have a denormalized number, so we + | have to put the exponent to zero and return a denormalized number. + btst IMM (DBL_MANT_DIG-32-1),d0 + beq 1f + jmp a0@ + 1: movel IMM (0),d4 + jmp a0@ + + Lround$to$zero: + Lround$to$plus: + Lround$to$minus: + jmp a0@ + #endif /* L_double */ + + #ifdef L_float + + .globl SYM (_fpCCR) + .globl $_exception_handler + + QUIET_NaN = 0xffffffff + SIGNL_NaN = 0x7f800001 + INFINITY = 0x7f800000 + + F_MAX_EXP = 0xff + F_BIAS = 126 + FLT_MAX_EXP = F_MAX_EXP - F_BIAS + FLT_MIN_EXP = 1 - F_BIAS + FLT_MANT_DIG = 24 + + INEXACT_RESULT = 0x0001 + UNDERFLOW = 0x0002 + OVERFLOW = 0x0004 + DIVIDE_BY_ZERO = 0x0008 + INVALID_OPERATION = 0x0010 + + SINGLE_FLOAT = 1 + + NOOP = 0 + ADD = 1 + MULTIPLY = 2 + DIVIDE = 3 + NEGATE = 4 + COMPARE = 5 + EXTENDSFDF = 6 + TRUNCDFSF = 7 + + UNKNOWN = -1 + ROUND_TO_NEAREST = 0 | round result to nearest representable value + ROUND_TO_ZERO = 1 | round result towards zero + ROUND_TO_PLUS = 2 | round result towards plus infinity + ROUND_TO_MINUS = 3 | round result towards minus infinity + + | Entry points: + + .globl SYM (__addsf3) + .globl SYM (__subsf3) + .globl SYM (__mulsf3) + .globl SYM (__divsf3) + .globl SYM (__negsf2) + .globl SYM (__cmpsf2) + + | These are common routines to return and signal exceptions. + + .text + .even + + Lf$den: + | Return and signal a denormalized number + orl d7,d0 + movew IMM (UNDERFLOW),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (SINGLE_FLOAT),d6 + jmp $_exception_handler + + Lf$infty: + Lf$overflow: + | Return a properly signed INFINITY and set the exception flags + movel IMM (INFINITY),d0 + orl d7,d0 + movew IMM (OVERFLOW),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (SINGLE_FLOAT),d6 + jmp $_exception_handler + + Lf$underflow: + | Return 0 and set the exception flags + movel IMM (0),d0 + movew IMM (UNDERFLOW),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (SINGLE_FLOAT),d6 + jmp $_exception_handler + + Lf$inop: + | Return a quiet NaN and set the exception flags + movel IMM (QUIET_NaN),d0 + movew IMM (INVALID_OPERATION),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (SINGLE_FLOAT),d6 + jmp $_exception_handler + + Lf$div$0: + | Return a properly signed INFINITY and set the exception flags + movel IMM (INFINITY),d0 + orl d7,d0 + movew IMM (DIVIDE_BY_ZERO),d7 + orw IMM (INEXACT_RESULT),d7 + movew IMM (SINGLE_FLOAT),d6 + jmp $_exception_handler + + |============================================================================= + |============================================================================= + | single precision routines + |============================================================================= + |============================================================================= + + | A single precision floating point number (float) has the format: + | + | struct _float { + | unsigned int sign : 1; /* sign bit */ + | unsigned int exponent : 8; /* exponent, shifted by 126 */ + | unsigned int fraction : 23; /* fraction */ + | } float; + | + | Thus sizeof(float) = 4 (32 bits). + | + | All the routines are callable from C programs, and return the result + | in the single register d0. They also preserve all registers except + | d0-d1 and a0-a1. + + |============================================================================= + | __subsf3 + |============================================================================= + + | float __subsf3(float, float); + SYM (__subsf3): + bchg IMM (31),sp@(8) | change sign of second operand + | and fall through + |============================================================================= + | __addsf3 + |============================================================================= + + | float __addsf3(float, float); + SYM (__addsf3): + link a6,IMM (0) | everything will be done in registers + moveml d2-d7,sp@- | save all data registers but d0-d1 + movel a6@(8),d0 | get first operand + movel a6@(12),d1 | get second operand + movel d0,d6 | get d0's sign bit ' + addl d0,d0 | check and clear sign bit of a + beq Laddsf$b | if zero return second operand + movel d1,d7 | save b's sign bit ' + addl d1,d1 | get rid of sign bit + beq Laddsf$a | if zero return first operand + + movel d6,a0 | save signs in address registers + movel d7,a1 | so we can use d6 and d7 + + | Get the exponents and check for denormalized and/or infinity. + + movel IMM (0x00ffffff),d4 | mask to get fraction + movel IMM (0x01000000),d5 | mask to put hidden bit back + + movel d0,d6 | save a to get exponent + andl d4,d0 | get fraction in d0 + notl d4 | make d4 into a mask for the exponent + andl d4,d6 | get exponent in d6 + beq Laddsf$a$den | branch if a is denormalized + cmpl d4,d6 | check for INFINITY or NaN + beq Laddsf$nf + swap d6 | put exponent into first word + orl d5,d0 | and put hidden bit back + Laddsf$1: + | Now we have a's exponent in d6 (second byte) and the mantissa in d0. ' + movel d1,d7 | get exponent in d7 + andl d4,d7 | + beq Laddsf$b$den | branch if b is denormalized + cmpl d4,d7 | check for INFINITY or NaN + beq Laddsf$nf + swap d7 | put exponent into first word + notl d4 | make d4 into a mask for the fraction + andl d4,d1 | get fraction in d1 + orl d5,d1 | and put hidden bit back + Laddsf$2: + | Now we have b's exponent in d7 (second byte) and the mantissa in d1. ' + + | Note that the hidden bit corresponds to bit #FLT_MANT_DIG-1, and we + | shifted right once, so bit #FLT_MANT_DIG is set (so we have one extra + | bit). + + movel d1,d2 | move b to d2, since we want to use + | two registers to do the sum + movel IMM (0),d1 | and clear the new ones + movel d1,d3 | + + | Here we shift the numbers in registers d0 and d1 so the exponents are the + | same, and put the largest exponent in d6. Note that we are using two + | registers for each number (see the discussion by D. Knuth in "Seminumerical + | Algorithms"). + cmpw d6,d7 | compare exponents + beq Laddsf$3 | if equal don't shift ' + bhi 5f | branch if second exponent largest + 1: + subl d6,d7 | keep the largest exponent + negl d7 + lsrw IMM (8),d7 | put difference in lower byte + | if difference is too large we don't shift (actually, we can just exit) ' + cmpw IMM (FLT_MANT_DIG+2),d7 + bge Laddsf$b$small + cmpw IMM (16),d7 | if difference >= 16 swap + bge 4f + 2: + subw IMM (1),d7 + 3: lsrl IMM (1),d2 | shift right second operand + roxrl IMM (1),d3 + dbra d7,3b + bra Laddsf$3 + 4: + movew d2,d3 + swap d3 + movew d3,d2 + swap d2 + subw IMM (16),d7 + bne 2b | if still more bits, go back to normal case + bra Laddsf$3 + 5: + exg d6,d7 | exchange the exponents + subl d6,d7 | keep the largest exponent + negl d7 | + lsrw IMM (8),d7 | put difference in lower byte + | if difference is too large we don't shift (and exit!) ' + cmpw IMM (FLT_MANT_DIG+2),d7 + bge Laddsf$a$small + cmpw IMM (16),d7 | if difference >= 16 swap + bge 8f + 6: + subw IMM (1),d7 + 7: lsrl IMM (1),d0 | shift right first operand + roxrl IMM (1),d1 + dbra d7,7b + bra Laddsf$3 + 8: + movew d0,d1 + swap d1 + movew d1,d0 + swap d0 + subw IMM (16),d7 + bne 6b | if still more bits, go back to normal case + | otherwise we fall through + + | Now we have a in d0-d1, b in d2-d3, and the largest exponent in d6 (the + | signs are stored in a0 and a1). + + Laddsf$3: + | Here we have to decide whether to add or subtract the numbers + exg d6,a0 | get signs back + exg d7,a1 | and save the exponents + eorl d6,d7 | combine sign bits + bmi Lsubsf$0 | if negative a and b have opposite + | sign so we actually subtract the + | numbers + + | Here we have both positive or both negative + exg d6,a0 | now we have the exponent in d6 + movel a0,d7 | and sign in d7 + andl IMM (0x80000000),d7 + | Here we do the addition. + addl d3,d1 + addxl d2,d0 + | Note: now we have d2, d3, d4 and d5 to play with! + + | Put the exponent, in the first byte, in d2, to use the "standard" rounding + | routines: + movel d6,d2 + lsrw IMM (8),d2 + + | Before rounding normalize so bit #FLT_MANT_DIG is set (we will consider + | the case of denormalized numbers in the rounding routine itself). + | As in the addition (not in the subtraction!) we could have set + | one more bit we check this: + btst IMM (FLT_MANT_DIG+1),d0 + beq 1f + lsrl IMM (1),d0 + roxrl IMM (1),d1 + addl IMM (1),d2 + 1: + lea Laddsf$4,a0 | to return from rounding routine + lea SYM (_fpCCR),a1 | check the rounding mode + movew a1@(6),d6 | rounding mode in d6 + beq Lround$to$nearest + cmpw IMM (ROUND_TO_PLUS),d6 + bhi Lround$to$minus + blt Lround$to$zero + bra Lround$to$plus + Laddsf$4: + | Put back the exponent, but check for overflow. + cmpw IMM (0xff),d2 + bhi 1f + bclr IMM (FLT_MANT_DIG-1),d0 + lslw IMM (7),d2 + swap d2 + orl d2,d0 + bra Laddsf$ret + 1: + movew IMM (ADD),d5 + bra Lf$overflow + + Lsubsf$0: + | We are here if a > 0 and b < 0 (sign bits cleared). + | Here we do the subtraction. + movel d6,d7 | put sign in d7 + andl IMM (0x80000000),d7 + + subl d3,d1 | result in d0-d1 + subxl d2,d0 | + beq Laddsf$ret | if zero just exit + bpl 1f | if positive skip the following + bchg IMM (31),d7 | change sign bit in d7 + negl d1 + negxl d0 + 1: + exg d2,a0 | now we have the exponent in d2 + lsrw IMM (8),d2 | put it in the first byte + + | Now d0-d1 is positive and the sign bit is in d7. + + | Note that we do not have to normalize, since in the subtraction bit + | #FLT_MANT_DIG+1 is never set, and denormalized numbers are handled by + | the rounding routines themselves. + lea Lsubsf$1,a0 | to return from rounding routine + lea SYM (_fpCCR),a1 | check the rounding mode + movew a1@(6),d6 | rounding mode in d6 + beq Lround$to$nearest + cmpw IMM (ROUND_TO_PLUS),d6 + bhi Lround$to$minus + blt Lround$to$zero + bra Lround$to$plus + Lsubsf$1: + | Put back the exponent (we can't have overflow!). ' + bclr IMM (FLT_MANT_DIG-1),d0 + lslw IMM (7),d2 + swap d2 + orl d2,d0 + bra Laddsf$ret + + | If one of the numbers was too small (difference of exponents >= + | FLT_MANT_DIG+2) we return the other (and now we don't have to ' + | check for finiteness or zero). + Laddsf$a$small: + movel a6@(12),d0 + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 | restore data registers + unlk a6 | and return + rts + + Laddsf$b$small: + movel a6@(8),d0 + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 | restore data registers + unlk a6 | and return + rts + + | If the numbers are denormalized remember to put exponent equal to 1. + + Laddsf$a$den: + movel d5,d6 | d5 contains 0x01000000 + swap d6 + bra Laddsf$1 + + Laddsf$b$den: + movel d5,d7 + swap d7 + notl d4 | make d4 into a mask for the fraction + | (this was not executed after the jump) + bra Laddsf$2 + + | The rest is mainly code for the different results which can be + | returned (checking always for +/-INFINITY and NaN). + + Laddsf$b: + | Return b (if a is zero). + movel a6@(12),d0 + bra 1f + Laddsf$a: + | Return a (if b is zero). + movel a6@(8),d0 + 1: + movew IMM (ADD),d5 + | We have to check for NaN and +/-infty. + movel d0,d7 + andl IMM (0x80000000),d7 | put sign in d7 + bclr IMM (31),d0 | clear sign + cmpl IMM (INFINITY),d0 | check for infty or NaN + bge 2f + movel d0,d0 | check for zero (we do this because we don't ' + bne Laddsf$ret | want to return -0 by mistake + bclr IMM (31),d7 | if zero be sure to clear sign + bra Laddsf$ret | if everything OK just return + 2: + | The value to be returned is either +/-infty or NaN + andl IMM (0x007fffff),d0 | check for NaN + bne Lf$inop | if mantissa not zero is NaN + bra Lf$infty + + Laddsf$ret: + | Normal exit (a and b nonzero, result is not NaN nor +/-infty). + | We have to clear the exception flags (just the exception type). + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + orl d7,d0 | put sign bit + moveml sp@+,d2-d7 | restore data registers + unlk a6 | and return + rts + + Laddsf$ret$den: + | Return a denormalized number (for addition we don't signal underflow) ' + lsrl IMM (1),d0 | remember to shift right back once + bra Laddsf$ret | and return + + | Note: when adding two floats of the same sign if either one is + | NaN we return NaN without regard to whether the other is finite or + | not. When subtracting them (i.e., when adding two numbers of + | opposite signs) things are more complicated: if both are INFINITY + | we return NaN, if only one is INFINITY and the other is NaN we return + | NaN, but if it is finite we return INFINITY with the corresponding sign. + + Laddsf$nf: + movew IMM (ADD),d5 + | This could be faster but it is not worth the effort, since it is not + | executed very often. We sacrifice speed for clarity here. + movel a6@(8),d0 | get the numbers back (remember that we + movel a6@(12),d1 | did some processing already) + movel IMM (INFINITY),d4 | useful constant (INFINITY) + movel d0,d2 | save sign bits + movel d1,d3 + bclr IMM (31),d0 | clear sign bits + bclr IMM (31),d1 + | We know that one of them is either NaN of +/-INFINITY + | Check for NaN (if either one is NaN return NaN) + cmpl d4,d0 | check first a (d0) + bhi Lf$inop + cmpl d4,d1 | check now b (d1) + bhi Lf$inop + | Now comes the check for +/-INFINITY. We know that both are (maybe not + | finite) numbers, but we have to check if both are infinite whether we + | are adding or subtracting them. + eorl d3,d2 | to check sign bits + bmi 1f + movel d0,d7 + andl IMM (0x80000000),d7 | get (common) sign bit + bra Lf$infty + 1: + | We know one (or both) are infinite, so we test for equality between the + | two numbers (if they are equal they have to be infinite both, so we + | return NaN). + cmpl d1,d0 | are both infinite? + beq Lf$inop | if so return NaN + + movel d0,d7 + andl IMM (0x80000000),d7 | get a's sign bit ' + cmpl d4,d0 | test now for infinity + beq Lf$infty | if a is INFINITY return with this sign + bchg IMM (31),d7 | else we know b is INFINITY and has + bra Lf$infty | the opposite sign + + |============================================================================= + | __mulsf3 + |============================================================================= + + | float __mulsf3(float, float); + SYM (__mulsf3): + link a6,IMM (0) + moveml d2-d7,sp@- + movel a6@(8),d0 | get a into d0 + movel a6@(12),d1 | and b into d1 + movel d0,d7 | d7 will hold the sign of the product + eorl d1,d7 | + andl IMM (0x80000000),d7 + movel IMM (INFINITY),d6 | useful constant (+INFINITY) + movel d6,d5 | another (mask for fraction) + notl d5 | + movel IMM (0x00800000),d4 | this is to put hidden bit back + bclr IMM (31),d0 | get rid of a's sign bit ' + movel d0,d2 | + beq Lmulsf$a$0 | branch if a is zero + bclr IMM (31),d1 | get rid of b's sign bit ' + movel d1,d3 | + beq Lmulsf$b$0 | branch if b is zero + cmpl d6,d0 | is a big? + bhi Lmulsf$inop | if a is NaN return NaN + beq Lmulsf$inf | if a is INFINITY we have to check b + cmpl d6,d1 | now compare b with INFINITY + bhi Lmulsf$inop | is b NaN? + beq Lmulsf$overflow | is b INFINITY? + | Here we have both numbers finite and nonzero (and with no sign bit). + | Now we get the exponents into d2 and d3. + andl d6,d2 | and isolate exponent in d2 + beq Lmulsf$a$den | if exponent is zero we have a denormalized + andl d5,d0 | and isolate fraction + orl d4,d0 | and put hidden bit back + swap d2 | I like exponents in the first byte + lsrw IMM (7),d2 | + Lmulsf$1: | number + andl d6,d3 | + beq Lmulsf$b$den | + andl d5,d1 | + orl d4,d1 | + swap d3 | + lsrw IMM (7),d3 | + Lmulsf$2: | + addw d3,d2 | add exponents + subw IMM (F_BIAS+1),d2 | and subtract bias (plus one) + + | We are now ready to do the multiplication. The situation is as follows: + | both a and b have bit FLT_MANT_DIG-1 set (even if they were + | denormalized to start with!), which means that in the product + | bit 2*(FLT_MANT_DIG-1) (that is, bit 2*FLT_MANT_DIG-2-32 of the + | high long) is set. + + | To do the multiplication let us move the number a little bit around ... + movel d1,d6 | second operand in d6 + movel d0,d5 | first operand in d4-d5 + movel IMM (0),d4 + movel d4,d1 | the sums will go in d0-d1 + movel d4,d0 + + | now bit FLT_MANT_DIG-1 becomes bit 31: + lsll IMM (31-FLT_MANT_DIG+1),d6 + + | Start the loop (we loop #FLT_MANT_DIG times): + movew IMM (FLT_MANT_DIG-1),d3 + 1: addl d1,d1 | shift sum + addxl d0,d0 + lsll IMM (1),d6 | get bit bn + bcc 2f | if not set skip sum + addl d5,d1 | add a + addxl d4,d0 + 2: dbf d3,1b | loop back + + | Now we have the product in d0-d1, with bit (FLT_MANT_DIG - 1) + FLT_MANT_DIG + | (mod 32) of d0 set. The first thing to do now is to normalize it so bit + | FLT_MANT_DIG is set (to do the rounding). + rorl IMM (6),d1 + swap d1 + movew d1,d3 + andw IMM (0x03ff),d3 + andw IMM (0xfd00),d1 + lsll IMM (8),d0 + addl d0,d0 + addl d0,d0 + orw d3,d0 + + movew IMM (MULTIPLY),d5 + + btst IMM (FLT_MANT_DIG+1),d0 + beq Lround$exit + lsrl IMM (1),d0 + roxrl IMM (1),d1 + addw IMM (1),d2 + bra Lround$exit + + Lmulsf$inop: + movew IMM (MULTIPLY),d5 + bra Lf$inop + + Lmulsf$overflow: + movew IMM (MULTIPLY),d5 + bra Lf$overflow + + Lmulsf$inf: + movew IMM (MULTIPLY),d5 + | If either is NaN return NaN; else both are (maybe infinite) numbers, so + | return INFINITY with the correct sign (which is in d7). + cmpl d6,d1 | is b NaN? + bhi Lf$inop | if so return NaN + bra Lf$overflow | else return +/-INFINITY + + | If either number is zero return zero, unless the other is +/-INFINITY, + | or NaN, in which case we return NaN. + Lmulsf$b$0: + | Here d1 (==b) is zero. + movel d1,d0 | put b into d0 (just a zero) + movel a6@(8),d1 | get a again to check for non-finiteness + bra 1f + Lmulsf$a$0: + movel a6@(12),d1 | get b again to check for non-finiteness + 1: bclr IMM (31),d1 | clear sign bit + cmpl IMM (INFINITY),d1 | and check for a large exponent + bge Lf$inop | if b is +/-INFINITY or NaN return NaN + lea SYM (_fpCCR),a0 | else return zero + movew IMM (0),a0@ | + moveml sp@+,d2-d7 | + unlk a6 | + rts | + + | If a number is denormalized we put an exponent of 1 but do not put the + | hidden bit back into the fraction; instead we shift left until bit 23 + | (the hidden bit) is set, adjusting the exponent accordingly. We do this + | to ensure that the product of the fractions is close to 1. + Lmulsf$a$den: + movel IMM (1),d2 + andl d5,d0 + 1: addl d0,d0 | shift a left (until bit 23 is set) + subw IMM (1),d2 | and adjust exponent + btst IMM (FLT_MANT_DIG-1),d0 + bne Lmulsf$1 | + bra 1b | else loop back + + Lmulsf$b$den: + movel IMM (1),d3 + andl d5,d1 + 1: addl d1,d1 | shift b left until bit 23 is set + subw IMM (1),d3 | and adjust exponent + btst IMM (FLT_MANT_DIG-1),d1 + bne Lmulsf$2 | + bra 1b | else loop back + + |============================================================================= + | __divsf3 + |============================================================================= + + | float __divsf3(float, float); + SYM (__divsf3): + link a6,IMM (0) + moveml d2-d7,sp@- + movel a6@(8),d0 | get a into d0 + movel a6@(12),d1 | and b into d1 + movel d0,d7 | d7 will hold the sign of the result + eorl d1,d7 | + andl IMM (0x80000000),d7 | + movel IMM (INFINITY),d6 | useful constant (+INFINITY) + movel d6,d5 | another (mask for fraction) + notl d5 | + movel IMM (0x00800000),d4 | this is to put hidden bit back + bclr IMM (31),d0 | get rid of a's sign bit ' + movel d0,d2 | + beq Ldivsf$a$0 | branch if a is zero + bclr IMM (31),d1 | get rid of b's sign bit ' + movel d1,d3 | + beq Ldivsf$b$0 | branch if b is zero + cmpl d6,d0 | is a big? + bhi Ldivsf$inop | if a is NaN return NaN + beq Ldivsf$inf | if a is INFINITY we have to check b + cmpl d6,d1 | now compare b with INFINITY + bhi Ldivsf$inop | if b is NaN return NaN + beq Ldivsf$underflow + | Here we have both numbers finite and nonzero (and with no sign bit). + | Now we get the exponents into d2 and d3 and normalize the numbers to + | ensure that the ratio of the fractions is close to 1. We do this by + | making sure that bit #FLT_MANT_DIG-1 (hidden bit) is set. + andl d6,d2 | and isolate exponent in d2 + beq Ldivsf$a$den | if exponent is zero we have a denormalized + andl d5,d0 | and isolate fraction + orl d4,d0 | and put hidden bit back + swap d2 | I like exponents in the first byte + lsrw IMM (7),d2 | + Ldivsf$1: | + andl d6,d3 | + beq Ldivsf$b$den | + andl d5,d1 | + orl d4,d1 | + swap d3 | + lsrw IMM (7),d3 | + Ldivsf$2: | + subw d3,d2 | subtract exponents + addw IMM (F_BIAS),d2 | and add bias + + | We are now ready to do the division. We have prepared things in such a way + | that the ratio of the fractions will be less than 2 but greater than 1/2. + | At this point the registers in use are: + | d0 holds a (first operand, bit FLT_MANT_DIG=0, bit FLT_MANT_DIG-1=1) + | d1 holds b (second operand, bit FLT_MANT_DIG=1) + | d2 holds the difference of the exponents, corrected by the bias + | d7 holds the sign of the ratio + | d4, d5, d6 hold some constants + movel d7,a0 | d6-d7 will hold the ratio of the fractions + movel IMM (0),d6 | + movel d6,d7 + + movew IMM (FLT_MANT_DIG+1),d3 + 1: cmpl d0,d1 | is a < b? + bhi 2f | + bset d3,d6 | set a bit in d6 + subl d1,d0 | if a >= b a <-- a-b + beq 3f | if a is zero, exit + 2: addl d0,d0 | multiply a by 2 + dbra d3,1b + + | Now we keep going to set the sticky bit ... + movew IMM (FLT_MANT_DIG),d3 + 1: cmpl d0,d1 + ble 2f + addl d0,d0 + dbra d3,1b + movel IMM (0),d1 + bra 3f + 2: movel IMM (0),d1 + subw IMM (FLT_MANT_DIG),d3 + addw IMM (31),d3 + bset d3,d1 + 3: + movel d6,d0 | put the ratio in d0-d1 + movel a0,d7 | get sign back + + | Because of the normalization we did before we are guaranteed that + | d0 is smaller than 2^26 but larger than 2^24. Thus bit 26 is not set, + | bit 25 could be set, and if it is not set then bit 24 is necessarily set. + btst IMM (FLT_MANT_DIG+1),d0 + beq 1f | if it is not set, then bit 24 is set + lsrl IMM (1),d0 | + addw IMM (1),d2 | + 1: + | Now round, check for over- and underflow, and exit. + movew IMM (DIVIDE),d5 + bra Lround$exit + + Ldivsf$inop: + movew IMM (DIVIDE),d5 + bra Lf$inop + + Ldivsf$overflow: + movew IMM (DIVIDE),d5 + bra Lf$overflow + + Ldivsf$underflow: + movew IMM (DIVIDE),d5 + bra Lf$underflow + + Ldivsf$a$0: + movew IMM (DIVIDE),d5 + | If a is zero check to see whether b is zero also. In that case return + | NaN; then check if b is NaN, and return NaN also in that case. Else + | return zero. + andl IMM (0x7fffffff),d1 | clear sign bit and test b + beq Lf$inop | if b is also zero return NaN + cmpl IMM (INFINITY),d1 | check for NaN + bhi Lf$inop | + movel IMM (0),d0 | else return zero + lea SYM (_fpCCR),a0 | + movew IMM (0),a0@ | + moveml sp@+,d2-d7 | + unlk a6 | + rts | + + Ldivsf$b$0: + movew IMM (DIVIDE),d5 + | If we got here a is not zero. Check if a is NaN; in that case return NaN, + | else return +/-INFINITY. Remember that a is in d0 with the sign bit + | cleared already. + cmpl IMM (INFINITY),d0 | compare d0 with INFINITY + bhi Lf$inop | if larger it is NaN + bra Lf$div$0 | else signal DIVIDE_BY_ZERO + + Ldivsf$inf: + movew IMM (DIVIDE),d5 + | If a is INFINITY we have to check b + cmpl IMM (INFINITY),d1 | compare b with INFINITY + bge Lf$inop | if b is NaN or INFINITY return NaN + bra Lf$overflow | else return overflow + + | If a number is denormalized we put an exponent of 1 but do not put the + | bit back into the fraction. + Ldivsf$a$den: + movel IMM (1),d2 + andl d5,d0 + 1: addl d0,d0 | shift a left until bit FLT_MANT_DIG-1 is set + subw IMM (1),d2 | and adjust exponent + btst IMM (FLT_MANT_DIG-1),d0 + bne Ldivsf$1 + bra 1b + + Ldivsf$b$den: + movel IMM (1),d3 + andl d5,d1 + 1: addl d1,d1 | shift b left until bit FLT_MANT_DIG is set + subw IMM (1),d3 | and adjust exponent + btst IMM (FLT_MANT_DIG-1),d1 + bne Ldivsf$2 + bra 1b + + Lround$exit: + | This is a common exit point for __mulsf3 and __divsf3. + + | First check for underlow in the exponent: + cmpw IMM (-FLT_MANT_DIG-1),d2 + blt Lf$underflow + | It could happen that the exponent is less than 1, in which case the + | number is denormalized. In this case we shift right and adjust the + | exponent until it becomes 1 or the fraction is zero (in the latter case + | we signal underflow and return zero). + movel IMM (0),d6 | d6 is used temporarily + cmpw IMM (1),d2 | if the exponent is less than 1 we + bge 2f | have to shift right (denormalize) + 1: addw IMM (1),d2 | adjust the exponent + lsrl IMM (1),d0 | shift right once + roxrl IMM (1),d1 | + roxrl IMM (1),d6 | d6 collect bits we would lose otherwise + cmpw IMM (1),d2 | is the exponent 1 already? + beq 2f | if not loop back + bra 1b | + bra Lf$underflow | safety check, shouldn't execute ' + 2: orl d6,d1 | this is a trick so we don't lose ' + | the extra bits which were flushed right + | Now call the rounding routine (which takes care of denormalized numbers): + lea Lround$0,a0 | to return from rounding routine + lea SYM (_fpCCR),a1 | check the rounding mode + movew a1@(6),d6 | rounding mode in d6 + beq Lround$to$nearest + cmpw IMM (ROUND_TO_PLUS),d6 + bhi Lround$to$minus + blt Lround$to$zero + bra Lround$to$plus + Lround$0: + | Here we have a correctly rounded result (either normalized or denormalized). + + | Here we should have either a normalized number or a denormalized one, and + | the exponent is necessarily larger or equal to 1 (so we don't have to ' + | check again for underflow!). We have to check for overflow or for a + | denormalized number (which also signals underflow). + | Check for overflow (i.e., exponent >= 255). + cmpw IMM (0x00ff),d2 + bge Lf$overflow + | Now check for a denormalized number (exponent==0). + movew d2,d2 + beq Lf$den + 1: + | Put back the exponents and sign and return. + lslw IMM (7),d2 | exponent back to fourth byte + bclr IMM (FLT_MANT_DIG-1),d0 + swap d0 | and put back exponent + orw d2,d0 | + swap d0 | + orl d7,d0 | and sign also + + lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 + unlk a6 + rts + + |============================================================================= + | __negsf2 + |============================================================================= + + | This is trivial and could be shorter if we didn't bother checking for NaN ' + | and +/-INFINITY. + + | float __negsf2(float); + SYM (__negsf2): + link a6,IMM (0) + moveml d2-d7,sp@- + movew IMM (NEGATE),d5 + movel a6@(8),d0 | get number to negate in d0 + bchg IMM (31),d0 | negate + movel d0,d1 | make a positive copy + bclr IMM (31),d1 | + tstl d1 | check for zero + beq 2f | if zero (either sign) return +zero + cmpl IMM (INFINITY),d1 | compare to +INFINITY + blt 1f | + bhi Lf$inop | if larger (fraction not zero) is NaN + movel d0,d7 | else get sign and return INFINITY + andl IMM (0x80000000),d7 + bra Lf$infty + 1: lea SYM (_fpCCR),a0 + movew IMM (0),a0@ + moveml sp@+,d2-d7 + unlk a6 + rts + 2: bclr IMM (31),d0 + bra 1b + + |============================================================================= + | __cmpsf2 + |============================================================================= + + GREATER = 1 + LESS = -1 + EQUAL = 0 + + | int __cmpsf2(float, float); + SYM (__cmpsf2): + link a6,IMM (0) + moveml d2-d7,sp@- | save registers + movew IMM (COMPARE),d5 + movel a6@(8),d0 | get first operand + movel a6@(12),d1 | get second operand + | Check if either is NaN, and in that case return garbage and signal + | INVALID_OPERATION. Check also if either is zero, and clear the signs + | if necessary. + movel d0,d6 + andl IMM (0x7fffffff),d0 + beq Lcmpsf$a$0 + cmpl IMM (0x7f800000),d0 + bhi Lf$inop + Lcmpsf$1: + movel d1,d7 + andl IMM (0x7fffffff),d1 + beq Lcmpsf$b$0 + cmpl IMM (0x7f800000),d1 + bhi Lf$inop + Lcmpsf$2: + | Check the signs + eorl d6,d7 + bpl 1f + | If the signs are not equal check if a >= 0 + tstl d6 + bpl Lcmpsf$a$gt$b | if (a >= 0 && b < 0) => a > b + bmi Lcmpsf$b$gt$a | if (a < 0 && b >= 0) => a < b + 1: + | If the signs are equal check for < 0 + tstl d6 + bpl 1f + | If both are negative exchange them + exg d0,d1 + 1: + | Now that they are positive we just compare them as longs (does this also + | work for denormalized numbers?). + cmpl d0,d1 + bhi Lcmpsf$b$gt$a | |b| > |a| + bne Lcmpsf$a$gt$b | |b| < |a| + | If we got here a == b. + movel IMM (EQUAL),d0 + moveml sp@+,d2-d7 | put back the registers + unlk a6 + rts + Lcmpsf$a$gt$b: + movel IMM (GREATER),d0 + moveml sp@+,d2-d7 | put back the registers + unlk a6 + rts + Lcmpsf$b$gt$a: + movel IMM (LESS),d0 + moveml sp@+,d2-d7 | put back the registers + unlk a6 + rts + + Lcmpsf$a$0: + bclr IMM (31),d6 + bra Lcmpsf$1 + Lcmpsf$b$0: + bclr IMM (31),d7 + bra Lcmpsf$2 + + |============================================================================= + | rounding routines + |============================================================================= + + | The rounding routines expect the number to be normalized in registers + | d0-d1, with the exponent in register d2. They assume that the + | exponent is larger or equal to 1. They return a properly normalized number + | if possible, and a denormalized number otherwise. The exponent is returned + | in d2. + + Lround$to$nearest: + | We now normalize as suggested by D. Knuth ("Seminumerical Algorithms"): + | Here we assume that the exponent is not too small (this should be checked + | before entering the rounding routine), but the number could be denormalized. + + | Check for denormalized numbers: + 1: btst IMM (FLT_MANT_DIG),d0 + bne 2f | if set the number is normalized + | Normalize shifting left until bit #FLT_MANT_DIG is set or the exponent + | is one (remember that a denormalized number corresponds to an + | exponent of -F_BIAS+1). + cmpw IMM (1),d2 | remember that the exponent is at least one + beq 2f | an exponent of one means denormalized + addl d1,d1 | else shift and adjust the exponent + addxl d0,d0 | + dbra d2,1b | + 2: + | Now round: we do it as follows: after the shifting we can write the + | fraction part as f + delta, where 1 < f < 2^25, and 0 <= delta <= 2. + | If delta < 1, do nothing. If delta > 1, add 1 to f. + | If delta == 1, we make sure the rounded number will be even (odd?) + | (after shifting). + btst IMM (0),d0 | is delta < 1? + beq 2f | if so, do not do anything + tstl d1 | is delta == 1? + bne 1f | if so round to even + movel d0,d1 | + andl IMM (2),d1 | bit 1 is the last significant bit + addl d1,d0 | + bra 2f | + 1: movel IMM (1),d1 | else add 1 + addl d1,d0 | + | Shift right once (because we used bit #FLT_MANT_DIG!). + 2: lsrl IMM (1),d0 + | Now check again bit #FLT_MANT_DIG (rounding could have produced a + | 'fraction overflow' ...). + btst IMM (FLT_MANT_DIG),d0 + beq 1f + lsrl IMM (1),d0 + addw IMM (1),d2 + 1: + | If bit #FLT_MANT_DIG-1 is clear we have a denormalized number, so we + | have to put the exponent to zero and return a denormalized number. + btst IMM (FLT_MANT_DIG-1),d0 + beq 1f + jmp a0@ + 1: movel IMM (0),d2 + jmp a0@ + + Lround$to$zero: + Lround$to$plus: + Lround$to$minus: + jmp a0@ + #endif /* L_float */ + + | gcc expects the routines __eqdf2, __nedf2, __gtdf2, __gedf2, + | __ledf2, __ltdf2 to all return the same value as a direct call to + | __cmpdf2 would. In this implementation, each of these routines + | simply calls __cmpdf2. It would be more efficient to give the + | __cmpdf2 routine several names, but separating them out will make it + | easier to write efficient versions of these routines someday. + + #ifdef L_eqdf2 + LL0: + .text + .proc + |#PROC# 04 + LF18 = 4 + LS18 = 128 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__eqdf2) + SYM (__eqdf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpdf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_eqdf2 */ + + #ifdef L_nedf2 + LL0: + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__nedf2) + SYM (__nedf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpdf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_nedf2 */ + + #ifdef L_gtdf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__gtdf2) + SYM (__gtdf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpdf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_gtdf2 */ + + #ifdef L_gedf2 + LL0: + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__gedf2) + SYM (__gedf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpdf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_gedf2 */ + + #ifdef L_ltdf2 + LL0: + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__ltdf2) + SYM (__ltdf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpdf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_ltdf2 */ + + #ifdef L_ledf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__ledf2) + SYM (__ledf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpdf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_ledf2 */ + + | The comments above about __eqdf2, et. al., also apply to __eqsf2, + | et. al., except that the latter call __cmpsf2 rather than __cmpdf2. + + #ifdef L_eqsf2 + .text + .proc + |#PROC# 04 + LF18 = 4 + LS18 = 128 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__eqsf2) + SYM (__eqsf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpsf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_eqsf2 */ + + #ifdef L_nesf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__nesf2) + SYM (__nesf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpsf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_nesf2 */ + + #ifdef L_gtsf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__gtsf2) + SYM (__gtsf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpsf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_gtsf2 */ + + #ifdef L_gesf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__gesf2) + SYM (__gesf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpsf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_gesf2 */ + + #ifdef L_ltsf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__ltsf2) + SYM (__ltsf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpsf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_ltsf2 */ + + #ifdef L_lesf2 + .text + .proc + |#PROC# 04 + LF18 = 8 + LS18 = 132 + LFF18 = 0 + LSS18 = 0 + LV18 = 0 + .text + .globl SYM (__lesf2) + SYM (__lesf2): + |#PROLOGUE# 0 + link a6,IMM (0) + |#PROLOGUE# 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + jbsr SYM (__cmpsf2) + |#PROLOGUE# 2 + unlk a6 + |#PROLOGUE# 3 + rts + #endif /* L_lesf2 */ + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/lynx-ng.h gcc-2.7.0/config/m68k/lynx-ng.h *** gcc-2.6.3/config/m68k/lynx-ng.h Mon Jul 11 16:30:10 1994 --- gcc-2.7.0/config/m68k/lynx-ng.h Thu Jun 15 15:09:08 1995 *************** *** 1,4 **** /* Definitions for Motorola 680x0 running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for Motorola 680x0 running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,24 **** 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 "m68k/m68k.h" ! #include "m68k/m68k-coff.h" ! #include "lynx-ng.h" /* See m68k.h. 7 means 68020 with 68881. */ --- 16,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include ! #include ! #include /* See m68k.h. 7 means 68020 with 68881. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/lynx.h gcc-2.7.0/config/m68k/lynx.h *** gcc-2.6.3/config/m68k/lynx.h Thu Aug 25 18:30:59 1994 --- gcc-2.7.0/config/m68k/lynx.h Thu Jun 15 15:11:39 1995 *************** *** 1,4 **** /* Definitions for Motorola 680x0 running LynxOS. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for Motorola 680x0 running LynxOS. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,23 **** 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 "m68k/m68k.h" ! #include "m68k/m68k-coff.h" #undef CTORS_SECTION_ASM_OP --- 16,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include ! #include #undef CTORS_SECTION_ASM_OP *************** *** 30,34 **** #define ASM_LONG ".long" ! #include "lynx.h" /* See m68k.h. 7 means 68020 with 68881. */ --- 31,35 ---- #define ASM_LONG ".long" ! #include /* See m68k.h. 7 means 68020 with 68881. */ *************** *** 53,54 **** --- 54,74 ---- 1, 1, 0, 0, 0, 0, 0, 1, \ 1, 1, 0, 0, 0, 0, 0, 0 } + + /* Return floating point values in a fp register. This make fp code a + little bit faster. It also makes -msoft-float code incompatible with + -m68881 code, so people have to be careful not to mix the two. */ + #undef FUNCTION_VALUE + #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) + + #undef LIBCALL_VALUE + #define LIBCALL_VALUE(MODE) \ + gen_rtx (REG, (MODE), \ + ((TARGET_68881 \ + && ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)) \ + ? 16 : 0)) + + #undef FUNCTION_VALUE_REGNO_P + #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (TARGET_68881 && (N) == 16)) + + #undef NEEDS_UNTYPED_CALL + #define NEEDS_UNTYPED_CALL 1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68k-aout.h gcc-2.7.0/config/m68k/m68k-aout.h *** gcc-2.6.3/config/m68k/m68k-aout.h --- gcc-2.7.0/config/m68k/m68k-aout.h Thu Jun 15 15:11:57 1995 *************** *** 0 **** --- 1,31 ---- + /* Definitions of target machine for GNU compiler. "naked" 68020, + a.out object files and debugging, version. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This comment is here to see if it will keep Sun's cpp from dying. */ + + #include "m68k/m68k-none.h" + #include "m68k/m68kemb.h" + #include "aoutos.h" + + #define DBX_DEBUGGING_INFO + #undef SDB_DEBUGGING_INFO + + /* end of m68k-aout.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68k-coff.h gcc-2.7.0/config/m68k/m68k-coff.h *** gcc-2.6.3/config/m68k/m68k-coff.h Mon Aug 15 16:34:52 1994 --- gcc-2.7.0/config/m68k/m68k-coff.h Thu Jun 15 15:12:12 1995 *************** *** 1,5 **** ! /* Definitions of target machine for GNU compiler. ! m68k series COFF object files and debugging, version. ! Copyright (C) 1987, 1988, 1991, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- ! /* Definitions of target machine for GNU compiler. "naked" 68020, ! COFF object files and debugging, version. ! Copyright (C) 1994 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,150 **** 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 is included after m68k.h by CPU COFF specific files. It ! is not a complete target itself. */ ! /* Generate sdb debugging information. */ ! #undef DBX_DEBUGGING_INFO ! #define SDB_DEBUGGING_INFO ! ! /* Output DBX (stabs) debugging information if using -gstabs. */ ! ! #define DBX_DEBUGGING_INFO ! ! #undef PREFERRED_DEBUGGING_TYPE ! #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG ! ! /* COFF symbols don't start with an underscore. */ ! ! #undef USER_LABEL_PREFIX ! #define USER_LABEL_PREFIX "" ! ! /* Use a prefix for local labels, just to be on the save side. */ ! ! #undef LOCAL_LABEL_PREFIX ! #define LOCAL_LABEL_PREFIX "." ! ! /* Use a register prefix to avoid clashes with external symbols (classic ! example: `extern char PC;' in termcap). */ ! ! #undef REGISTER_PREFIX ! #define REGISTER_PREFIX "%" ! ! /* In the machine description we can't use %R, because it will not be seen ! by ASM_FPRINTF. (Isn't that a design bug?). */ ! ! #undef REGISTER_PREFIX_MD ! #define REGISTER_PREFIX_MD "%%" ! ! /* config/m68k.md has an explicit reference to the program counter, ! prefix this by the register prefix. */ ! ! #define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)" ! ! /* Here are the new register names. */ ! ! #undef REGISTER_NAMES ! #ifndef SUPPORT_SUN_FPA ! #define REGISTER_NAMES \ ! {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ ! "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ ! "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" } ! #else /* SUPPORTED_SUN_FPA */ ! #define REGISTER_NAMES \ ! {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ ! "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ ! "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \ ! "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \ ! "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \ ! "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \ ! "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" } ! #endif /* defined SUPPORT_SUN_FPA */ ! ! #undef ASM_FILE_START ! #define ASM_FILE_START(FILE) \ ! output_file_directive ((FILE), main_input_filename) ! ! /* Support the ctors and dtors sections for g++. */ ! ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" ! ! /* A list of other sections which the compiler might be "in" at any ! given time. */ ! ! #undef EXTRA_SECTIONS ! #define EXTRA_SECTIONS in_ctors, in_dtors ! ! /* A list of extra section function definitions. */ ! ! #undef EXTRA_SECTION_FUNCTIONS ! #define EXTRA_SECTION_FUNCTIONS \ ! CTORS_SECTION_FUNCTION \ ! DTORS_SECTION_FUNCTION ! ! #define CTORS_SECTION_FUNCTION \ ! void \ ! ctors_section () \ ! { \ ! if (in_section != in_ctors) \ ! { \ ! fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ ! in_section = in_ctors; \ ! } \ ! } ! ! #define DTORS_SECTION_FUNCTION \ ! void \ ! dtors_section () \ ! { \ ! if (in_section != in_dtors) \ ! { \ ! fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ ! in_section = in_dtors; \ ! } \ ! } ! ! #define INT_ASM_OP ".long" ! ! /* A C statement (sans semicolon) to output an element in the table of ! global constructors. */ ! #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ ! do { \ ! ctors_section (); \ ! fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, "\n"); \ ! } while (0) ! ! /* A C statement (sans semicolon) to output an element in the table of ! global destructors. */ ! #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ ! do { \ ! dtors_section (); \ ! fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ ! assemble_name (FILE, NAME); \ ! fprintf (FILE, "\n"); \ ! } while (0) ! ! /* Don't assume anything about startfiles. */ ! ! #define STARTFILE_SPEC "" --- 17,28 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #define MOTOROLA /* Use Motorola syntax rather than MIT. */ ! #include "m68k/m68k-none.h" ! #include "m68k/m68kemb.h" ! #include "m68k/coff.h" ! /* end of m68k-coff.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68k-none.h gcc-2.7.0/config/m68k/m68k-none.h *** gcc-2.6.3/config/m68k/m68k-none.h --- gcc-2.7.0/config/m68k/m68k-none.h Thu Jun 15 15:12:29 1995 *************** *** 0 **** --- 1,95 ---- + /* Definitions of target machine for GNU compiler. "naked" 68020. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "m68k/m68k.h" + + /* See m68k.h. 7 means 68020 with 68881. */ + + #ifndef TARGET_DEFAULT + #define TARGET_DEFAULT 7 + #endif + + /* Names to predefine in the preprocessor for this target machine. + Always define mc68000. Other definitions depend on switches given + to the compiler: + + -m68000: define nothing else + default, -m68020, -mc68020: define mc68020 + -m68030: define mc68030 + -m68040: define mc68040 + -m68020-40: define mc68020 mc68030 mc68040 + -m68302: define mc68302 + -m68332: define mc68332 + */ + + #ifndef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dmc68000" + #endif + + #ifndef CPP_SPEC + + #if TARGET_DEFAULT & 02 + + /* -m68881 is the default */ + #define CPP_SPEC \ + "%{!mc68000:%{!m68000:%{!m68332:%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}}}}\ + %{!ansi:%{m68010:-Dmc68010 }%{m68020:-Dmc68020 }%{mc68020:-Dmc68020 }%{m68030:-Dmc68030 }%{m68040:-Dmc68040 }%{m68020-40:-Dmc68020 -Dmc68030 -Dmc68040 }%{m68302:-Dmc68302 }%{m68332:-Dmc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-Dmc68020 }}}}}}}}}}}\ + %{m68010:-D__mc68010__ -D__mc68010 }%{m68020:-D__mc68020__ -D__mc68020 }%{mc68020:-D__mc68020__ -D__mc68020 }%{m68030:-D__mc68030__ -D__mc68030 }%{m68040:-D__mc68040__ -D__mc68040 }%{m68020-40:-D__mc68020__ -D__mc68030__ -D__mc68040__ -D__mc68020 -D__mc68030 -D__mc68040 }%{m68302:-D__mc68302__ -D__mc68302 }%{m68332:-D__mc68332__ -D__mc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-D__mc68020__ -D__mc68020 }}}}}}}}}}" + + #else + #if TARGET_DEFAULT & 0100 + + /* -mfpa is the default */ + #define CPP_SPEC \ + "%{!msoft-float:%{m68881:-D__HAVE_68881__ }%{!m68881:-D__HAVE_FPA__ }}\ + %{!ansi:%{m68010:-Dmc68010 }%{m68020:-Dmc68020 }%{mc68020:-Dmc68020 }%{m68030:-Dmc68030 }%{m68040:-Dmc68040 }%{m68020-40:-Dmc68020 -Dmc68030 -Dmc68040 }%{m68302:-Dmc68302 }%{m68332:-Dmc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-Dmc68020 }}}}}}}}}}}\ + %{m68010:-D__mc68010__ -D__mc68010 }%{m68020:-D__mc68020__ -D__mc68020 }%{mc68020:-D__mc68020__ -D__mc68020 }%{m68030:-D__mc68030__ -D__mc68030 }%{m68040:-D__mc68040__ -D__mc68040 }%{m68020-40:-D__mc68020__ -D__mc68030__ -D__mc68040__ -D__mc68020 -D__mc68030 -D__mc68040 }%{m68302:-D__mc68302__ -D__mc68302 }%{m68332:-D__mc68332__ -D__mc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-D__mc68020__ -D__mc68020 }}}}}}}}}}" + + #else + + /* -msoft-float is the default */ + #define CPP_SPEC \ + "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\ + %{!ansi:%{m68010:-Dmc68010 }%{m68020:-Dmc68020 }%{mc68020:-Dmc68020 }%{m68030:-Dmc68030 }%{m68040:-Dmc68040 }%{m68020-40:-Dmc68020 -Dmc68030 -Dmc68040 }%{m68302:-Dmc68302 }%{m68332:-Dmc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-Dmc68020 }}}}}}}}}}}\ + %{m68010:-D__mc68010__ -D__mc68010 }%{m68020:-D__mc68020__ -D__mc68020 }%{mc68020:-D__mc68020__ -D__mc68020 }%{m68030:-D__mc68030__ -D__mc68030 }%{m68040:-D__mc68040__ -D__mc68040 }%{m68020-40:-D__mc68020__ -D__mc68030__ -D__mc68040__ -D__mc68020 -D__mc68030 -D__mc68040 }%{m68302:-D__mc68302__ -D__mc68302 }%{m68332:-D__mc68332__ -D__mc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-D__mc68020__ -D__mc68020 }}}}}}}}}}" + + #endif + #endif + + #endif + + /* Pass flags to gas indicating which type of processor we have. */ + + #ifndef ASM_SPEC + + #define ASM_SPEC \ + "%{m68851}%{mno-68851}%{m68881}%{mno-68881}%{msoft-float:-mno-68881 }\ + %{m68000}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}%{m68040}%{m68020-40:-mc68040}%{m68302}%{m68332}%{!m68000:%{!mc68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-mc68020}}}}}}}}}}" + + #endif + + #ifndef CC1_SPEC + + #define CC1_SPEC \ + "%{m68000:%{!m68881:-msoft-float }}%{m68302:-m68000}%{m68332:-m68020 -mnobitfield %{!m68881:-msoft-float}}%{!m68000:%{!mc68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-m68020}}}}}}}}}}" + + #endif + + /* end of m68k-none.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68k.c gcc-2.7.0/config/m68k/m68k.c *** gcc-2.6.3/config/m68k/m68k.c Thu Nov 10 19:10:17 1994 --- gcc-2.7.0/config/m68k/m68k.c Thu Jun 15 15:12:45 1995 *************** *** 1,4 **** /* Subroutines for insn-output.c for Motorola 68000 family. ! Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Subroutines for insn-output.c for Motorola 68000 family. ! Copyright (C) 1987, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 63,67 **** { if (flag_pic && current_function_uses_pic_offset_table) ! emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx)); } --- 64,72 ---- { if (flag_pic && current_function_uses_pic_offset_table) ! { ! rtx insn = gen_rtx (USE, VOIDmode, pic_offset_table_rtx); ! emit_insn_after (insn, get_insns ()); ! emit_insn (insn); ! } } *************** *** 695,698 **** --- 700,840 ---- char * + output_scc_di(op, operand1, operand2, dest) + rtx op; + rtx operand1; + rtx operand2; + rtx dest; + { + rtx loperands[7]; + + loperands[0] = operand1; + if (GET_CODE (operand1) == REG) + loperands[1] = gen_rtx (REG, SImode, REGNO (operand1) + 1); + else + loperands[1] = adj_offsettable_operand (operand1, 4); + if (operand2 != const0_rtx) + { + loperands[2] = operand2; + if (GET_CODE (operand2) == REG) + loperands[3] = gen_rtx (REG, SImode, REGNO (operand2) + 1); + else + loperands[3] = adj_offsettable_operand (operand2, 4); + } + loperands[4] = gen_label_rtx(); + if (operand2 != const0_rtx) + #ifdef MOTOROLA + output_asm_insn ("cmp%.l %0,%2\n\tjbne %l4\n\tcmp%.l %1,%3", loperands); + #else + output_asm_insn ("cmp%.l %0,%2\n\tjne %l4\n\tcmp%.l %1,%3", loperands); + #endif + else + #ifdef MOTOROLA + output_asm_insn ("tst%.l %0\n\tjbne %l4\n\ttst%.l %1", loperands); + #else + output_asm_insn ("tst%.l %0\n\tjne %l4\n\ttst%.l %1", loperands); + #endif + loperands[5] = dest; + + switch (GET_CODE (op)) + { + case EQ: + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("seq %5", loperands); + break; + + case NE: + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("sne %5", loperands); + break; + + case GT: + loperands[6] = gen_label_rtx(); + #ifdef MOTOROLA + output_asm_insn ("shi %5\n\tjbra %l6", loperands); + #else + output_asm_insn ("shi %5\n\tjra %l6", loperands); + #endif + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("sgt %5", loperands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[6])); + break; + + case GTU: + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("shi %5", loperands); + break; + + case LT: + loperands[6] = gen_label_rtx(); + #ifdef MOTOROLA + output_asm_insn ("scs %5\n\tjbra %l6", loperands); + #else + output_asm_insn ("scs %5\n\tjra %l6", loperands); + #endif + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("slt %5", loperands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[6])); + break; + + case LTU: + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("scs %5", loperands); + break; + + case GE: + loperands[6] = gen_label_rtx(); + #ifdef MOTOROLA + output_asm_insn ("scc %5\n\tjbra %l6", loperands); + #else + output_asm_insn ("scc %5\n\tjra %l6", loperands); + #endif + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("sge %5", loperands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[6])); + break; + + case GEU: + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("scc %5", loperands); + break; + + case LE: + loperands[6] = gen_label_rtx(); + #ifdef MOTOROLA + output_asm_insn ("sls %5\n\tjbra %l6", loperands); + #else + output_asm_insn ("sls %5\n\tjra %l6", loperands); + #endif + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("sle %5", loperands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[6])); + break; + + case LEU: + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (loperands[4])); + output_asm_insn ("sls %5", loperands); + break; + + default: + abort (); + } + return ""; + } + + char * output_btst (operands, countop, dataop, insn, signpos) rtx *operands; *************** *** 767,770 **** --- 909,931 ---- } } + + /* Check for sign_extend or zero_extend. Used for bit-count operands. */ + + int + extend_operator(x, mode) + rtx x; + enum machine_mode mode; + { + if (mode != VOIDmode && GET_MODE(x) != mode) + return 0; + switch (GET_CODE(x)) + { + case SIGN_EXTEND : + case ZERO_EXTEND : + return 1; + default : + return 0; + } + } *************** *** 860,863 **** --- 1021,1134 ---- + typedef enum { MOVL, SWAP, NEGW, NOTW, NOTB, MOVQ } CONST_METHOD; + + use_movq (i) + int i; + { + return (i >= -128 && i <= 127); + } + + CONST_METHOD + const_method (constant) + rtx constant; + { + int i; + unsigned u; + + i = INTVAL (constant); + if (use_movq (i)) + return MOVQ; + /* if -256 < N < 256 but N is not in range for a moveq + N^ff will be, so use moveq #N^ff, dreg; not.b dreg. */ + if (use_movq (i ^ 0xff)) + return NOTB; + /* Likewise, try with not.w */ + if (use_movq (i ^ 0xffff)) + return NOTW; + /* This is the only value where neg.w is useful */ + if (i == -65408) + return NEGW; + /* Try also with swap */ + u = i; + if (use_movq ((u >> 16) | (u << 16))) + return SWAP; + /* Otherwise, use move.l */ + return MOVL; + } + + const_int_cost (constant) + rtx constant; + { + switch (const_method (constant)) + { + case MOVQ : + /* Constants between -128 and 127 are cheap due to moveq */ + return 0; + case NOTB : + case NOTW : + case NEGW : + case SWAP : + /* Constants easily generated by moveq + not.b/not.w/neg.w/swap */ + return 1; + case MOVL : + return 2; + default : + abort (); + } + } + + char * + output_move_const_into_data_reg (operands) + rtx *operands; + { + int i; + + i = INTVAL (operands[1]); + switch (const_method (operands[1])) + { + case MOVQ : + #if defined (MOTOROLA) && !defined (CRDS) + return "moveq%.l %1,%0"; + #else + return "moveq %1,%0"; + #endif + case NOTB : + operands[1] = gen_rtx (CONST_INT, VOIDmode, i ^ 0xff); + #if defined (MOTOROLA) && !defined (CRDS) + return "moveq%.l %1,%0\n\tnot%.b %0"; + #else + return "moveq %1,%0\n\tnot%.b %0"; + #endif + case NOTW : + operands[1] = gen_rtx (CONST_INT, VOIDmode, i ^ 0xffff); + #if defined (MOTOROLA) && !defined (CRDS) + return "moveq%.l %1,%0\n\tnot%.w %0"; + #else + return "moveq %1,%0\n\tnot%.w %0"; + #endif + case NEGW : + #if defined (MOTOROLA) && !defined (CRDS) + return "moveq%.l %#-128,%0\n\tneg%.w %0"; + #else + return "moveq %#-128,%0\n\tneg%.w %0"; + #endif + case SWAP : + { + unsigned u = i; + + operands[1] = gen_rtx (CONST_INT, VOIDmode, (u << 16) | (u >> 16)); + #if defined (MOTOROLA) && !defined (CRDS) + return "moveq%.l %1,%0\n\tswap %0"; + #else + return "moveq %1,%0\n\tswap %0"; + #endif + } + case MOVL : + return "move%.l %1,%0"; + default : + abort (); + } + } + /* Return the best assembler insn template for moving operands[1] into operands[0] as a fullword. */ *************** *** 872,885 **** #endif if (DATA_REG_P (operands[0]) ! && GET_CODE (operands[1]) == CONST_INT ! && INTVAL (operands[1]) < 128 ! && INTVAL (operands[1]) >= -128) ! { ! #if defined (MOTOROLA) && !defined (CRDS) ! return "moveq%.l %1,%0"; ! #else ! return "moveq %1,%0"; ! #endif ! } if (operands[1] != const0_rtx) return "move%.l %1,%0"; --- 1143,1148 ---- #endif if (DATA_REG_P (operands[0]) ! && GET_CODE (operands[1]) == CONST_INT) ! return output_move_const_into_data_reg (operands); if (operands[1] != const0_rtx) return "move%.l %1,%0"; *************** *** 1875,1879 **** #endif { ! fprintf (file, "%s", reg_names[REGNO (op)]); } } --- 2138,2147 ---- #endif { ! if (letter == 'R') ! /* Print out the second register name of a register pair. ! I.e., R (6) => 7. */ ! fputs (reg_names[REGNO (op) + 1], file); ! else ! fputs (reg_names[REGNO (op)], file); } } *************** *** 2297,2299 **** --- 2565,2600 ---- return 0; + } + + /* Accept integer operands in the range 0..0xffffffff. We have to check the + range carefully since this predicate is used in DImode contexts. Also, we + need some extra crud to make it work when hosted on 64-bit machines. */ + + int + const_uint32_operand (op, mode) + rtx op; + enum machine_mode mode; + { + #if HOST_BITS_PER_WIDE_INT > 32 + /* All allowed constants will fit a CONST_INT. */ + return (GET_CODE (op) == CONST_INT + && (INTVAL (op) >= 0 && INTVAL (op) <= 0xffffffffL)); + #else + return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0) + || (GET_CODE (op) == CONST_DOUBLE && CONST_DOUBLE_HIGH (op) == 0)); + #endif + } + + /* Accept integer operands in the range -0x80000000..0x7fffffff. We have + to check the range carefully since this predicate is used in DImode + contexts. */ + + int + const_sint32_operand (op, mode) + rtx op; + enum machine_mode mode; + { + /* All allowed constants will fit a CONST_INT. */ + return (GET_CODE (op) == CONST_INT + && (INTVAL (op) >= (-0x7fffffff - 1) && INTVAL (op) <= 0x7fffffff)); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68k.h gcc-2.7.0/config/m68k/m68k.h *** gcc-2.6.3/config/m68k/m68k.h Sat Nov 5 14:25:00 1994 --- gcc-2.7.0/config/m68k/m68k.h Thu Jun 15 15:13:04 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. ! Copyright (C) 1987, 1988, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. ! Copyright (C) 1987, 1988, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 143,147 **** if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ ! SUBTARGET_OVERRIDE_OPTIONS \ } #else --- 144,148 ---- if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ ! SUBTARGET_OVERRIDE_OPTIONS; \ } #else *************** *** 150,154 **** if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ ! SUBTARGET_OVERRIDE_OPTIONS \ } #endif /* defined SUPPORT_SUN_FPA */ --- 151,155 ---- if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ ! SUBTARGET_OVERRIDE_OPTIONS; \ } #endif /* defined SUPPORT_SUN_FPA */ *************** *** 345,363 **** of register classes. If neither TARGET_FPA or TARGET_68881 is set, the compiler won't touch since no instructions that use these ! registers will be valid. ! Reserve PIC_OFFSET_TABLE_REGNUM (a5) for doing PIC relocation if ! position independent code is being generated by making it a ! fixed register */ ! ! #ifndef SUPPORT_SUN_FPA ! ! #define CONDITIONAL_REGISTER_USAGE \ ! { \ ! if (flag_pic) \ ! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ ! } ! ! #else /* defined SUPPORT_SUN_FPA */ #define CONDITIONAL_REGISTER_USAGE \ --- 346,352 ---- of register classes. If neither TARGET_FPA or TARGET_68881 is set, the compiler won't touch since no instructions that use these ! registers will be valid. */ ! #ifdef SUPPORT_SUN_FPA #define CONDITIONAL_REGISTER_USAGE \ *************** *** 379,384 **** fixed_regs[i] = call_used_regs[i] = 1; \ } \ - if (flag_pic) \ - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } --- 368,371 ---- *************** *** 405,409 **** #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ! (((REGNO) < 16) \ || ((REGNO) < 24 \ && TARGET_68881 \ --- 392,397 ---- #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ! (((REGNO) < 16 \ ! && !((REGNO) < 8 && (REGNO) + GET_MODE_SIZE ((MODE)) / 4 > 8)) \ || ((REGNO) < 24 \ && TARGET_68881 \ *************** *** 762,765 **** --- 750,754 ---- /* Value is the number of byte of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 775,779 **** the caller must always pop the args. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ --- 764,768 ---- the caller must always pop the args. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ *************** *** 1357,1366 **** /* Constant zero is super cheap due to clr instruction. */ \ if (RTX == const0_rtx) return 0; \ ! /* Constants between -128 and 127 are cheap due to moveq */ \ ! if (INTVAL (RTX) >= -128 && INTVAL (RTX) <= 127) return 1; \ ! /* Constants between -256 and 255 are easily generated */ \ ! /* by use of moveq and not.b */ \ ! if ((OUTER_CODE) == SET && INTVAL (RTX) >= -256 \ ! && INTVAL (RTX) < 256) return 2; \ case CONST: \ case LABEL_REF: \ --- 1346,1351 ---- /* Constant zero is super cheap due to clr instruction. */ \ if (RTX == const0_rtx) return 0; \ ! /* if ((OUTER_CODE) == SET) */ \ ! return const_int_cost(RTX); \ case CONST: \ case LABEL_REF: \ *************** *** 1376,1381 **** relative to an average of the time for add and the time for shift, taking away a little more because sometimes move insns are needed. */ #define MULL_COST (TARGET_68040 ? 5 : 13) ! #define MULW_COST (TARGET_68040 ? 3 : 8) #define RTX_COSTS(X,CODE,OUTER_CODE) \ --- 1361,1368 ---- relative to an average of the time for add and the time for shift, taking away a little more because sometimes move insns are needed. */ + /* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms. */ #define MULL_COST (TARGET_68040 ? 5 : 13) ! #define MULW_COST (TARGET_68040 ? 3 : TARGET_68020 ? 8 : 5) ! #define DIVW_COST (TARGET_68020 ? 27 : 12) #define RTX_COSTS(X,CODE,OUTER_CODE) \ *************** *** 1394,1398 **** case ASHIFT: \ case ASHIFTRT: \ ! case LSHIFTRT: \ /* A shift by a big integer takes an extra instruction. */ \ if (GET_CODE (XEXP (X, 1)) == CONST_INT \ --- 1381,1397 ---- case ASHIFT: \ case ASHIFTRT: \ ! case LSHIFTRT: \ ! if (! TARGET_68020) \ ! { \ ! if (GET_CODE (XEXP (X, 1)) == CONST_INT) \ ! { \ ! if (INTVAL (XEXP (X, 1)) < 16) \ ! return COSTS_N_INSNS (2) + INTVAL (XEXP (X, 1)) / 2; \ ! else \ ! /* We're using clrw + swap for these cases. */ \ ! return COSTS_N_INSNS (4) + (INTVAL (XEXP (X, 1)) - 16) / 2; \ ! } \ ! return COSTS_N_INSNS (10); /* worst case */ \ ! } \ /* A shift by a big integer takes an extra instruction. */ \ if (GET_CODE (XEXP (X, 1)) == CONST_INT \ *************** *** 1405,1408 **** --- 1404,1411 ---- break; \ case MULT: \ + if ((GET_CODE (XEXP (X, 0)) == ZERO_EXTEND \ + || GET_CODE (XEXP (X, 0)) == SIGN_EXTEND) \ + && GET_MODE (X) == SImode) \ + return COSTS_N_INSNS (MULW_COST); \ if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ return COSTS_N_INSNS (MULW_COST); \ *************** *** 1414,1418 **** case UMOD: \ if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ ! return COSTS_N_INSNS (27); /* div.w */ \ return COSTS_N_INSNS (43); /* div.l */ --- 1417,1421 ---- case UMOD: \ if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ ! return COSTS_N_INSNS (DIVW_COST); /* div.w */ \ return COSTS_N_INSNS (43); /* div.l */ *************** *** 1948,1955 **** --- 1951,1960 ---- /* Define functions defined in aux-output.c and used in templates. */ + extern char *output_move_const_into_data_reg (); extern char *output_move_double (); extern char *output_move_const_single (); extern char *output_move_const_double (); extern char *output_btst (); + extern char *output_scc_di (); /* diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68k.md gcc-2.7.0/config/m68k/m68k.md *** gcc-2.6.3/config/m68k/m68k.md Mon Nov 21 18:42:46 1994 --- gcc-2.7.0/config/m68k/m68k.md Thu Jun 15 16:52:50 1995 *************** *** 1,4 **** ;;- Machine description for GNU compiler, Motorola 68000 Version ! ;; Copyright (C) 1987, 1988, 1993, 1994 Free Software Foundation, Inc. ;; This file is part of GNU CC. --- 1,4 ---- ;;- Machine description for GNU compiler, Motorola 68000 Version ! ;; Copyright (C) 1987, 1988, 1993, 1994, 1995 Free Software Foundation, Inc. ;; This file is part of GNU CC. *************** *** 16,20 **** ;; 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. --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 65,68 **** --- 66,75 ---- ;;- "%&" double-precision fp specifier ("d" or "") f%&add.x fp0,fp1 + ;; UNSPEC usage: + ;; 1 This is a `sin' operation. The mode of the UNSPEC is MODE_FLOAT. + ;; operand 1 is the argument for `sin'. + ;; 2 This is a `cos' operation. The mode of the UNSPEC is MODE_FLOAT. + ;; operand 1 is the argument for `cos'. + ;;- Information about 68040 port. *************** *** 275,278 **** --- 282,308 ---- ;; (set (cc0) (const_int foo)) has no mode information. Such insns will ;; be folded while optimizing anyway. + + (define_expand "tstdi" + [(parallel + [(set (cc0) + (match_operand:DI 0 "nonimmediate_operand" "d")) + (clobber (match_dup 1))])] + "" + " + { + operands[1] = gen_reg_rtx (DImode); + }") + + (define_insn "" + [(set (cc0) + (match_operand:DI 1 "nonimmediate_operand" "0")) + (clobber (match_operand:DI 0 "register_operand" "=d"))] + "" + "* + { + cc_status.flags |= CC_REVERSED; + return \"neg%.l %R0\;negx%.l %0\"; + }") + (define_insn "tstsi" [(set (cc0) *************** *** 378,383 **** ;; compare instructions. ;; A composite of the cmp, cmpa, & cmpi m68000 op codes. ! (define_insn "cmpsi" [(set (cc0) (compare (match_operand:SI 0 "nonimmediate_operand" "rKs,mr,>") --- 408,463 ---- ;; compare instructions. + (define_expand "cmpdi" + [(parallel + [(set (cc0) + (compare (match_operand:DI 0 "nonimmediate_operand" "") + (match_operand:DI 1 "general_operand" ""))) + (clobber (match_dup 2))])] + "" + " + { + operands[2] = gen_reg_rtx (DImode); + }") + + (define_insn "" + [(set (cc0) + (compare (match_operand:DI 1 "nonimmediate_operand" "0,d") + (match_operand:DI 2 "general_operand" "d,0"))) + (clobber (match_operand:DI 0 "register_operand" "=d,d"))] + "" + "* + { + if (rtx_equal_p (operands[0], operands[1])) + return \"sub%.l %R2,%R0\;subx%.l %2,%0\"; + else + { + cc_status.flags |= CC_REVERSED; + return \"sub%.l %R1,%R0\;subx%.l %1,%0\"; + } + }") + + ;; This is the second "hook" for PIC code (in addition to movsi). See + ;; comment of movsi for a description of PIC handling. + (define_expand "cmpsi" + [(set (cc0) + (compare (match_operand:SI 0 "nonimmediate_operand" "") + (match_operand:SI 1 "general_operand" "")))] + "" + " + { + if (flag_pic && symbolic_operand (operands[1], SImode)) + { + /* The source is an address which requires PIC relocation. + Call legitimize_pic_address with the source, mode, and a relocation + register (a new pseudo, or the final destination if reload_in_progress + is set). Then fall through normally */ + extern rtx legitimize_pic_address(); + rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode); + operands[1] = legitimize_pic_address (operands[1], SImode, temp); + } + }") + ;; A composite of the cmp, cmpa, & cmpi m68000 op codes. ! (define_insn "" [(set (cc0) (compare (match_operand:SI 0 "nonimmediate_operand" "rKs,mr,>") *************** *** 750,776 **** && MEM_VOLATILE_P (operands[0])))) return \"clr%.l %0\"; ! else if (DATA_REG_P (operands[0]) ! && INTVAL (operands[1]) < 128 ! && INTVAL (operands[1]) >= -128) ! { ! #if defined(MOTOROLA) && !defined(CRDS) ! return \"moveq%.l %1,%0\"; ! #else ! return \"moveq %1,%0\"; ! #endif ! } ! else if (DATA_REG_P (operands[0]) ! /* if -256 < N < 256 but N is not in range for a moveq ! N^ff will be, so use moveq #N^ff, dreg; not.b dreg. */ ! && INTVAL (operands[1]) < 256 ! && INTVAL (operands[1]) >= -256) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) ^ 0xff); ! #if defined(MOTOROLA) && !defined(CRDS) ! return \"moveq%.l %1,%0\;not%.b %0\"; ! #else ! return \"moveq %1,%0\;not%.b %0\"; ! #endif ! } else if (ADDRESS_REG_P (operands[0]) && INTVAL (operands[1]) < 0x8000 --- 830,835 ---- && MEM_VOLATILE_P (operands[0])))) return \"clr%.l %0\"; ! else if (DATA_REG_P (operands[0])) ! return output_move_const_into_data_reg (operands); else if (ADDRESS_REG_P (operands[0]) && INTVAL (operands[1]) < 0x8000 *************** *** 1363,1366 **** --- 1422,1447 ---- ;; zero extension instructions + ;; this is the canonical form for (lshiftrt:DI x 32) + (define_insn "zero_extendsidi2" + [(set (match_operand:DI 0 "general_operand" "ro,<,>") + (zero_extend:DI (match_operand:SI 1 "general_operand" "rm,rm,rm")))] + "" + "* + { + CC_STATUS_INIT; + if (which_alternative == 2) + return \"clr%.l %0\;move%.l %1,%0\"; + if (which_alternative == 1) + return \"move%.l %1,%0\;clr%.l %0\"; + if (GET_CODE (operands[0]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[2] = adj_offsettable_operand (operands[0], 4); + if (ADDRESS_REG_P (operands[0])) + return \"move%.l %1,%2\;sub%.l %0,%0\"; + else + return \"move%.l %1,%2\;clr%.l %0\"; + }") + (define_expand "zero_extendhisi2" [(set (match_operand:SI 0 "register_operand" "") *************** *** 1538,1541 **** --- 1619,1694 ---- ;; sign extension instructions + (define_insn "extendqidi2" + [(set (match_operand:DI 0 "general_operand" "=d") + (sign_extend:DI + (match_operand:QI 1 "general_operand" "rm")))] + "" + "* + { + CC_STATUS_INIT; + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (TARGET_68020) + return \"move%.b %1,%2\;extb%.l %2\;smi %0\;extb%.l %0\"; + else + return \"move%.b %1,%2\;ext%.w %0\;ext%.l %2\;smi %0\;ext%.w %0\;ext%.l %0\"; + }") + + (define_insn "extendhidi2" + [(set (match_operand:DI 0 "general_operand" "=d") + (sign_extend:DI + (match_operand:HI 1 "general_operand" "rm")))] + "" + "* + { + CC_STATUS_INIT; + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (TARGET_68020) + return \"move%.w %1,%2\;ext%.l %2\;smi %0\;extb%.l %0\"; + else + return \"move%.w %1,%2\;ext%.l %2\;smi %0\;ext%.w %0\;ext%.l %0\"; + }") + + (define_insn "extendsidi2" + [(set (match_operand:DI 0 "general_operand" "=d") + (sign_extend:DI + (match_operand:SI 1 "general_operand" "rm")))] + "" + "* + { + CC_STATUS_INIT; + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (TARGET_68020) + return \"move%.l %1,%2\;smi %0\;extb%.l %0\"; + else + return \"move%.l %1,%2\;smi %0\;ext%.w %0\;ext%.l %0\"; + }") + + ;; Special case when one can avoid register clobbering, copy and test + ;; Maybe there is a way to make that the general case, by forcing the + ;; result of the SI tree to be in the lower register of the DI target + + (define_insn "extendplussidi" + [(set (match_operand:DI 0 "register_operand" "=d") + (sign_extend:DI (plus:SI (match_operand:SI 1 "general_operand" "%rmn") + (match_operand:SI 2 "general_operand" "rmn"))))] + "" + "* + { + CC_STATUS_INIT; + operands[3] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (GET_CODE (operands[1]) == CONST_INT + && (unsigned) INTVAL (operands[1]) > 8) + { + rtx tmp = operands[1]; + + operands[1] = operands[2]; + operands[2] = tmp; + } + if (TARGET_68020) + return \"move%.l %2,%3\;add%.l %1,%3\;smi %0\;extb%.l %0\"; + else + return \"move%.l %2,%3\;add%.l %1,%3\;smi %0\;ext%.w %0\;ext%.l %0\"; + }") + (define_insn "extendhisi2" [(set (match_operand:SI 0 "general_operand" "=*d,a") *************** *** 1834,1837 **** --- 1987,2141 ---- ;; add instructions + (define_insn "adddia_sexthishl32" + [(set (match_operand:DI 0 "register_operand" "+a") + (plus:DI (ashift:DI (sign_extend:DI + (match_operand:HI 1 "general_operand" "rm")) + (const_int 32)) + (match_dup 0)))] + "" + "* + { + CC_STATUS_INIT; + return \"add%.w %1,%0\"; + } ") + + (define_insn "adddid_sexthishl32" + [(set (match_operand:DI 0 "general_operand" "+ro") + (plus:DI (ashift:DI (sign_extend:DI + (match_operand:HI 1 "general_operand" "rm")) + (const_int 32)) + (match_dup 0))) + (clobber (match_scratch:SI 2 "=a"))] + "" + "* + { + CC_STATUS_INIT; + return \"move%.w %1,%2\;add%.l %2,%0\"; + } ") + + (define_insn "adddi_dilshr32" + [(set (match_operand:DI 0 "general_operand" "=do") + ;; (plus:DI (match_operand:DI 2 "general_operand" "%0") + ;; (lshiftrt:DI (match_operand:DI 1 "general_operand" "ro") + ;; (const_int 32))))] + (plus:DI (lshiftrt:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32)) + (match_operand:DI 2 "general_operand" "0")))] + "" + "* + { + CC_STATUS_INIT; + if (GET_CODE (operands[0]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[2] = adj_offsettable_operand (operands[0], 4); + return \"add%.l %1,%2\;negx%.l %0\;neg%.l %0\"; + } ") + + (define_insn "adddi_dishl32" + [(set (match_operand:DI 0 "general_operand" "=ro") + ;; (plus:DI (match_operand:DI 2 "general_operand" "%0") + ;; (ashift:DI (match_operand:DI 1 "general_operand" "ro") + ;; (const_int 32))))] + (plus:DI (ashift:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32)) + (match_operand:DI 2 "general_operand" "0")))] + "" + "* + { + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == REG) + operands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); + else + operands[1] = adj_offsettable_operand (operands[1], 4); + return \"add%.l %1,%0\"; + } ") + + (define_insn "adddi3" + [(set (match_operand:DI 0 "general_operand" "=d,<,d,o<>") + (plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,0") + (match_operand:DI 2 "general_operand" "d,<,*ao>,d"))) + (clobber (match_scratch:SI 3 "=X,X,d,d"))] + "" + "* + { + if (DATA_REG_P (operands[0])) + { + if (DATA_REG_P (operands[2])) + return \"add%.l %R2,%R0\;addx%.l %2,%0\"; + else if (GET_CODE (operands[2]) == MEM + && GET_CODE (XEXP (operands[2], 0)) == POST_INC) + { + return \"move%.l %2,%3\;add%.l %2,%R0\;addx%.l %3,%0\"; + } + else + { + /* TODO : this should work also for CONST operands[2] */ + if (GET_CODE (operands[2]) == REG) + operands[1] = gen_rtx (REG, SImode, REGNO (operands[2]) + 1); + else + operands[1] = adj_offsettable_operand (operands[2], 4); + return \"move%.l %2,%3\;add%.l %1,%R0\;addx%.l %3,%0\"; + } + } + else if (GET_CODE (operands[0]) == MEM) + { + if (GET_CODE (operands[2]) == MEM + && GET_CODE (XEXP (operands[2], 0)) == PRE_DEC) + return \"add%.l %2,%0\;addx%.l %2,%0\"; + CC_STATUS_INIT; + if (GET_CODE (XEXP (operands[0], 0)) == POST_INC) + { + operands[1] = gen_rtx (MEM, SImode, + gen_rtx (PLUS, VOIDmode, XEXP(operands[0], 0), + gen_rtx (CONST_INT, VOIDmode, -8))); + return \"move%.l %0,%3\;add%.l %R2,%0\;addx%.l %2,%3\;move%.l %3,%1\"; + } + else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) + { + operands[1] = XEXP(operands[0], 0); + return \"add%.l %R2,%0\;move%.l %0,%3\;addx%.l %2,%3\;move%.l %3,%1\"; + } + else + { + operands[1] = adj_offsettable_operand (operands[0], 4); + return \"add%.l %R2,%1\;move%.l %0,%3\;addx%.l %2,%3\;move%.l %3,%0\"; + } + } + } ") + + (define_insn "addsi_lshrsi_31" + [(set (match_operand:SI 0 "general_operand" "=dm") + (plus:SI (lshiftrt:SI (match_operand:SI 1 "general_operand" "rm") + (const_int 31)) + (match_dup 1)))] + "" + "* + { + operands[2] = operands[0]; + operands[3] = gen_label_rtx(); + if (GET_CODE (operands[0]) == MEM) + { + if (GET_CODE (XEXP (operands[0], 0)) == POST_INC) + operands[0] = gen_rtx (MEM, SImode, XEXP (XEXP (operands[0], 0), 0)); + else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) + operands[2] = gen_rtx (MEM, SImode, XEXP (XEXP (operands[0], 0), 0)); + } + output_asm_insn (\"move%.l %1,%0\", operands); + #ifdef MOTOROLA + output_asm_insn (\"jbpl %l3\", operands); + #else + output_asm_insn (\"jpl %l3\", operands); + #endif + #ifndef NO_ADDSUB_Q + output_asm_insn (\"addq%.l %#1,%2\", operands); + #else + output_asm_insn (\"add%.l %#1,%2\", operands); + #endif + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", + CODE_LABEL_NUMBER (operands[3])); + return \"\"; + }") + ;; Note that the middle two alternatives are near-duplicates ;; in order to handle insns generated by reload. *************** *** 2207,2210 **** --- 2511,2535 ---- (define_insn "" [(set (match_operand:DF 0 "general_operand" "=f") + (plus:DF (float:DF (match_operand:SI 2 "general_operand" "dmi")) + (match_operand:DF 1 "general_operand" "0")))] + "TARGET_68881" + "f%&add%.l %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (plus:DF (float:DF (match_operand:HI 2 "general_operand" "dmn")) + (match_operand:DF 1 "general_operand" "0")))] + "TARGET_68881" + "f%&add%.w %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (plus:DF (float:DF (match_operand:QI 2 "general_operand" "dmn")) + (match_operand:DF 1 "general_operand" "0")))] + "TARGET_68881" + "f%&add%.b %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") (plus:DF (match_operand:DF 1 "general_operand" "%0") (match_operand:DF 2 "general_operand" "fmG")))] *************** *** 2242,2245 **** --- 2567,2591 ---- (define_insn "" [(set (match_operand:SF 0 "general_operand" "=f") + (plus:SF (float:SF (match_operand:SI 2 "general_operand" "dmi")) + (match_operand:SF 1 "general_operand" "0")))] + "TARGET_68881" + "f%$add%.l %2,%0") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (plus:SF (float:SF (match_operand:HI 2 "general_operand" "dmn")) + (match_operand:SF 1 "general_operand" "0")))] + "TARGET_68881" + "f%$add%.w %2,%0") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (plus:SF (float:SF (match_operand:QI 2 "general_operand" "dmn")) + (match_operand:SF 1 "general_operand" "0")))] + "TARGET_68881" + "f%$add%.b %2,%0") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") (plus:SF (match_operand:SF 1 "general_operand" "%0") (match_operand:SF 2 "general_operand" "fdmF")))] *************** *** 2254,2257 **** --- 2600,2697 ---- ;; subtract instructions + (define_insn "subdia_sexthishl32" + [(set (match_operand:DI 0 "register_operand" "+a") + (minus:DI (match_dup 0) + (ashift:DI (sign_extend:DI (match_operand:HI 1 "general_operand" "rm")) + (const_int 32))))] + "" + "* + { + CC_STATUS_INIT; + return \"sub%.w %1,%0\"; + } ") + + (define_insn "subdid_sexthishl32" + [(set (match_operand:DI 0 "general_operand" "+ro") + (minus:DI (match_dup 0) + (ashift:DI (sign_extend:DI (match_operand:HI 1 "general_operand" "rm")) + (const_int 32)))) + (clobber (match_scratch:SI 2 "=a"))] + "" + "* + { + CC_STATUS_INIT; + return \"move%.w %1,%2\;sub%.l %2,%0\"; + } ") + + (define_insn "subdi_dishl32" + [(set (match_operand:DI 0 "general_operand" "+ro") + (minus:DI (match_dup 0) + (ashift:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32))))] + "" + "* + { + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == REG) + operands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); + else + operands[1] = adj_offsettable_operand (operands[1], 4); + return \"sub%.l %1,%0\"; + } ") + + (define_insn "subdi3" + [(set (match_operand:DI 0 "general_operand" "=d,<,d,o<>") + (minus:DI (match_operand:DI 1 "general_operand" "%0,0,0,0") + (match_operand:DI 2 "general_operand" "d,<,*ao>,d"))) + (clobber (match_scratch:SI 3 "=X,X,d,d"))] + "" + "* + { + if (DATA_REG_P (operands[0])) + { + if (DATA_REG_P (operands[2])) + return \"sub%.l %R2,%R0\;subx%.l %2,%0\"; + else if (GET_CODE (operands[2]) == MEM + && GET_CODE (XEXP (operands[2], 0)) == POST_INC) + { + return \"move%.l %2,%3\;sub%.l %2,%R0\;subx%.l %3,%0\"; + } + else + { + /* TODO : this should work also for CONST operands[2] */ + if (GET_CODE (operands[2]) == REG) + operands[1] = gen_rtx (REG, SImode, REGNO (operands[2]) + 1); + else + operands[1] = adj_offsettable_operand (operands[2], 4); + return \"move%.l %2,%3\;sub%.l %1,%R0\;subx%.l %3,%0\"; + } + } + else if (GET_CODE (operands[0]) == MEM) + { + if (GET_CODE (operands[2]) == MEM + && GET_CODE (XEXP (operands[2], 0)) == PRE_DEC) + return \"sub%.l %2,%0\;subx%.l %2,%0\"; + CC_STATUS_INIT; + if (GET_CODE (XEXP (operands[0], 0)) == POST_INC) + { + operands[1] = gen_rtx (MEM, SImode, + gen_rtx (PLUS, VOIDmode, XEXP(operands[0], 0), + gen_rtx (CONST_INT, VOIDmode, -8))); + return \"move%.l %0,%3\;sub%.l %R2,%0\;subx%.l %2,%3\;move%.l %3,%1\"; + } + else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) + { + operands[1] = XEXP(operands[0], 0); + return \"sub%.l %R2,%0\;move%.l %0,%3\;subx%.l %2,%3\;move%.l %3,%1\"; + } + else + { + operands[1] = adj_offsettable_operand (operands[0], 4); + return \"sub%.l %R2,%1\;move%.l %0,%3\;subx%.l %2,%3\;move%.l %3,%0\"; + } + } + } ") + (define_insn "subsi3" [(set (match_operand:SI 0 "general_operand" "=m,r") *************** *** 2323,2326 **** --- 2763,2787 ---- [(set (match_operand:DF 0 "general_operand" "=f") (minus:DF (match_operand:DF 1 "general_operand" "0") + (float:DF (match_operand:SI 2 "general_operand" "dmi"))))] + "TARGET_68881" + "f%&sub%.l %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (minus:DF (match_operand:DF 1 "general_operand" "0") + (float:DF (match_operand:HI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "f%&sub%.w %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (minus:DF (match_operand:DF 1 "general_operand" "0") + (float:DF (match_operand:QI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "f%&sub%.b %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (minus:DF (match_operand:DF 1 "general_operand" "0") (match_operand:DF 2 "general_operand" "fmG")))] "TARGET_68881" *************** *** 2358,2361 **** --- 2819,2843 ---- [(set (match_operand:SF 0 "general_operand" "=f") (minus:SF (match_operand:SF 1 "general_operand" "0") + (float:SF (match_operand:SI 2 "general_operand" "dmi"))))] + "TARGET_68881" + "f%$sub%.l %2,%0") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (minus:SF (match_operand:SF 1 "general_operand" "0") + (float:SF (match_operand:HI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "f%$sub%.w %2,%0") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (minus:SF (match_operand:SF 1 "general_operand" "0") + (float:SF (match_operand:QI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "f%$sub%.b %2,%0") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (minus:SF (match_operand:SF 1 "general_operand" "0") (match_operand:SF 2 "general_operand" "fdmF")))] "TARGET_68881" *************** *** 2545,2551 **** { operands[3] = gen_reg_rtx (SImode); ! if (CONSTANT_P (operands[2])) { ! /* We have to rearrange the operand order for the matching constraints. */ emit_insn (gen_const_umulsi3_highpart (operands[0], operands[3], operands[1], operands[2])); --- 3027,3036 ---- { operands[3] = gen_reg_rtx (SImode); ! if (GET_CODE (operands[2]) == CONST_INT ! || GET_CODE (operands[2]) == CONST_DOUBLE) { ! if (! const_uint32_operand (operands[2], VOIDmode)) ! abort (); ! /* We have to adjust the operand order for the matching constraints. */ emit_insn (gen_const_umulsi3_highpart (operands[0], operands[3], operands[1], operands[2])); *************** *** 2570,2574 **** (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 2 "register_operand" "1")) ! (match_operand:DI 3 "immediate_operand" "i")) (const_int 32)))) (clobber (match_operand:SI 1 "register_operand" "=d"))] --- 3055,3059 ---- (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 2 "register_operand" "1")) ! (match_operand 3 "const_uint32_operand" "")) (const_int 32)))) (clobber (match_operand:SI 1 "register_operand" "=d"))] *************** *** 2589,2595 **** { operands[3] = gen_reg_rtx (SImode); ! if (CONSTANT_P (operands[2])) { ! /* We have to rearrange the operand order for the matching constraints. */ emit_insn (gen_const_smulsi3_highpart (operands[0], operands[3], operands[1], operands[2])); --- 3074,3083 ---- { operands[3] = gen_reg_rtx (SImode); ! if (GET_CODE (operands[2]) == CONST_INT ! || GET_CODE (operands[2]) == CONST_DOUBLE) { ! if (! const_sint32_operand (operands[2], VOIDmode)) ! abort (); ! /* We have to adjust the operand order for the matching constraints. */ emit_insn (gen_const_smulsi3_highpart (operands[0], operands[3], operands[1], operands[2])); *************** *** 2614,2618 **** (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 2 "register_operand" "1")) ! (match_operand:DI 3 "immediate_operand" "i")) (const_int 32)))) (clobber (match_operand:SI 1 "register_operand" "=d"))] --- 3102,3106 ---- (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 2 "register_operand" "1")) ! (match_operand 3 "const_sint32_operand" "")) (const_int 32)))) (clobber (match_operand:SI 1 "register_operand" "=d"))] *************** *** 2647,2650 **** --- 3135,3159 ---- (define_insn "" [(set (match_operand:DF 0 "general_operand" "=f") + (mult:DF (float:DF (match_operand:SI 2 "general_operand" "dmi")) + (match_operand:DF 1 "general_operand" "0")))] + "TARGET_68881" + "f%&mul%.l %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (mult:DF (float:DF (match_operand:HI 2 "general_operand" "dmn")) + (match_operand:DF 1 "general_operand" "0")))] + "TARGET_68881" + "f%&mul%.w %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (mult:DF (float:DF (match_operand:QI 2 "general_operand" "dmn")) + (match_operand:DF 1 "general_operand" "0")))] + "TARGET_68881" + "f%&mul%.b %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") (mult:DF (match_operand:DF 1 "general_operand" "%0") (match_operand:DF 2 "general_operand" "fmG")))] *************** *** 2691,2694 **** --- 3200,3239 ---- (define_insn "" [(set (match_operand:SF 0 "general_operand" "=f") + (mult:SF (float:SF (match_operand:SI 2 "general_operand" "dmi")) + (match_operand:SF 1 "general_operand" "0")))] + "TARGET_68881" + "* + { + return (TARGET_68040_ONLY + ? \"fsmul%.l %2,%0\" + : \"fsglmul%.l %2,%0\"); + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (mult:SF (float:SF (match_operand:HI 2 "general_operand" "dmn")) + (match_operand:SF 1 "general_operand" "0")))] + "TARGET_68881" + "* + { + return (TARGET_68040_ONLY + ? \"fsmul%.w %2,%0\" + : \"fsglmul%.w %2,%0\"); + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (mult:SF (float:SF (match_operand:QI 2 "general_operand" "dmn")) + (match_operand:SF 1 "general_operand" "0")))] + "TARGET_68881" + "* + { + return (TARGET_68040_ONLY + ? \"fsmul%.b %2,%0\" + : \"fsglmul%.b %2,%0\"); + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") (mult:SF (match_operand:SF 1 "general_operand" "%0") (match_operand:SF 2 "general_operand" "fdmF")))] *************** *** 2714,2810 **** ;; divide instructions - (define_insn "divhi3" - [(set (match_operand:HI 0 "general_operand" "=d") - (div:HI (match_operand:HI 1 "general_operand" "0") - (match_operand:HI 2 "general_operand" "dmn")))] - "" - "* - { - #ifdef MOTOROLA - return \"ext%.l %0\;divs%.w %2,%0\"; - #else - return \"extl %0\;divs %2,%0\"; - #endif - }") - - ;; These patterns don't work because the divs instruction is undefined if - ;; the quotient is more than 16 bits. This valid C would be miscompiled: - ;; int n; short d; unsigned short q; ... q = (unsigned int) (n / d); - ;; Imagine what happens when n = 100000 and d = 1. - ;;(define_insn "divhisi3" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI - ;; (div:SI - ;; (match_operand:SI 1 "general_operand" "0") - ;; (sign_extend:SI (match_operand:HI 2 "nonimmediate_operand" "dm")))))] - ;; "" - ;; "* - ;;{ - ;;#ifdef MOTOROLA - ;; return \"divs%.w %2,%0\"; - ;;#else - ;; return \"divs %2,%0\"; - ;;#endif - ;;}") - - ;;(define_insn "" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI (div:SI (match_operand:SI 1 "general_operand" "0") - ;; (match_operand:SI 2 "const_int_operand" "n"))))] - ;; "" - ;; "* - ;;{ - ;;#ifdef MOTOROLA - ;; return \"divs%.w %2,%0\"; - ;;#else - ;; return \"divs %2,%0\"; - ;;#endif - ;;}") - - (define_insn "udivhi3" - [(set (match_operand:HI 0 "general_operand" "=d") - (udiv:HI (match_operand:HI 1 "general_operand" "0") - (match_operand:HI 2 "general_operand" "dmn")))] - "" - "* - { - #ifdef MOTOROLA - return \"and%.l %#0xFFFF,%0\;divu%.w %2,%0\"; - #else - return \"andl %#0xFFFF,%0\;divu %2,%0\"; - #endif - }") - - ;; See comment before divhisi3 why these are commented out. - ;;(define_insn "udivhisi3" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI - ;; (udiv:SI - ;; (match_operand:SI 1 "general_operand" "0") - ;; (zero_extend:SI (match_operand:HI 2 "nonimmediate_operand" "dm")))))] - ;; "" - ;; "* - ;;{ - ;;#ifdef MOTOROLA - ;; return \"divu%.w %2,%0\"; - ;;#else - ;; return \"divu %2,%0\"; - ;;#endif - ;;}") - - ;;(define_insn "" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI (udiv:SI (match_operand:SI 1 "general_operand" "0") - ;; (match_operand:SI 2 "const_int_operand" "n"))))] - ;; "" - ;; "* - ;;{ - ;;#ifdef MOTOROLA - ;; return \"divu%.w %2,%0\"; - ;;#else - ;; return \"divu %2,%0\"; - ;;#endif - ;;}") - (define_expand "divdf3" [(set (match_operand:DF 0 "general_operand" "") --- 3259,3262 ---- *************** *** 2833,2836 **** --- 3285,3309 ---- [(set (match_operand:DF 0 "general_operand" "=f") (div:DF (match_operand:DF 1 "general_operand" "0") + (float:DF (match_operand:SI 2 "general_operand" "dmi"))))] + "TARGET_68881" + "f%&div%.l %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (div:DF (match_operand:DF 1 "general_operand" "0") + (float:DF (match_operand:HI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "f%&div%.w %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (div:DF (match_operand:DF 1 "general_operand" "0") + (float:DF (match_operand:QI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "f%&div%.b %2,%0") + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f") + (div:DF (match_operand:DF 1 "general_operand" "0") (match_operand:DF 2 "general_operand" "fmG")))] "TARGET_68881" *************** *** 2868,2871 **** --- 3341,3380 ---- [(set (match_operand:SF 0 "general_operand" "=f") (div:SF (match_operand:SF 1 "general_operand" "0") + (float:SF (match_operand:SI 2 "general_operand" "dmi"))))] + "TARGET_68881" + "* + { + return (TARGET_68040_ONLY + ? \"fsdiv%.l %2,%0\" + : \"fsgldiv%.l %2,%0\"); + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (div:SF (match_operand:SF 1 "general_operand" "0") + (float:SF (match_operand:HI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "* + { + return (TARGET_68040_ONLY + ? \"fsdiv%.w %2,%0\" + : \"fsgldiv%.w %2,%0\"); + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (div:SF (match_operand:SF 1 "general_operand" "0") + (float:SF (match_operand:QI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "* + { + return (TARGET_68040_ONLY + ? \"fsdiv%.b %2,%0\" + : \"fsgldiv%.b %2,%0\"); + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f") + (div:SF (match_operand:SF 1 "general_operand" "0") (match_operand:SF 2 "general_operand" "fdmF")))] "TARGET_68881" *************** *** 2890,2995 **** ;; Remainder instructions. - (define_insn "modhi3" - [(set (match_operand:HI 0 "general_operand" "=d") - (mod:HI (match_operand:HI 1 "general_operand" "0") - (match_operand:HI 2 "general_operand" "dmn")))] - "" - "* - { - /* The swap insn produces cc's that don't correspond to the result. */ - CC_STATUS_INIT; - #ifdef MOTOROLA - return \"ext%.l %0\;divs%.w %2,%0\;swap %0\"; - #else - return \"extl %0\;divs %2,%0\;swap %0\"; - #endif - }") - - ;; See comment before divhisi3 why these are commented out. - ;;(define_insn "modhisi3" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI - ;; (mod:SI - ;; (match_operand:SI 1 "general_operand" "0") - ;; (sign_extend:SI (match_operand:HI 2 "nonimmediate_operand" "dm")))))] - ;; "" - ;; "* - ;;{ - ;; /* The swap insn produces cc's that don't correspond to the result. */ - ;; CC_STATUS_INIT; - ;;#ifdef MOTOROLA - ;; return \"divs%.w %2,%0\;swap %0\"; - ;;#else - ;; return \"divs %2,%0\;swap %0\"; - ;;#endif - ;;}") - - ;;(define_insn "" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI (mod:SI (match_operand:SI 1 "general_operand" "0") - ;; (match_operand:SI 2 "const_int_operand" "n"))))] - ;; "" - ;; "* - ;;{ - ;; /* The swap insn produces cc's that don't correspond to the result. */ - ;; CC_STATUS_INIT; - ;;#ifdef MOTOROLA - ;; return \"divs%.w %2,%0\;swap %0\"; - ;;#else - ;; return \"divs %2,%0\;swap %0\"; - ;;#endif - ;;}") - - (define_insn "umodhi3" - [(set (match_operand:HI 0 "general_operand" "=d") - (umod:HI (match_operand:HI 1 "general_operand" "0") - (match_operand:HI 2 "general_operand" "dmn")))] - "" - "* - { - /* The swap insn produces cc's that don't correspond to the result. */ - CC_STATUS_INIT; - #ifdef MOTOROLA - return \"and%.l %#0xFFFF,%0\;divu%.w %2,%0\;swap %0\"; - #else - return \"andl %#0xFFFF,%0\;divu %2,%0\;swap %0\"; - #endif - }") - - ;; See comment before divhisi3 why these are commented out. - ;;(define_insn "umodhisi3" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI - ;; (umod:SI - ;; (match_operand:SI 1 "general_operand" "0") - ;; (zero_extend:SI (match_operand:HI 2 "nonimmediate_operand" "dm")))))] - ;; "" - ;; "* - ;;{ - ;; /* The swap insn produces cc's that don't correspond to the result. */ - ;; CC_STATUS_INIT; - ;;#ifdef MOTOROLA - ;; return \"divu%.w %2,%0\;swap %0\"; - ;;#else - ;; return \"divu %2,%0\;swap %0\"; - ;;#endif - ;;}") - - ;;(define_insn "" - ;; [(set (match_operand:HI 0 "general_operand" "=d") - ;; (truncate:HI (umod:SI (match_operand:SI 1 "general_operand" "0") - ;; (match_operand:SI 2 "const_int_operand" "n"))))] - ;; "" - ;; "* - ;;{ - ;; /* The swap insn produces cc's that don't correspond to the result. */ - ;; CC_STATUS_INIT; - ;;#ifdef MOTOROLA - ;; return \"divu%.w %2,%0\;swap %0\"; - ;;#else - ;; return \"divu %2,%0\;swap %0\"; - ;;#endif - ;;}") - (define_insn "divmodsi4" [(set (match_operand:SI 0 "general_operand" "=d") --- 3399,3402 ---- *************** *** 3021,3024 **** --- 3428,3477 ---- return \"divul%.l %2,%3:%0\"; }") + + (define_insn "divmodhi4" + [(set (match_operand:HI 0 "general_operand" "=d") + (div:HI (match_operand:HI 1 "general_operand" "0") + (match_operand:HI 2 "general_operand" "dmsK"))) + (set (match_operand:HI 3 "general_operand" "=d") + (mod:HI (match_dup 1) (match_dup 2)))] + "" + "* + { + #ifdef MOTOROLA + output_asm_insn(\"ext%.l %0\;divs%.w %2,%0\", operands); + #else + output_asm_insn(\"extl %0\;divs %2,%0\", operands); + #endif + if (!find_reg_note(insn, REG_UNUSED, operands[3])) + { + CC_STATUS_INIT; + return \"move%.l %0,%3\;swap %3\"; + } + else + return \"\"; + }") + + (define_insn "udivmodhi4" + [(set (match_operand:HI 0 "general_operand" "=d") + (udiv:HI (match_operand:HI 1 "general_operand" "0") + (match_operand:HI 2 "general_operand" "dmsK"))) + (set (match_operand:HI 3 "general_operand" "=d") + (umod:HI (match_dup 1) (match_dup 2)))] + "" + "* + { + #ifdef MOTOROLA + output_asm_insn(\"and%.l %#0xFFFF,%0\;divu%.w %2,%0\", operands); + #else + output_asm_insn(\"and%.l %#0xFFFF,%0\;divu %2,%0\", operands); + #endif + if (!find_reg_note(insn, REG_UNUSED, operands[3])) + { + CC_STATUS_INIT; + return \"move%.l %0,%3\;swap %3\"; + } + else + return \"\"; + }") ;; logical-and instructions *************** *** 3195,3198 **** --- 3648,3670 ---- "" "or%.b %1,%0") + + (define_insn "" + [(set (match_operand:SI 0 "general_operand" "=o,d") + (ior:SI (zero_extend:SI (match_operand 1 "general_operand" "dn,dmn")) + (match_operand:SI 2 "general_operand" "0,0")))] + "" + "* + { + int byte_mode; + + CC_STATUS_INIT; + byte_mode = (GET_MODE(operands[1]) == QImode); + if (GET_CODE (operands[0]) == MEM) + operands[0] = adj_offsettable_operand (operands[0], byte_mode ? 3 : 2); + if (byte_mode) + return \"or%.b %1,%0\"; + else + return \"or%.w %1,%0\"; + }") ;; xor instructions *************** *** 3263,3266 **** --- 3735,3756 ---- ;; negation instructions + (define_insn "negdi2" + [(set (match_operand:DI 0 "general_operand" "=d*ao,<") + (neg:DI (match_operand:DI 1 "general_operand" "0,0")))] + "" + "* + { + if (which_alternative == 1) + return \"neg%.l %0\;negx%.l %0\"; + if (GET_CODE (operands[0]) == REG) + operands[1] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[1] = adj_offsettable_operand (operands[0], 4); + if (ADDRESS_REG_P (operands[0])) + return \"exg %/d0,%1\;neg%.l %/d0\;exg %/d0,%1\;exg %/d0,%0\;negx%.l %/d0\;exg %/d0,%0\"; + else + return \"neg%.l %1\;negx%.l %0\"; + } ") + (define_insn "negsi2" [(set (match_operand:SI 0 "general_operand" "=dm") *************** *** 3293,3302 **** "neg%.b %0") (define_expand "negsf2" [(set (match_operand:SF 0 "general_operand" "") (neg:SF (match_operand:SF 1 "general_operand" "")))] ! "TARGET_68881 || TARGET_FPA" ! "") (define_insn "" [(set (match_operand:SF 0 "general_operand" "=x,y") --- 3783,3815 ---- "neg%.b %0") + ;; If using software floating point, just flip the sign bit. + (define_expand "negsf2" [(set (match_operand:SF 0 "general_operand" "") (neg:SF (match_operand:SF 1 "general_operand" "")))] ! "" ! " ! { ! if (!TARGET_FPA && !TARGET_68881) ! { ! rtx result; ! rtx target; + target = operand_subword_force (operands[0], 0, SFmode); + result = expand_binop (SImode, xor_optab, + operand_subword_force (operands[1], 0, SFmode), + GEN_INT(0x80000000), target, 0, OPTAB_WIDEN); + if (result == 0) + abort (); + + if (result != target) + emit_move_insn (result, target); + + /* Make a place for REG_EQUAL. */ + emit_move_insn (operands[0], operands[0]); + DONE; + } + }") + (define_insn "" [(set (match_operand:SF 0 "general_operand" "=x,y") *************** *** 3324,3330 **** [(set (match_operand:DF 0 "general_operand" "") (neg:DF (match_operand:DF 1 "general_operand" "")))] ! "TARGET_68881 || TARGET_FPA" ! "") (define_insn "" [(set (match_operand:DF 0 "general_operand" "=x,y") --- 3837,3871 ---- [(set (match_operand:DF 0 "general_operand" "") (neg:DF (match_operand:DF 1 "general_operand" "")))] ! "" ! " ! { ! if (!TARGET_FPA && !TARGET_68881) ! { ! rtx result; ! rtx target; ! rtx insns; ! ! start_sequence (); ! target = operand_subword (operands[0], 0, 1, DFmode); ! result = expand_binop (SImode, xor_optab, ! operand_subword_force (operands[1], 0, DFmode), ! GEN_INT(0x80000000), target, 0, OPTAB_WIDEN); ! if (result == 0) ! abort (); + if (result != target) + emit_move_insn (result, target); + + emit_move_insn (operand_subword (operands[0], 1, 1, DFmode), + operand_subword_force (operands[1], 1, DFmode)); + + insns = get_insns (); + end_sequence (); + + emit_no_conflict_block (insns, operands[0], operands[1], 0, 0); + DONE; + } + }") + (define_insn "" [(set (match_operand:DF 0 "general_operand" "=x,y") *************** *** 3351,3354 **** --- 3892,3907 ---- ;; Sqrt instruction for the 68881 + (define_insn "sqrtsf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (sqrt:SF (match_operand:SF 1 "general_operand" "fm")))] + "TARGET_68881" + "* + { + if (FP_REG_P (operands[1])) + return \"f%$sqrt%.x %1,%0\"; + else + return \"f%$sqrt%.s %1,%0\"; + }") + (define_insn "sqrtdf2" [(set (match_operand:DF 0 "general_operand" "=f") *************** *** 3358,3373 **** { if (FP_REG_P (operands[1])) ! return \"fsqrt%.x %1,%0\"; else ! return \"fsqrt%.d %1,%0\"; }") ;; Absolute value instructions (define_expand "abssf2" [(set (match_operand:SF 0 "general_operand" "") (abs:SF (match_operand:SF 1 "general_operand" "")))] ! "TARGET_68881 || TARGET_FPA" ! "") (define_insn "" --- 3911,3948 ---- { if (FP_REG_P (operands[1])) ! return \"f%&sqrt%.x %1,%0\"; else ! return \"f%&sqrt%.d %1,%0\"; }") ;; Absolute value instructions + ;; If using software floating point, just zero the sign bit. (define_expand "abssf2" [(set (match_operand:SF 0 "general_operand" "") (abs:SF (match_operand:SF 1 "general_operand" "")))] ! "" ! " ! { ! if (!TARGET_FPA && !TARGET_68881) ! { ! rtx result; ! rtx target; ! ! target = operand_subword_force (operands[0], 0, SFmode); ! result = expand_binop (SImode, and_optab, ! operand_subword_force (operands[1], 0, SFmode), ! GEN_INT(0x7fffffff), target, 0, OPTAB_WIDEN); ! if (result == 0) ! abort (); ! ! if (result != target) ! emit_move_insn (result, target); ! ! /* Make a place for REG_EQUAL. */ ! emit_move_insn (operands[0], operands[0]); ! DONE; ! } ! }") (define_insn "" *************** *** 3391,3396 **** [(set (match_operand:DF 0 "general_operand" "") (abs:DF (match_operand:DF 1 "general_operand" "")))] ! "TARGET_68881 || TARGET_FPA" ! "") (define_insn "" --- 3966,3999 ---- [(set (match_operand:DF 0 "general_operand" "") (abs:DF (match_operand:DF 1 "general_operand" "")))] ! "" ! " ! { ! if (!TARGET_FPA && !TARGET_68881) ! { ! rtx result; ! rtx target; ! rtx insns; ! ! start_sequence (); ! target = operand_subword (operands[0], 0, 1, DFmode); ! result = expand_binop (SImode, and_optab, ! operand_subword_force (operands[1], 0, DFmode), ! GEN_INT(0x7fffffff), target, 0, OPTAB_WIDEN); ! if (result == 0) ! abort (); ! ! if (result != target) ! emit_move_insn (result, target); ! ! emit_move_insn (operand_subword (operands[0], 1, 1, DFmode), ! operand_subword_force (operands[1], 1, DFmode)); ! ! insns = get_insns (); ! end_sequence (); ! ! emit_no_conflict_block (insns, operands[0], operands[1], 0, 0); ! DONE; ! } ! }") (define_insn "" *************** *** 3413,3416 **** --- 4016,4037 ---- ;; one complement instructions + ;; "one_cmpldi2" is only here to help combine(). + (define_insn "one_cmpldi2" + [(set (match_operand:DI 0 "general_operand" "=dm") + (not:DI (match_operand:DI 1 "general_operand" "0")))] + "" + "* + { + CC_STATUS_INIT; + if (GET_CODE (operands[0]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else if (GET_CODE (XEXP (operands[0], 0)) == POST_INC + || GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) + operands[1] = operands[0]; + else + operands[1] = adj_offsettable_operand (operands[0], 4); + return \"not%.l %1\;not%.l %0\"; + }") + (define_insn "one_cmplsi2" [(set (match_operand:SI 0 "general_operand" "=dm") *************** *** 3446,3449 **** --- 4067,4168 ---- ;; We don't need the shift memory by 1 bit instruction + (define_insn "ashldi_extsi" + [(set (match_operand:DI 0 "general_operand" "=ro") + (ashift:DI + (match_operator:DI 2 "extend_operator" + [(match_operand:SI 1 "general_operand" "rm")]) + (const_int 32)))] + "" + "* + { + CC_STATUS_INIT; + if (GET_CODE (operands[0]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[2] = adj_offsettable_operand (operands[0], 4); + if (ADDRESS_REG_P (operands[0])) + return \"move%.l %1,%0\;sub%.l %2,%2\"; + else + return \"move%.l %1,%0\;clr%.l %2\"; + } ") + + (define_insn "ashldi_sexthi" + [(set (match_operand:DI 0 "register_operand" "=*da") + (ashift:DI (sign_extend:DI (match_operand:HI 1 "general_operand" "rm")) + (const_int 32)))] + "" + "* + { + CC_STATUS_INIT; + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (DATA_REG_P (operands[0])) + return \"move%.w %1,%0\;ext%.l %0\;clr%.l %2\"; + else + return \"move%.w %1,%0\;sub%.l %2,%2\"; + } ") + + (define_insn "ashldi_const32" + [(set (match_operand:DI 0 "general_operand" "=ro,<,>") + (ashift:DI (match_operand:DI 1 "general_operand" "ro,ro,ro") + (const_int 32)))] + "" + "* + { + CC_STATUS_INIT; + if (GET_CODE (operands[1]) == REG) + operands[3] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); + else + operands[3] = adj_offsettable_operand (operands[1], 4); + if (which_alternative == 1) + return \"clr%.l %0\;move%.l %3,%0\"; + if (which_alternative == 2) + return \"move%.l %3,%0\;clr%.l %0\"; + if (GET_CODE (operands[0]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[2] = adj_offsettable_operand (operands[0], 4); + if (ADDRESS_REG_P (operands[2])) + return \"move%.l %3,%0\;sub%.l %2,%2\"; + else + return \"move%.l %3,%0\;clr%.l %2\"; + } ") + + ;; The predicate below must be general_operand, because ashldi3 allows that + (define_insn "ashldi_const" + [(set (match_operand:DI 0 "general_operand" "=d") + (ashift:DI (match_operand:DI 1 "general_operand" "0") + (match_operand 2 "const_int_operand" "n")))] + "(INTVAL (operands[2]) == 1 + || INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16 + || INTVAL (operands[2]) == 2 || INTVAL (operands[2]) == 3)" + "* + { + operands[1] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (INTVAL (operands[2]) == 1) + return \"add%.l %1,%1\;addx%.l %0,%0\"; + else if (INTVAL (operands[2]) == 8) + return \"rol%.l %#8,%1\;rol%.l %#8,%0\;move%.b %1,%0\;clr%.b %1\"; + else if (INTVAL (operands[2]) == 16) + return \"swap %1\;swap %0\;move%.w %1,%0\;clr%.w %1\"; + else if (INTVAL (operands[2]) == 2) + return \"add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0\"; + else/* if (INTVAL (operands[2]) == 3)*/ + return \"add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0\"; + } ") + + (define_expand "ashldi3" + [(set (match_operand:DI 0 "general_operand" "") + (ashift:DI (match_operand:DI 1 "general_operand" "") + (match_operand 2 "const_int_operand" "")))] + "" + " + { + if (GET_CODE (operands[2]) != CONST_INT + || (INTVAL (operands[2]) != 1 && INTVAL (operands[2]) != 32 + && INTVAL (operands[2]) != 8 && INTVAL (operands[2]) != 16 + && INTVAL (operands[2]) != 2 && INTVAL (operands[2]) != 3)) + FAIL; + } ") + ;; On all 68k models, this makes faster code in a special case. *************** *** 3538,3541 **** --- 4257,4357 ---- }") + (define_insn "subreghi1ashrdi_const32" + [(set (match_operand:HI 0 "general_operand" "=rm") + (subreg:HI (ashiftrt:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32)) 1))] + "" + "* + { + if (GET_CODE (operands[1]) != REG) + operands[1] = adj_offsettable_operand (operands[1], 2); + return \"move%.w %1,%0\"; + } ") + + (define_insn "subregsi1ashrdi_const32" + [(set (match_operand:SI 0 "general_operand" "=rm") + (subreg:SI (ashiftrt:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32)) 1))] + "" + "* + { + return \"move%.l %1,%0\"; + } ") + + (define_insn "ashrdi_const32" + [(set (match_operand:DI 0 "register_operand" "=d") + (ashiftrt:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32)))] + "" + "* + { + CC_STATUS_INIT; + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (TARGET_68020) + return \"move%.l %1,%2\;smi %0\;extb%.l %0\"; + else + return \"move%.l %1,%2\;smi %0\;ext%.w %0\;ext%.l %0\"; + } ") + + (define_insn "ashrdi_const32_mem" + [(set (match_operand:DI 0 "general_operand" "=o,<") + (ashiftrt:DI (match_operand:DI 1 "general_operand" "ro,ro") + (const_int 32))) + (clobber (match_scratch:SI 2 "=d,d"))] + "" + "* + { + CC_STATUS_INIT; + if (which_alternative == 1) + operands[3] = operands[0]; + else + operands[3] = adj_offsettable_operand (operands[0], 4); + if (TARGET_68020) + return \"move%.l %1,%3\;smi %2\;extb%.l %2\;move%.l %2,%0\"; + else + return \"move%.l %1,%3\;smi %2\;ext%.w %2\;ext%.l %2\;move%.l %2,%0\"; + } ") + + ;; The predicate below must be general_operand, because ashrdi3 allows that + (define_insn "ashrdi_const" + [(set (match_operand:DI 0 "general_operand" "=d") + (ashiftrt:DI (match_operand:DI 1 "general_operand" "0") + (match_operand 2 "const_int_operand" "n")))] + "(INTVAL (operands[2]) == 1 || INTVAL (operands[2]) == 2 + || INTVAL (operands[2]) == 3 || INTVAL (operands[2]) == 8 + || INTVAL (operands[2]) == 16 || INTVAL (operands[2]) == 63)" + "* + { + operands[1] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (INTVAL (operands[2]) == 63) + return \"add%.l %0,%0\;subx%.l %0,%0\;move%.l %0,%1\"; + CC_STATUS_INIT; + if (INTVAL (operands[2]) == 1) + return \"asr%.l %#1,%0\;roxr%.l %#1,%1\"; + else if (INTVAL (operands[2]) == 8) + return \"move%.b %0,%1\;asr%.l %#8,%0\;ror%.l %#8,%1\"; + else if (INTVAL (operands[2]) == 16) + return \"move%.w %0,%1\;clr%.w %0\;swap %1\;ext%.l %0\"; + else if (INTVAL (operands[2]) == 2) + return \"asr%.l %#1,%0\;roxr%.l %#1,%1\;asr%.l %#1,%0\;roxr%.l %#1,%1\"; + else/* if (INTVAL (operands[2]) == 3)*/ + return \"asr%.l %#1,%0\;roxr%.l %#1,%1\;asr%.l %#1,%0\;roxr%.l %#1,%1\;asr%.l %#1,%0\;roxr%.l %#1,%1\"; + } ") + + (define_expand "ashrdi3" + [(set (match_operand:DI 0 "general_operand" "") + (ashiftrt:DI (match_operand:DI 1 "general_operand" "") + (match_operand 2 "const_int_operand" "")))] + "" + " + { + if (GET_CODE (operands[2]) != CONST_INT + || (INTVAL (operands[2]) != 1 && INTVAL (operands[2]) != 2 + && INTVAL (operands[2]) != 3 && INTVAL (operands[2]) != 8 + && INTVAL (operands[2]) != 16 && INTVAL (operands[2]) != 32 + && INTVAL (operands[2]) != 63)) + FAIL; + } ") + (define_insn "ashrsi3" [(set (match_operand:SI 0 "register_operand" "=d") *************** *** 3575,3582 **** ;; logical shift instructions ;; On all 68k models, this makes faster code in a special case. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=d") (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") --- 4391,4516 ---- ;; logical shift instructions + (define_insn "" + [(set (cc0) + (subreg:SI (lshiftrt:DI (match_operand:DI 0 "general_operand" "ro") + (const_int 32)) 1)) + (set (match_operand:SI 1 "general_operand" "=dm") + (subreg:SI (lshiftrt:DI (match_operand:DI 2 "general_operand" "0") + (const_int 32)) 1))] + "" + "* + { + return \"move%.l %0,%1\"; + } ") + + (define_insn "" + [(set (cc0) + (subreg:SI (lshiftrt:DI (match_operand:DI 0 "general_operand" "ro") + (const_int 32)) 0)) + (set (match_operand:DI 1 "general_operand" "=do") + (lshiftrt:DI (match_operand:DI 2 "general_operand" "0") + (const_int 32)))] + "" + "* + { + if (GET_CODE (operands[1]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); + else + operands[2] = adj_offsettable_operand (operands[1], 4); + return \"move%.l %0,%2\;clr%.l %1\"; + } ") + + (define_insn "subreg1lshrdi_const32" + [(set (match_operand:SI 0 "general_operand" "=rm") + (subreg:SI (lshiftrt:DI (match_operand:DI 1 "general_operand" "ro") + (const_int 32)) 1))] + "" + "* + { + return \"move%.l %1,%0\"; + } ") + + (define_insn "lshrdi_const32" + [(set (match_operand:DI 0 "general_operand" "=ro,<,>") + (lshiftrt:DI (match_operand:DI 1 "general_operand" "ro,ro,ro") + (const_int 32)))] + "" + "* + { + CC_STATUS_INIT; + if (which_alternative == 1) + return \"move%.l %1,%0\;clr%.l %0\"; + if (which_alternative == 2) + return \"clr%.l %0\;move%.l %1,%0\"; + if (GET_CODE (operands[0]) == REG) + operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[2] = adj_offsettable_operand (operands[0], 4); + if (GET_CODE (operands[1]) == REG) + operands[3] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); + else + operands[3] = adj_offsettable_operand (operands[1], 4); + if (ADDRESS_REG_P (operands[0])) + return \"move%.l %1,%2\;sub%.l %0,%0\"; + else + return \"move%.l %1,%2\;clr%.l %0\"; + } ") + + ;; The predicate below must be general_operand, because lshrdi3 allows that + (define_insn "lshrdi_const" + [(set (match_operand:DI 0 "general_operand" "=d") + (lshiftrt:DI (match_operand:DI 1 "general_operand" "0") + (match_operand 2 "const_int_operand" "n")))] + "(INTVAL (operands[2]) == 1 || INTVAL (operands[2]) == 2 + || INTVAL (operands[2]) == 3 || INTVAL (operands[2]) == 8 + || INTVAL (operands[2]) == 16 || INTVAL (operands[2]) == 63)" + "* + { + operands[1] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + if (INTVAL (operands[2]) == 63) + return \"add%.l %0,%0\;clr%.l %0\;clr%.l %1\;addx%.l %1,%1\"; + CC_STATUS_INIT; + if (INTVAL (operands[2]) == 1) + return \"lsr%.l %#1,%0\;roxr%.l %#1,%1\"; + else if (INTVAL (operands[2]) == 8) + return \"move%.b %0,%1\;lsr%.l %#8,%0\;ror%.l %#8,%1\"; + else if (INTVAL (operands[2]) == 16) + return \"move%.w %0,%1\;clr%.w %0\;swap %1\;swap %0\"; + else if (INTVAL (operands[2]) == 2) + return \"lsr%.l %#1,%0\;roxr%.l %#1,%1\;lsr%.l %#1,%0\;roxr%.l %#1,%1\"; + else /*if (INTVAL (operands[2]) == 3)*/ + return \"lsr%.l %#1,%0\;roxr%.l %#1,%1\;lsr%.l %#1,%0\;roxr%.l %#1,%1\;lsr%.l %#1,%0\;roxr%.l %#1,%1\"; + } ") + + (define_expand "lshrdi3" + [(set (match_operand:DI 0 "general_operand" "") + (lshiftrt:DI (match_operand:DI 1 "general_operand" "") + (match_operand 2 "const_int_operand" "")))] + "" + " + { + if (GET_CODE (operands[2]) != CONST_INT + || (INTVAL (operands[2]) != 1 && INTVAL (operands[2]) != 2 + && INTVAL (operands[2]) != 3 && INTVAL (operands[2]) != 8 + && INTVAL (operands[2]) != 16 && INTVAL (operands[2]) != 32 + && INTVAL (operands[2]) != 63)) + FAIL; + } ") ;; On all 68k models, this makes faster code in a special case. ! (define_insn "lshrsi_31" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") ! (const_int 31)))] ! "" ! "* ! { ! return \"add%.l %0,%0\;subx%.l %0,%0\;neg%.l %0\"; ! }") ! ! ;; On all 68k models, this makes faster code in a special case. ! ! (define_insn "lshrsi_16" [(set (match_operand:SI 0 "register_operand" "=d") (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") *************** *** 3591,3595 **** ;; On the 68000, this makes faster code in a special case. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=d") (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") --- 4525,4529 ---- ;; On the 68000, this makes faster code in a special case. ! (define_insn "lshrsi_17_24" [(set (match_operand:SI 0 "register_operand" "=d") (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") *************** *** 3712,3715 **** --- 4646,4708 ---- "ror%.b %1,%0") + + ;; Bit set/clear in memory byte. + + ;; set bit, bit number is int + (define_insn "bsetmemqi" + [(set (match_operand:QI 0 "memory_operand" "+m") + (ior:QI (subreg:QI (ashift:SI (const_int 1) + (match_operand:SI 1 "general_operand" "d")) 0) + (match_dup 0)))] + "" + "* + { + CC_STATUS_INIT; + return \"bset %1,%0\"; + }") + + ;; set bit, bit number is (sign/zero)_extended from HImode/QImode + (define_insn "" + [(set (match_operand:QI 0 "memory_operand" "+m") + (ior:QI (subreg:QI (ashift:SI (const_int 1) + (match_operator:SI 2 "extend_operator" + [(match_operand 1 "general_operand" "d")])) 0) + (match_dup 0)))] + "" + "* + { + CC_STATUS_INIT; + return \"bset %1,%0\"; + }") + + ;; clear bit, bit number is int + (define_insn "bclrmemqi" + [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+m") + (const_int 1) + (minus:SI (const_int 7) + (match_operand:SI 1 "general_operand" "d"))) + (const_int 0))] + "" + "* + { + CC_STATUS_INIT; + return \"bclr %1,%0\"; + }") + + ;; clear bit, bit number is (sign/zero)_extended from HImode/QImode + (define_insn "" + [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+m") + (const_int 1) + (minus:SI (const_int 7) + (match_operator:SI 2 "extend_operator" + [(match_operand 1 "general_operand" "d")]))) + (const_int 0))] + "" + "* + { + CC_STATUS_INIT; + return \"bclr %1,%0\"; + }") + ;; Special cases of bit-field insns which we should ;; recognize in preference to the general case. *************** *** 4084,4087 **** --- 5077,5101 ---- }") + (define_insn "scc0_di" + [(set (match_operand:QI 0 "general_operand" "=dm") + (match_operator 1 "valid_dbcc_comparison_p" + [(match_operand:DI 2 "general_operand" "ro") (const_int 0)]))] + "" + "* + { + return output_scc_di (operands[1], operands[2], const0_rtx, operands[0]); + } ") + + (define_insn "scc_di" + [(set (match_operand:QI 0 "general_operand" "=dm,dm") + (match_operator 1 "valid_dbcc_comparison_p" + [(match_operand:DI 2 "general_operand" "ro,r") + (match_operand:DI 3 "general_operand" "r,ro")]))] + "" + "* + { + return output_scc_di (operands[1], operands[2], operands[3], operands[0]); + } ") + (define_insn "seq" [(set (match_operand:QI 0 "general_operand" "=d") *************** *** 4164,4167 **** --- 5178,5278 ---- ;; Basic conditional jump instructions. + (define_insn "beq0_di" + [(set (pc) + (if_then_else (eq (match_operand:DI 0 "general_operand" "d*ao,<>") + (const_int 0)) + (label_ref (match_operand 1 "" ",")) + (pc))) + (clobber (match_scratch:SI 2 "=d,d"))] + "" + "* + { + if (which_alternative == 1) + #ifdef MOTOROLA + return \"move%.l %0,%2\;or%.l %0,%2\;jbeq %l1\"; + #else + return \"move%.l %0,%2\;or%.l %0,%2\;jeq %l1\"; + #endif + if (GET_CODE (operands[0]) == REG) + operands[3] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[3] = adj_offsettable_operand (operands[0], 4); + if (! ADDRESS_REG_P (operands[0])) + #ifdef MOTOROLA + return \"move%.l %0,%2\;or%.l %3,%2\;jbeq %l1\"; + #else + return \"move%.l %0,%2\;or%.l %3,%2\;jeq %l1\"; + #endif + operands[4] = gen_label_rtx(); + #ifdef MOTOROLA + output_asm_insn (\"tst%.l %0\;jbne %l4\;tst%.l %3\;jbeq %l1\", operands); + #else + output_asm_insn (\"tst%.l %0\;jne %l4\;tst%.l %3\;jeq %l1\", operands); + #endif + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", + CODE_LABEL_NUMBER (operands[4])); + return \"\"; + } ") + + (define_insn "bne0_di" + [(set (pc) + (if_then_else (ne (match_operand:DI 0 "general_operand" "do,*a") + (const_int 0)) + (label_ref (match_operand 1 "" ",")) + (pc))) + (clobber (match_scratch:SI 2 "=d,"))] + "" + "* + { + if (GET_CODE (operands[0]) == REG) + operands[3] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + else + operands[3] = adj_offsettable_operand (operands[0], 4); + if (ADDRESS_REG_P (operands[0])) + #ifdef MOTOROLA + return \"tst%.l %0\;jbne %l1\;tst%.l %3\;jbne %l1\"; + #else + return \"tst%.l %0\;jne %l1\;tst%.l %3\;jne %l1\"; + #endif + else + #ifdef MOTOROLA + return \"move%.l %0,%2\;or%.l %3,%2\;jbne %l1\"; + #else + return \"move%.l %0,%2\;or%.l %3,%2\;jne %l1\"; + #endif + } ") + + (define_insn "bge0_di" + [(set (pc) + (if_then_else (ge (match_operand:DI 0 "general_operand" "ro") + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + "* + { + #ifdef MOTOROLA + return \"tst%.l %0\;jbge %l1\"; + #else + return \"tst%.l %0\;jge %l1\"; + #endif + } ") + + (define_insn "blt0_di" + [(set (pc) + (if_then_else (lt (match_operand:DI 0 "general_operand" "ro") + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc)))] + "" + "* + { + #ifdef MOTOROLA + return \"tst%.l %0\;jbmi %l1\"; + #else + return \"tst%.l %0\;jmi %l1\"; + #endif + } ") + (define_insn "beq" [(set (pc) *************** *** 4635,4639 **** [(set (pc) (if_then_else ! (ge (plus:HI (match_operand:HI 0 "general_operand" "+g") (const_int -1)) (const_int 0)) --- 5746,5750 ---- [(set (pc) (if_then_else ! (ge (plus:HI (match_operand:HI 0 "general_operand" "+d*am") (const_int -1)) (const_int 0)) *************** *** 4680,4684 **** [(set (pc) (if_then_else ! (ge (plus:SI (match_operand:SI 0 "general_operand" "+g") (const_int -1)) (const_int 0)) --- 5791,5795 ---- [(set (pc) (if_then_else ! (ge (plus:SI (match_operand:SI 0 "general_operand" "+d*am") (const_int -1)) (const_int 0)) *************** *** 4749,4753 **** ;; The strategy I use here is to use SYMBOL_REF_FLAG to differentiate ;; these two different operands. The macro LEGITIMATE_PIC_OPERAND_P needs ! ;; to be changed to recognize function calls symbol_ref operand as a legal ;; PIC operand (by checking whether SYMBOL_REF_FLAG is set). This will ;; avoid the compiler to load this symbol_ref operand into a register. --- 5860,5864 ---- ;; The strategy I use here is to use SYMBOL_REF_FLAG to differentiate ;; these two different operands. The macro LEGITIMATE_PIC_OPERAND_P needs ! ;; to be changed to recognize function calls symbol_ref operand as a valid ;; PIC operand (by checking whether SYMBOL_REF_FLAG is set). This will ;; avoid the compiler to load this symbol_ref operand into a register. *************** *** 5522,5525 **** --- 6633,6657 ---- (define_insn "" [(set (match_operand:XF 0 "general_operand" "=f") + (plus:XF (float:XF (match_operand:SI 2 "general_operand" "dmi")) + (match_operand:XF 1 "general_operand" "0")))] + "TARGET_68881" + "fadd%.l %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (plus:XF (float:XF (match_operand:HI 2 "general_operand" "dmn")) + (match_operand:XF 1 "general_operand" "0")))] + "TARGET_68881" + "fadd%.w %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (plus:XF (float:XF (match_operand:QI 2 "general_operand" "dmn")) + (match_operand:XF 1 "general_operand" "0")))] + "TARGET_68881" + "fadd%.b %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") (plus:XF (match_operand:XF 1 "nonimmediate_operand" "%0") (match_operand:XF 2 "nonimmediate_operand" "fmG")))] *************** *** 5547,5550 **** --- 6679,6703 ---- (define_insn "" [(set (match_operand:XF 0 "general_operand" "=f") + (minus:XF (match_operand:XF 1 "general_operand" "0") + (float:XF (match_operand:SI 2 "general_operand" "dmi"))))] + "TARGET_68881" + "fsub%.l %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (minus:XF (match_operand:XF 1 "general_operand" "0") + (float:XF (match_operand:HI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "fsub%.w %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (minus:XF (match_operand:XF 1 "general_operand" "0") + (float:XF (match_operand:QI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "fsub%.b %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") (minus:XF (match_operand:XF 1 "nonimmediate_operand" "0") (match_operand:XF 2 "nonimmediate_operand" "fmG")))] *************** *** 5572,5575 **** --- 6725,6749 ---- (define_insn "" [(set (match_operand:XF 0 "general_operand" "=f") + (mult:XF (float:XF (match_operand:SI 2 "general_operand" "dmi")) + (match_operand:XF 1 "general_operand" "0")))] + "TARGET_68881" + "fmul%.l %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (mult:XF (float:XF (match_operand:HI 2 "general_operand" "dmn")) + (match_operand:XF 1 "general_operand" "0")))] + "TARGET_68881" + "fmul%.w %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (mult:XF (float:XF (match_operand:QI 2 "general_operand" "dmn")) + (match_operand:XF 1 "general_operand" "0")))] + "TARGET_68881" + "fmul%.b %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") (mult:XF (match_operand:XF 1 "nonimmediate_operand" "%0") (match_operand:XF 2 "nonimmediate_operand" "fmG")))] *************** *** 5597,5600 **** --- 6771,6795 ---- (define_insn "" [(set (match_operand:XF 0 "general_operand" "=f") + (div:XF (match_operand:XF 1 "general_operand" "0") + (float:XF (match_operand:SI 2 "general_operand" "dmi"))))] + "TARGET_68881" + "fdiv%.l %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (div:XF (match_operand:XF 1 "general_operand" "0") + (float:XF (match_operand:HI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "fdiv%.w %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") + (div:XF (match_operand:XF 1 "general_operand" "0") + (float:XF (match_operand:QI 2 "general_operand" "dmn"))))] + "TARGET_68881" + "fdiv%.b %2,%0") + + (define_insn "" + [(set (match_operand:XF 0 "general_operand" "=f") (div:XF (match_operand:XF 1 "nonimmediate_operand" "0") (match_operand:XF 2 "nonimmediate_operand" "fmG")))] *************** *** 5607,5611 **** }") ! (define_insn "negxf2" [(set (match_operand:XF 0 "general_operand" "=f") (neg:XF (match_operand:XF 1 "nonimmediate_operand" "fmF")))] --- 6802,6844 ---- }") ! (define_expand "negxf2" ! [(set (match_operand:XF 0 "general_operand" "") ! (neg:XF (match_operand:XF 1 "general_operand" "")))] ! "" ! " ! { ! /* ??? There isn't an FPA define_insn so we could handle it here too. ! For now we don't (paranoia). */ ! if (!TARGET_FPA && !TARGET_68881) ! { ! rtx result; ! rtx target; ! rtx insns; ! ! start_sequence (); ! target = operand_subword (operands[0], 0, 1, XFmode); ! result = expand_binop (SImode, xor_optab, ! operand_subword_force (operands[1], 0, XFmode), ! GEN_INT(0x80000000), target, 0, OPTAB_WIDEN); ! if (result == 0) ! abort (); ! ! if (result != target) ! emit_move_insn (result, target); ! ! emit_move_insn (operand_subword (operands[0], 1, 1, XFmode), ! operand_subword_force (operands[1], 1, XFmode)); ! emit_move_insn (operand_subword (operands[0], 2, 1, XFmode), ! operand_subword_force (operands[1], 2, XFmode)); ! ! insns = get_insns (); ! end_sequence (); ! ! emit_no_conflict_block (insns, operands[0], operands[1], 0, 0); ! DONE; ! } ! }") ! ! (define_insn "negxf2_68881" [(set (match_operand:XF 0 "general_operand" "=f") (neg:XF (match_operand:XF 1 "nonimmediate_operand" "fmF")))] *************** *** 5618,5622 **** }") ! (define_insn "absxf2" [(set (match_operand:XF 0 "general_operand" "=f") (abs:XF (match_operand:XF 1 "nonimmediate_operand" "fmF")))] --- 6851,6893 ---- }") ! (define_expand "absxf2" ! [(set (match_operand:XF 0 "general_operand" "") ! (abs:XF (match_operand:XF 1 "general_operand" "")))] ! "" ! " ! { ! /* ??? There isn't an FPA define_insn so we could handle it here too. ! For now we don't (paranoia). */ ! if (!TARGET_FPA && !TARGET_68881) ! { ! rtx result; ! rtx target; ! rtx insns; ! ! start_sequence (); ! target = operand_subword (operands[0], 0, 1, XFmode); ! result = expand_binop (SImode, and_optab, ! operand_subword_force (operands[1], 0, XFmode), ! GEN_INT(0x7fffffff), target, 0, OPTAB_WIDEN); ! if (result == 0) ! abort (); ! ! if (result != target) ! emit_move_insn (result, target); ! ! emit_move_insn (operand_subword (operands[0], 1, 1, XFmode), ! operand_subword_force (operands[1], 1, XFmode)); ! emit_move_insn (operand_subword (operands[0], 2, 1, XFmode), ! operand_subword_force (operands[1], 2, XFmode)); ! ! insns = get_insns (); ! end_sequence (); ! ! emit_no_conflict_block (insns, operands[0], operands[1], 0, 0); ! DONE; ! } ! }") ! ! (define_insn "absxf2_68881" [(set (match_operand:XF 0 "general_operand" "=f") (abs:XF (match_operand:XF 1 "nonimmediate_operand" "fmF")))] *************** *** 5631,5638 **** (define_insn "sqrtxf2" [(set (match_operand:XF 0 "general_operand" "=f") ! (sqrt:XF (match_operand:DF 1 "nonimmediate_operand" "fm")))] "TARGET_68881" "* { return \"fsqrt%.x %1,%0\"; }") --- 6902,6975 ---- (define_insn "sqrtxf2" [(set (match_operand:XF 0 "general_operand" "=f") ! (sqrt:XF (match_operand:XF 1 "nonimmediate_operand" "fm")))] "TARGET_68881" "* { return \"fsqrt%.x %1,%0\"; + }") + + (define_insn "sinsf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (unspec:SF [(match_operand:SF 1 "general_operand" "fm")] 1))] + "TARGET_68881 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) + return \"fsin%.x %1,%0\"; + else + return \"fsin%.s %1,%0\"; + }") + + (define_insn "sindf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (unspec:DF [(match_operand:DF 1 "general_operand" "fm")] 1))] + "TARGET_68881 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) + return \"fsin%.x %1,%0\"; + else + return \"fsin%.d %1,%0\"; + }") + + (define_insn "sinxf2" + [(set (match_operand:XF 0 "general_operand" "=f") + (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 1))] + "TARGET_68881 && flag_fast_math" + "* + { + return \"fsin%.x %1,%0\"; + }") + + (define_insn "cossf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (unspec:SF [(match_operand:SF 1 "general_operand" "fm")] 2))] + "TARGET_68881 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) + return \"fcos%.x %1,%0\"; + else + return \"fcos%.s %1,%0\"; + }") + + (define_insn "cosdf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (unspec:DF [(match_operand:DF 1 "general_operand" "fm")] 2))] + "TARGET_68881 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) + return \"fcos%.x %1,%0\"; + else + return \"fcos%.d %1,%0\"; + }") + + (define_insn "cosxf2" + [(set (match_operand:XF 0 "general_operand" "=f") + (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 2))] + "TARGET_68881 && flag_fast_math" + "* + { + return \"fcos%.x %1,%0\"; }") diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68kemb.h gcc-2.7.0/config/m68k/m68kemb.h *** gcc-2.6.3/config/m68k/m68kemb.h --- gcc-2.7.0/config/m68k/m68kemb.h Thu Nov 17 14:57:34 1994 *************** *** 0 **** --- 1,39 ---- + /* Definitions of target machine for GNU compiler. "embedded" 68XXX. + This is meant to be included after m68k.h. + Copyright (C) 1994 Free Software Foundation, Inc. */ + + #define PTRDIFF_TYPE "long int" + #define SIZE_TYPE "long unsigned int" + + /* In order for bitfields to work on a 68000, or with -mnobitfield, we must + define either PCC_BITFIELD_TYPE_MATTERS or STRUCTURE_SIZE_BOUNDARY. + Defining STRUCTURE_SIZE_BOUNDARY results in structure packing problems, + so we define PCC_BITFIELD_TYPE_MATTERS. */ + #define PCC_BITFIELD_TYPE_MATTERS 1 + + /* Undef PCC_STATIC_STRUCT_RETURN so that we get a re-entrant calling + convention. */ + #undef PCC_STATIC_STRUCT_RETURN + + /* Don't default to pcc-struct-return, so that we can return small structures + and unions in registers, which is slightly more efficient. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 + + /* Return floating point values in a fp register. This make fp code a + little bit faster. It also makes -msoft-float code incompatible with + -m68881 code, so people have to be careful not to mix the two. */ + #undef FUNCTION_VALUE + #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) + + #undef LIBCALL_VALUE + #define LIBCALL_VALUE(MODE) \ + gen_rtx (REG, (MODE), \ + ((TARGET_68881 \ + && ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)) \ + ? 16 : 0)) + + #undef FUNCTION_VALUE_REGNO_P + #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (TARGET_68881 && (N) == 16)) + + #undef NEEDS_UNTYPED_CALL + #define NEEDS_UNTYPED_CALL 1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/m68kv4.h gcc-2.7.0/config/m68k/m68kv4.h *** gcc-2.6.3/config/m68k/m68kv4.h Mon Nov 7 12:41:57 1994 --- gcc-2.7.0/config/m68k/m68kv4.h Thu Jun 15 15:13:18 1995 *************** *** 18,22 **** 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 SGS_* macros to control compilation in m68k.md */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Use SGS_* macros to control compilation in m68k.md */ *************** *** 160,164 **** (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ ! : (TREE_CODE (VALTYPE) == POINTER_TYPE \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0))) --- 161,165 ---- (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ ! : (POINTER_TYPE_P (VALTYPE) \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0))) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/mot3300.h gcc-2.7.0/config/m68k/mot3300.h *** gcc-2.6.3/config/m68k/mot3300.h Fri Jul 8 18:42:57 1994 --- gcc-2.7.0/config/m68k/mot3300.h Thu Jun 15 15:13:31 1995 *************** *** 1,7 **** /* Definitions of target machine for GNU compiler, SysV68 Motorola 3300 Delta Series. ! Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc. ! Coptributed by Abramo and Roberto Bagnara (bagnara@dipisa.di.unipi.it) based on Alex Crain's 3B1 definitions. This file is part of GNU CC. --- 1,8 ---- /* Definitions of target machine for GNU compiler, SysV68 Motorola 3300 Delta Series. ! Copyright (C) 1987, 1993, 1994, 1995 Free Software Foundation, Inc. ! Contributed by Abramo and Roberto Bagnara (bagnara@dipisa.di.unipi.it) based on Alex Crain's 3B1 definitions. + Maintained by Philippe De Muyter (phdm@info.ucl.ac.be). This file is part of GNU CC. *************** *** 19,23 **** 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. */ #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ *************** *** 73,76 **** --- 75,82 ---- #define STRUCTURE_SIZE_BOUNDARY 16 + + /* Follow sysV68 cc regarding alignment imposed by char:0; */ + + #define PCC_BITFIELD_TYPE_MATTERS 1 /* Allocation boundary (in *bits*) for storing arguments in argument list. */ *************** *** 160,168 **** #define CPP_PREDEFINES "-Dm68k -Dunix -DsysV68 -D__motorola__ -Asystem(unix) -Asystem(svr3) -Acpu(m68k) -Amachine(m68k)" - /* Override part of the obstack macros. */ - - #define __PTR_TO_INT(P) ((int)(P)) - #define __INT_TO_PTR(P) ((char *)(P)) - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T sysV68 syntax)"); --- 166,169 ---- *************** *** 176,179 **** --- 177,190 ---- 1, 1, 0, 0, 0, 0, 0, 0} + /* This will return small structs in d0. */ + #define RETURN_IN_MEMORY(type) \ + ((TYPE_MODE (type) == BLKmode) \ + || (AGGREGATE_TYPE_P (type) \ + && GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)) + + /* Don't default to pcc-struct-return, because we have already specified + exactly how to return structures in the RETURN_IN_MEMORY macro. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 + /* If TARGET_68881, return SF and DF values in fp0 instead of d0. */ /* NYI: If FP=M68881U return SF and DF values in d0. */ *************** *** 185,189 **** (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ ! : (TREE_CODE (VALTYPE) == POINTER_TYPE \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0))) --- 196,200 ---- (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ ! : (POINTER_TYPE_P (VALTYPE) \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0))) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/mot3300g.h gcc-2.7.0/config/m68k/mot3300g.h *** gcc-2.6.3/config/m68k/mot3300g.h Fri Nov 11 12:39:02 1994 --- gcc-2.7.0/config/m68k/mot3300g.h Thu Jun 15 15:13:42 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ Only in gcc-2.6.3/config/m68k: netbsd-m68k.h diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/netbsd.h gcc-2.7.0/config/m68k/netbsd.h *** gcc-2.6.3/config/m68k/netbsd.h --- gcc-2.7.0/config/m68k/netbsd.h Tue May 9 18:18:42 1995 *************** *** 0 **** --- 1,62 ---- + #include + + /* Get generic NetBSD definitions. */ + + #include + + + /* See 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. */ + + #undef CPP_SPEC + #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}" + + /* Names to predefine in the preprocessor for this target machine. */ + + #define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(m68k) -Amachine(m68k)" + + /* Make gcc agree with */ + + #undef SIZE_TYPE + #define SIZE_TYPE "unsigned int" + + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "int" + + #undef WCHAR_TYPE + #define WCHAR_TYPE "short unsigned int" + + #define WCHAR_UNSIGNED 1 + + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 16 + + /* Every structure or union's size must be a multiple of 2 bytes. */ + + #define STRUCTURE_SIZE_BOUNDARY 16 + + /* This is BSD, so it wants DBX format. */ + + #define DBX_DEBUGGING_INFO + + /* Do not break .stabs pseudos into continuations. */ + + #define DBX_CONTIN_LENGTH 0 + + /* This is the char to use for continuation (in case we need to turn + continuation back on). */ + + #define DBX_CONTIN_CHAR '?' + + /* Don't use the `xsfoo;' construct in DBX output; this system + doesn't support it. */ + + #define DBX_NO_XREFS + + /* Don't default to pcc-struct-return, because gcc is the only compiler, and + we want to retain compatibility with older gcc versions. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/news.h gcc-2.7.0/config/m68k/news.h *** gcc-2.6.3/config/m68k/news.h Sat Jul 30 14:12:29 1994 --- gcc-2.7.0/config/m68k/news.h Thu Jun 15 15:14:01 1995 *************** *** 16,20 **** 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. */ #ifndef USE_GAS --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef USE_GAS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/next.h gcc-2.7.0/config/m68k/next.h *** gcc-2.6.3/config/m68k/next.h Thu Jul 28 16:10:29 1994 --- gcc-2.7.0/config/m68k/next.h Thu Jun 15 15:14:15 1995 *************** *** 16,20 **** 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 "m68k/m68k.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/next21.h gcc-2.7.0/config/m68k/next21.h *** gcc-2.6.3/config/m68k/next21.h Sat Apr 9 15:06:14 1994 --- gcc-2.7.0/config/m68k/next21.h Thu Jun 15 15:14:28 1995 *************** *** 16,20 **** 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. */ /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/pbb.h gcc-2.7.0/config/m68k/pbb.h *** gcc-2.6.3/config/m68k/pbb.h Sat Oct 2 04:20:35 1993 --- gcc-2.7.0/config/m68k/pbb.h Thu Jun 15 15:14:42 1995 *************** *** 19,23 **** 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. */ /* Note: This config uses a version of gas with a postprocessing stage that --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Note: This config uses a version of gas with a postprocessing stage that diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/plexus.h gcc-2.7.0/config/m68k/plexus.h *** gcc-2.6.3/config/m68k/plexus.h Sun Jan 23 18:21:04 1994 --- gcc-2.7.0/config/m68k/plexus.h Thu Jun 15 15:14:55 1995 *************** *** 16,20 **** patches or 2.X ), If you use gas 2.X you have to use binutils-2.X. ! With using gas-2.X the Plexus gcc port is now capabable of generating output suitable for use by gdb-4.X ( send mail to above address for info on getting gdb patches or other GNU items for the Plexus ) --- 16,20 ---- patches or 2.X ), If you use gas 2.X you have to use binutils-2.X. ! With using gas-2.X the Plexus gcc port is now capable of generating output suitable for use by gdb-4.X ( send mail to above address for info on getting gdb patches or other GNU items for the Plexus ) *************** *** 37,41 **** 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. */ --- 37,42 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/sgs.h gcc-2.7.0/config/m68k/sgs.h *** gcc-2.6.3/config/m68k/sgs.h Mon Dec 13 19:02:47 1993 --- gcc-2.7.0/config/m68k/sgs.h Thu Jun 15 15:15:06 1995 *************** *** 18,22 **** 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. */ /* Control assembler-syntax conditionals in m68k.md and conditionals in --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Control assembler-syntax conditionals in m68k.md and conditionals in diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/sun2.h gcc-2.7.0/config/m68k/sun2.h *** gcc-2.6.3/config/m68k/sun2.h Sat Oct 2 04:20:40 1993 --- gcc-2.7.0/config/m68k/sun2.h Thu Jun 15 15:15:18 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Sun 68010 version. ! Copyright (C) 1987, 1988 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Sun 68010 version. ! Copyright (C) 1987, 1988, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 40,44 **** #define ASM_SPEC \ "%{m68020:-mc68020}%{mc68020:-mc68020}%{!mc68020:%{!m68020:-mc68010}} \ ! %{fpic:-k} %{fPIC:-k}" /* Names to predefine in the preprocessor for this target machine. */ --- 41,45 ---- #define ASM_SPEC \ "%{m68020:-mc68020}%{mc68020:-mc68020}%{!mc68020:%{!m68020:-mc68010}} \ ! %{fpic:-k} %{fPIC:-k} %{R} %{j} %{J} %{h} %{d2} %{keep-local-as-symbols:-L}" /* Names to predefine in the preprocessor for this target machine. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/sun2o4.h gcc-2.7.0/config/m68k/sun2o4.h *** gcc-2.6.3/config/m68k/sun2o4.h Wed May 12 22:53:48 1993 --- gcc-2.7.0/config/m68k/sun2o4.h Thu Jun 15 15:15:29 1995 *************** *** 16,20 **** 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 "m68k/sun2.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/sun2.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/sun3.h gcc-2.7.0/config/m68k/sun3.h *** gcc-2.6.3/config/m68k/sun3.h Wed Oct 13 17:25:00 1993 --- gcc-2.7.0/config/m68k/sun3.h Thu Jun 15 15:15:40 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. ! Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. ! Copyright (C) 1987, 1988, 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 comment is here to see if it will keep Sun's cpp from dying. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This comment is here to see if it will keep Sun's cpp from dying. */ *************** *** 79,83 **** #define ASM_SPEC \ "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}} \ ! %{fpic:-k} %{fPIC:-k}" /* Names to predefine in the preprocessor for this target machine. */ --- 80,84 ---- #define ASM_SPEC \ "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}} \ ! %{fpic:-k} %{fPIC:-k} %{R} %{j} %{J} %{h} %{d2} %{keep-local-as-symbols:-L}" /* Names to predefine in the preprocessor for this target machine. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/t-lynx gcc-2.7.0/config/m68k/t-lynx *** gcc-2.6.3/config/m68k/t-lynx --- gcc-2.7.0/config/m68k/t-lynx Sat Feb 18 12:14:44 1995 *************** *** 0 **** --- 1,6 ---- + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = m68k/lb1sf68.asm + LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ + _double _float _floatex \ + _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ + _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/t-m68kbare gcc-2.7.0/config/m68k/t-m68kbare *** gcc-2.6.3/config/m68k/t-m68kbare --- gcc-2.7.0/config/m68k/t-m68kbare Mon Feb 6 16:55:44 1995 *************** *** 0 **** --- 1,23 ---- + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = m68k/lb1sf68.asm + LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ + _double _float _floatex \ + _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ + _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... + LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c + + fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c + cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c + xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c + echo '#define EXTFLOAT' > xfgnulib.c + cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c + + MULTILIB_OPTIONS = m68000/m68020 m68881/msoft-float + MULTILIB_DIRNAMES = + MULTILIB_MATCHES = m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/t-next gcc-2.7.0/config/m68k/t-next *** gcc-2.6.3/config/m68k/t-next Thu Sep 9 16:02:34 1993 --- gcc-2.7.0/config/m68k/t-next Sat May 20 06:10:10 1995 *************** *** 1,6 **** # libgcc1.c is not needed, since the standard library has these functions. ! LIBGCC1=libgcc1.null ! CROSS_LIBGCC1=libgcc1.null - # Specify other dirs of system header files to be fixed. - OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers --- 1,4 ---- # libgcc1.c is not needed, since the standard library has these functions. ! LIBGCC1= ! CROSS_LIBGCC1= diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/t-vxworks68 gcc-2.7.0/config/m68k/t-vxworks68 *** gcc-2.6.3/config/m68k/t-vxworks68 --- gcc-2.7.0/config/m68k/t-vxworks68 Mon Feb 6 16:55:48 1995 *************** *** 0 **** --- 1,27 ---- + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = m68k/lb1sf68.asm + LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ + _double _float _floatex \ + _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ + _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 + + # We don't want to put exit in libgcc.a for VxWorks, because VxWorks + # does not have _exit. + LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 -Dexit=unused_exit + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... + LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c + + fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c + cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c + xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c + echo '#define EXTFLOAT' > xfgnulib.c + cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c + + MULTILIB_OPTIONS = m68000/m68020 m68881/msoft-float + MULTILIB_DIRNAMES = + MULTILIB_MATCHES = m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/tower-as.h gcc-2.7.0/config/m68k/tower-as.h *** gcc-2.6.3/config/m68k/tower-as.h Thu Nov 10 19:12:34 1994 --- gcc-2.7.0/config/m68k/tower-as.h Thu Jun 15 15:15:53 1995 *************** *** 24,28 **** 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. */ --- 24,29 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 181,185 **** if ((current_function_returns_pointer) && \ ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ ! asm_fprintf (FILE, "\tmovl %Rd0,%Ra0\n"); } /* This is how to output an insn to push a register on the stack. --- 182,186 ---- if ((current_function_returns_pointer) && \ ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ ! asm_fprintf (FILE, "\tmov.l %Rd0,%Ra0\n"); } /* This is how to output an insn to push a register on the stack. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/tower.h gcc-2.7.0/config/m68k/tower.h *** gcc-2.6.3/config/m68k/tower.h Thu Nov 10 19:11:58 1994 --- gcc-2.7.0/config/m68k/tower.h Thu Jun 15 15:16:06 1995 *************** *** 32,36 **** 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. */ --- 32,37 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 101,105 **** #undef IMMEDIATE_PREFIX ! #define IMMEDIATE_PREFIX /* We do not want leading underscores. */ --- 102,106 ---- #undef IMMEDIATE_PREFIX ! #define IMMEDIATE_PREFIX "&" /* We do not want leading underscores. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/vxm68k.h gcc-2.7.0/config/m68k/vxm68k.h *** gcc-2.6.3/config/m68k/vxm68k.h --- gcc-2.7.0/config/m68k/vxm68k.h Thu Jun 15 15:16:16 1995 *************** *** 0 **** --- 1,64 ---- + /* Definitions of target machine for GNU compiler. Vxworks m68k version. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This comment is here to see if it will keep Sun's cpp from dying. */ + + #define CPP_PREDEFINES "-Dmc68000 -D__vxworks -D__vxworks_5 -Acpu(m68k) -Amachine(m68k)" + + /* Vxworks header files require that the macro CPU be set, so we must override + the CPP_SPEC from m68k-none.h. */ + + #define CPP_SPEC \ + "%{!mc68000:%{!m68000:%{!m68332:%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}}}}\ + %{!ansi:%{m68000:-DCPU=MC68000 }%{m68010:-Dmc68010 -DCPU=MC68010 }%{m68020:-Dmc68020 -DCPU=MC68020 }%{mc68020:-Dmc68020 -DCPU=MC68020 }%{m68030:-Dmc68030 -DCPU=MC68030 }%{m68040:-Dmc68040 -DCPU=MC68040 }%{m68020-40:-Dmc68020 -Dmc68030 -Dmc68040 -DCPU=MC68020 }%{m68302:-Dmc68302 -DCPU=MC68000 }%{m68332:-Dmc68332 -DCPU=CPU32 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-Dmc68020 -DCPU=MC68020 }}}}}}}}}}}\ + %{m68010:-D__mc68010__ -D__mc68010 }%{m68020:-D__mc68020__ -D__mc68020 }%{mc68020:-D__mc68020__ -D__mc68020 }%{m68030:-D__mc68030__ -D__mc68030 }%{m68040:-D__mc68040__ -D__mc68040 }%{m68020-40:-D__mc68020__ -D__mc68030__ -D__mc68040__ -D__mc68020 -D__mc68030 -D__mc68040 }%{m68302:-D__mc68302__ -D__mc68302 }%{m68332:-D__mc68332__ -D__mc68332 }%{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:-D__mc68020__ -D__mc68020 }}}}}}}}}}" + + #include "m68k/m68k-none.h" + #include "aoutos.h" + + #define DBX_DEBUGGING_INFO + #undef SDB_DEBUGGING_INFO + + #undef WCHAR_TYPE + #define WCHAR_TYPE "short unsigned int" + #undef SIZE_TYPE + #define SIZE_TYPE "long unsigned int" + + /* VxWorks does all the library stuff itself. */ + + #define LIB_SPEC "" + + /* Provide required defaults for linker -e. */ + + #define LINK_SPEC "%{!nostdlib:%{!r*:%{!e*:-e start}}}" + + /* VxWorks provides the functionality of crt0.o and friends itself. */ + + #define STARTFILE_SPEC "" + + /* Every structure or union's size must be a multiple of 2 bytes. */ + + #define STRUCTURE_SIZE_BOUNDARY 16 + + /* Allow folding division by zero. */ + #define REAL_INFINITY + + /* GCC is the primary compiler for VxWorks, so we don't need this. */ + #undef PCC_STATIC_STRUCT_RETURN diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/x-apollo68 gcc-2.7.0/config/m68k/x-apollo68 *** gcc-2.6.3/config/m68k/x-apollo68 Sun Jun 27 18:24:36 1993 --- gcc-2.7.0/config/m68k/x-apollo68 Tue May 16 07:31:23 1995 *************** *** 7,11 **** # This used to redefine CFLAGS and LIBGCC2_CFLAGS to eliminate the unsupported ! # -g flag from both macros. This gives an undebugable stage1 compiler which # is bad, and it also does the wrong thing if we are cross compiling to a # target which does support debugging. There is currently no way to avoid --- 7,11 ---- # This used to redefine CFLAGS and LIBGCC2_CFLAGS to eliminate the unsupported ! # -g flag from both macros. This gives an undebuggable stage1 compiler which # is bad, and it also does the wrong thing if we are cross compiling to a # target which does support debugging. There is currently no way to avoid diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/x-hp320 gcc-2.7.0/config/m68k/x-hp320 *** gcc-2.6.3/config/m68k/x-hp320 Thu May 13 18:02:51 1993 --- gcc-2.7.0/config/m68k/x-hp320 Tue Apr 18 20:21:43 1995 *************** *** 13,14 **** --- 13,17 ---- # You must get alloca.c from GNU Emacs. + + # So putenv and other functions get seen by fixproto. + FIXPROTO_DEFINES = -D_HPUX_SOURCE diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/x-hp320g gcc-2.7.0/config/m68k/x-hp320g *** gcc-2.6.3/config/m68k/x-hp320g Thu May 13 18:03:04 1993 --- gcc-2.7.0/config/m68k/x-hp320g Tue Apr 18 20:21:44 1995 *************** *** 13,14 **** --- 13,17 ---- # Version 5 of HPUX had a compiler bug that made it crash with -g. # You must set CFLAGS to empty on version 5. + + # So putenv and other functions get seen by fixproto. + FIXPROTO_DEFINES = -D_HPUX_SOURCE diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/x-mot3300 gcc-2.7.0/config/m68k/x-mot3300 *** gcc-2.6.3/config/m68k/x-mot3300 --- gcc-2.7.0/config/m68k/x-mot3300 Thu Apr 27 08:05:27 1995 *************** *** 0 **** --- 1,12 ---- + ALLOCA=alloca.o + + # This disables the long/short jump optimization. + # I use sysV68 R3V7.1 RM04 (phdm@info.ucl.ac.be) + # Since ss-950318, with jump optimization enabled, "as" issues a warning + # when assembling combine.s : + # aline nnnnn : Warning: Table overflow: some optimizations lost (SDIs) + # but later "ld" complains with + # ld: relocation entry found for non-relocatable symbol in combine.o + # and the produced "cc1" fails with SIGSEGV + # Another possible fix would be to split combine.c. + XCFLAGS=`if [ x$@ = xcombine.o ]; then echo -Wa,-j; fi` diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/x-next gcc-2.7.0/config/m68k/x-next *** gcc-2.6.3/config/m68k/x-next Fri Apr 1 00:56:11 1994 --- gcc-2.7.0/config/m68k/x-next Sat May 20 06:10:13 1995 *************** *** 1,3 **** # Make assignments for compiling on NeXT with their compiler version. CC=cc -traditional-cpp ! OLDCC=cc -traditional-cpp --- 1,9 ---- # Make assignments for compiling on NeXT with their compiler version. CC=cc -traditional-cpp ! OLDCC=CC -traditional-cpp ! ! # Specify other dirs of system header files to be fixed. ! OTHER_FIXINCLUDES_DIRS= /LocalDeveloper/Headers ! ! # is sometimes in /usr/include/ansi/limits.h. ! LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h -o -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ] diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-3b1.h gcc-2.7.0/config/m68k/xm-3b1.h *** gcc-2.6.3/config/m68k/xm-3b1.h Tue Jan 5 03:53:13 1993 --- gcc-2.7.0/config/m68k/xm-3b1.h Tue Nov 15 19:43:01 1994 *************** *** 8,9 **** --- 8,14 ---- #define index strchr #define rindex strrchr + + /* Override part of the obstack macros. */ + + #define __PTR_TO_INT(P) ((int)(P)) + #define __INT_TO_PTR(P) ((char *)(P)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-amix.h gcc-2.7.0/config/m68k/xm-amix.h *** gcc-2.6.3/config/m68k/xm-amix.h Wed Oct 27 14:10:56 1993 --- gcc-2.7.0/config/m68k/xm-amix.h Thu Jun 15 15:16:28 1995 *************** *** 18,22 **** 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 "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-atari.h gcc-2.7.0/config/m68k/xm-atari.h *** gcc-2.6.3/config/m68k/xm-atari.h Tue Jun 28 13:28:45 1994 --- gcc-2.7.0/config/m68k/xm-atari.h Thu Jun 15 15:16:41 1995 *************** *** 17,21 **** 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 "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m68k/xm-m68kv.h" /* Use the System V flavor of m68k host */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-crds.h gcc-2.7.0/config/m68k/xm-crds.h *** gcc-2.6.3/config/m68k/xm-crds.h Sat Dec 25 13:04:06 1993 --- gcc-2.7.0/config/m68k/xm-crds.h Tue Nov 15 19:43:05 1994 *************** *** 21,22 **** --- 21,26 ---- #endif + /* Override part of the obstack macros. */ + + #define __PTR_TO_INT(P) ((int)(P)) + #define __INT_TO_PTR(P) ((char *)(P)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-lynx.h gcc-2.7.0/config/m68k/xm-lynx.h *** gcc-2.6.3/config/m68k/xm-lynx.h --- gcc-2.7.0/config/m68k/xm-lynx.h Thu Jun 15 15:16:51 1995 *************** *** 0 **** --- 1,35 ---- + /* Configuration for GNU C-compiler for all platforms running LynxOS. + Copyright (C) 1993, 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + /* This describes the machine the compiler is hosted on. */ + #define HOST_BITS_PER_CHAR 8 + #define HOST_BITS_PER_SHORT 16 + #define HOST_BITS_PER_INT 32 + #define HOST_BITS_PER_LONG 32 + #define HOST_BITS_PER_LONGLONG 64 + + #define HOST_WORDS_BIG_ENDIAN 1 + + /* target machine dependencies. + tm.h is a symbolic link to the actual target specific file. */ + + #include "tm.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-m68k.h gcc-2.7.0/config/m68k/xm-m68k.h *** gcc-2.6.3/config/m68k/xm-m68k.h Sat Jun 26 11:35:21 1993 --- gcc-2.7.0/config/m68k/xm-m68k.h Thu Jun 15 15:17:04 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-mot3300.h gcc-2.7.0/config/m68k/xm-mot3300.h *** gcc-2.6.3/config/m68k/xm-mot3300.h Sat Apr 16 19:18:59 1994 --- gcc-2.7.0/config/m68k/xm-mot3300.h Thu Jun 15 15:17:14 1995 *************** *** 1,5 **** /* Configuration for GNU C-compiler for Motorola 68000 family. SysV68 Motorola 3300 Delta Series ! Copyright (C) 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration for GNU C-compiler for Motorola 68000 family. SysV68 Motorola 3300 Delta Series ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 36,38 **** --- 37,45 ---- #ifndef __GNUC__ #define USE_C_ALLOCA + extern char *alloca (); #endif + + /* Override part of the obstack macros. */ + + #define __PTR_TO_INT(P) ((int)(P)) + #define __INT_TO_PTR(P) ((char *)(P)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m68k/xm-netbsd.h gcc-2.7.0/config/m68k/xm-netbsd.h *** gcc-2.6.3/config/m68k/xm-netbsd.h --- gcc-2.7.0/config/m68k/xm-netbsd.h Tue May 9 18:19:46 1995 *************** *** 0 **** --- 1,4 ---- + /* Configuration for GCC for Motorola 68k running NetBSD as host. */ + + #include + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/dgux.h gcc-2.7.0/config/m88k/dgux.h *** gcc-2.6.3/config/m88k/dgux.h Fri Aug 12 13:43:06 1994 --- gcc-2.7.0/config/m88k/dgux.h Thu Jun 15 15:18:01 1995 *************** *** 1,8 **** /* Definitions of target machine for GNU compiler. Motorola m88100 running DG/UX. ! Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) - Enhanced by Michael Meissner (meissner@osf.org) - Version 2 port by Tom Wood (twood@pets.sps.mot.com) Currently maintained by (gcc@dg-rtp.dg.com) --- 1,6 ---- /* Definitions of target machine for GNU compiler. Motorola m88100 running DG/UX. ! Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) Currently maintained by (gcc@dg-rtp.dg.com) *************** *** 21,25 **** 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. */ /* You're not seeing double! To transition to dwarf debugging, both are --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* You're not seeing double! To transition to dwarf debugging, both are *************** *** 32,36 **** #ifndef VERSION_INFO2 ! #define VERSION_INFO2 "$Revision: 1.15 $" #endif #ifndef NO_BUGS --- 31,35 ---- #ifndef VERSION_INFO2 ! #define VERSION_INFO2 "$Revision: 1.18 $" #endif #ifndef NO_BUGS *************** *** 115,125 **** When the -G link option is used (-shared and -symbolic) a final link is not being done. */ #undef LIB_SPEC ! #define LIB_SPEC "%{!msvr3:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}} crtend.o%s" #undef LINK_SPEC #define LINK_SPEC "%{z*} %{h*} %{V} %{v:%{!V:-V}} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy} \ ! %{symbolic:-Bsymbolic -G -dy} \ %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}" #undef STARTFILE_SPEC --- 114,126 ---- When the -G link option is used (-shared and -symbolic) a final link is not being done. */ + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "crtend.o%s" #undef LIB_SPEC ! #define LIB_SPEC "%{!msvr3:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}}" #undef LINK_SPEC #define LINK_SPEC "%{z*} %{h*} %{V} %{v:%{!V:-V}} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy -z text} \ ! %{symbolic:-Bsymbolic -G -dy -z text} \ %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}" #undef STARTFILE_SPEC *************** *** 183,210 **** #undef DTORS_SECTION_ASM_OP ! #if !defined (CRT_BEGIN) && !defined (CRT_END) #undef INIT_SECTION_ASM_OP ! #define INIT_SECTION_ASM_OP (TARGET_SVR4 \ ! ? "section\t .init,\"xa\"" \ ! : "section\t .init,\"x\"") #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP (TARGET_SVR4 \ ! ? "section\t .ctors,\"aw\"" \ ! : "section\t .ctors,\"d\"") #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP (TARGET_SVR4 \ ! ? "section\t .dtors,\"aw\"" \ ! : "section\t .dtors,\"d\"") #else ! /* These must be constant strings for crtstuff.c. ! An elf and bcs crtbegin.o are needed since bcs does not ! increment the stack pointer in the init section as elf does */ ! #ifndef BCS ! #define INIT_SECTION_PREAMBLE asm ("\taddu\tr31,r31,0x20") ! #endif ! #define INIT_SECTION_ASM_OP "section\t .init,\"x\"" ! #define FINI_SECTION_ASM_OP "section\t .fini,\"x\"" ! #define CTORS_SECTION_ASM_OP "section\t .ctors,\"d\"" ! #define DTORS_SECTION_ASM_OP "section\t .dtors,\"d\"" #endif /* crtstuff.c */ --- 184,214 ---- #undef DTORS_SECTION_ASM_OP ! #if defined (CRT_BEGIN) || defined (CRT_END) || defined (L__main) ! /* routines to invoke global constructors and destructors are always COFF ! to enable linking mixed COFF and ELF objects */ ! #define FINI_SECTION_ASM_OP ("section .fini,\"x\"") ! #ifndef BCS ! #define INIT_SECTION_PREAMBLE asm ("\taddu\tr31,r31,0x20") ! #endif #undef INIT_SECTION_ASM_OP ! #define INIT_SECTION_ASM_OP ("section\t .init,\"x\"") #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ("section\t .ctors,\"d\"") #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ("section\t .dtors,\"d\"") ! #undef OBJECT_FORMAT_ELF #else ! #undef INIT_SECTION_ASM_OP ! #define INIT_SECTION_ASM_OP (TARGET_SVR4 \ ! ? "section\t .init,\"xa\"" \ ! : "section\t .init,\"x\"") ! #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP (TARGET_SVR4 \ ! ? "section\t .ctors,\"aw\"" \ ! : "section\t .ctors,\"d\"") ! #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP (TARGET_SVR4 \ ! ? "section\t .dtors,\"aw\"" \ ! : "section\t .dtors,\"d\"") #endif /* crtstuff.c */ *************** *** 218,225 **** --- 222,238 ---- /* Mark the end of the .ctors/.dtors sections with a -1. */ + + #define CTOR_LIST_BEGIN \ + asm (CTORS_SECTION_ASM_OP); \ + func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) } + #define CTOR_LIST_END \ asm (CTORS_SECTION_ASM_OP); \ func_ptr __CTOR_END__[1] = { (func_ptr) (-1) } + #define DTOR_LIST_BEGIN \ + asm (DTORS_SECTION_ASM_OP); \ + func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) } + #define DTOR_LIST_END \ asm (DTORS_SECTION_ASM_OP); \ *************** *** 245,246 **** --- 258,274 ---- __DTOR_LIST__[i] (); \ } while (0) + + /* The maximum alignment which the object file format can support. + page alignment would seem to be enough */ + #undef MAX_OFILE_ALIGNMENT + #define MAX_OFILE_ALIGNMENT 0x1000 + + /* Must use data section for relocatable constants when pic. */ + #undef SELECT_RTX_SECTION + #define SELECT_RTX_SECTION(MODE,RTX) \ + { \ + if (flag_pic && symbolic_operand (RTX)) \ + data_section (); \ + else \ + const_section (); \ + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/dgux.ld gcc-2.7.0/config/m88k/dgux.ld *** gcc-2.6.3/config/m88k/dgux.ld Sun Dec 27 16:32:37 1992 --- gcc-2.7.0/config/m88k/dgux.ld Thu Jun 15 15:18:21 1995 *************** *** 15,19 **** 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. On The AViiON we start the output .text section somewhere after the --- 15,20 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. On The AViiON we start the output .text section somewhere after the diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/dguxbcs.h gcc-2.7.0/config/m88k/dguxbcs.h *** gcc-2.6.3/config/m88k/dguxbcs.h Fri Aug 12 13:37:21 1994 --- gcc-2.7.0/config/m88k/dguxbcs.h Thu Jun 15 15:18:32 1995 *************** *** 1,8 **** /* Definitions of target machine for GNU compiler. Motorola m88100 running DG/UX. ! Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) - Enhanced by Michael Meissner (meissner@osf.org) - Version 2 port by Tom Wood (twood@pets.sps.mot.com) Currently maintained by (gcc@dg-rtp.dg.com) --- 1,6 ---- /* Definitions of target machine for GNU compiler. Motorola m88100 running DG/UX. ! Copyright (C) 1988, 89, 90, 91, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) Currently maintained by (gcc@dg-rtp.dg.com) *************** *** 21,25 **** 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 "m88k/dgux.h" --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m88k/dgux.h" *************** *** 62,66 **** -msvr3 is the default if -msvr4 is not specified. */ #undef LIB_SPEC ! #define LIB_SPEC "%{msvr4:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}} crtend.o%s" #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt0.o%s} \ --- 61,65 ---- -msvr3 is the default if -msvr4 is not specified. */ #undef LIB_SPEC ! #define LIB_SPEC "%{msvr4:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}}" #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt0.o%s} \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/dolph.h gcc-2.7.0/config/m88k/dolph.h *** gcc-2.6.3/config/m88k/dolph.h Sun Nov 21 15:29:05 1993 --- gcc-2.7.0/config/m88k/dolph.h Thu Jun 15 15:18:47 1995 *************** *** 18,22 **** 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 "m88k/sysv3.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m88k/sysv3.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/dolphin.ld gcc-2.7.0/config/m88k/dolphin.ld *** gcc-2.6.3/config/m88k/dolphin.ld Sun Nov 21 15:37:03 1993 --- gcc-2.7.0/config/m88k/dolphin.ld Thu Jun 15 15:19:02 1995 *************** *** 16,23 **** 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 does the following: - Sets VIRTUAL addr of .text to 0x400200 --- 16,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* This file does the following: - Sets VIRTUAL addr of .text to 0x400200 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/luna.h gcc-2.7.0/config/m88k/luna.h *** gcc-2.6.3/config/m88k/luna.h Sat Oct 2 04:21:00 1993 --- gcc-2.7.0/config/m88k/luna.h Thu Jun 15 15:19:18 1995 *************** *** 18,22 **** 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. */ /* The Omron Luna/88k is MACH and uses BSD a.out, not COFF or ELF. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* The Omron Luna/88k is MACH and uses BSD a.out, not COFF or ELF. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/m88k-aout.h gcc-2.7.0/config/m88k/m88k-aout.h *** gcc-2.6.3/config/m88k/m88k-aout.h --- gcc-2.7.0/config/m88k/m88k-aout.h Thu Jun 15 15:19:37 1995 *************** *** 0 **** --- 1,32 ---- + /* Definitions for "naked" Motorola 88k using a.out object format files + and stabs debugging info. + + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #undef SDB_DEBUGGING_INFO + #define DBX_DEBUGGING_INFO + + #include "m88k/m88k.h" + #include "aoutos.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dm88000 -Dm88k -Acpu(m88k) -Amachine(m88k)" + + /* end of m88k-aout.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/m88k-coff.h gcc-2.7.0/config/m88k/m88k-coff.h *** gcc-2.6.3/config/m88k/m88k-coff.h --- gcc-2.7.0/config/m88k/m88k-coff.h Thu Jun 15 15:19:52 1995 *************** *** 0 **** --- 1,38 ---- + /* Definitions for "naked" Motorola 88k using coff object format files + and coff debugging info. + + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "m88k/m88k.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dm88000 -Dm88k -Acpu(m88k) -Amachine(m88k)" + + #undef DBX_DEBUGGING_INFO + #define SDB_DEBUGGING_INFO + + /* Output DBX (stabs) debugging information if using -gstabs. */ + + #define DBX_DEBUGGING_INFO + + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG + + /* end of m88k-coff.h */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/m88k.c gcc-2.7.0/config/m88k/m88k.c *** gcc-2.6.3/config/m88k/m88k.c Thu Oct 6 10:59:47 1994 --- gcc-2.7.0/config/m88k/m88k.c Thu Jun 15 15:20:15 1995 *************** *** 1,7 **** /* Subroutines for insn-output.c for Motorola 88000. ! Copyright (C) 1988, 1989, 1990, 1991, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) ! Enhanced by Michael Meissner (meissner@osf.org) ! Version 2 port by Tom Wood (twood@pets.sps.mot.com) This file is part of GNU CC. --- 1,6 ---- /* Subroutines for insn-output.c for Motorola 88000. ! Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) ! Currently maintained by (gcc@dg-rtp.dg.com) This file is part of GNU CC. *************** *** 19,23 **** 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 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 1351,1355 **** } ! /* Return true if OP is valid to use in the context of logic aritmethic on condition codes. */ --- 1351,1355 ---- } ! /* Return true if OP is valid to use in the context of logic arithmetic on condition codes. */ *************** *** 2031,2035 **** /* If the last insn isn't a BARRIER, we must write a return insn. This ! should only happen if the function has no prologe and no body. */ if (GET_CODE (insn) == NOTE) insn = prev_nonnote_insn (insn); --- 2031,2035 ---- /* If the last insn isn't a BARRIER, we must write a return insn. This ! should only happen if the function has no prologue and no body. */ if (GET_CODE (insn) == NOTE) insn = prev_nonnote_insn (insn); *************** *** 3094,3096 **** --- 3094,3125 ---- return 0; + } + + /* Returns 1 if OP is either a symbol reference or a sum of a symbol + reference and a constant. */ + + int + symbolic_operand (op, mode) + register rtx op; + enum machine_mode mode; + { + switch (GET_CODE (op)) + { + case SYMBOL_REF: + case LABEL_REF: + return 1; + + case CONST: + op = XEXP (op, 0); + return ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF + || GET_CODE (XEXP (op, 0)) == LABEL_REF) + && GET_CODE (XEXP (op, 1)) == CONST_INT); + + /* ??? This clause seems to be irrelevant. */ + case CONST_DOUBLE: + return GET_MODE (op) == mode; + + default: + return 0; + } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/m88k.h gcc-2.7.0/config/m88k/m88k.h *** gcc-2.6.3/config/m88k/m88k.h Tue Sep 27 19:02:50 1994 --- gcc-2.7.0/config/m88k/m88k.h Thu Jun 15 15:20:52 1995 *************** *** 1,7 **** /* Definitions of target machine for GNU compiler for Motorola m88100 in an 88open OCS/BCS environment. ! Copyright (C) 1988, 89, 90, 91, 93, 1994 Free Software Foundation, Inc. ! Contributed by Michael Tiemann (tiemann@mcc.com) ! Enhanced by Michael Meissner (meissner@osf.org) Version 2 port by Tom Wood (twood@pets.sps.mot.com) --- 1,7 ---- /* Definitions of target machine for GNU compiler for Motorola m88100 in an 88open OCS/BCS environment. ! Copyright (C) 1988, 89, 90, 91, 93, 94, 1995 Free Software Foundation, Inc. ! Contributed by Michael Tiemann (tiemann@cygnus.com) ! Enhanced by Michael Meissner (meissner@cygnus.com) Version 2 port by Tom Wood (twood@pets.sps.mot.com) *************** *** 20,24 **** 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. */ /* The m88100 port of GNU CC adheres to the various standards from 88open. --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* The m88100 port of GNU CC adheres to the various standards from 88open. *************** *** 116,119 **** --- 117,121 ---- extern int m88k_debugger_offset (); + extern void emit_bcnd (); extern void expand_block_move (); *************** *** 198,202 **** #define VERSION_INFO1 "88open OCS/BCS, " #ifndef VERSION_INFO2 ! #define VERSION_INFO2 "$Revision: 1.61 $" #endif --- 200,204 ---- #define VERSION_INFO1 "88open OCS/BCS, " #ifndef VERSION_INFO2 ! #define VERSION_INFO2 "$Revision: 1.67 $" #endif *************** *** 204,210 **** #define VERSION_STRING version_string #ifdef __STDC__ ! #define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.61 $ " __DATE__ #else ! #define TM_RCS_ID "$What$" #endif /* __STDC__ */ #else --- 206,212 ---- #define VERSION_STRING version_string #ifdef __STDC__ ! #define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.67 $ " __DATE__ #else ! #define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $" #endif /* __STDC__ */ #else *************** *** 222,225 **** --- 224,229 ---- #define MASK_88100 0x00000001 /* Target m88100 */ #define MASK_88110 0x00000002 /* Target m88110 */ + #define MASK_88000 (MASK_88100 | MASK_88110) + #define MASK_OCS_DEBUG_INFO 0x00000004 /* Emit .tdesc info */ #define MASK_OCS_FRAME_POSITION 0x00000008 /* Debug frame = CFA, not r30 */ *************** *** 236,244 **** #define MASK_OPTIMIZE_ARG_AREA 0x00004000 /* Save stack space */ #define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ - - #define MASK_88000 (MASK_88100 | MASK_88110) #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \ MASK_HANDLE_LARGE_SHIFT) #define TARGET_88100 ((target_flags & MASK_88000) == MASK_88100) #define TARGET_88110 ((target_flags & MASK_88000) == MASK_88110) --- 240,248 ---- #define MASK_OPTIMIZE_ARG_AREA 0x00004000 /* Save stack space */ #define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \ MASK_HANDLE_LARGE_SHIFT) + #define MASK_OMIT_LEAF_FRAME_POINTER 0x00020000 /* omit leaf frame pointers */ + #define TARGET_88100 ((target_flags & MASK_88000) == MASK_88100) #define TARGET_88110 ((target_flags & MASK_88000) == MASK_88110) *************** *** 261,264 **** --- 265,269 ---- #define TARGET_EITHER_LARGE_SHIFT (target_flags & MASK_EITHER_LARGE_SHIFT) + #define TARGET_OMIT_LEAF_FRAME_POINTER (target_flags & MASK_OMIT_LEAF_FRAME_POINTER) /* Redefined in sysv3.h, sysv4.h, and dgux.h. */ *************** *** 290,293 **** --- 295,299 ---- { "no-serialize-volatile", MASK_NO_SERIALIZE_VOLATILE }, \ { "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \ + { "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER }, \ SUBTARGET_SWITCHES \ /* Default switches */ \ *************** *** 974,981 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 980,988 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 1081,1085 **** `PARM_BOUNDARY' is used for all arguments. */ #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ! (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_SIZE (MODE)) <= PARM_BOUNDARY \ ? PARM_BOUNDARY : 2 * PARM_BOUNDARY) --- 1088,1092 ---- `PARM_BOUNDARY' is used for all arguments. */ #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ! (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \ ? PARM_BOUNDARY : 2 * PARM_BOUNDARY) *************** *** 1136,1141 **** This is computed in `reload', in reload1.c. */ #define FRAME_POINTER_REQUIRED \ ! (frame_pointer_needed \ ! || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION)) /* Definitions for register eliminations. --- 1143,1149 ---- This is computed in `reload', in reload1.c. */ #define FRAME_POINTER_REQUIRED \ ! (current_function_varargs \ ! || (TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) \ ! || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION)) /* Definitions for register eliminations. *************** *** 1537,1541 **** /* Tell when to handle #pragma weak. This is only done for V.4. */ ! #define HANDLE_PRAGMA_WEAK TARGET_SVR4 /* Max number of bytes we can move from memory to memory --- 1545,1549 ---- /* Tell when to handle #pragma weak. This is only done for V.4. */ ! #define SUPPORTS_WEAK TARGET_SVR4 /* Max number of bytes we can move from memory to memory *************** *** 1720,1724 **** #undef TYPE_ASM_OP #undef SIZE_ASM_OP - #undef WEAK_ASM_OP #undef SET_ASM_OP #undef SKIP_ASM_OP --- 1728,1731 ---- *************** *** 1771,1779 **** #define TYPE_ASM_OP "type" #define SIZE_ASM_OP "size" - #define WEAK_ASM_OP "weak" #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */ #undef TYPE_OPERAND_FMT #define TYPE_OPERAND_FMT "#%s" #endif /* These are specific to version 03.00 assembler syntax. */ --- 1778,1792 ---- #define TYPE_ASM_OP "type" #define SIZE_ASM_OP "size" #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */ #undef TYPE_OPERAND_FMT #define TYPE_OPERAND_FMT "#%s" #endif + + /* This is how we tell the assembler that a symbol is weak. */ + + #undef ASM_WEAKEN_LABEL + #define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\tweak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) /* These are specific to version 03.00 assembler syntax. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/m88k.md gcc-2.7.0/config/m88k/m88k.md *** gcc-2.6.3/config/m88k/m88k.md Sun Apr 10 07:03:58 1994 --- gcc-2.7.0/config/m88k/m88k.md Thu Jun 15 16:53:25 1995 *************** *** 1,4 **** ;;- Machine description for the Motorola 88000 for GNU C compiler ! ;; Copyright (C) 1988, 89, 90, 91, 93, 1994 Free Software Foundation, Inc. ;; Contributed by Michael Tiemann (tiemann@mcc.com) ;; Additional changes by Michael Meissner (meissner@osf.org) --- 1,4 ---- ;;- Machine description for the Motorola 88000 for GNU C compiler ! ;; Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. ;; Contributed by Michael Tiemann (tiemann@mcc.com) ;; Additional changes by Michael Meissner (meissner@osf.org) *************** *** 19,23 **** ;; 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. --- 19,24 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 29,33 **** [(match_operand:SI 0 "" "")] "" ! "{ static char rcs_id[] = \"$What: <@(#) m88k.md,v 1.5> $\"; FAIL; }") --- 30,34 ---- [(match_operand:SI 0 "" "")] "" ! "{ static char rcs_id[] = \"$What: <@(#) m88k.md,v 1.1.1.2.2.2> $\"; FAIL; }") *************** *** 2729,2739 **** [(set_attr "type" "imul")]) ! (define_insn "umulsidi3" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%r")) ! (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] ! "TARGET_88110" ! "mulu.d %0,%1,%2" ! [(set_attr "type" "imul")]) ;; patterns for mixed mode floating point --- 2730,2741 ---- [(set_attr "type" "imul")]) ! ;; Loses for acvs/P60504.c (mod case) on 88110 ! ;; (define_insn "umulsidi3" ! ;; [(set (match_operand:DI 0 "register_operand" "=r") ! ;; (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%r")) ! ;; (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] ! ;; "TARGET_88110" ! ;; "mulu.d %0,%1,%2" ! ;; [(set_attr "type" "imul")]) ;; patterns for mixed mode floating point *************** *** 3853,3857 **** else /* Load the table entry and jump to it. */ ! emit_jump_insn (gen_casesi_jump (gen_reg_rtx (SImode), base, index_diff)); /* Claim that flow drops into the table so it will be adjacent by not --- 3855,3859 ---- else /* Load the table entry and jump to it. */ ! emit_jump_insn (gen_casesi_jump (gen_reg_rtx (SImode), base, index_diff, operands[3])); /* Claim that flow drops into the table so it will be adjacent by not *************** *** 3865,3871 **** (mult:SI (match_operand:SI 2 "" "") (const_int 4))))) ! (set (pc) (match_dup 0))] "" "") ;; The bsr.n instruction is directed to the END of the table. See --- 3867,3881 ---- (mult:SI (match_operand:SI 2 "" "") (const_int 4))))) ! (parallel [(set (pc) (match_dup 0)) ! (use (label_ref (match_operand 3 "" "")))])] "" "") + + (define_insn "" + [(set (pc) (match_operand:SI 0 "register_operand" "r")) + (use (label_ref (match_operand 1 "" "")))] + "" + "jmp%. %0" + [(set_attr "type" "jump")]) ;; The bsr.n instruction is directed to the END of the table. See Only in gcc-2.6.3/config/m88k: mot-sysv4.h diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/sysv3.h gcc-2.7.0/config/m88k/sysv3.h *** gcc-2.6.3/config/m88k/sysv3.h Tue Jun 14 17:50:51 1994 --- gcc-2.7.0/config/m88k/sysv3.h Thu Jun 15 15:22:26 1995 *************** *** 19,23 **** 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 "m88k/m88k.h" --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m88k/m88k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/sysv4.h gcc-2.7.0/config/m88k/sysv4.h *** gcc-2.6.3/config/m88k/sysv4.h Wed Mar 23 16:30:45 1994 --- gcc-2.7.0/config/m88k/sysv4.h Thu Jun 15 15:23:25 1995 *************** *** 24,28 **** 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. */ /* DWARF_DEBUGGING_INFO defined in svr4.h. */ --- 24,29 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* DWARF_DEBUGGING_INFO defined in svr4.h. */ *************** *** 61,66 **** #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP "section\t.init,\"xa\",#progbits" #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "section\t.ctors,\"a\",#progbits" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "section\t.dtors,\"a\",#progbits" --- 62,85 ---- #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP "section\t.init,\"xa\",#progbits" + #undef FINI_SECTION_ASM_OP + #define FINI_SECTION_ASM_OP "section\t.fini,\"xa\",#progbits" + + /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. + + Note that we want to give these sections the SHF_WRITE attribute + because these sections will actually contain data (i.e. tables of + addresses of functions in the current root executable or shared library + file) and, in the case of a shared library, the relocatable addresses + will have to be properly resolved/relocated (and then written into) by + the dynamic linker when it actually attaches the given shared library + to the executing process. (Note that on SVR4, you may wish to use the + `-z text' option to the ELF linker, when building a shared library, as + an additional check that you are doing everything right. But if you do + use the `-z text' option when building a shared library, you will get + errors unless the .ctors and .dtors sections are marked as writable + via the SHF_WRITE attribute.) */ + #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "section\t.ctors,\"aw\"" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "section\t.dtors,\"aw\"" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/t-bug gcc-2.7.0/config/m88k/t-bug *** gcc-2.6.3/config/m88k/t-bug --- gcc-2.7.0/config/m88k/t-bug Thu Nov 17 14:57:37 1994 *************** *** 0 **** --- 1,12 ---- + # Specify how to create the *.asm files + + MOVE_ASM = moveHI15x.asm moveQI16x.asm moveSI46x.asm moveSI64n.asm \ + moveHI48x.asm moveSI45x.asm moveSI47x.asm moveSI96x.asm \ + moveDI96x.asm + + $(MOVE_ASM): $(srcdir)/config/m88k/m88k-move.sh + $(srcdir)/config/m88k/m88k-move.sh + + LIB2FUNCS_EXTRA = $(MOVE_ASM) + LIBGCC1 = libgcc1.null + CROSS_LIBGCC1 = libgcc1.null diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/t-sysv4 gcc-2.7.0/config/m88k/t-sysv4 *** gcc-2.6.3/config/m88k/t-sysv4 Sun Dec 12 07:47:12 1993 --- gcc-2.7.0/config/m88k/t-sysv4 Mon Mar 13 18:10:00 1995 *************** *** 13,14 **** --- 13,22 ---- LIBGCC1 = libgcc1.null CROSS_LIBGCC1 = libgcc1.null + + # We need to use -fPIC when we are using gcc to compile the routines in + # crtstuff.c. This is only really needed when we are going to use gcc/g++ + # to produce a shared library, but since we don't know ahead of time when + # we will be doing that, we just always use -fPIC when compiling the + # routines in crtstuff.c. + + CRTSTUFF_T_CFLAGS=-fPIC diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/tekXD88.h gcc-2.7.0/config/m88k/tekXD88.h *** gcc-2.6.3/config/m88k/tekXD88.h Sat May 8 23:06:12 1993 --- gcc-2.7.0/config/m88k/tekXD88.h Thu Jun 15 15:23:46 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 42,46 **** /* The bundled ld program needs link editor directives which normally reside in /lib/default.ld. We'll pass our own copy during the link ! phase because additioal information about extra sections must be added so that gcc generated files will link properly. --KRG. --- 43,47 ---- /* The bundled ld program needs link editor directives which normally reside in /lib/default.ld. We'll pass our own copy during the link ! phase because additional information about extra sections must be added so that gcc generated files will link properly. --KRG. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/tekXD88.ld gcc-2.7.0/config/m88k/tekXD88.ld *** gcc-2.6.3/config/m88k/tekXD88.ld Sat May 8 23:06:13 1993 --- gcc-2.7.0/config/m88k/tekXD88.ld Thu Jun 15 15:24:03 1995 *************** *** 15,19 **** 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. --- 15,20 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/x-dgux gcc-2.7.0/config/m88k/x-dgux *** gcc-2.6.3/config/m88k/x-dgux Mon Jul 11 13:45:53 1994 --- gcc-2.7.0/config/m88k/x-dgux Fri Apr 28 12:55:40 1995 *************** *** 1,7 **** CC = /bin/gcc # Build libgcc.a, crtbegin.o, and crtend.o as bcs objects ! GCC_FOR_TARGET = PATH=/usr/sde/m88kbcs/usr/bin/:/usr/bin TARGET_BINARY_INTERFACE=m88kbcs ./xgcc -B./ -msvr3 -D_M88KBCS_TARGET BISONFLAGS = -l ! X_CFLAGS = INSTALL_HEADERS = STMP_FIXPROTO = --- 1,7 ---- CC = /bin/gcc # Build libgcc.a, crtbegin.o, and crtend.o as bcs objects ! GCC_FOR_TARGET = PATH=/usr/sde/m88kbcs/usr/bin/:/usr/bin TARGET_BINARY_INTERFACE=m88kbcs ./xgcc -B./ -msvr3 -D_M88KBCS_TARGET -mno-ocs-debug-info BISONFLAGS = -l ! X_CFLAGS = -O -mstandard -mlegend INSTALL_HEADERS = STMP_FIXPROTO = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/x-dolph gcc-2.7.0/config/m88k/x-dolph *** gcc-2.6.3/config/m88k/x-dolph Sun Nov 21 15:27:04 1993 --- gcc-2.7.0/config/m88k/x-dolph Wed Jan 25 14:21:53 1995 *************** *** 1,4 **** # Use link editor directives to make NULL pointers point to ! # illegal addresses. EXTRA_PARTS=crtbegin.o crtend.o gcc.ld --- 1,4 ---- # Use link editor directives to make NULL pointers point to ! # invalid addresses. EXTRA_PARTS=crtbegin.o crtend.o gcc.ld diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/xm-m88k.h gcc-2.7.0/config/m88k/xm-m88k.h *** gcc-2.6.3/config/m88k/xm-m88k.h Sat Jun 26 11:34:37 1993 --- gcc-2.7.0/config/m88k/xm-m88k.h Thu Jun 15 15:24:14 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/m88k/xm-sysv3.h gcc-2.7.0/config/m88k/xm-sysv3.h *** gcc-2.6.3/config/m88k/xm-sysv3.h Fri Jan 1 07:36:47 1993 --- gcc-2.7.0/config/m88k/xm-sysv3.h Thu Jun 15 15:24:38 1995 *************** *** 17,21 **** 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 "m88k/xm-m88k.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "m88k/xm-m88k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/abi64.h gcc-2.7.0/config/mips/abi64.h *** gcc-2.6.3/config/mips/abi64.h --- gcc-2.7.0/config/mips/abi64.h Thu Jun 15 15:24:49 1995 *************** *** 0 **** --- 1,176 ---- + /* Definitions of target machine for GNU compiler. 64 bit ABI support. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Macros to implement the 64 bit ABI. This file is meant to be included + after mips.h. */ + + #undef ABI_64BIT + #define ABI_64BIT 1 + + /* For Irix 6, -mips3 implies TARGET_LONG64. */ + #undef TARGET_LONG64 + #define TARGET_LONG64 (target_flags & MASK_64BIT) + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES \ + "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \ + -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \ + -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)" + + /* We must make -mips3 do what -mlong64 used to do. */ + #undef CPP_SPEC + #define CPP_SPEC "\ + %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \ + %{.cc: -D_LANGUAGE_C_PLUS_PLUS} \ + %{.cxx: -D_LANGUAGE_C_PLUS_PLUS} \ + %{.C: -D_LANGUAGE_C_PLUS_PLUS} \ + %{.m: -D_LANGUAGE_OBJECTIVE_C -D_LANGUAGE_C} \ + %{.S: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{.s: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{!.S:%{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}\ + %{mfp32: -D_MIPS_FPSET=16}%{!mfp32: -D_MIPS_FPSET=32} \ + %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ + %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \ + %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ + %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \ + %{!mips1: %{!mips2: %{!mips3: %{!mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4}}}} \ + %{mips1: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ + %{mips2: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ + %{mips3: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \ + %{mips4: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \ + %{!mips1: %{!mips2: %{!mips3: %{!mips4: -D_ABI64=3 -D_MIPS_SIM=_ABI64}}}} \ + %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ + %{mips1: -D_MIPS_SZLONG=32}%{mips2: -D_MIPS_SZLONG=32} \ + %{!mips1:%{!mips2: -D_MIPS_SZLONG=64}} \ + %{mips1: -D_MIPS_SZPTR=32}%{mips2: -D_MIPS_SZPTR=32} \ + %{mips3: -D_MIPS_SZPTR=64}%{mips4: -D_MIPS_SZPTR=64} \ + %{!mips1: %{!mips2: %{!mips3: %{!mips4: -D_MIPS_SZPTR=64}}}} \ + %{!mips1:%{!mips2: -D_COMPILER_VERSION=601}} \ + %{mips1: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ + %{mips2: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ + %{!mips1:%{!mips2: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ + %{mips3:-U__mips -D__mips=3} \ + %{!mips1:%{!mips2:-U__mips -D__mips=4}}" + + #undef EMPTY_FIELD_BOUNDARY + #define EMPTY_FIELD_BOUNDARY 32 + + #undef STACK_BOUNDARY + #define STACK_BOUNDARY 128 + + #undef MIPS_STACK_ALIGN + #define MIPS_STACK_ALIGN(LOC) (((LOC)+15) & ~15) + + #undef GP_ARG_LAST + #define GP_ARG_LAST (mips_isa < 3 ? GP_REG_FIRST + 7 : GP_REG_FIRST + 11) + #undef FP_ARG_LAST + #define FP_ARG_LAST (mips_isa < 3 ? FP_REG_FIRST + 15 : FP_REG_FIRST + 19) + + /* fp20-23 are now caller saved. */ + #undef SUBTARGET_CONDITIONAL_REGISTER_USAGE + #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \ + { \ + if (mips_isa >= 3) \ + { \ + int regno; \ + for (regno = FP_REG_FIRST + 20; regno < FP_REG_FIRST + 24; regno++) \ + call_used_regs[regno] = 1; \ + } \ + } + + #undef MAX_ARGS_IN_REGISTERS + #define MAX_ARGS_IN_REGISTERS (mips_isa < 3 ? 4 : 8) + + #undef REG_PARM_STACK_SPACE + #define REG_PARM_STACK_SPARC(FNDECL) \ + (mips_abi < 3 \ + ? (MAX_ARGS_IN_REGISTERS*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL) \ + : 0) + + #define FUNCTION_ARG_PADDING(MODE, TYPE) \ + (! BYTES_BIG_ENDIAN \ + ? upward \ + : (((MODE) == BLKmode \ + ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ + && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT))\ + : (GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY \ + && (mips_isa < 3 || GET_MODE_CLASS (MODE) == MODE_INT))) \ + ? downward : upward)) + + extern struct rtx_def *type_dependent_reg (); + #define TYPE_DEPENDENT_REG(REGNO, INDEX, TYPE) \ + type_dependent_reg (REGNO, INDEX, TYPE) + + #undef RETURN_IN_MEMORY + #define RETURN_IN_MEMORY(TYPE) \ + (mips_isa < 3 ? TYPE_MODE (TYPE) == BLKmode : int_size_in_bytes (TYPE) > 16) + + extern struct rtx_def *mips_function_value (); + #undef FUNCTION_VALUE + #define FUNCTION_VALUE(VALTYPE, FUNC) mips_function_value (VALTYPE, FUNC) + + /* For varargs, we must save the current argument, because it is the fake + argument va_alist, and will need to be converted to the real argument. + For stdarg, we do not need to save the current argument, because it + is a real argument. */ + #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ + { if (mips_isa >= 3 && (CUM).arg_words < MAX_ARGS_IN_REGISTERS - 1) \ + { \ + PRETEND_SIZE \ + = (MAX_ARGS_IN_REGISTERS - (CUM).arg_words \ + - ! current_function_varargs) * UNITS_PER_WORD; \ + \ + if (! (NO_RTL)) \ + { \ + rtx mem = gen_rtx (MEM, BLKmode, \ + plus_constant (virtual_incoming_args_rtx, \ + - PRETEND_SIZE)); \ + /* va_arg is an array access in this case, which causes it to \ + get MEM_IN_STRUCT_P set. We must set it here so that the \ + insn scheduler won't assume that these stores can't \ + possibly overlap with the va_arg loads. */ \ + if (BYTES_BIG_ENDIAN) \ + MEM_IN_STRUCT_P (mem) = 1; \ + move_block_from_reg \ + ((CUM).arg_words + GP_ARG_FIRST + ! current_function_varargs, \ + mem, \ + (MAX_ARGS_IN_REGISTERS - (CUM).arg_words \ + - ! current_function_varargs), \ + PRETEND_SIZE); \ + } \ + } \ + } + + #define STRICT_ARGUMENT_NAMING + + /* ??? Unimplemented stuff follows. */ + + /* ??? Add support for 16 byte/128 bit long doubles here when + mips_isa >= 3. */ + + /* ??? Make main return zero if user did not specify return value. */ + + /* ??? Add support for .interfaces section, so as to get linker warnings + when stdarg functions called without prototype in scope? */ + + /* ??? Could optimize structure passing by putting the right register rtx + into the field decl, so that if we use the field, we can take the value from + a register instead of from memory. */ + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/bsd-4-gdb.h gcc-2.7.0/config/mips/bsd-4-gdb.h *** gcc-2.6.3/config/mips/bsd-4-gdb.h Tue Jan 5 15:08:22 1993 --- gcc-2.7.0/config/mips/bsd-4-gdb.h Thu Jun 15 15:25:00 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/bsd-4.h gcc-2.7.0/config/mips/bsd-4.h *** gcc-2.6.3/config/mips/bsd-4.h Wed May 4 14:17:34 1994 --- gcc-2.7.0/config/mips/bsd-4.h Thu Jun 15 15:27:05 1995 *************** *** 16,20 **** 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. */ #define MIPS_BSD43 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_BSD43 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/bsd-5-gdb.h gcc-2.7.0/config/mips/bsd-5-gdb.h *** gcc-2.6.3/config/mips/bsd-5-gdb.h Tue Jan 5 15:08:23 1993 --- gcc-2.7.0/config/mips/bsd-5-gdb.h Thu Jun 15 15:27:20 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/bsd-5.h gcc-2.7.0/config/mips/bsd-5.h *** gcc-2.6.3/config/mips/bsd-5.h Sun Aug 14 19:04:59 1994 --- gcc-2.7.0/config/mips/bsd-5.h Thu Jun 15 15:27:30 1995 *************** *** 16,20 **** 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. */ #define MIPS_BSD43 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_BSD43 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/cross64.h gcc-2.7.0/config/mips/cross64.h *** gcc-2.6.3/config/mips/cross64.h --- gcc-2.7.0/config/mips/cross64.h Tue Apr 25 18:36:03 1995 *************** *** 0 **** --- 1,36 ---- + /* Configuration for an Irix 5 host and Irix 6 target using SGI's cross64 + package. */ + + #include "mips/iris6.h" + + #define STANDARD_INCLUDE_DIR "/usr/cross64/usr/include" + #undef MD_EXEC_PREFIX + #define MD_EXEC_PREFIX "/usr/cross64/usr/bin/" + #undef MD_STARTFILE_PREFIX + #define MD_STARTFILE_PREFIX "/usr/cross64/usr/lib/lib64/" + + /* Must add TOOLROOT to the environment, or else the assembler will not + work. */ + #define INIT_ENVIRONMENT \ + "TOOLROOT=/usr/cross64" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{mips1:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{mips2:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{!mips1:%{!mips2:%{pg:/usr/cross64/usr/lib64/mips4/gcrt1.o} \ + %{!pg:%{p:/usr/cross64/usr/lib64/mips4/mcrt1.o \ + /usr/cross64/usr/lib64/mips4/libprof1.a} \ + %{!p:/usr/cross64/usr/lib64/mips4/crt1.o}}}}" + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC \ + "%{mips1:crtn.o%s}%{mips2:crtn.o%s}%{!mips1:%{!mips2:/usr/cross64/usr/lib64/mips4/crtn.o}}" + + #undef LINK_SPEC + #define LINK_SPEC "\ + -64 -_SYSTYPE_SVR4 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \ + %{!mips1:%{!mips2:-L/usr/cross64/usr/lib64/mips4 -L/usr/cross64/usr/lib64}}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/dec-bsd.h gcc-2.7.0/config/mips/dec-bsd.h *** gcc-2.6.3/config/mips/dec-bsd.h Wed May 4 14:17:42 1994 --- gcc-2.7.0/config/mips/dec-bsd.h Thu Jun 15 15:27:39 1995 *************** *** 16,20 **** 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. */ #define DECSTATION --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define DECSTATION *************** *** 23,27 **** #define CPP_PREDEFINES "-D__ANSI_COMPAT \ -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -Dbsd4_4 -Dhost_mips -Dmips \ ! -Dunix -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 \ -Asystem(unix) -Asystem(bsd) -Amachine(mips)" #endif --- 24,28 ---- #define CPP_PREDEFINES "-D__ANSI_COMPAT \ -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -Dbsd4_4 -Dhost_mips -Dmips \ ! -Dunix -D_mips -D_unix -D_host_mips -D_MIPSEL -D_R3000 \ -Asystem(unix) -Asystem(bsd) -Amachine(mips)" #endif *************** *** 51,55 **** %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3}" #endif --- 52,58 ---- %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/dec-gosf1.h gcc-2.7.0/config/mips/dec-gosf1.h *** gcc-2.6.3/config/mips/dec-gosf1.h Tue Jan 5 15:08:24 1993 --- gcc-2.7.0/config/mips/dec-gosf1.h Thu Jun 15 15:28:17 1995 *************** *** 17,21 **** 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 stabs instead of ECOFF debug format. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Use stabs instead of ECOFF debug format. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/dec-osf1.h gcc-2.7.0/config/mips/dec-osf1.h *** gcc-2.6.3/config/mips/dec-osf1.h Wed May 4 14:17:46 1994 --- gcc-2.7.0/config/mips/dec-osf1.h Thu Jun 15 15:28:35 1995 *************** *** 16,20 **** 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. */ #define DEC_OSF1 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define DEC_OSF1 *************** *** 52,56 **** %{!.S:%{!.s: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}} \ %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ ! %{!mlong64:-D__PTRDIFF_TYPE__=int}" /* turn off collect2 COFF support, since ldfcn now has elf declaration */ --- 53,59 ---- %{!.S:%{!.s: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}} \ %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ ! %{!mlong64:-D__PTRDIFF_TYPE__=int} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" /* turn off collect2 COFF support, since ldfcn now has elf declaration */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/ecoff-gdb.h gcc-2.7.0/config/mips/ecoff-gdb.h *** gcc-2.6.3/config/mips/ecoff-gdb.h --- gcc-2.7.0/config/mips/ecoff-gdb.h Thu Jun 15 15:28:44 1995 *************** *** 0 **** --- 1,23 ---- + /* Definitions of target machine for GNU compiler. MIPS version using + encapsulated stabs and the GOFAST software floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips/ecoff.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/ecoff.h gcc-2.7.0/config/mips/ecoff.h *** gcc-2.6.3/config/mips/ecoff.h --- gcc-2.7.0/config/mips/ecoff.h Thu Jun 15 15:28:54 1995 *************** *** 0 **** --- 1,36 ---- + /* Definitions of target machine for GNU compiler. MIPS version with + GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "mips/mips.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR3000 -D_mips -D_MIPSEB -D_R3000" + + /* Use memcpy, et. al., rather than bcopy. */ + #define TARGET_MEM_FUNCTIONS + + /* US Software GOFAST library support. */ + #include "gofast.h" + #define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS + + /* Don't assume anything about startfiles. The linker script will load the + appropriate startfiles. */ + #define STARTFILE_SPEC "" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/ecoffl-gdb.h gcc-2.7.0/config/mips/ecoffl-gdb.h *** gcc-2.6.3/config/mips/ecoffl-gdb.h --- gcc-2.7.0/config/mips/ecoffl-gdb.h Thu Jun 15 15:29:05 1995 *************** *** 0 **** --- 1,24 ---- + /* Definitions of target machine for GNU compiler. Little endian MIPS + version using encapsulated stabs and the GOFAST software floating + point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips/ecoffl.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/ecoffl.h gcc-2.7.0/config/mips/ecoffl.h *** gcc-2.6.3/config/mips/ecoffl.h --- gcc-2.7.0/config/mips/ecoffl.h Thu Jun 15 15:29:12 1995 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler. Little endian MIPS + version with GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is a little endian version of ecoff.h. */ + + #define TARGET_ENDIAN_DEFAULT 0 + + #include "mips/ecoff.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dmips -DMIPSEL -DR3000 -D_mips -D_MIPSEL -D_R3000" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/elf.h gcc-2.7.0/config/mips/elf.h *** gcc-2.6.3/config/mips/elf.h --- gcc-2.7.0/config/mips/elf.h Thu Jun 15 15:29:21 1995 *************** *** 0 **** --- 1,46 ---- + /* Definitions of target machine for GNU compiler. MIPS R3000 version with + GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Use ELF. */ + #define OBJECT_FORMAT_ELF + + /* Until we figure out what MIPS ELF targets normally use, just do + stabs in ELF. */ + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + /* Mostly like ECOFF. */ + #include "mips/ecoff.h" + + /* We need to use .esize and .etype instead of .size and .type to + avoid conflicting with ELF directives. */ + #undef PUT_SDB_SIZE + #define PUT_SDB_SIZE(a) \ + do { \ + extern FILE *asm_out_text_file; \ + fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \ + } while (0) + + #undef PUT_SDB_TYPE + #define PUT_SDB_TYPE(a) \ + do { \ + extern FILE *asm_out_text_file; \ + fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \ + } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/elf64.h gcc-2.7.0/config/mips/elf64.h *** gcc-2.6.3/config/mips/elf64.h --- gcc-2.7.0/config/mips/elf64.h Thu Jun 15 15:29:29 1995 *************** *** 0 **** --- 1,90 ---- + /* Definitions of target machine for GNU compiler. MIPS R4000 version with + GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define OBJECT_FORMAT_ELF + + /* Default to -mips3. */ + #define TARGET_DEFAULT MASK_FLOAT64|MASK_64BIT + #define MIPS_ISA_DEFAULT 3 + + /* Until we figure out what MIPS ELF targets normally use, just do + stabs in ELF. */ + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + #include "mips/mips.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000" + + /* This is the same as the one in mips64.h except that it defines __mips=3 + at the end. I would rather put this in CPP_PREDEFINES, but the gcc + driver doesn't handle -U options in CPP_PREDEFINES. */ + #undef CPP_SPEC + #define CPP_SPEC "\ + %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \ + %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{!.S:%{!.s: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}} \ + %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ + %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ + %{!mips1:%{!mips2:-U__mips -D__mips=3}}" + + /* Use memcpy, et. al., rather than bcopy. */ + #define TARGET_MEM_FUNCTIONS + + /* US Software GOFAST library support. */ + #include "gofast.h" + #define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS + + /* We need to use .esize and .etype instead of .size and .type to + avoid conflicting with ELF directives. */ + #undef PUT_SDB_SIZE + #define PUT_SDB_SIZE(a) \ + do { \ + extern FILE *asm_out_text_file; \ + fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \ + } while (0) + + #undef PUT_SDB_TYPE + #define PUT_SDB_TYPE(a) \ + do { \ + extern FILE *asm_out_text_file; \ + fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a)); \ + } while (0) + + /* A C statement to output something to the assembler file to switch to section + NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or + NULL_TREE. Some target formats do not support arbitrary sections. Do not + define this macro in such cases. */ + + #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME) \ + do { \ + extern FILE *asm_out_text_file; \ + if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ + fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \ + else if ((DECL) && TREE_READONLY (DECL)) \ + fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \ + else \ + fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \ + } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/elfl.h gcc-2.7.0/config/mips/elfl.h *** gcc-2.6.3/config/mips/elfl.h --- gcc-2.7.0/config/mips/elfl.h Thu Jun 15 15:29:40 1995 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler. Little endian MIPS + R3000 version with GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is a little endian version of elf.h. */ + + #define TARGET_ENDIAN_DEFAULT 0 + + #include "mips/elf.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dmips -DMIPSEL -DR3000 -D_mips -D_MIPSEL -D_R3000" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/elfl64.h gcc-2.7.0/config/mips/elfl64.h *** gcc-2.6.3/config/mips/elfl64.h --- gcc-2.7.0/config/mips/elfl64.h Thu Jun 15 15:29:53 1995 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler. Little endian MIPS + R4000 version with GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is a little endian version of elf64.h. */ + + #define TARGET_ENDIAN_DEFAULT 0 + + #include "mips/elf64.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dmips -DMIPSEL -DR4000 -D_mips -D_MIPSEL -D_R4000" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/elflorion.h gcc-2.7.0/config/mips/elflorion.h *** gcc-2.6.3/config/mips/elflorion.h --- gcc-2.7.0/config/mips/elflorion.h Thu Jun 15 15:30:03 1995 *************** *** 0 **** --- 1,24 ---- + /* Definitions of target machine for GNU compiler. MIPS ORION version with + GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define MIPS_CPU_STRING_DEFAULT "orion" + + #include "mips/elfl64.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/elforion.h gcc-2.7.0/config/mips/elforion.h *** gcc-2.6.3/config/mips/elforion.h --- gcc-2.7.0/config/mips/elforion.h Thu Jun 15 15:30:14 1995 *************** *** 0 **** --- 1,24 ---- + /* Definitions of target machine for GNU compiler. MIPS ORION version with + GOFAST floating point library. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define MIPS_CPU_STRING_DEFAULT "orion" + + #include "mips/elf64.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/gnu.h gcc-2.7.0/config/mips/gnu.h *** gcc-2.6.3/config/mips/gnu.h --- gcc-2.7.0/config/mips/gnu.h Thu Jun 15 15:30:26 1995 *************** *** 0 **** --- 1,149 ---- + /* Definitions of target machine for GNU compiler. MIPS GNU Hurd version. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + #undef SWITCH_TAKES_ARG + #undef ASM_FILE_END + #undef ASM_OUTPUT_IDENT + #undef ASM_OUTPUT_SOURCE_LINE + #undef READONLY_DATA_SECTION + #undef SELECT_SECTION + #undef ASM_DECLARE_FUNCTION_NAME + #undef ASM_DECLARE_OBJECT_NAME + /* #undef PREFERRED_DEBUGGING_TYPE */ + + #include + + #undef MD_EXEC_PREFIX + #undef MD_STARTFILE_PREFIX + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (MIPS GNU/ELF)"); + + /* Output at beginning of assembler file. */ + /* The .file command should always begin the output. */ + #undef ASM_FILE_START + #define ASM_FILE_START(FILE) \ + do { \ + mips_asm_file_start (FILE); \ + fprintf (FILE, "\t.version\t\"01.01\"\n"); \ + } while (0) + + #undef ASM_FILE_END + #define ASM_FILE_END(FILE) \ + do { \ + mips_asm_file_end(FILE); \ + fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \ + IDENT_ASM_OP, version_string); \ + } while (0) + + #undef ASM_OUTPUT_SOURCE_LINE + #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ + do { \ + ++sym_lineno; \ + fprintf ((FILE), ".LM%d:\n\t%s %d,0,%d,.LM%d\n", \ + sym_lineno, ASM_STABN_OP, N_SLINE, (LINE), sym_lineno); \ + } while (0) + + #undef ASM_DECLARE_FUNCTION_NAME + #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \ + do { \ + extern FILE *asm_out_text_file; \ + \ + if (TARGET_GP_OPT) \ + STREAM = asm_out_text_file; \ + fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (STREAM, NAME); \ + putc (',', STREAM); \ + fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \ + putc ('\n', STREAM); \ + ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \ + current_function_name = NAME; \ + HALF_PIC_DECLARE (NAME); \ + } while (0) + + /* Switch Recognition by gcc.c. Add -G xx support */ + #undef SWITCH_TAKES_ARG + #define SWITCH_TAKES_ARG(CHAR) \ + ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ + || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ + || (CHAR) == 'I' || (CHAR) == 'm' \ + || (CHAR) == 'h' || (CHAR) == 'z' \ + || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'G') + + #undef DEFAULT_PCC_STRUCT_RETURN + #define DEFAULT_PCC_STRUCT_RETURN 1 + + #undef DBX_REGISTER_NUMBER + #define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[ (REGNO) ] + + #define MIPS_GNU + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES GNU_CPP_PREDEFINES("mips") \ + "-DMIPSEB -DR3000 -D_MIPSEB -D_R3000 \ + -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32" + + #undef ASM_SPEC + #define ASM_SPEC "\ + %{mmips-as: \ + %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \ + %{pipe: %e-pipe is not supported.} \ + %{K}} \ + %{!mmips-as: \ + %{mcpu=*}} \ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \ + %{noasmopt:-O0} \ + %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ + %{g} %{g0} %{g1} %{g2} %{g3} \ + %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ + %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ + %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ + %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \ + %{membedded-pic}" + + #undef LINK_SPEC + #define LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \ + -systype /gnu/ " + + #undef LIB_SPEC + #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}" + + #undef MACHINE_TYPE + #define MACHINE_TYPE "GNU MIPS/ELF" + + #undef YES_UNDERSCORE + + #undef SDB_DEBUGGING_INFO + #undef DBX_DEBUGGING_INFO + #undef MIPS_DEBUGGING_INFO + #define DWARF_DEBUGGING_INFO + + #define NO_MIPS_SELECT_SECTION + + /* Get machine-independent configuration parameters for the GNU system. */ + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/iris3-gdb.h gcc-2.7.0/config/mips/iris3-gdb.h *** gcc-2.6.3/config/mips/iris3-gdb.h Tue Jan 5 15:08:25 1993 --- gcc-2.7.0/config/mips/iris3-gdb.h Thu Jun 15 15:30:36 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/iris3.h gcc-2.7.0/config/mips/iris3.h *** gcc-2.6.3/config/mips/iris3.h Wed May 4 14:17:51 1994 --- gcc-2.7.0/config/mips/iris3.h Thu Jun 15 15:30:45 1995 *************** *** 16,20 **** 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. */ #define SGI_TARGET 1 /* inform other mips files this is SGI */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define SGI_TARGET 1 /* inform other mips files this is SGI */ *************** *** 39,43 **** %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3}" #define LIB_SPEC \ --- 40,46 ---- %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" #define LIB_SPEC \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/iris4-gdb.h gcc-2.7.0/config/mips/iris4-gdb.h *** gcc-2.6.3/config/mips/iris4-gdb.h Tue Jan 5 15:08:26 1993 --- gcc-2.7.0/config/mips/iris4-gdb.h Thu Jun 15 15:30:57 1995 *************** *** 16,20 **** 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 stabs instead of ECOFF debug format. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Use stabs instead of ECOFF debug format. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/iris4.h gcc-2.7.0/config/mips/iris4.h *** gcc-2.6.3/config/mips/iris4.h Sun Aug 14 19:05:01 1994 --- gcc-2.7.0/config/mips/iris4.h Thu Jun 15 15:31:05 1995 *************** *** 16,20 **** 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 atexit for static constructors/destructors, instead of defining --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Use atexit for static constructors/destructors, instead of defining diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/iris5.h gcc-2.7.0/config/mips/iris5.h *** gcc-2.6.3/config/mips/iris5.h Tue Sep 20 16:06:17 1994 --- gcc-2.7.0/config/mips/iris5.h Thu Jun 15 15:31:17 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Iris version 5. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Iris version 5. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,22 **** 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. */ #define TARGET_DEFAULT MASK_ABICALLS #define ABICALLS_ASM_OP ".option pic2" --- 16,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ + #ifndef TARGET_DEFAULT #define TARGET_DEFAULT MASK_ABICALLS + #endif #define ABICALLS_ASM_OP ".option pic2" *************** *** 35,38 **** --- 38,44 ---- I will leave that for another time (or someone else). */ #define OBJECT_FORMAT_ELF + #define HAS_INIT_SECTION + #define LD_INIT_SWITCH "-init" + #define LD_FINI_SWITCH "-fini" /* Specify wchar_t types. */ *************** *** 74,78 **** %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3}" #undef LINK_SPEC --- 80,86 ---- %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" #undef LINK_SPEC *************** *** 81,90 **** %{bestGnum} %{shared} %{non_shared} \ %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: \ ! %{!call_shared: -call_shared -no_unresolved}}} \ -_SYSTYPE_SVR4" #undef LIB_SPEC ! #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" /* We do not want to run mips-tfile! */ --- 89,105 ---- %{bestGnum} %{shared} %{non_shared} \ %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared:%{!non_shared:%{!call_shared: -call_shared -no_unresolved}}} \ -_SYSTYPE_SVR4" + /* We now support shared libraries. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}" + #undef LIB_SPEC ! #define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}" ! ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "%{!shared:crtn.o%s}" /* We do not want to run mips-tfile! */ *************** *** 105,109 **** #undef MACHINE_TYPE ! #define MACHINE_TYPE "SGI running IRIX 5.0" /* -G is incompatible with -KPIC which is the default, so only allow objects --- 120,125 ---- #undef MACHINE_TYPE ! #define MACHINE_TYPE "SGI running IRIX 5.x" ! #undef NO_DOLLAR_IN_LABEL /* -G is incompatible with -KPIC which is the default, so only allow objects diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/iris6.h gcc-2.7.0/config/mips/iris6.h *** gcc-2.6.3/config/mips/iris6.h --- gcc-2.7.0/config/mips/iris6.h Thu Jun 15 15:31:27 1995 *************** *** 0 **** --- 1,285 ---- + /* Definitions of target machine for GNU compiler. Iris version 6. + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* Irix 6 uses DWARF. */ + #define DWARF_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG + + /* Default to -mips4. */ + #define TARGET_DEFAULT MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT + #define MIPS_ISA_DEFAULT 4 + + #include "mips/iris5gas.h" + #include "mips/abi64.h" + + /* The Irix 6.0.1 assembler doesn't like labels in the text section, so + just avoid emitting them. */ + #define ASM_IDENTIFY_GCC + #define ASM_IDENTIFY_LANGUAGE + + /* Irix 5 stuff that we don't need for Irix 6. */ + #undef ASM_OUTPUT_UNDEF_FUNCTION + #undef ASM_OUTPUT_EXTERNAL_LIBCALL + #undef ASM_DECLARE_FUNCTION_SIZE + + /* Stuff we need for Irix 6 that isn't in Irix 5. */ + + #undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */ + + /* This is how to equate one symbol to another symbol. The syntax used is + `SYM1=SYM2'. Note that this is different from the way equates are done + with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'. */ + + #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ + do { fprintf ((FILE), "\t"); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, " = "); \ + assemble_name (FILE, LABEL2); \ + fprintf (FILE, "\n"); \ + } while (0) + + #define POPSECTION_ASM_OP ".popsection" + + /* To enable use of init and fini sections. */ + #define INIT_SECTION_ASM_OP ".section\t.init" + #undef LD_INIT_SWITCH + #undef LD_FINI_SWITCH + #undef HAS_INIT_SECTION + + #define DEBUG_SECTION ".debug,1,0,0,1" + #define LINE_SECTION ".line,1,0,0,1" + #define SFNAMES_SECTION ".debug_sfnames,1,0,0,1" + #define SRCINFO_SECTION ".debug_srcinfo,1,0,0,1" + #define MACINFO_SECTION ".debug_macinfo,1,0,0,1" + #define PUBNAMES_SECTION ".debug_pubnames,1,0,0,1" + #define ARANGES_SECTION ".debug_aranges,1,0,0,1" + + #undef ASM_SPEC + #if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GAS) != 0 + /* GAS */ + #define ASM_SPEC "\ + %{mmips-as: \ + %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \ + %{pipe: %e-pipe is not supported.} \ + %{K}} \ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{v} \ + %{noasmopt:-O0} \ + %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ + %{g} %{g0} %{g1} %{g2} %{g3} \ + %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ + %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ + %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ + %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \ + %{membedded-pic}" + + #else + /* not GAS */ + /* Must pass -g0 to the assembler, otherwise it may overwrite our + debug info with its own debug info. */ + /* Must pass -show instead of -v. */ + /* Must pass -G 0 to the assembler, otherwise we may get warnings about + GOT overflow. */ + #define ASM_SPEC "\ + %{!mgas: \ + %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \ + %{pipe: %e-pipe is not supported.} \ + %{K}} \ + %{G*} %{EB} %{EL} %{v:-show} \ + %{mips1} %{mips2} %{mips3} %{mips4} \ + %{!mips1: %{!mips2: %{!mips3: %{!mips4: -mips4}}}} \ + %{noasmopt:-O0} %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ + -g0 -G 0 %{membedded-pic}" + + #endif + + /* Stuff for constructors. Start here. */ + + #define CONST_SECTION_ASM_OP_32 "\t.rdata" + #define CONST_SECTION_ASM_OP_64 ".section\t.rodata" + #define CTORS_SECTION_ASM_OP ".section\t.ctors,1,2,0,4" + #define DTORS_SECTION_ASM_OP ".section\t.dtors,1,2,0,4" + + /* This is the pseudo-op used to generate a 32-bit word of data with a + specific value in some section. This is the same for all known svr4 + assemblers. */ + + #define INT_ASM_OP ".word" + + /* A default list of other sections which we might be "in" at any given + time. For targets that use additional sections (e.g. .tdesc) you + should override this definition in the target-specific file which + includes this file. */ + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors, in_bss + + /* A default list of extra section function definitions. For targets + that use additional sections (e.g. .tdesc) you should override this + definition in the target-specific file which includes this file. */ + + /* ??? rdata_section is now same as svr4 const_section. */ + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + void \ + sdata_section () \ + { \ + if (in_section != in_sdata) \ + { \ + fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ + in_section = in_sdata; \ + } \ + } \ + \ + void \ + rdata_section () \ + { \ + if (in_section != in_rdata) \ + { \ + if (mips_isa >= 3) \ + fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \ + else \ + fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \ + in_section = in_rdata; \ + } \ + } \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + + #define CTORS_SECTION_FUNCTION \ + void \ + ctors_section () \ + { \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ + } + + #define DTORS_SECTION_FUNCTION \ + void \ + dtors_section () \ + { \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ + } + + /* A C statement (sans semicolon) to output an element in the table of + global constructors. */ + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. */ + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* Stuff for constructors. End here. */ + + /* ??? Perhaps just include svr4.h in this file? */ + + /* ??? SGI assembler may core dump when compiling with -g. + Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc) + Getting rid of .file solves both problems. */ + #undef ASM_OUTPUT_FILENAME + #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \ + do \ + { \ + fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \ + output_quoted_string (STREAM, NAME); \ + fputs ("\n", STREAM); \ + } \ + while (0) + + /* ??? SGI assembler gives warning whenever .lcomm is used. */ + #undef ASM_OUTPUT_LOCAL + #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \ + do \ + { \ + if (mips_isa >= 3) \ + { \ + fputs ("\t.section\t.bss\n", STREAM); \ + ASM_DECLARE_OBJECT_NAME (STREAM, NAME, 0); \ + ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ + ASM_OUTPUT_SKIP (STREAM, SIZE); \ + fprintf (STREAM, "\t%s\n", POPSECTION_ASM_OP); \ + } \ + else \ + mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \ + } \ + while (0) + + #undef ASM_OUTPUT_INTERNAL_LABEL + #define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM) \ + fprintf (STREAM, ".%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'. */ + + #undef ASM_GENERATE_INTERNAL_LABEL + #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ + sprintf (LABEL, "*.%s%d", PREFIX, NUM) + + #undef STARTFILE_SPEC + /* Profiling is supported via libprof1.a not -lc_p as in Irix 3. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{mips1:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{mips2:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{!mips1:%{!mips2:%{pg:/usr/lib64/gcrt1.o}%{!pg:%{p:/usr/lib64/mcrt1.o /usr/lib64/libprof1.a}%{!p:/usr/lib64/crt1.o}}}}" + + #undef LIB_SPEC + #define LIB_SPEC "%{p:libprof1.a%s}%{pg:libprof1.a%s} -lc" + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC \ + "%{mips1:crtn.o%s}%{mips2:crtn.o%s}%{!mips1:%{!mips2:/usr/lib64/crtn.o}}" + + #undef LINK_SPEC + #define LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \ + -_SYSTYPE_SVR4" + + /* ??? Debugging does not work. We get many assembler core dumps, + and even some linker core dumps. */ + #undef DBX_DEBUGGING_INFO + #undef SDB_DEBUGGING_INFO + #undef MIPS_DEBUGGING_INFO + #undef DWARF_DEBUGGING_INFO + #undef PREFERRED_DEBUGGING_TYPE diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/mips-4-gdb.h gcc-2.7.0/config/mips/mips-4-gdb.h *** gcc-2.6.3/config/mips/mips-4-gdb.h Tue Jan 5 15:08:27 1993 --- gcc-2.7.0/config/mips/mips-4-gdb.h Thu Jun 15 15:31:38 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/mips-5-gdb.h gcc-2.7.0/config/mips/mips-5-gdb.h *** gcc-2.6.3/config/mips/mips-5-gdb.h Tue Jan 5 15:08:27 1993 --- gcc-2.7.0/config/mips/mips-5-gdb.h Thu Jun 15 15:31:47 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/mips-5.h gcc-2.7.0/config/mips/mips-5.h *** gcc-2.6.3/config/mips/mips-5.h Sun Aug 14 19:05:04 1994 --- gcc-2.7.0/config/mips/mips-5.h Thu Jun 15 15:31:57 1995 *************** *** 17,21 **** 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. */ #define LINK_SPEC "\ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define LINK_SPEC "\ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/mips.c gcc-2.7.0/config/mips/mips.c *** gcc-2.6.3/config/mips/mips.c Wed Nov 23 17:51:05 1994 --- gcc-2.7.0/config/mips/mips.c Thu Jun 15 15:32:16 1995 *************** *** 1,8 **** /* Subroutines for insn-output.c for MIPS Contributed by A. Lichnewsky, lich@inria.inria.fr. ! Changes by Michael Meissner, meissner@osf.org. 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and Brendan Eich, brendan@microunity.com. - Copyright (C) 1989, 1990, 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,8 ---- /* Subroutines for insn-output.c for MIPS + Copyright (C) 1989, 90, 91, 93, 94, 1995 Free Software Foundation, Inc. Contributed by A. Lichnewsky, lich@inria.inria.fr. ! Changes by Michael Meissner, meissner@osf.org. 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and Brendan Eich, brendan@microunity.com. This file is part of GNU CC. *************** *** 20,24 **** 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. */ /* ??? The TARGET_FP_CALL_32 macros are intended to simulate a 32 bit --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* ??? The TARGET_FP_CALL_32 macros are intended to simulate a 32 bit *************** *** 118,122 **** int sdb_label_count = 0; ! /* Next label # for each statment for Silicon Graphics IRIS systems. */ int sym_lineno = 0; --- 119,123 ---- int sdb_label_count = 0; ! /* Next label # for each statement for Silicon Graphics IRIS systems. */ int sym_lineno = 0; *************** *** 195,199 **** /* Strings to hold which cpu and instruction set architecture to use. */ char *mips_cpu_string; /* for -mcpu= */ ! char *mips_isa_string; /* for -mips{1,2,3} */ /* Generating calls to position independent functions? */ --- 196,200 ---- /* Strings to hold which cpu and instruction set architecture to use. */ char *mips_cpu_string; /* for -mcpu= */ ! char *mips_isa_string; /* for -mips{1,2,3,4} */ /* Generating calls to position independent functions? */ *************** *** 247,251 **** "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", ! "hi", "lo", "$fcr31" }; --- 248,252 ---- "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", ! "hi", "lo", "accum","$fcr31" }; *************** *** 263,267 **** "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", ! "hi", "lo", "$fcr31" }; --- 264,268 ---- "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", ! "hi", "lo", "accum","$fcr31" }; *************** *** 285,289 **** FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, ! HI_REG, LO_REG, ST_REGS }; --- 286,290 ---- FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, FP_REGS, ! HI_REG, LO_REG, HILO_REG, ST_REGS }; *************** *** 410,414 **** } ! /* Return truth value of whether OP is an integer which is too big to be loaded with one instruction. */ --- 411,415 ---- } ! /* Return truth value of whether OP is a 32 bit integer which is too big to be loaded with one instruction. */ *************** *** 430,436 **** return FALSE; ! if ((value & 0x0000ffff) == 0 /* lui reg,value>>16 */ ! && ((value & ~2147483647) == 0 /* signed value */ ! || (value & ~2147483647) == ~2147483647)) return FALSE; --- 431,435 ---- return FALSE; ! if ((value & 0x0000ffff) == 0) /* lui reg,value>>16 */ return FALSE; *************** *** 479,483 **** return FALSE; ! if (mode == DImode) return TRUE; --- 478,482 ---- return FALSE; ! if (mode == VOIDmode) return TRUE; *************** *** 488,491 **** --- 487,494 ---- return TRUE; + /* ??? li.s does not work right with SGI's Irix 6 assembler. */ + if (ABI_64BIT) + return FALSE; + REAL_VALUE_FROM_CONST_DOUBLE (d, op); *************** *** 723,727 **** mips_load_reg = set_reg; if (GET_MODE_SIZE (mode) ! > (FP_REG_P (set_reg) ? UNITS_PER_FPREG : UNITS_PER_WORD)) mips_load_reg2 = gen_rtx (REG, SImode, REGNO (set_reg) + 1); else --- 726,730 ---- mips_load_reg = set_reg; if (GET_MODE_SIZE (mode) ! > (FP_REG_P (REGNO (set_reg)) ? UNITS_PER_FPREG : UNITS_PER_WORD)) mips_load_reg2 = gen_rtx (REG, SImode, REGNO (set_reg) + 1); else *************** *** 867,871 **** { if (embedded_pic_fnaddr_rtx == NULL) ! embedded_pic_fnaddr_rtx = gen_reg_rtx (Pmode); return gen_rtx (CONST, Pmode, gen_rtx (MINUS, Pmode, x, --- 870,896 ---- { if (embedded_pic_fnaddr_rtx == NULL) ! { ! rtx seq; ! ! embedded_pic_fnaddr_rtx = gen_reg_rtx (Pmode); ! ! /* Output code at function start to initialize the psuedo-reg. */ ! /* ??? We used to do this in FINALIZE_PIC, but that does not work for ! inline functions, because it is called after RTL for the function ! has been copied. The pseudo-reg in embedded_pic_fnaddr_rtx however ! does not get copied, and ends up not matching the rest of the RTL. ! This solution works, but means that we get unnecessary code to ! initialize this value everytime a function is inlined into another ! function. */ ! start_sequence (); ! emit_insn (gen_get_fnaddr (embedded_pic_fnaddr_rtx, ! XEXP (DECL_RTL (current_function_decl), 0))); ! seq = gen_sequence (); ! end_sequence (); ! push_topmost_sequence (); ! emit_insn_after (seq, get_insns ()); ! pop_topmost_sequence (); ! } ! return gen_rtx (CONST, Pmode, gen_rtx (MINUS, Pmode, x, *************** *** 926,930 **** { delay = DELAY_HILO; ! ret = "mf%1\t%0"; } --- 951,958 ---- { delay = DELAY_HILO; ! if (regno1 != HILO_REGNUM) ! ret = "mf%1\t%0"; ! else ! ret = "mflo\t%0"; } *************** *** 957,961 **** { delay = DELAY_HILO; ! ret = "mt%0\t%1"; } } --- 985,990 ---- { delay = DELAY_HILO; ! if (regno0 != HILO_REGNUM) ! ret = "mt%0\t%1"; } } *************** *** 1017,1022 **** } ! else if (code1 == CONST_INT) ! { if (INTVAL (op1) == 0) { --- 1046,1061 ---- } ! else if (code1 == CONST_INT ! || (code1 == CONST_DOUBLE ! && GET_MODE (op1) == VOIDmode)) ! { ! if (code1 == CONST_DOUBLE) ! { ! /* This can happen when storing constants into long long ! bitfields. Just store the least significant word of ! the value. */ ! operands[1] = op1 = GEN_INT (CONST_DOUBLE_LOW (op1)); ! } ! if (INTVAL (op1) == 0) { *************** *** 1029,1032 **** --- 1068,1077 ---- ret = "mtc1\t%z1,%0"; } + + else if (MD_REG_P (regno0)) + { + delay = DELAY_HILO; + ret = "mt%0\t%."; + } } *************** *** 1290,1294 **** delay = DELAY_HILO; if (TARGET_64BIT) ! ret = "mt%0\t%1"; else ret = "mthi\t%M1\n\tmtlo\t%L1"; --- 1335,1344 ---- delay = DELAY_HILO; if (TARGET_64BIT) ! { ! if (regno0 != HILO_REGNUM) ! ret = "mt%0\t%1"; ! else if (regno1 == 0) ! ret = "mtlo\t%.\n\tmthi\t%."; ! } else ret = "mthi\t%M1\n\tmtlo\t%L1"; *************** *** 1299,1303 **** delay = DELAY_HILO; if (TARGET_64BIT) ! ret = "mf%1\t%0"; else ret = "mfhi\t%M0\n\tmflo\t%L0"; --- 1349,1356 ---- delay = DELAY_HILO; if (TARGET_64BIT) ! { ! if (regno1 != HILO_REGNUM) ! ret = "mf%1\t%0"; ! } else ret = "mfhi\t%M0\n\tmflo\t%L0"; *************** *** 1329,1335 **** if (TARGET_FLOAT64 && !TARGET_64BIT) { ! operands[2] = GEN_INT (CONST_DOUBLE_LOW (op1)); ! operands[3] = GEN_INT (CONST_DOUBLE_HIGH (op1)); ! ret = "li\t%M0,%3\n\tli\t%L0,%2"; } else --- 1382,1387 ---- if (TARGET_FLOAT64 && !TARGET_64BIT) { ! split_double (op1, operands + 2, operands + 3); ! ret = "li\t%0,%2\n\tli\t%D0,%3"; } else *************** *** 1341,1352 **** } ! else if (TARGET_FLOAT64) ! ret = "li\t%0,%1"; else { ! operands[2] = GEN_INT (CONST_DOUBLE_LOW (op1)); ! operands[3] = GEN_INT (CONST_DOUBLE_HIGH (op1)); ! ret = "li\t%M0,%3\n\tli\t%L0,%2"; } } --- 1393,1403 ---- } ! else if (TARGET_64BIT) ! ret = "dli\t%0,%1"; else { ! split_double (op1, operands + 2, operands + 3); ! ret = "li\t%0,%2\n\tli\t%D0,%3"; } } *************** *** 1389,1392 **** --- 1440,1451 ---- : "mtc1\t%.,%0\n\tmtc1\t%.,%D0"); } + else if (MD_REG_P (regno0)) + { + delay = DELAY_HILO; + if (regno0 != HILO_REGNUM) + ret = "mt%0\t%.\n"; + else + ret = "mtlo\t%.\n\tmthi\t%."; + } } *************** *** 1394,1398 **** { if (TARGET_64BIT) ! ret = "li\t%0,%1"; else { --- 1453,1467 ---- { if (TARGET_64BIT) ! { ! if (HOST_BITS_PER_WIDE_INT < 64) ! /* We can't use 'X' for negative numbers, because then we won't ! get the right value for the upper 32 bits. */ ! ret = ((INTVAL (op1) < 0) ? "dli\t%0,%1\t\t\t# %X1" ! : "dli\t%0,%X1\t\t# %1"); ! else ! /* We must use 'X', because otherwise LONG_MIN will print as ! a number that the assembler won't accept. */ ! ret = "dli\t%0,%X1\t\t# %1"; ! } else { *************** *** 1451,1457 **** || code1 == CONST) { ! if (! TARGET_64BIT) ! abort (); ! return mips_move_1word (operands, insn, 0); } } --- 1520,1527 ---- || code1 == CONST) { ! if (TARGET_STATS) ! mips_count_memory_refs (op1, 2); ! ! ret = "dla\t%0,%a1"; } } *************** *** 2438,2442 **** xoperands[1] = operands[1]; xoperands[0] = src_reg; ! output_asm_insn ("la\t%0,%1", xoperands); } } --- 2508,2515 ---- xoperands[1] = operands[1]; xoperands[0] = src_reg; ! if (Pmode == DImode) ! output_asm_insn ("dla\t%0,%1", xoperands); ! else ! output_asm_insn ("la\t%0,%1", xoperands); } } *************** *** 2452,2456 **** xoperands[1] = operands[0]; xoperands[0] = dest_reg; ! output_asm_insn ("la\t%0,%1", xoperands); } } --- 2525,2532 ---- xoperands[1] = operands[0]; xoperands[0] = dest_reg; ! if (Pmode == DImode) ! output_asm_insn ("dla\t%0,%1", xoperands); ! else ! output_asm_insn ("la\t%0,%1", xoperands); } } *************** *** 2482,2498 **** else if (TARGET_64BIT && bytes >= 8) { ! #if BYTES_BIG_ENDIAN ! load_store[num].load = "ldl\t%0,%1\n\tldr\t%0,%2"; ! load_store[num].load_nop = "ldl\t%0,%1\n\tldr\t%0,%2%#"; ! load_store[num].store = "sdl\t%0,%1\n\tsdr\t%0,%2"; ! load_store[num].last_store = "sdr\t%0,%2"; ! load_store[num].final = "sdl\t%0,%1"; ! #else ! load_store[num].load = "ldl\t%0,%2\n\tldr\t%0,%1"; ! load_store[num].load_nop = "ldl\t%0,%2\n\tldr\t%0,%1%#"; ! load_store[num].store = "sdl\t%0,%2\n\tsdr\t%0,%1"; ! load_store[num].last_store = "sdr\t%0,%1"; ! load_store[num].final = "sdl\t%0,%2"; ! #endif load_store[num].mode = DImode; offset += 8; --- 2558,2577 ---- else if (TARGET_64BIT && bytes >= 8) { ! if (BYTES_BIG_ENDIAN) ! { ! load_store[num].load = "ldl\t%0,%1\n\tldr\t%0,%2"; ! load_store[num].load_nop = "ldl\t%0,%1\n\tldr\t%0,%2%#"; ! load_store[num].store = "sdl\t%0,%1\n\tsdr\t%0,%2"; ! load_store[num].last_store = "sdr\t%0,%2"; ! load_store[num].final = "sdl\t%0,%1"; ! } ! else ! { ! load_store[num].load = "ldl\t%0,%2\n\tldr\t%0,%1"; ! load_store[num].load_nop = "ldl\t%0,%2\n\tldr\t%0,%1%#"; ! load_store[num].store = "sdl\t%0,%2\n\tsdr\t%0,%1"; ! load_store[num].last_store = "sdr\t%0,%1"; ! load_store[num].final = "sdl\t%0,%2"; ! } load_store[num].mode = DImode; offset += 8; *************** *** 2515,2531 **** else if (bytes >= 4) { ! #if BYTES_BIG_ENDIAN ! load_store[num].load = "lwl\t%0,%1\n\tlwr\t%0,%2"; ! load_store[num].load_nop = "lwl\t%0,%1\n\tlwr\t%0,%2%#"; ! load_store[num].store = "swl\t%0,%1\n\tswr\t%0,%2"; ! load_store[num].last_store = "swr\t%0,%2"; ! load_store[num].final = "swl\t%0,%1"; ! #else ! load_store[num].load = "lwl\t%0,%2\n\tlwr\t%0,%1"; ! load_store[num].load_nop = "lwl\t%0,%2\n\tlwr\t%0,%1%#"; ! load_store[num].store = "swl\t%0,%2\n\tswr\t%0,%1"; ! load_store[num].last_store = "swr\t%0,%1"; ! load_store[num].final = "swl\t%0,%2"; ! #endif load_store[num].mode = SImode; offset += 4; --- 2594,2613 ---- else if (bytes >= 4) { ! if (BYTES_BIG_ENDIAN) ! { ! load_store[num].load = "lwl\t%0,%1\n\tlwr\t%0,%2"; ! load_store[num].load_nop = "lwl\t%0,%1\n\tlwr\t%0,%2%#"; ! load_store[num].store = "swl\t%0,%1\n\tswr\t%0,%2"; ! load_store[num].last_store = "swr\t%0,%2"; ! load_store[num].final = "swl\t%0,%1"; ! } ! else ! { ! load_store[num].load = "lwl\t%0,%2\n\tlwr\t%0,%1"; ! load_store[num].load_nop = "lwl\t%0,%2\n\tlwr\t%0,%1%#"; ! load_store[num].store = "swl\t%0,%2\n\tswr\t%0,%1"; ! load_store[num].last_store = "swr\t%0,%1"; ! load_store[num].final = "swl\t%0,%2"; ! } load_store[num].mode = SImode; offset += 4; *************** *** 2789,2803 **** { case SFmode: ! if (cum->gp_reg_found || cum->arg_number >= 2 || TARGET_SOFT_FLOAT) ! regbase = GP_ARG_FIRST; ! else { ! regbase = FP_ARG_FIRST; ! /* If the first arg was a float in a floating point register, ! then set bias to align this float arg properly. */ ! if (cum->arg_words == 1) ! bias = 1; } ! break; --- 2871,2889 ---- { case SFmode: ! if (! ABI_64BIT || mips_isa < 3) { ! if (cum->gp_reg_found || cum->arg_number >= 2 || TARGET_SOFT_FLOAT) ! regbase = GP_ARG_FIRST; ! else ! { ! regbase = FP_ARG_FIRST; ! /* If the first arg was a float in a floating point register, ! then set bias to align this float arg properly. */ ! if (cum->arg_words == 1) ! bias = 1; ! } } ! else ! regbase = (TARGET_SOFT_FLOAT || ! named ? GP_ARG_FIRST : FP_ARG_FIRST); break; *************** *** 2805,2811 **** if (! TARGET_64BIT) cum->arg_words += (cum->arg_words & 1); ! regbase = (cum->gp_reg_found || TARGET_SOFT_FLOAT || cum->arg_number >= 2 ! ? GP_ARG_FIRST ! : FP_ARG_FIRST); break; --- 2891,2904 ---- if (! TARGET_64BIT) cum->arg_words += (cum->arg_words & 1); ! if (! ABI_64BIT || mips_isa < 3) ! regbase = ((cum->gp_reg_found ! || TARGET_SOFT_FLOAT ! || TARGET_SINGLE_FLOAT ! || cum->arg_number >= 2) ! ? GP_ARG_FIRST ! : FP_ARG_FIRST); ! else ! regbase = (TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT || ! named ! ? GP_ARG_FIRST : FP_ARG_FIRST); break; *************** *** 3078,3082 **** { mips_isa = atoi (mips_isa_string); ! if (mips_isa < 1 || mips_isa > 3) { error ("-mips%d not supported", mips_isa); --- 3171,3175 ---- { mips_isa = atoi (mips_isa_string); ! if (mips_isa < 1 || mips_isa > 4) { error ("-mips%d not supported", mips_isa); *************** *** 3091,3094 **** --- 3184,3196 ---- } + #ifdef MIPS_CPU_STRING_DEFAULT + /* ??? There is a minor inconsistency here. If the user specifies an ISA + greater than that supported by the default processor, then the user gets + an error. Normally, the compiler will just default to the base level cpu + for the indicated isa. */ + if (mips_cpu_string == (char *)0) + mips_cpu_string = MIPS_CPU_STRING_DEFAULT; + #endif + /* Identify the processor type */ if (mips_cpu_string == (char *)0 *************** *** 3110,3122 **** mips_cpu = PROCESSOR_R4000; break; ! } ! ! #ifdef MIPS_CPU_DEFAULT ! if (mips_isa_string == (char *)0) ! { ! mips_cpu_string = MIPS_CPU_STRING_DEFAULT; ! mips_cpu = MIPS_CPU_DEFAULT; } - #endif } --- 3212,3220 ---- mips_cpu = PROCESSOR_R4000; break; ! case 4: ! mips_cpu_string = "8000"; ! mips_cpu = PROCESSOR_R8000; ! break; } } *************** *** 3153,3156 **** --- 3251,3256 ---- else if (!strcmp (p, "4600")) mips_cpu = PROCESSOR_R4600; + else if (!strcmp (p, "4650")) + mips_cpu = PROCESSOR_R4650; break; *************** *** 3160,3163 **** --- 3260,3268 ---- break; + case '8': + if (!strcmp (p, "8000")) + mips_cpu = PROCESSOR_R8000; + break; + case 'o': if (!strcmp (p, "orion")) *************** *** 3174,3178 **** if ((mips_cpu == PROCESSOR_R3000 && mips_isa > 1) ! || (mips_cpu == PROCESSOR_R6000 && mips_isa > 2)) error ("-mcpu=%s does not support -mips%d", mips_cpu_string, mips_isa); --- 3279,3287 ---- if ((mips_cpu == PROCESSOR_R3000 && mips_isa > 1) ! || (mips_cpu == PROCESSOR_R6000 && mips_isa > 2) ! || ((mips_cpu == PROCESSOR_R4000 ! || mips_cpu == PROCESSOR_R4600 ! || mips_cpu == PROCESSOR_R4650) ! && mips_isa > 3)) error ("-mcpu=%s does not support -mips%d", mips_cpu_string, mips_isa); *************** *** 3181,3196 **** { if (TARGET_INT64) ! fatal ("Only MIPS-III CPUs can support 64 bit ints"); else if (TARGET_LONG64) ! fatal ("Only MIPS-III CPUs can support 64 bit longs"); else if (TARGET_FLOAT64) ! fatal ("Only MIPS-III CPUs can support 64 bit fp registers"); else if (TARGET_64BIT) ! fatal ("Only MIPS-III CPUs can support 64 bit gp registers"); } /* Tell halfpic.c that we have half-pic code if we do. */ if (TARGET_HALF_PIC) --- 3290,3308 ---- { if (TARGET_INT64) ! fatal ("Only MIPS-III or MIPS-IV CPUs can support 64 bit ints"); else if (TARGET_LONG64) ! fatal ("Only MIPS-III or MIPS-IV CPUs can support 64 bit longs"); else if (TARGET_FLOAT64) ! fatal ("Only MIPS-III or MIPS-IV CPUs can support 64 bit fp registers"); else if (TARGET_64BIT) ! fatal ("Only MIPS-III or MIPS-IV CPUs can support 64 bit gp registers"); } + if (ABI_64BIT && mips_isa >= 3) + flag_pcc_struct_return = 0; + /* Tell halfpic.c that we have half-pic code if we do. */ if (TARGET_HALF_PIC) *************** *** 3291,3295 **** --- 3403,3409 ---- mips_char_to_class['h'] = HI_REG; mips_char_to_class['l'] = LO_REG; + mips_char_to_class['a'] = HILO_REG; mips_char_to_class['x'] = MD_REGS; + mips_char_to_class['b'] = ALL_REGS; mips_char_to_class['y'] = GR_REGS; mips_char_to_class['z'] = ST_REGS; *************** *** 3337,3351 **** && (class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT ! || (TARGET_DEBUG_H_MODE && class == MODE_INT))); else if (MD_REG_P (regno)) ! { ! if (TARGET_64BIT) ! temp = (mode == DImode ! || (regno == MD_REG_FIRST && mode == TImode)); ! else ! temp = (mode == SImode ! || (regno == MD_REG_FIRST && mode == DImode)); ! } else --- 3451,3460 ---- && (class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT ! || (TARGET_DEBUG_H_MODE && class == MODE_INT)) ! && (! TARGET_SINGLE_FLOAT || size <= 4)); else if (MD_REG_P (regno)) ! temp = (size <= UNITS_PER_WORD ! || (regno == MD_REG_FIRST && size == 2 * UNITS_PER_WORD)); else *************** *** 3430,3433 **** --- 3539,3546 ---- 'N' print part of opcode for a branch condition, inverted. 'S' X is CODE_LABEL, print with prefix of "LS" (for embedded switch). + 'B' print 'z' for EQ, 'n' for NE + 'b' print 'n' for EQ, 'z' for NE + 'T' print 'f' for EQ, 't' for NE + 't' print 't' for EQ, 'f' for NE '(' Turn on .set noreorder ')' Turn on .set reorder *************** *** 3591,3595 **** default: ! abort_with_insn (op, "PRINT_OPERAND, illegal insn for %%C"); } --- 3704,3708 ---- default: ! abort_with_insn (op, "PRINT_OPERAND, invalid insn for %%C"); } *************** *** 3609,3613 **** default: ! abort_with_insn (op, "PRINT_OPERAND, illegal insn for %%N"); } --- 3722,3726 ---- default: ! abort_with_insn (op, "PRINT_OPERAND, invalid insn for %%N"); } *************** *** 3624,3634 **** register int regnum = REGNO (op); ! if (letter == 'M') ! regnum += MOST_SIGNIFICANT_WORD; ! ! else if (letter == 'L') ! regnum += LEAST_SIGNIFICANT_WORD; ! ! else if (letter == 'D') regnum++; --- 3737,3743 ---- register int regnum = REGNO (op); ! if ((letter == 'M' && ! WORDS_BIG_ENDIAN) ! || (letter == 'L' && WORDS_BIG_ENDIAN) ! || letter == 'D') regnum++; *************** *** 3639,3643 **** output_address (XEXP (op, 0)); ! else if (code == CONST_DOUBLE) { REAL_VALUE_TYPE d; --- 3748,3753 ---- output_address (XEXP (op, 0)); ! else if (code == CONST_DOUBLE ! && GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT) { REAL_VALUE_TYPE d; *************** *** 3652,3658 **** fprintf (file, "0x%04x", 0xffff & (INTVAL(op))); ! else if ((letter == 'X') && (GET_CODE(op) == CONST_INT)) fprintf (file, "0x%08x", INTVAL(op)); else if ((letter == 'd') && (GET_CODE(op) == CONST_INT)) fprintf (file, "%d", (INTVAL(op))); --- 3762,3773 ---- fprintf (file, "0x%04x", 0xffff & (INTVAL(op))); ! else if ((letter == 'X') && (GET_CODE(op) == CONST_INT) ! && HOST_BITS_PER_WIDE_INT == 32) fprintf (file, "0x%08x", INTVAL(op)); + else if ((letter == 'X') && (GET_CODE(op) == CONST_INT) + && HOST_BITS_PER_WIDE_INT == 64) + fprintf (file, "0x%016lx", INTVAL(op)); + else if ((letter == 'd') && (GET_CODE(op) == CONST_INT)) fprintf (file, "%d", (INTVAL(op))); *************** *** 3666,3669 **** --- 3781,3793 ---- fatal ("PRINT_OPERAND: letter %c was found & insn was not CONST_INT", letter); + else if (letter == 'B') + fputs (code == EQ ? "z" : "n", file); + else if (letter == 'b') + fputs (code == EQ ? "n" : "z", file); + else if (letter == 'T') + fputs (code == EQ ? "f" : "t", file); + else if (letter == 't') + fputs (code == EQ ? "t" : "f", file); + else output_addr_const (file, op); *************** *** 3692,3696 **** { default: ! abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, illegal insn #1"); break; --- 3816,3820 ---- { default: ! abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, invalid insn #1"); break; *************** *** 3730,3734 **** if (!CONSTANT_P (offset)) ! abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, illegal insn #2"); if (REGNO (reg) == ARG_POINTER_REGNUM) --- 3854,3858 ---- if (!CONSTANT_P (offset)) ! abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, invalid insn #2"); if (REGNO (reg) == ARG_POINTER_REGNUM) *************** *** 3890,3896 **** SET_FILE_NUMBER (); current_function_file = name; ! fprintf (stream, "\t.file\t%d ", num_source_filenames); ! output_quoted_string (stream, name); ! fprintf (stream, "\n"); /* This tells mips-tfile that stabs will follow. */ if (!TARGET_GAS && write_symbols == DBX_DEBUG) --- 4014,4018 ---- SET_FILE_NUMBER (); current_function_file = name; ! ASM_OUTPUT_FILENAME (stream, num_source_filenames, name); /* This tells mips-tfile that stabs will follow. */ if (!TARGET_GAS && write_symbols == DBX_DEBUG) *************** *** 3917,3932 **** warning ("MIPS ECOFF format does not allow changing filenames within functions with #line"); } - - fprintf (stream, "\t#.file\t%d ", num_source_filenames); } - else { SET_FILE_NUMBER (); current_function_file = name; ! fprintf (stream, "\t.file\t%d ", num_source_filenames); } - output_quoted_string (stream, name); - fprintf (stream, "\n"); } } --- 4039,4049 ---- warning ("MIPS ECOFF format does not allow changing filenames within functions with #line"); } } else { SET_FILE_NUMBER (); current_function_file = name; ! ASM_OUTPUT_FILENAME (stream, num_source_filenames, name); } } } *************** *** 3946,3951 **** { ++sym_lineno; ! fprintf (stream, "$LM%d:\n\t%s %d,0,%d,$LM%d\n", ! sym_lineno, ASM_STABN_OP, N_SLINE, line, sym_lineno); } --- 4063,4069 ---- { ++sym_lineno; ! fprintf (stream, "%sLM%d:\n\t%s %d,0,%d,%sLM%d\n", ! LOCAL_LABEL_PREFIX, sym_lineno, ASM_STABN_OP, N_SLINE, line, ! LOCAL_LABEL_PREFIX, sym_lineno); } *************** *** 4049,4052 **** --- 4167,4175 ---- fprintf (stream, "\t%s\n", ABICALLS_ASM_OP); + /* Start a section, so that the first .popsection directive is guaranteed + to have a previously defined section to pop back to. */ + if (ABI_64BIT && mips_isa >= 3) + fprintf (stream, "\t.section\t.text\n"); + /* This code exists so that we can put all externs before all symbol references. This is necessary for the assembler's global pointer *************** *** 4263,4294 **** return 0; } - - - /* When generating embedded PIC code we may need to get the address of - the current function. We will need it if we take the address of - any symbol in the .text section. */ - - void - mips_finalize_pic () - { - rtx seq; - - if (! TARGET_EMBEDDED_PIC) - return; - if (embedded_pic_fnaddr_rtx == NULL) - return; - - start_sequence (); - - emit_insn (gen_get_fnaddr (embedded_pic_fnaddr_rtx, - XEXP (DECL_RTL (current_function_decl), 0))); - - seq = gen_sequence (); - end_sequence (); - emit_insn_after (seq, get_insns ()); - - embedded_pic_fnaddr_rtx = NULL; - } - /* Return the bytes needed to compute the frame pointer from the current --- 4386,4389 ---- *************** *** 4391,4395 **** /* Calculate space needed for fp registers. */ ! if (TARGET_FLOAT64) { fp_inc = 1; --- 4486,4490 ---- /* Calculate space needed for fp registers. */ ! if (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT) { fp_inc = 1; *************** *** 4412,4418 **** gp_reg_rounded = MIPS_STACK_ALIGN (gp_reg_size); ! total_size += gp_reg_rounded + fp_reg_size; ! if (total_size == extra_size) total_size = extra_size = 0; else if (TARGET_ABICALLS) --- 4507,4517 ---- gp_reg_rounded = MIPS_STACK_ALIGN (gp_reg_size); ! total_size += gp_reg_rounded + MIPS_STACK_ALIGN (fp_reg_size); ! /* The gp reg is caller saved in the 32 bit ABI, so there is no need ! for leaf routines (total_size == extra_size) to save the gp reg. ! The gp reg is callee saved in the 64 bit ABI, so all routines must ! save the gp reg. */ ! if (total_size == extra_size && ! (ABI_64BIT && mips_isa >= 3)) total_size = extra_size = 0; else if (TARGET_ABICALLS) *************** *** 4426,4429 **** --- 4525,4533 ---- } + /* Add in space reserved on the stack by the callee for storing arguments + passed in registers. */ + if (ABI_64BIT && mips_isa >= 3) + total_size += MIPS_STACK_ALIGN (current_function_pretend_args_size); + /* Save other computed information. */ current_frame_info.total_size = total_size; *************** *** 4441,4446 **** if (mask) { ! unsigned long offset = args_size + extra_size + var_size ! + gp_reg_size - UNITS_PER_WORD; current_frame_info.gp_sp_offset = offset; current_frame_info.gp_save_offset = offset - total_size; --- 4545,4550 ---- if (mask) { ! unsigned long offset = (args_size + extra_size + var_size ! + gp_reg_size - UNITS_PER_WORD); current_frame_info.gp_sp_offset = offset; current_frame_info.gp_save_offset = offset - total_size; *************** *** 4586,4590 **** if (store_p) emit_move_insn (mem_rtx, reg_rtx); ! else if (!TARGET_ABICALLS || regno != (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)) emit_move_insn (reg_rtx, mem_rtx); --- 4690,4694 ---- if (store_p) emit_move_insn (mem_rtx, reg_rtx); ! else if (!TARGET_ABICALLS || (ABI_64BIT && mips_isa >= 3) || regno != (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)) emit_move_insn (reg_rtx, mem_rtx); *************** *** 4592,4596 **** else { ! if (store_p || !TARGET_ABICALLS || regno != (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)) fprintf (file, "\t%s\t%s,%ld(%s)\n", --- 4696,4700 ---- else { ! if (store_p || !TARGET_ABICALLS || (ABI_64BIT && mips_isa >= 3) || regno != (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)) fprintf (file, "\t%s\t%s,%ld(%s)\n", *************** *** 4609,4613 **** else { ! base_reg_rtx = (rtx)0; /* Make sure these are initialzed */ base_offset = 0; } --- 4713,4717 ---- else { ! base_reg_rtx = (rtx)0; /* Make sure these are initialized */ base_offset = 0; } *************** *** 4616,4620 **** if (fmask) { ! int fp_inc = (TARGET_FLOAT64) ? 1 : 2; int fp_size = fp_inc * UNITS_PER_FPREG; --- 4720,4724 ---- if (fmask) { ! int fp_inc = (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT) ? 1 : 2; int fp_size = fp_inc * UNITS_PER_FPREG; *************** *** 4690,4695 **** if (file == (FILE *)0) { ! rtx reg_rtx = gen_rtx (REG, DFmode, regno); ! rtx mem_rtx = gen_rtx (MEM, DFmode, gen_rtx (PLUS, Pmode, base_reg_rtx, GEN_INT (fp_offset - base_offset))); --- 4794,4801 ---- if (file == (FILE *)0) { ! enum machine_mode sz = ! TARGET_SINGLE_FLOAT ? SFmode : DFmode; ! rtx reg_rtx = gen_rtx (REG, sz, regno); ! rtx mem_rtx = gen_rtx (MEM, sz, gen_rtx (PLUS, Pmode, base_reg_rtx, GEN_INT (fp_offset - base_offset))); *************** *** 4702,4706 **** else fprintf (file, "\t%s\t%s,%ld(%s)\n", ! (store_p) ? "s.d" : "l.d", reg_names[regno], fp_offset - base_offset, --- 4808,4814 ---- else fprintf (file, "\t%s\t%s,%ld(%s)\n", ! (TARGET_SINGLE_FLOAT ! ? ((store_p) ? "s.s" : "l.s") ! : ((store_p) ? "s.d" : "l.d")), reg_names[regno], fp_offset - base_offset, *************** *** 4726,4731 **** --- 4834,4841 ---- ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl)); + #ifdef SDB_DEBUGGING_INFO if (debug_info_level != DINFO_LEVEL_TERSE && write_symbols == SDB_DEBUG) ASM_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl)); + #endif inside_function = 1; *************** *** 4753,4757 **** current_frame_info.fp_save_offset); ! if (TARGET_ABICALLS) { char *sp_str = reg_names[STACK_POINTER_REGNUM]; --- 4863,4867 ---- current_frame_info.fp_save_offset); ! if (TARGET_ABICALLS && ! (ABI_64BIT && mips_isa >= 3)) { char *sp_str = reg_names[STACK_POINTER_REGNUM]; *************** *** 4880,4888 **** /* If this function is a varargs function, store any registers that would normally hold arguments ($4 - $7) on the stack. */ ! if ((TYPE_ARG_TYPES (fntype) != 0 ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) != void_type_node)) ! || (arg_name != (char *)0 ! && ((arg_name[0] == '_' && strcmp (arg_name, "__builtin_va_alist") == 0) ! || (arg_name[0] == 'v' && strcmp (arg_name, "va_alist") == 0)))) { int offset = (regno - GP_ARG_FIRST) * UNITS_PER_WORD; --- 4990,4999 ---- /* If this function is a varargs function, store any registers that would normally hold arguments ($4 - $7) on the stack. */ ! if ((! ABI_64BIT || mips_isa < 3) ! && ((TYPE_ARG_TYPES (fntype) != 0 ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) != void_type_node)) ! || (arg_name != (char *)0 ! && ((arg_name[0] == '_' && strcmp (arg_name, "__builtin_va_alist") == 0) ! || (arg_name[0] == 'v' && strcmp (arg_name, "va_alist") == 0))))) { int offset = (regno - GP_ARG_FIRST) * UNITS_PER_WORD; *************** *** 4890,4894 **** /* If we are doing svr4-abi, sp has already been decremented by tsize. */ ! if (TARGET_ABICALLS) offset += tsize; --- 5001,5005 ---- /* If we are doing svr4-abi, sp has already been decremented by tsize. */ ! if (TARGET_ABICALLS && ! (ABI_64BIT && mips_isa >= 3)) offset += tsize; *************** *** 4908,4912 **** /* If we are doing svr4-abi, sp move is done by function_prologue. */ ! if (!TARGET_ABICALLS) { if (tsize > 32767) --- 5019,5023 ---- /* If we are doing svr4-abi, sp move is done by function_prologue. */ ! if (!TARGET_ABICALLS || (ABI_64BIT && mips_isa >= 3)) { if (tsize > 32767) *************** *** 4934,4937 **** --- 5045,5051 ---- emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx)); } + + if (TARGET_ABICALLS && (ABI_64BIT && mips_isa >= 3)) + emit_insn (gen_loadgp (XEXP (DECL_RTL (current_function_decl), 0))); } *************** *** 5054,5058 **** load_only_r31 = (((current_frame_info.mask ! & ~ (TARGET_ABICALLS ? PIC_OFFSET_TABLE_MASK : 0)) == RA_MASK) && current_frame_info.fmask == 0); --- 5168,5173 ---- load_only_r31 = (((current_frame_info.mask ! & ~ (TARGET_ABICALLS && ! (ABI_64BIT && mips_isa >= 3) ! ? PIC_OFFSET_TABLE_MASK : 0)) == RA_MASK) && current_frame_info.fmask == 0); *************** *** 5291,5295 **** /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ ! rdata_section (); } else --- 5406,5410 ---- /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ ! READONLY_DATA_SECTION (); } else *************** *** 5300,5306 **** if (GET_MODE_SIZE (mode) <= mips_section_threshold && mips_section_threshold > 0) ! sdata_section (); else ! rdata_section (); } } --- 5415,5421 ---- if (GET_MODE_SIZE (mode) <= mips_section_threshold && mips_section_threshold > 0) ! SMALL_DATA_SECTION (); else ! READONLY_DATA_SECTION (); } } *************** *** 5330,5334 **** if possible, in order to reduce RAM usage. */ ! if (((TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) && DECL_INITIAL (decl) && (DECL_INITIAL (decl) == error_mark_node --- 5445,5450 ---- if possible, in order to reduce RAM usage. */ ! if (((TREE_CODE (decl) == VAR_DECL ! && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) && DECL_INITIAL (decl) && (DECL_INITIAL (decl) == error_mark_node *************** *** 5339,5345 **** || !flag_writable_strings))) && ! (flag_pic && reloc)) ! rdata_section (); else if (size > 0 && size <= mips_section_threshold) ! sdata_section (); else data_section (); --- 5455,5461 ---- || !flag_writable_strings))) && ! (flag_pic && reloc)) ! READONLY_DATA_SECTION (); else if (size > 0 && size <= mips_section_threshold) ! SMALL_DATA_SECTION (); else data_section (); *************** *** 5351,5356 **** if (size > 0 && size <= mips_section_threshold) ! sdata_section (); ! else if (((TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) && DECL_INITIAL (decl) && (DECL_INITIAL (decl) == error_mark_node --- 5467,5473 ---- if (size > 0 && size <= mips_section_threshold) ! SMALL_DATA_SECTION (); ! else if (((TREE_CODE (decl) == VAR_DECL ! && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) && DECL_INITIAL (decl) && (DECL_INITIAL (decl) == error_mark_node *************** *** 5361,5367 **** || !flag_writable_strings))) && ! (flag_pic && reloc)) ! rdata_section (); else data_section (); } } --- 5478,5617 ---- || !flag_writable_strings))) && ! (flag_pic && reloc)) ! READONLY_DATA_SECTION (); else data_section (); } + } + + #if ABI_64BIT + /* Support functions for the 64 bit ABI. */ + + /* Return the register to be used for word INDEX of a variable with type TYPE + being passed starting at general purpose reg REGNO. + + If the word being passed is a single field of a structure which has type + double, then pass it in a floating point reg instead of a general purpose + reg. Otherwise, we return the default value REGNO + INDEX. */ + + rtx + type_dependent_reg (regno, index, type) + int regno; + int index; + tree type; + { + tree field; + tree offset; + + /* If type isn't a structure type, return the default value now. */ + if (! type || TREE_CODE (type) != RECORD_TYPE || mips_isa < 3) + return gen_rtx (REG, word_mode, regno + index); + + /* Iterate through the structure fields to find which one corresponds to + this index. */ + offset = size_int (index * BITS_PER_WORD); + for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) + { + if (! tree_int_cst_lt (DECL_FIELD_BITPOS (field), offset)) + break; + } + + if (field && tree_int_cst_equal (DECL_FIELD_BITPOS (field), offset) + && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE + && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD) + return gen_rtx (REG, DFmode, + regno + index + FP_ARG_FIRST - GP_ARG_FIRST); + else + return gen_rtx (REG, word_mode, regno + index); + } + + /* Return register to use for a function return value with VALTYPE for function + FUNC. */ + + rtx + mips_function_value (valtype, func) + tree valtype; + tree func; + { + int reg = GP_RETURN; + enum machine_mode mode = TYPE_MODE (valtype); + enum mode_class mclass = GET_MODE_CLASS (mode); + + if (mclass == MODE_FLOAT || mclass == MODE_COMPLEX_FLOAT) + reg = FP_RETURN; + else if (TREE_CODE (valtype) == RECORD_TYPE && mips_isa >= 3) + { + /* A struct with only one or two floating point fields is returned in + the floating point registers. */ + tree field; + int i; + + for (i = 0, field = TYPE_FIELDS (valtype); field; + field = TREE_CHAIN (field), i++) + { + if (TREE_CODE (TREE_TYPE (field)) != REAL_TYPE || i >= 2) + break; + } + + if (! field) + reg = FP_RETURN; + } + + return gen_rtx (REG, mode, reg); + } + #endif + + /* This function returns the register class required for a secondary + register when copying between one of the registers in CLASS, and X, + using MODE. If IN_P is nonzero, the copy is going from X to the + register, otherwise the register is the source. A return value of + NO_REGS means that no secondary register is required. */ + + enum reg_class + mips_secondary_reload_class (class, mode, x, in_p) + enum reg_class class; + enum machine_mode mode; + rtx x; + int in_p; + { + int regno = -1; + + if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG) + regno = true_regnum (x); + + /* We always require a general register when copying anything to + HILO_REGNUM, except when copying an SImode value from HILO_REGNUM + to a general register, or when copying from register 0. */ + if (class == HILO_REG && regno != GP_REG_FIRST + 0) + { + if (! in_p + && GP_REG_P (regno) + && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (SImode)) + return NO_REGS; + return GR_REGS; + } + if (regno == HILO_REGNUM) + { + if (in_p + && class == GR_REGS + && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (SImode)) + return NO_REGS; + return GR_REGS; + } + + /* Copying from HI or LO to anywhere other than a general register + requires a general register. */ + if (class == HI_REG || class == LO_REG || class == MD_REGS) + { + if (GP_REG_P (regno)) + return NO_REGS; + return GR_REGS; + } + if (MD_REG_P (regno)) + { + if (class == GR_REGS) + return NO_REGS; + return GR_REGS; + } + + return NO_REGS; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/mips.h gcc-2.7.0/config/mips/mips.h *** gcc-2.6.3/config/mips/mips.h Tue Oct 18 16:14:34 1994 --- gcc-2.7.0/config/mips/mips.h Thu Jun 15 15:32:41 1995 *************** *** 4,8 **** 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and Brendan Eich, brendan@microunity.com. ! Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 4,8 ---- 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and Brendan Eich, brendan@microunity.com. ! Copyright (C) 1989, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 20,32 **** 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. */ - /* Make Saber happier on obstack.[ch]. */ - #if defined(__mips__) || defined(mips) - #define __PTR_TO_INT(P) ((int)(P)) - #define __INT_TO_PTR(P) ((char *)(P)) - #endif - /* Standard GCC variables that we reference. */ --- 20,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Standard GCC variables that we reference. */ *************** *** 72,76 **** PROCESSOR_R6000, PROCESSOR_R4000, ! PROCESSOR_R4600 }; --- 67,73 ---- PROCESSOR_R6000, PROCESSOR_R4000, ! PROCESSOR_R4600, ! PROCESSOR_R4650, ! PROCESSOR_R8000 }; *************** *** 106,109 **** --- 103,107 ---- extern int file_in_function_warning; /* warning given about .file in func */ extern int sdb_label_count; /* block start/end next label # */ + extern int sdb_begin_function_line; /* Starting Line of current function */ extern int mips_section_threshold; /* # bytes of data/sdata cutoff */ extern int g_switch_value; /* value of the -G xx switch */ *************** *** 122,126 **** extern int mips_isa; /* architectural level */ extern char *mips_cpu_string; /* for -mcpu= */ ! extern char *mips_isa_string; /* for -mips{1,2,3} */ extern int dslots_load_total; /* total # load related delay slots */ extern int dslots_load_filled; /* # filled load delay slots */ --- 120,124 ---- extern int mips_isa; /* architectural level */ extern char *mips_cpu_string; /* for -mcpu= */ ! extern char *mips_isa_string; /* for -mips{1,2,3,4} */ extern int dslots_load_total; /* total # load related delay slots */ extern int dslots_load_filled; /* # filled load delay slots */ *************** *** 186,190 **** extern int uns_arith_operand (); extern struct rtx_def * embedded_pic_offset (); - extern void mips_finalize_pic (); /* Recognition functions that return if a condition is true. */ --- 184,187 ---- *************** *** 260,266 **** #define MASK_EMBEDDED_PIC 0x00004000 /* Generate embedded PIC code */ #define MASK_EMBEDDED_DATA 0x00008000 /* Reduce RAM usage, not fast code */ ! #define MASK_UNUSED4 0x00010000 ! #define MASK_UNUSED3 0x00020000 ! #define MASK_UNUSED2 0x00040000 #define MASK_UNUSED1 0x00080000 --- 257,263 ---- #define MASK_EMBEDDED_PIC 0x00004000 /* Generate embedded PIC code */ #define MASK_EMBEDDED_DATA 0x00008000 /* Reduce RAM usage, not fast code */ ! #define MASK_BIG_ENDIAN 0x00010000 /* Generate big endian code */ ! #define MASK_SINGLE_FLOAT 0x00020000 /* Only single precision FPU. */ ! #define MASK_MAD 0x00040000 /* Generate mad/madu as on 4650. */ #define MASK_UNUSED1 0x00080000 *************** *** 339,342 **** --- 336,347 ---- #define TARGET_EMBEDDED_DATA (target_flags & MASK_EMBEDDED_DATA) + /* generate big endian code. */ + #define TARGET_BIG_ENDIAN (target_flags & MASK_BIG_ENDIAN) + + #define TARGET_SINGLE_FLOAT (target_flags & MASK_SINGLE_FLOAT) + #define TARGET_DOUBLE_FLOAT (! TARGET_SINGLE_FLOAT) + + #define TARGET_MAD (target_flags & MASK_MAD) + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** *** 379,382 **** --- 384,394 ---- {"embedded-data", MASK_EMBEDDED_DATA}, \ {"no-embedded-data", -MASK_EMBEDDED_DATA}, \ + {"eb", MASK_BIG_ENDIAN}, \ + {"el", -MASK_BIG_ENDIAN}, \ + {"single-float", MASK_SINGLE_FLOAT}, \ + {"double-float", -MASK_SINGLE_FLOAT}, \ + {"mad", MASK_MAD}, \ + {"no-mad", -MASK_MAD}, \ + {"4650", MASK_MAD | MASK_SINGLE_FLOAT}, \ {"debug", MASK_DEBUG}, \ {"debuga", MASK_DEBUG_A}, \ *************** *** 390,394 **** {"debugi", MASK_DEBUG_I}, \ {"debugj", MASK_DEBUG_J}, \ ! {"", TARGET_DEFAULT | TARGET_CPU_DEFAULT} \ } --- 402,408 ---- {"debugi", MASK_DEBUG_I}, \ {"debugj", MASK_DEBUG_J}, \ ! {"", (TARGET_DEFAULT \ ! | TARGET_CPU_DEFAULT \ ! | TARGET_ENDIAN_DEFAULT)} \ } *************** *** 403,406 **** --- 417,428 ---- #endif + #ifndef TARGET_ENDIAN_DEFAULT + #ifndef DECSTATION + #define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN + #else + #define TARGET_ENDIAN_DEFAULT 0 + #endif + #endif + /* This macro is similar to `TARGET_SWITCHES' but defines names of command options that have values. Its definition is an *************** *** 432,437 **** #define HAVE_SQRT_P() (mips_isa >= 2) ! /* CC1_SPEC causes -mips3 to set -mfp64 and -mgp64; -mips1 or -mips2 ! sets -mfp32 and -mgp32. This can be overridden by an explicit -mfp32, -mfp64, -mgp32 or -mgp64. -mfp64 sets MASK_FLOAT64 in target_flags, and -mgp64 sets MASK_64BIT. --- 454,459 ---- #define HAVE_SQRT_P() (mips_isa >= 2) ! /* CC1_SPEC causes -mips3 and -mips4 to set -mfp64 and -mgp64; -mips1 or ! -mips2 sets -mfp32 and -mgp32. This can be overridden by an explicit -mfp32, -mfp64, -mgp32 or -mgp64. -mfp64 sets MASK_FLOAT64 in target_flags, and -mgp64 sets MASK_64BIT. *************** *** 501,507 **** --- 523,533 ---- fixed_regs[regno] = call_used_regs[regno] = 1; \ } \ + SUBTARGET_CONDITIONAL_REGISTER_USAGE \ } \ while (0) + /* This is meant to be redefined in the host dependent files */ + #define SUBTARGET_CONDITIONAL_REGISTER_USAGE + /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP *************** *** 561,566 **** %{K}} \ %{!mmips-as: \ ! %{mcpu=*}} \ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \ %{noasmopt:-O0} \ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ --- 587,592 ---- %{K}} \ %{!mmips-as: \ ! %{mcpu=*} %{m4650} %{mmad:-m4650}} \ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{v} \ %{noasmopt:-O0} \ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ *************** *** 580,585 **** %{K}} \ %{mgas: \ ! %{mcpu=*}} \ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \ %{noasmopt:-O0} \ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ --- 606,611 ---- %{K}} \ %{mgas: \ ! %{mcpu=*} %{m4650} %{mmad:-m4650}} \ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{v} \ %{noasmopt:-O0} \ %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ *************** *** 639,643 **** #ifndef LINK_SPEC #define LINK_SPEC "\ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ %{bestGnum} %{shared} %{non_shared}" #endif /* LINK_SPEC defined */ --- 665,669 ---- #ifndef LINK_SPEC #define LINK_SPEC "\ ! %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ %{bestGnum} %{shared} %{non_shared}" #endif /* LINK_SPEC defined */ *************** *** 648,653 **** #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ ! %{mips1:-mfp32 -mgp32}%{mips2:-mfp32 -mgp32}%{mips3:-mfp64 -mgp64} \ ! %{G*} \ %{pic-none: -mno-half-pic} \ %{pic-lib: -mhalf-pic} \ --- 674,684 ---- #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ ! %{mips1:-mfp32 -mgp32}%{mips2:-mfp32 -mgp32}\ ! %{mips3:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \ ! %{mips4:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} \ ! %{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} \ ! %{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} \ ! %{m4650:-mcpu=r4650} \ ! %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \ %{pic-none: -mno-half-pic} \ %{pic-lib: -mhalf-pic} \ *************** *** 670,674 **** %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3}" #endif --- 701,708 ---- %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3} \ ! %{mips4:-U__mips -D__mips=4} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" #endif *************** *** 723,726 **** --- 757,775 ---- #define ASM_STABD_OP ((TARGET_GAS) ? ".stabd" : " #.stabd") + /* Local compiler-generated symbols must have a prefix that the assembler + understands. By default, this is $, although some targets (e.g., + NetBSD-ELF) need to override this. */ + + #ifndef LOCAL_LABEL_PREFIX + #define LOCAL_LABEL_PREFIX "$" + #endif + + /* By default on the mips, external symbols do not have an underscore + prepended, but some targets (e.g., NetBSD) require this. */ + + #ifndef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + #endif + /* Forward references to tags are allowed. */ #define SDB_ALLOW_FORWARD_REFERENCES *************** *** 840,846 **** extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ ! "$Lb%d:\n\t%s.begin\t$Lb%d\t%d\n", \ sdb_label_count, \ (TARGET_GAS) ? "" : "#", \ sdb_label_count, \ (LINE)); \ --- 889,897 ---- extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ ! "%sLb%d:\n\t%s.begin\t%sLb%d\t%d\n", \ ! LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (TARGET_GAS) ? "" : "#", \ + LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (LINE)); \ *************** *** 852,858 **** extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ ! "$Le%d:\n\t%s.bend\t$Le%d\t%d\n", \ sdb_label_count, \ (TARGET_GAS) ? "" : "#", \ sdb_label_count, \ (LINE)); \ --- 903,911 ---- extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ ! "%sLe%d:\n\t%s.bend\t%sLe%d\t%d\n", \ ! LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (TARGET_GAS) ? "" : "#", \ + LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (LINE)); \ *************** *** 862,866 **** #define PUT_SDB_FUNCTION_START(LINE) ! #define PUT_SDB_FUNCTION_END(LINE) #define PUT_SDB_EPILOGUE_END(NAME) --- 915,923 ---- #define PUT_SDB_FUNCTION_START(LINE) ! #define PUT_SDB_FUNCTION_END(LINE) \ ! do { \ ! extern FILE *asm_out_text_file; \ ! ASM_OUTPUT_SOURCE_LINE (asm_out_text_file, LINE + sdb_begin_function_line); \ ! } while (0) #define PUT_SDB_EPILOGUE_END(NAME) *************** *** 901,904 **** --- 958,965 ---- /* Target machine storage layout */ + /* Define in order to support both big and little endian float formats + in the same gcc binary. */ + #define REAL_ARITHMETIC + /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. *************** *** 907,937 **** /* Define this if most significant byte of a word is the lowest numbered. */ ! #ifndef BYTES_BIG_ENDIAN ! #ifndef DECSTATION ! #define BYTES_BIG_ENDIAN 1 ! #else ! #define BYTES_BIG_ENDIAN 0 ! #endif ! #endif /* Define this if most significant word of a multiword number is the lowest. */ ! #ifndef WORDS_BIG_ENDIAN ! #ifndef DECSTATION ! #define WORDS_BIG_ENDIAN 1 ! #else ! #define WORDS_BIG_ENDIAN 0 ! #endif ! #endif ! /* Define macros to easily access the most and least significant words ! without a lot of #ifdef's. */ ! ! #if WORDS_BIG_ENDIAN ! #define MOST_SIGNIFICANT_WORD 0 ! #define LEAST_SIGNIFICANT_WORD 1 ! #else ! #define MOST_SIGNIFICANT_WORD 1 ! #define LEAST_SIGNIFICANT_WORD 0 #endif --- 968,982 ---- /* Define this if most significant byte of a word is the lowest numbered. */ ! #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) /* Define this if most significant word of a multiword number is the lowest. */ ! #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) ! /* Define this to set the endianness to use in libgcc2.c, which can ! not depend on target_flags. */ ! #if !defined(MIPSEL) && !defined(__MIPSEL__) ! #define LIBGCC2_WORDS_BIG_ENDIAN 1 #else ! #define LIBGCC2_WORDS_BIG_ENDIAN 0 #endif *************** *** 948,952 **** /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) ! #define MAX_UNITS_PER_WORD 8 /* For MIPS, width of a floating point register. */ --- 993,997 ---- /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4) ! #define MIN_UNITS_PER_WORD 4 /* For MIPS, width of a floating point register. */ *************** *** 1118,1125 **** even those that are not normally considered general registers. ! On the Mips, we have 32 integer registers, 32 floating point registers ! and the special registers hi, lo, and fp status. */ ! #define FIRST_PSEUDO_REGISTER 67 /* 1 for registers that have pervasive standard uses --- 1163,1173 ---- even those that are not normally considered general registers. ! On the Mips, we have 32 integer registers, 32 floating point ! registers and the special registers hi, lo, hilo, and fp status. ! The hilo register is only used in 64 bit mode. It represents a 64 ! bit value stored as two 32 bit values in the hi and lo registers; ! this is the result of the mult instruction. */ ! #define FIRST_PSEUDO_REGISTER 68 /* 1 for registers that have pervasive standard uses *************** *** 1134,1138 **** 0, 0, 0, 0, 0, 0, 0, 0, 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 \ } --- 1182,1186 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 \ } *************** *** 1151,1155 **** 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, \ ! 1, 1, 1 \ } --- 1199,1203 ---- 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, \ ! 1, 1, 1, 1 \ } *************** *** 1157,1164 **** /* Internal macros to classify a register number as to whether it's a general purpose register, a floating point register, a ! multiply/divide register, or a status register. ! ! The macro FP_CALL_REG_P also allows registers $4 and $6 as floating ! point registers to pass floating point as per MIPS spec. */ #define GP_REG_FIRST 0 --- 1205,1209 ---- /* Internal macros to classify a register number as to whether it's a general purpose register, a floating point register, a ! multiply/divide register, or a status register. */ #define GP_REG_FIRST 0 *************** *** 1173,1181 **** #define MD_REG_FIRST 64 ! #define MD_REG_LAST 65 #define MD_REG_NUM (MD_REG_LAST - MD_REG_FIRST + 1) ! #define ST_REG_FIRST 66 ! #define ST_REG_LAST 66 #define ST_REG_NUM (ST_REG_LAST - ST_REG_FIRST + 1) --- 1218,1226 ---- #define MD_REG_FIRST 64 ! #define MD_REG_LAST 66 #define MD_REG_NUM (MD_REG_LAST - MD_REG_FIRST + 1) ! #define ST_REG_FIRST 67 ! #define ST_REG_LAST 67 #define ST_REG_NUM (ST_REG_LAST - ST_REG_FIRST + 1) *************** *** 1183,1186 **** --- 1228,1232 ---- #define HI_REGNUM (MD_REG_FIRST + 0) #define LO_REGNUM (MD_REG_FIRST + 1) + #define HILO_REGNUM (MD_REG_FIRST + 2) #define FPSW_REGNUM ST_REG_FIRST *************** *** 1190,1198 **** #define ST_REG_P(REGNO) ((REGNO) == ST_REG_FIRST) - #define FP_CALL_REG_P(REGNO) \ - (FP_REG_P (REGNO) \ - || (REGNO) == (4 + GP_REG_FIRST) \ - || (REGNO) == (6 + GP_REG_FIRST)) - /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. --- 1236,1239 ---- *************** *** 1207,1211 **** (! FP_REG_P (REGNO) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) \ ! : (((GET_MODE_SIZE (MODE) + 7) / 8) << (TARGET_FLOAT64 == 0))) /* Value is 1 if hard register REGNO can hold a value of machine-mode --- 1248,1254 ---- (! FP_REG_P (REGNO) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) \ ! : (TARGET_SINGLE_FLOAT \ ! ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FPREG - 1) / UNITS_PER_FPREG) \ ! : (((GET_MODE_SIZE (MODE) + 7) / 8) << (TARGET_FLOAT64 == 0)))) /* Value is 1 if hard register REGNO can hold a value of machine-mode *************** *** 1273,1280 **** scratch register set, and not used for passing and returning arguments and any other information used in the calling sequence ! (such as pic). */ ! #define MIPS_TEMP1_REGNUM (GP_REG_FIRST + 8) ! #define MIPS_TEMP2_REGNUM (GP_REG_FIRST + 9) /* Define this macro if it is as good or better to call a constant --- 1316,1324 ---- scratch register set, and not used for passing and returning arguments and any other information used in the calling sequence ! (such as pic). Must start at 12, since t0/t3 are parameter passing ! registers in the 64 bit ABI. */ ! #define MIPS_TEMP1_REGNUM (GP_REG_FIRST + 12) ! #define MIPS_TEMP2_REGNUM (GP_REG_FIRST + 13) /* Define this macro if it is as good or better to call a constant *************** *** 1298,1302 **** #define PIC_FUNCTION_ADDR_REGNUM (GP_REG_FIRST + 25) ! #define FINALIZE_PIC mips_finalize_pic () /* Define the classes of registers for register constraints in the --- 1342,1349 ---- #define PIC_FUNCTION_ADDR_REGNUM (GP_REG_FIRST + 25) ! /* Initialize embedded_pic_fnaddr_rtx before RTL generation for ! each function. We used to do this in FINALIZE_PIC, but FINALIZE_PIC ! isn't always called for static inline functions. */ ! #define INIT_EXPANDERS embedded_pic_fnaddr_rtx = NULL; /* Define the classes of registers for register constraints in the *************** *** 1327,1330 **** --- 1374,1378 ---- HI_REG, /* hi register */ LO_REG, /* lo register */ + HILO_REG, /* hilo register pair for 64 bit mode mult */ MD_REGS, /* multiply/divide registers (hi/lo) */ ST_REGS, /* status registers (fp status) */ *************** *** 1348,1351 **** --- 1396,1400 ---- "HI_REG", \ "LO_REG", \ + "HILO_REG", \ "MD_REGS", \ "ST_REGS", \ *************** *** 1371,1377 **** { 0x00000000, 0x00000000, 0x00000001 }, /* hi register */ \ { 0x00000000, 0x00000000, 0x00000002 }, /* lo register */ \ { 0x00000000, 0x00000000, 0x00000003 }, /* mul/div registers */ \ ! { 0x00000000, 0x00000000, 0x00000004 }, /* status registers */ \ ! { 0xffffffff, 0xffffffff, 0x00000007 } /* all registers */ \ } --- 1420,1427 ---- { 0x00000000, 0x00000000, 0x00000001 }, /* hi register */ \ { 0x00000000, 0x00000000, 0x00000002 }, /* lo register */ \ + { 0x00000000, 0x00000000, 0x00000004 }, /* hilo register */ \ { 0x00000000, 0x00000000, 0x00000003 }, /* mul/div registers */ \ ! { 0x00000000, 0x00000000, 0x00000008 }, /* status registers */ \ ! { 0xffffffff, 0xffffffff, 0x0000000f } /* all registers */ \ } *************** *** 1413,1417 **** 'l' Lo register 'x' Multiply/divide registers ! 'z' FP Status register */ extern enum reg_class mips_char_to_class[]; --- 1463,1469 ---- 'l' Lo register 'x' Multiply/divide registers ! 'a' HILO_REG ! 'z' FP Status register ! 'b' All registers */ extern enum reg_class mips_char_to_class[]; *************** *** 1447,1457 **** `P' is used for positive 16 bit constants. */ ! #define SMALL_INT(X) ((unsigned) (INTVAL (X) + 0x8000) < 0x10000) ! #define SMALL_INT_UNSIGNED(X) ((unsigned) (INTVAL (X)) < 0x10000) #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'I' ? ((unsigned) ((VALUE) + 0x8000) < 0x10000) \ : (C) == 'J' ? ((VALUE) == 0) \ ! : (C) == 'K' ? ((unsigned) (VALUE) < 0x10000) \ : (C) == 'L' ? (((VALUE) & 0x0000ffff) == 0 \ && (((VALUE) & ~2147483647) == 0 \ --- 1499,1509 ---- `P' is used for positive 16 bit constants. */ ! #define SMALL_INT(X) ((unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000) ! #define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (INTVAL (X)) < 0x10000) #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'I' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000) \ : (C) == 'J' ? ((VALUE) == 0) \ ! : (C) == 'K' ? ((unsigned HOST_WIDE_INT) (VALUE) < 0x10000) \ : (C) == 'L' ? (((VALUE) & 0x0000ffff) == 0 \ && (((VALUE) & ~2147483647) == 0 \ *************** *** 1530,1533 **** --- 1582,1597 ---- || (CLASS2 == GR_REGS && CLASS1 == FP_REGS)))) + /* The HI and LO registers can only be reloaded via the general + registers. */ + + #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ + mips_secondary_reload_class (CLASS, MODE, X, 1) + #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ + mips_secondary_reload_class (CLASS, MODE, X, 0) + + /* Not declared above, with the other functions, because enum + reg_class is not declared yet. */ + extern enum reg_class mips_secondary_reload_class (); + /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */ *************** *** 1559,1562 **** --- 1623,1630 ---- /* Stack layout; function entry, exit and calling. */ + /* Don't enable support for the 64 bit ABI calling convention. + Some embedded code depends on the old 64 bit calling convention. */ + #define ABI_64BIT 0 + /* Define this if pushing a word on the stack makes the stack pointer a smaller address. */ *************** *** 1742,1746 **** are a0 (a2,a3), but we should push over a1... */ ! #define REG_PARM_STACK_SPACE(FNDECL) ((4*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL)) /* Define this if it is the responsibility of the caller to --- 1810,1815 ---- are a0 (a2,a3), but we should push over a1... */ ! #define REG_PARM_STACK_SPACE(FNDECL) \ ! ((MAX_ARGS_IN_REGISTERS*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL)) /* Define this if it is the responsibility of the caller to *************** *** 1770,1773 **** --- 1839,1844 ---- pop them all after the function returns. + FUNDECL is the declaration node of the function (as a tree). + FUNTYPE is a C variable whose value is a tree node that describes the function in question. Normally it is a node of *************** *** 1789,1793 **** calling function. */ ! #define RETURN_POPS_ARGS(FUNTYPE, SIZE) 0 --- 1860,1864 ---- calling function. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 *************** *** 1812,1818 **** #define LIBCALL_VALUE(MODE) \ gen_rtx (REG, MODE, \ ! (GET_MODE_CLASS (MODE) == MODE_FLOAT) \ ! ? FP_RETURN \ ! : GP_RETURN) /* Define how to find the value returned by a function. --- 1883,1891 ---- #define LIBCALL_VALUE(MODE) \ gen_rtx (REG, MODE, \ ! ((GET_MODE_CLASS (MODE) == MODE_FLOAT \ ! && (! TARGET_SINGLE_FLOAT \ ! || GET_MODE_SIZE (MODE) <= 4)) \ ! ? FP_RETURN \ ! : GP_RETURN)) /* Define how to find the value returned by a function. *************** *** 2256,2260 **** --- 2329,2336 ---- with a register. That requires an additional \ instruction. */ \ + /* ??? Reject combining an address with a register for the MIPS \ + 64 bit ABI, because the SGI assembler can not handle this. */ \ if (!TARGET_DEBUG_A_MODE \ + && ! ABI_64BIT \ && CONSTANT_ADDRESS_P (xplus1) \ && (!TARGET_EMBEDDED_PIC \ *************** *** 2279,2287 **** case $at is already in use. We convert such problem addresses to `la $5,s;sw $4,70000($5)' via LEGITIMIZE_ADDRESS. */ #define CONSTANT_ADDRESS_P(X) \ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \ || (GET_CODE (X) == CONST \ ! && ! (flag_pic && pic_address_needs_scratch (X)))) \ && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X))) --- 2355,2365 ---- case $at is already in use. We convert such problem addresses to `la $5,s;sw $4,70000($5)' via LEGITIMIZE_ADDRESS. */ + /* ??? SGI Irix 6 assembler fails for CONST address, so reject them. */ #define CONSTANT_ADDRESS_P(X) \ ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \ || (GET_CODE (X) == CONST \ ! && ! (flag_pic && pic_address_needs_scratch (X)) \ ! && ! ABI_64BIT)) \ && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X))) *************** *** 2298,2304 **** grok li.d Infinity. */ #define LEGITIMATE_CONSTANT_P(X) \ ! (GET_CODE (X) != CONST_DOUBLE || mips_const_double_ok (X, GET_MODE (X))) ! /* A C compound statement that attempts to replace X with a valid --- 2376,2384 ---- grok li.d Infinity. */ + /* ??? SGI Irix 6 assembler fails for CONST address, so reject them. */ #define LEGITIMATE_CONSTANT_P(X) \ ! ((GET_CODE (X) != CONST_DOUBLE \ ! || mips_const_double_ok (X, GET_MODE (X))) \ ! && ! (GET_CODE (X) == CONST && ABI_64BIT)) /* A C compound statement that attempts to replace X with a valid *************** *** 2351,2354 **** --- 2431,2452 ---- } \ \ + if (GET_CODE (xinsn) == CONST \ + && ((flag_pic && pic_address_needs_scratch (xinsn)) \ + /* ??? SGI's Irix 6 assembler can't handle CONST. */ \ + || ABI_64BIT)) \ + { \ + rtx ptr_reg = gen_reg_rtx (Pmode); \ + rtx constant = XEXP (XEXP (xinsn, 0), 1); \ + \ + emit_move_insn (ptr_reg, XEXP (XEXP (xinsn, 0), 0)); \ + \ + X = gen_rtx (PLUS, Pmode, ptr_reg, constant); \ + if (SMALL_INT (constant)) \ + goto WIN; \ + /* Otherwise we fall through so the code below will fix the \ + constant. */ \ + xinsn = X; \ + } \ + \ if (GET_CODE (xinsn) == PLUS) \ { \ *************** *** 2385,2398 **** } \ \ - if (flag_pic && pic_address_needs_scratch (xinsn)) \ - { \ - rtx ptr_reg = gen_reg_rtx (Pmode); \ - \ - emit_move_insn (ptr_reg, XEXP (XEXP (xinsn, 0), 0)); \ - \ - X = gen_rtx (PLUS, Pmode, ptr_reg, XEXP (XEXP (xinsn, 0), 1)); \ - goto WIN; \ - } \ - \ if (TARGET_DEBUG_B_MODE) \ GO_PRINTF ("LEGITIMIZE_ADDRESS could not fix.\n"); \ --- 2483,2486 ---- *************** *** 2603,2609 **** \ case CONST_DOUBLE: \ ! return COSTS_N_INSNS ((CONST_DOUBLE_HIGH (X) == 0 \ ! && CONST_DOUBLE_LOW (X)) ? 2 : 4); ! /* Like `CONST_COSTS' but applies to nonconstant RTL expressions. --- 2691,2701 ---- \ case CONST_DOUBLE: \ ! { \ ! rtx high, low; \ ! split_double (X, &high, &low); \ ! return COSTS_N_INSNS ((high == CONST0_RTX (GET_MODE (high)) \ ! || low == CONST0_RTX (GET_MODE (low))) \ ! ? 2 : 4); \ ! } /* Like `CONST_COSTS' but applies to nonconstant RTL expressions. *************** *** 2620,2623 **** --- 2712,2716 ---- compiler is doing. */ + /* ??? Fix this to be right for the R8000. */ #define RTX_COSTS(X,CODE,OUTER_CODE) \ case MEM: \ *************** *** 2816,2821 **** : (FROM) == GR_REGS && (TO) == FP_REGS ? 4 \ : (FROM) == FP_REGS && (TO) == GR_REGS ? 4 \ ! : 6) #define MEMORY_MOVE_COST(MODE) \ ((mips_cpu == PROCESSOR_R4000 || mips_cpu == PROCESSOR_R6000) ? 6 : 4) --- 2909,2921 ---- : (FROM) == GR_REGS && (TO) == FP_REGS ? 4 \ : (FROM) == FP_REGS && (TO) == GR_REGS ? 4 \ ! : (((FROM) == HI_REG || (FROM) == LO_REG \ ! || (FROM) == MD_REGS || (FROM) == HILO_REG) \ ! && (TO) == GR_REGS) ? 6 \ ! : (((TO) == HI_REG || (TO) == LO_REG \ ! || (TO) == MD_REGS || (FROM) == HILO_REG) \ ! && (FROM) == GR_REGS) ? 6 \ ! : 12) + /* ??? Fix this to be right for the R8000. */ #define MEMORY_MOVE_COST(MODE) \ ((mips_cpu == PROCESSOR_R4000 || mips_cpu == PROCESSOR_R6000) ? 6 : 4) *************** *** 2824,2827 **** --- 2924,2928 ---- 1 is the default; other values are interpreted relative to that. */ + /* ??? Fix this to be right for the R8000. */ #define BRANCH_COST \ ((mips_cpu == PROCESSOR_R4000 || mips_cpu == PROCESSOR_R6000) ? 2 : 1) *************** *** 3025,3028 **** --- 3126,3130 ---- &mips_reg_names[65][0], \ &mips_reg_names[66][0], \ + &mips_reg_names[67][0], \ } *************** *** 3039,3043 **** "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", \ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", \ ! "hi", "lo", "$fcr31" \ } --- 3141,3145 ---- "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23", \ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31", \ ! "hi", "lo", "accum","$fcr31" \ } *************** *** 3221,3224 **** --- 3323,3336 ---- mips_output_filename (STREAM, NAME) + /* This is defined so that it can be overridden in iris6.h. */ + #define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \ + do \ + { \ + fprintf (STREAM, "\t.file\t%d ", NUM_SOURCE_FILENAMES); \ + output_quoted_string (STREAM, NAME); \ + fputs ("\n", STREAM); \ + } \ + while (0) + /* This is how to output a note the debugger telling it the line number to which the following sequence of instructions corresponds. *************** *** 3323,3327 **** extern FILE *asm_out_text_file; \ if (TARGET_GP_OPT) \ ! STREAM = asm_out_text_file; \ \ current_function_name = NAME; \ --- 3435,3449 ---- extern FILE *asm_out_text_file; \ if (TARGET_GP_OPT) \ ! { \ ! STREAM = asm_out_text_file; \ ! /* ??? text_section gets called too soon. If the previous \ ! function is in a special section and we're not, we have \ ! to switch back to the text section. We can't call \ ! text_section again as gcc thinks we're already there. */ \ ! /* ??? See varasm.c. There are other things that get output \ ! too early, like alignment (before we've switched STREAM). */ \ ! if (DECL_SECTION_NAME (DECL) == NULL_TREE) \ ! fprintf (STREAM, "%s\n", TEXT_SECTION_ASM_OP); \ ! } \ \ current_function_name = NAME; \ *************** *** 3332,3336 **** `assemble_name' uses this. */ ! #define ASM_OUTPUT_LABELREF(STREAM,NAME) fprintf (STREAM, "%s", NAME) /* This is how to output an internal numbered label where --- 3454,3459 ---- `assemble_name' uses this. */ ! #define ASM_OUTPUT_LABELREF(STREAM,NAME) \ ! fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, NAME) /* This is how to output an internal numbered label where *************** *** 3338,3342 **** #define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM) \ ! fprintf (STREAM, "$%s%d:\n", PREFIX, NUM) /* This is how to store into the string LABEL --- 3461,3465 ---- #define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM) \ ! fprintf (STREAM, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM) /* This is how to store into the string LABEL *************** *** 3346,3350 **** #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. */ --- 3469,3473 ---- #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ ! sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM) /* This is how to output an assembler line defining a `double' constant. */ *************** *** 3410,3415 **** #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ ! fprintf (STREAM, "\t%s\t$L%d\n", \ TARGET_LONG64 ? ".dword" : ".word", \ VALUE) --- 3533,3539 ---- #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ ! fprintf (STREAM, "\t%s\t%sL%d\n", \ TARGET_LONG64 ? ".dword" : ".word", \ + LOCAL_LABEL_PREFIX, \ VALUE) *************** *** 3421,3430 **** do { \ if (TARGET_EMBEDDED_PIC) \ ! fprintf (STREAM, "\t%s\t$L%d-$LS%d\n", \ TARGET_LONG64 ? ".dword" : ".word", \ ! VALUE, REL); \ ! else \ ! fprintf (STREAM, "\t%s\t$L%d\n", \ TARGET_LONG64 ? ".gpdword" : ".gpword", \ VALUE); \ } while (0) --- 3545,3559 ---- do { \ if (TARGET_EMBEDDED_PIC) \ ! fprintf (STREAM, "\t%s\t%sL%d-%sLS%d\n", \ TARGET_LONG64 ? ".dword" : ".word", \ ! LOCAL_LABEL_PREFIX, VALUE, LOCAL_LABEL_PREFIX, REL); \ ! else if (! ABI_64BIT) \ ! fprintf (STREAM, "\t%s\t%sL%d\n", \ TARGET_LONG64 ? ".gpdword" : ".gpword", \ + LOCAL_LABEL_PREFIX, VALUE); \ + else \ + /* ??? Why does this one use . and not LOCAL_LABEL_PREFIX? */ \ + fprintf (STREAM, "\t%s\t.L%d\n", \ + TARGET_LONG64 ? ".dword" : ".word", \ VALUE); \ } while (0) *************** *** 3553,3556 **** --- 3682,3686 ---- #define RDATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ #define READONLY_DATA_SECTION rdata_section + #define SMALL_DATA_SECTION sdata_section /* What other sections we support other than the normal .data/.text. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/mips.md gcc-2.7.0/config/mips/mips.md *** gcc-2.6.3/config/mips/mips.md Thu Oct 20 16:21:00 1994 --- gcc-2.7.0/config/mips/mips.md Thu Jun 15 16:54:09 1995 *************** *** 4,8 **** ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and ;; Brendan Eich, brendan@microunity.com. ! ;; Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. ;; This file is part of GNU CC. --- 4,8 ---- ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and ;; Brendan Eich, brendan@microunity.com. ! ;; Copyright (C) 1989, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc. ;; This file is part of GNU CC. *************** *** 20,25 **** ;; 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. --- 20,35 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. + ;; ??? MIPS4 has 8 floating point condition codes. This is not supported yet. + + ;; ??? MIPS4 has floating point doubleword/word load/stores that accept a + ;; base+index addressing mode. There are no such load/stores for the integer + ;; registers. This is not supported yet. + + ;; ??? Currently does not have define_function_unit support for the R8000. + ;; Must include new entries for fmadd in addition to existing entries. + *************** *** 46,49 **** --- 56,60 ---- ;; fadd floating point add/subtract ;; fmul floating point multiply + ;; fmadd floating point multiply-add ;; fdiv floating point divide ;; fabs floating point absolute value *************** *** 56,60 **** (define_attr "type" ! "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,idiv,icmp,fadd,fmul,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop" (const_string "unknown")) --- 67,71 ---- (define_attr "type" ! "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop" (const_string "unknown")) *************** *** 82,86 **** ;; (const_string "default")))) ! (define_attr "cpu" "default,r3000,r6000,r4000,r4600" (const (symbol_ref "mips_cpu_attr"))) --- 93,98 ---- ;; (const_string "default")))) ! ;; ??? Fix everything that tests this attribute. ! (define_attr "cpu" "default,r3000,r6000,r4000,r4600,r4650,r8000" (const (symbol_ref "mips_cpu_attr"))) *************** *** 140,148 **** (define_function_unit "memory" 1 0 ! (and (eq_attr "type" "load") (eq_attr "cpu" "!r3000,r4600")) 3 0) (define_function_unit "memory" 1 0 ! (and (eq_attr "type" "load") (eq_attr "cpu" "r3000,r4600")) 2 0) --- 152,160 ---- (define_function_unit "memory" 1 0 ! (and (eq_attr "type" "load") (eq_attr "cpu" "!r3000,r4600,r4650")) 3 0) (define_function_unit "memory" 1 0 ! (and (eq_attr "type" "load") (eq_attr "cpu" "r3000,r4600,r4650")) 2 0) *************** *** 156,160 **** (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (eq_attr "cpu" "!r3000,r4000,r4600")) 17 17) --- 168,172 ---- (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (eq_attr "cpu" "!r3000,r4000,r4600,r4650")) 17 17) *************** *** 168,172 **** (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "idiv") (eq_attr "cpu" "!r3000,r4000,r4600")) 38 38) --- 180,188 ---- (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "imul") (eq_attr "cpu" "r4650")) ! 4 4) ! ! (define_function_unit "imuldiv" 1 0 ! (and (eq_attr "type" "idiv") (eq_attr "cpu" "!r3000,r4000,r4600,r4650")) 38 38) *************** *** 180,183 **** --- 196,203 ---- (define_function_unit "imuldiv" 1 0 + (and (eq_attr "type" "idiv") (eq_attr "cpu" "r4650")) + 36 36) + + (define_function_unit "imuldiv" 1 0 (and (eq_attr "type" "idiv") (eq_attr "cpu" "r4000")) 69 69) *************** *** 204,216 **** (define_function_unit "adder" 1 1 ! (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "!r3000,r4600")) 2 0) (define_function_unit "adder" 1 1 ! (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000,r4600")) 1 0) (define_function_unit "mult" 1 1 ! (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000,r4600"))) 7 0) --- 224,236 ---- (define_function_unit "adder" 1 1 ! (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "!r3000,r4600,r4650")) 2 0) (define_function_unit "adder" 1 1 ! (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000,r4600,r4650")) 1 0) (define_function_unit "mult" 1 1 ! (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000,r4600,r4650"))) 7 0) *************** *** 224,228 **** (define_function_unit "mult" 1 1 ! (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600"))) 8 0) --- 244,248 ---- (define_function_unit "mult" 1 1 ! (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600,r4650"))) 8 0) *************** *** 240,244 **** (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000,r4600"))) 23 0) --- 260,264 ---- (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000,r4600,r4650"))) 23 0) *************** *** 252,260 **** (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600"))) 32 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000,r4600"))) 36 0) --- 272,280 ---- (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600,r4650"))) 32 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000,r4600,r4650"))) 36 0) *************** *** 268,288 **** (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4600"))) 61 0) ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r4600"))) 54 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600"))) 31 0) ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r4600"))) 112 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4600"))) 60 0) --- 288,308 ---- (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4600,r4650"))) 61 0) ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r4600,r4650"))) 54 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r4600,r4650"))) 31 0) ;;; ??? Is this number right? (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r4600,r4650"))) 112 0) (define_function_unit "divide" 1 1 ! (and (eq_attr "type" "fsqrt") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r4600,r4650"))) 60 0) *************** *** 327,331 **** (plus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "add.d\\t%0,%1,%2" [(set_attr "type" "fadd") --- 347,351 ---- (plus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "add.d\\t%0,%1,%2" [(set_attr "type" "fadd") *************** *** 564,568 **** (minus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "sub.d\\t%0,%1,%2" [(set_attr "type" "fadd") --- 584,588 ---- (minus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "sub.d\\t%0,%1,%2" [(set_attr "type" "fadd") *************** *** 788,792 **** (mult:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "mul.d\\t%0,%1,%2" [(set_attr "type" "fmul") --- 808,812 ---- (mult:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "mul.d\\t%0,%1,%2" [(set_attr "type" "fmul") *************** *** 804,814 **** (set_attr "length" "1")]) ! (define_insn "mulsi3" ! [(set (match_operand:SI 0 "register_operand" "=d") (mult:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "register_operand" "d"))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "" "* { --- 824,869 ---- (set_attr "length" "1")]) ! ;; ??? The R4000 (only) has a cpu bug. If a double-word shift executes while ! ;; a multiply is in progress, it may give an incorrect result. Avoid ! ;; this by keeping the mflo with the mult on the R4000. ! ! (define_expand "mulsi3" ! [(set (match_operand:SI 0 "register_operand" "=l") (mult:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "register_operand" "d"))) ! (clobber (match_scratch:SI 3 "=h")) ! (clobber (match_scratch:SI 4 "=a"))] "" + " + { + if (TARGET_MAD) + emit_insn (gen_mulsi3_r4650 (operands[0], operands[1], operands[2])); + else if (mips_cpu != PROCESSOR_R4000) + emit_insn (gen_mulsi3_internal (operands[0], operands[1], operands[2])); + else + emit_insn (gen_mulsi3_r4000 (operands[0], operands[1], operands[2])); + DONE; + }") + + (define_insn "mulsi3_internal" + [(set (match_operand:SI 0 "register_operand" "=l") + (mult:SI (match_operand:SI 1 "register_operand" "d") + (match_operand:SI 2 "register_operand" "d"))) + (clobber (match_scratch:SI 3 "=h")) + (clobber (match_scratch:SI 4 "=a"))] + "mips_cpu != PROCESSOR_R4000" + "mult\\t%1,%2" + [(set_attr "type" "imul") + (set_attr "mode" "SI") + (set_attr "length" "1")]) + + (define_insn "mulsi3_r4000" + [(set (match_operand:SI 0 "register_operand" "=d") + (mult:SI (match_operand:SI 1 "register_operand" "d") + (match_operand:SI 2 "register_operand" "d"))) + (clobber (match_scratch:SI 3 "=h")) + (clobber (match_scratch:SI 4 "=l")) + (clobber (match_scratch:SI 5 "=a"))] + "mips_cpu == PROCESSOR_R4000" "* { *************** *** 826,866 **** (set_attr "length" "3")]) ;; mult + mflo + delay ! ;; ??? The R4000 (only) has a cpu bug. If a double-word shift executes while ! ;; a multiply is in progress, it may give an incorrect result. We solve ! ;; this by not splitting on the r4000. ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (mult:SI (match_operand:SI 1 "register_operand" "") ! (match_operand:SI 2 "register_operand" ""))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] ! "!TARGET_DEBUG_D_MODE && mips_cpu != PROCESSOR_R4000" ! [(parallel [(set (reg:SI 65) ;; low register ! (mult:SI (match_dup 1) ! (match_dup 2))) ! (clobber (reg:SI 64))]) ! (set (match_dup 0) ! (reg:SI 65))] ! "") ! (define_insn "mulsi3_internal" ! [(set (reg:SI 65) ;; low register ! (mult:SI (match_operand:SI 0 "register_operand" "d") ! (match_operand:SI 1 "register_operand" "d"))) ! (clobber (reg:SI 64))] ! "" ! "mult\\t%0,%1" [(set_attr "type" "imul") ! (set_attr "mode" "SI") (set_attr "length" "1")]) ! (define_insn "muldi3" [(set (match_operand:DI 0 "register_operand" "=d") (mult:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "register_operand" "d"))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] ! "TARGET_64BIT" "* { --- 881,933 ---- (set_attr "length" "3")]) ;; mult + mflo + delay ! (define_insn "mulsi3_r4650" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (mult:SI (match_operand:SI 1 "register_operand" "d") ! (match_operand:SI 2 "register_operand" "d"))) ! (clobber (match_scratch:SI 3 "=h")) ! (clobber (match_scratch:SI 4 "=l")) ! (clobber (match_scratch:SI 5 "=a"))] ! "TARGET_MAD" ! "mul\\t%0,%1,%2" ! [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_expand "muldi3" ! [(set (match_operand:DI 0 "register_operand" "=l") ! (mult:DI (match_operand:DI 1 "register_operand" "d") ! (match_operand:DI 2 "register_operand" "d"))) ! (clobber (match_scratch:DI 3 "=h")) ! (clobber (match_scratch:DI 4 "=a"))] ! "TARGET_64BIT" ! " ! { ! if (mips_cpu != PROCESSOR_R4000) ! emit_insn (gen_muldi3_internal (operands[0], operands[1], operands[2])); ! else ! emit_insn (gen_muldi3_r4000 (operands[0], operands[1], operands[2])); ! DONE; ! }") ! (define_insn "muldi3_internal" ! [(set (match_operand:DI 0 "register_operand" "=l") ! (mult:DI (match_operand:DI 1 "register_operand" "d") ! (match_operand:DI 2 "register_operand" "d"))) ! (clobber (match_scratch:DI 3 "=h")) ! (clobber (match_scratch:DI 4 "=a"))] ! "TARGET_64BIT && mips_cpu != PROCESSOR_R4000" ! "dmult\\t%1,%2" [(set_attr "type" "imul") ! (set_attr "mode" "DI") (set_attr "length" "1")]) ! (define_insn "muldi3_r4000" [(set (match_operand:DI 0 "register_operand" "=d") (mult:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "register_operand" "d"))) ! (clobber (match_scratch:DI 3 "=h")) ! (clobber (match_scratch:DI 4 "=l")) ! (clobber (match_scratch:DI 5 "=a"))] ! "TARGET_64BIT && mips_cpu == PROCESSOR_R4000" "* { *************** *** 878,1070 **** (set_attr "length" "3")]) ;; mult + mflo + delay ! ;; ??? The R4000 (only) has a cpu bug. If a double-word shift executes while ! ;; a multiply is in progress, it may give an incorrect result. We solve ! ;; this by not splitting on the r4000. ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (mult:DI (match_operand:DI 1 "register_operand" "") ! (match_operand:DI 2 "register_operand" ""))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] ! "TARGET_64BIT && !TARGET_DEBUG_D_MODE && mips_cpu != PROCESSOR_R4000" ! [(parallel [(set (reg:DI 65) ;; low register ! (mult:DI (match_dup 1) ! (match_dup 2))) ! (clobber (reg:DI 64))]) ! (set (match_dup 0) ! (reg:DI 65))] ! "") ! (define_insn "muldi3_internal" ! [(set (reg:DI 65) ;; low register ! (mult:DI (match_operand:DI 0 "register_operand" "d") ! (match_operand:DI 1 "register_operand" "d"))) ! (clobber (reg:DI 64))] ! "TARGET_64BIT" ! "dmult\\t%0,%1" [(set_attr "type" "imul") ! (set_attr "mode" "DI") (set_attr "length" "1")]) ! ;; In 64 bit mode the mult instruction still writes 32 bits each to HI ! ;; and LO, so to do mulsidi3 and umultsidi3 we need to pull the values ! ;; out and combine them by hand into the single output register. Not ! ;; supported for now. ! ! ;; ??? We could define a mulditi3 pattern when TARGET_64BIT. ! ! (define_insn "mulsidi3" ! [(set (match_operand:DI 0 "register_operand" "=d") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] ! "!TARGET_64BIT" ! "* ! { ! rtx xoperands[10]; ! ! xoperands[0] = operands[0]; ! xoperands[1] = gen_rtx (REG, DImode, MD_REG_FIRST); ! ! output_asm_insn (\"mult\\t%1,%2\", operands); ! output_asm_insn (mips_move_2words (xoperands, insn), xoperands); ! return \"\"; ! }" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "4")]) ;; mult + mflo + mfhi + delay (define_insn "smulsi3_highpart" ! [(set (match_operand:SI 0 "register_operand" "=d") (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))) (const_int 32)))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "" ! "* ! { ! rtx xoperands[10]; ! ! xoperands[0] = operands[0]; ! xoperands[1] = gen_rtx (REG, SImode, HI_REGNUM); ! ! output_asm_insn (\"mult\\t%1,%2\", operands); ! output_asm_insn (mips_move_1word (xoperands, insn, TRUE), xoperands); ! return \"\"; ! }" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "3")]) ;; mult + mfhi + delay ! ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") ! (truncate:SI ! (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) ! (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))) ! (const_int 32)))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] ! "!TARGET_DEBUG_D_MODE" ! [(parallel [(set (reg:SI 64) ;; high register ! (truncate:SI ! (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1)) ! (sign_extend:DI (match_dup 2))) ! (const_int 32)))) ! (clobber (reg:SI 65))]) ! (set (match_dup 0) ! (reg:SI 64))] ! "") ! (define_insn "smulsi3_highpart_internal" ! [(set (reg:SI 64) ;; high register ! (truncate:SI ! (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 0 "register_operand" "d")) ! (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))) ! (const_int 32)))) ! (clobber (reg:SI 65))] "" ! "mult\\t%0,%1" ! [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_insn "umulsidi3" ! [(set (match_operand:DI 0 "register_operand" "=d") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "!TARGET_64BIT" ! "* ! { ! rtx xoperands[10]; ! ! xoperands[0] = operands[0]; ! xoperands[1] = gen_rtx (REG, DImode, MD_REG_FIRST); ! ! output_asm_insn (\"multu\\t%1,%2\", operands); ! output_asm_insn (mips_move_2words (xoperands, insn), xoperands); ! return \"\"; ! }" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "4")]) ;; mult + mflo + mfhi + delay ! ! (define_insn "umulsi3_highpart" ! [(set (match_operand:SI 0 "register_operand" "=d") ! (truncate:SI ! (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) ! (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))) ! (const_int 32)))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] ! "" ! "* ! { ! rtx xoperands[10]; ! ! xoperands[0] = operands[0]; ! xoperands[1] = gen_rtx (REG, SImode, HI_REGNUM); ! output_asm_insn (\"multu\\t%1,%2\", operands); ! output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); ! return \"\"; ! }" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "3")]) ;; multu + mfhi + delay ! (define_split ! [(set (match_operand:SI 0 "register_operand" "") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))) (const_int 32)))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] ! "!TARGET_DEBUG_D_MODE" ! [(parallel [(set (reg:SI 64) ;; high register ! (truncate:SI ! (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1)) ! (zero_extend:DI (match_dup 2))) ! (const_int 32)))) ! (clobber (reg:SI 65))]) ! (set (match_dup 0) ! (reg:SI 64))] ! "") ! ! (define_insn "umulsi3_highpart_internal" ! [(set (reg:SI 64) ;; high register ! (truncate:SI ! (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 0 "register_operand" "d")) ! (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))) ! (const_int 32)))) ! (clobber (reg:SI 65))] "" ! "multu\\t%0,%1" [(set_attr "type" "imul") (set_attr "mode" "SI") --- 945,1048 ---- (set_attr "length" "3")]) ;; mult + mflo + delay ! ;; ??? We could define a mulditi3 pattern when TARGET_64BIT. ! (define_expand "mulsidi3" ! [(set (match_operand:DI 0 "register_operand" "=x") ! (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) ! (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))))] ! "" ! " ! { ! if (TARGET_64BIT) ! emit_insn (gen_mulsidi3_64bit (operands[0], operands[1], operands[2])); ! else ! emit_insn (gen_mulsidi3_internal (operands[0], operands[1], operands[2])); ! DONE; ! }") ! (define_insn "mulsidi3_internal" ! [(set (match_operand:DI 0 "register_operand" "=x") ! (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) ! (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))) ! (clobber (match_scratch:SI 3 "=a"))] ! "!TARGET_64BIT" ! "mult\\t%1,%2" [(set_attr "type" "imul") ! (set_attr "mode" "SI") (set_attr "length" "1")]) ! (define_insn "mulsidi3_64bit" ! [(set (match_operand:DI 0 "register_operand" "=a") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) (sign_extend:DI (match_operand:SI 2 "register_operand" "d")))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h"))] ! "TARGET_64BIT" ! "mult\\t%1,%2" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "1")]) (define_insn "smulsi3_highpart" ! [(set (match_operand:SI 0 "register_operand" "=h") (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d")) (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))) (const_int 32)))) ! (clobber (match_scratch:SI 3 "=l")) ! (clobber (match_scratch:SI 4 "=a"))] "" ! "mult\\t%1,%2" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_expand "umulsidi3" ! [(set (match_operand:DI 0 "register_operand" "=x") ! (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) ! (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))))] "" ! " ! { ! if (TARGET_64BIT) ! emit_insn (gen_umulsidi3_64bit (operands[0], operands[1], operands[2])); ! else ! emit_insn (gen_umulsidi3_internal (operands[0], operands[1], operands[2])); ! DONE; ! }") ! (define_insn "umulsidi3_internal" ! [(set (match_operand:DI 0 "register_operand" "=x") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))) ! (clobber (match_scratch:SI 3 "=a"))] "!TARGET_64BIT" ! "multu\\t%1,%2" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_insn "umulsidi3_64bit" ! [(set (match_operand:DI 0 "register_operand" "=a") ! (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) ! (zero_extend:DI (match_operand:SI 2 "register_operand" "d")))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h"))] ! "TARGET_64BIT" ! "multu\\t%1,%2" [(set_attr "type" "imul") (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_insn "umulsi3_highpart" ! [(set (match_operand:SI 0 "register_operand" "=h") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d")) (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))) (const_int 32)))) ! (clobber (match_scratch:SI 3 "=l")) ! (clobber (match_scratch:SI 4 "=a"))] "" ! "multu\\t%1,%2" [(set_attr "type" "imul") (set_attr "mode" "SI") *************** *** 1072,1126 **** (define_insn "smuldi3_highpart" ! [(set (match_operand:DI 0 "register_operand" "=d") ! (truncate:DI ! (lshiftrt:TI (mult:TI (sign_extend:TI (match_operand:DI 1 "register_operand" "d")) ! (sign_extend:TI (match_operand:DI 2 "register_operand" "d"))) ! (const_int 64)))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] ! "TARGET_64BIT" ! "* ! { ! rtx xoperands[10]; ! ! xoperands[0] = operands[0]; ! xoperands[1] = gen_rtx (REG, DImode, HI_REGNUM); ! ! output_asm_insn (\"dmult\\t%1,%2\", operands); ! output_asm_insn (mips_move_1word (xoperands, insn, TRUE), xoperands); ! return \"\"; ! }" ! [(set_attr "type" "imul") ! (set_attr "mode" "DI") ! (set_attr "length" "3")]) ;; mult + mfhi + delay ! ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") (truncate:DI (lshiftrt:TI (mult:TI (sign_extend:TI (match_operand:DI 1 "register_operand" "d")) (sign_extend:TI (match_operand:DI 2 "register_operand" "d"))) (const_int 64)))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] ! "TARGET_64BIT && !TARGET_DEBUG_D_MODE" ! [(parallel [(set (reg:DI 64) ;; high register ! (truncate:DI ! (lshiftrt:TI (mult:TI (sign_extend:TI (match_dup 1)) ! (sign_extend:TI (match_dup 2))) ! (const_int 64)))) ! (clobber (reg:DI 65))]) ! (set (match_dup 0) ! (reg:DI 64))] ! "") ! ! (define_insn "smuldi3_highpart_internal" ! [(set (reg:DI 64) ;; high register ! (truncate:DI ! (lshiftrt:TI (mult:TI (sign_extend:TI (match_operand:DI 0 "register_operand" "d")) ! (sign_extend:TI (match_operand:DI 1 "register_operand" "d"))) ! (const_int 64)))) ! (clobber (reg:DI 65))] "TARGET_64BIT" ! "dmult\\t%0,%1" [(set_attr "type" "imul") (set_attr "mode" "DI") --- 1050,1062 ---- (define_insn "smuldi3_highpart" ! [(set (match_operand:DI 0 "register_operand" "=h") (truncate:DI (lshiftrt:TI (mult:TI (sign_extend:TI (match_operand:DI 1 "register_operand" "d")) (sign_extend:TI (match_operand:DI 2 "register_operand" "d"))) (const_int 64)))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=a"))] "TARGET_64BIT" ! "dmult\\t%1,%2" [(set_attr "type" "imul") (set_attr "mode" "DI") *************** *** 1128,1184 **** (define_insn "umuldi3_highpart" ! [(set (match_operand:DI 0 "register_operand" "=d") (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 1 "register_operand" "d")) (zero_extend:TI (match_operand:DI 2 "register_operand" "d"))) (const_int 64)))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT" ! "* ! { ! rtx xoperands[10]; ! xoperands[0] = operands[0]; ! xoperands[1] = gen_rtx (REG, DImode, HI_REGNUM); ! output_asm_insn (\"dmultu\\t%1,%2\", operands); ! output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); ! return \"\"; ! }" [(set_attr "type" "imul") ! (set_attr "mode" "DI") ! (set_attr "length" "3")]) ;; multu + mfhi + delay ! (define_split ! [(set (match_operand:DI 0 "register_operand" "") ! (truncate:DI ! (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 1 "register_operand" "d")) ! (zero_extend:TI (match_operand:DI 2 "register_operand" "d"))) ! (const_int 64)))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] ! "TARGET_64BIT && !TARGET_DEBUG_D_MODE" ! [(parallel [(set (reg:DI 64) ;; high register ! (truncate:DI ! (lshiftrt:TI (mult:TI (zero_extend:TI (match_dup 1)) ! (zero_extend:TI (match_dup 2))) ! (const_int 64)))) ! (clobber (reg:DI 65))]) ! (set (match_dup 0) ! (reg:DI 64))] ! "") ! (define_insn "umuldi3_highpart_internal" ! [(set (reg:DI 64) ;; high register ! (truncate:DI ! (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 0 "register_operand" "d")) ! (zero_extend:TI (match_operand:DI 1 "register_operand" "d"))) ! (const_int 64)))) ! (clobber (reg:DI 65))] ! "TARGET_64BIT" ! "dmultu\\t%0,%1" [(set_attr "type" "imul") ! (set_attr "mode" "DI") (set_attr "length" "1")]) --- 1064,1243 ---- (define_insn "umuldi3_highpart" ! [(set (match_operand:DI 0 "register_operand" "=h") (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI (match_operand:DI 1 "register_operand" "d")) (zero_extend:TI (match_operand:DI 2 "register_operand" "d"))) (const_int 64)))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=a"))] "TARGET_64BIT" ! "dmultu\\t%1,%2" ! [(set_attr "type" "imul") ! (set_attr "mode" "DI") ! (set_attr "length" "1")]) ! ;; The R4650 supports a 32 bit multiply/ 64 bit accumulate ! ;; instruction. The HI/LO registers are used as a 64 bit accumulator. ! (define_insn "madsi" ! [(set (match_operand:SI 0 "register_operand" "+l") ! (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d") ! (match_operand:SI 2 "register_operand" "d")) ! (match_dup 0))) ! (clobber (match_scratch:SI 3 "=h")) ! (clobber (match_scratch:SI 4 "=a"))] ! "TARGET_MAD" ! "mad\\t%1,%2" [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_insn "maddi" ! [(set (match_operand:DI 0 "register_operand" "+x") ! (plus:DI (mult:DI (sign_extend:DI ! (match_operand:SI 1 "register_operand" "d")) ! (sign_extend:DI ! (match_operand:SI 2 "register_operand" "d"))) ! (match_dup 0))) ! (clobber (match_scratch:SI 3 "=a"))] ! "TARGET_MAD && ! TARGET_64BIT" ! "mad\\t%1,%2" ! [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! (define_insn "maddi_64bit" ! [(set (match_operand:DI 0 "register_operand" "+a") ! (plus:DI (mult:DI (sign_extend:DI ! (match_operand:SI 1 "register_operand" "d")) ! (sign_extend:DI ! (match_operand:SI 2 "register_operand" "d"))) ! (match_dup 0))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h"))] ! "TARGET_MAD && TARGET_64BIT" ! "mad\\t%1,%2" [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! ! (define_insn "umaddi" ! [(set (match_operand:DI 0 "register_operand" "+x") ! (plus:DI (mult:DI (zero_extend:DI ! (match_operand:SI 1 "register_operand" "d")) ! (zero_extend:DI ! (match_operand:SI 2 "register_operand" "d"))) ! (match_dup 0))) ! (clobber (match_scratch:SI 3 "=a"))] ! "TARGET_MAD && ! TARGET_64BIT" ! "madu\\t%1,%2" ! [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! ! (define_insn "umaddi_64bit" ! [(set (match_operand:DI 0 "register_operand" "+a") ! (plus:DI (mult:DI (zero_extend:DI ! (match_operand:SI 1 "register_operand" "d")) ! (zero_extend:DI ! (match_operand:SI 2 "register_operand" "d"))) ! (match_dup 0))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h"))] ! "TARGET_MAD && TARGET_64BIT" ! "madu\\t%1,%2" ! [(set_attr "type" "imul") ! (set_attr "mode" "SI") ! (set_attr "length" "1")]) ! ! ;; Floating point multiply accumulate instructions. ! ! (define_insn "" ! [(set (match_operand:DF 0 "register_operand" "=f") ! (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "f") ! (match_operand:DF 2 "register_operand" "f")) ! (match_operand:DF 3 "register_operand" "f")))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "madd.d\\t%0,%3,%1,%2" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "DF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "f") ! (match_operand:SF 2 "register_operand" "f")) ! (match_operand:SF 3 "register_operand" "f")))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "madd.s\\t%0,%3,%1,%2" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "SF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:DF 0 "register_operand" "=f") ! (minus:DF (mult:DF (match_operand:DF 1 "register_operand" "f") ! (match_operand:DF 2 "register_operand" "f")) ! (match_operand:DF 3 "register_operand" "f")))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "msub.d\\t%0,%3,%1,%2" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "DF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (minus:SF (mult:SF (match_operand:SF 1 "register_operand" "f") ! (match_operand:SF 2 "register_operand" "f")) ! (match_operand:SF 3 "register_operand" "f")))] ! ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "msub.s\\t%0,%3,%1,%2" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "SF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:DF 0 "register_operand" "=f") ! (neg:DF (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "f") ! (match_operand:DF 2 "register_operand" "f")) ! (match_operand:DF 3 "register_operand" "f"))))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "nmadd.d\\t%0,%3,%1,%2" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "DF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "f") ! (match_operand:SF 2 "register_operand" "f")) ! (match_operand:SF 3 "register_operand" "f"))))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "nmadd.s\\t%0,%3,%1,%2" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "SF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:DF 0 "register_operand" "=f") ! (minus:DF (match_operand:DF 1 "register_operand" "f") ! (mult:DF (match_operand:DF 2 "register_operand" "f") ! (match_operand:DF 3 "register_operand" "f"))))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "nmsub.d\\t%0,%1,%2,%3" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "DF") ! (set_attr "length" "1")]) ! ! (define_insn "" ! [(set (match_operand:SF 0 "register_operand" "=f") ! (minus:SF (match_operand:SF 1 "register_operand" "f") ! (mult:SF (match_operand:SF 2 "register_operand" "f") ! (match_operand:SF 3 "register_operand" "f"))))] ! "mips_isa >= 4 && TARGET_HARD_FLOAT" ! "nmsub.s\\t%0,%1,%2,%3" ! [(set_attr "type" "fmadd") ! (set_attr "mode" "SF") (set_attr "length" "1")]) *************** *** 1195,1199 **** (div:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "div.d\\t%0,%1,%2" [(set_attr "type" "fdiv") --- 1254,1258 ---- (div:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "div.d\\t%0,%1,%2" [(set_attr "type" "fdiv") *************** *** 1231,1236 **** (mod:SI (match_dup 1) (match_dup 2))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "optimize" "* --- 1290,1296 ---- (mod:SI (match_dup 1) (match_dup 2))) ! (clobber (match_scratch:SI 4 "=l")) ! (clobber (match_scratch:SI 5 "=h")) ! (clobber (match_scratch:SI 6 "=a"))] "optimize" "* *************** *** 1255,1260 **** (mod:DI (match_dup 1) (match_dup 2))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT && optimize" "* --- 1315,1321 ---- (mod:DI (match_dup 1) (match_dup 2))) ! (clobber (match_scratch:DI 4 "=l")) ! (clobber (match_scratch:DI 5 "=h")) ! (clobber (match_scratch:DI 6 "=a"))] "TARGET_64BIT && optimize" "* *************** *** 1279,1284 **** (umod:SI (match_dup 1) (match_dup 2))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "optimize" "* --- 1340,1346 ---- (umod:SI (match_dup 1) (match_dup 2))) ! (clobber (match_scratch:SI 4 "=l")) ! (clobber (match_scratch:SI 5 "=h")) ! (clobber (match_scratch:SI 6 "=a"))] "optimize" "* *************** *** 1303,1308 **** (umod:DI (match_dup 1) (match_dup 2))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT && optimize" "* --- 1365,1371 ---- (umod:DI (match_dup 1) (match_dup 2))) ! (clobber (match_scratch:DI 4 "=l")) ! (clobber (match_scratch:DI 5 "=h")) ! (clobber (match_scratch:DI 6 "=a"))] "TARGET_64BIT && optimize" "* *************** *** 1324,1329 **** (div:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "!optimize" "div\\t%0,%1,%2" --- 1387,1393 ---- (div:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:SI 3 "=l")) ! (clobber (match_scratch:SI 4 "=h")) ! (clobber (match_scratch:SI 6 "=a"))] "!optimize" "div\\t%0,%1,%2" *************** *** 1336,1341 **** (div:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT && !optimize" "ddiv\\t%0,%1,%2" --- 1400,1406 ---- (div:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h")) ! (clobber (match_scratch:DI 6 "=a"))] "TARGET_64BIT && !optimize" "ddiv\\t%0,%1,%2" *************** *** 1348,1353 **** (mod:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "!optimize" "rem\\t%0,%1,%2" --- 1413,1419 ---- (mod:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:SI 3 "=l")) ! (clobber (match_scratch:SI 4 "=h")) ! (clobber (match_scratch:SI 6 "=a"))] "!optimize" "rem\\t%0,%1,%2" *************** *** 1360,1365 **** (mod:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT && !optimize" "drem\\t%0,%1,%2" --- 1426,1432 ---- (mod:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h")) ! (clobber (match_scratch:DI 6 "=a"))] "TARGET_64BIT && !optimize" "drem\\t%0,%1,%2" *************** *** 1372,1377 **** (udiv:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "!optimize" "divu\\t%0,%1,%2" --- 1439,1445 ---- (udiv:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:SI 3 "=l")) ! (clobber (match_scratch:SI 4 "=h")) ! (clobber (match_scratch:SI 6 "=a"))] "!optimize" "divu\\t%0,%1,%2" *************** *** 1384,1389 **** (udiv:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT && !optimize" "ddivu\\t%0,%1,%2" --- 1452,1458 ---- (udiv:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h")) ! (clobber (match_scratch:DI 6 "=a"))] "TARGET_64BIT && !optimize" "ddivu\\t%0,%1,%2" *************** *** 1396,1401 **** (umod:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (reg:SI 64)) ! (clobber (reg:SI 65))] "!optimize" "remu\\t%0,%1,%2" --- 1465,1471 ---- (umod:SI (match_operand:SI 1 "register_operand" "d") (match_operand:SI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:SI 3 "=l")) ! (clobber (match_scratch:SI 4 "=h")) ! (clobber (match_scratch:SI 6 "=a"))] "!optimize" "remu\\t%0,%1,%2" *************** *** 1408,1413 **** (umod:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (reg:DI 64)) ! (clobber (reg:DI 65))] "TARGET_64BIT && !optimize" "dremu\\t%0,%1,%2" --- 1478,1484 ---- (umod:DI (match_operand:DI 1 "register_operand" "d") (match_operand:DI 2 "nonmemory_operand" "di"))) ! (clobber (match_scratch:DI 3 "=l")) ! (clobber (match_scratch:DI 4 "=h")) ! (clobber (match_scratch:DI 6 "=a"))] "TARGET_64BIT && !optimize" "dremu\\t%0,%1,%2" *************** *** 1427,1431 **** [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && HAVE_SQRT_P()" "sqrt.d\\t%0,%1" [(set_attr "type" "fsqrt") --- 1498,1502 ---- [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && HAVE_SQRT_P() && TARGET_DOUBLE_FLOAT" "sqrt.d\\t%0,%1" [(set_attr "type" "fsqrt") *************** *** 1499,1503 **** [(set (match_operand:DF 0 "register_operand" "=f") (abs:DF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "abs.d\\t%0,%1" [(set_attr "type" "fabs") --- 1570,1574 ---- [(set (match_operand:DF 0 "register_operand" "=f") (abs:DF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "abs.d\\t%0,%1" [(set_attr "type" "fabs") *************** *** 1662,1666 **** [(set (match_operand:DF 0 "register_operand" "=f") (neg:DF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "neg.d\\t%0,%1" [(set_attr "type" "fneg") --- 1733,1737 ---- [(set (match_operand:DF 0 "register_operand" "=f") (neg:DF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "neg.d\\t%0,%1" [(set_attr "type" "fneg") *************** *** 1940,1944 **** [(set (match_operand:SF 0 "register_operand" "=f") (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "cvt.s.d\\t%0,%1" [(set_attr "type" "fcvt") --- 2011,2015 ---- [(set (match_operand:SF 0 "register_operand" "=f") (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "cvt.s.d\\t%0,%1" [(set_attr "type" "fcvt") *************** *** 1946,1954 **** (set_attr "length" "1")]) - ;; ??? This should be a define expand. - ;; See the zero_extendsidi2 pattern. - ;; ??? We tried define expands, but they did not work. Too many shift - ;; instructions were optimized away. Perhaps add combiner patterns to - ;; recognize cases where shifts and truncates can be combined. (define_insn "truncdisi2" [(set (match_operand:SI 0 "register_operand" "=d") --- 2017,2020 ---- *************** *** 1977,1980 **** --- 2043,2150 ---- (set_attr "mode" "QI") (set_attr "length" "1")]) + + ;; Combiner patterns to optimize shift/truncate combinations. + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (truncate:SI (ashiftrt:DI (match_operand:DI 1 "register_operand" "d") + (match_operand:DI 2 "small_int" "I"))))] + "TARGET_64BIT" + "* + { + int shift_amt = INTVAL (operands[2]) & 0x3f; + + if (shift_amt < 32) + { + operands[2] = GEN_INT (32 - shift_amt); + return \"dsll\\t%0,%1,%2\;dsra\\t%0,%0,32\"; + } + else + { + operands[2] = GEN_INT (shift_amt); + return \"dsra\\t%0,%1,%2\"; + } + }" + [(set_attr "type" "darith") + (set_attr "mode" "SI") + (set_attr "length" "2")]) + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (truncate:SI (lshiftrt:DI (match_operand:DI 1 "register_operand" "d") + (match_operand:DI 2 "small_int" "I"))))] + "TARGET_64BIT" + "* + { + int shift_amt = INTVAL (operands[2]) & 0x3f; + + if (shift_amt < 32) + { + operands[2] = GEN_INT (32 - shift_amt); + return \"dsll\\t%0,%1,%2\;dsra\\t%0,%0,32\"; + } + else if (shift_amt == 32) + return \"dsra\\t%0,%1,32\"; + else + { + operands[2] = GEN_INT (shift_amt); + return \"dsrl\\t%0,%1,%2\"; + } + }" + [(set_attr "type" "darith") + (set_attr "mode" "SI") + (set_attr "length" "2")]) + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (truncate:SI (ashift:DI (match_operand:DI 1 "register_operand" "d") + (match_operand:DI 2 "small_int" "I"))))] + "TARGET_64BIT" + "* + { + int shift_amt = INTVAL (operands[2]) & 0x3f; + + if (shift_amt < 32) + { + operands[2] = GEN_INT (32 + shift_amt); + return \"dsll\\t%0,%1,%2\;dsra\\t%0,%0,32\"; + } + else + return \"move\\t%0,%.\"; + }" + [(set_attr "type" "darith") + (set_attr "mode" "SI") + (set_attr "length" "2")]) + + ;; Combiner patterns to optimize truncate/zero_extend combinations. + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (zero_extend:SI (truncate:HI + (match_operand:DI 1 "register_operand" "d"))))] + "TARGET_64BIT" + "andi\\t%0,%1,0xffff" + [(set_attr "type" "darith") + (set_attr "mode" "SI") + (set_attr "length" "1")]) + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (zero_extend:SI (truncate:QI + (match_operand:DI 1 "register_operand" "d"))))] + "TARGET_64BIT" + "andi\\t%0,%1,0xff" + [(set_attr "type" "darith") + (set_attr "mode" "SI") + (set_attr "length" "1")]) + + (define_insn "" + [(set (match_operand:HI 0 "register_operand" "=d") + (zero_extend:HI (truncate:QI + (match_operand:DI 1 "register_operand" "d"))))] + "TARGET_64BIT" + "andi\\t%0,%1,0xff" + [(set_attr "type" "darith") + (set_attr "mode" "HI") + (set_attr "length" "1")]) ;; *************** *** 2294,2298 **** [(set (match_operand:DF 0 "register_operand" "=f") (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "cvt.d.s\\t%0,%1" [(set_attr "type" "fcvt") --- 2464,2468 ---- [(set (match_operand:DF 0 "register_operand" "=f") (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "cvt.d.s\\t%0,%1" [(set_attr "type" "fcvt") *************** *** 2318,2322 **** (clobber (match_scratch:SI 2 "=d,*d,&d,&d")) (clobber (match_scratch:DF 3 "=f,*X,f,f"))] ! "TARGET_HARD_FLOAT" "* { --- 2488,2492 ---- (clobber (match_scratch:SI 2 "=d,*d,&d,&d")) (clobber (match_scratch:DF 3 "=f,*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 2376,2380 **** (fix:DI (match_operand:DF 1 "register_operand" "f,*f,f,f"))) (clobber (match_scratch:DF 2 "=f,*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_64BIT" "* { --- 2546,2550 ---- (fix:DI (match_operand:DF 1 "register_operand" "f,*f,f,f"))) (clobber (match_scratch:DF 2 "=f,*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" "* { *************** *** 2403,2407 **** (fix:DI (match_operand:SF 1 "register_operand" "f,*f,f,f"))) (clobber (match_scratch:DF 2 "=f,*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_64BIT" "* { --- 2573,2577 ---- (fix:DI (match_operand:SF 1 "register_operand" "f,*f,f,f"))) (clobber (match_scratch:DF 2 "=f,*X,f,f"))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" "* { *************** *** 2426,2430 **** [(set (match_operand:DF 0 "register_operand" "=f,f,f") (float:DF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT" "* { --- 2596,2600 ---- [(set (match_operand:DF 0 "register_operand" "=f,f,f") (float:DF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 2443,2447 **** [(set (match_operand:DF 0 "register_operand" "=f,f,f") (float:DF (match_operand:DI 1 "nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT" "* { --- 2613,2617 ---- [(set (match_operand:DF 0 "register_operand" "=f,f,f") (float:DF (match_operand:DI 1 "nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" "* { *************** *** 2477,2481 **** [(set (match_operand:SF 0 "register_operand" "=f,f,f") (float:SF (match_operand:DI 1 "nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT" "* { --- 2647,2651 ---- [(set (match_operand:SF 0 "register_operand" "=f,f,f") (float:SF (match_operand:DI 1 "nonimmediate_operand" "d,R,m")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" "* { *************** *** 2494,2498 **** [(set (match_operand:SI 0 "register_operand" "") (unsigned_fix:SI (match_operand:DF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT" " { --- 2664,2668 ---- [(set (match_operand:SI 0 "register_operand" "") (unsigned_fix:SI (match_operand:DF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" " { *************** *** 2537,2541 **** [(set (match_operand:DI 0 "register_operand" "") (unsigned_fix:DI (match_operand:DF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT" " { --- 2707,2711 ---- [(set (match_operand:DI 0 "register_operand" "") (unsigned_fix:DI (match_operand:DF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" " { *************** *** 2624,2628 **** [(set (match_operand:DI 0 "register_operand" "") (unsigned_fix:DI (match_operand:SF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT" " { --- 2794,2798 ---- [(set (match_operand:DI 0 "register_operand" "") (unsigned_fix:DI (match_operand:SF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT" " { *************** *** 2822,2825 **** --- 2992,3026 ---- " { + /* If we are generating embedded PIC code, and we are referring to a + symbol in the .text section, we must use an offset from the start + of the function. */ + if (TARGET_EMBEDDED_PIC + && (GET_CODE (operands[1]) == LABEL_REF + || (GET_CODE (operands[1]) == SYMBOL_REF + && ! SYMBOL_REF_FLAG (operands[1])))) + { + rtx temp; + + temp = embedded_pic_offset (operands[1]); + temp = gen_rtx (PLUS, Pmode, embedded_pic_fnaddr_rtx, + force_reg (DImode, temp)); + emit_move_insn (operands[0], force_reg (DImode, temp)); + DONE; + } + + /* If operands[1] is a constant address illegal for pic, then we need to + handle it just like LEGITIMIZE_ADDRESS does. */ + if (flag_pic && pic_address_needs_scratch (operands[1])) + { + rtx temp = force_reg (DImode, XEXP (XEXP (operands[1], 0), 0)); + rtx temp2 = XEXP (XEXP (operands[1], 0), 1); + + if (! SMALL_INT (temp2)) + temp2 = force_reg (DImode, temp2); + + emit_move_insn (operands[0], gen_rtx (PLUS, DImode, temp, temp2)); + DONE; + } + if ((reload_in_progress | reload_completed) == 0 && !register_operand (operands[0], DImode) *************** *** 2859,2864 **** (define_insn "movdi_internal2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*x") ! (match_operand:DI 1 "general_operand" " d,S,IKL,Mnis,R,m,dJ,dJ,*x,*d"))] "TARGET_64BIT && (register_operand (operands[0], DImode) --- 3060,3065 ---- (define_insn "movdi_internal2" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*x,*a") ! (match_operand:DI 1 "general_operand" " d,S,IKL,Mnis,R,m,dJ,dJ,*x,*d,*I"))] "TARGET_64BIT && (register_operand (operands[0], DImode) *************** *** 2867,2874 **** || operands[1] == CONST0_RTX (DImode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,hilo,hilo") (set_attr "mode" "DI") ! (set_attr "length" "1,2,1,2,1,2,1,2,1,1")]) ;; 32-bit Integer moves --- 3068,3206 ---- || operands[1] == CONST0_RTX (DImode))" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,hilo,hilo,hilo") (set_attr "mode" "DI") ! (set_attr "length" "1,2,1,2,1,2,1,2,1,1,2")]) ! ! ;; Handle input reloads in DImode. ! ;; This is mainly to handle reloading HILO_REGNUM. Note that we may ! ;; see it as the source or the destination, depending upon which way ! ;; reload handles the instruction. ! ;; Making the second operand TImode is a trick. The compiler may ! ;; reuse the same register for operand 0 and operand 2. Using TImode ! ;; gives us two registers, so we can always use the one which is not ! ;; used. ! ! (define_expand "reload_indi" ! [(set (match_operand:DI 0 "register_operand" "=b") ! (match_operand:DI 1 "general_operand" "b")) ! (clobber (match_operand:TI 2 "register_operand" "=&d"))] ! "TARGET_64BIT" ! " ! { ! rtx scratch = gen_rtx (REG, DImode, ! (REGNO (operands[0]) == REGNO (operands[2]) ! ? REGNO (operands[2]) + 1 ! : REGNO (operands[2]))); ! ! if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == HILO_REGNUM) ! { ! if (GET_CODE (operands[1]) == MEM) ! { ! rtx memword, offword, hiword, loword; ! ! scratch = gen_rtx (REG, SImode, REGNO (scratch)); ! memword = change_address (operands[1], SImode, NULL_RTX); ! offword = change_address (adj_offsettable_operand (operands[1], 4), ! SImode, NULL_RTX); ! if (BYTES_BIG_ENDIAN) ! { ! hiword = memword; ! loword = offword; ! } ! else ! { ! hiword = offword; ! loword = memword; ! } ! emit_move_insn (scratch, hiword); ! emit_move_insn (gen_rtx (REG, SImode, 64), scratch); ! emit_move_insn (scratch, loword); ! emit_move_insn (gen_rtx (REG, SImode, 65), scratch); ! } ! else ! { ! emit_insn (gen_ashrdi3 (scratch, operands[1], GEN_INT (32))); ! emit_insn (gen_movdi (gen_rtx (REG, DImode, 64), scratch)); ! emit_insn (gen_ashldi3 (scratch, operands[1], GEN_INT (32))); ! emit_insn (gen_ashrdi3 (scratch, scratch, GEN_INT (32))); ! emit_insn (gen_movdi (gen_rtx (REG, DImode, 65), scratch)); ! } ! DONE; ! } ! if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == HILO_REGNUM) ! { ! emit_insn (gen_movdi (scratch, gen_rtx (REG, DImode, 65))); ! emit_insn (gen_ashldi3 (scratch, scratch, GEN_INT (32))); ! emit_insn (gen_lshrdi3 (scratch, scratch, GEN_INT (32))); ! emit_insn (gen_movdi (operands[0], gen_rtx (REG, DImode, 64))); ! emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); ! emit_insn (gen_iordi3 (operands[0], operands[0], scratch)); ! DONE; ! } ! /* This handles moves between a float register and HI/LO. */ ! emit_move_insn (scratch, operands[1]); ! emit_move_insn (operands[0], scratch); ! DONE; ! }") ! ! ;; Handle output reloads in DImode. ! ! (define_expand "reload_outdi" ! [(set (match_operand:DI 0 "general_operand" "=b") ! (match_operand:DI 1 "register_operand" "b")) ! (clobber (match_operand:DI 2 "register_operand" "=&d"))] ! "TARGET_64BIT" ! " ! { ! if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == HILO_REGNUM) ! { ! emit_insn (gen_ashrdi3 (operands[2], operands[1], GEN_INT (32))); ! emit_insn (gen_movdi (gen_rtx (REG, DImode, 64), operands[2])); ! emit_insn (gen_ashldi3 (operands[2], operands[1], GEN_INT (32))); ! emit_insn (gen_ashrdi3 (operands[2], operands[2], GEN_INT (32))); ! emit_insn (gen_movdi (gen_rtx (REG, DImode, 65), operands[2])); ! DONE; ! } ! if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == HILO_REGNUM) ! { ! if (GET_CODE (operands[0]) == MEM) ! { ! rtx scratch, memword, offword, hiword, loword; + scratch = gen_rtx (REG, SImode, REGNO (operands[2])); + memword = change_address (operands[0], SImode, NULL_RTX); + offword = change_address (adj_offsettable_operand (operands[0], 4), + SImode, NULL_RTX); + if (BYTES_BIG_ENDIAN) + { + hiword = memword; + loword = offword; + } + else + { + hiword = offword; + loword = memword; + } + emit_move_insn (scratch, gen_rtx (REG, SImode, 64)); + emit_move_insn (hiword, scratch); + emit_move_insn (scratch, gen_rtx (REG, SImode, 65)); + emit_move_insn (loword, scratch); + } + else + { + emit_insn (gen_movdi (operands[2], gen_rtx (REG, DImode, 65))); + emit_insn (gen_ashldi3 (operands[2], operands[2], GEN_INT (32))); + emit_insn (gen_lshrdi3 (operands[2], operands[2], GEN_INT (32))); + emit_insn (gen_movdi (operands[0], gen_rtx (REG, DImode, 64))); + emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); + emit_insn (gen_iordi3 (operands[0], operands[0], operands[2])); + } + DONE; + } + /* This handles moves between a float register and HI/LO. */ + emit_move_insn (operands[2], operands[1]); + emit_move_insn (operands[0], operands[2]); + DONE; + }") ;; 32-bit Integer moves *************** *** 2916,2920 **** } ! /* If operands[1] is a constant address illegal for pic, then we need to handle it just like LEGITIMIZE_ADDRESS does. */ if (flag_pic && pic_address_needs_scratch (operands[1])) --- 3248,3252 ---- } ! /* If operands[1] is a constant address invalid for pic, then we need to handle it just like LEGITIMIZE_ADDRESS does. */ if (flag_pic && pic_address_needs_scratch (operands[1])) *************** *** 2945,2950 **** (define_insn "movsi_internal1" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*f*z,*f,*f,*f,*R,*m,*x,*d") ! (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*f*z,*d,*f,*R,*m,*f,*f,*d,*x"))] "TARGET_DEBUG_H_MODE && (register_operand (operands[0], SImode) --- 3277,3282 ---- (define_insn "movsi_internal1" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*f*z,*f,*f,*f,*R,*m,*x,*x,*d,*d") ! (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*f*z,*d,*f,*R,*m,*f,*f,I,*d,*x,*a"))] "TARGET_DEBUG_H_MODE && (register_operand (operands[0], SImode) *************** *** 2952,2962 **** || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,move,load,load,store,store,hilo,hilo") (set_attr "mode" "SI") ! (set_attr "length" "1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,1,1")]) (define_insn "movsi_internal2" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*z,*d,*x") ! (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*z,*d,*x,*d"))] "!TARGET_DEBUG_H_MODE && (register_operand (operands[0], SImode) --- 3284,3294 ---- || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,move,load,load,store,store,hilo,hilo,hilo,hilo") (set_attr "mode" "SI") ! (set_attr "length" "1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1")]) (define_insn "movsi_internal2" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*z,*x,*d,*x,*d") ! (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*z,*d,I,*x,*d,*a"))] "!TARGET_DEBUG_H_MODE && (register_operand (operands[0], SImode) *************** *** 2964,2971 **** || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,hilo,hilo") (set_attr "mode" "SI") ! (set_attr "length" "1,2,1,2,1,2,1,2,1,1,1,1")]) ;; 16-bit Integer moves --- 3296,3325 ---- || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))" "* return mips_move_1word (operands, insn, FALSE);" ! [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,hilo,hilo,hilo,hilo") (set_attr "mode" "SI") ! (set_attr "length" "1,2,1,2,1,2,1,2,1,1,1,1,1,1")]) ! ! ;; Reload HILO_REGNUM in SI mode. This needs a scratch register in ! ;; order to set the sign bit correctly in the HI register. + (define_expand "reload_outsi" + [(set (match_operand:SI 0 "general_operand" "=b") + (match_operand:SI 1 "register_operand" "d")) + (clobber (match_operand:SI 2 "register_operand" "=&d"))] + "TARGET_64BIT" + " + { + if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == HILO_REGNUM) + { + emit_insn (gen_movsi (gen_rtx (REG, SImode, 65), operands[1])); + emit_insn (gen_ashrsi3 (operands[2], operands[1], GEN_INT (31))); + emit_insn (gen_movsi (gen_rtx (REG, SImode, 64), operands[2])); + DONE; + } + /* This handles moves between a float register and HI/LO. */ + emit_move_insn (operands[2], operands[1]); + emit_move_insn (operands[0], operands[2]); + DONE; + }") ;; 16-bit Integer moves *************** *** 3145,3148 **** --- 3499,3503 ---- (match_operand:DF 1 "general_operand" "f,R,o,fG,fG,F,*d,*f,*d*G,*R,*o*F,*d,*d"))] "TARGET_HARD_FLOAT && !(TARGET_FLOAT64 && !TARGET_64BIT) + && TARGET_DOUBLE_FLOAT && (register_operand (operands[0], DFmode) || register_operand (operands[1], DFmode) *************** *** 3158,3161 **** --- 3513,3517 ---- (match_operand:DF 1 "general_operand" " f,o,f,G,f,G,F,*F,*o,*R,*d,*d"))] "TARGET_HARD_FLOAT && (TARGET_FLOAT64 && !TARGET_64BIT) + && TARGET_DOUBLE_FLOAT && (register_operand (operands[0], DFmode) || register_operand (operands[1], DFmode)) *************** *** 3172,3176 **** [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,o") (match_operand:DF 1 "general_operand" "dG,R,oF,d,d"))] ! "TARGET_SOFT_FLOAT && (register_operand (operands[0], DFmode) || register_operand (operands[1], DFmode) --- 3528,3532 ---- [(set (match_operand:DF 0 "nonimmediate_operand" "=d,d,d,R,o") (match_operand:DF 1 "general_operand" "dG,R,oF,d,d"))] ! "(TARGET_SOFT_FLOAT || TARGET_SINGLE_FLOAT) && (register_operand (operands[0], DFmode) || register_operand (operands[1], DFmode) *************** *** 3192,3195 **** --- 3548,3564 ---- "") + ;; Instructions to load the global pointer register. + ;; This is volatile to make sure that the scheduler won't move any symbol_ref + ;; uses in front of it. All symbol_refs implicitly use the gp reg. + + (define_insn "loadgp" + [(set (reg:DI 28) + (unspec_volatile [(match_operand:DI 0 "address_operand" "")] 2)) + (clobber (reg:DI 1))] + "" + "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,$25%]" + [(set_attr "type" "move") + (set_attr "mode" "DI") + (set_attr "length" "3")]) ;; Block moves, see mips.c for more details. *************** *** 3323,3327 **** { 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\"; --- 3692,3696 ---- { if (GET_CODE (operands[2]) == CONST_INT) ! operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f); return \"sll\\t%0,%1,%2\"; *************** *** 3393,3397 **** "* { ! operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f); operands[4] = const0_rtx; return \"sll\\t%M0,%L1,%2\;move\\t%L0,%z4\"; --- 3762,3766 ---- "* { ! operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f); operands[4] = const0_rtx; return \"sll\\t%M0,%L1,%2\;move\\t%L0,%z4\"; *************** *** 3415,3419 **** (set (subreg:SI (match_dup 0) 0) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);") --- 3784,3788 ---- (set (subreg:SI (match_dup 0) 0) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f);") *************** *** 3431,3435 **** (set (subreg:SI (match_dup 0) 1) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);") --- 3800,3804 ---- (set (subreg:SI (match_dup 0) 1) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f);") *************** *** 3550,3554 **** { 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\"; --- 3919,3923 ---- { if (GET_CODE (operands[2]) == CONST_INT) ! operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f); return \"sra\\t%0,%1,%2\"; *************** *** 3620,3624 **** "* { ! operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f); return \"sra\\t%L0,%M1,%2\;sra\\t%M0,%M1,31\"; }" --- 3989,3993 ---- "* { ! operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f); return \"sra\\t%L0,%M1,%2\;sra\\t%M0,%M1,31\"; }" *************** *** 3641,3645 **** (set (subreg:SI (match_dup 0) 1) (ashiftrt:SI (subreg:SI (match_dup 1) 1) (const_int 31)))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);") --- 4010,4014 ---- (set (subreg:SI (match_dup 0) 1) (ashiftrt:SI (subreg:SI (match_dup 1) 1) (const_int 31)))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f);") *************** *** 3657,3661 **** (set (subreg:SI (match_dup 0) 0) (ashiftrt:SI (subreg:SI (match_dup 1) 0) (const_int 31)))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);") --- 4026,4030 ---- (set (subreg:SI (match_dup 0) 0) (ashiftrt:SI (subreg:SI (match_dup 1) 0) (const_int 31)))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f);") *************** *** 3775,3779 **** { 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\"; --- 4144,4148 ---- { if (GET_CODE (operands[2]) == CONST_INT) ! operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f); return \"srl\\t%0,%1,%2\"; *************** *** 3845,3849 **** "* { ! operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f); operands[4] = const0_rtx; return \"srl\\t%L0,%M1,%2\;move\\t%M0,%z4\"; --- 4214,4218 ---- "* { ! operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f); operands[4] = const0_rtx; return \"srl\\t%L0,%M1,%2\;move\\t%M0,%z4\"; *************** *** 3867,3871 **** (set (subreg:SI (match_dup 0) 1) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);") --- 4236,4240 ---- (set (subreg:SI (match_dup 0) 1) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f);") *************** *** 3883,3887 **** (set (subreg:SI (match_dup 0) 0) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);") --- 4252,4256 ---- (set (subreg:SI (match_dup 0) 0) (const_int 0))] ! "operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0x1f);") *************** *** 4082,4086 **** (compare:CC_FP (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT" " { --- 4451,4455 ---- (compare:CC_FP (match_operand:DF 0 "register_operand" "") (match_operand:DF 1 "register_operand" "")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" " { *************** *** 4120,4124 **** (define_insn "branch_fp_ne" [(set (pc) ! (if_then_else (ne:CC_FP (reg:CC_FP 66) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") --- 4489,4493 ---- (define_insn "branch_fp_ne" [(set (pc) ! (if_then_else (ne:CC_FP (reg:CC_FP 67) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") *************** *** 4136,4140 **** (define_insn "branch_fp_ne_rev" [(set (pc) ! (if_then_else (ne:CC_REV_FP (reg:CC_REV_FP 66) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") --- 4505,4509 ---- (define_insn "branch_fp_ne_rev" [(set (pc) ! (if_then_else (ne:CC_REV_FP (reg:CC_REV_FP 67) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") *************** *** 4152,4156 **** (define_insn "branch_fp_eq" [(set (pc) ! (if_then_else (eq:CC_FP (reg:CC_FP 66) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") --- 4521,4525 ---- (define_insn "branch_fp_eq" [(set (pc) ! (if_then_else (eq:CC_FP (reg:CC_FP 67) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") *************** *** 4168,4172 **** (define_insn "branch_fp_eq_rev" [(set (pc) ! (if_then_else (eq:CC_REV_FP (reg:CC_REV_FP 66) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") --- 4537,4541 ---- (define_insn "branch_fp_eq_rev" [(set (pc) ! (if_then_else (eq:CC_REV_FP (reg:CC_REV_FP 67) (const_int 0)) (match_operand 0 "pc_or_label_operand" "") *************** *** 5204,5211 **** (define_insn "seq_df" ! [(set (reg:CC_FP 66) (eq:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { --- 5573,5580 ---- (define_insn "seq_df" ! [(set (reg:CC_FP 67) (eq:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 5222,5229 **** (define_insn "sne_df" ! [(set (reg:CC_REV_FP 66) (ne:CC_REV_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { --- 5591,5598 ---- (define_insn "sne_df" ! [(set (reg:CC_REV_FP 67) (ne:CC_REV_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 5240,5247 **** (define_insn "slt_df" ! [(set (reg:CC_FP 66) (lt:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { --- 5609,5616 ---- (define_insn "slt_df" ! [(set (reg:CC_FP 67) (lt:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 5258,5265 **** (define_insn "sle_df" ! [(set (reg:CC_FP 66) (le:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { --- 5627,5634 ---- (define_insn "sle_df" ! [(set (reg:CC_FP 67) (le:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 5276,5283 **** (define_insn "sgt_df" ! [(set (reg:CC_FP 66) (gt:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { --- 5645,5652 ---- (define_insn "sgt_df" ! [(set (reg:CC_FP 67) (gt:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 5294,5301 **** (define_insn "sge_df" ! [(set (reg:CC_FP 66) (ge:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { --- 5663,5670 ---- (define_insn "sge_df" ! [(set (reg:CC_FP 67) (ge:CC_FP (match_operand:DF 0 "register_operand" "f") (match_operand:DF 1 "register_operand" "f")))] ! "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" "* { *************** *** 5312,5316 **** (define_insn "seq_sf" ! [(set (reg:CC_FP 66) (eq:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] --- 5681,5685 ---- (define_insn "seq_sf" ! [(set (reg:CC_FP 67) (eq:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] *************** *** 5330,5334 **** (define_insn "sne_sf" ! [(set (reg:CC_REV_FP 66) (ne:CC_REV_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] --- 5699,5703 ---- (define_insn "sne_sf" ! [(set (reg:CC_REV_FP 67) (ne:CC_REV_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] *************** *** 5348,5352 **** (define_insn "slt_sf" ! [(set (reg:CC_FP 66) (lt:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] --- 5717,5721 ---- (define_insn "slt_sf" ! [(set (reg:CC_FP 67) (lt:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] *************** *** 5366,5370 **** (define_insn "sle_sf" ! [(set (reg:CC_FP 66) (le:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] --- 5735,5739 ---- (define_insn "sle_sf" ! [(set (reg:CC_FP 67) (le:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] *************** *** 5384,5388 **** (define_insn "sgt_sf" ! [(set (reg:CC_FP 66) (gt:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] --- 5753,5757 ---- (define_insn "sgt_sf" ! [(set (reg:CC_FP 67) (gt:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] *************** *** 5402,5406 **** (define_insn "sge_sf" ! [(set (reg:CC_FP 66) (ge:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] --- 5771,5775 ---- (define_insn "sge_sf" ! [(set (reg:CC_FP 67) (ge:CC_FP (match_operand:SF 0 "register_operand" "f") (match_operand:SF 1 "register_operand" "f")))] *************** *** 5437,5441 **** if (GET_CODE (operands[0]) == REG) return \"%*j\\t%0\"; ! else return \"%*j\\t%l0\"; }" --- 5806,5815 ---- if (GET_CODE (operands[0]) == REG) return \"%*j\\t%0\"; ! /* ??? I don't know why this is necessary. This works around an ! assembler problem that appears when a label is defined, then referenced ! in a switch table, then used in a `j' instruction. */ ! else if (ABI_64BIT && mips_isa >= 3) ! return \"%*b\\t%l0\"; ! else return \"%*j\\t%l0\"; }" *************** *** 5513,5517 **** { /* .cpadd expands to add REG,REG,$gp when pic, and nothing when not pic. */ ! if (TARGET_ABICALLS) output_asm_insn (\".cpadd\\t%0\", operands); return \"%*j\\t%0\"; --- 5887,5891 ---- { /* .cpadd expands to add REG,REG,$gp when pic, and nothing when not pic. */ ! if (TARGET_ABICALLS && (! ABI_64BIT || mips_isa < 3)) output_asm_insn (\".cpadd\\t%0\", operands); return \"%*j\\t%0\"; *************** *** 5532,5537 **** { /* .cpdadd expands to dadd REG,REG,$gp when pic, and nothing when not pic. */ ! if (TARGET_ABICALLS) ! output_asm_insn (\".cpdadd\\t%0\", operands); return \"%*j\\t%0\"; }" --- 5906,5912 ---- { /* .cpdadd expands to dadd REG,REG,$gp when pic, and nothing when not pic. */ ! /* ??? SGI as does not have a .cpdadd. */ ! if (TARGET_ABICALLS && (! ABI_64BIT || mips_isa < 3)) ! output_asm_insn (\".cpadd\\t%0\", operands); return \"%*j\\t%0\"; }" *************** *** 5695,5699 **** (define_insn "get_fnaddr" ! [(set (match_operand 0 "register_operand" "d") (unspec [(match_operand 1 "" "")] 1)) (clobber (reg:SI 31))] --- 6070,6074 ---- (define_insn "get_fnaddr" ! [(set (match_operand 0 "register_operand" "=d") (unspec [(match_operand 1 "" "")] 1)) (clobber (reg:SI 31))] *************** *** 5771,5775 **** { operands[0] = target; ! return \"%*%[li\\t%@,%0\\n\\tjal\\t%2,%@%]\"; } --- 6146,6150 ---- { operands[0] = target; ! return \"%[li\\t%@,%0\\n\\t%*jal\\t%2,%@%]\"; } *************** *** 5928,5932 **** { operands[1] = target; ! return \"%*%[li\\t%@,%1\\n\\tjal\\t%3,%@%]\"; } --- 6303,6307 ---- { operands[1] = target; ! return \"%[li\\t%@,%1\\n\\t%*jal\\t%3,%@%]\"; } *************** *** 6084,6085 **** --- 6459,6674 ---- /* fall through and generate default code */ }") + + ;; + ;; MIPS4 Conditional move instructions. + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d,d") + (if_then_else:SI + (match_operator 4 "equality_op" + [(match_operand:SI 1 "register_operand" "d,d") + (const_int 0)]) + (match_operand:SI 2 "reg_or_0_operand" "dJ,0") + (match_operand:SI 3 "reg_or_0_operand" "0,dJ")))] + "mips_isa >= 4" + "@ + mov%B4\\t%0,%z2,%1 + mov%b4\\t%0,%z3,%1" + [(set_attr "type" "move") + (set_attr "mode" "SI")]) + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d,d") + (if_then_else:SI + (match_operator 3 "equality_op" [(reg:CC_FP 67) (const_int 0)]) + (match_operand:SI 1 "reg_or_0_operand" "dJ,0") + (match_operand:SI 2 "reg_or_0_operand" "0,dJ")))] + "mips_isa >= 4" + "@ + mov%T3\\t%0,%z1,$fcc0 + mov%t3\\t%0,%z2,$fcc0" + [(set_attr "type" "move") + (set_attr "mode" "SI")]) + + (define_insn "" + [(set (match_operand:DI 0 "register_operand" "=d,d") + (if_then_else:DI + (match_operator 4 "equality_op" + [(match_operand:DI 1 "register_operand" "d,d") + (const_int 0)]) + (match_operand:DI 2 "reg_or_0_operand" "dJ,0") + (match_operand:DI 3 "reg_or_0_operand" "0,dJ")))] + "mips_isa >= 4" + "@ + mov%B4\\t%0,%z2,%1 + mov%b4\\t%0,%z3,%1" + [(set_attr "type" "move") + (set_attr "mode" "DI")]) + + (define_insn "" + [(set (match_operand:DI 0 "register_operand" "=d,d") + (if_then_else:DI + (match_operator 3 "equality_op" [(reg:CC_FP 67) (const_int 0)]) + (match_operand:DI 1 "reg_or_0_operand" "dJ,0") + (match_operand:DI 2 "reg_or_0_operand" "0,dJ")))] + "mips_isa >= 4" + "@ + mov%T3\\t%0,%z1,$fcc0 + mov%t3\\t%0,%z2,$fcc0" + [(set_attr "type" "move") + (set_attr "mode" "DI")]) + + (define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f,f") + (if_then_else:SF + (match_operator 4 "equality_op" + [(match_operand:SI 1 "register_operand" "d,d") + (const_int 0)]) + (match_operand:SF 2 "register_operand" "f,0") + (match_operand:SF 3 "register_operand" "0,f")))] + "mips_isa >= 4 && TARGET_HARD_FLOAT" + "@ + mov%B4.s\\t%0,%2,%1 + mov%b4.s\\t%0,%3,%1" + [(set_attr "type" "move") + (set_attr "mode" "SF")]) + + (define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f,f") + (if_then_else:SF + (match_operator 3 "equality_op" [(reg:CC_FP 67) (const_int 0)]) + (match_operand:SF 1 "register_operand" "f,0") + (match_operand:SF 2 "register_operand" "0,f")))] + "mips_isa >= 4 && TARGET_HARD_FLOAT" + "@ + mov%T3.s\\t%0,%1,$fcc0 + mov%t3.s\\t%0,%2,$fcc0" + [(set_attr "type" "move") + (set_attr "mode" "SF")]) + + (define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f,f") + (if_then_else:DF + (match_operator 4 "equality_op" + [(match_operand:SI 1 "register_operand" "d,d") + (const_int 0)]) + (match_operand:DF 2 "register_operand" "f,0") + (match_operand:DF 3 "register_operand" "0,f")))] + "mips_isa >= 4 && TARGET_HARD_FLOAT" + "@ + mov%B4.d\\t%0,%2,%1 + mov%b4.d\\t%0,%3,%1" + [(set_attr "type" "move") + (set_attr "mode" "DF")]) + + (define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f,f") + (if_then_else:DF + (match_operator 3 "equality_op" [(reg:CC_FP 67) (const_int 0)]) + (match_operand:DF 1 "register_operand" "f,0") + (match_operand:DF 2 "register_operand" "0,f")))] + "mips_isa >= 4 && TARGET_HARD_FLOAT" + "@ + mov%T3.d\\t%0,%1,$fcc0 + mov%t3.d\\t%0,%2,$fcc0" + [(set_attr "type" "move") + (set_attr "mode" "DF")]) + + ;; These are the main define_expand's used to make conditional moves. + + (define_expand "movsicc" + [(set (match_dup 4) (match_operand 1 "comparison_operator" "")) + (set (match_operand:SI 0 "register_operand" "") + (if_then_else:SI (match_dup 5) + (match_operand:SI 2 "reg_or_0_operand" "") + (match_operand:SI 3 "reg_or_0_operand" "")))] + "mips_isa >= 4" + " + { + rtx op0 = branch_cmp[0]; + rtx op1 = branch_cmp[1]; + enum machine_mode mode = GET_MODE (branch_cmp[0]); + enum rtx_code compare_code = GET_CODE (operands[1]); + enum rtx_code move_code = NE; + + if (GET_MODE_CLASS (mode) != MODE_FLOAT) + { + switch (compare_code) + { + case EQ: + compare_code = XOR; + move_code = EQ; + break; + case NE: + compare_code = XOR; + break; + case LT: + break; + case GE: + compare_code = LT; + move_code = EQ; + break; + case GT: + compare_code = LT; + op0 = force_reg (mode, branch_cmp[1]); + op1 = branch_cmp[0]; + break; + case LE: + compare_code = LT; + op0 = force_reg (mode, branch_cmp[1]); + op1 = branch_cmp[0]; + move_code = EQ; + break; + case LTU: + break; + case GEU: + compare_code = LTU; + move_code = EQ; + break; + case GTU: + compare_code = LTU; + op0 = force_reg (mode, branch_cmp[1]); + op1 = branch_cmp[0]; + break; + case LEU: + compare_code = LTU; + op0 = force_reg (mode, branch_cmp[1]); + op1 = branch_cmp[0]; + move_code = EQ; + break; + default: + abort (); + } + } + else + { + if (compare_code == NE) + { + /* ??? Perhaps we need to use CC_FP_REVmode here? */ + compare_code = EQ; + move_code = EQ; + } + } + + if (mode == SImode || mode == DImode) + { + operands[1] = gen_rtx (compare_code, mode, op0, op1); + operands[4] = gen_reg_rtx (mode); + } + else if (mode == SFmode || mode == DFmode) + { + operands[1] = gen_rtx (compare_code, CC_FPmode, op0, op1); + operands[4] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM); + } + + if (mode == DImode) + operands[5] = gen_rtx (move_code, VOIDmode, + gen_lowpart (SImode, operands[4]), + CONST0_RTX (SImode)); + else + operands[5] = gen_rtx (move_code, VOIDmode, operands[4], + CONST0_RTX (SImode)); + }") + + ;; ??? Need movdicc, movsfcc, and movdfcc patterns. They should be + ;; very similar to the above movsicc pattern. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/netbsd.h gcc-2.7.0/config/mips/netbsd.h *** gcc-2.6.3/config/mips/netbsd.h --- gcc-2.7.0/config/mips/netbsd.h Thu Jun 15 15:34:12 1995 *************** *** 0 **** --- 1,231 ---- + /* Definitions for DECstation running BSD as target machine for GNU compiler. + Copyright (C) 1993 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define DECSTATION + + /* Look for the include files in the system-defined places. */ + + #ifndef CROSS_COMPILE + #undef GPLUSPLUS_INCLUDE_DIR + #define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++" + + #undef GCC_INCLUDE_DIR + #define GCC_INCLUDE_DIR "/usr/include" + + #undef INCLUDE_DEFAULTS + #define INCLUDE_DEFAULTS \ + { \ + { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, \ + { GCC_INCLUDE_DIR, 0, 0 }, \ + { 0, 0, 0 } \ + } + + /* Under NetBSD, the normal location of the various *crt*.o files is the + /usr/lib directory. */ + + #undef STANDARD_STARTFILE_PREFIX + #define STANDARD_STARTFILE_PREFIX "/usr/lib/" + #endif + + /* Provide a LINK_SPEC appropriate for NetBSD. Here we provide support + for the special GCC options -static, -assert, and -nostdlib. */ + + #undef LINK_SPEC + #define LINK_SPEC \ + "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ + %{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{static:-Bstatic} %{assert*}" + + /* We have atexit(3). */ + + #define HAVE_ATEXIT + + /* Implicit library calls should use memcpy, not bcopy, etc. */ + + #define TARGET_MEM_FUNCTIONS + + /* Define mips-specific netbsd predefines... */ + #ifndef CPP_PREDEFINES + #define CPP_PREDEFINES "-D__ANSI_COMPAT \ + -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__NetBSD__ -Dmips \ + -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \ + -Dunix -D_R3000 \ + -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)" + #endif + + /* Always uses gas. */ + #ifndef ASM_SPEC + #define ASM_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \ + %{noasmopt:-O0} \ + %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ + %{g} %{g0} %{g1} %{g2} %{g3} \ + %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ + %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ + %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ + %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}" + #endif + + #ifndef CPP_SPEC + #define CPP_SPEC "\ + %{posix:-D_POSIX_SOURCE} \ + %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ + %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ + %{mips3:-U__mips -D__mips=3}" + #endif + + #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" + #define STARTFILE_SPEC "" + + #ifndef MACHINE_TYPE + #define MACHINE_TYPE "NetBSD/pmax" + #endif + + #define TARGET_DEFAULT MASK_GAS + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + #define LOCAL_LABEL_PREFIX "." + + #include "mips/mips.h" + + /* + * Some imports from svr4.h in support of shared libraries. + * Currently, we need the DECLARE_OBJECT_SIZE stuff. + */ + + /* Define the strings used for the special svr4 .type and .size directives. + These strings generally do not vary from one system running svr4 to + another, but if a given system (e.g. m88k running svr) needs to use + different pseudo-op names for these, they may be overridden in the + file which includes this one. */ + + #undef TYPE_ASM_OP + #undef SIZE_ASM_OP + #undef WEAK_ASM_OP + #define TYPE_ASM_OP ".type" + #define SIZE_ASM_OP ".size" + #define WEAK_ASM_OP ".weak" + + /* The following macro defines the format used to output the second + operand of the .type assembler directive. Different svr4 assemblers + expect various different forms for this operand. The one given here + is just a default. You may need to override it in your machine- + specific tm.h file (depending upon the particulars of your assembler). */ + + #undef TYPE_OPERAND_FMT + #define TYPE_OPERAND_FMT "@%s" + + /* Write the extra assembler code needed to declare a function's result. + Most svr4 assemblers don't require any special declaration of the + result value, but there are exceptions. */ + + #ifndef ASM_DECLARE_RESULT + #define ASM_DECLARE_RESULT(FILE, RESULT) + #endif + + /* These macros generate the special .type and .size directives which + are used to set the corresponding fields of the linker symbol table + entries in an ELF object file under SVR4. These macros also output + the starting labels for the relevant functions/objects. */ + + /* Write the extra assembler code needed to declare a function properly. + Some svr4 assemblers need to also have something extra said about the + function's return value. We allow for that here. */ + + #undef ASM_DECLARE_FUNCTION_NAME + #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ + putc ('\n', FILE); \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + + /* Write the extra assembler code needed to declare an object properly. */ + + #undef ASM_DECLARE_OBJECT_NAME + #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ + do { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ + putc ('\n', FILE); \ + size_directive_output = 0; \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + + /* Output the size directive for a decl in rest_of_decl_compilation + in the case where we did not do so before the initializer. + Once we find the error_mark_node, we know that the value of + size_directive_output was set + by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ + + #undef ASM_FINISH_DECLARE_OBJECT + #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ + do { \ + char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ + && ! AT_END && TOP_LEVEL \ + && DECL_INITIAL (DECL) == error_mark_node \ + && !size_directive_output) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, name); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + } while (0) + + /* This is how to declare the size of a function. */ + + #undef ASM_DECLARE_FUNCTION_SIZE + #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do { \ + if (!flag_inhibit_size_directive) \ + { \ + char label[256]; \ + static int labelno; \ + labelno++; \ + ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ + ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, (FNAME)); \ + fprintf (FILE, ","); \ + assemble_name (FILE, label); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, (FNAME)); \ + putc ('\n', FILE); \ + } \ + } while (0) + + /* Since gas and gld are standard on NetBSD, we don't need these */ + #undef ASM_FINAL_SPEC + #undef STARTFILE_SPEC + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/news4-gdb.h gcc-2.7.0/config/mips/news4-gdb.h *** gcc-2.6.3/config/mips/news4-gdb.h Tue Jan 5 15:08:28 1993 --- gcc-2.7.0/config/mips/news4-gdb.h Thu Jun 15 15:34:23 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/news4.h gcc-2.7.0/config/mips/news4.h *** gcc-2.6.3/config/mips/news4.h Wed May 4 14:17:57 1994 --- gcc-2.7.0/config/mips/news4.h Thu Jun 15 15:34:33 1995 *************** *** 16,20 **** 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. */ #define MIPS_NEWS --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_NEWS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/news5-gdb.h gcc-2.7.0/config/mips/news5-gdb.h *** gcc-2.6.3/config/mips/news5-gdb.h Tue Jan 5 15:08:29 1993 --- gcc-2.7.0/config/mips/news5-gdb.h Thu Jun 15 15:34:42 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/news5.h gcc-2.7.0/config/mips/news5.h *** gcc-2.6.3/config/mips/news5.h Wed May 4 14:18:00 1994 --- gcc-2.7.0/config/mips/news5.h Thu Jun 15 15:34:55 1995 *************** *** 16,20 **** 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. */ #define MIPS_SYSV --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_SYSV diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/nws3250v4.h gcc-2.7.0/config/mips/nws3250v4.h *** gcc-2.6.3/config/mips/nws3250v4.h Wed May 4 14:18:03 1994 --- gcc-2.7.0/config/mips/nws3250v4.h Thu Jun 15 15:35:05 1995 *************** *** 16,20 **** 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. */ #define MIPS_NEWS --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_NEWS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/osfrose.h gcc-2.7.0/config/mips/osfrose.h *** gcc-2.6.3/config/mips/osfrose.h Wed May 4 14:18:07 1994 --- gcc-2.7.0/config/mips/osfrose.h Thu Jun 15 15:35:14 1995 *************** *** 17,21 **** 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. */ #define DECSTATION --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define DECSTATION *************** *** 81,85 **** %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3}" /* ??? This assumes that GNU as is always used with GNU ld, and MIPS as is --- 82,88 ---- %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ %{!mlong64:-D__PTRDIFF_TYPE__=int} \ ! %{mips3:-U__mips -D__mips=3} \ ! %{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \ ! %{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}}" /* ??? This assumes that GNU as is always used with GNU ld, and MIPS as is diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr3-4-gdb.h gcc-2.7.0/config/mips/svr3-4-gdb.h *** gcc-2.6.3/config/mips/svr3-4-gdb.h Tue Jan 5 15:08:30 1993 --- gcc-2.7.0/config/mips/svr3-4-gdb.h Thu Jun 15 15:35:25 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr3-4.h gcc-2.7.0/config/mips/svr3-4.h *** gcc-2.6.3/config/mips/svr3-4.h Wed May 4 14:18:11 1994 --- gcc-2.7.0/config/mips/svr3-4.h Thu Jun 15 15:35:33 1995 *************** *** 16,20 **** 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. */ #define MIPS_SYSV --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_SYSV diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr3-5-gdb.h gcc-2.7.0/config/mips/svr3-5-gdb.h *** gcc-2.6.3/config/mips/svr3-5-gdb.h Tue Jan 5 15:08:31 1993 --- gcc-2.7.0/config/mips/svr3-5-gdb.h Thu Jun 15 15:35:42 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr3-5.h gcc-2.7.0/config/mips/svr3-5.h *** gcc-2.6.3/config/mips/svr3-5.h Sun Aug 14 19:05:20 1994 --- gcc-2.7.0/config/mips/svr3-5.h Thu Jun 15 15:35:53 1995 *************** *** 16,20 **** 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. */ #define MIPS_SYSV --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_SYSV diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr4-4-gdb.h gcc-2.7.0/config/mips/svr4-4-gdb.h *** gcc-2.6.3/config/mips/svr4-4-gdb.h Tue Jan 5 15:08:31 1993 --- gcc-2.7.0/config/mips/svr4-4-gdb.h Thu Jun 15 15:36:01 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr4-4.h gcc-2.7.0/config/mips/svr4-4.h *** gcc-2.6.3/config/mips/svr4-4.h Wed May 4 14:18:18 1994 --- gcc-2.7.0/config/mips/svr4-4.h Thu Jun 15 15:36:10 1995 *************** *** 16,20 **** 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. */ #define MIPS_SVR4 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_SVR4 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr4-5-gdb.h gcc-2.7.0/config/mips/svr4-5-gdb.h *** gcc-2.6.3/config/mips/svr4-5-gdb.h Tue Jan 5 15:08:32 1993 --- gcc-2.7.0/config/mips/svr4-5-gdb.h Thu Jun 15 15:36:20 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr4-5.h gcc-2.7.0/config/mips/svr4-5.h *** gcc-2.6.3/config/mips/svr4-5.h Sun Aug 14 19:05:23 1994 --- gcc-2.7.0/config/mips/svr4-5.h Thu Jun 15 15:36:36 1995 *************** *** 16,20 **** 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. */ #define MIPS_SVR4 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define MIPS_SVR4 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/svr4-t.h gcc-2.7.0/config/mips/svr4-t.h *** gcc-2.6.3/config/mips/svr4-t.h Mon Jan 31 19:16:41 1994 --- gcc-2.7.0/config/mips/svr4-t.h Fri May 12 02:19:03 1995 *************** *** 11,12 **** --- 11,30 ---- #undef MD_STARTFILE_PREFIX #undef MD_EXEC_PREFIX + #define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" + #define MD_EXEC_PREFIX "/usr/lib/cmplrs/cc/" + + /* These are the same as the ones in svr4-5.h, except that references to + /svr4/ have been removed. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\ + %{ansi:/usr/lib/values-Xc.o%s} \ + %{!ansi: \ + %{traditional:/usr/lib/values-Xt.o%s} \ + %{!traditional:/usr/lib/values-Xa.o%s}}" + + #undef LINK_SPEC + #define LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \ + %{bestGnum} %{shared} %{non_shared} \ + %{call_shared} %{no_archive} %{exact_version} \ + %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-bsd gcc-2.7.0/config/mips/t-bsd *** gcc-2.6.3/config/mips/t-bsd Fri Oct 8 07:41:09 1993 --- gcc-2.7.0/config/mips/t-bsd Thu Jan 12 13:25:41 1995 *************** *** 9,12 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 9,12 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-bsd-gas gcc-2.7.0/config/mips/t-bsd-gas *** gcc-2.6.3/config/mips/t-bsd-gas Thu Sep 9 16:02:36 1993 --- gcc-2.7.0/config/mips/t-bsd-gas Thu Jan 12 13:25:43 1995 *************** *** 5,8 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 5,8 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-cross64 gcc-2.7.0/config/mips/t-cross64 *** gcc-2.6.3/config/mips/t-cross64 --- gcc-2.7.0/config/mips/t-cross64 Sat Feb 4 13:12:36 1995 *************** *** 0 **** --- 1,19 ---- + SYSTEM_HEADER_DIR = /usr/cross64/usr/include + + AR = /usr/cross64/usr/bin/ar + + FLOAT_H = $(CROSS_FLOAT_H) + + # The rest of the file is identical to t-iris6. + + # Suppress building libgcc1.a, since the MIPS compiler port is complete + # and does not need anything from libgcc1.a. + LIBGCC1 = + CROSS_LIBGCC1 = + + MULTILIB_OPTIONS=mips1/mips2/mips3/mips4 + MULTILIB_DIRNAMES= + MULTILIB_MATCHES= + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-ecoff gcc-2.7.0/config/mips/t-ecoff *** gcc-2.6.3/config/mips/t-ecoff --- gcc-2.7.0/config/mips/t-ecoff Thu Jan 19 18:34:45 1995 *************** *** 0 **** --- 1,75 ---- + CONFIG2_H = $(srcdir)/config/mips/ecoff.h + + # We have a premade insn-attrtab.c to save the hour it takes to run genattrtab. + # PREMADE_ATTRTAB = $(srcdir)/config/mips/mips-at.c + # PREMADE_ATTRTAB_MD = $(srcdir)/config/mips/mips-at.md + + # Suppress building libgcc1.a, since the MIPS compiler port is complete + # and does not need anything from libgcc1.a. + LIBGCC1 = + CROSS_LIBGCC1 = + + # We must build libgcc2.a with -G 0, in case the user wants to link + # without the $gp register. + LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1 -G 0 + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... [taken from t-sparclite] + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > dp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c + echo '#endif' >> dp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#ifdef __MIPSEL__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c + echo '#endif' >> fp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # Build the libraries for both hard and soft floating point + + MULTILIB_OPTIONS = msoft-float EL/EB mips1/mips3 + MULTILIB_DIRNAMES = soft-float el eb mips1 mips3 + MULTILIB_MATCHES = + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib + + # Add additional dependencies to recompile selected modules whenever the + # tm.h file changes. The files compiled are: + # + # gcc.c (*_SPEC changes) + # toplev.c (new switches + assembly output changes) + # sdbout.c (debug format changes) + # dbxout.c (debug format changes) + # dwarfout.c (debug format changes) + # final.c (assembly output changes) + # varasm.c (assembly output changes) + # cse.c (cost functions) + # insn-output.c (possible ifdef changes in tm.h) + # regclass.c (fixed/call used register changes) + # cccp.c (new preprocessor macros, -v version #) + # explow.c (GO_IF_LEGITIMATE_ADDRESS) + # recog.c (GO_IF_LEGITIMATE_ADDRESS) + # reload.c (GO_IF_LEGITIMATE_ADDRESS) + + gcc.o: $(CONFIG2_H) + toplev.o: $(CONFIG2_H) + sdbout.o: $(CONFIG2_H) + dbxout.o: $(CONFIG2_H) + dwarfout.o: $(CONFIG2_H) + final.o: $(CONFIG2_H) + varasm.o: $(CONFIG2_H) + cse.o: $(CONFIG2_H) + insn-output.o: $(CONFIG2_H) + regclass.o: $(CONFIG2_H) + cccp.o: $(CONFIG2_H) + explow.o: $(CONFIG2_H) + recog.o: $(CONFIG2_H) + reload.o: $(CONFIG2_H) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-iris6 gcc-2.7.0/config/mips/t-iris6 *** gcc-2.6.3/config/mips/t-iris6 --- gcc-2.7.0/config/mips/t-iris6 Sat Feb 4 13:13:53 1995 *************** *** 0 **** --- 1,11 ---- + # Suppress building libgcc1.a, since the MIPS compiler port is complete + # and does not need anything from libgcc1.a. + LIBGCC1 = + CROSS_LIBGCC1 = + + MULTILIB_OPTIONS=mips1/mips2/mips3/mips4 + MULTILIB_DIRNAMES= + MULTILIB_MATCHES= + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-mips gcc-2.7.0/config/mips/t-mips *** gcc-2.6.3/config/mips/t-mips Fri Oct 8 07:41:13 1993 --- gcc-2.7.0/config/mips/t-mips Thu Jan 12 13:25:50 1995 *************** *** 5,8 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 5,15 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = ! ! MULTILIB_OPTIONS=EL/EB ! MULTILIB_DIRNAMES=el eb ! MULTILIB_MATCHES= ! ! LIBGCC = stmp-multilib ! INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-mips-gas gcc-2.7.0/config/mips/t-mips-gas *** gcc-2.6.3/config/mips/t-mips-gas Thu Sep 9 16:02:37 1993 --- gcc-2.7.0/config/mips/t-mips-gas Thu Jan 12 13:25:53 1995 *************** *** 1,4 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 1,11 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = ! ! MULTILIB_OPTIONS=EL/EB ! MULTILIB_DIRNAMES=el eb ! MULTILIB_MATCHES= ! ! LIBGCC = stmp-multilib ! INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-osfrose gcc-2.7.0/config/mips/t-osfrose *** gcc-2.6.3/config/mips/t-osfrose Sun Dec 12 07:47:14 1993 --- gcc-2.7.0/config/mips/t-osfrose Thu Jan 12 13:25:57 1995 *************** *** 5,8 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 5,8 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-svr3 gcc-2.7.0/config/mips/t-svr3 *** gcc-2.6.3/config/mips/t-svr3 Fri Oct 8 07:41:16 1993 --- gcc-2.7.0/config/mips/t-svr3 Thu Jan 12 13:25:59 1995 *************** *** 9,12 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 9,12 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-svr3-gas gcc-2.7.0/config/mips/t-svr3-gas *** gcc-2.6.3/config/mips/t-svr3-gas Thu Sep 9 16:02:39 1993 --- gcc-2.7.0/config/mips/t-svr3-gas Thu Jan 12 13:26:02 1995 *************** *** 5,8 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 5,8 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-svr4 gcc-2.7.0/config/mips/t-svr4 *** gcc-2.6.3/config/mips/t-svr4 Fri Oct 8 07:41:20 1993 --- gcc-2.7.0/config/mips/t-svr4 Thu Jan 12 13:26:04 1995 *************** *** 9,12 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 9,12 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-svr4-gas gcc-2.7.0/config/mips/t-svr4-gas *** gcc-2.6.3/config/mips/t-svr4-gas Thu Sep 9 16:02:41 1993 --- gcc-2.7.0/config/mips/t-svr4-gas Thu Jan 12 13:26:07 1995 *************** *** 5,8 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 5,8 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/t-ultrix gcc-2.7.0/config/mips/t-ultrix *** gcc-2.6.3/config/mips/t-ultrix Fri Oct 8 07:41:23 1993 --- gcc-2.7.0/config/mips/t-ultrix Thu Jan 12 13:26:10 1995 *************** *** 7,10 **** # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 7,10 ---- # Suppress building libgcc1.a, since the MIPS compiler port is complete # and does not need anything from libgcc1.a. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/ultrix-gdb.h gcc-2.7.0/config/mips/ultrix-gdb.h *** gcc-2.6.3/config/mips/ultrix-gdb.h Tue Jan 5 15:08:33 1993 --- gcc-2.7.0/config/mips/ultrix-gdb.h Thu Jun 15 15:36:45 1995 *************** *** 17,21 **** 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. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/ultrix.h gcc-2.7.0/config/mips/ultrix.h *** gcc-2.6.3/config/mips/ultrix.h Wed May 4 14:18:25 1994 --- gcc-2.7.0/config/mips/ultrix.h Thu Jun 15 15:36:53 1995 *************** *** 16,20 **** 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. */ #define DECSTATION --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define DECSTATION diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/x-iris gcc-2.7.0/config/mips/x-iris *** gcc-2.6.3/config/mips/x-iris Wed May 18 19:06:24 1994 --- gcc-2.7.0/config/mips/x-iris Mon Apr 17 19:28:06 1995 *************** *** 26,28 **** # Find all of the declarations from the header files ! FIXPROTO_DEFINES= -D__EXTENSIONS__ --- 26,28 ---- # Find all of the declarations from the header files ! FIXPROTO_DEFINES= -D__EXTENSIONS__ -D_LANGUAGE_C_PLUS_PLUS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/x-iris6 gcc-2.7.0/config/mips/x-iris6 *** gcc-2.6.3/config/mips/x-iris6 --- gcc-2.7.0/config/mips/x-iris6 Mon Apr 17 19:28:07 1995 *************** *** 0 **** --- 1,2 ---- + # Find all of the declarations from the header files + FIXPROTO_DEFINES= -D__EXTENSIONS__ -D_LANGUAGE_C_PLUS_PLUS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/x-netbsd gcc-2.7.0/config/mips/x-netbsd *** gcc-2.6.3/config/mips/x-netbsd --- gcc-2.7.0/config/mips/x-netbsd Thu May 11 19:19:39 1995 *************** *** 0 **** --- 1,16 ---- + # Don't run fixproto + STMP_FIXPROTO = + + # We don't need GCC's own include files. + USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/varargs.h \ + $(srcdir)/ginclude/va-mips.h + XLIMITS_H = + + # We don't need even the files GCC insists we need. + GENINCLUDES = Makefile.in + + # A lot of stuff needs to go elsewhere. + includedir=$(exec_prefix)/include + infodir=$(exec_prefix)/share/info + tooldir=$(libdir)/cross/$(target) + mandir=$(exec_prefix)/share/man/man1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/x-sysv gcc-2.7.0/config/mips/x-sysv *** gcc-2.6.3/config/mips/x-sysv Mon Apr 11 13:43:54 1994 --- gcc-2.7.0/config/mips/x-sysv Mon Dec 19 20:57:33 1994 *************** *** 18,22 **** # This enables collect2 to link. ! CLIB= -L/usr/lib/cmplrs/cc2.11 -lmld # Show we need to use the C version of ALLOCA --- 18,23 ---- # This enables collect2 to link. ! # Some systems use version 2.11 of the compilers. Some use version 3.11. ! CLIB= -L/usr/lib/cmplrs/cc2.11 -L/usr/lib/cmplrs/cc3.11 -lmld # Show we need to use the C version of ALLOCA diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/xm-iris6.h gcc-2.7.0/config/mips/xm-iris6.h *** gcc-2.6.3/config/mips/xm-iris6.h --- gcc-2.7.0/config/mips/xm-iris6.h Sat Feb 4 13:15:58 1995 *************** *** 0 **** --- 1,21 ---- + #define MIPS_OVERRIDE_ALLOCA + #ifndef __GNUC__ + #include + #else + extern void *alloca (); + #endif + + #include "mips/xm-iris5.h" + + #undef HOST_BITS_PER_LONG + #define HOST_BITS_PER_LONG 64 + + /* Declare some functions needed for this machine. We don't want to + include these in the sources since other machines might define them + differently. */ + + extern void *malloc (), *realloc (), *calloc (); + + #ifndef inhibit_libc + #include "string.h" + #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/xm-mips.h gcc-2.7.0/config/mips/xm-mips.h *** gcc-2.6.3/config/mips/xm-mips.h Mon Nov 15 22:10:44 1993 --- gcc-2.7.0/config/mips/xm-mips.h Thu Jun 15 15:37:02 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/xm-netbsd.h gcc-2.7.0/config/mips/xm-netbsd.h *** gcc-2.6.3/config/mips/xm-netbsd.h --- gcc-2.7.0/config/mips/xm-netbsd.h Sun May 21 17:25:30 1995 *************** *** 0 **** --- 1,2 ---- + #include "mips/xm-mips.h" + #include "config/xm-netbsd.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/mips/xm-sysv.h gcc-2.7.0/config/mips/xm-sysv.h *** gcc-2.6.3/config/mips/xm-sysv.h Tue Jan 5 15:08:35 1993 --- gcc-2.7.0/config/mips/xm-sysv.h Thu Jun 15 15:37:10 1995 *************** *** 16,20 **** 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. */ /* --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/msdos/configur.bat gcc-2.7.0/config/msdos/configur.bat *** gcc-2.6.3/config/msdos/configur.bat Fri Jul 22 09:57:13 1994 --- gcc-2.7.0/config/msdos/configur.bat Tue Dec 20 09:32:16 1994 *************** *** 13,17 **** echo # Makefile generated by "configure.bat"> Makefile ! echo all.dos: cccp cc1 cc1obj xgcc s-objlist >> Makefile sed -f config/msdos/top.sed Makefile.in >> Makefile --- 13,17 ---- echo # Makefile generated by "configure.bat"> Makefile ! echo all.dos: cccp cc1 cc1obj xgcc libgcc.a s-objlist >> Makefile sed -f config/msdos/top.sed Makefile.in >> Makefile diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/msdos/libgcc.mak gcc-2.7.0/config/msdos/libgcc.mak *** gcc-2.6.3/config/msdos/libgcc.mak --- gcc-2.7.0/config/msdos/libgcc.mak Tue Dec 20 09:32:18 1994 *************** *** 0 **** --- 1,14 ---- + # Build libgcc.a + + libgcc.a : libgcc1.c libgcc2.c mklibgcc + ./mklibgcc -c + ./mklibgcc '$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)' libgcc1.c $(LIB1FUNCS) + ./mklibgcc '$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)' libgcc2.c $(LIB2FUNCS) + -command /c mklibnow.bat + -command /c del libgcc.a + ar rvs libgcc.a lgcctmp/*.o + + mklibgcc : config/msdos/mklibgcc.c + gcc $(CFLAGS) $^ -o $@ + + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/msdos/mklibgcc.c gcc-2.7.0/config/msdos/mklibgcc.c *** gcc-2.6.3/config/msdos/mklibgcc.c --- gcc-2.7.0/config/msdos/mklibgcc.c Tue Dec 20 09:32:17 1994 *************** *** 0 **** --- 1,98 ---- + #include + #include + #include + + char *skips[] = { + "__main", + "_ctors", + "_exit", + "_ctor_list", + "_dtor_list", + 0 + }; + + int + do_clean() + { + DIR *dir; + struct dirent *de; + remove("mklibnow.bat"); + + dir = opendir("lgcctmp"); + if (!dir) + return 0; + while ((de=readdir(dir))) + { + char buf[30]; + if (de->d_name[0] == '.') + continue; + sprintf(buf, "lgcctmp/%s", de->d_name); + unlink(buf); + } + closedir(dir); + return 0; + } + + int + main(int argc, char **argv) + { + char *cc = argv[1]; + char *csrc=argv[2]; + int i; + FILE *batfile; + FILE *cfile; + + if (argc > 1 && strcmp(argv[1], "-c")==0) + return do_clean(); + + mkdir("lgcctmp", 0755); + + batfile = fopen("mklibnow.bat", "a"); + if (!batfile) + { + perror("mklibnow.bat"); + return 1; + } + fprintf(batfile, "@echo off\n"); + + for (i=3; i ! #include "ns32k/ns32k.h" /* Compile for the floating point unit & 32532 by default; --- 16,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include /* Compile for the floating point unit & 32532 by default; *************** *** 28,32 **** Don't use bitfield instructions; */ ! #define TARGET_DEFAULT 121 /* 32-bit alignment for efficiency */ --- 27,31 ---- Don't use bitfield instructions; */ ! #define TARGET_DEFAULT (1 + 24 + 32 + 64) /* 32-bit alignment for efficiency */ *************** *** 64,86 **** #define MOVD_FLOAT_OK /* Names to predefine in the preprocessor for this target machine. */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dns32k -Dns32000 -Dns32532 -D__NetBSD__ -Dunix -Dpc532" ! ! /* Specify -k to assembler for pic generation. PIC needs -K too. */ ! ! #define ASM_SPEC "%{fpic:-k} %{fPIC:-k -K}" ! ! #define LINK_SPEC \ ! "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}" - #define STARTFILE_SPEC \ - "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" - - /* No more libg.a; no libraries if making shared object */ - - #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" - /* Make gcc agree with */ --- 63,74 ---- #define MOVD_FLOAT_OK + /* Get generic NetBSD definitions. */ + #include + /* Names to predefine in the preprocessor for this target machine. */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dunix -Dns32k -Dns32000 -Dns32532 -D__NetBSD__ -Dpc532 -D__ns32k__ -Asystem(unix) -Asystem(NetBSD) -Acpu(ns32k) -Amachine(ns32k)" /* Make gcc agree with */ *************** *** 122,235 **** #undef PCC_STATIC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 - - /* - * Some imports from svr4.h in support of shared libraries. - */ - - /* Define the strings used for the special svr4 .type and .size directives. - These strings generally do not vary from one system running svr4 to - another, but if a given system (e.g. m88k running svr) needs to use - different pseudo-op names for these, they may be overridden in the - file which includes this one. */ - - #define TYPE_ASM_OP ".type" - #define SIZE_ASM_OP ".size" - #define WEAK_ASM_OP ".weak" - - /* The following macro defines the format used to output the second - operand of the .type assembler directive. Different svr4 assemblers - expect various different forms for this operand. The one given here - is just a default. You may need to override it in your machine- - specific tm.h file (depending upon the particulars of your assembler). */ - - #define TYPE_OPERAND_FMT "@%s" - - /* Write the extra assembler code needed to declare a function's result. - Most svr4 assemblers don't require any special declaration of the - result value, but there are exceptions. */ - - #ifndef ASM_DECLARE_RESULT - #define ASM_DECLARE_RESULT(FILE, RESULT) - #endif - - /* These macros generate the special .type and .size directives which - are used to set the corresponding fields of the linker symbol table - entries in an ELF object file under SVR4. These macros also output - the starting labels for the relevant functions/objects. */ - - /* Write the extra assembler code needed to declare a function properly. - Some svr4 assemblers need to also have something extra said about the - function's return value. We allow for that here. */ - - #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ - do { \ - fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ - assemble_name (FILE, NAME); \ - putc (',', FILE); \ - fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ - putc ('\n', FILE); \ - ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - } while (0) - - /* Write the extra assembler code needed to declare an object properly. */ - - #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ - do { \ - fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ - assemble_name (FILE, NAME); \ - putc (',', FILE); \ - fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ - putc ('\n', FILE); \ - size_directive_output = 0; \ - if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ - { \ - size_directive_output = 1; \ - fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \ - } \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - } while (0) - - /* Output the size directive for a decl in rest_of_decl_compilation - in the case where we did not do so before the initializer. - Once we find the error_mark_node, we know that the value of - size_directive_output was set - by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ - - #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ - do { \ - char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ - if (!flag_inhibit_size_directive \ - && !size_directive_output \ - && DECL_SIZE (DECL) \ - && ! AT_END && TOP_LEVEL \ - && DECL_INITIAL (DECL) == error_mark_node) \ - { \ - fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ - assemble_name (FILE, name); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ - } \ - } while (0) - - /* This is how to declare the size of a function. */ - - #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ - do { \ - if (!flag_inhibit_size_directive) \ - { \ - char label[256]; \ - static int labelno; \ - labelno++; \ - ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ - fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ - assemble_name (FILE, (FNAME)); \ - fprintf (FILE, ","); \ - assemble_name (FILE, label); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, (FNAME)); \ - putc ('\n', FILE); \ - } \ - } while (0) --- 110,111 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/ns32k.c gcc-2.7.0/config/ns32k/ns32k.c *** gcc-2.6.3/config/ns32k/ns32k.c Wed Nov 23 17:26:20 1994 --- gcc-2.7.0/config/ns32k/ns32k.c Thu Jun 15 15:39:16 1995 *************** *** 1,4 **** /* Subroutines for assembler code output on the NS32000. ! Copyright (C) 1988, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Subroutines for assembler code output on the NS32000. ! Copyright (C) 1988, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* Some output-actions in ns32k.md need these. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Some output-actions in ns32k.md need these. */ *************** *** 203,207 **** rtx addr; ! /* This generates an illegal addressing mode, if BASE is fp or sp. This is handled by PRINT_OPERAND_ADDRESS. */ if (GET_CODE (base) != REG && GET_CODE (base) != CONST_INT) --- 204,208 ---- rtx addr; ! /* This generates an invalid addressing mode, if BASE is fp or sp. This is handled by PRINT_OPERAND_ADDRESS. */ if (GET_CODE (base) != REG && GET_CODE (base) != CONST_INT) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/ns32k.h gcc-2.7.0/config/ns32k/ns32k.h *** gcc-2.6.3/config/ns32k/ns32k.h Wed Nov 23 17:26:22 1994 --- gcc-2.7.0/config/ns32k/ns32k.h Thu Jun 15 15:39:31 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. NS32000 version. ! Copyright (C) 1988, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Definitions of target machine for GNU compiler. NS32000 version. ! Copyright (C) 1988, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 391,394 **** --- 392,396 ---- /* Value is the number of byte of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 403,407 **** the caller must always pop the args. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ --- 405,409 ---- the caller must always pop the args. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ *************** *** 755,759 **** /* On the 32k, the trampoline looks like this: ! addr .,r2 jump @__trampoline .int STATIC --- 757,761 ---- /* On the 32k, the trampoline looks like this: ! addr 0(pc),r2 jump @__trampoline .int STATIC *************** *** 765,769 **** #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fprintf (FILE, "\taddr .,r2\n" ); \ fprintf (FILE, "\tjump " ); \ PUT_ABSOLUTE_PREFIX (FILE); \ --- 767,771 ---- #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fprintf (FILE, "\taddr 0(pc),r2\n" ); \ fprintf (FILE, "\tjump " ); \ PUT_ABSOLUTE_PREFIX (FILE); \ *************** *** 798,804 **** __transfer_from_trampoline () \ { \ ! asm ("___trampoline:"); \ asm ("movd 16(r2),tos"); \ ! asm ("movd 12(r2),r2"); \ asm ("ret 0"); \ } --- 800,807 ---- __transfer_from_trampoline () \ { \ ! asm (".globl __trampoline"); \ ! asm ("__trampoline:"); \ asm ("movd 16(r2),tos"); \ ! asm ("movd 12(r2),r1"); \ asm ("ret 0"); \ } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/ns32k.md gcc-2.7.0/config/ns32k/ns32k.md *** gcc-2.6.3/config/ns32k/ns32k.md Wed Nov 23 17:26:24 1994 --- gcc-2.7.0/config/ns32k/ns32k.md Thu Jun 15 16:54:53 1995 *************** *** 17,21 **** ;; 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. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/pc532-mach.h gcc-2.7.0/config/ns32k/pc532-mach.h *** gcc-2.6.3/config/ns32k/pc532-mach.h Tue Feb 22 08:10:58 1994 --- gcc-2.7.0/config/ns32k/pc532-mach.h Thu Jun 15 15:39:48 1995 *************** *** 17,21 **** 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 "ns32k/pc532.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "ns32k/pc532.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/pc532-min.h gcc-2.7.0/config/ns32k/pc532-min.h *** gcc-2.6.3/config/ns32k/pc532-min.h Tue Jan 5 00:50:41 1993 --- gcc-2.7.0/config/ns32k/pc532-min.h Thu Jun 15 15:40:02 1995 *************** *** 22,26 **** 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 "ns32k/pc532.h" --- 22,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "ns32k/pc532.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/pc532.h gcc-2.7.0/config/ns32k/pc532.h *** gcc-2.6.3/config/ns32k/pc532.h Wed Nov 23 17:26:25 1994 --- gcc-2.7.0/config/ns32k/pc532.h Thu Jun 15 15:40:14 1995 *************** *** 19,23 **** 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 "ns32k/ns32k.h" --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "ns32k/ns32k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/sequent.h gcc-2.7.0/config/ns32k/sequent.h *** gcc-2.6.3/config/ns32k/sequent.h Sat Oct 2 04:22:19 1993 --- gcc-2.7.0/config/ns32k/sequent.h Thu Jun 15 15:40:40 1995 *************** *** 17,21 **** 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 "ns32k/ns32k.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "ns32k/ns32k.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/tek6000.h gcc-2.7.0/config/ns32k/tek6000.h *** gcc-2.6.3/config/ns32k/tek6000.h Sat Oct 2 04:22:22 1993 --- gcc-2.7.0/config/ns32k/tek6000.h Thu Jun 15 15:40:51 1995 *************** *** 21,25 **** 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. */ /* Generate syntax for the UTek assembler. */ --- 21,26 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Generate syntax for the UTek assembler. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/xm-netbsd.h gcc-2.7.0/config/ns32k/xm-netbsd.h *** gcc-2.6.3/config/ns32k/xm-netbsd.h Wed Mar 30 17:30:55 1994 --- gcc-2.7.0/config/ns32k/xm-netbsd.h Tue May 9 18:21:32 1995 *************** *** 1,45 **** ! /* Configuration for GNU C-compiler for the ns32532. ! Copyright (C) 1987, 1993 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 2, 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. ! ! $Id: xm-netbsd.h,v 1.1 1994/03/30 22:30:55 kenner Exp $ ! */ ! ! /* #defines that need visibility everywhere. */ ! #define FALSE 0 ! #define TRUE 1 ! ! /* target machine dependencies. ! tm.h is a symbolic link to the actual target specific file. */ ! #include "tm.h" ! ! /* This describes the machine the compiler is hosted on. */ ! #define HOST_BITS_PER_CHAR 8 ! #define HOST_BITS_PER_SHORT 16 ! #define HOST_BITS_PER_INT 32 ! #define HOST_BITS_PER_LONG 32 ! #define HOST_BITS_PER_LONGLONG 64 ! ! /* Arguments to use with `exit'. */ ! #define SUCCESS_EXIT_CODE 0 ! #define FATAL_EXIT_CODE 33 ! ! /* NetBSD does have atexit. */ ! ! #define HAVE_ATEXIT ! --- 1,10 ---- ! /* Configuration for GCC for ns32k running NetBSD as host. */ ! #include ! /* ns32k/xm-ns32k.h defines these macros, but we don't need them */ ! #undef memcmp ! #undef memcpy ! #undef memset ! #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/xm-ns32k.h gcc-2.7.0/config/ns32k/xm-ns32k.h *** gcc-2.6.3/config/ns32k/xm-ns32k.h Sat Jun 26 11:32:28 1993 --- gcc-2.7.0/config/ns32k/xm-ns32k.h Thu Jun 15 15:41:04 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/ns32k/xm-pc532-min.h gcc-2.7.0/config/ns32k/xm-pc532-min.h *** gcc-2.6.3/config/ns32k/xm-pc532-min.h Tue Jan 5 00:49:20 1993 --- gcc-2.7.0/config/ns32k/xm-pc532-min.h Thu Jun 15 15:41:16 1995 *************** *** 17,21 **** 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. */ /* We have USG-style include files and time functions */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* We have USG-style include files and time functions */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/lib2funcs.asm gcc-2.7.0/config/pa/lib2funcs.asm *** gcc-2.6.3/config/pa/lib2funcs.asm --- gcc-2.7.0/config/pa/lib2funcs.asm Thu Jun 15 15:41:56 1995 *************** *** 0 **** --- 1,47 ---- + ; Subroutines for calling unbound dynamic functions from within GDB for HPPA. + ; Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + ; Boston, MA 02111-1307, USA. + + .SPACE $PRIVATE$ + .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 + .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 + .SPACE $TEXT$ + .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 + .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY + .IMPORT $$dyncall,MILLICODE + ; gcc_compiled.: + .SPACE $TEXT$ + .SUBSPA $CODE$ + + ; Simply call with the address of the desired import stub in %r22 and + ; arguments in the normal place (%r26-%r23 and stack slots). + ; + .align 4 + .EXPORT __gcc_plt_call,ENTRY,PRIV_LEV=3,RTNVAL=GR + __gcc_plt_call + .PROC + .CALLINFO FRAME=64,CALLS,SAVE_RP + .ENTRY + stw %r2,-8(0,%r30) + bl $$dyncall,%r31 + copy %r31,%r2 + ldw -8(0,%r30),%r2 + bv,n 0(%r2) + .EXIT + .PROCEND diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-ghiux.h gcc-2.7.0/config/pa/pa-ghiux.h *** gcc-2.6.3/config/pa/pa-ghiux.h Sun Apr 10 04:47:45 1994 --- gcc-2.7.0/config/pa/pa-ghiux.h Thu Jun 15 15:42:09 1995 *************** *** 1,3 **** ! /* Definitions of target machine for GNU compiler, for HI-UX using GNU as. Copyright (C) 1993 Free Software Foundation, Inc. --- 1,3 ---- ! /* Definitions of target machine for GNU compiler, for HI-UX. Copyright (C) 1993 Free Software Foundation, Inc. *************** *** 16,51 **** 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. */ ! #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 0x88 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */ ! #endif ! ! #include "pa/pa.h" ! ! /* Make GCC agree with types.h. */ ! #undef SIZE_TYPE ! #undef PTRDIFF_TYPE ! ! #define SIZE_TYPE "unsigned int" ! #define PTRDIFF_TYPE "int" ! ! /* Like the default, except no -lg. */ ! #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-L/lib/libp/ -lc}%{pg:-L/lib/libp/ -lc}" ! ! #undef CPP_SPEC ! #if (TARGET_DEFAULT & 1) == 0 ! #define CPP_SPEC "%{msnake:-D_PA_RISC1_1}\ ! %{mpa-risc-1-1:-D_PA_RISC1_1}" ! #else ! #define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:-D_PA_RISC1_1}}" ! #endif ! #undef CC1_SPEC ! #define CC1_SPEC "-fwritable-strings %{pg:} %{p:}" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D_HIUX_SOURCE -D__H3050R -D__H3050RX" ! ! #undef LINK_SPEC ! #define LINK_SPEC "-u main -a archive" --- 16,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* HIUX is just a HPUX variant. We can simply use the HPUX configuration ! for just about everything. */ ! #include "pa/pa-ghpux.h" ! /* Predefines are the one noteworthy difference between HPUX and HIUX. */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D_HIUX_SOURCE -D__H3050R -D__H3050RX -Asystem(unix) -Asystem(hiux) -Acpu(hppa) -Amachine(hppa)" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-ghpux.h gcc-2.7.0/config/pa/pa-ghpux.h *** gcc-2.6.3/config/pa/pa-ghpux.h Thu Oct 20 18:05:57 1994 --- gcc-2.7.0/config/pa/pa-ghpux.h Thu Jun 15 15:42:28 1995 *************** *** 16,20 **** 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. */ #ifndef TARGET_DEFAULT --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef TARGET_DEFAULT *************** *** 22,44 **** #endif ! #include "pa/pa.h" ! /* Make GCC agree with types.h. */ ! #undef SIZE_TYPE ! #undef PTRDIFF_TYPE ! ! #define SIZE_TYPE "unsigned int" ! #define PTRDIFF_TYPE "int" ! ! /* Like the default, except no -lg. */ ! #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" ! ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D_HPUX_SOURCE -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa)" ! ! #undef LINK_SPEC ! #define LINK_SPEC "-u main %{static: -a archive}%{g*: -a archive}" ! ! /* hpux8 and later have C++ compatable include files, so do not ! pretend they are `extern "C"'. */ ! #define NO_IMPLICIT_EXTERN_C --- 23,29 ---- #endif ! #include "pa/pa-hpux.h" ! #define DBX_DEBUGGING_INFO ! #undef DEFAULT_GDB_EXTENSIONS ! #define DEFAULT_GDB_EXTENSIONS 1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-ghpux9.h gcc-2.7.0/config/pa/pa-ghpux9.h *** gcc-2.6.3/config/pa/pa-ghpux9.h --- gcc-2.7.0/config/pa/pa-ghpux9.h Thu Jun 15 15:42:38 1995 *************** *** 0 **** --- 1,35 ---- + /* Definitions of target machine for GNU compiler, for HP-UX using GNU as. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef TARGET_DEFAULT + #define TARGET_DEFAULT 0x88 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */ + #endif + + #include "pa/pa-hpux.h" + + #define DBX_DEBUGGING_INFO + #undef DEFAULT_GDB_EXTENSIONS + #define DEFAULT_GDB_EXTENSIONS 1 + + /* We can debug dynamically linked executables on hpux9. */ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{!shared:-u main} %{static:-a archive} %{shared:-b}" + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-gux7.h gcc-2.7.0/config/pa/pa-gux7.h *** gcc-2.6.3/config/pa/pa-gux7.h Wed Mar 16 12:04:40 1994 --- gcc-2.7.0/config/pa/pa-gux7.h Thu Jun 15 15:42:48 1995 *************** *** 16,20 **** 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. */ #ifndef TARGET_DEFAULT --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef TARGET_DEFAULT diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-hiux.h gcc-2.7.0/config/pa/pa-hiux.h *** gcc-2.6.3/config/pa/pa-hiux.h Sun Apr 10 04:48:11 1994 --- gcc-2.7.0/config/pa/pa-hiux.h Thu Jun 15 15:42:56 1995 *************** *** 16,54 **** 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. */ ! #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 0 ! #endif ! #include "pa/pa.h" ! ! /* Make GCC agree with types.h. */ ! #undef SIZE_TYPE ! #undef PTRDIFF_TYPE ! ! #define SIZE_TYPE "unsigned int" ! #define PTRDIFF_TYPE "int" ! ! /* HPUX doesn't use any debugging format that GCC knows about. */ ! #undef DBX_DEBUGGING_INFO ! ! /* Like the default, except no -lg. */ ! #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-L/lib/libp/ -lc}%{pg:-L/lib/libp/ -lc}" ! ! #undef CPP_SPEC ! #if (TARGET_DEFAULT & 1) == 0 ! #define CPP_SPEC "%{msnake:-D_PA_RISC1_1}\ ! %{mpa-risc-1-1:-D_PA_RISC1_1}" ! #else ! #define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:-D_PA_RISC1_1}}" ! #endif ! ! #undef CC1_SPEC ! #define CC1_SPEC "-fwritable-strings %{pg:} %{p:}" ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D_HIUX_SOURCE -D__H3050R -D__H3050RX" ! ! #undef LINK_SPEC ! #define LINK_SPEC "-u main -a archive" --- 16,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* HIUX is just a HPUX variant. We can simply use the HPUX configuration ! for just about everything. */ ! #include "pa/pa-hpux.h" ! /* Predefines are the one noteworthy difference between HPUX and HIUX. */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D_HIUX_SOURCE -D__H3050R -D__H3050RX -Asystem(unix) -Asystem(hiux) -Acpu(hppa) -Amachine(hppa)" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-hpux.h gcc-2.7.0/config/pa/pa-hpux.h *** gcc-2.6.3/config/pa/pa-hpux.h Thu Oct 20 18:05:58 1994 --- gcc-2.7.0/config/pa/pa-hpux.h Thu Jun 15 15:43:06 1995 *************** *** 16,20 **** 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. */ #ifndef TARGET_DEFAULT --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef TARGET_DEFAULT *************** *** 37,41 **** /* Like the default, except no -lg. */ ! #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" #undef CPP_PREDEFINES --- 38,42 ---- /* Like the default, except no -lg. */ ! #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" #undef CPP_PREDEFINES *************** *** 43,49 **** #undef LINK_SPEC ! #define LINK_SPEC "-u main %{static: -a archive}%{g*: -a archive}" ! /* hpux8 and later have C++ compatable include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C --- 44,51 ---- #undef LINK_SPEC ! #define LINK_SPEC \ ! "%{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" ! /* hpux8 and later have C++ compatible include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-hpux7.h gcc-2.7.0/config/pa/pa-hpux7.h *** gcc-2.6.3/config/pa/pa-hpux7.h Wed Mar 16 12:04:49 1994 --- gcc-2.7.0/config/pa/pa-hpux7.h Thu Jun 15 15:43:18 1995 *************** *** 16,20 **** 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. */ #ifndef TARGET_DEFAULT --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef TARGET_DEFAULT diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-hpux9.h gcc-2.7.0/config/pa/pa-hpux9.h *** gcc-2.6.3/config/pa/pa-hpux9.h --- gcc-2.7.0/config/pa/pa-hpux9.h Thu Jun 15 15:43:28 1995 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Tim Moore (moore@defmacro.cs.utah.edu) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define TARGET_DEFAULT 0 + + #include "pa/pa-hpux.h" + + /* We can debug dynamically linked executables on hpux9. */ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{!shared:-u main} %{static:-a archive} %{shared:-b}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-oldas.h gcc-2.7.0/config/pa/pa-oldas.h *** gcc-2.6.3/config/pa/pa-oldas.h Tue Sep 21 19:25:38 1993 --- gcc-2.7.0/config/pa/pa-oldas.h Thu Jun 15 15:43:37 1995 *************** *** 17,21 **** 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 is the same as pa-hpux.h, except that we generate snake code by --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This is the same as pa-hpux.h, except that we generate snake code by diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa-osf.h gcc-2.7.0/config/pa/pa-osf.h *** gcc-2.6.3/config/pa/pa-osf.h Tue Jun 14 15:15:25 1994 --- gcc-2.7.0/config/pa/pa-osf.h Thu Jun 15 15:43:50 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 ! Copyright (C) 1991 Free Software Foundation, Inc. Contributed by Tim Moore (moore@defmacro.cs.utah.edu) --- 1,4 ---- /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 ! Copyright (C) 1991, 1995 Free Software Foundation, Inc. Contributed by Tim Moore (moore@defmacro.cs.utah.edu) *************** *** 17,23 **** 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. */ #define TARGET_DEFAULT 0x88 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */ #include "pa/pa.h" --- 17,26 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ + #ifndef TARGET_DEFAULT #define TARGET_DEFAULT 0x88 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */ + #endif #include "pa/pa.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa.c gcc-2.7.0/config/pa/pa.c *** gcc-2.6.3/config/pa/pa.c Tue Oct 18 08:37:48 1994 --- gcc-2.7.0/config/pa/pa.c Thu Jun 15 15:44:09 1995 *************** *** 1,4 **** /* Subroutines for insn-output.c for HPPA. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Tim Moore (moore@cs.utah.edu), based on sparc.c --- 1,4 ---- /* Subroutines for insn-output.c for HPPA. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Tim Moore (moore@cs.utah.edu), based on sparc.c *************** *** 17,21 **** 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 --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 42,45 **** --- 43,52 ---- enum cmp_type hppa_branch_type; + /* Which cpu we are scheduling for. */ + enum processor_type pa_cpu; + + /* String to hold which cpu we are scheduling for. */ + char *pa_cpu_string; + rtx hppa_save_pic_table_rtx; *************** *** 53,56 **** --- 60,106 ---- static rtx find_addr_reg (); + /* Keep track of the number of bytes we have output in the CODE subspaces + during this compilation so we'll know when to emit inline long-calls. */ + + unsigned int total_code_bytes; + + /* Variables to handle plabels that we discover are necessary at assembly + output time. They are output after the current function. */ + + struct defer_plab + { + rtx internal_label; + rtx symbol; + } *deferred_plabels = 0; + int n_deferred_plabels = 0; + + void + override_options () + { + /* Default to 700 scheduling which is reasonable for older 800 processors + correct for the 700s, and not too bad for the 7100s and 7100LCs. */ + if (pa_cpu_string == NULL + || ! strcmp (pa_cpu_string, "700")) + { + pa_cpu_string = "700"; + pa_cpu = PROCESSOR_700; + } + else if (! strcmp (pa_cpu_string, "7100")) + { + pa_cpu_string = "7100"; + pa_cpu = PROCESSOR_7100; + } + else if (! strcmp (pa_cpu_string, "7100LC")) + { + pa_cpu_string = "7100LC"; + pa_cpu = PROCESSOR_7100LC; + } + else + { + warning ("Unknown -mschedule= option (%s).\nValid options are 700, 7100 and 7100LC\n", pa_cpu_string); + } + } + + /* Return non-zero only if OP is a register of mode MODE, or CONST0_RTX. */ *************** *** 73,77 **** enum machine_mode mode; { ! return (CONSTANT_P (op) && ! TARGET_LONG_CALLS); } --- 123,127 ---- enum machine_mode mode; { ! return (CONSTANT_P (op) && ! TARGET_PORTABLE_RUNTIME); } *************** *** 220,228 **** int ! pic_operand (op, mode) rtx op; enum machine_mode mode; { ! return flag_pic && GET_CODE (op) == LABEL_REF; } --- 270,291 ---- int ! pic_label_operand (op, mode) rtx op; enum machine_mode mode; { ! if (!flag_pic) ! return 0; ! ! switch (GET_CODE (op)) ! { ! case LABEL_REF: ! return 1; ! case CONST: ! op = XEXP (op, 0); ! return (GET_CODE (XEXP (op, 0)) == LABEL_REF ! && GET_CODE (XEXP (op, 1)) == CONST_INT); ! default: ! return 0; ! } } *************** *** 236,265 **** - extern int current_function_uses_pic_offset_table; - extern rtx force_reg (), validize_mem (); - - /* The rtx for the global offset table which is a special form - that *is* a position independent symbolic constant. */ - rtx pic_pc_rtx; - - /* Ensure that we are not using patterns that are not OK with PIC. */ - - int - check_pic (i) - int i; - { - extern rtx recog_operand[]; - switch (flag_pic) - { - case 1: - if (GET_CODE (recog_operand[i]) == SYMBOL_REF - || (GET_CODE (recog_operand[i]) == CONST - && ! rtx_equal_p (pic_pc_rtx, recog_operand[i]))) - abort (); - case 2: - default: - return 1; - } - } /* Return truth value of whether OP can be used as an operand in a --- 299,302 ---- *************** *** 378,385 **** unsigned HOST_WIDE_INT x; { ! unsigned lsb_mask, t; /* This might not be obvious, but it's at least fast. ! This function is critcal; we don't have the time loops would take. */ lsb_mask = x & -x; t = ((x >> 4) + lsb_mask) & ~(lsb_mask - 1); --- 415,422 ---- unsigned HOST_WIDE_INT x; { ! unsigned HOST_WIDE_INT lsb_mask, t; /* This might not be obvious, but it's at least fast. ! This function is critical; we don't have the time loops would take. */ lsb_mask = x & -x; t = ((x >> 4) + lsb_mask) & ~(lsb_mask - 1); *************** *** 446,450 **** enum machine_mode mode; { ! unsigned x; if (GET_CODE (op) != CONST_INT) return 0; --- 483,487 ---- enum machine_mode mode; { ! unsigned HOST_WIDE_INT x; if (GET_CODE (op) != CONST_INT) return 0; *************** *** 481,484 **** --- 518,528 ---- rtx pic_ref = orig; + /* Lables need special handling. */ + if (pic_label_operand (orig)) + { + emit_insn (gen_pic_load_label (reg, orig)); + current_function_uses_pic_offset_table = 1; + return reg; + } if (GET_CODE (orig) == SYMBOL_REF) { *************** *** 488,500 **** if (flag_pic == 2) { ! emit_insn (gen_rtx (SET, VOIDmode, reg, ! gen_rtx (HIGH, Pmode, orig))); ! emit_insn (gen_rtx (SET, VOIDmode, reg, ! gen_rtx (LO_SUM, Pmode, reg, orig))); ! orig = reg; ! } ! pic_ref = gen_rtx (MEM, Pmode, ! gen_rtx (PLUS, Pmode, ! pic_offset_table_rtx, orig)); current_function_uses_pic_offset_table = 1; RTX_UNCHANGING_P (pic_ref) = 1; --- 532,543 ---- if (flag_pic == 2) { ! emit_insn (gen_pic2_highpart (reg, pic_offset_table_rtx, orig)); ! pic_ref = gen_rtx (MEM, Pmode, ! gen_rtx (LO_SUM, Pmode, reg, ! gen_rtx (UNSPEC, SImode, gen_rtvec (1, orig), 0))); ! } ! else ! pic_ref = gen_rtx (MEM, Pmode, ! gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig)); current_function_uses_pic_offset_table = 1; RTX_UNCHANGING_P (pic_ref) = 1; *************** *** 532,553 **** } - /* Emit special PIC prologues and epilogues. */ - - void - finalize_pic () - { - if (hppa_save_pic_table_rtx) - { - emit_insn_after (gen_rtx (SET, VOIDmode, - hppa_save_pic_table_rtx, - gen_rtx (REG, Pmode, PIC_OFFSET_TABLE_REGNUM)), - get_insns ()); - /* Need to emit this whether or not we obey regdecls, - since setjmp/longjmp can cause life info to screw up. */ - hppa_save_pic_table_rtx = 0; - } - emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx)); - } - /* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. --- 575,578 ---- *************** *** 596,600 **** It is also beneficial to handle (plus (mult (X) (Y)) (Z)) in a special manner if Y is 2, 4, or 8. (allows more shadd insns and shifted indexed ! adressing modes to be used). Put X and Z into registers. Then put the entire expression into --- 621,625 ---- It is also beneficial to handle (plus (mult (X) (Y)) (Z)) in a special manner if Y is 2, 4, or 8. (allows more shadd insns and shifted indexed ! addressing modes to be used). Put X and Z into registers. Then put the entire expression into *************** *** 608,611 **** --- 633,639 ---- rtx orig = x; + if (flag_pic) + return legitimize_pic_address (x, mode, gen_reg_rtx (Pmode)); + /* Strip off CONST. */ if (GET_CODE (x) == CONST) *************** *** 728,734 **** } - if (flag_pic) - return legitimize_pic_address (x, mode, gen_reg_rtx (Pmode)); - return orig; } --- 756,759 ---- *************** *** 784,788 **** scratch_reg = gen_rtx (REG, SImode, REGNO (scratch_reg)); ! emit_move_insn (scratch_reg, XEXP (operand1, 0)); emit_insn (gen_rtx (SET, VOIDmode, operand0, gen_rtx (MEM, mode, scratch_reg))); --- 809,825 ---- scratch_reg = gen_rtx (REG, SImode, REGNO (scratch_reg)); ! ! /* D might not fit in 14 bits either; for such cases load D into ! scratch reg. */ ! if (!memory_address_p (SImode, XEXP (operand1, 0))) ! { ! emit_move_insn (scratch_reg, XEXP (XEXP (operand1, 0), 1)); ! emit_move_insn (scratch_reg, gen_rtx (GET_CODE (XEXP (operand1, 0)), ! SImode, ! XEXP (XEXP (operand1, 0), 0), ! scratch_reg)); ! } ! else ! emit_move_insn (scratch_reg, XEXP (operand1, 0)); emit_insn (gen_rtx (SET, VOIDmode, operand0, gen_rtx (MEM, mode, scratch_reg))); *************** *** 801,805 **** scratch_reg = gen_rtx (REG, SImode, REGNO (scratch_reg)); ! emit_move_insn (scratch_reg, XEXP (operand0, 0)); emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (MEM, mode, scratch_reg), operand1)); --- 838,853 ---- scratch_reg = gen_rtx (REG, SImode, REGNO (scratch_reg)); ! /* D might not fit in 14 bits either; for such cases load D into ! scratch reg. */ ! if (!memory_address_p (SImode, XEXP (operand0, 0))) ! { ! emit_move_insn (scratch_reg, XEXP (XEXP (operand0, 0), 1)); ! emit_move_insn (scratch_reg, gen_rtx (GET_CODE (XEXP (operand0, 0)), ! SImode, ! XEXP (XEXP (operand0, 0), 0), ! scratch_reg)); ! } ! else ! emit_move_insn (scratch_reg, XEXP (operand0, 0)); emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (MEM, mode, scratch_reg), operand1)); *************** *** 891,894 **** --- 939,965 ---- if (symbolic_operand (operand1, mode)) { + rtx const_part = NULL; + + /* Argh. The assembler and linker can't handle arithmetic + involving plabels. We'll have to split up operand1 here + if it's a function label involved in an arithmetic + expression. Luckily, this only happens with addition + of constants to plabels, which simplifies the test. + + We add the constant back in just before returning to + our caller. */ + if (GET_CODE (operand1) == CONST + && GET_CODE (XEXP (operand1, 0)) == PLUS + && function_label_operand (XEXP (XEXP (operand1, 0), 0), Pmode)) + { + /* Save away the constant part of the expression. */ + const_part = XEXP (XEXP (operand1, 0), 1); + if (GET_CODE (const_part) != CONST_INT) + abort (); + + /* Set operand1 to just the SYMBOL_REF. */ + operand1 = XEXP (XEXP (operand1, 0), 0); + } + if (flag_pic) { *************** *** 896,912 **** if (reload_in_progress || reload_completed) ! temp = operand0; else temp = gen_reg_rtx (Pmode); ! operands[1] = legitimize_pic_address (operand1, mode, temp); ! emit_insn (gen_rtx (SET, VOIDmode, operand0, operands[1])); } ! /* On the HPPA, references to data space are supposed to */ ! /* use dp, register 27, but showing it in the RTL inhibits various ! cse and loop optimizations. */ else { ! rtx temp, set, const_part = NULL; if (reload_in_progress || reload_completed) --- 967,1008 ---- if (reload_in_progress || reload_completed) ! temp = scratch_reg ? scratch_reg : operand0; else temp = gen_reg_rtx (Pmode); ! /* If operand1 is a function label, then we've got to ! force it to memory, then load op0 from memory. */ ! if (function_label_operand (operand1, mode)) ! { ! operands[1] = force_const_mem (mode, operand1); ! emit_move_sequence (operands, mode, temp); ! } ! /* Likewise for (const (plus (symbol) (const_int)) when generating ! pic code during or after reload and const_int will not fit ! in 14 bits. */ ! else if (GET_CODE (operand1) == CONST ! && GET_CODE (XEXP (operand1, 0)) == PLUS ! && GET_CODE (XEXP (XEXP (operand1, 0), 1)) == CONST_INT ! && !INT_14_BITS (XEXP (XEXP (operand1, 0), 1)) ! && (reload_completed || reload_in_progress) ! && flag_pic) ! { ! operands[1] = force_const_mem (mode, operand1); ! operands[1] = legitimize_pic_address (XEXP (operands[1], 0), ! mode, temp); ! emit_move_sequence (operands, mode, temp); ! } ! else ! { ! operands[1] = legitimize_pic_address (operand1, mode, temp); ! emit_insn (gen_rtx (SET, VOIDmode, operand0, operands[1])); ! } } ! /* On the HPPA, references to data space are supposed to use dp, ! register 27, but showing it in the RTL inhibits various cse ! and loop optimizations. */ else { ! rtx temp, set; if (reload_in_progress || reload_completed) *************** *** 915,937 **** temp = gen_reg_rtx (mode); - /* Argh. The assembler and linker can't handle arithmetic - involving plabels. We'll have to split up operand1 here - if it's a function label involved in an arithmetic - expression. Luckily, this only happens with addition - of constants to plabels, which simplifies the test. */ - if (GET_CODE (operand1) == CONST - && GET_CODE (XEXP (operand1, 0)) == PLUS - && function_label_operand (XEXP (XEXP (operand1, 0), 0), - Pmode)) - { - /* Save away the constant part of the expression. */ - const_part = XEXP (XEXP (operand1, 0), 1); - if (GET_CODE (const_part) != CONST_INT) - abort (); - - /* Set operand1 to just the SYMBOL_REF. */ - operand1 = XEXP (XEXP (operand1, 0), 0); - } - if (ishighonly) set = gen_rtx (SET, mode, operand0, temp); --- 1011,1014 ---- *************** *** 946,956 **** emit_insn (set); - /* Add back in the constant part if needed. */ - if (const_part != NULL) - emit_insn (gen_rtx (SET, mode, operand0, - plus_constant (operand0, - XEXP (const_part, 0)))); - return 1; } return 1; } --- 1023,1031 ---- emit_insn (set); } + + /* Add back in the constant part if needed. */ + if (const_part != NULL) + expand_inc (operand0, const_part); return 1; } *************** *** 983,988 **** if (GET_CODE (operand) == CONST) operand = XEXP (XEXP (operand, 0), 0); ! if (GET_CODE (operand) == SYMBOL_REF) ! return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand); return 1; } --- 1058,1071 ---- if (GET_CODE (operand) == CONST) operand = XEXP (XEXP (operand, 0), 0); ! if (flag_pic) ! { ! if (GET_CODE (operand) == SYMBOL_REF) ! return SYMBOL_REF_FLAG (operand) && !CONSTANT_POOL_ADDRESS_P (operand); ! } ! else ! { ! if (GET_CODE (operand) == SYMBOL_REF) ! return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand); ! } return 1; } *************** *** 995,1049 **** rtx *operands; { if (GET_CODE (operands[0]) == MEM) return "stw %r1,%0"; ! else if (GET_CODE (operands[1]) == MEM) return "ldw %1,%0"; ! else if (GET_CODE (operands[1]) == CONST_DOUBLE ! && GET_MODE (operands[1]) == SFmode) { ! int i; ! union real_extract u; ! union float_extract { float f; int i; } v; ! ! bcopy (&CONST_DOUBLE_LOW (operands[1]), &u, sizeof u); ! v.f = REAL_VALUE_TRUNCATE (SFmode, u.d); ! i = v.i; ! ! operands[1] = gen_rtx (CONST_INT, VOIDmode, i); ! ! /* See if we can handle this constant in a single instruction. */ ! if (cint_ok_for_move (INTVAL (operands[1]))) ! { ! HOST_WIDE_INT intval = INTVAL (operands[1]); ! ! if (intval == 0) ! return "copy 0,%0"; ! else if (VAL_14_BITS_P (intval)) ! return "ldi %1,%0"; ! else if ((intval & 0x7ff) == 0) ! return "ldil L'%1,%0"; ! else if (zdepi_cint_p (intval)) ! return "zdepi %Z1,%0"; ! } ! else ! return "ldil L'%1,%0\n\tldo R'%1(%0),%0"; ! } ! else if (GET_CODE (operands[1]) == CONST_INT) ! { ! /* See if we can handle this in a single instruction. */ ! if (cint_ok_for_move (INTVAL (operands[1]))) ! { ! int intval = INTVAL (operands[1]); ! if (intval == 0) ! return "copy 0,%0"; ! else if (VAL_14_BITS_P (intval)) ! return "ldi %1,%0"; ! else if ((intval & 0x7ff) == 0) ! return "ldil L'%1,%0"; ! else if (zdepi_cint_p (intval)) ! return "zdepi %Z1,%0"; ! } else return "ldil L'%1,%0\n\tldo R'%1(%0),%0"; --- 1078,1113 ---- rtx *operands; { + HOST_WIDE_INT intval; + if (GET_CODE (operands[0]) == MEM) return "stw %r1,%0"; ! if (GET_CODE (operands[1]) == MEM) return "ldw %1,%0"; ! if (GET_CODE (operands[1]) == CONST_DOUBLE) { ! long i; ! REAL_VALUE_TYPE d; ! if (GET_MODE (operands[1]) != SFmode) ! abort (); ! /* Translate the CONST_DOUBLE to a CONST_INT with the same target ! bit pattern. */ ! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[1]); ! REAL_VALUE_TO_TARGET_SINGLE (d, i); ! ! operands[1] = GEN_INT (i); ! /* Fall through to CONST_INT case. */ ! } ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! intval = INTVAL (operands[1]); ! ! if (VAL_14_BITS_P (intval)) ! return "ldi %1,%0"; ! else if ((intval & 0x7ff) == 0) ! return "ldil L'%1,%0"; ! else if (zdepi_cint_p (intval)) ! return "zdepi %Z1,%0"; else return "ldil L'%1,%0\n\tldo R'%1(%0),%0"; *************** *** 1359,1363 **** } /* This is a pain. You have to be prepared to deal with an ! arbritary address here including pre/post increment/decrement. so avoid this in the MD. */ --- 1423,1427 ---- } /* This is a pain. You have to be prepared to deal with an ! arbitrary address here including pre/post increment/decrement. so avoid this in the MD. */ *************** *** 1461,1465 **** { /* Store the last, partial word. */ ! operands[4] = gen_rtx (CONST_INT, VOIDmode, n_bytes % 4); output_asm_insn ("stbys,e %2,%4(0,%0)", operands); } --- 1525,1529 ---- { /* Store the last, partial word. */ ! operands[4] = GEN_INT (n_bytes % 4); output_asm_insn ("stbys,e %2,%4(0,%0)", operands); } *************** *** 1516,1520 **** /* Size is compile-time determined, and also not very small (such small cases are handled above). */ ! operands[4] = gen_rtx (CONST_INT, VOIDmode, n_bytes - 4); output_asm_insn ("ldo %4(0),%2", operands); } --- 1580,1584 ---- /* Size is compile-time determined, and also not very small (such small cases are handled above). */ ! operands[4] = GEN_INT (n_bytes - 4); output_asm_insn ("ldo %4(0),%2", operands); } *************** *** 1542,1546 **** /* Read the entire word of the source block tail. */ output_asm_insn ("ldw 0(0,%1),%3", operands); ! operands[4] = gen_rtx (CONST_INT, VOIDmode, n_bytes % 4); output_asm_insn ("stbys,e %3,%4(0,%0)", operands); } --- 1606,1610 ---- /* Read the entire word of the source block tail. */ output_asm_insn ("ldw 0(0,%1),%3", operands); ! operands[4] = GEN_INT (n_bytes % 4); output_asm_insn ("stbys,e %3,%4(0,%0)", operands); } *************** *** 1683,1687 **** if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) != 0) { ! unsigned mask = INTVAL (operands[2]); int ls0, ls1, ms0, p, len; --- 1747,1751 ---- if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) != 0) { ! unsigned HOST_WIDE_INT mask = INTVAL (operands[2]); int ls0, ls1, ms0, p, len; *************** *** 1708,1712 **** abort (); ! operands[2] = gen_rtx (CONST_INT, VOIDmode, len); return "extru %1,31,%2,%0"; } --- 1772,1776 ---- abort (); ! operands[2] = GEN_INT (len); return "extru %1,31,%2,%0"; } *************** *** 1719,1724 **** len = ls1 - ls0; ! operands[2] = gen_rtx (CONST_INT, VOIDmode, p); ! operands[3] = gen_rtx (CONST_INT, VOIDmode, len); return "depi 0,%2,%3,%0"; } --- 1783,1788 ---- len = ls1 - ls0; ! operands[2] = GEN_INT (p); ! operands[3] = GEN_INT (len); return "depi 0,%2,%3,%0"; } *************** *** 1732,1736 **** rtx *operands; { ! unsigned mask = INTVAL (operands[2]); int bs0, bs1, p, len; --- 1796,1800 ---- rtx *operands; { ! unsigned HOST_WIDE_INT mask = INTVAL (operands[2]); int bs0, bs1, p, len; *************** *** 1746,1750 **** break; ! if (bs1 != 32 && ((unsigned) 1 << bs1) <= mask) abort(); --- 1810,1814 ---- break; ! if (bs1 != 32 && ((unsigned HOST_WIDE_INT) 1 << bs1) <= mask) abort(); *************** *** 1752,1757 **** len = bs1 - bs0; ! operands[2] = gen_rtx (CONST_INT, VOIDmode, p); ! operands[3] = gen_rtx (CONST_INT, VOIDmode, len); return "depi -1,%2,%3,%0"; } --- 1816,1821 ---- len = bs1 - bs0; ! operands[2] = GEN_INT (p); ! operands[3] = GEN_INT (len); return "depi -1,%2,%3,%0"; } *************** *** 2059,2062 **** --- 2123,2139 ---- ASM_GENERATE_INTERNAL_LABEL (hp_profile_label_name, "LP", hp_profile_labelno); + + if (insn_addresses) + { + unsigned int old_total = total_code_bytes; + + total_code_bytes += insn_addresses[INSN_UID (get_last_insn())]; + total_code_bytes += FUNCTION_BOUNDARY /BITS_PER_UNIT; + + /* Be prepared to handle overflows. */ + total_code_bytes = old_total > total_code_bytes ? -1 : total_code_bytes; + } + else + total_code_bytes = -1; } *************** *** 2137,2142 **** /* The hppa calling conventions say that that %r19, the pic offset register, is saved at sp - 32 (in this function's frame) when ! generating PIC code. */ ! if (flag_pic) store_reg (PIC_OFFSET_TABLE_REGNUM, -32, STACK_POINTER_REGNUM); --- 2214,2222 ---- /* The hppa calling conventions say that that %r19, the pic offset register, is saved at sp - 32 (in this function's frame) when ! generating PIC code. FIXME: What is the correct thing to do ! for functions which make no calls and allocate no frame? Do ! we need to allocate a frame, or can we just omit the save? For ! now we'll just omit the save. */ ! if (actual_fsize != 0 && flag_pic) store_reg (PIC_OFFSET_TABLE_REGNUM, -32, STACK_POINTER_REGNUM); *************** *** 2147,2151 **** takes the return address of the caller, the address of this routine, and the address of the label. Also, it isn't magic, so ! argument registre hsave to be preserved. */ if (profile_flag) { --- 2227,2231 ---- takes the return address of the caller, the address of this routine, and the address of the label. Also, it isn't magic, so ! argument registers have to be preserved. */ if (profile_flag) { *************** *** 2277,2282 **** int size; { - rtx insn = get_last_insn (); /* hppa_expand_epilogue does the dirty work now. We just need --- 2357,2362 ---- int size; { rtx insn = get_last_insn (); + int i; /* hppa_expand_epilogue does the dirty work now. We just need *************** *** 2303,2306 **** --- 2383,2403 ---- fprintf (file, "\t.EXIT\n\t.PROCEND\n"); + + /* If we have deferred plabels, then we need to switch into the data + section and align it to a 4 byte boundary before we output the + deferred plabels. */ + if (n_deferred_plabels) + { + data_section (); + ASM_OUTPUT_ALIGN (file, 2); + } + + /* Now output the deferred plabels. */ + for (i = 0; i < n_deferred_plabels; i++) + { + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (deferred_plabels[i].internal_label)); + ASM_OUTPUT_INT (file, deferred_plabels[i].symbol); + } + n_deferred_plabels = 0; } *************** *** 2386,2391 **** STACK_POINTER_REGNUM, - actual_fsize); ! /* Uses value left over in %r1 by set_reg_plus_d. */ ! load_reg (2, - (actual_fsize + 20 + ((- actual_fsize) & ~0x7ff)), 1); } --- 2483,2494 ---- STACK_POINTER_REGNUM, - actual_fsize); ! ! /* This used to try and be clever by not depending on the value in ! %r30 and instead use the value held in %r1 (so that the 2nd insn ! which sets %r30 could be put in the delay slot of the return insn). ! ! That won't work since if the stack is exactly 8k set_reg_plus_d ! doesn't set %r1, just %r30. */ ! load_reg (2, - 20, STACK_POINTER_REGNUM); } *************** *** 2498,2506 **** { case TYPE_FPLOAD: ! /* This cost 3 cycles, not 2 as the md says. */ ! return cost + 1; case TYPE_FPALU: ! case TYPE_FPMUL: case TYPE_FPDIVSGL: case TYPE_FPDIVDBL: --- 2601,2611 ---- { case TYPE_FPLOAD: ! /* This cost 3 cycles, not 2 as the md says for the ! 700 and 7100. Note scaling of cost for 7100. */ ! return cost + (pa_cpu_attr == PROCESSOR_700) ? 1 : 2; case TYPE_FPALU: ! case TYPE_FPMULSGL: ! case TYPE_FPMULDBL: case TYPE_FPDIVSGL: case TYPE_FPDIVDBL: *************** *** 2509,2513 **** /* In these important cases, we save one cycle compared to when flop instruction feed each other. */ ! return cost - 1; default: --- 2614,2618 ---- /* In these important cases, we save one cycle compared to when flop instruction feed each other. */ ! return cost - (pa_cpu_attr == PROCESSOR_700) ? 1 : 2; default: *************** *** 2547,2551 **** { case TYPE_FPALU: ! case TYPE_FPMUL: case TYPE_FPDIVSGL: case TYPE_FPDIVDBL: --- 2652,2657 ---- { case TYPE_FPALU: ! case TYPE_FPMULSGL: ! case TYPE_FPMULDBL: case TYPE_FPDIVSGL: case TYPE_FPDIVDBL: *************** *** 2553,2560 **** case TYPE_FPSQRTDBL: /* A fpload can't be issued until one cycle before a ! preceeding arithmetic operation has finished, if the target of the fpload is any of the sources (or destination) of the arithmetic operation. */ ! return cost - 1; default: --- 2659,2701 ---- case TYPE_FPSQRTDBL: /* A fpload can't be issued until one cycle before a ! preceding arithmetic operation has finished if the target of the fpload is any of the sources (or destination) of the arithmetic operation. */ ! return cost - (pa_cpu_attr == PROCESSOR_700) ? 1 : 2; ! ! default: ! return 0; ! } ! } ! } ! else if (get_attr_type (insn) == TYPE_FPALU) ! { ! rtx pat = PATTERN (insn); ! rtx dep_pat = PATTERN (dep_insn); ! if (GET_CODE (pat) == PARALLEL) ! { ! /* This happens for the fldXs,mb patterns. */ ! pat = XVECEXP (pat, 0, 0); ! } ! if (GET_CODE (pat) != SET || GET_CODE (dep_pat) != SET) ! /* If this happens, we have to extend this to schedule ! optimally. Return 0 for now. */ ! return 0; ! ! if (reg_mentioned_p (SET_DEST (pat), SET_SRC (dep_pat))) ! { ! if (! recog_memoized (dep_insn)) ! return 0; ! switch (get_attr_type (dep_insn)) ! { ! case TYPE_FPDIVSGL: ! case TYPE_FPDIVDBL: ! case TYPE_FPSQRTSGL: ! case TYPE_FPSQRTDBL: ! /* An ALU flop can't be issued until two cycles before a ! preceding divide or sqrt operation has finished if ! the target of the ALU flop is any of the sources ! (or destination) of the divide or sqrt operation. */ ! return cost - (pa_cpu_attr == PROCESSOR_700) ? 2 : 4; default: *************** *** 2567,2573 **** return 0; } ! /* For output dependencies, the cost is often one too high. */ ! return cost - 1; } --- 2708,2794 ---- return 0; } + else if (REG_NOTE_KIND (link) == REG_DEP_OUTPUT) + { + /* Output dependency; DEP_INSN writes a register that INSN writes some + cycles later. */ + if (get_attr_type (insn) == TYPE_FPLOAD) + { + rtx pat = PATTERN (insn); + rtx dep_pat = PATTERN (dep_insn); + if (GET_CODE (pat) == PARALLEL) + { + /* This happens for the fldXs,mb patterns. */ + pat = XVECEXP (pat, 0, 0); + } + if (GET_CODE (pat) != SET || GET_CODE (dep_pat) != SET) + /* If this happens, we have to extend this to schedule + optimally. Return 0 for now. */ + return 0; + + if (reg_mentioned_p (SET_DEST (pat), SET_DEST (dep_pat))) + { + if (! recog_memoized (dep_insn)) + return 0; + switch (get_attr_type (dep_insn)) + { + case TYPE_FPALU: + case TYPE_FPMULSGL: + case TYPE_FPMULDBL: + case TYPE_FPDIVSGL: + case TYPE_FPDIVDBL: + case TYPE_FPSQRTSGL: + case TYPE_FPSQRTDBL: + /* A fpload can't be issued until one cycle before a + preceding arithmetic operation has finished if + the target of the fpload is the destination of the + arithmetic operation. */ + return cost - (pa_cpu_attr == PROCESSOR_700) ? 1 : 2; + + default: + return 0; + } + } + } + else if (get_attr_type (insn) == TYPE_FPALU) + { + rtx pat = PATTERN (insn); + rtx dep_pat = PATTERN (dep_insn); + if (GET_CODE (pat) == PARALLEL) + { + /* This happens for the fldXs,mb patterns. */ + pat = XVECEXP (pat, 0, 0); + } + if (GET_CODE (pat) != SET || GET_CODE (dep_pat) != SET) + /* If this happens, we have to extend this to schedule + optimally. Return 0 for now. */ + return 0; + + if (reg_mentioned_p (SET_DEST (pat), SET_DEST (dep_pat))) + { + if (! recog_memoized (dep_insn)) + return 0; + switch (get_attr_type (dep_insn)) + { + case TYPE_FPDIVSGL: + case TYPE_FPDIVDBL: + case TYPE_FPSQRTSGL: + case TYPE_FPSQRTDBL: + /* An ALU flop can't be issued until two cycles before a + preceding divide or sqrt operation has finished if + the target of the ALU flop is also the target of + of the divide or sqrt operation. */ + return cost - (pa_cpu_attr == PROCESSOR_700) ? 2 : 4; + + default: + return 0; + } + } + } ! /* For other output dependencies, the cost is 0. */ ! return 0; ! } ! else ! abort (); } *************** *** 2602,2605 **** --- 2823,2832 ---- return 0; } + /* Jumps inside switch tables which have unfilled delay slots + also need adjustment. */ + else if (GET_CODE (insn) == JUMP_INSN + && simplejump_p (insn) + && GET_MODE (PATTERN (insn)) == DImode) + return 4; /* Millicode insn with an unfilled delay slot. */ else if (GET_CODE (insn) == INSN *************** *** 2916,2919 **** --- 3143,3152 ---- } } + #if 0 + /* The code here is completely wrong. It attempts to extract parts of + a CONST_DOUBLE which is wrong since REAL_ARITHMETIC is defined, and it + extracts the wrong indices (0 instead of 2 and 1 instead of 3) using + the wrong macro (XINT instead of XWINT). + Just disable it for now, since the code will never be used anyway! */ else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == SFmode) { *************** *** 2933,2936 **** --- 3166,3170 ---- fprintf (file, "0r%.20g", u.d); } + #endif else output_addr_const (file, x); *************** *** 2951,2955 **** if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x)) assemble_name (file, XSTR (x, 0)); ! else if (GET_CODE (x) == SYMBOL_REF) { assemble_name (file, XSTR (x, 0)); --- 3185,3189 ---- if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x)) assemble_name (file, XSTR (x, 0)); ! else if (GET_CODE (x) == SYMBOL_REF && !flag_pic) { assemble_name (file, XSTR (x, 0)); *************** *** 2995,2999 **** else abort (); ! if (!read_only_operand (base)) fprintf (file, "-$global$"); fprintf (file, "%s", sep); --- 3229,3233 ---- else abort (); ! if (!read_only_operand (base) && !flag_pic) fprintf (file, "-$global$"); fprintf (file, "%s", sep); *************** *** 3036,3062 **** rtx insn; { ! ! if (unsignedp) ! { ! import_milli (mulU); ! return output_call (insn, gen_rtx (SYMBOL_REF, SImode, "$$mulU"), ! gen_rtx (REG, SImode, 31)); ! } ! else ! { ! import_milli (mulI); ! return output_call (insn, gen_rtx (SYMBOL_REF, SImode, "$$mulI"), ! gen_rtx (REG, SImode, 31)); ! } } - /* If operands isn't NULL, then it's a CONST_INT with which we can do - something */ - - /* Emit the rtl for doing a division by a constant. */ ! /* Do magic division millicodes exist for this value? */ ! static int magic_milli[]= {0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1}; --- 3270,3281 ---- rtx insn; { ! import_milli (mulI); ! return output_call (insn, gen_rtx (SYMBOL_REF, SImode, "$$mulI"), ! gen_rtx (REG, SImode, 31)); } /* Emit the rtl for doing a division by a constant. */ ! /* Do magic division millicodes exist for this value? */ static int magic_milli[]= {0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1}; *************** *** 3262,3265 **** --- 3481,3492 ---- int regno = true_regnum (in); + /* Trying to load a constant into a FP register during PIC code + generation will require %r1 as a scratch register. */ + if (flag_pic == 2 + && GET_MODE_CLASS (mode) == MODE_INT + && FP_REG_CLASS_P (class) + && (GET_CODE (in) == CONST_INT || GET_CODE (in) == CONST_DOUBLE)) + return R1_REGS; + if (((regno >= FIRST_PSEUDO_REGISTER || regno == -1) && GET_MODE_CLASS (mode) == MODE_INT *************** *** 3271,3274 **** --- 3498,3506 ---- in = XEXP (in, 0); + if (!flag_pic + && symbolic_operand (in, VOIDmode) + && read_only_operand (in)) + return NO_REGS; + if (class != R1_REGS && symbolic_operand (in, VOIDmode)) return R1_REGS; *************** *** 3426,3429 **** --- 3658,3676 ---- strcat (buf, ",n %2,%1,.+12\n\tbl %0,0"); } + /* Handle short backwards branch with an unfilled delay slot. + Using a comb;nop rather than comiclr;bl saves 1 cycle for both + taken and untaken branches. */ + else if (dbr_sequence_length () == 0 + && ! forward_branch_p (insn) + && insn_addresses + && VAL_14_BITS_P (insn_addresses[INSN_UID (JUMP_LABEL (insn))] + - insn_addresses[INSN_UID (insn)])) + { + strcpy (buf, "com%I2b,"); + if (negated) + strcat (buf, "%B3 %2,%1,%0%#"); + else + strcat (buf, "%S3 %2,%1,%0%#"); + } else { *************** *** 3538,3541 **** --- 3785,3808 ---- strcat (buf, " %0,%1,.+12\n\tbl %2,0"); } + /* Handle short backwards branch with an unfilled delay slot. + Using a bb;nop rather than extrs;bl saves 1 cycle for both + taken and untaken branches. */ + else if (dbr_sequence_length () == 0 + && ! forward_branch_p (insn) + && insn_addresses + && VAL_14_BITS_P (insn_addresses[INSN_UID (JUMP_LABEL (insn))] + - insn_addresses[INSN_UID (insn)])) + { + strcpy (buf, "bb,"); + if ((which == 0 && negated) + || (which == 1 && ! negated)) + strcat (buf, ">="); + else + strcat (buf, "<"); + if (negated) + strcat (buf, " %0,%1,%3%#"); + else + strcat (buf, " %0,%1,%2%#"); + } else { *************** *** 3623,3626 **** --- 3890,3902 ---- && nullify) return "addib,%N2,n %1,%0,.+12\n\tbl %3,0"; + /* Handle short backwards branch with an unfilled delay slot. + Using a addb;nop rather than addi;bl saves 1 cycle for both + taken and untaken branches. */ + else if (dbr_sequence_length () == 0 + && ! forward_branch_p (insn) + && insn_addresses + && VAL_14_BITS_P (insn_addresses[INSN_UID (JUMP_LABEL (insn))] + - insn_addresses[INSN_UID (insn)])) + return "addib,%C2 %1,%0,%3%#"; /* Handle normal cases. */ *************** *** 3718,3723 **** && ! forward_branch_p (insn) && nullify) ! return "movb,%N2,n %1,%0,.+12\n\ttbl %3,0"; /* Handle normal cases. */ if (nullify) --- 3994,4008 ---- && ! forward_branch_p (insn) && nullify) ! return "movb,%N2,n %1,%0,.+12\n\tbl %3,0"; + /* Handle short backwards branch with an unfilled delay slot. + Using a movb;nop rather than or;bl saves 1 cycle for both + taken and untaken branches. */ + else if (dbr_sequence_length () == 0 + && ! forward_branch_p (insn) + && insn_addresses + && VAL_14_BITS_P (insn_addresses[INSN_UID (JUMP_LABEL (insn))] + - insn_addresses[INSN_UID (insn)])) + return "movb,%C2 %1,%0,%3%#"; /* Handle normal cases. */ if (nullify) *************** *** 3762,3768 **** %r2 for most calls, %r31 for millicode calls. ! When TARGET_LONG_CALLS is true, output_call is only called for ! millicode calls. In addition, no delay slots are available when ! TARGET_LONG_CALLS is true. */ char * --- 4047,4053 ---- %r2 for most calls, %r31 for millicode calls. ! When TARGET_MILLICODE_LONG_CALLS is true, then we have to assume ! that two instruction sequences must be used to reach the millicode ! routines (including dyncall!). */ char * *************** *** 3777,3795 **** rtx seq_insn; ! /* Handle common case -- empty delay slot or no jump in the delay slot. */ ! if (dbr_sequence_length () == 0 || (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN)) { xoperands[0] = call_dest; xoperands[1] = return_pointer; ! if (TARGET_LONG_CALLS) { ! output_asm_insn ("ldil L%%%0,%%r29", xoperands); ! output_asm_insn ("ldo R%%%0(%%r29),%%r29", xoperands); ! output_asm_insn ("blr 0,%r1\n\tbv,n 0(%%r29)\n\tnop", xoperands); } else ! output_asm_insn ("bl %0,%r1%#", xoperands); return ""; } --- 4062,4210 ---- rtx seq_insn; ! /* Handle long millicode calls for mod, div, and mul. */ ! if (TARGET_PORTABLE_RUNTIME ! || (TARGET_MILLICODE_LONG_CALLS && REGNO (return_pointer) == 31)) ! { ! xoperands[0] = call_dest; ! xoperands[1] = return_pointer; ! output_asm_insn ("ldil L%%%0,%%r29", xoperands); ! output_asm_insn ("ldo R%%%0(%%r29),%%r29", xoperands); ! output_asm_insn ("blr 0,%r1\n\tbv,n 0(%%r29)\n\tnop", xoperands); ! return ""; ! } ! ! /* Handle common case -- empty delay slot or no jump in the delay slot, ! and we're sure that the branch will reach the beginning of the $CODE$ ! subspace. */ ! if ((dbr_sequence_length () == 0 ! && get_attr_length (insn) == 8) || (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN ! && get_attr_length (insn) == 4)) { xoperands[0] = call_dest; xoperands[1] = return_pointer; ! output_asm_insn ("bl %0,%r1%#", xoperands); ! return ""; ! } ! ! /* This call may not reach the beginning of the $CODE$ subspace. */ ! if (get_attr_length (insn) > 8) ! { ! int delay_insn_deleted = 0; ! rtx xoperands[2]; ! rtx link; ! ! /* We need to emit an inline long-call branch. Furthermore, ! because we're changing a named function call into an indirect ! function call well after the parameters have been set up, we ! need to make sure any FP args appear in both the integer ! and FP registers. Also, we need move any delay slot insn ! out of the delay slot -- Yuk! */ ! if (dbr_sequence_length () != 0 ! && GET_CODE (NEXT_INSN (insn)) != JUMP_INSN) ! { ! /* A non-jump insn in the delay slot. By definition we can ! emit this insn before the call (and in fact before argument ! relocating. */ ! final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, 0); ! ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! delay_insn_deleted = 1; ! } ! ! /* Now copy any FP arguments into integer registers. */ ! for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) ! { ! int arg_mode, regno; ! rtx use = XEXP (link, 0); ! if (! (GET_CODE (use) == USE ! && GET_CODE (XEXP (use, 0)) == REG ! && FUNCTION_ARG_REGNO_P (REGNO (XEXP (use, 0))))) ! continue; ! ! arg_mode = GET_MODE (XEXP (use, 0)); ! regno = REGNO (XEXP (use, 0)); ! /* Is it a floating point register? */ ! if (regno >= 32 && regno <= 39) ! { ! /* Copy from the FP register into an integer register ! (via memory). */ ! if (arg_mode == SFmode) ! { ! xoperands[0] = XEXP (use, 0); ! xoperands[1] = gen_rtx (REG, SImode, 26 - (regno - 32) / 2); ! output_asm_insn ("fstws %0,-16(%%sr0,%%r30)", xoperands); ! output_asm_insn ("ldw -16(%%sr0,%%r30),%1", xoperands); ! } ! else ! { ! xoperands[0] = XEXP (use, 0); ! xoperands[1] = gen_rtx (REG, DImode, 25 - (regno - 34) / 2); ! output_asm_insn ("fstds %0,-16(%%sr0,%%r30)", xoperands); ! output_asm_insn ("ldw -12(%%sr0,%%r30),%R1", xoperands); ! output_asm_insn ("ldw -16(%%sr0,%%r30),%1", xoperands); ! } ! ! } ! } ! ! if (flag_pic) ! { ! /* We have to load the address of the function using a procedure ! label (plabel). The LP and RP relocs don't work reliably for PIC, ! so we make a plain 32 bit plabel in the data segment instead. We ! have to defer outputting it of course... Not pretty. */ ! ! xoperands[0] = gen_label_rtx (); ! output_asm_insn ("addil LT%%%0,%%r19\n\tldw RT%%%0(%%r1),%%r22", ! xoperands); ! output_asm_insn ("ldw 0(0,%%r22),%%r22", xoperands); ! ! if (deferred_plabels == 0) ! deferred_plabels = (struct defer_plab *) ! xmalloc (1 * sizeof (struct defer_plab)); ! else ! deferred_plabels = (struct defer_plab *) ! xrealloc (deferred_plabels, ! (n_deferred_plabels + 1) * sizeof (struct defer_plab)); ! deferred_plabels[n_deferred_plabels].internal_label = xoperands[0]; ! deferred_plabels[n_deferred_plabels].symbol = call_dest; ! n_deferred_plabels++; ! } ! else { ! /* Now emit the inline long-call. */ ! xoperands[0] = call_dest; ! output_asm_insn ("ldil LP%%%0,%%r22\n\tldo RP%%%0(%%r22),%%r22", ! xoperands); ! } ! ! /* If TARGET_MILLICODE_LONG_CALLS, then we must use a long-call sequence ! to call dyncall! */ ! if (TARGET_MILLICODE_LONG_CALLS) ! { ! output_asm_insn ("ldil L%%$$dyncall,%%r31", xoperands); ! output_asm_insn ("ldo R%%$$dyncall(%%r31),%%r31", xoperands); ! output_asm_insn ("blr 0,%%r2\n\tbv,n 0(%%r31)\n\tnop", xoperands); } else ! output_asm_insn ("bl $$dyncall,%%r31\n\tcopy %%r31,%%r2", xoperands); ! ! /* If we had a jump in the call's delay slot, output it now. */ ! if (dbr_sequence_length () != 0 ! && !delay_insn_deleted) ! { ! xoperands[0] = XEXP (PATTERN (NEXT_INSN (insn)), 1); ! output_asm_insn ("b,n %0", xoperands); ! ! /* Now delete the delay insn. */ ! PUT_CODE (NEXT_INSN (insn), NOTE); ! NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED; ! NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0; ! } return ""; } *************** *** 3829,3832 **** --- 4244,4248 ---- } + extern struct obstack permanent_obstack; extern struct obstack *saveable_obstack; *************** *** 3834,3846 **** for function labels if they might be passed to a function in a shared library (because shared libraries don't live in code ! space), and special magic is needed to construct their address. */ void ! hppa_encode_label (sym) rtx sym; { char *str = XSTR (sym, 0); int len = strlen (str); ! char *newstr = obstack_alloc (saveable_obstack, len + 2) ; if (str[0] == '*') --- 4250,4271 ---- for function labels if they might be passed to a function in a shared library (because shared libraries don't live in code ! space), and special magic is needed to construct their address. + For reasons too disgusting to describe storage for the new name + is allocated either on the saveable_obstack (released at function + exit) or on the permanent_obstack for things that can never change + (libcall names for example). */ + void ! hppa_encode_label (sym, permanent) rtx sym; + int permanent; { char *str = XSTR (sym, 0); int len = strlen (str); ! char *newstr; ! ! newstr = obstack_alloc ((permanent ? &permanent_obstack : saveable_obstack), ! len + 2); if (str[0] == '*') *************** *** 4057,4059 **** --- 4482,4560 ---- else return 0; + } + + + /* We use this hook to perform a PA specific optimization which is difficult + to do in earlier passes. + + We want the delay slots of branches within jump tables to be filled. + None of the compiler passes at the moment even has the notion that a + PA jump table doesn't contain addresses, but instead contains actual + instructions! + + Because we actually jump into the table, the addresses of each entry + must stay constant in relation to the beginning of the table (which + itself must stay constant relative to the instruction to jump into + it). I don't believe we can guarantee earlier passes of the compiler + will adhere to those rules. + + So, late in the compilation process we find all the jump tables, and + expand them into real code -- eg each entry in the jump table vector + will get an appropriate label followed by a jump to the final target. + + Reorg and the final jump pass can then optimize these branches and + fill their delay slots. We end up with smaller, more efficient code. + + The jump instructions within the table are special; we must be able + to identify them during assembly output (if the jumps don't get filled + we need to emit a nop rather than nullifying the delay slot)). We + identify jumps in switch tables by marking the SET with DImode. */ + + pa_reorg (insns) + rtx insns; + { + rtx insn; + + /* This is fairly cheap, so always run it if optimizing. */ + if (optimize > 0) + { + /* Find and explode all ADDR_VEC insns. */ + insns = get_insns (); + for (insn = insns; insn; insn = NEXT_INSN (insn)) + { + rtx pattern, tmp, location; + unsigned int length, i; + + /* Find an ADDR_VEC insn to explode. */ + if (GET_CODE (insn) != JUMP_INSN + || GET_CODE (PATTERN (insn)) != ADDR_VEC) + continue; + + pattern = PATTERN (insn); + location = PREV_INSN (insn); + length = XVECLEN (pattern, 0); + for (i = 0; i < length; i++) + { + /* Emit the jump itself. */ + tmp = gen_switch_jump (XEXP (XVECEXP (pattern, 0, i), 0)); + tmp = emit_jump_insn_after (tmp, location); + JUMP_LABEL (tmp) = XEXP (XVECEXP (pattern, 0, i), 0); + LABEL_NUSES (JUMP_LABEL (tmp))++; + + /* Emit a BARRIER after the jump. */ + location = NEXT_INSN (location); + emit_barrier_after (location); + + /* Put a CODE_LABEL before each so jump.c does not optimize + the jumps away. */ + location = NEXT_INSN (location); + tmp = gen_label_rtx (); + LABEL_NUSES (tmp) = 1; + emit_label_after (tmp, location); + location = NEXT_INSN (location); + } + /* Delete the ADDR_VEC. */ + delete_insn (insn); + } + } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa.h gcc-2.7.0/config/pa/pa.h *** gcc-2.6.3/config/pa/pa.h Sun Aug 21 23:15:08 1994 --- gcc-2.7.0/config/pa/pa.h Thu Jun 15 15:44:39 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for the HP Spectrum. ! Copyright (C) 1992, 1993 Free Software Foundation, Inc. ! Contributed by Michael Tiemann (tiemann@mcc.com) and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for Software Science at the University of Utah. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for the HP Spectrum. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ! Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for Software Science at the University of Utah. *************** *** 19,23 **** 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. */ enum cmp_type /* comparison type */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ enum cmp_type /* comparison type */ *************** *** 29,32 **** --- 30,51 ---- }; + /* For long call handling. */ + extern unsigned int total_code_bytes; + + /* Which processor to schedule for. */ + + enum processor_type + { + PROCESSOR_700, + PROCESSOR_7100, + PROCESSOR_7100LC, + }; + + #define pa_cpu_attr ((enum attr_cpu)pa_cpu) + + /* For -mschedule= option. */ + extern char *pa_cpu_string; + extern enum processor_type pa_cpu; + /* Print subsidiary information on the compiler version in use. */ *************** *** 48,61 **** #define TARGET_DISABLE_FPREGS (target_flags & 2) /* Allow unconditional jumps in the delay slots of call instructions. */ #define TARGET_JUMP_IN_DELAY (target_flags & 8) ! /* Force all function calls to indirect addressing via a register. This ! avoids lossage when the function is very far away from the current PC. ??? What about simple jumps, they can suffer from the same problem. Would require significant surgery in pa.md. */ ! #define TARGET_LONG_CALLS (target_flags & 16) /* Disable indexed addressing modes. */ --- 67,92 ---- #define TARGET_DISABLE_FPREGS (target_flags & 2) + /* Generate code which assumes that calls through function pointers will + never cross a space boundary. Such assumptions are generally safe for + building kernels and statically linked executables. Code compiled with + this option will fail miserably if the executable is dynamically linked + or uses nested functions! */ + #define TARGET_FAST_INDIRECT_CALLS (target_flags & 4) + /* Allow unconditional jumps in the delay slots of call instructions. */ #define TARGET_JUMP_IN_DELAY (target_flags & 8) ! /* In rare cases, a millicode call via "bl" can not be turned into ! a millicode call using "ble" (when SHLIB_INFO subspace is very large). + This option forces just millicode calls to use inline long-calls + This is far more efficient than the old long-call option which forced + every function to be called indirectly (as is still the case for + TARGET_PORTABLE_RUNTIME). + ??? What about simple jumps, they can suffer from the same problem. Would require significant surgery in pa.md. */ ! #define TARGET_MILLICODE_LONG_CALLS (target_flags & 16) /* Disable indexed addressing modes. */ *************** *** 67,71 **** to avoid this since it's a performance loss for non-prototyped code. ! Note TARGET_PORTABLE_RUNTIME also implies TARGET_LONG_CALLS. */ #define TARGET_PORTABLE_RUNTIME (target_flags & 64) --- 98,103 ---- to avoid this since it's a performance loss for non-prototyped code. ! Note TARGET_PORTABLE_RUNTIME also forces all calls to use inline ! long-call stubs which is quite expensive. */ #define TARGET_PORTABLE_RUNTIME (target_flags & 64) *************** *** 77,80 **** --- 109,116 ---- #define TARGET_GAS (target_flags & 128) + /* Emit code for processors which do not have an FPU. */ + + #define TARGET_SOFT_FLOAT (target_flags & 256) + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** *** 89,97 **** {"pa-risc-1-1", 1}, \ {"disable-fpregs", 2}, \ ! {"no-disable-fpregs", 2}, \ {"jump-in-delay", 8}, \ {"no-jump-in-delay", -8}, \ ! {"long-calls", 16}, \ ! {"no-long-calls", -16}, \ {"disable-indexing", 32}, \ {"no-disable-indexing", -32},\ --- 125,135 ---- {"pa-risc-1-1", 1}, \ {"disable-fpregs", 2}, \ ! {"no-disable-fpregs", -2}, \ ! {"fast-indirect-calls", 4}, \ ! {"no-fast-indirect-calls", -4},\ {"jump-in-delay", 8}, \ {"no-jump-in-delay", -8}, \ ! {"millicode-long-calls", 16},\ ! {"no-millicode-long-calls", -16},\ {"disable-indexing", 32}, \ {"no-disable-indexing", -32},\ *************** *** 100,103 **** --- 138,143 ---- {"gas", 128}, \ {"no-gas", -128}, \ + {"soft-float", 256}, \ + {"no-soft-float", -256}, \ { "", TARGET_DEFAULT}} *************** *** 106,114 **** #endif #define DBX_DEBUGGING_INFO #define DEFAULT_GDB_EXTENSIONS 1 /* This is the way other stabs-in-XXX tools do things. We will be ! compatable. */ #define DBX_BLOCKS_FUNCTION_RELATIVE 1 --- 146,161 ---- #endif + #define TARGET_OPTIONS \ + { \ + { "schedule=", &pa_cpu_string }\ + } + + #define OVERRIDE_OPTIONS override_options () + #define DBX_DEBUGGING_INFO #define DEFAULT_GDB_EXTENSIONS 1 /* This is the way other stabs-in-XXX tools do things. We will be ! compatible. */ #define DBX_BLOCKS_FUNCTION_RELATIVE 1 *************** *** 135,139 **** #define DBX_FUNCTION_FIRST ! /* Only lables should ever begin in colunm zero. */ #define ASM_STABS_OP "\t.stabs" #define ASM_STABN_OP "\t.stabn" --- 182,186 ---- #define DBX_FUNCTION_FIRST ! /* Only labels should ever begin in column zero. */ #define ASM_STABS_OP "\t.stabs" #define ASM_STABN_OP "\t.stabn" *************** *** 160,168 **** + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0))) #if (TARGET_DEFAULT & 1) == 0 #define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\ %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}" #else ! #define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:-D__hp9000s700 -D_PA_RISC1_1}}" #endif --- 207,223 ---- + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0))) + /* gdb needs a null N_SO at the end of each file for scattered loading. */ + + #undef DBX_OUTPUT_MAIN_SOURCE_FILE_END + #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ + fprintf (FILE, \ + "%s\n\t.stabs \"%s\",%d,0,0,L$text_end\nL$text_end:\n",\ + TEXT_SECTION_ASM_OP, "" , N_SO) + #if (TARGET_DEFAULT & 1) == 0 #define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\ %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}" #else ! #define CPP_SPEC "%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 -D_PA_RISC1_1}}}" #endif *************** *** 171,175 **** #define CC1_SPEC "%{pg:} %{p:}" ! #define LINK_SPEC "-u main" /* Allow $ in identifiers. */ --- 226,230 ---- #define CC1_SPEC "%{pg:} %{p:}" ! #define LINK_SPEC "%{!shared:-u main} %{shared:-b}" /* Allow $ in identifiers. */ *************** *** 183,210 **** #define WCHAR_TYPE_SIZE 32 - /* Sometimes certain combinations of command options do not make sense - on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. - - On the PA, it is used to explicitly warn the user that -fpic and -fPIC - do not work. */ - - #define OVERRIDE_OPTIONS \ - { \ - if (flag_pic != 0) \ - warning ("-fpic and -fPIC are not supported on the PA."); \ - } - /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP /* Names to predefine in the preprocessor for this target machine. */ #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -D_HPUX_SOURCE -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem(unix) -Asystem(bsd) -Acpu(hppa) -Amachine(hppa)" /* target machine storage layout */ /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ --- 238,284 ---- #define WCHAR_TYPE_SIZE 32 /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP + /* Machine dependent reorg pass. */ + #define MACHINE_DEPENDENT_REORG(X) pa_reorg(X) + /* Names to predefine in the preprocessor for this target machine. */ #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -D_HPUX_SOURCE -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem(unix) -Asystem(bsd) -Acpu(hppa) -Amachine(hppa)" + + /* HPUX has a program 'chatr' to list the dependencies of dynamically + linked executables and shared libraries. */ + #define LDD_SUFFIX "chatr" + /* look for lines like "dynamic /usr/lib/X11R5/libX11.sl". */ + #define PARSE_LDD_OUTPUT(PTR) \ + do { \ + while (*PTR == ' ') PTR++; \ + if (strncmp (PTR, "dynamic", sizeof ("dynamic") - 1) == 0) \ + { \ + PTR += sizeof ("dynamic") - 1; \ + while (*p == ' ') PTR++; \ + } \ + else \ + PTR = 0; \ + } while (0) /* target machine storage layout */ + /* Define for cross-compilation from a host with a different float format + or endianness (e.g. VAX, x86). */ + #define REAL_ARITHMETIC + + /* Define this macro if it is advisable to hold scalars in registers + in a wider mode than that declared by the program. In such cases, + the value is constrained to be within the bounds of the declared + type, but kept valid in the wider mode. The signedness of the + extension may differ from that of the type. */ + + #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ + if (GET_MODE_CLASS (MODE) == MODE_INT \ + && GET_MODE_SIZE (MODE) < 4) \ + (MODE) = SImode; + /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ *************** *** 217,222 **** /* Define this if most significant word of a multiword number is lowest numbered. */ - /* For the HP-PA we can decide arbitrarily - since there are no machine instructions for them. */ #define WORDS_BIG_ENDIAN 1 --- 291,294 ---- *************** *** 323,327 **** Reg 27 = Global Data Pointer (hp) Reg 28 = Temporary/???/Return Value register ! Reg 29 = Temporary/Static Chain/Return Value register Reg 30 = stack pointer Reg 31 = Temporary/Millicode Return Pointer (hp) --- 395,399 ---- Reg 27 = Global Data Pointer (hp) Reg 28 = Temporary/???/Return Value register ! Reg 29 = Temporary/Static Chain/Return Value register #2 Reg 30 = stack pointer Reg 31 = Temporary/Millicode Return Pointer (hp) *************** *** 389,393 **** fixed_regs[i] = call_used_regs[i] = 1; \ } \ ! else if (TARGET_DISABLE_FPREGS) \ { \ for (i = 32; i < 88; i++) \ --- 461,466 ---- fixed_regs[i] = call_used_regs[i] = 1; \ } \ ! else if (TARGET_DISABLE_FPREGS \ ! || TARGET_SOFT_FLOAT) \ { \ for (i = 32; i < 88; i++) \ *************** *** 496,505 **** #define PIC_OFFSET_TABLE_REGNUM 19 ! #define FINALIZE_PIC finalize_pic () /* SOM ABI says that objects larger than 64 bits are returned in memory. */ #define RETURN_IN_MEMORY(TYPE) \ ! (TYPE_MODE (TYPE) == BLKmode || int_size_in_bytes (TYPE) > 8) /* Register in which address to store a structure value --- 569,583 ---- #define PIC_OFFSET_TABLE_REGNUM 19 + #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 1 ! /* Initialize hppa_save_pic_table_rtx before RTL generation for ! each function. We used to do this in FINALIZE_PIC, but FINALIZE_PIC ! isn't always called for static inline functions. */ ! #define INIT_EXPANDERS hppa_save_pic_table_rtx = 0; /* SOM ABI says that objects larger than 64 bits are returned in memory. */ + #define DEFAULT_PCC_STRUCT_RETURN 0 #define RETURN_IN_MEMORY(TYPE) \ ! (int_size_in_bytes (TYPE) > 8 || TREE_ADDRESSABLE (TYPE)) /* Register in which address to store a structure value *************** *** 716,723 **** /* 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,SIZE) 0 /* Define how to find the value returned by a function. --- 794,802 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 731,736 **** #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! gen_rtx (REG, TYPE_MODE (VALTYPE), ((TYPE_MODE (VALTYPE) == SFmode || \ ! TYPE_MODE (VALTYPE) == DFmode) ? \ 32 : 28)) --- 810,816 ---- #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! gen_rtx (REG, TYPE_MODE (VALTYPE), ((! TARGET_SOFT_FLOAT \ ! && (TYPE_MODE (VALTYPE) == SFmode || \ ! TYPE_MODE (VALTYPE) == DFmode)) ? \ 32 : 28)) *************** *** 738,743 **** assuming the value has mode MODE. */ ! #define LIBCALL_VALUE(MODE) \ ! gen_rtx (REG, MODE, ((MODE) == SFmode || (MODE) == DFmode ? 32 : 28)) /* 1 if N is a possible register number for a function value --- 818,825 ---- assuming the value has mode MODE. */ ! #define LIBCALL_VALUE(MODE) \ ! gen_rtx (REG, MODE, \ ! (! TARGET_SOFT_FLOAT \ ! && ((MODE) == SFmode || (MODE) == DFmode) ? 32 : 28)) /* 1 if N is a possible register number for a function value *************** *** 745,754 **** #define FUNCTION_VALUE_REGNO_P(N) \ ! ((N) == 28 || (N) == 32) /* 1 if N is a possible register number for function argument passing. */ #define FUNCTION_ARG_REGNO_P(N) \ ! (((N) >= 23 && (N) <= 26) || ((N) >= 32 && (N) <= 39)) /* Define a data type for recording info about an argument list --- 827,836 ---- #define FUNCTION_VALUE_REGNO_P(N) \ ! ((N) == 28 || (! TARGET_SOFT_FLOAT && (N) == 32)) /* 1 if N is a possible register number for function argument passing. */ #define FUNCTION_ARG_REGNO_P(N) \ ! (((N) >= 23 && (N) <= 26) || (! TARGET_SOFT_FLOAT && (N) >= 32 && (N) <= 39)) /* Define a data type for recording info about an argument list *************** *** 827,833 **** functions and calls through pointers to functions -- the conventions are different! Calls through pointers to functions only use general ! registers for the first four argument words. Note the indirect function ! calling conventions are in effect during TARGET_LONG_CALLS, but ! current_call_is_indirect will not be set in such situations. Of course all this is different for the portable runtime model --- 909,913 ---- functions and calls through pointers to functions -- the conventions are different! Calls through pointers to functions only use general ! registers for the first four argument words. Of course all this is different for the portable runtime model *************** *** 861,875 **** (4 >= ((CUM).words + FUNCTION_ARG_SIZE ((MODE), (TYPE))) \ ? (!TARGET_PORTABLE_RUNTIME || (TYPE) == 0 \ ! || !FLOAT_MODE_P (MODE) || (CUM).nargs_prototype > 0) \ ? gen_rtx (REG, (MODE), \ (FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \ ! ? (((!(current_call_is_indirect || TARGET_LONG_CALLS) \ || TARGET_PORTABLE_RUNTIME) \ ! && (MODE) == DFmode) \ ? ((CUM).words ? 38 : 34) \ : ((CUM).words ? 23 : 25)) \ ! : (((!(current_call_is_indirect || TARGET_LONG_CALLS) \ || TARGET_PORTABLE_RUNTIME) \ ! && (MODE) == SFmode) \ ? (32 + 2 * (CUM).words) \ : (27 - (CUM).words - FUNCTION_ARG_SIZE ((MODE), \ --- 941,958 ---- (4 >= ((CUM).words + FUNCTION_ARG_SIZE ((MODE), (TYPE))) \ ? (!TARGET_PORTABLE_RUNTIME || (TYPE) == 0 \ ! || !FLOAT_MODE_P (MODE) || TARGET_SOFT_FLOAT \ ! || (CUM).nargs_prototype > 0) \ ? gen_rtx (REG, (MODE), \ (FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \ ! ? (((!current_call_is_indirect \ || TARGET_PORTABLE_RUNTIME) \ ! && (MODE) == DFmode \ ! && ! TARGET_SOFT_FLOAT) \ ? ((CUM).words ? 38 : 34) \ : ((CUM).words ? 23 : 25)) \ ! : (((!current_call_is_indirect \ || TARGET_PORTABLE_RUNTIME) \ ! && (MODE) == SFmode \ ! && ! TARGET_SOFT_FLOAT) \ ? (32 + 2 * (CUM).words) \ : (27 - (CUM).words - FUNCTION_ARG_SIZE ((MODE), \ *************** *** 911,914 **** --- 994,1001 ---- #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ ((TYPE) && int_size_in_bytes (TYPE) > 8) + + #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ + ((TYPE) && int_size_in_bytes (TYPE) > 8) + extern struct rtx_def *hppa_compare_op0, *hppa_compare_op1; *************** *** 953,959 **** parm = TREE_CHAIN (parm)) \ { \ ! if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode) \ fprintf (FILE, ",ARGW%d=FR", i++); \ ! else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode) \ { \ if (i <= 2) \ --- 1040,1048 ---- parm = TREE_CHAIN (parm)) \ { \ ! if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode \ ! && ! TARGET_SOFT_FLOAT) \ fprintf (FILE, ",ARGW%d=FR", i++); \ ! else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode \ ! && ! TARGET_SOFT_FLOAT) \ { \ if (i <= 2) \ *************** *** 970,973 **** --- 1059,1066 ---- FUNCTION_ARG_SIZE (TYPE_MODE (DECL_ARG_TYPE (parm)),\ DECL_ARG_TYPE (parm)); \ + /* Passing structs by invisible reference uses \ + one general register. */ \ + if (arg_size > 2) \ + arg_size = 1; \ if (arg_size == 2 && i <= 2) \ { \ *************** *** 991,997 **** fprintf (FILE, ",ARGW%d=GR", i); \ } \ ! if (TYPE_MODE (fntype) == DFmode) \ fprintf (FILE, ",RTNVAL=FR"); \ ! else if (TYPE_MODE (fntype) == SFmode) \ fprintf (FILE, ",RTNVAL=FU"); \ else if (fntype != void_type_node) \ --- 1084,1090 ---- fprintf (FILE, ",ARGW%d=GR", i); \ } \ ! if (TYPE_MODE (fntype) == DFmode && ! TARGET_SOFT_FLOAT) \ fprintf (FILE, ",RTNVAL=FR"); \ ! else if (TYPE_MODE (fntype) == SFmode && ! TARGET_SOFT_FLOAT) \ fprintf (FILE, ",RTNVAL=FU"); \ else if (fntype != void_type_node) \ *************** *** 1130,1134 **** _builtin_saveregs, so we must make this explicit. */ ! #define EXPAND_BUILTIN_SAVEREGS(ARGLIST) (rtx)hppa_builtin_saveregs (ARGLIST) --- 1223,1228 ---- _builtin_saveregs, so we must make this explicit. */ ! extern struct rtx_def *hppa_builtin_saveregs (); ! #define EXPAND_BUILTIN_SAVEREGS(ARGLIST) hppa_builtin_saveregs (ARGLIST) *************** *** 1186,1191 **** #define LEGITIMATE_CONSTANT_P(X) \ ! (GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \ ! || (X) == CONST0_RTX (GET_MODE (X))) /* Subroutine for EXTRA_CONSTRAINT. --- 1280,1286 ---- #define LEGITIMATE_CONSTANT_P(X) \ ! ((GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \ ! || (X) == CONST0_RTX (GET_MODE (X))) \ ! && !(flag_pic && function_label_operand (X, VOIDmode))) /* Subroutine for EXTRA_CONSTRAINT. *************** *** 1308,1314 **** goto ADDR; \ else if (flag_pic == 1 \ ! && GET_CODE (XEXP (X, 1)) != REG \ ! && GET_CODE (XEXP (X, 1)) != LO_SUM \ ! && GET_CODE (XEXP (X, 1)) != MEM) \ goto ADDR; \ } \ --- 1403,1407 ---- goto ADDR; \ else if (flag_pic == 1 \ ! && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)\ goto ADDR; \ } \ *************** *** 1321,1325 **** if (base != 0) \ if (GET_CODE (index) == CONST_INT \ ! && ((INT_14_BITS (index) && (MODE) != SFmode && (MODE) != DFmode) \ || INT_5_BITS (index))) \ goto ADDR; \ --- 1414,1420 ---- if (base != 0) \ if (GET_CODE (index) == CONST_INT \ ! && ((INT_14_BITS (index) \ ! && (TARGET_SOFT_FLOAT \ ! || ((MODE) != SFmode && (MODE) != DFmode))) \ || INT_5_BITS (index))) \ goto ADDR; \ *************** *** 1329,1334 **** && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_P (XEXP (X, 1)) \ ! && (MODE) != SFmode \ ! && (MODE) != DFmode) \ goto ADDR; \ else if (GET_CODE (X) == LO_SUM \ --- 1424,1430 ---- && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_P (XEXP (X, 1)) \ ! && (TARGET_SOFT_FLOAT \ ! || ((MODE) != SFmode \ ! && (MODE) != DFmode))) \ goto ADDR; \ else if (GET_CODE (X) == LO_SUM \ *************** *** 1337,1342 **** && REG_OK_FOR_BASE_P (SUBREG_REG (XEXP (X, 0)))\ && CONSTANT_P (XEXP (X, 1)) \ ! && (MODE) != SFmode \ ! && (MODE) != DFmode) \ goto ADDR; \ else if (GET_CODE (X) == LABEL_REF \ --- 1433,1439 ---- && REG_OK_FOR_BASE_P (SUBREG_REG (XEXP (X, 0)))\ && CONSTANT_P (XEXP (X, 1)) \ ! && (TARGET_SOFT_FLOAT \ ! || ((MODE) != SFmode \ ! && (MODE) != DFmode))) \ goto ADDR; \ else if (GET_CODE (X) == LABEL_REF \ *************** *** 1344,1347 **** --- 1441,1450 ---- && INT_5_BITS (X))) \ goto ADDR; \ + /* Needed for -fPIC */ \ + else if (GET_CODE (X) == LO_SUM \ + && GET_CODE (XEXP (X, 0)) == REG \ + && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ + && GET_CODE (XEXP (X, 1)) == UNSPEC) \ + goto ADDR; \ } *************** *** 1415,1419 **** SYMBOL_REF_FLAG (XEXP (_rtl, 0)) = 1; \ if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! hppa_encode_label (XEXP (DECL_RTL (DECL), 0));\ } \ } \ --- 1518,1522 ---- SYMBOL_REF_FLAG (XEXP (_rtl, 0)) = 1; \ if (TREE_CODE (DECL) == FUNCTION_DECL) \ ! hppa_encode_label (XEXP (DECL_RTL (DECL), 0), 0);\ } \ } \ *************** *** 1428,1431 **** --- 1531,1545 ---- : (SYMBOL_NAME)[0] == '@')) + /* Arghh. This is used for stuff in the constant pool; this may include + function addresses on the PA, which during PIC code generation must + reside in the data space. Unfortunately, there's no way to determine + if a particular label in the constant pool refers to a function address. + So just force everything into the data space during PIC generation. */ + #define SELECT_RTX_SECTION(RTX,MODE) \ + if (flag_pic) \ + data_section (); \ + else \ + readonly_data_section (); + /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ *************** *** 1567,1572 **** #define RTX_COSTS(X,CODE,OUTER_CODE) \ case MULT: \ ! return TARGET_SNAKE && ! TARGET_DISABLE_FPREGS \ ! ? COSTS_N_INSNS (8) : COSTS_N_INSNS (20); \ case DIV: \ case UDIV: \ --- 1681,1687 ---- #define RTX_COSTS(X,CODE,OUTER_CODE) \ case MULT: \ ! return (TARGET_SNAKE && ! TARGET_DISABLE_FPREGS \ ! && ! TARGET_SOFT_FLOAT \ ! ? COSTS_N_INSNS (8) : COSTS_N_INSNS (20)); \ case DIV: \ case UDIV: \ *************** *** 1683,1686 **** --- 1798,1814 ---- #define EXTRA_SECTIONS in_bss, in_readonly_data + /* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups + which reference data within the $TEXT$ space (for example constant + strings in the $LIT$ subspace). + + The assemblers (GAS and HP as) both have problems with handling + the difference of two symbols which is the other correct way to + reference constant data during PIC code generation. + + So, there's no way to reference constant data which is in the + $TEXT$ space during PIC generation. Instead place all constant + data into the $PRIVATE$ subspace (this reduces sharing, but it + works correctly). */ + #define EXTRA_SECTION_FUNCTIONS \ void \ *************** *** 1698,1702 **** if (in_section != in_readonly_data) \ { \ ! fprintf (asm_out_file, "%s\n", READONLY_DATA_ASM_OP); \ in_section = in_readonly_data; \ } \ --- 1826,1833 ---- if (in_section != in_readonly_data) \ { \ ! if (flag_pic) \ ! fprintf (asm_out_file, "%s\n", DATA_SECTION_ASM_OP); \ ! else \ ! fprintf (asm_out_file, "%s\n", READONLY_DATA_ASM_OP); \ in_section = in_readonly_data; \ } \ *************** *** 1762,1784 **** } while (0) - /* hpux ld doesn't output the object file name, or anything useful at - all, to indicate the start of an object file's symbols. This screws - up gdb, so we'll output this magic cookie at the end of an object - file with debugging symbols */ - - #define ASM_FILE_END(FILE) \ - do { if (write_symbols == DBX_DEBUG)\ - { fputs (TEXT_SECTION_ASM_OP, FILE);\ - fputs ("\t.stabs \"end_file.\",4,0,0,Ltext_end\nLtext_end:\n",\ - (FILE));\ - }\ - } while (0) - /* The bogus HP assembler requires ALL external references to be "imported", even library calls. They look a bit different, so ! here's this macro. */ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \ do { fputs ("\t.IMPORT ", FILE); \ assemble_name (FILE, XSTR ((RTL), 0)); \ fputs (",CODE\n", FILE); \ --- 1893,1908 ---- } while (0) /* The bogus HP assembler requires ALL external references to be "imported", even library calls. They look a bit different, so ! here's this macro. ! ! Also note not all libcall names are passed to ENCODE_SECTION_INFO ! (__main for example). To make sure all libcall names have section ! info recorded in them, we do it here. */ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \ do { fputs ("\t.IMPORT ", FILE); \ + if (!function_label_operand (RTL, VOIDmode)) \ + hppa_encode_label (RTL, 1); \ assemble_name (FILE, XSTR ((RTL), 0)); \ fputs (",CODE\n", FILE); \ *************** *** 1820,1836 **** #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! do { union { double d; int i[2];} __u; \ ! __u.d = (VALUE); \ ! fprintf (FILE, "\t; .double %.20e\n\t.word %d ; = 0x%x\n\t.word %d ; = 0x%x\n", \ ! __u.d, __u.i[0], __u.i[0], __u.i[1], __u.i[1]); \ ! } while (0) /* This is how to output an assembler line defining a `float' constant. */ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ! do { union { float f; int i;} __u; \ ! __u.f = (VALUE); \ ! fprintf (FILE, "\t; .float %.12e\n\t.word %d ; = 0x%x\n", __u.f, __u.i, __u.i); \ ! } while (0) /* This is how to output an assembler line defining an `int' constant. */ --- 1944,1959 ---- #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! do { long l[2]; \ ! REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ ! fprintf (FILE, "\t.word 0x%lx\n\t.word 0x%lx\n", l[0], l[1]); \ ! } while (0) /* This is how to output an assembler line defining a `float' constant. */ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ! do { long l; \ ! REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ ! fprintf (FILE, "\t.word 0x%lx\n", l); \ ! } while (0) /* This is how to output an assembler line defining an `int' constant. */ *************** *** 1879,1883 **** This must be defined correctly as it is used when generating PIC code. ! I belive it safe to use the same definition as ASM_OUTPUT_ADDR_VEC_ELT on the PA since ASM_OUTPUT_ADDR_VEC_ELT uses pc-relative jump instructions rather than a table of absolute addresses. */ --- 2002,2006 ---- This must be defined correctly as it is used when generating PIC code. ! I believe it safe to use the same definition as ASM_OUTPUT_ADDR_VEC_ELT on the PA since ASM_OUTPUT_ADDR_VEC_ELT uses pc-relative jump instructions rather than a table of absolute addresses. */ *************** *** 1981,1985 **** break; \ case LO_SUM: \ ! fputs ("R'", FILE); \ output_global_address (FILE, XEXP (addr, 1)); \ fputs ("(", FILE); \ --- 2104,2118 ---- break; \ case LO_SUM: \ ! if (flag_pic == 0) \ ! { \ ! if (!symbolic_operand (XEXP (addr, 1))) \ ! fputs ("R'", FILE); \ ! else \ ! fputs ("RR'", FILE); \ ! } \ ! else if (flag_pic == 1) \ ! abort (); \ ! else if (flag_pic == 2) \ ! fputs ("RT'", FILE); \ output_global_address (FILE, XEXP (addr, 1)); \ fputs ("(", FILE); \ *************** *** 2022,2026 **** #if 0 #define PREDICATE_CODES \ ! {"reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ {"reg_or_cint_move_operand", {SUBREG, REG, CONST_INT}}, \ {"arith_operand", {SUBREG, REG, CONST_INT}}, \ --- 2155,2159 ---- #if 0 #define PREDICATE_CODES \ ! {"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \ {"reg_or_cint_move_operand", {SUBREG, REG, CONST_INT}}, \ {"arith_operand", {SUBREG, REG, CONST_INT}}, \ *************** *** 2044,2055 **** {"pc_or_label_operand", {LABEL_REF, PC}}, \ {"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \ ! {"reg_or_nonsymb_mem_operand", {REG, SUBREG, MEM}}, \ ! {"move_operand", {REG, SUBREG, CONST_INT, MEM}}, \ ! {"pic_operand", {REG, SUBREG, CONST_INT, SYMBOL_REF, LABEL_REF, \ ! CONST, HIGH, PC}}, /* No clue */ \ {"function_label_operand", {SYMBOL_REF}}, \ ! {"reg_or_0_or_nonsymb_mem_operand", {REG, SUBREG, CONST_INT, MEM}}, \ {"div_operand", {REG, CONST_INT}}, \ ! {"call_operand_address", {LABEL_REF, SYMBOL_REF, CONST_INT, \ ! CONST, HIGH}}, #endif --- 2177,2200 ---- {"pc_or_label_operand", {LABEL_REF, PC}}, \ {"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \ ! {"reg_or_nonsymb_mem_operand", {SUBREG, REG, MEM}}, \ ! {"move_operand", {SUBREG, REG, CONST_INT, MEM}}, \ ! {"pic_label_operand", {LABEL_REF, CONST}}, \ {"function_label_operand", {SYMBOL_REF}}, \ ! {"reg_or_0_or_nonsymb_mem_operand", {SUBREG, REG, CONST_INT, \ ! CONST_DOUBLE, MEM}}, \ {"div_operand", {REG, CONST_INT}}, \ ! {"call_operand_address", {SYMBOL_REF, LABEL_REF, CONST_INT, \ ! CONST_DOUBLE, CONST, HIGH}}, #endif + + /* We want __gcc_plt_call to appear in every program built by + gcc, so we make a reference to it out of __main. */ + #define DO_GLOBAL_DTORS_BODY \ + do { \ + extern void __gcc_plt_call (); \ + void (*reference)() = &__gcc_plt_call; \ + func_ptr *p; \ + for (p = __DTOR_LIST__ + 1; *p; ) \ + (*p++) (); \ + } while (0) + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa.md gcc-2.7.0/config/pa/pa.md *** gcc-2.6.3/config/pa/pa.md Tue Nov 1 18:47:58 1994 --- gcc-2.7.0/config/pa/pa.md Thu Jun 15 16:55:28 1995 *************** *** 1,4 **** ;;- Machine description for HP PA-RISC architecture for GNU C compiler ! ;; Copyright (C) 1992 Free Software Foundation, Inc. ;; Contributed by the Center for Software Science at the University ;; of Utah. --- 1,4 ---- ;;- Machine description for HP PA-RISC architecture for GNU C compiler ! ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ;; Contributed by the Center for Software Science at the University ;; of Utah. *************** *** 18,22 **** ;; 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 gcc Version 2 machine description is inspired by sparc.md and --- 18,23 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;; This gcc Version 2 machine description is inspired by sparc.md and *************** *** 31,37 **** (define_attr "type" ! "move,unary,binary,compare,load,store,uncond_branch,branch,cbranch,fbranch,call,dyncall,fpload,fpstore,fpalu,fpcc,fpmul,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,misc,milli" (const_string "binary")) ;; Length (in # of insns). (define_attr "length" "" --- 32,45 ---- (define_attr "type" ! "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,branch,cbranch,fbranch,call,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli" (const_string "binary")) + ;; Processor type (for scheduling, not code generation) -- this attribute + ;; must exactly match the processor_type enumeration in pa.h. + ;; + ;; FIXME: Add 800 scheduling for completeness? + + (define_attr "cpu" "700,7100,7100LC" (const (symbol_ref "pa_cpu_attr"))) + ;; Length (in # of insns). (define_attr "length" "" *************** *** 44,52 **** (const_int 8) (const_int 4)) ! (eq_attr "type" "binary") (if_then_else (match_operand 2 "arith_operand" "") (const_int 4) (const_int 12)) ! (eq_attr "type" "move,unary") (if_then_else (match_operand 1 "arith_operand" "") (const_int 4) (const_int 8))] --- 52,60 ---- (const_int 8) (const_int 4)) ! (eq_attr "type" "binary,shift,nullshift") (if_then_else (match_operand 2 "arith_operand" "") (const_int 4) (const_int 12)) ! (eq_attr "type" "move,unary,shift,nullshift") (if_then_else (match_operand 1 "arith_operand" "") (const_int 4) (const_int 8))] *************** *** 70,74 **** ;; even if the instruction is nullified. (define_attr "in_nullified_branch_delay" "false,true" ! (if_then_else (and (eq_attr "type" "!uncond_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,fpcc,fpalu,fpmul,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl") (eq_attr "length" "4")) (const_string "true") --- 78,82 ---- ;; even if the instruction is nullified. (define_attr "in_nullified_branch_delay" "false,true" ! (if_then_else (and (eq_attr "type" "!uncond_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl") (eq_attr "length" "4")) (const_string "true") *************** *** 94,101 **** ;; millicode call delay slot description. Note it disallows delay slot ! ;; when TARGET_LONG_CALLS is true. (define_delay (eq_attr "type" "milli") [(and (eq_attr "in_call_delay" "true") ! (eq (symbol_ref "TARGET_LONG_CALLS") (const_int 0))) (nil) (nil)]) --- 102,110 ---- ;; millicode call delay slot description. Note it disallows delay slot ! ;; when TARGET_PORTABLE_RUNTIME or TARGET_MILLICODE_LONG_CALLS is true. (define_delay (eq_attr "type" "milli") [(and (eq_attr "in_call_delay" "true") ! (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") (const_int 0)))) (nil) (nil)]) *************** *** 122,127 **** (attr_flag "backward"))]) ! ;; Function units of the HPPA. The following data is for the "Snake" ! ;; (Mustang CPU + Timex FPU) because that's what I have the docs for. ;; Scheduling instructions for PA-83 machines according to the Snake ;; constraints shouldn't hurt. --- 131,136 ---- (attr_flag "backward"))]) ! ;; Function units of the HPPA. The following data is for the 700 CPUs ! ;; (Mustang CPU + Timex FPU aka PA-89) because that's what I have the docs for. ;; Scheduling instructions for PA-83 machines according to the Snake ;; constraints shouldn't hurt. *************** *** 135,151 **** ;; (define_function_unit "alu" 1 0 ! ;; (eq_attr "type" "unary,binary,move,address") 1 0) ;; Memory. Disregarding Cache misses, the Mustang memory times are: ! ;; load: 2 ;; store, fpstore: 3, no D-cache operations should be scheduled. - ;; fpload: 3 (really 2 for flops, but I don't think we can specify that). ! (define_function_unit "memory" 1 0 (eq_attr "type" "load") 2 0) ! (define_function_unit "memory" 1 0 (eq_attr "type" "store,fpstore") 3 3) ! (define_function_unit "memory" 1 0 (eq_attr "type" "fpload") 2 0) ! ;; The Timex has two floating-point units: ALU, and MUL/DIV/SQRT unit. ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) --- 144,164 ---- ;; (define_function_unit "alu" 1 0 ! ;; (and (eq_attr "type" "unary,shift,nullshift,binary,move,address") ! ;; (eq_attr "cpu" "700")) ! ;; 1 0) ;; Memory. Disregarding Cache misses, the Mustang memory times are: ! ;; load: 2, fpload: 3 ;; store, fpstore: 3, no D-cache operations should be scheduled. ! (define_function_unit "pa700memory" 1 0 ! (and (eq_attr "type" "load,fpload") ! (eq_attr "cpu" "700")) 2 0) ! (define_function_unit "pa700memory" 1 0 ! (and (eq_attr "type" "store,fpstore") ! (eq_attr "cpu" "700")) 3 3) ! ;; The Timex (aka 700) has two floating-point units: ALU, and MUL/DIV/SQRT. ;; Timings: ;; Instruction Time Unit Minimum Distance (unit contention) *************** *** 166,176 **** ;; fsqrt,dbl 18 MPY 18 ! (define_function_unit "fp_alu" 1 0 (eq_attr "type" "fpcc") 4 2) ! (define_function_unit "fp_alu" 1 0 (eq_attr "type" "fpalu") 3 2) ! (define_function_unit "fp_mpy" 1 0 (eq_attr "type" "fpmul") 3 2) ! (define_function_unit "fp_mpy" 1 0 (eq_attr "type" "fpdivsgl") 10 10) ! (define_function_unit "fp_mpy" 1 0 (eq_attr "type" "fpdivdbl") 12 12) ! (define_function_unit "fp_mpy" 1 0 (eq_attr "type" "fpsqrtsgl") 14 14) ! (define_function_unit "fp_mpy" 1 0 (eq_attr "type" "fpsqrtdbl") 18 18) ;; Compare instructions. --- 179,336 ---- ;; fsqrt,dbl 18 MPY 18 ! (define_function_unit "pa700fp_alu" 1 0 ! (and (eq_attr "type" "fpcc") ! (eq_attr "cpu" "700")) 4 2) ! (define_function_unit "pa700fp_alu" 1 0 ! (and (eq_attr "type" "fpalu") ! (eq_attr "cpu" "700")) 3 2) ! (define_function_unit "pa700fp_mpy" 1 0 ! (and (eq_attr "type" "fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "700")) 3 2) ! (define_function_unit "pa700fp_mpy" 1 0 ! (and (eq_attr "type" "fpdivsgl") ! (eq_attr "cpu" "700")) 10 10) ! (define_function_unit "pa700fp_mpy" 1 0 ! (and (eq_attr "type" "fpdivdbl") ! (eq_attr "cpu" "700")) 12 12) ! (define_function_unit "pa700fp_mpy" 1 0 ! (and (eq_attr "type" "fpsqrtsgl") ! (eq_attr "cpu" "700")) 14 14) ! (define_function_unit "pa700fp_mpy" 1 0 ! (and (eq_attr "type" "fpsqrtdbl") ! (eq_attr "cpu" "700")) 18 18) ! ! ;; Function units for the 7100 and 7150. The 7100/7150 can dual-issue ! ;; floating point computations with non-floating point computations (fp loads ! ;; and stores are not fp computations). ! ;; ! ;; As with the alpha we multiply the ready delay by two to encourage ! ;; schedules which will allow the 7100/7150 to dual issue as many instructions ! ;; as possible. ! ! ;; Memory. Disregarding Cache misses, memory loads take two cycles; stores also ! ;; take two cycles, during which no Dcache operations should be scheduled. ! ;; Any special cases are handled in pa_adjust_cost. The 7100, 7150 and 7100LC ! ;; all have the same memory characteristics if one disregards cache misses. ! (define_function_unit "pa7100memory" 1 0 ! (and (eq_attr "type" "load,fpload") ! (eq_attr "cpu" "7100,7100LC")) 4 0) ! (define_function_unit "pa7100memory" 1 0 ! (and (eq_attr "type" "store,fpstore") ! (eq_attr "cpu" "7100,7100LC")) 4 4) ! ! ;; The 7100/7150 has three floating-point units: ALU, MUL, and DIV. ! ;; Timings: ! ;; Instruction Time Unit Minimum Distance (unit contention) ! ;; fcpy 2 ALU 1 ! ;; fabs 2 ALU 1 ! ;; fadd 2 ALU 1 ! ;; fsub 2 ALU 1 ! ;; fcmp 2 ALU 1 ! ;; fcnv 2 ALU 1 ! ;; fmpyadd 2 ALU,MPY 1 ! ;; fmpysub 2 ALU,MPY 1 ! ;; fmpycfxt 2 ALU,MPY 1 ! ;; fmpy 2 MPY 1 ! ;; fmpyi 2 MPY 1 ! ;; fdiv,sgl 8 DIV 8 ! ;; fdiv,dbl 15 DIV 15 ! ;; fsqrt,sgl 8 DIV 8 ! ;; fsqrt,dbl 15 DIV 15 ! ! (define_function_unit "pa7100fp_alu" 1 0 ! (and (eq_attr "type" "fpcc,fpalu") ! (eq_attr "cpu" "7100")) 4 2) ! (define_function_unit "pa7100fp_mpy" 1 0 ! (and (eq_attr "type" "fpmulsgl,fpmuldbl") ! (eq_attr "cpu" "7100")) 4 2) ! (define_function_unit "pa7100fp_div" 1 0 ! (and (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "7100")) 16 16) ! (define_function_unit "pa7100fp_div" 1 0 ! (and (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100")) 30 30) ! ! ;; To encourage dual issue we define function units corresponding to ! ;; the instructions which can be dual issued. This is a rather crude ! ;; approximation, the "pa7100nonflop" test in particular could be refined. ! (define_function_unit "pa7100flop" 1 1 ! (and ! (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100,7100LC")) 2 2) ! ! (define_function_unit "pa7100nonflop" 1 1 ! (and ! (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100")) 2 2) ! ! ! ;; Memory subsystem works just like 7100/7150 (except for cache miss times which ! ;; we don't model here). ! ! ;; The 7100LC has three floating-point units: ALU, MUL, and DIV. ! ;; Note divides and sqrt flops lock the cpu until the flop is ! ;; finished. fmpy and xmpyu (fmpyi) lock the cpu for one cycle. ! ;; There's no way to avoid the penalty. ! ;; Timings: ! ;; Instruction Time Unit Minimum Distance (unit contention) ! ;; fcpy 2 ALU 1 ! ;; fabs 2 ALU 1 ! ;; fadd 2 ALU 1 ! ;; fsub 2 ALU 1 ! ;; fcmp 2 ALU 1 ! ;; fcnv 2 ALU 1 ! ;; fmpyadd,sgl 2 ALU,MPY 1 ! ;; fmpyadd,dbl 3 ALU,MPY 2 ! ;; fmpysub,sgl 2 ALU,MPY 1 ! ;; fmpysub,dbl 3 ALU,MPY 2 ! ;; fmpycfxt,sgl 2 ALU,MPY 1 ! ;; fmpycfxt,dbl 3 ALU,MPY 2 ! ;; fmpy,sgl 2 MPY 1 ! ;; fmpy,dbl 3 MPY 2 ! ;; fmpyi 3 MPY 2 ! ;; fdiv,sgl 8 DIV 8 ! ;; fdiv,dbl 15 DIV 15 ! ;; fsqrt,sgl 8 DIV 8 ! ;; fsqrt,dbl 15 DIV 15 ! ! (define_function_unit "pa7100LCfp_alu" 1 0 ! (and (eq_attr "type" "fpcc,fpalu") ! (eq_attr "cpu" "7100LC")) 4 2) ! (define_function_unit "pa7100LCfp_mpy" 1 0 ! (and (eq_attr "type" "fpmulsgl") ! (eq_attr "cpu" "7100LC")) 4 2) ! (define_function_unit "pa7100LCfp_mpy" 1 0 ! (and (eq_attr "type" "fpmuldbl") ! (eq_attr "cpu" "7100LC")) 6 4) ! (define_function_unit "pa7100LCfp_div" 1 0 ! (and (eq_attr "type" "fpdivsgl,fpsqrtsgl") ! (eq_attr "cpu" "7100LC")) 16 16) ! (define_function_unit "pa7100LCfp_div" 1 0 ! (and (eq_attr "type" "fpdivdbl,fpsqrtdbl") ! (eq_attr "cpu" "7100LC")) 30 30) ! ! ;; Define the various functional units for dual-issue. ! ;; The 7100LC shares the generic "flop" unit specification with the 7100/7150. ! ! ;; The 7100LC has two basic integer which allow dual issue of most integer ! ;; instructions. This needs further refinement to deal with the nullify, ! ;; carry/borrow possible the ldw/ldw stw/stw special dual issue cases, and ! ;; of course it needs to know about hte 2nd alu. ! (define_function_unit "pa7100LCnonflop" 1 1 ! (and ! (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl,load,fpload,store,fpstore,shift,nullshift") ! (eq_attr "cpu" "7100LC")) 2 2) ! ! (define_function_unit "pa7100LCshifter" 1 1 ! (and ! (eq_attr "type" "shift,nullshift") ! (eq_attr "cpu" "7100LC")) 2 2) ! ! (define_function_unit "pa7100LCmem" 1 1 ! (and ! (eq_attr "type" "load,fpload,store,fpstore") ! (eq_attr "cpu" "7100LC")) 2 2) ! ;; Compare instructions. *************** *** 199,203 **** (compare:CCFP (match_operand:SF 0 "reg_or_0_operand" "") (match_operand:SF 1 "reg_or_0_operand" "")))] ! "" " { --- 359,363 ---- (compare:CCFP (match_operand:SF 0 "reg_or_0_operand" "") (match_operand:SF 1 "reg_or_0_operand" "")))] ! "! TARGET_SOFT_FLOAT" " { *************** *** 212,216 **** (compare:CCFP (match_operand:DF 0 "reg_or_0_operand" "") (match_operand:DF 1 "reg_or_0_operand" "")))] ! "" " { --- 372,376 ---- (compare:CCFP (match_operand:DF 0 "reg_or_0_operand" "") (match_operand:DF 1 "reg_or_0_operand" "")))] ! "! TARGET_SOFT_FLOAT" " { *************** *** 226,232 **** [(match_operand:SF 0 "reg_or_0_operand" "fG") (match_operand:SF 1 "reg_or_0_operand" "fG")]))] ! "" "fcmp,sgl,%Y2 %r0,%r1" ! [(set_attr "type" "fpcc")]) (define_insn "" --- 386,393 ---- [(match_operand:SF 0 "reg_or_0_operand" "fG") (match_operand:SF 1 "reg_or_0_operand" "fG")]))] ! "! TARGET_SOFT_FLOAT" "fcmp,sgl,%Y2 %r0,%r1" ! [(set_attr "length" "4") ! (set_attr "type" "fpcc")]) (define_insn "" *************** *** 235,241 **** [(match_operand:DF 0 "reg_or_0_operand" "fG") (match_operand:DF 1 "reg_or_0_operand" "fG")]))] ! "" "fcmp,dbl,%Y2 %r0,%r1" ! [(set_attr "type" "fpcc")]) ;; scc insns. --- 396,403 ---- [(match_operand:DF 0 "reg_or_0_operand" "fG") (match_operand:DF 1 "reg_or_0_operand" "fG")]))] ! "! TARGET_SOFT_FLOAT" "fcmp,dbl,%Y2 %r0,%r1" ! [(set_attr "length" "4") ! (set_attr "type" "fpcc")]) ;; scc insns. *************** *** 403,407 **** "com%I2clr,%S3 %2,%1,0\;com%I5clr,%B6 %5,%4,%0\;ldi 1,%0" [(set_attr "type" "binary") ! (set_attr "length" "8")]) ;; Combiner patterns for common operations performed with the output --- 565,569 ---- "com%I2clr,%S3 %2,%1,0\;com%I5clr,%B6 %5,%4,%0\;ldi 1,%0" [(set_attr "type" "binary") ! (set_attr "length" "12")]) ;; Combiner patterns for common operations performed with the output *************** *** 602,605 **** --- 764,790 ---- ;;; Experimental conditional move patterns + (define_expand "movsicc" + [(set (match_operand:SI 0 "register_operand" "") + (if_then_else:SI + (match_operator 1 "comparison_operator" + [(match_dup 4) + (match_dup 5)]) + (match_operand:SI 2 "reg_or_cint_move_operand" "") + (match_operand:SI 3 "reg_or_cint_move_operand" "")))] + "" + " + { + enum rtx_code code = GET_CODE (operands[1]); + + if (hppa_branch_type != CMP_SI) + FAIL; + + /* operands[1] is currently the result of compare_from_rtx. We want to + emit a compare of the original operands. */ + operands[1] = gen_rtx (code, SImode, hppa_compare_op0, hppa_compare_op1); + operands[4] = hppa_compare_op0; + operands[5] = hppa_compare_op1; + }") + ; We need the first constraint alternative in order to avoid ; earlyclobbers on all other alternatives. *************** *** 619,623 **** com%I4clr,%B5 %4,%3,%0\;ldil L'%1,%0 com%I4clr,%B5 %4,%3,%0\;zdepi %Z1,%0" ! [(set_attr "type" "multi,multi,multi,multi,multi") (set_attr "length" "8,8,8,8,8")]) --- 804,808 ---- com%I4clr,%B5 %4,%3,%0\;ldil L'%1,%0 com%I4clr,%B5 %4,%3,%0\;zdepi %Z1,%0" ! [(set_attr "type" "multi,multi,multi,multi,nullshift") (set_attr "length" "8,8,8,8,8")]) *************** *** 640,644 **** com%I4clr,%B5 %4,%3,0\;ldil L'%1,%0 com%I4clr,%B5 %4,%3,0\;zdepi %Z1,%0" ! [(set_attr "type" "multi,multi,multi,multi,multi,multi,multi,multi") (set_attr "length" "8,8,8,8,8,8,8,8")]) --- 825,829 ---- com%I4clr,%B5 %4,%3,0\;ldil L'%1,%0 com%I4clr,%B5 %4,%3,0\;zdepi %Z1,%0" ! [(set_attr "type" "multi,multi,multi,nullshift,multi,multi,multi,nullshift") (set_attr "length" "8,8,8,8,8,8,8,8")]) *************** *** 868,884 **** (match_operand:SI 1 "uint5_operand" "")) (const_int 0)) ! (match_operand 2 "pc_or_label_operand" "") ! (match_operand 3 "pc_or_label_operand" "")))] "" "* { return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), ! get_attr_length (insn), ! (operands[3] != pc_rtx), ! insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") ! (if_then_else (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) (const_int 8188)) (const_int 4) --- 1053,1089 ---- (match_operand:SI 1 "uint5_operand" "")) (const_int 0)) ! (label_ref (match_operand 2 "" "")) ! (pc)))] "" "* { return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), ! get_attr_length (insn), 0, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") ! (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) ! (const_int 8188)) ! (const_int 4) ! (const_int 8)))]) ! ! (define_insn "" ! [(set (pc) ! (if_then_else ! (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r") ! (const_int 1) ! (match_operand:SI 1 "uint5_operand" "")) ! (const_int 0)) ! (pc) ! (label_ref (match_operand 2 "" ""))))] ! "" ! "* ! { ! return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), ! get_attr_length (insn), 1, insn, 0); ! }" ! [(set_attr "type" "cbranch") ! (set (attr "length") ! (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) (const_int 8188)) (const_int 4) *************** *** 892,908 **** (match_operand:SI 1 "uint5_operand" "")) (const_int 0)) ! (match_operand 2 "pc_or_label_operand" "") ! (match_operand 3 "pc_or_label_operand" "")))] "" "* { return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), ! get_attr_length (insn), ! (operands[3] != pc_rtx), ! insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") ! (if_then_else (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) (const_int 8188)) (const_int 4) --- 1097,1133 ---- (match_operand:SI 1 "uint5_operand" "")) (const_int 0)) ! (label_ref (match_operand 2 "" "")) ! (pc)))] "" "* { return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), ! get_attr_length (insn), 0, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") ! (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) ! (const_int 8188)) ! (const_int 4) ! (const_int 8)))]) ! ! (define_insn "" ! [(set (pc) ! (if_then_else ! (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r") ! (const_int 1) ! (match_operand:SI 1 "uint5_operand" "")) ! (const_int 0)) ! (pc) ! (label_ref (match_operand 2 "" ""))))] ! "" ! "* ! { ! return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), ! get_attr_length (insn), 1, insn, 1); ! }" ! [(set_attr "type" "cbranch") ! (set (attr "length") ! (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) (const_int 8188)) (const_int 4) *************** *** 914,918 **** (label_ref (match_operand 0 "" "")) (pc)))] ! "" "* { --- 1139,1143 ---- (label_ref (match_operand 0 "" "")) (pc)))] ! "! TARGET_SOFT_FLOAT" "* { *************** *** 929,933 **** (pc) (label_ref (match_operand 0 "" ""))))] ! "" "* { --- 1154,1158 ---- (pc) (label_ref (match_operand 0 "" ""))))] ! "! TARGET_SOFT_FLOAT" "* { *************** *** 1001,1006 **** (match_operand:SI 1 "move_operand" "r,J,N,K,Q,rM,rM,!fM,*T,f"))] ! "register_operand (operands[0], SImode) ! || reg_or_0_operand (operands[1], SImode)" "@ copy %1,%0 --- 1226,1232 ---- (match_operand:SI 1 "move_operand" "r,J,N,K,Q,rM,rM,!fM,*T,f"))] ! "(register_operand (operands[0], SImode) ! || reg_or_0_operand (operands[1], SImode)) ! && ! TARGET_SOFT_FLOAT" "@ copy %1,%0 *************** *** 1014,1020 **** fldws%F1 %1,%0 fstws%F0 %1,%0" ! [(set_attr "type" "move,move,move,move,load,store,move,fpalu,fpload,fpstore") (set_attr "length" "4,4,4,4,4,4,4,4,4,4")]) ;; Load indexed. We don't use unscaled modes since they can't be used ;; unless we can tell which of the registers is the base and which is --- 1240,1265 ---- fldws%F1 %1,%0 fstws%F0 %1,%0" ! [(set_attr "type" "move,move,move,shift,load,store,move,fpalu,fpload,fpstore") (set_attr "length" "4,4,4,4,4,4,4,4,4,4")]) + (define_insn "" + [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand" + "=r,r,r,r,r,Q,*q") + (match_operand:SI 1 "move_operand" + "r,J,N,K,Q,rM,rM"))] + "(register_operand (operands[0], SImode) + || reg_or_0_operand (operands[1], SImode)) + && TARGET_SOFT_FLOAT" + "@ + copy %1,%0 + ldi %1,%0 + ldil L'%1,%0 + zdepi %Z1,%0 + ldw%M1 %1,%0 + stw%M0 %r1,%0 + mtsar %r1" + [(set_attr "type" "move,move,move,move,load,store,move") + (set_attr "length" "4,4,4,4,4,4,4")]) + ;; Load indexed. We don't use unscaled modes since they can't be used ;; unless we can tell which of the registers is the base and which is *************** *** 1039,1043 **** ;; but it somehow makes sure that out-of-range constants are placed ;; in a register which somehow magically is a "const_int_operand". ! ;; (this was stolen from alpha.md, I'm not going to try and change it. (define_insn "" [(set (match_operand:SI 0 "register_operand" "&=r") --- 1284,1288 ---- ;; but it somehow makes sure that out-of-range constants are placed ;; in a register which somehow magically is a "const_int_operand". ! ;; (this was stolen from alpha.md, I'm not going to try and change it.) (define_insn "" [(set (match_operand:SI 0 "register_operand" "&=r") *************** *** 1125,1132 **** ;; For pic ! (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (match_operand:SI 1 "pic_operand" "i")) ! (clobber (match_scratch:SI 2 "=a"))] "" "* --- 1370,1378 ---- ;; For pic ! ;; Note since this pattern can be created at reload time (via movsi), all ! ;; the same rules for movsi apply here. (no new pseudos, no temporaries). ! (define_insn "pic_load_label" ! [(set (match_operand:SI 0 "register_operand" "=a") ! (match_operand:SI 1 "pic_label_operand" ""))] "" "* *************** *** 1139,1150 **** xoperands[1] = operands[1]; xoperands[2] = label_rtx; ! output_asm_insn (\"bl .+8,%0\;addil L'%1-%2,%0\", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (label_rtx)); ! output_asm_insn (\"ldo R'%1-%2(1),%0\", xoperands); return \"\"; ! } ! " [(set_attr "type" "multi") ! (set_attr "length" "12")]) ;; Always use addil rather than ldil;add sequences. This allows the --- 1385,1442 ---- xoperands[1] = operands[1]; xoperands[2] = label_rtx; ! output_asm_insn (\"bl .+8,%0\", xoperands); ! output_asm_insn (\"depi 0,31,2,%0\", xoperands); ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ! CODE_LABEL_NUMBER (label_rtx)); ! ! /* If we're trying to load the address of a label that happens to be ! close, then we can use a shorter sequence. */ ! if (GET_CODE (operands[1]) == LABEL_REF ! && insn_addresses ! && abs (insn_addresses[INSN_UID (XEXP (operands[1], 0))] ! - insn_current_address) < 8100) ! { ! /* Prefixing with R% here is wrong, it extracts just 11 bits and is ! always non-negative. */ ! output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands); ! } ! else ! { ! output_asm_insn (\"addil L%%%1-%2,%0\", xoperands); ! output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands); ! } return \"\"; ! }" [(set_attr "type" "multi") ! (set_attr "length" "16")]) ; 12 or 16 ! ! (define_insn "pic2_highpart" ! [(set (match_operand:SI 0 "register_operand" "=a") ! (plus:SI (match_operand:SI 1 "register_operand" "r") ! (high:SI (match_operand 2 "" ""))))] ! "symbolic_operand (operands[2], Pmode) ! && ! function_label_operand (operands[2]) ! && flag_pic == 2" ! "addil LT'%G2,%1" ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) ! ! ; We need this to make sure CSE doesn't simplify a memory load with a ! ; symbolic address, whose content it think it knows. For PIC, what CSE ! ; think is the real value will be the address of that value. ! (define_insn "pic2_lo_sum" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (mem:SI (lo_sum:SI (match_operand:SI 1 "register_operand" "r") ! (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] 0))))] ! "" ! "* ! { ! if (flag_pic != 2) ! abort (); ! return \"ldw RT'%G2(%1),%0\"; ! }" ! [(set_attr "type" "load") ! (set_attr "length" "4")]) ! ;; Always use addil rather than ldil;add sequences. This allows the *************** *** 1156,1162 **** "symbolic_operand (operands[1], Pmode) && ! function_label_operand (operands[1]) ! && ! read_only_operand (operands[1])" ! "@ ! addil L'%G1,%%r27" [(set_attr "type" "binary") (set_attr "length" "4")]) --- 1448,1454 ---- "symbolic_operand (operands[1], Pmode) && ! function_label_operand (operands[1]) ! && ! read_only_operand (operands[1]) ! && ! flag_pic" ! "addil LR'%G1,%%r27" [(set_attr "type" "binary") (set_attr "length" "4")]) *************** *** 1200,1205 **** [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] ! "check_pic (1) && !is_function_label_plus_const (operands[1])" ! "ldil L'%G1,%0" [(set_attr "type" "move") (set_attr "length" "4")]) --- 1492,1504 ---- [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] ! "(!flag_pic || !symbolic_operand (operands[1]), Pmode) ! && !is_function_label_plus_const (operands[1])" ! "* ! { ! if (symbolic_operand (operands[1], Pmode)) ! return \"ldil LR'%G1,%0\"; ! else ! return \"ldil L'%G1,%0\"; ! }" [(set_attr "type" "move") (set_attr "length" "4")]) *************** *** 1217,1221 **** "!TARGET_PORTABLE_RUNTIME" "ldo RP'%G2(%1),%0" ! [(set_attr "length" "4")]) ;; This version is used only for the portable runtime conventions model --- 1516,1521 ---- "!TARGET_PORTABLE_RUNTIME" "ldo RP'%G2(%1),%0" ! [(set_attr "type" "move") ! (set_attr "length" "4")]) ;; This version is used only for the portable runtime conventions model *************** *** 1227,1231 **** "TARGET_PORTABLE_RUNTIME" "ldo R'%G2(%1),%0" ! [(set_attr "length" "4")]) (define_insn "" --- 1527,1532 ---- "TARGET_PORTABLE_RUNTIME" "ldo R'%G2(%1),%0" ! [(set_attr "type" "move") ! (set_attr "length" "4")]) (define_insn "" *************** *** 1234,1239 **** (match_operand:SI 2 "immediate_operand" "i")))] "!is_function_label_plus_const (operands[2])" ! "ldo R'%G2(%1),%0" ! [(set_attr "length" "4")]) ;; Now that a symbolic_address plus a constant is broken up early --- 1535,1549 ---- (match_operand:SI 2 "immediate_operand" "i")))] "!is_function_label_plus_const (operands[2])" ! "* ! { ! if (flag_pic && symbolic_operand (operands[2], Pmode)) ! abort (); ! else if (symbolic_operand (operands[2], Pmode)) ! return \"ldo RR'%G2(%1),%0\"; ! else ! return \"ldo R'%G2(%1),%0\"; ! }" ! [(set_attr "type" "move") ! (set_attr "length" "4")]) ;; Now that a symbolic_address plus a constant is broken up early *************** *** 1246,1250 **** (match_operand:SI 1 "symbolic_operand" "")) (clobber (match_operand:SI 2 "register_operand" ""))] ! "" [(set (match_dup 2) (high:SI (match_dup 1))) (set (match_dup 0) (lo_sum:SI (match_dup 2) (match_dup 1)))] --- 1556,1560 ---- (match_operand:SI 1 "symbolic_operand" "")) (clobber (match_operand:SI 2 "register_operand" ""))] ! "! (flag_pic && pic_label_operand (operands[1], SImode))" [(set (match_dup 2) (high:SI (match_dup 1))) (set (match_dup 0) (lo_sum:SI (match_dup 2) (match_dup 1)))] *************** *** 1275,1279 **** mtsar %r1 fcpy,sgl %r1,%0" ! [(set_attr "type" "move,move,move,move,load,store,move,fpalu") (set_attr "length" "4,4,4,4,4,4,4,4")]) --- 1585,1589 ---- mtsar %r1 fcpy,sgl %r1,%0" ! [(set_attr "type" "move,move,move,shift,load,store,move,fpalu") (set_attr "length" "4,4,4,4,4,4,4,4")]) *************** *** 1338,1343 **** (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (high:HI (match_operand 1 "" "")))] ! "check_pic (1)" "ldil L'%G1,%0" [(set_attr "type" "move") --- 1648,1653 ---- (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") ! (high:HI (match_operand 1 "const_int_operand" "")))] ! "" "ldil L'%G1,%0" [(set_attr "type" "move") *************** *** 1347,1354 **** [(set (match_operand:HI 0 "register_operand" "=r") (lo_sum:HI (match_operand:HI 1 "register_operand" "r") ! (match_operand 2 "immediate_operand" "i")))] "" "ldo R'%G2(%1),%0" ! [(set_attr "length" "4")]) (define_expand "movqi" --- 1657,1665 ---- [(set (match_operand:HI 0 "register_operand" "=r") (lo_sum:HI (match_operand:HI 1 "register_operand" "r") ! (match_operand 2 "const_int_operand" "")))] "" "ldo R'%G2(%1),%0" ! [(set_attr "type" "move") ! (set_attr "length" "4")]) (define_expand "movqi" *************** *** 1376,1380 **** mtsar %r1 fcpy,sgl %r1,%0" ! [(set_attr "type" "move,move,move,move,load,store,move,fpalu") (set_attr "length" "4,4,4,4,4,4,4,4")]) --- 1687,1691 ---- mtsar %r1 fcpy,sgl %r1,%0" ! [(set_attr "type" "move,move,move,shift,load,store,move,fpalu") (set_attr "length" "4,4,4,4,4,4,4,4")]) *************** *** 1463,1469 **** (define_insn "" [(set (match_operand:DF 0 "general_operand" "=?r,f") ! (match_operand:DF 1 "" "?E,m"))] "GET_CODE (operands[1]) == CONST_DOUBLE ! && operands[1] != CONST0_RTX (DFmode)" "* return (which_alternative == 0 ? output_move_double (operands) : \" fldds%F1 %1,%0\");" --- 1774,1781 ---- (define_insn "" [(set (match_operand:DF 0 "general_operand" "=?r,f") ! (match_operand:DF 1 "" "?F,m"))] "GET_CODE (operands[1]) == CONST_DOUBLE ! && operands[1] != CONST0_RTX (DFmode) ! && ! TARGET_SOFT_FLOAT" "* return (which_alternative == 0 ? output_move_double (operands) : \" fldds%F1 %1,%0\");" *************** *** 1519,1524 **** (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" "fG,*rG,f,*r,*r,Q,o,Q"))] ! "register_operand (operands[0], DFmode) ! || reg_or_0_operand (operands[1], DFmode)" "* { --- 1831,1837 ---- (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" "fG,*rG,f,*r,*r,Q,o,Q"))] ! "(register_operand (operands[0], DFmode) ! || reg_or_0_operand (operands[1], DFmode)) ! && ! TARGET_SOFT_FLOAT" "* { *************** *** 1532,1540 **** (define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (mem:DF (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 8)) (match_operand:SI 2 "register_operand" "r"))))] ! "! TARGET_DISABLE_INDEXING" "flddx,s %1(0,%2),%0" [(set_attr "type" "fpload") --- 1845,1868 ---- (define_insn "" + [(set (match_operand:DF 0 "reg_or_nonsymb_mem_operand" + "=r,?o,?Q,&r,&r") + (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" + "rG,r,r,o,Q"))] + "(register_operand (operands[0], DFmode) + || reg_or_0_operand (operands[1], DFmode)) + && TARGET_SOFT_FLOAT" + "* + { + return output_move_double (operands); + }" + [(set_attr "type" "move,store,store,load,load") + (set_attr "length" "8,8,16,8,16")]) + + (define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (mem:DF (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 8)) (match_operand:SI 2 "register_operand" "r"))))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT" "flddx,s %1(0,%2),%0" [(set_attr "type" "fpload") *************** *** 1559,1563 **** (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "const_int_operand" "rL"))))] ! "! TARGET_DISABLE_INDEXING && reload_in_progress" "* { --- 1887,1891 ---- (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "const_int_operand" "rL"))))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT && reload_in_progress" "* { *************** *** 1575,1579 **** (match_operand:SI 2 "register_operand" "r"))) (match_operand:DF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING" "fstdx,s %0,%1(0,%2)" [(set_attr "type" "fpstore") --- 1903,1907 ---- (match_operand:SI 2 "register_operand" "r"))) (match_operand:DF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT" "fstdx,s %0,%1(0,%2)" [(set_attr "type" "fpstore") *************** *** 1598,1602 **** (match_operand:SI 3 "const_int_operand" "rL"))) (match_operand:DF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING && reload_in_progress" "* { --- 1926,1930 ---- (match_operand:SI 3 "const_int_operand" "rL"))) (match_operand:DF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT && reload_in_progress" "* { *************** *** 1652,1656 **** [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" "")))] ! "check_pic (1)" "* { --- 1980,1984 ---- [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" "")))] ! "" "* { *************** *** 1673,1681 **** { operands[0] = operand_subword (op0, 1, 0, DImode); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (op1)); output_asm_insn (\"ldil L'%1,%0\", operands); operands[0] = operand_subword (op0, 0, 0, DImode); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (op1)); output_asm_insn (singlemove_string (operands), operands); return \"\"; --- 2001,2009 ---- { operands[0] = operand_subword (op0, 1, 0, DImode); ! operands[1] = GEN_INT (CONST_DOUBLE_LOW (op1)); output_asm_insn (\"ldil L'%1,%0\", operands); operands[0] = operand_subword (op0, 0, 0, DImode); ! operands[1] = GEN_INT (CONST_DOUBLE_HIGH (op1)); output_asm_insn (singlemove_string (operands), operands); return \"\"; *************** *** 1694,1699 **** (match_operand:DI 1 "general_operand" "rM,r,r,o,Q,i,fM,*T,f"))] ! "register_operand (operands[0], DImode) ! || reg_or_0_operand (operands[1], DImode)" "* { --- 2022,2028 ---- (match_operand:DI 1 "general_operand" "rM,r,r,o,Q,i,fM,*T,f"))] ! "(register_operand (operands[0], DImode) ! || reg_or_0_operand (operands[1], DImode)) ! && ! TARGET_SOFT_FLOAT" "* { *************** *** 1703,1710 **** return output_move_double (operands); }" ! [(set_attr "type" "move,store,store,load,load,misc,fpalu,fpload,fpstore") (set_attr "length" "8,8,16,8,16,16,4,4,4")]) (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,&r") (lo_sum:DI (match_operand:DI 1 "register_operand" "0,r") --- 2032,2054 ---- return output_move_double (operands); }" ! [(set_attr "type" "move,store,store,load,load,multi,fpalu,fpload,fpstore") (set_attr "length" "8,8,16,8,16,16,4,4,4")]) (define_insn "" + [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" + "=r,o,Q,&r,&r,&r") + (match_operand:DI 1 "general_operand" + "rM,r,r,o,Q,i"))] + "(register_operand (operands[0], DImode) + || reg_or_0_operand (operands[1], DImode)) + && TARGET_SOFT_FLOAT" + "* + { + return output_move_double (operands); + }" + [(set_attr "type" "move,store,store,load,load,multi") + (set_attr "length" "8,8,16,8,16,16")]) + + (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,&r") (lo_sum:DI (match_operand:DI 1 "register_operand" "0,r") *************** *** 1716,1727 **** handle it correctly. */ if (GET_CODE (operands[2]) == CONST_DOUBLE) ! operands[2] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (operands[2])); if (which_alternative == 1) output_asm_insn (\"copy %1,%0\", operands); return \"ldo R'%G2(%R1),%R0\"; }" ! ;; Need to set length for this arith insn because operand2 ! ;; is not an "arith_operand". ! [(set_attr "length" "4,8")]) ;; This pattern forces (set (reg:SF ...) (const_double ...)) --- 2060,2070 ---- handle it correctly. */ if (GET_CODE (operands[2]) == CONST_DOUBLE) ! operands[2] = GEN_INT (CONST_DOUBLE_LOW (operands[2])); if (which_alternative == 1) output_asm_insn (\"copy %1,%0\", operands); return \"ldo R'%G2(%R1),%R0\"; }" ! [(set_attr "type" "move,move") ! (set_attr "length" "4,8")]) ;; This pattern forces (set (reg:SF ...) (const_double ...)) *************** *** 1736,1742 **** (define_insn "" [(set (match_operand:SF 0 "general_operand" "=?r,f") ! (match_operand:SF 1 "" "?E,m"))] "GET_CODE (operands[1]) == CONST_DOUBLE ! && operands[1] != CONST0_RTX (SFmode)" "* return (which_alternative == 0 ? singlemove_string (operands) : \" fldws%F1 %1,%0\");" --- 2079,2086 ---- (define_insn "" [(set (match_operand:SF 0 "general_operand" "=?r,f") ! (match_operand:SF 1 "" "?F,m"))] "GET_CODE (operands[1]) == CONST_DOUBLE ! && operands[1] != CONST0_RTX (SFmode) ! && ! TARGET_SOFT_FLOAT" "* return (which_alternative == 0 ? singlemove_string (operands) : \" fldws%F1 %1,%0\");" *************** *** 1792,1797 **** (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" "fG,rG,Q,Q,f,rG"))] ! "register_operand (operands[0], SFmode) ! || reg_or_0_operand (operands[1], SFmode)" "@ fcpy,sgl %r1,%0 --- 2136,2142 ---- (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" "fG,rG,Q,Q,f,rG"))] ! "(register_operand (operands[0], SFmode) ! || reg_or_0_operand (operands[1], SFmode)) ! && ! TARGET_SOFT_FLOAT" "@ fcpy,sgl %r1,%0 *************** *** 1805,1813 **** (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (mem:SF (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 4)) (match_operand:SI 2 "register_operand" "r"))))] ! "! TARGET_DISABLE_INDEXING" "fldwx,s %1(0,%2),%0" [(set_attr "type" "fpload") --- 2150,2173 ---- (define_insn "" + [(set (match_operand:SF 0 "reg_or_nonsymb_mem_operand" + "=r,r,Q") + (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" + "rG,Q,rG"))] + "(register_operand (operands[0], SFmode) + || reg_or_0_operand (operands[1], SFmode)) + && TARGET_SOFT_FLOAT" + "@ + copy %r1,%0 + ldw%M1 %1,%0 + stw%M0 %r1,%0" + [(set_attr "type" "move,load,store") + (set_attr "length" "4,4,4")]) + + (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (mem:SF (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r") (const_int 4)) (match_operand:SI 2 "register_operand" "r"))))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT" "fldwx,s %1(0,%2),%0" [(set_attr "type" "fpload") *************** *** 1832,1836 **** (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "const_int_operand" "rL"))))] ! "! TARGET_DISABLE_INDEXING && reload_in_progress" "* { --- 2192,2196 ---- (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "const_int_operand" "rL"))))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT && reload_in_progress" "* { *************** *** 1848,1852 **** (match_operand:SI 2 "register_operand" "r"))) (match_operand:SF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING" "fstwx,s %0,%1(0,%2)" [(set_attr "type" "fpstore") --- 2208,2212 ---- (match_operand:SI 2 "register_operand" "r"))) (match_operand:SF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT" "fstwx,s %0,%1(0,%2)" [(set_attr "type" "fpstore") *************** *** 1871,1875 **** (match_operand:SI 3 "const_int_operand" "rL"))) (match_operand:SF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING && reload_in_progress" "* { --- 2231,2235 ---- (match_operand:SI 3 "const_int_operand" "rL"))) (match_operand:SF 0 "register_operand" "f"))] ! "! TARGET_DISABLE_INDEXING && ! TARGET_SOFT_FLOAT && reload_in_progress" "* { *************** *** 1892,1896 **** extru %1,31,16,%0 ldh%M1 %1,%0" ! [(set_attr "type" "unary,load")]) (define_insn "zero_extendqihi2" --- 2252,2257 ---- extru %1,31,16,%0 ldh%M1 %1,%0" ! [(set_attr "type" "shift,load") ! (set_attr "length" "4,4")]) (define_insn "zero_extendqihi2" *************** *** 1902,1906 **** extru %1,31,8,%0 ldb%M1 %1,%0" ! [(set_attr "type" "unary,load")]) (define_insn "zero_extendqisi2" --- 2263,2268 ---- extru %1,31,8,%0 ldb%M1 %1,%0" ! [(set_attr "type" "shift,load") ! (set_attr "length" "4,4")]) (define_insn "zero_extendqisi2" *************** *** 1912,1916 **** extru %1,31,8,%0 ldb%M1 %1,%0" ! [(set_attr "type" "unary,load")]) ;;- sign extension instructions --- 2274,2279 ---- extru %1,31,8,%0 ldb%M1 %1,%0" ! [(set_attr "type" "shift,load") ! (set_attr "length" "4,4")]) ;;- sign extension instructions *************** *** 1921,1925 **** "" "extrs %1,31,16,%0" ! [(set_attr "type" "unary")]) (define_insn "extendqihi2" --- 2284,2289 ---- "" "extrs %1,31,16,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "extendqihi2" *************** *** 1928,1932 **** "" "extrs %1,31,8,%0" ! [(set_attr "type" "unary")]) (define_insn "extendqisi2" --- 2292,2297 ---- "" "extrs %1,31,8,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "extendqisi2" *************** *** 1935,1939 **** "" "extrs %1,31,8,%0" ! [(set_attr "type" "unary")]) ;; Conversions between float and double. --- 2300,2305 ---- "" "extrs %1,31,8,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) ;; Conversions between float and double. *************** *** 1943,1949 **** (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] ! "" "fcnvff,sgl,dbl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "truncdfsf2" --- 2309,2316 ---- (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fcnvff,sgl,dbl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "truncdfsf2" *************** *** 1951,1957 **** (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))] ! "" "fcnvff,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) ;; Conversion between fixed point and floating point. --- 2318,2325 ---- (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fcnvff,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) ;; Conversion between fixed point and floating point. *************** *** 1969,1973 **** [(set (match_operand:SF 0 "general_operand" "=f") (float:SF (match_operand:SI 1 "const_int_operand" "m")))] ! "" "fldws %1,%0\;fcnvxf,sgl,sgl %0,%0" [(set_attr "type" "fpalu") --- 2337,2341 ---- [(set (match_operand:SF 0 "general_operand" "=f") (float:SF (match_operand:SI 1 "const_int_operand" "m")))] ! "! TARGET_SOFT_FLOAT" "fldws %1,%0\;fcnvxf,sgl,sgl %0,%0" [(set_attr "type" "fpalu") *************** *** 1977,1983 **** [(set (match_operand:SF 0 "general_operand" "=f") (float:SF (match_operand:SI 1 "register_operand" "f")))] ! "" "fcnvxf,sgl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) ;; This pattern forces (set (reg:DF ...) (float:DF (const_int ...))) --- 2345,2352 ---- [(set (match_operand:SF 0 "general_operand" "=f") (float:SF (match_operand:SI 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fcnvxf,sgl,sgl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) ;; This pattern forces (set (reg:DF ...) (float:DF (const_int ...))) *************** *** 1987,1991 **** [(set (match_operand:DF 0 "general_operand" "=f") (float:DF (match_operand:SI 1 "const_int_operand" "m")))] ! "" "fldws %1,%0\;fcnvxf,sgl,dbl %0,%0" [(set_attr "type" "fpalu") --- 2356,2360 ---- [(set (match_operand:DF 0 "general_operand" "=f") (float:DF (match_operand:SI 1 "const_int_operand" "m")))] ! "! TARGET_SOFT_FLOAT" "fldws %1,%0\;fcnvxf,sgl,dbl %0,%0" [(set_attr "type" "fpalu") *************** *** 1995,2001 **** [(set (match_operand:DF 0 "general_operand" "=f") (float:DF (match_operand:SI 1 "register_operand" "f")))] ! "" "fcnvxf,sgl,dbl %1,%0" ! [(set_attr "type" "fpalu")]) (define_expand "floatunssisf2" --- 2364,2371 ---- [(set (match_operand:DF 0 "general_operand" "=f") (float:DF (match_operand:SI 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fcnvxf,sgl,dbl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_expand "floatunssisf2" *************** *** 2006,2010 **** (set (match_operand:SF 0 "general_operand" "") (float:SF (match_dup 2)))] ! "TARGET_SNAKE" "operands[2] = gen_reg_rtx (DImode);") --- 2376,2380 ---- (set (match_operand:SF 0 "general_operand" "") (float:SF (match_dup 2)))] ! "TARGET_SNAKE && ! TARGET_SOFT_FLOAT" "operands[2] = gen_reg_rtx (DImode);") *************** *** 2016,2020 **** (set (match_operand:DF 0 "general_operand" "") (float:DF (match_dup 2)))] ! "TARGET_SNAKE" "operands[2] = gen_reg_rtx (DImode);") --- 2386,2390 ---- (set (match_operand:DF 0 "general_operand" "") (float:DF (match_dup 2)))] ! "TARGET_SNAKE && ! TARGET_SOFT_FLOAT" "operands[2] = gen_reg_rtx (DImode);") *************** *** 2022,2035 **** [(set (match_operand:SF 0 "general_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "f")))] ! "TARGET_SNAKE" "fcnvxf,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "floatdidf2" [(set (match_operand:DF 0 "general_operand" "=f") (float:DF (match_operand:DI 1 "register_operand" "f")))] ! "TARGET_SNAKE" "fcnvxf,dbl,dbl %1,%0" ! [(set_attr "type" "fpalu")]) ;; Convert a float to an actual integer. --- 2392,2407 ---- [(set (match_operand:SF 0 "general_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "f")))] ! "TARGET_SNAKE && ! TARGET_SOFT_FLOAT" "fcnvxf,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "floatdidf2" [(set (match_operand:DF 0 "general_operand" "=f") (float:DF (match_operand:DI 1 "register_operand" "f")))] ! "TARGET_SNAKE && ! TARGET_SOFT_FLOAT" "fcnvxf,dbl,dbl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) ;; Convert a float to an actual integer. *************** *** 2039,2066 **** [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] ! "" "fcnvfxt,sgl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "fix_truncdfsi2" [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "f"))))] ! "" "fcnvfxt,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "fix_truncsfdi2" [(set (match_operand:DI 0 "register_operand" "=f") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] ! "TARGET_SNAKE" "fcnvfxt,sgl,dbl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "fix_truncdfdi2" [(set (match_operand:DI 0 "register_operand" "=f") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f"))))] ! "TARGET_SNAKE" "fcnvfxt,dbl,dbl %1,%0" ! [(set_attr "type" "fpalu")]) ;;- arithmetic instructions --- 2411,2442 ---- [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] ! "! TARGET_SOFT_FLOAT" "fcnvfxt,sgl,sgl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "fix_truncdfsi2" [(set (match_operand:SI 0 "register_operand" "=f") (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "f"))))] ! "! TARGET_SOFT_FLOAT" "fcnvfxt,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "fix_truncsfdi2" [(set (match_operand:DI 0 "register_operand" "=f") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] ! "TARGET_SNAKE && ! TARGET_SOFT_FLOAT" "fcnvfxt,sgl,dbl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "fix_truncdfdi2" [(set (match_operand:DI 0 "register_operand" "=f") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f"))))] ! "TARGET_SNAKE && ! TARGET_SOFT_FLOAT" "fcnvfxt,dbl,dbl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) ;;- arithmetic instructions *************** *** 2083,2087 **** return \"add %R2,%R1,%R0\;addc %2,%1,%0\"; }" ! [(set_attr "length" "8")]) (define_insn "" --- 2459,2464 ---- return \"add %R2,%R1,%R0\;addc %2,%1,%0\"; }" ! [(set_attr "type" "binary") ! (set_attr "length" "8")]) (define_insn "" *************** *** 2090,2094 **** (match_operand:SI 2 "register_operand" "r")))] "" ! "uaddcm %2,%1,%0") ;; define_splits to optimize cases of adding a constant integer --- 2467,2473 ---- (match_operand:SI 2 "register_operand" "r")))] "" ! "uaddcm %2,%1,%0" ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) ;; define_splits to optimize cases of adding a constant integer *************** *** 2155,2159 **** "@ addl %1,%2,%0 ! ldo %2(%1),%0") (define_insn "subdi3" --- 2534,2540 ---- "@ addl %1,%2,%0 ! ldo %2(%1),%0" ! [(set_attr "type" "binary,binary") ! (set_attr "length" "4,4")]) (define_insn "subdi3" *************** *** 2163,2167 **** "" "sub %R1,%R2,%R0\;subb %1,%2,%0" ! [(set_attr "length" "8")]) (define_insn "subsi3" --- 2544,2549 ---- "" "sub %R1,%R2,%R0\;subb %1,%2,%0" ! [(set_attr "type" "binary") ! (set_attr "length" "8")]) (define_insn "subsi3" *************** *** 2172,2176 **** "@ sub %1,%2,%0 ! subi %1,%2,%0") ;; Clobbering a "register_operand" instead of a match_scratch --- 2554,2560 ---- "@ sub %1,%2,%0 ! subi %1,%2,%0" ! [(set_attr "type" "binary,binary") ! (set_attr "length" "4,4")]) ;; Clobbering a "register_operand" instead of a match_scratch *************** *** 2191,2195 **** " { ! if (TARGET_SNAKE && ! TARGET_DISABLE_FPREGS) { rtx scratch = gen_reg_rtx (DImode); --- 2575,2579 ---- " { ! if (TARGET_SNAKE && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT) { rtx scratch = gen_reg_rtx (DImode); *************** *** 2209,2215 **** (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (zero_extend:DI (match_operand:SI 2 "nonimmediate_operand" "f"))))] ! "TARGET_SNAKE && ! TARGET_DISABLE_FPREGS" "xmpyu %1,%2,%0" ! [(set_attr "type" "fpmul")]) (define_insn "" --- 2593,2600 ---- (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (zero_extend:DI (match_operand:SI 2 "nonimmediate_operand" "f"))))] ! "TARGET_SNAKE && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT" "xmpyu %1,%2,%0" ! [(set_attr "type" "fpmuldbl") ! (set_attr "length" "4")]) (define_insn "" *************** *** 2217,2223 **** (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (match_operand:DI 2 "uint32_operand" "f")))] ! "TARGET_SNAKE && ! TARGET_DISABLE_FPREGS" "xmpyu %1,%R2,%0" ! [(set_attr "type" "fpmul")]) (define_insn "" --- 2602,2609 ---- (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (match_operand:DI 2 "uint32_operand" "f")))] ! "TARGET_SNAKE && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT" "xmpyu %1,%R2,%0" ! [(set_attr "type" "fpmuldbl") ! (set_attr "length" "4")]) (define_insn "" *************** *** 2230,2237 **** "* return output_mul_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 4) ! (const_int 24)))]) ;;; Division and mod. --- 2616,2626 ---- "* return output_mul_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 4) ! (const_int 24)))]) ;;; Division and mod. *************** *** 2248,2275 **** " { ! operands[3] = gen_reg_rtx(SImode); ! if (!(GET_CODE (operands[2]) == CONST_INT && emit_hpdiv_const(operands, 0))) ! { ! emit_move_insn (gen_rtx (REG, SImode, 26), operands[1]); ! emit_move_insn (gen_rtx (REG, SImode, 25), operands[2]); ! emit ! (gen_rtx ! (PARALLEL, VOIDmode, ! gen_rtvec (5, gen_rtx (SET, VOIDmode, gen_rtx (REG, SImode, 29), ! gen_rtx (DIV, SImode, ! gen_rtx (REG, SImode, 26), ! gen_rtx (REG, SImode, 25))), ! gen_rtx (CLOBBER, VOIDmode, operands[3]), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 26)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 25)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 31))))); ! emit_move_insn (operands[0], gen_rtx (REG, SImode, 29)); ! } ! DONE; }") (define_insn "" [(set (reg:SI 29) ! (div:SI (reg:SI 26) (match_operand:SI 0 "div_operand" ""))) (clobber (match_operand:SI 1 "register_operand" "=a")) (clobber (reg:SI 26)) --- 2637,2648 ---- " { ! operands[3] = gen_reg_rtx (SImode); ! if (GET_CODE (operands[2]) == CONST_INT && emit_hpdiv_const (operands, 0)) ! DONE; }") (define_insn "" [(set (reg:SI 29) ! (div:SI (reg:SI 26) (match_operand:SI 0 "div_operand" ""))) (clobber (match_operand:SI 1 "register_operand" "=a")) (clobber (reg:SI 26)) *************** *** 2280,2287 **** return output_div_insn (operands, 0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 4) ! (const_int 24)))]) (define_expand "udivsi3" --- 2653,2663 ---- return output_div_insn (operands, 0, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 4) ! (const_int 24)))]) (define_expand "udivsi3" *************** *** 2297,2324 **** " { ! operands[3] = gen_reg_rtx(SImode); ! if (!(GET_CODE (operands[2]) == CONST_INT && emit_hpdiv_const(operands, 1))) ! { ! emit_move_insn (gen_rtx (REG, SImode, 26), operands[1]); ! emit_move_insn (gen_rtx (REG, SImode, 25), operands[2]); ! emit ! (gen_rtx ! (PARALLEL, VOIDmode, ! gen_rtvec (5, gen_rtx (SET, VOIDmode, gen_rtx (REG, SImode, 29), ! gen_rtx (UDIV, SImode, ! gen_rtx (REG, SImode, 26), ! gen_rtx (REG, SImode, 25))), ! gen_rtx (CLOBBER, VOIDmode, operands[3]), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 26)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 25)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 31))))); ! emit_move_insn (operands[0], gen_rtx (REG, SImode, 29)); ! } ! DONE; }") (define_insn "" [(set (reg:SI 29) ! (udiv:SI (reg:SI 26) (match_operand:SI 0 "div_operand" ""))) (clobber (match_operand:SI 1 "register_operand" "=a")) (clobber (reg:SI 26)) --- 2673,2684 ---- " { ! operands[3] = gen_reg_rtx (SImode); ! if (GET_CODE (operands[2]) == CONST_INT && emit_hpdiv_const (operands, 1)) ! DONE; }") (define_insn "" [(set (reg:SI 29) ! (udiv:SI (reg:SI 26) (match_operand:SI 0 "div_operand" ""))) (clobber (match_operand:SI 1 "register_operand" "=a")) (clobber (reg:SI 26)) *************** *** 2329,2336 **** return output_div_insn (operands, 1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 4) ! (const_int 24)))]) (define_expand "modsi3" --- 2689,2699 ---- return output_div_insn (operands, 1, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 4) ! (const_int 24)))]) (define_expand "modsi3" *************** *** 2346,2365 **** " { ! operands[3] = gen_reg_rtx(SImode); ! emit_move_insn (gen_rtx (REG, SImode, 26), operands[1]); ! emit_move_insn (gen_rtx (REG, SImode, 25), operands[2]); ! emit ! (gen_rtx ! (PARALLEL, VOIDmode, ! gen_rtvec (5, gen_rtx (SET, VOIDmode, gen_rtx (REG, SImode, 29), ! gen_rtx (MOD, SImode, ! gen_rtx (REG, SImode, 26), ! gen_rtx (REG, SImode, 25))), ! gen_rtx (CLOBBER, VOIDmode, operands[3]), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 26)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 25)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 31))))); ! emit_move_insn (operands[0], gen_rtx (REG, SImode, 29)); ! DONE; }") --- 2709,2713 ---- " { ! operands[3] = gen_reg_rtx (SImode); }") *************** *** 2374,2381 **** return output_mod_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 4) ! (const_int 24)))]) (define_expand "umodsi3" --- 2722,2732 ---- return output_mod_insn (0, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 4) ! (const_int 24)))]) (define_expand "umodsi3" *************** *** 2391,2410 **** " { ! operands[3] = gen_reg_rtx(SImode); ! emit_move_insn (gen_rtx (REG, SImode, 26), operands[1]); ! emit_move_insn (gen_rtx (REG, SImode, 25), operands[2]); ! emit ! (gen_rtx ! (PARALLEL, VOIDmode, ! gen_rtvec (5, gen_rtx (SET, VOIDmode, gen_rtx (REG, SImode, 29), ! gen_rtx (UMOD, SImode, ! gen_rtx (REG, SImode, 26), ! gen_rtx (REG, SImode, 25))), ! gen_rtx (CLOBBER, VOIDmode, operands[3]), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 26)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 25)), ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 31))))); ! emit_move_insn (operands[0], gen_rtx (REG, SImode, 29)); ! DONE; }") --- 2742,2746 ---- " { ! operands[3] = gen_reg_rtx (SImode); }") *************** *** 2419,2426 **** return output_mod_insn (1, insn);" [(set_attr "type" "milli") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 4) ! (const_int 24)))]) ;;- and instructions --- 2755,2765 ---- return output_mod_insn (1, insn);" [(set_attr "type" "milli") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 4) ! (const_int 24)))]) ;;- and instructions *************** *** 2447,2451 **** "" "and %1,%2,%0\;and %R1,%R2,%R0" ! [(set_attr "length" "8")]) ; The ? for op1 makes reload prefer zdepi instead of loading a huge --- 2786,2791 ---- "" "and %1,%2,%0\;and %R1,%R2,%R0" ! [(set_attr "type" "binary") ! (set_attr "length" "8")]) ; The ? for op1 makes reload prefer zdepi instead of loading a huge *************** *** 2457,2462 **** "" "* return output_and (operands); " ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) (define_insn "" --- 2797,2802 ---- "" "* return output_and (operands); " ! [(set_attr "type" "binary,shift") ! (set_attr "length" "4,4")]) (define_insn "" *************** *** 2466,2470 **** "" "andcm %2,%1,%0\;andcm %R2,%R1,%R0" ! [(set_attr "length" "8")]) (define_insn "" --- 2806,2811 ---- "" "andcm %2,%1,%0\;andcm %R2,%R1,%R0" ! [(set_attr "type" "binary") ! (set_attr "length" "8")]) (define_insn "" *************** *** 2473,2477 **** (match_operand:SI 2 "register_operand" "r")))] "" ! "andcm %2,%1,%0") (define_expand "iordi3" --- 2814,2820 ---- (match_operand:SI 2 "register_operand" "r")))] "" ! "andcm %2,%1,%0" ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) (define_expand "iordi3" *************** *** 2494,2498 **** "" "or %1,%2,%0\;or %R1,%R2,%R0" ! [(set_attr "length" "8")]) ;; Need a define_expand because we've run out of CONST_OK... characters. --- 2837,2842 ---- "" "or %1,%2,%0\;or %R1,%R2,%R0" ! [(set_attr "type" "binary") ! (set_attr "length" "8")]) ;; Need a define_expand because we've run out of CONST_OK... characters. *************** *** 2509,2519 **** (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (ior:SI (match_operand:SI 1 "register_operand" "0") ! (match_operand:SI 2 "ior_operand" "")))] "" "* return output_ior (operands); " ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) (define_insn "" --- 2853,2863 ---- (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r,r") ! (ior:SI (match_operand:SI 1 "register_operand" "0,0") ! (match_operand:SI 2 "ior_operand" "M,i")))] "" "* return output_ior (operands); " ! [(set_attr "type" "binary,shift") ! (set_attr "length" "4,4")]) (define_insn "" *************** *** 2522,2526 **** (match_operand:SI 2 "register_operand" "r")))] "" ! "or %1,%2,%0") (define_expand "xordi3" --- 2866,2872 ---- (match_operand:SI 2 "register_operand" "r")))] "" ! "or %1,%2,%0" ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) (define_expand "xordi3" *************** *** 2543,2547 **** "" "xor %1,%2,%0\;xor %R1,%R2,%R0" ! [(set_attr "length" "8")]) (define_insn "xorsi3" --- 2889,2894 ---- "" "xor %1,%2,%0\;xor %R1,%R2,%R0" ! [(set_attr "type" "binary") ! (set_attr "length" "8")]) (define_insn "xorsi3" *************** *** 2550,2554 **** (match_operand:SI 2 "register_operand" "r")))] "" ! "xor %1,%2,%0") (define_insn "negdi2" --- 2897,2903 ---- (match_operand:SI 2 "register_operand" "r")))] "" ! "xor %1,%2,%0" ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) (define_insn "negdi2" *************** *** 2565,2569 **** "" "sub 0,%1,%0" ! [(set_attr "type" "unary")]) (define_expand "one_cmpldi2" --- 2914,2919 ---- "" "sub 0,%1,%0" ! [(set_attr "type" "unary") ! (set_attr "length" "4")]) (define_expand "one_cmpldi2" *************** *** 2590,2594 **** "" "uaddcm 0,%1,%0" ! [(set_attr "type" "unary")]) ;; Floating point arithmetic instructions. --- 2940,2945 ---- "" "uaddcm 0,%1,%0" ! [(set_attr "type" "unary") ! (set_attr "length" "4")]) ;; Floating point arithmetic instructions. *************** *** 2598,2604 **** (plus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "" "fadd,dbl %1,%2,%0" ! [(set_attr "type" "fpalu")]) (define_insn "addsf3" --- 2949,2956 ---- (plus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fadd,dbl %1,%2,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "addsf3" *************** *** 2606,2612 **** (plus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "" "fadd,sgl %1,%2,%0" ! [(set_attr "type" "fpalu")]) (define_insn "subdf3" --- 2958,2965 ---- (plus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fadd,sgl %1,%2,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "subdf3" *************** *** 2614,2620 **** (minus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "" "fsub,dbl %1,%2,%0" ! [(set_attr "type" "fpalu")]) (define_insn "subsf3" --- 2967,2974 ---- (minus:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fsub,dbl %1,%2,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "subsf3" *************** *** 2622,2628 **** (minus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "" "fsub,sgl %1,%2,%0" ! [(set_attr "type" "fpalu")]) (define_insn "muldf3" --- 2976,2983 ---- (minus:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fsub,sgl %1,%2,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "muldf3" *************** *** 2630,2636 **** (mult:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "" "fmpy,dbl %1,%2,%0" ! [(set_attr "type" "fpmul")]) (define_insn "mulsf3" --- 2985,2992 ---- (mult:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fmpy,dbl %1,%2,%0" ! [(set_attr "type" "fpmuldbl") ! (set_attr "length" "4")]) (define_insn "mulsf3" *************** *** 2638,2644 **** (mult:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "" "fmpy,sgl %1,%2,%0" ! [(set_attr "type" "fpmul")]) (define_insn "divdf3" --- 2994,3001 ---- (mult:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fmpy,sgl %1,%2,%0" ! [(set_attr "type" "fpmulsgl") ! (set_attr "length" "4")]) (define_insn "divdf3" *************** *** 2646,2652 **** (div:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "" "fdiv,dbl %1,%2,%0" ! [(set_attr "type" "fpdivdbl")]) (define_insn "divsf3" --- 3003,3010 ---- (div:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fdiv,dbl %1,%2,%0" ! [(set_attr "type" "fpdivdbl") ! (set_attr "length" "4")]) (define_insn "divsf3" *************** *** 2654,2702 **** (div:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "" "fdiv,sgl %1,%2,%0" ! [(set_attr "type" "fpdivsgl")]) (define_insn "negdf2" [(set (match_operand:DF 0 "register_operand" "=f") (neg:DF (match_operand:DF 1 "register_operand" "f")))] ! "" "fsub,dbl 0,%1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "negsf2" [(set (match_operand:SF 0 "register_operand" "=f") (neg:SF (match_operand:SF 1 "register_operand" "f")))] ! "" "fsub,sgl 0,%1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "absdf2" [(set (match_operand:DF 0 "register_operand" "=f") (abs:DF (match_operand:DF 1 "register_operand" "f")))] ! "" "fabs,dbl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "abssf2" [(set (match_operand:SF 0 "register_operand" "=f") (abs:SF (match_operand:SF 1 "register_operand" "f")))] ! "" "fabs,sgl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (match_operand:DF 1 "register_operand" "f")))] ! "" "fsqrt,dbl %1,%0" ! [(set_attr "type" "fpsqrtdbl")]) (define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") (sqrt:SF (match_operand:SF 1 "register_operand" "f")))] ! "" "fsqrt,sgl %1,%0" ! [(set_attr "type" "fpsqrtsgl")]) ;;- Shift instructions --- 3012,3067 ---- (div:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fdiv,sgl %1,%2,%0" ! [(set_attr "type" "fpdivsgl") ! (set_attr "length" "4")]) (define_insn "negdf2" [(set (match_operand:DF 0 "register_operand" "=f") (neg:DF (match_operand:DF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fsub,dbl 0,%1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "negsf2" [(set (match_operand:SF 0 "register_operand" "=f") (neg:SF (match_operand:SF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fsub,sgl 0,%1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "absdf2" [(set (match_operand:DF 0 "register_operand" "=f") (abs:DF (match_operand:DF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fabs,dbl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "abssf2" [(set (match_operand:SF 0 "register_operand" "=f") (abs:SF (match_operand:SF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fabs,sgl %1,%0" ! [(set_attr "type" "fpalu") ! (set_attr "length" "4")]) (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (match_operand:DF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fsqrt,dbl %1,%0" ! [(set_attr "type" "fpsqrtdbl") ! (set_attr "length" "4")]) (define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") (sqrt:SF (match_operand:SF 1 "register_operand" "f")))] ! "! TARGET_SOFT_FLOAT" "fsqrt,sgl %1,%0" ! [(set_attr "type" "fpsqrtsgl") ! (set_attr "length" "4")]) ;;- Shift instructions *************** *** 2728,2732 **** (match_operand:SI 1 "register_operand" "r")))] "" ! "sh%O3addl %2,%1,%0") ;; This variant of the above insn can occur if the first operand --- 3093,3099 ---- (match_operand:SI 1 "register_operand" "r")))] "" ! "sh%O3addl %2,%1,%0" ! [(set_attr "type" "binary") ! (set_attr "length" "4")]) ;; This variant of the above insn can occur if the first operand *************** *** 2763,2774 **** rtx temp = gen_reg_rtx (SImode); emit_insn (gen_subsi3 (temp, GEN_INT (31), operands[2])); ! if (GET_CODE (operands[1]) == CONST_INT) ! emit_insn (gen_zvdep_imm (operands[0], operands[1], temp)); ! else ! emit_insn (gen_zvdep32 (operands[0], operands[1], temp)); DONE; } /* Make sure both inputs are not constants, ! the recognizer can't handle that. */ operands[1] = force_reg (SImode, operands[1]); }") --- 3130,3141 ---- rtx temp = gen_reg_rtx (SImode); emit_insn (gen_subsi3 (temp, GEN_INT (31), operands[2])); ! if (GET_CODE (operands[1]) == CONST_INT) ! emit_insn (gen_zvdep_imm (operands[0], operands[1], temp)); ! else ! emit_insn (gen_zvdep32 (operands[0], operands[1], temp)); DONE; } /* Make sure both inputs are not constants, ! there are no patterns for that. */ operands[1] = force_reg (SImode, operands[1]); }") *************** *** 2780,2784 **** "" "zdep %1,%P2,%L2,%0" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3147,3151 ---- "" "zdep %1,%P2,%L2,%0" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2797,2801 **** "@ zvdep %1,32,%0 ! zvdepi %1,32,%0") (define_insn "zvdep_imm" --- 3164,3170 ---- "@ zvdep %1,32,%0 ! zvdepi %1,32,%0" ! [(set_attr "type" "shift,shift") ! (set_attr "length" "4,4")]) (define_insn "zvdep_imm" *************** *** 2811,2815 **** operands[1] = GEN_INT ((x & 0xf) - 0x10); return \"zvdepi %1,%2,%0\"; ! }") (define_insn "vdepi_ior" --- 3180,3186 ---- operands[1] = GEN_INT ((x & 0xf) - 0x10); return \"zvdepi %1,%2,%0\"; ! }" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "vdepi_ior" *************** *** 2826,2830 **** operands[2] = GEN_INT (exact_log2 (x + 1)); return \"vdepi -1,%2,%0\"; ! }") (define_insn "vdepi_and" --- 3197,3203 ---- operands[2] = GEN_INT (exact_log2 (x + 1)); return \"vdepi -1,%2,%0\"; ! }" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "vdepi_and" *************** *** 2841,2845 **** operands[2] = GEN_INT (exact_log2 ((~x) + 1)); return \"vdepi 0,%2,%0\"; ! }") (define_expand "ashrsi3" --- 3214,3220 ---- operands[2] = GEN_INT (exact_log2 ((~x) + 1)); return \"vdepi 0,%2,%0\"; ! }" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_expand "ashrsi3" *************** *** 2865,2869 **** "" "extrs %1,%P2,%L2,%0" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3240,3244 ---- "" "extrs %1,%P2,%L2,%0" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2874,2878 **** (match_operand:SI 2 "register_operand" "q"))))] "" ! "vextrs %1,32,%0") (define_insn "lshrsi3" --- 3249,3255 ---- (match_operand:SI 2 "register_operand" "q"))))] "" ! "vextrs %1,32,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "lshrsi3" *************** *** 2884,2888 **** vshd 0,%1,%0 extru %1,%P2,%L2,%0" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3261,3265 ---- vshd 0,%1,%0 extru %1,%P2,%L2,%0" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2902,2906 **** return \"vshd %1,%1,%0\"; }" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3279,3283 ---- return \"vshd %1,%1,%0\"; }" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2915,2919 **** return \"shd %1,%1,%2,%0\"; }" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3292,3296 ---- return \"shd %1,%1,%2,%0\"; }" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2927,2931 **** "INTVAL (operands[3]) + INTVAL (operands[4]) == 32" "shd %1,%2,%4,%0" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3304,3308 ---- "INTVAL (operands[3]) + INTVAL (operands[4]) == 32" "shd %1,%2,%4,%0" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2939,2943 **** "INTVAL (operands[3]) + INTVAL (operands[4]) == 32" "shd %1,%2,%4,%0" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3316,3320 ---- "INTVAL (operands[3]) + INTVAL (operands[4]) == 32" "shd %1,%2,%4,%0" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2955,2959 **** return \"zdep %1,%2,%3,%0\"; }" ! [(set_attr "type" "binary") (set_attr "length" "4")]) --- 3332,3336 ---- return \"zdep %1,%2,%3,%0\"; }" ! [(set_attr "type" "shift") (set_attr "length" "4")]) *************** *** 2964,2968 **** "hppa_can_use_return_insn_p ()" "bv%* 0(%%r2)" ! [(set_attr "type" "branch")]) ;; Use a different pattern for functions which have non-trivial --- 3341,3346 ---- "hppa_can_use_return_insn_p ()" "bv%* 0(%%r2)" ! [(set_attr "type" "branch") ! (set_attr "length" "4")]) ;; Use a different pattern for functions which have non-trivial *************** *** 2973,2977 **** "" "bv%* 0(%%r2)" ! [(set_attr "type" "branch")]) (define_expand "prologue" --- 3351,3356 ---- "" "bv%* 0(%%r2)" ! [(set_attr "type" "branch") ! (set_attr "length" "4")]) (define_expand "prologue" *************** *** 3005,3009 **** "" "bl _mcount,%%r2\;ldo %0(%%r2),%%r25" ! [(set_attr "length" "8")]) (define_insn "blockage" --- 3384,3389 ---- "" "bl _mcount,%%r2\;ldo %0(%%r2),%%r25" ! [(set_attr "type" "multi") ! (set_attr "length" "8")]) (define_insn "blockage" *************** *** 3013,3016 **** --- 3393,3403 ---- [(set_attr "length" "0")]) + (define_insn "switch_jump" + [(set:DI (pc) (label_ref (match_operand 0 "" "")))] + "" + "bl %l0,0%#" + [(set_attr "type" "uncond_branch") + (set_attr "length" "4")]) + (define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" "")))] *************** *** 3089,3093 **** } }" ! [(set_attr "length" "12")]) ;; Need nops for the calls because execution is supposed to continue --- 3476,3481 ---- } }" ! [(set_attr "type" "multi") ! (set_attr "length" "12")]) ;; Need nops for the calls because execution is supposed to continue *************** *** 3103,3116 **** { rtx op; ! if (flag_pic) ! emit_insn (gen_rtx (USE, VOIDmode, ! gen_rtx (REG, Pmode, PIC_OFFSET_TABLE_REGNUM))); ! ! if (TARGET_LONG_CALLS) op = force_reg (SImode, XEXP (operands[0], 0)); else op = XEXP (operands[0], 0); /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two --- 3491,3519 ---- { rtx op; + rtx call_insn; ! if (TARGET_PORTABLE_RUNTIME) op = force_reg (SImode, XEXP (operands[0], 0)); else op = XEXP (operands[0], 0); + if (flag_pic) + { + if (!hppa_save_pic_table_rtx) + hppa_save_pic_table_rtx = gen_reg_rtx (Pmode); + + /* We must save and restore the PIC register around every call + since we don't have flow information to determine if this save + is redundant with a previous save. The old code assumed once + the register was saved it never needs to be saved again, but + the save could have been on a path which doesn't always + execute; a call site physically later in the program would + then attempt a restore from an uninitialized register! */ + emit_insn (gen_rtx (SET, VOIDmode, + hppa_save_pic_table_rtx, + pic_offset_table_rtx)); + + } + /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two *************** *** 3119,3133 **** two patterns keeps CSE from performing this optimization). */ if (GET_CODE (op) == SYMBOL_REF) ! emit_call_insn (gen_call_internal_symref (op, operands[1])); else ! emit_call_insn (gen_call_internal_reg (force_reg (SImode, op), ! operands[1])); if (flag_pic) { ! if (!hppa_save_pic_table_rtx) ! hppa_save_pic_table_rtx = gen_reg_rtx (Pmode); ! emit_insn (gen_rtx (SET, VOIDmode, ! gen_rtx (REG, Pmode, PIC_OFFSET_TABLE_REGNUM), hppa_save_pic_table_rtx)); } --- 3522,3535 ---- two patterns keeps CSE from performing this optimization). */ if (GET_CODE (op) == SYMBOL_REF) ! call_insn = emit_call_insn (gen_call_internal_symref (op, operands[1])); else ! call_insn = emit_call_insn (gen_call_internal_reg (force_reg (SImode, op), ! operands[1])); if (flag_pic) { ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); ! ! emit_insn (gen_rtx (SET, VOIDmode, pic_offset_table_rtx, hppa_save_pic_table_rtx)); } *************** *** 3140,3144 **** (clobber (reg:SI 2)) (use (const_int 0))] ! "! TARGET_LONG_CALLS" "* { --- 3542,3546 ---- (clobber (reg:SI 2)) (use (const_int 0))] ! "! TARGET_PORTABLE_RUNTIME" "* { *************** *** 3147,3151 **** }" [(set_attr "type" "call") ! (set_attr "length" "4")]) (define_insn "call_internal_reg" --- 3549,3560 ---- }" [(set_attr "type" "call") ! (set (attr "length") ! (if_then_else (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (const_int 4) ! (if_then_else (ne (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0)) ! (const_int 64) ! (const_int 52))))]) (define_insn "call_internal_reg" *************** *** 3157,3162 **** "* { /* Yuk! bl may not be able to reach $$dyncall. */ ! if (TARGET_LONG_CALLS) return \"copy %r0,%%r22\;ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\"; else --- 3566,3574 ---- "* { + if (TARGET_FAST_INDIRECT_CALLS) + return \"ble 0(%%sr4,%r0)\;copy %%r31,%%r2\"; + /* Yuk! bl may not be able to reach $$dyncall. */ ! if (TARGET_PORTABLE_RUNTIME || TARGET_MILLICODE_LONG_CALLS) return \"copy %r0,%%r22\;ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\"; else *************** *** 3164,3171 **** }" [(set_attr "type" "dyncall") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 12) ! (const_int 24)))]) (define_expand "call_value" --- 3576,3586 ---- }" [(set_attr "type" "dyncall") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 12) ! (const_int 24)))]) (define_expand "call_value" *************** *** 3174,3192 **** (match_operand 2 "" ""))) (clobber (reg:SI 2))])] - ;;- Don't use operand 1 for most machines. "" " { rtx op; ! if (flag_pic) ! emit_insn (gen_rtx (USE, VOIDmode, ! gen_rtx (REG, Pmode, PIC_OFFSET_TABLE_REGNUM))); ! ! if (TARGET_LONG_CALLS) op = force_reg (SImode, XEXP (operands[1], 0)); else op = XEXP (operands[1], 0); /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two --- 3589,3621 ---- (match_operand 2 "" ""))) (clobber (reg:SI 2))])] "" " { rtx op; + rtx call_insn; ! if (TARGET_PORTABLE_RUNTIME) op = force_reg (SImode, XEXP (operands[1], 0)); else op = XEXP (operands[1], 0); + if (flag_pic) + { + if (!hppa_save_pic_table_rtx) + hppa_save_pic_table_rtx = gen_reg_rtx (Pmode); + + /* We must save and restore the PIC register around every call + since we don't have flow information to determine if this save + is redundant with a previous save. The old code assumed once + the register was saved it never needs to be saved again, but + the save could have been on a path which doesn't always + execute; a call site physically later in the program would + then attempt a restore from an uninitialized register! */ + emit_insn (gen_rtx (SET, VOIDmode, + hppa_save_pic_table_rtx, + pic_offset_table_rtx)); + + } + /* Use two different patterns for calls to explicitly named functions and calls through function pointers. This is necessary as these two *************** *** 3195,3211 **** two patterns keeps CSE from performing this optimization). */ if (GET_CODE (op) == SYMBOL_REF) ! emit_call_insn (gen_call_value_internal_symref (operands[0], op, ! operands[2])); else ! emit_call_insn (gen_call_value_internal_reg (operands[0], ! force_reg (SImode, op), ! operands[2])); if (flag_pic) { ! if (!hppa_save_pic_table_rtx) ! hppa_save_pic_table_rtx = gen_reg_rtx (Pmode); ! emit_insn (gen_rtx (SET, VOIDmode, ! gen_rtx (REG, Pmode, PIC_OFFSET_TABLE_REGNUM), hppa_save_pic_table_rtx)); } --- 3624,3640 ---- two patterns keeps CSE from performing this optimization). */ if (GET_CODE (op) == SYMBOL_REF) ! call_insn = emit_call_insn (gen_call_value_internal_symref (operands[0], ! op, ! operands[2])); else ! call_insn = emit_call_insn (gen_call_value_internal_reg (operands[0], ! force_reg (SImode, op), ! operands[2])); if (flag_pic) { ! use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); ! ! emit_insn (gen_rtx (SET, VOIDmode, pic_offset_table_rtx, hppa_save_pic_table_rtx)); } *************** *** 3220,3224 **** (use (const_int 0))] ;;- Don't use operand 1 for most machines. ! "! TARGET_LONG_CALLS" "* { --- 3649,3653 ---- (use (const_int 0))] ;;- Don't use operand 1 for most machines. ! "! TARGET_PORTABLE_RUNTIME" "* { *************** *** 3227,3231 **** }" [(set_attr "type" "call") ! (set_attr "length" "4")]) (define_insn "call_value_internal_reg" --- 3656,3667 ---- }" [(set_attr "type" "call") ! (set (attr "length") ! (if_then_else (lt (plus (symbol_ref "total_code_bytes") (pc)) ! (const_int 240000)) ! (const_int 4) ! (if_then_else (ne (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0)) ! (const_int 64) ! (const_int 52))))]) (define_insn "call_value_internal_reg" *************** *** 3235,3244 **** (clobber (reg:SI 2)) (use (const_int 1))] - ;;- Don't use operand 1 for most machines. "" "* { /* Yuk! bl may not be able to reach $$dyncall. */ ! if (TARGET_LONG_CALLS) return \"copy %r1,%%r22\;ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\"; else --- 3671,3682 ---- (clobber (reg:SI 2)) (use (const_int 1))] "" "* { + if (TARGET_FAST_INDIRECT_CALLS) + return \"ble 0(%%sr4,%r1)\;copy %%r31,%%r2\"; + /* Yuk! bl may not be able to reach $$dyncall. */ ! if (TARGET_PORTABLE_RUNTIME || TARGET_MILLICODE_LONG_CALLS) return \"copy %r1,%%r22\;ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\"; else *************** *** 3246,3253 **** }" [(set_attr "type" "dyncall") ! (set (attr "length") (if_then_else (ne (symbol_ref "TARGET_LONG_CALLS") ! (const_int 0)) ! (const_int 12) ! (const_int 24)))]) ;; Call subroutine returning any type. --- 3684,3694 ---- }" [(set_attr "type" "dyncall") ! (set (attr "length") ! (if_then_else (and (eq (symbol_ref "TARGET_PORTABLE_RUNTIME") ! (const_int 0)) ! (eq (symbol_ref "TARGET_MILLICODE_LONG_CALLS") ! (const_int 0))) ! (const_int 12) ! (const_int 24)))]) ;; Call subroutine returning any type. *************** *** 3282,3286 **** [(const_int 0)] "" ! "nop") ;;; Hope this is only within a function... --- 3723,3729 ---- [(const_int 0)] "" ! "nop" ! [(set_attr "type" "move") ! (set_attr "length" "4")]) ;;; Hope this is only within a function... *************** *** 3289,3293 **** "" "bv%* 0(%0)" ! [(set_attr "type" "branch")]) (define_insn "extzv" --- 3732,3737 ---- "" "bv%* 0(%0)" ! [(set_attr "type" "branch") ! (set_attr "length" "4")]) (define_insn "extzv" *************** *** 3297,3301 **** (match_operand:SI 3 "uint5_operand" "")))] "" ! "extru %1,%3+%2-1,%2,%0") (define_insn "" --- 3741,3747 ---- (match_operand:SI 3 "uint5_operand" "")))] "" ! "extru %1,%3+%2-1,%2,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "" *************** *** 3305,3309 **** (match_operand:SI 3 "register_operand" "q")))] "" ! "vextru %1,1,%0") (define_insn "extv" --- 3751,3757 ---- (match_operand:SI 3 "register_operand" "q")))] "" ! "vextru %1,1,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "extv" *************** *** 3313,3317 **** (match_operand:SI 3 "uint5_operand" "")))] "" ! "extrs %1,%3+%2-1,%2,%0") (define_insn "" --- 3761,3767 ---- (match_operand:SI 3 "uint5_operand" "")))] "" ! "extrs %1,%3+%2-1,%2,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "" *************** *** 3321,3325 **** (match_operand:SI 3 "register_operand" "q")))] "" ! "vextrs %1,1,%0") (define_insn "insv" --- 3771,3777 ---- (match_operand:SI 3 "register_operand" "q")))] "" ! "vextrs %1,1,%0" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) (define_insn "insv" *************** *** 3331,3335 **** "@ dep %3,%2+%1-1,%1,%0 ! depi %3,%2+%1-1,%1,%0") ;; Optimize insertion of const_int values of type 1...1xxxx. --- 3783,3789 ---- "@ dep %3,%2+%1-1,%1,%0 ! depi %3,%2+%1-1,%1,%0" ! [(set_attr "type" "shift,shift") ! (set_attr "length" "4,4")]) ;; Optimize insertion of const_int values of type 1...1xxxx. *************** *** 3345,3349 **** operands[3] = GEN_INT ((INTVAL (operands[3]) & 0xf) - 0x10); return \"depi %3,%2+%1-1,%1,%0\"; ! }") ;; This insn is used for some loop tests, typically loops reversed when --- 3799,3805 ---- operands[3] = GEN_INT ((INTVAL (operands[3]) & 0xf) - 0x10); return \"depi %3,%2+%1-1,%1,%0\"; ! }" ! [(set_attr "type" "shift") ! (set_attr "length" "4")]) ;; This insn is used for some loop tests, typically loops reversed when *************** *** 3657,3661 **** "" "fdc 0(0,%0)\;fdc 0(0,%1)\;sync" ! [(set_attr "length" "12")]) (define_insn "icacheflush" --- 4113,4118 ---- "" "fdc 0(0,%0)\;fdc 0(0,%1)\;sync" ! [(set_attr "type" "multi") ! (set_attr "length" "12")]) (define_insn "icacheflush" *************** *** 3668,3670 **** "" "mfsp %%sr0,%4\;ldsid (0,%2),%3\;mtsp %3,%%sr0\;fic 0(%%sr0,%0)\;fic 0(%%sr0,%1)\;sync\;mtsp %4,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop" ! [(set_attr "length" "52")]) --- 4125,4128 ---- "" "mfsp %%sr0,%4\;ldsid (0,%2),%3\;mtsp %3,%%sr0\;fic 0(%%sr0,%0)\;fic 0(%%sr0,%1)\;sync\;mtsp %4,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop" ! [(set_attr "type" "multi") ! (set_attr "length" "52")]) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-ghiux.h gcc-2.7.0/config/pa/pa1-ghiux.h *** gcc-2.6.3/config/pa/pa1-ghiux.h Tue Dec 14 00:23:58 1993 --- gcc-2.7.0/config/pa/pa1-ghiux.h Thu Jun 15 15:59:31 1995 *************** *** 1,3 **** ! /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 on HI-UX. Copyright (C) 1993 Free Software Foundation, Inc. --- 1,3 ---- ! /* Definitions of target machine for GNU compiler, for HI-UX using GNU as. Copyright (C) 1993 Free Software Foundation, Inc. *************** *** 16,28 **** 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 is the same as pa-hiux.h, except that we generate snake code by ! default and we have to deal with assembler weirdness. */ ! #define HP_FP_ARG_DESCRIPTOR_REVERSED ! ! #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS ! + TARGET_JUMP_IN_DELAY */ ! ! #include "pa/pa-ghiux.h" --- 16,26 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* HIUX is just a HPUX variant. */ ! #include "pa/pa1-ghpux.h" ! /* Predefines are the one noteworthy difference between HPUX and HIUX. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D_HIUX_SOURCE -D__H3050R -D__H3050RX -Asystem(unix) -Asystem(hiux) -Acpu(hppa) -Amachine(hppa)" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-ghpux.h gcc-2.7.0/config/pa/pa1-ghpux.h *** gcc-2.6.3/config/pa/pa1-ghpux.h Tue Dec 14 00:21:38 1993 --- gcc-2.7.0/config/pa/pa1-ghpux.h Thu Jun 15 15:59:46 1995 *************** *** 17,21 **** 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. */ #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-ghpux9.h gcc-2.7.0/config/pa/pa1-ghpux9.h *** gcc-2.6.3/config/pa/pa1-ghpux9.h --- gcc-2.7.0/config/pa/pa1-ghpux9.h Thu Jun 15 15:59:56 1995 *************** *** 0 **** --- 1,30 ---- + /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Tim Moore (moore@defmacro.cs.utah.edu) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS + + TARGET_JUMP_IN_DELAY */ + + #include "pa/pa-ghpux.h" + + /* We can debug dynamically linked executables on hpux9. */ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{!shared:-u main} %{static:-a archive} %{shared:-b}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-hiux.h gcc-2.7.0/config/pa/pa1-hiux.h *** gcc-2.6.3/config/pa/pa1-hiux.h Sat Oct 30 17:19:49 1993 --- gcc-2.7.0/config/pa/pa1-hiux.h Thu Jun 15 16:00:08 1995 *************** *** 1,3 **** ! /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 on HU-IX. Copyright (C) 1993 Free Software Foundation, Inc. --- 1,3 ---- ! /* Definitions of target machine for GNU compiler, for HI-UX. Copyright (C) 1993 Free Software Foundation, Inc. *************** *** 16,27 **** 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 is the same as pa-hiux.h, except that we generate snake code by ! default and have to deal with assembler weirdness. */ ! ! #define HP_FP_ARG_DESCRIPTOR_REVERSED ! ! #define TARGET_DEFAULT 1 /* TARGET_SNAKE */ ! ! #include "pa/pa-hiux.h" --- 16,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* HIUX is just a HPUX variant. We can simply use the HPUX configuration ! for just about everything. */ ! #include "pa/pa1-hpux.h" ! ! /* Predefines are the one noteworthy difference between HPUX and HIUX. */ ! #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dhppa -DPWB -Dunix -D_HIUX_SOURCE -D__H3050R -D__H3050RX -Asystem(unix) -Asystem(hiux) -Acpu(hppa) -Amachine(hppa)" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-hpux.h gcc-2.7.0/config/pa/pa1-hpux.h *** gcc-2.6.3/config/pa/pa1-hpux.h Tue Sep 21 19:25:44 1993 --- gcc-2.7.0/config/pa/pa1-hpux.h Thu Jun 15 16:00:17 1995 *************** *** 17,21 **** 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. */ #define TARGET_DEFAULT 1 /* TARGET_SNAKE */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define TARGET_DEFAULT 1 /* TARGET_SNAKE */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-hpux9.h gcc-2.7.0/config/pa/pa1-hpux9.h *** gcc-2.6.3/config/pa/pa1-hpux9.h --- gcc-2.7.0/config/pa/pa1-hpux9.h Thu Jun 15 16:00:27 1995 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1 + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Tim Moore (moore@defmacro.cs.utah.edu) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define TARGET_DEFAULT 1 /* TARGET_SNAKE */ + + #include "pa/pa-hpux.h" + + /* We can debug dynamically linked executables on hpux9. */ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{!shared:-u main} %{static:-a archive} %{shared:-b}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-oldas.h gcc-2.7.0/config/pa/pa1-oldas.h *** gcc-2.6.3/config/pa/pa1-oldas.h Tue Sep 21 19:25:45 1993 --- gcc-2.7.0/config/pa/pa1-oldas.h Thu Jun 15 16:00:35 1995 *************** *** 17,21 **** 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 is the same as pa-hpux.h, except that we generate snake code by --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This is the same as pa-hpux.h, except that we generate snake code by diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1-osf.h gcc-2.7.0/config/pa/pa1-osf.h *** gcc-2.6.3/config/pa/pa1-osf.h Tue Jun 14 15:15:28 1994 --- gcc-2.7.0/config/pa/pa1-osf.h Thu Jun 15 16:00:47 1995 *************** *** 17,41 **** 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. */ #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS + TARGET_JUMP_IN_DELAY */ ! #include "pa/pa.h" #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dhppa -Dunix -Dhp9000 -Dspectrum -DREVARGV -Dhp700 -DHP700 -Dparisc -D__pa_risc -DPARISC -DBYTE_MSF -DBIT_MSF -Asystem(unix) -Asystem(mach) -Acpu(hppa) -Amachine(hppa)" - - /* Don't default to pcc-struct-return, because gcc is the only compiler, and - we want to retain compatibility with older gcc versions. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 - - /* OSF1 on the PA still uses 16bit wchar_t. */ - #undef WCHAR_TYPE - #undef WCHAR_TYPE_SIZE - - #define WCHAR_TYPE "short unsigned int" - #define WCHAR_TYPE_SIZE 16 - - /* OSF1 wants to be different and use unsigned long as size_t. */ - #undef SIZE_TYPE - #define SIZE_TYPE "long unsigned int" --- 17,27 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS + TARGET_JUMP_IN_DELAY */ ! #include "pa/pa-osf.h" #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dhppa -Dunix -Dhp9000 -Dspectrum -DREVARGV -Dhp700 -DHP700 -Dparisc -D__pa_risc -DPARISC -DBYTE_MSF -DBIT_MSF -Asystem(unix) -Asystem(mach) -Acpu(hppa) -Amachine(hppa)" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/pa1.h gcc-2.7.0/config/pa/pa1.h *** gcc-2.6.3/config/pa/pa1.h Tue Dec 14 00:21:46 1993 --- gcc-2.7.0/config/pa/pa1.h Thu Jun 15 16:00:58 1995 *************** *** 17,21 **** 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. */ #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define TARGET_DEFAULT 0x89 /* TARGET_SNAKE + TARGET_GAS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/t-pa gcc-2.7.0/config/pa/t-pa *** gcc-2.6.3/config/pa/t-pa Mon Sep 12 18:14:16 1994 --- gcc-2.7.0/config/pa/t-pa Wed Dec 28 22:04:44 1994 *************** *** 1,4 **** LIBGCC1=libgcc1.null CROSS_LIBGCC1=libgcc1.null - INSTALLED_H = float.h stdarg.h varargs.h $(USER_H) limits.h ADA_CFLAGS=-mdisable-indexing --- 1,8 ---- LIBGCC1=libgcc1.null CROSS_LIBGCC1=libgcc1.null ADA_CFLAGS=-mdisable-indexing + LIB2FUNCS_EXTRA=lib2funcs.asm + + lib2funcs.asm: $(srcdir)/config/pa/$(LIB2FUNCS_EXTRA) + rm -f lib2funcs.asm + cp $(srcdir)/config/pa/$(LIB2FUNCS_EXTRA) . Only in gcc-2.6.3/config/pa: t-pa-hpux diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/x-pa gcc-2.7.0/config/pa/x-pa *** gcc-2.6.3/config/pa/x-pa Tue Dec 14 17:59:33 1993 --- gcc-2.7.0/config/pa/x-pa Tue May 16 07:32:43 1995 *************** *** 1,3 **** ! CC=gcc -DUSE_C_ALLOCA -D__inline= ! # B option not supported on hpux. ! TAROUTOPTS = xpf --- 1,4 ---- ! CC=gcc -DUSE_C_ALLOCA -D__inline= -Dbsd4_4 ! # BSD on the PA already has ANSI include files which are c++ compatible. ! INSTALL_HEADERS= ! STMP_FIXPROTO= Only in gcc-2.6.3/config/pa: x-pa-hiux diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/xm-pa.h gcc-2.7.0/config/pa/xm-pa.h *** gcc-2.6.3/config/pa/xm-pa.h Wed Jul 13 07:07:42 1994 --- gcc-2.7.0/config/pa/xm-pa.h Thu Jun 15 16:01:08 1995 *************** *** 17,21 **** 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. */ extern int errno; --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ extern int errno; Only in gcc-2.6.3/config/pa: xm-pahiux.h diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pa/xm-pahpux.h gcc-2.7.0/config/pa/xm-pahpux.h *** gcc-2.6.3/config/pa/xm-pahpux.h Wed Jul 13 07:07:49 1994 --- gcc-2.7.0/config/pa/xm-pahpux.h Thu Jun 15 16:01:17 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pdp11/pdp11.c gcc-2.7.0/config/pdp11/pdp11.c *** gcc-2.6.3/config/pdp11/pdp11.c Mon Oct 31 07:59:54 1994 --- gcc-2.7.0/config/pdp11/pdp11.c Thu Jun 15 16:01:29 1995 *************** *** 17,21 **** 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. */ #ifndef FILE --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef FILE *************** *** 1031,1035 **** else /* if (GET_CODE (SET_DEST (exp)) == MEM) */ { ! /* the last else is a bit paranoic, but since nearly all instructions play with condition codes, it's reasonable! */ --- 1032,1036 ---- else /* if (GET_CODE (SET_DEST (exp)) == MEM) */ { ! /* the last else is a bit paranoiac, but since nearly all instructions play with condition codes, it's reasonable! */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pdp11/pdp11.h gcc-2.7.0/config/pdp11/pdp11.h *** gcc-2.6.3/config/pdp11/pdp11.h Mon Oct 31 08:00:01 1994 --- gcc-2.7.0/config/pdp11/pdp11.h Thu Jun 15 16:01:41 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for the pdp-11 ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). --- 1,4 ---- /* Definitions of target machine for GNU compiler, for the pdp-11 ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 26,30 **** char *output_block_move(); ! /* check whther load_fpu_reg or not */ #define LOAD_FPU_REG_P(x) ((x)>=8 && (x)<=11) #define NO_LOAD_FPU_REG_P(x) ((x)==12 || (x)==13) --- 27,31 ---- char *output_block_move(); ! /* check whether load_fpu_reg or not */ #define LOAD_FPU_REG_P(x) ((x)>=8 && (x)<=11) #define NO_LOAD_FPU_REG_P(x) ((x)==12 || (x)==13) *************** *** 86,90 **** { "no-abshi", -128}, \ /* is branching expensive - on a PDP, it's actually really cheap */ \ ! /* this is just to play aroound and check what code gcc generates */ \ { "branch-expensive", 256}, \ { "branch-cheap", -256}, \ --- 87,91 ---- { "no-abshi", -128}, \ /* is branching expensive - on a PDP, it's actually really cheap */ \ ! /* this is just to play around and check what code gcc generates */ \ { "branch-expensive", 256}, \ { "branch-cheap", -256}, \ *************** *** 171,175 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 172,176 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 454,459 **** second operand. ! `Q' is for memory refereces using take more than 1 instruction. ! `R' is for memory refereces which take 1 word for the instruction. */ #define EXTRA_CONSTRAINT(OP,CODE) \ --- 455,460 ---- second operand. ! `Q' is for memory references using take more than 1 instruction. ! `R' is for memory references which take 1 word for the instruction. */ #define EXTRA_CONSTRAINT(OP,CODE) \ *************** *** 525,532 **** /* 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,SIZE) 0 /* Define how to find the value returned by a function. --- 526,534 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 839,843 **** goto ADDR; \ \ ! /* anything else is illegal */ \ fail: ; \ } --- 841,845 ---- goto ADDR; \ \ ! /* anything else is invalid */ \ fail: ; \ } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pdp11/pdp11.md gcc-2.7.0/config/pdp11/pdp11.md *** gcc-2.6.3/config/pdp11/pdp11.md Wed Oct 26 14:26:21 1994 --- gcc-2.7.0/config/pdp11/pdp11.md Tue May 16 07:33:02 1995 *************** *** 1,4 **** ;;- Machine description for the pdp11 for GNU C compiler ! ;; Copyright (C) 1994 Free Software Foundation, Inc. ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). --- 1,4 ---- ;;- Machine description for the pdp11 for GNU C compiler ! ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). *************** *** 64,68 **** (define_attr "length" "" (const_int 1)) ! ;; a users asm staement (define_asm_attributes [(set_attr "type" "unknown") --- 64,68 ---- (define_attr "length" "" (const_int 1)) ! ;; a user's asm statement (define_asm_attributes [(set_attr "type" "unknown") *************** *** 266,270 **** ;; problem with too short jump distance! we need an assembler which can ! ;; make this legal for all jump distances! ;; e.g. gas! --- 266,270 ---- ;; problem with too short jump distance! we need an assembler which can ! ;; make this valid for all jump distances! ;; e.g. gas! *************** *** 680,684 **** ;; maybe fiddle a bit with move_ratio, then ! ;; let contraints only accept a register ... (define_expand "movstrhi" --- 680,684 ---- ;; maybe fiddle a bit with move_ratio, then ! ;; let constraints only accept a register ... (define_expand "movstrhi" *************** *** 882,886 **** ;; make float to int and vice versa ! ;; using the cc_status.flag field we coulf probably cut down ;; on seti and setl ;; assume that we are normally in double and integer mode - --- 882,886 ---- ;; make float to int and vice versa ! ;; using the cc_status.flag field we could probably cut down ;; on seti and setl ;; assume that we are normally in double and integer mode - *************** *** 1016,1020 **** ;;- subtract instructions ;; we don't have to care for constant second ! ;; args, since they are cononical plus:xx now! ;; also for minus:DF ?? --- 1016,1020 ---- ;;- subtract instructions ;; we don't have to care for constant second ! ;; args, since they are canonical plus:xx now! ;; also for minus:DF ?? *************** *** 1059,1063 **** return \"\"; }" ! ;; offsetable memory addresses always are expensive!!! [(set_attr "length" "3,5,6,8")]) --- 1059,1063 ---- return \"\"; }" ! ;; offsettable memory addresses always are expensive!!! [(set_attr "length" "3,5,6,8")]) *************** *** 1448,1452 **** (const_int 14)])]) ! ;; the following is illegal - too complex!!! - just say 14 !!! ; [(set (attr "length") (plus (and (match_dup 2) ; (const_int 7)) --- 1448,1452 ---- (const_int 14)])]) ! ;; the following is invalid - too complex!!! - just say 14 !!! ; [(set (attr "length") (plus (and (match_dup 2) ; (const_int 7)) *************** *** 1671,1681 **** ;; 32 bit result ! (define_insn "mulhisi3" [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! ! (mult:SI (match_operand:HI 1 "register_operand" "%0,0") (match_operand:HI 2 "general_operand" "rR,Qi")))] "TARGET_45" "mul %2, %0" [(set_attr "length" "1,2")]) ;;- divide --- 1671,1701 ---- ;; 32 bit result ! (define_expand "mulhisi3" ! [(set (match_dup 3) ! (match_operand:HI 1 "general_operand" "g,g")) ! (set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! ! (mult:SI (truncate:HI ! (match_dup 0)) ! (match_operand:HI 2 "general_operand" "rR,Qi")))] ! "TARGET_45" ! "operands[3] = gen_lowpart(HImode, operands[1]);") ! ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! ! (mult:SI (truncate:HI ! (match_operand:SI 1 "register_operand" "%0,0")) (match_operand:HI 2 "general_operand" "rR,Qi")))] "TARGET_45" "mul %2, %0" [(set_attr "length" "1,2")]) + + ;(define_insn "mulhisi3" + ; [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered! + ; (mult:SI (truncate:HI + ; (match_operand:SI 1 "register_operand" "%0,0")) + ; (match_operand:HI 2 "general_operand" "rR,Qi")))] + ; "TARGET_45" + ; "mul %2, %0" + ; [(set_attr "length" "1,2")]) ;;- divide diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pdp11/xm-pdp11.h gcc-2.7.0/config/pdp11/xm-pdp11.h *** gcc-2.6.3/config/pdp11/xm-pdp11.h Wed Oct 26 13:39:23 1994 --- gcc-2.7.0/config/pdp11/xm-pdp11.h Thu Jun 15 16:03:19 1995 *************** *** 3,23 **** Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). ! 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. ! ! */ /* ???? */ --- 3,22 ---- Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). ! 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 2, 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* ???? */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pyr/pyr.c gcc-2.7.0/config/pyr/pyr.c *** gcc-2.6.3/config/pyr/pyr.c Mon Jul 27 22:45:42 1992 --- gcc-2.7.0/config/pyr/pyr.c Thu Jun 15 16:02:04 1995 *************** *** 16,20 **** 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. */ /* Some output-actions in pyr.md need these. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Some output-actions in pyr.md need these. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pyr/pyr.h gcc-2.7.0/config/pyr/pyr.h *** gcc-2.6.3/config/pyr/pyr.h Sat Jul 30 14:11:37 1994 --- gcc-2.7.0/config/pyr/pyr.h Thu Jun 15 16:03:55 1995 *************** *** 1,5 **** /* Definitions of target machine parameters for GNU compiler, for Pyramid 90x, 9000, and MIServer Series. ! Copyright (C) 1989 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions of target machine parameters for GNU compiler, for Pyramid 90x, 9000, and MIServer Series. ! Copyright (C) 1989, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,22 **** 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. */ ! /* * If you're going to change this, and you haven't already, --- 17,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* * If you're going to change this, and you haven't already, *************** *** 485,488 **** --- 486,490 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 493,497 **** We may nevertheless provide this as an option. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ ((TARGET_RETD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ --- 495,499 ---- We may nevertheless provide this as an option. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_RETD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pyr/pyr.md gcc-2.7.0/config/pyr/pyr.md *** gcc-2.6.3/config/pyr/pyr.md Mon Jan 25 18:45:27 1993 --- gcc-2.7.0/config/pyr/pyr.md Thu Jun 15 16:55:53 1995 *************** *** 16,20 **** ;; 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. ;; Instruction patterns. When multiple patterns apply, --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;; Instruction patterns. When multiple patterns apply, *************** *** 1135,1168 **** cc_status.flags |= CC_NO_OVERFLOW; return \"mtstw %1,%0\"; - ") - - ;; Same for HI and QI mode move-test as well. - - (define_peephole - [(set (match_operand:HI 0 "register_operand" "=r") - (match_operand:HI 1 "nonimmediate_operand" "rm")) - (set (match_operand:SI 2 "register_operand" "=r") - (sign_extend:SI (match_operand:HI 3 "nonimmediate_operand" "rm"))) - (set (cc0) (match_dup 2))] - "dead_or_set_p (insn, operands[2]) - && (rtx_equal_p (operands[3], operands[0]) - || rtx_equal_p (operands[3], operands[1]))" - "* - cc_status.flags |= CC_NO_OVERFLOW; - return \"cvthw %1,%0\"; - ") - - (define_peephole - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "nonimmediate_operand" "rm")) - (set (match_operand:SI 2 "register_operand" "=r") - (sign_extend:SI (match_operand:QI 3 "nonimmediate_operand" "rm"))) - (set (cc0) (match_dup 2))] - "dead_or_set_p (insn, operands[2]) - && (rtx_equal_p (operands[3], operands[0]) - || rtx_equal_p (operands[3], operands[1]))" - "* - cc_status.flags |= CC_NO_OVERFLOW; - return \"cvtbw %1,%0\"; ") --- 1136,1139 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/pyr/xm-pyr.h gcc-2.7.0/config/pyr/xm-pyr.h *** gcc-2.6.3/config/pyr/xm-pyr.h Sat Jun 26 11:31:44 1993 --- gcc-2.7.0/config/pyr/xm-pyr.h Thu Jun 15 16:05:31 1995 *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/romp/romp.c gcc-2.7.0/config/romp/romp.c *** gcc-2.6.3/config/romp/romp.c Wed Jun 23 07:55:17 1993 --- gcc-2.7.0/config/romp/romp.c Thu Jun 15 16:05:45 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 1443,1451 **** hash += hash_rtx (XEXP (x, i)); else if (fmt[i] == 'u') ! hash += (int) XEXP (x, i); else if (fmt[i] == 'i') hash += XINT (x, i); else if (fmt[i] == 's') ! hash += (int) XSTR (x, i); return hash; --- 1444,1452 ---- hash += hash_rtx (XEXP (x, i)); else if (fmt[i] == 'u') ! hash += (unsigned HOST_WIDE_INT) XEXP (x, i); else if (fmt[i] == 'i') hash += XINT (x, i); else if (fmt[i] == 's') ! hash += (unsigned HOST_WIDE_INT) XSTR (x, i); return hash; *************** *** 1953,1957 **** union real_extract u; ! bcopy (&CONST_DOUBLE_LOW (immed[i]), &u, sizeof u); if (GET_MODE (immed[i]) == DFmode) ASM_OUTPUT_DOUBLE (file, u.d); --- 1954,1959 ---- union real_extract u; ! bcopy ((char *) &CONST_DOUBLE_LOW (immed[i]), ! (char *) &u, sizeof u); if (GET_MODE (immed[i]) == DFmode) ASM_OUTPUT_DOUBLE (file, u.d); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/romp/romp.h gcc-2.7.0/config/romp/romp.h *** gcc-2.6.3/config/romp/romp.h Fri Dec 31 06:49:46 1993 --- gcc-2.7.0/config/romp/romp.h Thu Jun 15 16:05:59 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for ROMP chip. ! Copyright (C) 1989, 1991, 1993 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) --- 1,4 ---- /* Definitions of target machine for GNU compiler, for ROMP chip. ! Copyright (C) 1989, 1991, 1993, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 505,513 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 506,515 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/romp/romp.md gcc-2.7.0/config/romp/romp.md *** gcc-2.6.3/config/romp/romp.md Fri Jul 29 17:49:58 1994 --- gcc-2.7.0/config/romp/romp.md Thu Jun 15 16:56:09 1995 *************** *** 1,4 **** ;;- Machine description for ROMP chip for GNU C compiler ! ;; Copyright (C) 1988, 1991, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- ;;- Machine description for ROMP chip for GNU C compiler ! ;; Copyright (C) 1988, 1991, 1993, 1994, 1995 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** ;; 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. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 1661,1671 **** ;; Operand 1 (2 for `call_value') is the number of arguments and is not used. (define_expand "call" ! [(use (reg:SI 0)) ! (parallel [(call (mem:SI (match_operand:SI 0 "address_operand" "")) ! (match_operand 1 "" "")) ! (clobber (reg:SI 15))])] "" " { if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != CONST_INT) abort(); --- 1662,1673 ---- ;; Operand 1 (2 for `call_value') is the number of arguments and is not used. (define_expand "call" ! [(use (match_operand:SI 0 "address_operand" "")) ! (use (match_operand 1 "" ""))] "" " { + rtx reg0 = gen_rtx (REG, SImode, 0); + rtx call_insn; + if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != CONST_INT) abort(); *************** *** 1679,1684 **** /* Copy the data area address to r0. */ ! emit_move_insn (gen_rtx (REG, SImode, 0), ! force_reg (SImode, operands[0])); strcpy (real_fcnname, \".\"); strcat (real_fcnname, XSTR (operands[0], 0)); --- 1681,1685 ---- /* Copy the data area address to r0. */ ! emit_move_insn (reg0, force_reg (SImode, operands[0])); strcpy (real_fcnname, \".\"); strcat (real_fcnname, XSTR (operands[0], 0)); *************** *** 1689,1701 **** rtx data_access; ! emit_move_insn (gen_rtx (REG, SImode, 0), ! force_reg (SImode, operands[0])); data_access = gen_rtx (MEM, SImode, operands[0]); RTX_UNCHANGING_P (data_access) = 1; operands[0] = copy_to_reg (data_access); } }") ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "register_operand" "b")) (match_operand 1 "" "g")) --- 1690,1705 ---- rtx data_access; ! emit_move_insn (reg0, force_reg (SImode, operands[0])); data_access = gen_rtx (MEM, SImode, operands[0]); RTX_UNCHANGING_P (data_access) = 1; operands[0] = copy_to_reg (data_access); } + + call_insn = emit_call_insn (gen_call_internal (operands[0], operands[1])); + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), reg0); + DONE; }") ! (define_insn "call_internal" [(call (mem:SI (match_operand:SI 0 "register_operand" "b")) (match_operand 1 "" "g")) *************** *** 1716,1727 **** ;; Call a function and return a value. (define_expand "call_value" ! [(use (reg:SI 0)) ! (parallel [(set (match_operand 0 "" "=fg") ! (call (mem:SI (match_operand:SI 1 "address_operand" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:SI 15))])] "" " { if (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != CONST_INT) abort(); --- 1720,1732 ---- ;; Call a function and return a value. (define_expand "call_value" ! [(use (match_operand 0 "" "")) ! (use (match_operand:SI 1 "address_operand" "")) ! (use (match_operand 2 "" ""))] "" " { + rtx reg0 = gen_rtx (REG, SImode, 0); + rtx call_insn; + if (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != CONST_INT) abort(); *************** *** 1735,1740 **** /* Copy the data area address to r0. */ ! emit_move_insn (gen_rtx (REG, SImode, 0), ! force_reg (SImode, operands[1])); strcpy (real_fcnname, \".\"); strcat (real_fcnname, XSTR (operands[1], 0)); --- 1740,1744 ---- /* Copy the data area address to r0. */ ! emit_move_insn (reg0,force_reg (SImode, operands[1])); strcpy (real_fcnname, \".\"); strcat (real_fcnname, XSTR (operands[1], 0)); *************** *** 1745,1757 **** rtx data_access; ! emit_move_insn (gen_rtx (REG, SImode, 0), ! force_reg (SImode, operands[1])); data_access = gen_rtx (MEM, SImode, operands[1]); RTX_UNCHANGING_P (data_access) = 1; operands[1] = copy_to_reg (data_access); } }") ! (define_insn "" [(set (match_operand 0 "" "=fg") (call (mem:SI (match_operand:SI 1 "register_operand" "b")) --- 1749,1766 ---- rtx data_access; ! emit_move_insn (reg0,force_reg (SImode, operands[1])); data_access = gen_rtx (MEM, SImode, operands[1]); RTX_UNCHANGING_P (data_access) = 1; operands[1] = copy_to_reg (data_access); } + + call_insn = emit_call_insn (gen_call_value_internal (operands[0], + operands[1], + operands[2])); + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), reg0); + DONE; }") ! (define_insn "call_value_internal" [(set (match_operand 0 "" "=fg") (call (mem:SI (match_operand:SI 1 "register_operand" "b")) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/romp/xm-romp.h gcc-2.7.0/config/romp/xm-romp.h *** gcc-2.6.3/config/romp/xm-romp.h Sat Jun 26 11:31:16 1993 --- gcc-2.7.0/config/romp/xm-romp.h Thu Jun 15 16:26:14 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/aix31.h gcc-2.7.0/config/rs6000/aix31.h *** gcc-2.6.3/config/rs6000/aix31.h Wed Oct 20 21:56:49 1993 --- gcc-2.7.0/config/rs6000/aix31.h Thu Jun 15 16:26:32 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/aix3newas.h gcc-2.7.0/config/rs6000/aix3newas.h *** gcc-2.6.3/config/rs6000/aix3newas.h --- gcc-2.7.0/config/rs6000/aix3newas.h Thu Jun 15 16:26:44 1995 *************** *** 0 **** --- 1,48 ---- + /* Definitions of target machine for GNU compiler, + for IBM RS/6000 POWER running AIX version 3.x with the fixed assembler. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Jason Merrill (jason@cygnus.com). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #include "rs6000/rs6000.h" + + /* Tell the assembler to assume that all undefined names are external. */ + + #undef ASM_SPEC + #define ASM_SPEC "-u" + + /* These are not necessary when we pass -u to the assembler, and undefining + them saves a great deal of space in object files. */ + + #undef ASM_OUTPUT_EXTERNAL + #undef ASM_OUTPUT_EXTERNAL_LIBCALL + #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ + { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ + if ((TREE_CODE (DECL) == VAR_DECL \ + || TREE_CODE (DECL) == FUNCTION_DECL) \ + && (NAME)[0] != '*' \ + && (NAME)[strlen (NAME) - 1] != ']') \ + { \ + char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \ + strcpy (_name, XSTR (_symref, 0)); \ + strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \ + XSTR (_symref, 0) = _name; \ + } \ + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/aix41.h gcc-2.7.0/config/rs6000/aix41.h *** gcc-2.6.3/config/rs6000/aix41.h Mon Nov 21 18:00:04 1994 --- gcc-2.7.0/config/rs6000/aix41.h Thu Jun 15 16:26:51 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 26,30 **** #define ASM_SPEC "-u -mpwr" #undef LINK_SPEC #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ ! %{static:-bnso -bI:/lib/syscalls.exp} %{g*:-bexport:/usr/lib/libg.exp}" --- 27,51 ---- #define ASM_SPEC "-u -mpwr" + /* These are not necessary when we pass -u to the assembler, and undefining + them saves a great deal of space in object files. */ + + #undef ASM_OUTPUT_EXTERNAL + #undef ASM_OUTPUT_EXTERNAL_LIBCALL + #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ + { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ + if ((TREE_CODE (DECL) == VAR_DECL \ + || TREE_CODE (DECL) == FUNCTION_DECL) \ + && (NAME)[0] != '*' \ + && (NAME)[strlen (NAME) - 1] != ']') \ + { \ + char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \ + strcpy (_name, XSTR (_symref, 0)); \ + strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \ + XSTR (_symref, 0) = _name; \ + } \ + } + #undef LINK_SPEC #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ ! %{static:-bnso -bI:/lib/syscalls.exp} %{g*:-bexport:/usr/lib/libg.exp}\ ! %{shared:-bM:SRE}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/aix41ppc.h gcc-2.7.0/config/rs6000/aix41ppc.h *** gcc-2.6.3/config/rs6000/aix41ppc.h --- gcc-2.7.0/config/rs6000/aix41ppc.h Thu Jun 15 16:27:03 1995 *************** *** 0 **** --- 1,29 ---- + /* Definitions of target machine for GNU compiler, + for IBM RS/6000 POWER running AIX version 4.1. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by David Edelsohn (edelsohn@npac.syr.edu). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #include "rs6000/powerpc.h" + + #undef LINK_SPEC + #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ + %{static:-bnso -bI:/lib/syscalls.exp} \ + %{!shared:%{g*:-bexport:/usr/lib/libg.exp}} %{shared:-bM:SRE}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/eabi-ctors.c gcc-2.7.0/config/rs6000/eabi-ctors.c *** gcc-2.6.3/config/rs6000/eabi-ctors.c --- gcc-2.7.0/config/rs6000/eabi-ctors.c Thu Jun 15 16:27:13 1995 *************** *** 0 **** --- 1,58 ---- + /* Stripped down support to run global constructors and destructors on + embedded PowerPC systems. + + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Michael Meissner (meissner@cygnus.com). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + /* Declare a pointer to void function type. */ + + typedef void (*func_ptr) (void); + + /* Declare the set of symbols use as begin and end markers for the lists + of global object constructors and global object destructors. */ + + extern func_ptr __CTOR_LIST__[]; + extern func_ptr __CTOR_END__ []; + extern func_ptr __DTOR_LIST__[]; + extern func_ptr __DTOR_END__ []; + + /* Call all global constructors */ + void + __do_global_ctors (void) + { + func_ptr *ptr = &__CTOR_LIST__[0]; + func_ptr *end = &__CTOR_END__[0]; + + for ( ; ptr != end; ptr++) + (*ptr)(); + } + + /* Call all global destructors */ + void + __do_global_dtors (void) + { + func_ptr *ptr = &__DTOR_LIST__[0]; + func_ptr *end = &__DTOR_END__[0]; + + for ( ; ptr != end; ptr++) + (*ptr)(); + } + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/eabi.asm gcc-2.7.0/config/rs6000/eabi.asm *** gcc-2.6.3/config/rs6000/eabi.asm --- gcc-2.7.0/config/rs6000/eabi.asm Tue May 16 07:33:05 1995 *************** *** 0 **** --- 1,173 ---- + # File to either setup register 2 to point to the GOT, or to adjust the + # pointers in the .got2 section to point to their new addresses. + + .file "eabi.asm" + .section ".text" + .globl __eabi + + .section ".got2","aw" + .LCTOC1 = . # +32768 + + # Table of addresses + .Ltable = .-.LCTOC1 + .long .LCTOC1 # address we are really at + + .Lgot = .-.LCTOC1 + .long _GLOBAL_OFFSET_TABLE_ # normal GOT address + + .Lgots = .-.LCTOC1 + .long _GOT_START_ # start of .got section + + .Lgote = .-.LCTOC1 + .long _GOT_END_ # end of .got section + + .Lgot2s = .-.LCTOC1 + .long _GOT2_START_ # -mrelocatable GOT pointers start + + .Lgot2e = .-.LCTOC1 + .long _GOT2_END_ # -mrelocatable GOT pointers end + + .text + .Lptr: + .long .LCTOC1-.Laddr # PC relative pointer to .got2 + .long 0x4000 # traceback table + + __eabi: mflr 0 + bl .Laddr # get current address + .Laddr: + mflr 12 # real address of .Laddr + lwz 11,(.Lptr-.Laddr)(12) # linker generated address of .LCTOC1 + add 11,11,12 # correct to real pointer + lwz 12,.Ltable(11) # get linker's idea of where .Laddr is + subf. 12,12,11 # calculate difference + mtlr 0 # restore link register + bc 4,2,.Lreloc # skip if we need to relocate + + # Only load up register 2 if there is a .got section + + lwz 3,.Lgots(11) # start of .got section + lwz 4,.Lgote(11) # end of .got section + cmpw 1,3,4 # .got section non-empty? + bc 12,6,.Ldone + + # Normal program, load up register 2 + + lwz 2,.Lgot(11) # normal GOT address + b __do_global_ctors # do any C++ global constructors (which returns to caller) + + # We need to relocate the .got2 pointers. Don't load register 2 + + .Lreloc: + lwz 3,.Lgot2s(11) # GOT pointers start + lwz 4,.Lgot2e(11) # GOT pointers end + add 3,12,3 # adjust pointers + add 4,12,4 + + cmpw 1,3,4 # any pointers to adjust + bc 12,6,.Ldone + + .Lloop: + lwz 11,0(3) # next pointer + add 11,11,12 # adjust + stw 11,0(3) + addi 3,3,4 # bump to next word + cmpw 1,3,4 # more pointers to adjust? + bc 4,6,.Lloop + + # Done adjusting pointers, return + + .Ldone: + b __do_global_ctors # do any C++ global constructors (which returns to caller) + + # Routines for saving floating point registers, called by the compiler. + # Called with r11 pointing to the stack header word of the caller of the + # function, just beyond the end of the floating point save area. + + .globl _savefpr_14_l + .globl _savefpr_15_l + .globl _savefpr_16_l + .globl _savefpr_17_l + .globl _savefpr_18_l + .globl _savefpr_19_l + .globl _savefpr_20_l + .globl _savefpr_21_l + .globl _savefpr_22_l + .globl _savefpr_23_l + .globl _savefpr_24_l + .globl _savefpr_25_l + .globl _savefpr_26_l + .globl _savefpr_27_l + .globl _savefpr_28_l + .globl _savefpr_29_l + .globl _savefpr_30_l + .globl _savefpr_31_l + + .long 0x00400000 # traceback tag + _savefpr_14_l: stfd 14,-144(11) # save fp registers + _savefpr_15_l: stfd 15,-136(11) + _savefpr_16_l: stfd 16,-128(11) + _savefpr_17_l: stfd 17,-120(11) + _savefpr_18_l: stfd 18,-112(11) + _savefpr_19_l: stfd 19,-104(11) + _savefpr_20_l: stfd 20,-96(11) + _savefpr_21_l: stfd 21,-88(11) + _savefpr_22_l: stfd 22,-80(11) + _savefpr_23_l: stfd 23,-72(11) + _savefpr_24_l: stfd 24,-64(11) + _savefpr_25_l: stfd 25,-56(11) + _savefpr_26_l: stfd 26,-48(11) + _savefpr_27_l: stfd 27,-40(11) + _savefpr_28_l: stfd 28,-32(11) + _savefpr_29_l: stfd 29,-24(11) + _savefpr_30_l: stfd 30,-16(11) + _savefpr_31_l: stfd 31,-8(11) + stw 0,4(11) # save return address also + blr + + + # Routines for restoring floating point registers, called by the compiler. + # Called with r11 pointing to the stack header word of the caller of the + # function, just beyond the end of the floating point save area. + + .globl _restfpr_14_l + .globl _restfpr_15_l + .globl _restfpr_16_l + .globl _restfpr_17_l + .globl _restfpr_18_l + .globl _restfpr_19_l + .globl _restfpr_20_l + .globl _restfpr_21_l + .globl _restfpr_22_l + .globl _restfpr_23_l + .globl _restfpr_24_l + .globl _restfpr_25_l + .globl _restfpr_26_l + .globl _restfpr_27_l + .globl _restfpr_28_l + .globl _restfpr_29_l + .globl _restfpr_30_l + .globl _restfpr_31_l + + .long 0x00600000 # traceback tag + _restfpr_14_l: lfd 14,-144(11) # restore fp registers + _restfpr_15_l: lfd 15,-136(11) + _restfpr_16_l: lfd 16,-128(11) + _restfpr_17_l: lfd 17,-120(11) + _restfpr_18_l: lfd 18,-112(11) + _restfpr_19_l: lfd 19,-104(11) + _restfpr_20_l: lfd 20,-96(11) + _restfpr_21_l: lfd 21,-88(11) + _restfpr_22_l: lfd 22,-80(11) + _restfpr_23_l: lfd 23,-72(11) + _restfpr_24_l: lfd 24,-64(11) + _restfpr_25_l: lfd 25,-56(11) + _restfpr_26_l: lfd 26,-48(11) + _restfpr_27_l: lfd 27,-40(11) + _restfpr_28_l: lfd 28,-32(11) + _restfpr_29_l: lfd 29,-24(11) + _restfpr_30_l: lfd 30,-16(11) + _restfpr_31_l: lwz 0,4(11) # caller's caller address + lfd 31,-8(11) + mtlr 0 + mr 1,11 + blr diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/eabi.h gcc-2.7.0/config/rs6000/eabi.h *** gcc-2.6.3/config/rs6000/eabi.h --- gcc-2.7.0/config/rs6000/eabi.h Thu Jun 15 16:27:25 1995 *************** *** 0 **** --- 1,76 ---- + /* Core target definitions for GNU compiler + for IBM RS/6000 PowerPC targeted to embedded ELF systems. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Cygnus Support. + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "rs6000/sysv4.h" + + /* For now, make stabs the default debugging type, not dwarf. */ + #undef PREFERRED_DEBUGGING_TYPE + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + /* Make int foo : 8 not cause structures to be aligned to an int boundary */ + + #undef PCC_BITFIELD_TYPE_MATTERS + #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE) + + /* Define this macro to be the value 1 if instructions will fail to + work if given data not on the nominal alignment. If instructions + will merely go slower in that case, define this macro as 0. */ + #undef STRICT_ALIGNMENT + #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN) + + /* Align stack to 8 byte boundaries, rather than 16 bytes Sys V.4 uses */ + #undef STACK_BOUNDARY + #define STACK_BOUNDARY 64 + + /* No data type wants to be aligned rounder than this. */ + #undef BIGGEST_ALIGNMENT + #define BIGGEST_ALIGNMENT 64 + + /* Put PC relative got entries in .got2 */ + #undef MINIMAL_TOC_SECTION_ASM_OP + #define MINIMAL_TOC_SECTION_ASM_OP \ + ((TARGET_RELOCATABLE) ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"") + + /* Invoke an initializer function to set up the GOT */ + #define NAME__MAIN "__eabi" + #define INVOKE__main 1 + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)"); + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES \ + "-DPPC -D__embedded__ -Asystem(embedded) -Acpu(powerpc) -Amachine(powerpc)" + + /* Don't use startfiles or libraries except for libgcc.a */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "" + + #undef LIB_SPEC + #define LIB_SPEC "" + + #undef LIBGCC_SPEC + #define LIBGCC_SPEC "libgcc.a%s" + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "" + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/eabile.h gcc-2.7.0/config/rs6000/eabile.h *** gcc-2.6.3/config/rs6000/eabile.h --- gcc-2.7.0/config/rs6000/eabile.h Thu Jun 15 16:27:36 1995 *************** *** 0 **** --- 1,60 ---- + /* Core target definitions for GNU compiler for PowerPC targeted to + little endian embedded ELF systems. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Cygnus Support. + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "rs6000/eabi.h" + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_LITTLE_ENDIAN) + + #undef CPP_SPEC + #define CPP_SPEC "\ + %{posix: -D_POSIX_SOURCE} \ + %{mrelocatable: -D_RELOCATABLE} \ + %{mbig: -D_BIG_ENDIAN -Amachine(bigendian)} \ + %{mbig-endian: -D_BIG_ENDIAN -Amachine(bigendian)} \ + %{!mbig: %{!mbig-endian: -D_LITTLE_ENDIAN -Amachine(littleendian)}} \ + %{!mcpu*: \ + %{mpower: %{!mpower2: -D_ARCH_PWR}} \ + %{mpower2: -D_ARCH_PWR2} \ + %{mpowerpc*: -D_ARCH_PPC} \ + %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ + %{!mno-powerpc: -D_ARCH_PPC}} \ + %{mcpu=common: -D_ARCH_COM} \ + %{mcpu=power: -D_ARCH_PWR} \ + %{mcpu=powerpc: -D_ARCH_PPC} \ + %{mcpu=rios: -D_ARCH_PWR} \ + %{mcpu=rios1: -D_ARCH_PWR} \ + %{mcpu=rios2: -D_ARCH_PWR2} \ + %{mcpu=rsc: -D_ARCH_PWR} \ + %{mcpu=rsc1: -D_ARCH_PWR} \ + %{mcpu=403: -D_ARCH_PPC} \ + %{mcpu=mpc403: -D_ARCH_PPC} \ + %{mcpu=ppc403: -D_ARCH_PPC} \ + %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=mpc601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=ppc601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=603: -D_ARCH_PPC} \ + %{mcpu=mpc603: -D_ARCH_PPC} \ + %{mcpu=ppc603: -D_ARCH_PPC} \ + %{mcpu=604: -D_ARCH_PPC} \ + %{mcpu=mpc604: -D_ARCH_PPC} \ + %{mcpu=ppc604: -D_ARCH_PPC}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/lynx.h gcc-2.7.0/config/rs6000/lynx.h *** gcc-2.6.3/config/rs6000/lynx.h --- gcc-2.7.0/config/rs6000/lynx.h Thu Jun 15 16:27:46 1995 *************** *** 0 **** --- 1,103 ---- + /* Definitions for Rs6000 running LynxOS. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + /* Definitions we want to override with those from rs6000.h: */ + #undef LIB_SPEC + #undef PTRDIFF_TYPE + #undef WCHAR_TYPE + #undef WCHAR_TYPE_SIZE + #undef ASM_FILE_START + #undef EXTRA_SECTIONS + #undef READONLY_DATA_SECTION + #undef EXTRA_SECTION_FUNCTIONS + #undef SELECT_RTX_SECTION + #undef SELECT_SECTION + #undef ASM_OUTPUT_LABELREF + #undef ASM_OUTPUT_INTERNAL_LABEL + #undef ASM_GENERATE_INTERNAL_LABEL + #undef ASM_OUTPUT_COMMON + #undef ASM_OUTPUT_LOCAL + #undef ASM_OUTPUT_CONSTRUCTOR + #undef ASM_OUTPUT_DESTRUCTOR + #undef CTORS_SECTION_FUNCTION + #undef DTORS_SECTION_FUNCTION + + #undef SDB_DEBUGGING_INFO + #undef DBX_DEBUGGING_INFO + #undef PREFERRED_DEBUGGING_TYPE + + #undef FUNCTION_PROFILER + + #include + + /* LynxOS has signed chars, regardless of what most R/S 6000 systems do */ + #undef DEFAULT_SIGNED_CHAR + #define DEFAULT_SIGNED_CHAR 1 + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Acpu(rs6000) -Amachine(rs6000) -Asystem(lynx) -Asystem(unix) -DLynx -D_IBMR2 -Dunix -Drs6000 -Dlynx -DLYNX" + + #undef LINK_SPEC + #define LINK_SPEC "-T0x10001000 -H0x1000 -D0x20000000 -btextro -bhalt:4 -bnodelcsect -bnso -bro -bnoglink %{v} %{b*}" + + #undef LIB_SPEC + #define LIB_SPEC "%{mthreads:-L/lib/thread/} \ + %{msystem-v:-lc_v -lm.v} \ + %{!msystem-v:%{mposix:-lc_p} -lc -lm}" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit.o%s}%{!mthreads:pinit.o%s}}%{!p:%{msystem-v:vinit.o%s -e_start}%{!msystem-v:%{mthreads:thread/init.o%s}%{!mthreads:init.o%s}}}" + + #undef ENDFILE_SPEC + + /* This can become more refined as we have more powerpc options. */ + #undef ASM_SPEC + #define ASM_SPEC "-u %{m601:-m601} %{power*:-m601}" + + #undef SUBTARGET_SWITCHES + #define SUBTARGET_SWITCHES \ + {"threads", MASK_THREADS}, \ + {"posix", MASK_POSIX}, \ + {"system-v", MASK_SYSTEM_V}, + + #undef SUBTARGET_OVERRIDE_OPTIONS + #define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + if (TARGET_SYSTEM_V && profile_flag) \ + warning ("-msystem-v and -p are incompatible"); \ + if (TARGET_SYSTEM_V && TARGET_THREADS) \ + warning ("-msystem-v and -mthreads are incompatible"); \ + } while (0) + + /* For collect2 */ + #define OBJECT_FORMAT_NONE + #undef OBJECT_FORMAT_COFF + #undef OBJECT_FORMAT_ROSE + #undef MD_EXEC_PREFIX + #undef REAL_LD_FILE_NAME + #undef REAL_NM_FILE_NAME + #undef REAL_STRIP_FILE_NAME + + /* LynxOS doesn't have mcount. */ + #undef FUNCTION_PROFILER + #define FUNCTION_PROFILER(file, profile_label_no) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/mach.h gcc-2.7.0/config/rs6000/mach.h *** gcc-2.6.3/config/rs6000/mach.h Sat Oct 2 04:23:10 1993 --- gcc-2.7.0/config/rs6000/mach.h Thu Jun 15 16:27:55 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/powerpc.h gcc-2.7.0/config/rs6000/powerpc.h *** gcc-2.6.3/config/rs6000/powerpc.h Mon Jul 11 16:59:47 1994 --- gcc-2.7.0/config/rs6000/powerpc.h Thu Jun 15 16:28:03 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for IBM RS/6000 PowerPC running AIX version 3.2. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by David Edelsohn (edelsohn@npac.syr.edu). --- 1,5 ---- /* Definitions of target machine for GNU compiler, for IBM RS/6000 PowerPC running AIX version 3.2. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by David Edelsohn (edelsohn@npac.syr.edu). *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 26,31 **** --- 27,37 ---- #define ASM_SPEC "-u -mppc" + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 \ + -Asystem(unix) -Asystem(aix) -Acpu(powerpc) -Amachine(powerpc)" + #undef CPP_SPEC #define CPP_SPEC "\ + %{posix: -D_POSIX_SOURCE} \ %{!mcpu*: \ %{mpower: %{!mpower2: -D_ARCH_PWR}} \ *************** *** 42,45 **** --- 48,54 ---- %{mcpu=rsc: -D_ARCH_PWR} \ %{mcpu=rsc1: -D_ARCH_PWR} \ + %{mcpu=403: -D_ARCH_PPC} \ + %{mcpu=mpc403: -D_ARCH_PPC} \ + %{mcpu=ppc403: -D_ARCH_PPC} \ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ %{mcpu=mpc601: -D_ARCH_PPC -D_ARCH_PWR} \ *************** *** 57,58 **** --- 66,86 ---- #undef PROCESSOR_DEFAULT #define PROCESSOR_DEFAULT PROCESSOR_PPC601 + + /* These are not necessary when we pass -u to the assembler, and undefining + them saves a great deal of space in object files. */ + + #undef ASM_OUTPUT_EXTERNAL + #undef ASM_OUTPUT_EXTERNAL_LIBCALL + #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ + { rtx _symref = XEXP (DECL_RTL (DECL), 0); \ + if ((TREE_CODE (DECL) == VAR_DECL \ + || TREE_CODE (DECL) == FUNCTION_DECL) \ + && (NAME)[0] != '*' \ + && (NAME)[strlen (NAME) - 1] != ']') \ + { \ + char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \ + strcpy (_name, XSTR (_symref, 0)); \ + strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \ + XSTR (_symref, 0) = _name; \ + } \ + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/rs6000.c gcc-2.7.0/config/rs6000/rs6000.c *** gcc-2.6.3/config/rs6000/rs6000.c Mon Nov 21 17:45:21 1994 --- gcc-2.7.0/config/rs6000/rs6000.c Thu Jun 15 16:28:15 1995 *************** *** 1,4 **** /* Subroutines used for code generation on IBM RS/6000. ! Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- /* Subroutines used for code generation on IBM RS/6000. ! Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** 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 --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 64,67 **** --- 65,74 ---- rtx rs6000_compare_op0, rs6000_compare_op1; int rs6000_compare_fp_p; + + #ifdef USING_SVR4_H + /* Label number of label created for -mrelocatable, to call to so we can + get the address of the GOT section */ + int rs6000_pic_labelno; + #endif /* Override command line options. Mostly we process the processor *************** *** 76,80 **** variant and any PowerPC variant. */ ! #define POWER_MASKS (MASK_POWER | MASK_POWER2) #define POWERPC_MASKS (MASK_POWERPC | MASK_PPC_GPOPT \ | MASK_PPC_GFXOPT | MASK_POWERPC64) --- 83,87 ---- variant and any PowerPC variant. */ ! #define POWER_MASKS (MASK_POWER | MASK_POWER2 | MASK_MULTIPLE | MASK_STRING) #define POWERPC_MASKS (MASK_POWERPC | MASK_PPC_GPOPT \ | MASK_PPC_GFXOPT | MASK_POWERPC64) *************** *** 90,94 **** = {{"common", PROCESSOR_COMMON, 0, POWER_MASKS | POWERPC_MASKS}, {"power", PROCESSOR_POWER, ! MASK_POWER, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"powerpc", PROCESSOR_POWERPC, --- 97,101 ---- = {{"common", PROCESSOR_COMMON, 0, POWER_MASKS | POWERPC_MASKS}, {"power", PROCESSOR_POWER, ! MASK_POWER | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"powerpc", PROCESSOR_POWERPC, *************** *** 96,121 **** POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"rios", PROCESSOR_RIOS1, ! MASK_POWER, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rios1", PROCESSOR_RIOS1, ! MASK_POWER, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rsc", PROCESSOR_PPC601, ! MASK_POWER, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rsc1", PROCESSOR_PPC601, ! MASK_POWER, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rios2", PROCESSOR_RIOS2, ! MASK_POWER | MASK_POWER2, POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"601", PROCESSOR_PPC601, ! MASK_POWER | MASK_POWERPC | MASK_NEW_MNEMONICS, MASK_POWER2 | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"mpc601", PROCESSOR_PPC601, ! MASK_POWER | MASK_POWERPC | MASK_NEW_MNEMONICS, MASK_POWER2 | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"ppc601", PROCESSOR_PPC601, ! MASK_POWER | MASK_POWERPC | MASK_NEW_MNEMONICS, MASK_POWER2 | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"603", PROCESSOR_PPC603, --- 103,137 ---- POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"rios", PROCESSOR_RIOS1, ! MASK_POWER | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rios1", PROCESSOR_RIOS1, ! MASK_POWER | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rsc", PROCESSOR_PPC601, ! MASK_POWER | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rsc1", PROCESSOR_PPC601, ! MASK_POWER | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, {"rios2", PROCESSOR_RIOS2, ! MASK_POWER | MASK_MULTIPLE | MASK_STRING | MASK_POWER2, POWERPC_MASKS | MASK_NEW_MNEMONICS}, + {"403", PROCESSOR_PPC403, + MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS, + POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, + {"mpc403", PROCESSOR_PPC403, + MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS, + POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, + {"ppc403", PROCESSOR_PPC403, + MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS, + POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"601", PROCESSOR_PPC601, ! MASK_POWER | MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"mpc601", PROCESSOR_PPC601, ! MASK_POWER | MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"ppc601", PROCESSOR_PPC601, ! MASK_POWER | MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_MULTIPLE | MASK_STRING, MASK_POWER2 | POWERPC_OPT_MASKS | MASK_POWERPC64}, {"603", PROCESSOR_PPC603, *************** *** 140,143 **** --- 156,162 ---- int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt); + int multiple = TARGET_MULTIPLE; /* save current -mmultiple/-mno-multiple status */ + int string = TARGET_STRING; /* save current -mstring/-mno-string status */ + profile_block_flag = 0; *************** *** 163,167 **** --- 182,233 ---- } } + + /* If -mmultiple or -mno-multiple was explicitly used, don't + override with the processor default */ + if (TARGET_MULTIPLE_SET) + target_flags = (target_flags & ~MASK_MULTIPLE) | multiple; + + /* If -mstring or -mno-string was explicitly used, don't + override with the processor default */ + if (TARGET_STRING_SET) + target_flags = (target_flags & ~MASK_STRING) | string; + + /* Don't allow -mmultiple or -mstring on little endian systems, because the + hardware doesn't support the instructions used in little endian mode */ + if (!BYTES_BIG_ENDIAN) + { + if (TARGET_MULTIPLE) + { + target_flags &= ~MASK_MULTIPLE; + if (TARGET_MULTIPLE_SET) + warning ("-mmultiple is not supported on little endian systems"); + } + + if (TARGET_STRING) + { + target_flags &= ~MASK_STRING; + if (TARGET_STRING_SET) + warning ("-mstring is not supported on little endian systems"); + } + } + + #ifdef SUBTARGET_OVERRIDE_OPTIONS + SUBTARGET_OVERRIDE_OPTIONS; + #endif + } + + /* Create a CONST_DOUBLE like immed_double_const, except reverse the + two parts of the constant if the target is little endian. */ + + struct rtx_def *rs6000_immed_double_const (i0, i1, mode) + HOST_WIDE_INT i0, i1; + enum machine_mode mode; + { + if (! WORDS_BIG_ENDIAN) + return immed_double_const (i1, i0, mode); + + return immed_double_const (i0, i1, mode); } + /* Return non-zero if this function is known to have a null epilogue. */ *************** *** 323,326 **** --- 389,409 ---- } + /* Return 1 if the operand is a constant whose low-order 32 bits are + zero. */ + + int + low_32_bit_operand (op, mode) + register rtx op; + enum machine_mode mode; + { + rtx low; + + if (GET_CODE (op) != CONST_DOUBLE && GET_CODE (op) != CONST_INT) + return 0; + + low = operand_subword (op, 1, 0, mode); + return low != 0 && GET_CODE (low) == CONST_INT && INTVAL (low) == 0; + } + /* Return 1 if the operand is either a floating-point register, a pseudo register, or memory. */ *************** *** 469,472 **** --- 552,575 ---- } + /* Return 1 if the operand is a general register or memory operand without + pre-inc or pre_dec which produces invalid form of PowerPC lwa + instruction. */ + + int + lwa_operand (op, mode) + register rtx op; + register enum machine_mode mode; + { + rtx inner = op; + + if (reload_completed && GET_CODE (inner) == SUBREG) + inner = SUBREG_REG (inner); + + return gpc_reg_operand (inner, mode) + || (memory_operand (inner, mode) + && GET_CODE (XEXP (inner, 0)) != PRE_INC + && GET_CODE (XEXP (inner, 0)) != PRE_DEC); + } + /* Return 1 if the operand, used inside a MEM, is a valid first argument to CALL. This is a SYMBOL_REF or a pseudo-register, which will be *************** *** 535,539 **** /* A SYMBOL_REF referring to the TOC is valid. */ ! if (GET_CODE (op) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (op)) return 1; --- 638,642 ---- /* A SYMBOL_REF referring to the TOC is valid. */ ! if (LEGITIMATE_CONSTANT_POOL_ADDRESS_P (op)) return 1; *************** *** 543,546 **** --- 646,862 ---- } + /* Expand a block move operation, and return 1 if successful. Return 0 + if we should let the compiler generate normal code. + + operands[0] is the destination + operands[1] is the source + operands[2] is the length + operands[3] is the alignment */ + + #define MAX_MOVE_REG 4 + + int + expand_block_move (operands) + rtx operands[]; + { + rtx bytes_rtx = operands[2]; + rtx align_rtx = operands[3]; + int constp = (GET_CODE (bytes_rtx) == CONST_INT); + int align = XINT (align_rtx, 0); + int bytes; + int offset; + int num_reg; + int i; + rtx src_reg; + rtx dest_reg; + rtx src_addr; + rtx dest_addr; + rtx tmp_reg; + rtx stores[MAX_MOVE_REG]; + int move_bytes; + + /* If this is not a fixed size move, just call memcpy */ + if (!constp) + return 0; + + /* Anything to move? */ + bytes = INTVAL (bytes_rtx); + if (bytes <= 0) + return 1; + + /* Don't support real large moves. If string instructions are not used, + then don't generate more than 8 loads. */ + if (TARGET_STRING) + { + if (bytes > 4*8) + return 0; + } + else if (!STRICT_ALIGNMENT) + { + if (bytes > 4*8) + return 0; + } + else if (bytes > 8*align) + return 0; + + /* Move the address into scratch registers. */ + dest_reg = copy_addr_to_reg (XEXP (operands[0], 0)); + src_reg = copy_addr_to_reg (XEXP (operands[1], 0)); + + if (TARGET_STRING) /* string instructions are available */ + { + for ( ; bytes > 0; bytes -= move_bytes) + { + #if 0 + /* XXX Don't move so many bytes right now, it causes the compiler to not bootstrap */ + if (bytes > 24 /* move up to 32 bytes at a time */ + && !fixed_regs[5] + && !fixed_regs[6] + && !fixed_regs[7] + && !fixed_regs[8] + && !fixed_regs[9] + && !fixed_regs[10] + && !fixed_regs[11] + && !fixed_regs[12]) + { + move_bytes = (bytes > 32) ? 32 : bytes; + emit_insn (gen_movstrsi_8reg (dest_reg, + src_reg, + GEN_INT ((move_bytes == 32) ? 0 : move_bytes), + align_rtx)); + } + else if (bytes > 16 /* move up to 24 bytes at a time */ + && !fixed_regs[7] + && !fixed_regs[8] + && !fixed_regs[9] + && !fixed_regs[10] + && !fixed_regs[11] + && !fixed_regs[12]) + { + move_bytes = (bytes > 24) ? 24 : bytes; + emit_insn (gen_movstrsi_6reg (dest_reg, + src_reg, + GEN_INT (move_bytes), + align_rtx)); + } + else if (bytes > 8 /* move up to 16 bytes at a time */ + && !fixed_regs[9] + && !fixed_regs[10] + && !fixed_regs[11] + && !fixed_regs[12]) + { + move_bytes = (bytes > 16) ? 16 : bytes; + emit_insn (gen_movstrsi_4reg (dest_reg, + src_reg, + GEN_INT (move_bytes), + align_rtx)); + } + else + #endif + if (bytes > 4 && !TARGET_64BIT) + { /* move up to 8 bytes at a time */ + move_bytes = (bytes > 8) ? 8 : bytes; + emit_insn (gen_movstrsi_2reg (dest_reg, + src_reg, + GEN_INT (move_bytes), + align_rtx)); + } + else if (bytes >= 4 && (align >= 4 || !STRICT_ALIGNMENT)) + { /* move 4 bytes */ + move_bytes = 4; + tmp_reg = gen_reg_rtx (SImode); + emit_move_insn (tmp_reg, gen_rtx (MEM, SImode, src_reg)); + emit_move_insn (gen_rtx (MEM, SImode, dest_reg), tmp_reg); + } + else if (bytes == 2 && (align >= 2 || !STRICT_ALIGNMENT)) + { /* move 2 bytes */ + move_bytes = 2; + tmp_reg = gen_reg_rtx (HImode); + emit_move_insn (tmp_reg, gen_rtx (MEM, HImode, src_reg)); + emit_move_insn (gen_rtx (MEM, HImode, dest_reg), tmp_reg); + } + else if (bytes == 1) /* move 1 byte */ + { + move_bytes = 1; + tmp_reg = gen_reg_rtx (QImode); + emit_move_insn (tmp_reg, gen_rtx (MEM, QImode, src_reg)); + emit_move_insn (gen_rtx (MEM, QImode, dest_reg), tmp_reg); + } + else + { /* move up to 4 bytes at a time */ + move_bytes = (bytes > 4) ? 4 : bytes; + emit_insn (gen_movstrsi_1reg (dest_reg, + src_reg, + GEN_INT (move_bytes), + align_rtx)); + } + + if (bytes > move_bytes) + { + emit_insn (gen_addsi3 (src_reg, src_reg, GEN_INT (move_bytes))); + emit_insn (gen_addsi3 (dest_reg, dest_reg, GEN_INT (move_bytes))); + } + } + } + + else /* string instructions not available */ + { + num_reg = offset = 0; + for ( ; bytes > 0; (bytes -= move_bytes), (offset += move_bytes)) + { + /* Calculate the correct offset for src/dest */ + if (offset == 0) + { + src_addr = src_reg; + dest_addr = dest_reg; + } + else + { + src_addr = gen_rtx (PLUS, Pmode, src_reg, GEN_INT (offset)); + dest_addr = gen_rtx (PLUS, Pmode, dest_reg, GEN_INT (offset)); + } + + /* Generate the appropriate load and store, saving the stores for later */ + if (bytes >= 4 && (align >= 4 || !STRICT_ALIGNMENT)) + { + move_bytes = 4; + tmp_reg = gen_reg_rtx (SImode); + emit_insn (gen_movsi (tmp_reg, gen_rtx (MEM, SImode, src_addr))); + stores[ num_reg++ ] = gen_movsi (gen_rtx (MEM, SImode, dest_addr), tmp_reg); + } + else if (bytes >= 2 && (align >= 2 || !STRICT_ALIGNMENT)) + { + move_bytes = 2; + tmp_reg = gen_reg_rtx (HImode); + emit_insn (gen_movhi (tmp_reg, gen_rtx (MEM, HImode, src_addr))); + stores[ num_reg++ ] = gen_movhi (gen_rtx (MEM, HImode, dest_addr), tmp_reg); + } + else + { + move_bytes = 1; + tmp_reg = gen_reg_rtx (QImode); + emit_insn (gen_movqi (tmp_reg, gen_rtx (MEM, QImode, src_addr))); + stores[ num_reg++ ] = gen_movqi (gen_rtx (MEM, QImode, dest_addr), tmp_reg); + } + + if (num_reg >= MAX_MOVE_REG) + { + for (i = 0; i < num_reg; i++) + emit_insn (stores[i]); + num_reg = 0; + } + } + + if (num_reg > 0) + { + for (i = 0; i < num_reg; i++) + emit_insn (stores[i]); + } + } + + return 1; + } + + /* Return 1 if OP is a load multiple operation. It is known to be a PARALLEL and the first section will be tested. */ *************** *** 724,727 **** --- 1040,1115 ---- return (INTVAL (andop) & ~ shift_mask) == 0; } + + /* Return 1 if REGNO (reg1) == REGNO (reg2) - 1 making them candidates + for lfq and stfq insns. + + Note reg1 and reg2 *must* be hard registers. To be sure we will + abort if we are passed pseudo registers. */ + + int + registers_ok_for_quad_peep (reg1, reg2) + rtx reg1, reg2; + { + /* We might have been passed a SUBREG. */ + if (GET_CODE (reg1) != REG || GET_CODE (reg2) != REG) + return 0; + + return (REGNO (reg1) == REGNO (reg2) - 1); + } + + /* Return 1 if addr1 and addr2 are suitable for lfq or stfq insn. addr1 and + addr2 must be in consecutive memory locations (addr2 == addr1 + 8). */ + + int + addrs_ok_for_quad_peep (addr1, addr2) + register rtx addr1; + register rtx addr2; + { + int reg1; + int offset1; + + /* Extract an offset (if used) from the first addr. */ + if (GET_CODE (addr1) == PLUS) + { + /* If not a REG, return zero. */ + if (GET_CODE (XEXP (addr1, 0)) != REG) + return 0; + else + { + reg1 = REGNO (XEXP (addr1, 0)); + /* The offset must be constant! */ + if (GET_CODE (XEXP (addr1, 1)) != CONST_INT) + return 0; + offset1 = INTVAL (XEXP (addr1, 1)); + } + } + else if (GET_CODE (addr1) != REG) + return 0; + else + { + reg1 = REGNO (addr1); + /* This was a simple (mem (reg)) expression. Offset is 0. */ + offset1 = 0; + } + + /* Make sure the second address is a (mem (plus (reg) (const_int). */ + if (GET_CODE (addr2) != PLUS) + return 0; + + if (GET_CODE (XEXP (addr2, 0)) != REG + || GET_CODE (XEXP (addr2, 1)) != CONST_INT) + return 0; + + if (reg1 != REGNO (XEXP (addr2, 0))) + return 0; + + /* The offset for the second addr must be 8 more than the first addr. */ + if (INTVAL (XEXP (addr2, 1)) != offset1 + 8) + return 0; + + /* All the tests passed. addr1 and addr2 are valid for lfq or stfq + instructions. */ + return 1; + } /* Return the register class of a scratch register needed to copy IN into *************** *** 949,960 **** return; - case 'H': - /* X must be a constant. Output the low order 5 bits plus 24. */ - if (! INT_P (x)) - output_operand_lossage ("invalid %%H value"); - - fprintf (file, "%d", (INT_LOWPART (x) + 24) & 31); - return; - case 'I': /* Print `i' if this is a constant, else nothing. */ --- 1337,1340 ---- *************** *** 1131,1142 **** return; - case 'S': - /* Low 5 bits of 31 - value */ - if (! INT_P (x)) - output_operand_lossage ("invalid %%S value"); - - fprintf (file, "%d", (31 - INT_LOWPART (x)) & 31); - return; - case 't': /* Write 12 if this jump operation will branch if true, 4 otherwise. --- 1511,1514 ---- *************** *** 1230,1238 **** /* X is a SYMBOL_REF. Write out the name preceded by a period and without any trailing data in brackets. Used for function ! names. */ if (GET_CODE (x) != SYMBOL_REF) abort (); putc ('.', file); RS6000_OUTPUT_BASENAME (file, XSTR (x, 0)); return; --- 1602,1614 ---- /* X is a SYMBOL_REF. Write out the name preceded by a period and without any trailing data in brackets. Used for function ! names. If we are configured for System V (or the embedded ABI) on ! the PowerPC, do not emit the period, since those systems do not use ! TOCs and the like. */ if (GET_CODE (x) != SYMBOL_REF) abort (); + #ifndef USING_SVR4_H putc ('.', file); + #endif RS6000_OUTPUT_BASENAME (file, XSTR (x, 0)); return; *************** *** 1412,1415 **** --- 1788,1859 ---- } + #ifdef USING_SVR4_H + /* Write out a System V.4 style traceback table before the prologue + + At present, only emit the basic tag table (ie, do not emit tag_types other + than 0, which might use more than 1 tag word). + + The first tag word looks like: + + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 0 |ver| tag |e|s| alloca | # fprs | # gprs |s|l|c|f| + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + */ + + void + svr4_traceback (file, name, decl) + FILE *file; + tree name, decl; + { + + int first_reg = first_reg_to_save (); + int first_fp_reg = first_fp_reg_to_save (); + int pushes_stack = rs6000_pushes_stack (); + long tag; + long version = 0; /* version number */ + long tag_type = 0; /* function type */ + long extended_tag = 0; /* additional tag words needed */ + long spare = 0; /* reserved for future use */ + long alloca_reg; /* stack/frame register */ + long fpr_max = 64 - first_fp_reg; /* # of floating point registers saved */ + long gpr_max = 32 - first_reg; /* # of general purpose registers saved */ + long sp_max; /* 1 if the function acquires a stack frame */ + long lr_max; /* 1 if the function stores the link register */ + long cr_max; /* 1 if the function has a CR save word */ + long fpscr_max = 0; /* 1 if the function has a FPSCR save word */ + + if (frame_pointer_needed) + alloca_reg = 31; + + else if (pushes_stack != 0) + alloca_reg = 1; + + else + alloca_reg = 0; + + lr_max = (regs_ever_live[65] || first_fp_reg < 62 || profile_flag); + cr_max = (must_save_cr () != 0); + sp_max = (pushes_stack != 0); + + tag = (((version & 3) << 24) + | ((tag_type & 7) << 21) + | ((extended_tag & 1) << 20) + | ((spare & 1) << 19) + | ((alloca_reg & 0x1f) << 14) + | ((fpr_max & 0x1f) << 9) + | ((gpr_max & 0x1f) << 4) + | ((sp_max & 1) << 3) + | ((lr_max & 1) << 2) + | ((cr_max & 1) << 1) + | ((fpscr_max & 1) << 0)); + + fprintf (file, "\t.long 0x%lx\n", tag); + } + + #endif /* USING_SVR4_H */ + /* Write function prologue. */ *************** *** 1424,1427 **** --- 1868,1872 ---- int basic_size = rs6000_sa_size (); int total_size = (basic_size + size + current_function_outgoing_args_size); + char buf[256]; /* Round size to multiple of 8 bytes. */ *************** *** 1430,1436 **** /* Write .extern for any function we will call to save and restore fp values. */ if (first_fp_reg < 62) ! fprintf (file, "\t.extern ._savef%d\n\t.extern ._restf%d\n", ! first_fp_reg - 32, first_fp_reg - 32); /* Write .extern for truncation routines, if needed. */ --- 1875,1884 ---- /* Write .extern for any function we will call to save and restore fp values. */ + #ifndef USING_SVR4_H if (first_fp_reg < 62) ! fprintf (file, "\t.extern %s%d%s\n\t.extern %s%d%s\n", ! SAVE_FP_PREFIX, first_fp_reg - 32, SAVE_FP_SUFFIX, ! RESTORE_FP_PREFIX, first_fp_reg - 32, RESTORE_FP_SUFFIX); ! #endif /* Write .extern for truncation routines, if needed. */ *************** *** 1453,1460 **** } /* If we have to call a function to save fpr's, or if we are doing profiling, then we will be using LR. */ ! if (first_fp_reg < 62 || profile_flag) regs_ever_live[65] = 1; /* If we use the link register, get it into r0. */ --- 1901,1919 ---- } + #ifdef USING_SVR4_H + /* If we have a relocatable GOT section, we need to save the LR. */ + if (TARGET_RELOCATABLE && get_pool_size () != 0) + regs_ever_live[65] = 1; + #endif + /* If we have to call a function to save fpr's, or if we are doing profiling, then we will be using LR. */ ! if (profile_flag) ! regs_ever_live[65] = 1; ! ! #ifndef USING_SVR4_H ! if (first_fp_reg < 62) regs_ever_live[65] = 1; + #endif /* If we use the link register, get it into r0. */ *************** *** 1474,1481 **** asm_fprintf (file, "\tstfd 31,-8(1)\n"); else if (first_fp_reg != 64) ! asm_fprintf (file, "\tbl ._savef%d\n", first_fp_reg - 32); /* Now save gpr's. */ ! if (! TARGET_POWER || first_reg == 31) { int regno, loc; --- 1933,1952 ---- asm_fprintf (file, "\tstfd 31,-8(1)\n"); else if (first_fp_reg != 64) ! { ! #ifndef USING_SVR4_H ! asm_fprintf (file, "\tbl %s%d%s\n", SAVE_FP_PREFIX, first_fp_reg - 32, SAVE_FP_SUFFIX); ! #else ! int regno, loc; ! ! for (regno = first_fp_reg, ! loc = - (64 - first_fp_reg) * 8; ! regno < 64; ! regno++, loc += 8) ! asm_fprintf (file, "\tstfd %d,%d(1)\n", regno - 32, loc); ! #endif ! } /* Now save gpr's. */ ! if (! TARGET_MULTIPLE || first_reg == 31) { int regno, loc; *************** *** 1507,1511 **** else { ! asm_fprintf (file, "\t{cau 0,0,%d|lis 0,%d}\n\t{oril|ori} 0,0,%d\n", (total_size >> 16) & 0xffff, total_size & 0xffff); if (TARGET_POWERPC) --- 1978,1982 ---- else { ! asm_fprintf (file, "\t{liu|lis} 0,%d\n\t{oril|ori} 0,0,%d\n", (total_size >> 16) & 0xffff, total_size & 0xffff); if (TARGET_POWERPC) *************** *** 1525,1534 **** if (TARGET_MINIMAL_TOC && get_pool_size () != 0) { ! char buf[100]; ! ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 0); ! asm_fprintf (file, "\t{l|lwz} 30,"); ! assemble_name (file, buf); ! asm_fprintf (file, "(2)\n"); } } --- 1996,2047 ---- if (TARGET_MINIMAL_TOC && get_pool_size () != 0) { ! char buf[256]; ! #ifdef USING_SVR4_H ! if (TARGET_RELOCATABLE) ! { ! ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); ! fprintf (file, "\tbl "); ! assemble_name (file, buf); ! fprintf (file, "\n"); ! ! ASM_OUTPUT_INTERNAL_LABEL (file, "LCF", rs6000_pic_labelno); ! fprintf (file, "\tmflr 30\n"); ! ! if (TARGET_POWERPC64) ! fprintf (file, "\tld 0,"); ! else if (TARGET_NEW_MNEMONICS) ! fprintf (file, "\tlwz 0,"); ! else ! fprintf (file, "\tl 0,"); ! ! fprintf (file, "("); ! ASM_GENERATE_INTERNAL_LABEL (buf, "LCL", rs6000_pic_labelno); ! assemble_name (file, buf); ! fprintf (file, "-"); ! ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); ! assemble_name (file, buf); ! fprintf (file, ")(30)\n"); ! asm_fprintf (file, "\t{cax|add} 30,0,30\n"); ! rs6000_pic_labelno++; ! } ! else if (TARGET_NO_TOC) ! { ! ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); ! asm_fprintf (file, "\t{cau|addis} 30,0,"); ! assemble_name (file, buf); ! asm_fprintf (file, "@ha\n"); ! asm_fprintf (file, "\t{cal|addi} 30,30,"); ! assemble_name (file, buf); ! asm_fprintf (file, "@l\n"); ! } ! else ! #endif /* USING_SVR4_H */ ! { ! ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 0); ! asm_fprintf (file, "\t{l|lwz} 30,"); ! assemble_name (file, buf); ! asm_fprintf (file, "(2)\n"); ! } } } *************** *** 1579,1583 **** /* Restore gpr's. */ ! if (! TARGET_POWER || first_reg == 31) { int regno, loc; --- 2092,2096 ---- /* Restore gpr's. */ ! if (! TARGET_MULTIPLE || first_reg == 31) { int regno, loc; *************** *** 1611,1615 **** restore function. It will return to our caller. */ if (first_fp_reg < 62) ! asm_fprintf (file, "\tb ._restf%d\n", first_fp_reg - 32); else asm_fprintf (file, "\t{br|blr}\n"); --- 2124,2142 ---- restore function. It will return to our caller. */ if (first_fp_reg < 62) ! { ! #ifndef USING_SVR4_H ! asm_fprintf (file, "\tb %s%d%s\n", RESTORE_FP_PREFIX, first_fp_reg - 32, RESTORE_FP_SUFFIX); ! #else ! int regno, loc; ! ! for (regno = first_fp_reg, ! loc = - (64 - first_fp_reg) * 8; ! regno < 64; ! regno++, loc += 8) ! asm_fprintf (file, "\tlfd %d,%d(1)\n", regno - 32, loc); ! ! asm_fprintf (file, "\t{br|blr}\n"); ! #endif ! } else asm_fprintf (file, "\t{br|blr}\n"); *************** *** 1626,1630 **** memory.'' The traceback table has this property, since it includes the offset from the start of the function to the ! traceback table itself. */ if (! flag_inhibit_size_directive) { --- 2153,2161 ---- memory.'' The traceback table has this property, since it includes the offset from the start of the function to the ! traceback table itself. ! ! System V.4 Powerpc's (and the embedded ABI derived from it) use a ! different traceback table located before the prologue. */ ! #ifndef USING_SVR4_H if (! flag_inhibit_size_directive) { *************** *** 1804,1807 **** --- 2335,2339 ---- fprintf (file, "\t.byte 31\n"); } + #endif /* !USING_SVR4_H */ } *************** *** 1820,1824 **** int offset = 0; ! ASM_OUTPUT_INTERNAL_LABEL (file, "LC", labelno); /* Handle FP constants specially. Note that if we have a minimal --- 2352,2366 ---- int offset = 0; ! #ifdef USING_SVR4_H ! if (TARGET_MINIMAL_TOC) ! { ! ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LC"); ! fprintf (file, "%d = .-", labelno); ! ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LCTOC"); ! fprintf (file, "1\n"); ! } ! else ! #endif /* USING_SVR4_H */ ! ASM_OUTPUT_INTERNAL_LABEL (file, "LC", labelno); /* Handle FP constants specially. Note that if we have a minimal *************** *** 1827,1841 **** if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode - && TARGET_FLOAT_FORMAT == HOST_FLOAT_FORMAT - && BITS_PER_WORD == HOST_BITS_PER_INT && ! (TARGET_NO_FP_IN_TOC && ! TARGET_MINIMAL_TOC)) { if (TARGET_MINIMAL_TOC) ! fprintf (file, "\t.long %d\n\t.long %d\n", ! CONST_DOUBLE_LOW (x), CONST_DOUBLE_HIGH (x)); else ! fprintf (file, "\t.tc FD_%x_%x[TC],%d,%d\n", ! CONST_DOUBLE_LOW (x), CONST_DOUBLE_HIGH (x), ! CONST_DOUBLE_LOW (x), CONST_DOUBLE_HIGH (x)); return; } --- 2369,2384 ---- if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode && ! (TARGET_NO_FP_IN_TOC && ! TARGET_MINIMAL_TOC)) { + REAL_VALUE_TYPE r; + long l[2]; + + REAL_VALUE_FROM_CONST_DOUBLE (r, x); + REAL_VALUE_TO_TARGET_DOUBLE (r, l); if (TARGET_MINIMAL_TOC) ! fprintf (file, "\t.long %ld\n\t.long %ld\n", l[0], l[1]); else ! fprintf (file, "\t.tc FD_%lx_%lx[TC],%ld,%ld\n", ! l[0], l[1], l[0], l[1]); return; } *************** *** 2020,2023 **** --- 2563,2569 ---- int labelno; { + #ifdef USING_SVR4_H + abort (); + #else /* The last used parameter register. */ int last_parm_reg; *************** *** 2071,2074 **** --- 2617,2621 ---- for (i = 3, j = 30; i <= last_parm_reg; i++, j--) fprintf (file, "\tai %d,%d,0\n", i, j); + #endif } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/rs6000.h gcc-2.7.0/config/rs6000/rs6000.h *** gcc-2.6.3/config/rs6000/rs6000.h Thu Nov 3 18:07:48 1994 --- gcc-2.7.0/config/rs6000/rs6000.h Thu Jun 15 16:28:37 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for IBM RS/6000. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- /* Definitions of target machine for GNU compiler, for IBM RS/6000. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 46,49 **** --- 47,51 ---- #define CPP_SPEC "\ + %{posix: -D_POSIX_SOURCE} \ %{!mcpu*: \ %{mpower: %{!mpower2: -D_ARCH_PWR}} \ *************** *** 60,63 **** --- 62,68 ---- %{mcpu=rsc: -D_ARCH_PWR} \ %{mcpu=rsc1: -D_ARCH_PWR} \ + %{mcpu=403: -D_ARCH_PPC} \ + %{mcpu=mpc403: -D_ARCH_PPC} \ + %{mcpu=ppc403: -D_ARCH_PPC} \ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ %{mcpu=mpc601: -D_ARCH_PPC -D_ARCH_PWR} \ *************** *** 78,92 **** -bnodelcsect undoes a poor choice of default relating to multiply-defined ! csects. See AIX documentation for more information about this. */ #define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\ ! %{static:-bnso -bI:/lib/syscalls.exp} %{g*:-bexport:/usr/lib/libg.exp}" /* Profiled library versions are used by linking with special directories. */ #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\ ! %{p:-L/lib/profiled -L/usr/lib/profiled} %{g*:-lg} -lc" /* gcc must do the search itself to find libgcc.a, not use -l. */ ! #define LINK_LIBGCC_SPECIAL_1 /* Don't turn -B into -L if the argument specifies a relative file name. */ --- 83,102 ---- -bnodelcsect undoes a poor choice of default relating to multiply-defined ! csects. See AIX documentation for more information about this. + -bM:SRE tells the linker that the output file is Shared REusable. Note + that to actually build a shared library you will also need to specify an + export list with the -Wl,-bE option. */ + #define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\ ! %{static:-bnso -bI:/lib/syscalls.exp} \ ! %{!shared:%{g*:-bexport:/usr/lib/libg.exp}} %{shared:-bM:SRE}" /* Profiled library versions are used by linking with special directories. */ #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\ ! %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc" /* gcc must do the search itself to find libgcc.a, not use -l. */ ! #define LIBGCC_SPEC "libgcc.a%s" /* Don't turn -B into -L if the argument specifies a relative file name. */ *************** *** 135,148 **** #define MASK_MINIMAL_TOC 0x200 ! #define TARGET_POWER (target_flags & MASK_POWER) ! #define TARGET_POWER2 (target_flags & MASK_POWER2) ! #define TARGET_POWERPC (target_flags & MASK_POWERPC) ! #define TARGET_PPC_GPOPT (target_flags & MASK_PPC_GPOPT) ! #define TARGET_PPC_GFXOPT (target_flags & MASK_PPC_GFXOPT) ! #define TARGET_POWERPC64 (target_flags & MASK_POWERPC64) ! #define TARGET_NEW_MNEMONICS (target_flags & MASK_NEW_MNEMONICS) ! #define TARGET_NO_FP_IN_TOC (target_flags & MASK_NO_FP_IN_TOC) ! #define TARGET_NO_SUM_IN_TOC (target_flags & MASK_NO_SUM_IN_TOC) ! #define TARGET_MINIMAL_TOC (target_flags & MASK_MINIMAL_TOC) /* Run-time compilation parameters selecting different hardware subsets. --- 145,180 ---- #define MASK_MINIMAL_TOC 0x200 ! /* Nonzero for the 64bit model: ints, longs, and pointers are 64 bits. */ ! #define MASK_64BIT 0x400 ! ! /* Disable use of FPRs. */ ! #define MASK_SOFT_FLOAT 0x800 ! ! /* Enable load/store multiple, even on powerpc */ ! #define MASK_MULTIPLE 0x1000 ! #define MASK_MULTIPLE_SET 0x2000 ! ! /* Use string instructions for block moves */ ! #define MASK_STRING 0x4000 ! #define MASK_STRING_SET 0x8000 ! ! #define TARGET_POWER (target_flags & MASK_POWER) ! #define TARGET_POWER2 (target_flags & MASK_POWER2) ! #define TARGET_POWERPC (target_flags & MASK_POWERPC) ! #define TARGET_PPC_GPOPT (target_flags & MASK_PPC_GPOPT) ! #define TARGET_PPC_GFXOPT (target_flags & MASK_PPC_GFXOPT) ! #define TARGET_POWERPC64 (target_flags & MASK_POWERPC64) ! #define TARGET_NEW_MNEMONICS (target_flags & MASK_NEW_MNEMONICS) ! #define TARGET_NO_FP_IN_TOC (target_flags & MASK_NO_FP_IN_TOC) ! #define TARGET_NO_SUM_IN_TOC (target_flags & MASK_NO_SUM_IN_TOC) ! #define TARGET_MINIMAL_TOC (target_flags & MASK_MINIMAL_TOC) ! #define TARGET_64BIT (target_flags & MASK_64BIT) ! #define TARGET_SOFT_FLOAT (target_flags & MASK_SOFT_FLOAT) ! #define TARGET_MULTIPLE (target_flags & MASK_MULTIPLE) ! #define TARGET_MULTIPLE_SET (target_flags & MASK_MULTIPLE_SET) ! #define TARGET_STRING (target_flags & MASK_STRING) ! #define TARGET_STRING_SET (target_flags & MASK_STRING_SET) ! ! #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) /* Run-time compilation parameters selecting different hardware subsets. *************** *** 154,183 **** An empty string NAME is used to identify the default VALUE. */ ! #define TARGET_SWITCHES \ ! {{"power", MASK_POWER}, \ ! {"power2", MASK_POWER | MASK_POWER2}, \ ! {"no-power2", - MASK_POWER2}, \ ! {"no-power", - (MASK_POWER | MASK_POWER2)}, \ ! {"powerpc", MASK_POWERPC}, \ ! {"no-powerpc", - (MASK_POWERPC | MASK_PPC_GPOPT \ ! | MASK_PPC_GFXOPT | MASK_POWERPC64)}, \ ! {"powerpc-gpopt", MASK_POWERPC | MASK_PPC_GPOPT}, \ ! {"no-powerpc-gpopt", - MASK_PPC_GPOPT}, \ ! {"powerpc-gfxopt", MASK_POWERPC | MASK_PPC_GFXOPT}, \ ! {"no-powerpc-gfxopt", - MASK_PPC_GFXOPT}, \ ! {"new-mnemonics", MASK_NEW_MNEMONICS}, \ ! {"old-mnemonics", -MASK_NEW_MNEMONICS}, \ ! {"full-toc", - (MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC \ ! | MASK_MINIMAL_TOC)}, \ ! {"fp-in-toc", - MASK_NO_FP_IN_TOC}, \ ! {"no-fp-in-toc", MASK_NO_FP_IN_TOC}, \ ! {"sum-in-toc", - MASK_NO_SUM_IN_TOC}, \ ! {"no-sum-in-toc", MASK_NO_SUM_IN_TOC}, \ ! {"minimal-toc", MASK_MINIMAL_TOC}, \ ! {"minimal-toc", - (MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC)}, \ ! {"no-minimal-toc", - MASK_MINIMAL_TOC}, \ {"", TARGET_DEFAULT}} ! #define TARGET_DEFAULT MASK_POWER /* Processor type. */ --- 186,231 ---- An empty string NAME is used to identify the default VALUE. */ ! /* This is meant to be redefined in the host dependent files */ ! #ifndef SUBTARGET_SWITCHES ! #define SUBTARGET_SWITCHES ! #endif ! ! #define TARGET_SWITCHES \ ! {{"power", MASK_POWER | MASK_MULTIPLE | MASK_STRING}, \ ! {"power2", (MASK_POWER | MASK_MULTIPLE | MASK_STRING \ ! | MASK_POWER2)}, \ ! {"no-power2", - MASK_POWER2}, \ ! {"no-power", - (MASK_POWER | MASK_POWER2 | MASK_MULTIPLE \ ! | MASK_STRING)}, \ ! {"powerpc", MASK_POWERPC}, \ ! {"no-powerpc", - (MASK_POWERPC | MASK_PPC_GPOPT \ ! | MASK_PPC_GFXOPT | MASK_POWERPC64)}, \ ! {"powerpc-gpopt", MASK_POWERPC | MASK_PPC_GPOPT}, \ ! {"no-powerpc-gpopt", - MASK_PPC_GPOPT}, \ ! {"powerpc-gfxopt", MASK_POWERPC | MASK_PPC_GFXOPT}, \ ! {"no-powerpc-gfxopt", - MASK_PPC_GFXOPT}, \ ! {"new-mnemonics", MASK_NEW_MNEMONICS}, \ ! {"old-mnemonics", -MASK_NEW_MNEMONICS}, \ ! {"full-toc", - (MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC \ ! | MASK_MINIMAL_TOC)}, \ ! {"fp-in-toc", - MASK_NO_FP_IN_TOC}, \ ! {"no-fp-in-toc", MASK_NO_FP_IN_TOC}, \ ! {"sum-in-toc", - MASK_NO_SUM_IN_TOC}, \ ! {"no-sum-in-toc", MASK_NO_SUM_IN_TOC}, \ ! {"minimal-toc", MASK_MINIMAL_TOC}, \ ! {"minimal-toc", - (MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC)}, \ ! {"no-minimal-toc", - MASK_MINIMAL_TOC}, \ ! {"hard-float", - MASK_SOFT_FLOAT}, \ ! {"soft-float", MASK_SOFT_FLOAT}, \ ! {"multiple", MASK_MULTIPLE | MASK_MULTIPLE_SET}, \ ! {"no-multiple", - MASK_MULTIPLE}, \ ! {"no-multiple", MASK_MULTIPLE_SET}, \ ! {"string", MASK_STRING | MASK_STRING_SET}, \ ! {"no-string", - MASK_STRING}, \ ! {"no-string", MASK_STRING_SET}, \ ! SUBTARGET_SWITCHES \ {"", TARGET_DEFAULT}} ! #define TARGET_DEFAULT (MASK_POWER | MASK_MULTIPLE | MASK_STRING) /* Processor type. */ *************** *** 185,188 **** --- 233,237 ---- {PROCESSOR_RIOS1, PROCESSOR_RIOS2, + PROCESSOR_PPC403, PROCESSOR_PPC601, PROCESSOR_PPC603, *************** *** 244,247 **** --- 293,299 ---- /* target machine storage layout */ + /* Define to support cross compilation to an RS6000 target. */ + #define REAL_ARITHMETIC + /* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, *************** *** 278,285 **** 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 /* Type used for ptrdiff_t, as a string used in a declaration. */ --- 330,340 ---- 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 (TARGET_POWERPC64 ? 64 : 32) ! #define MAX_BITS_PER_WORD 64 /* Width of a word, in units (bytes). */ ! #define UNITS_PER_WORD (TARGET_POWERPC64 ? 8 : 4) ! #define MIN_UNITS_PER_WORD 4 ! #define UNITS_PER_FP_WORD 8 /* Type used for ptrdiff_t, as a string used in a declaration. */ *************** *** 292,301 **** #define WCHAR_TYPE_SIZE 16 /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ ! #define POINTER_SIZE 32 /* Allocation boundary (in *bits*) for storing arguments in argument list. */ ! #define PARM_BOUNDARY 32 /* Boundary (in *bits*) on which stack pointer should be aligned. */ --- 347,400 ---- #define WCHAR_TYPE_SIZE 16 + /* A C expression for the size in bits of the type `short' on the + target machine. If you don't define this, the default is half a + word. (If this would be less than one storage unit, it is + rounded up to one unit.) */ + #define SHORT_TYPE_SIZE 16 + + /* A C expression for the size in bits of the type `int' on the + target machine. If you don't define this, the default is one + word. */ + #define INT_TYPE_SIZE (TARGET_64BIT ? 64 : 32) + #define MAX_INT_TYPE_SIZE 64 + + /* A C expression for the size in bits of the type `long' on the + target machine. If you don't define this, the default is one + word. */ + #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32) + #define MAX_LONG_TYPE_SIZE 64 + + /* A C expression for the size in bits of the type `long long' on the + target machine. If you don't define this, the default is two + words. */ + #define LONG_LONG_TYPE_SIZE 64 + + /* A C expression for the size in bits of the type `char' on the + target machine. If you don't define this, the default is one + quarter of a word. (If this would be less than one storage unit, + it is rounded up to one unit.) */ + #define CHAR_TYPE_SIZE BITS_PER_UNIT + + /* A C expression for the size in bits of the type `float' on the + target machine. If you don't define this, the default is one + word. */ + #define FLOAT_TYPE_SIZE 32 + + /* A C expression for the size in bits of the type `double' on the + target machine. If you don't define this, the default is two + words. */ + #define DOUBLE_TYPE_SIZE 64 + + /* A C expression for the size in bits of the type `long double' on + the target machine. If you don't define this, the default is two + words. */ + #define LONG_DOUBLE_TYPE_SIZE 64 + /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ ! #define POINTER_SIZE (TARGET_64BIT ? 64 : 32) /* Allocation boundary (in *bits*) for storing arguments in argument list. */ ! #define PARM_BOUNDARY (TARGET_64BIT ? 64 : 32) /* Boundary (in *bits*) on which stack pointer should be aligned. */ *************** *** 306,310 **** /* No data type wants to be aligned rounder than this. */ ! #define BIGGEST_ALIGNMENT 32 /* Alignment of field after `int : 0' in a structure. */ --- 405,409 ---- /* No data type wants to be aligned rounder than this. */ ! #define BIGGEST_ALIGNMENT (TARGET_64BIT ? 64 : 32) /* Alignment of field after `int : 0' in a structure. */ *************** *** 356,363 **** On RS/6000, r1 is used for the stack and r2 is used as the TOC pointer. ! cr5 is not supposed to be used. */ #define FIXED_REGISTERS \ ! {0, 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, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ --- 455,468 ---- On RS/6000, r1 is used for the stack and r2 is used as the TOC pointer. ! cr5 is not supposed to be used. ! ! On System V implementations, r13 is fixed and not available for use. */ ! ! #ifndef FIXED_R13 ! #define FIXED_R13 0 ! #endif #define FIXED_REGISTERS \ ! {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FIXED_R13, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ *************** *** 373,377 **** #define CALL_USED_REGISTERS \ ! {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, 0, 0, 0, 0, 0, 0, 0, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \ --- 478,482 ---- #define CALL_USED_REGISTERS \ ! {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, FIXED_R13, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \ *************** *** 435,439 **** #define HARD_REGNO_NREGS(REGNO, MODE) \ (FP_REGNO_P (REGNO) \ ! ? ((GET_MODE_SIZE (MODE) + 2 * UNITS_PER_WORD - 1) / (2 * UNITS_PER_WORD)) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) --- 540,544 ---- #define HARD_REGNO_NREGS(REGNO, MODE) \ (FP_REGNO_P (REGNO) \ ! ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) *************** *** 448,452 **** (GET_MODE_CLASS (MODE) == MODE_FLOAT \ || (GET_MODE_CLASS (MODE) == MODE_INT \ ! && GET_MODE_SIZE (MODE) == 2 * UNITS_PER_WORD)) \ : CR_REGNO_P (REGNO) ? GET_MODE_CLASS (MODE) == MODE_CC \ : ! INT_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_INT \ --- 553,557 ---- (GET_MODE_CLASS (MODE) == MODE_FLOAT \ || (GET_MODE_CLASS (MODE) == MODE_INT \ ! && GET_MODE_SIZE (MODE) == UNITS_PER_FP_WORD)) \ : CR_REGNO_P (REGNO) ? GET_MODE_CLASS (MODE) == MODE_CC \ : ! INT_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_INT \ *************** *** 480,486 **** : (CLASS1) != FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 10 \ : (((CLASS1) == SPECIAL_REGS || (CLASS1) == MQ_REGS \ ! || (CLASS1) == LINK_REGS || (CLASS1) == CTR_REGS) \ && ((CLASS2) == SPECIAL_REGS || (CLASS2) == MQ_REGS \ ! || (CLASS2) == LINK_REGS || (CLASS2) == CTR_REGS)) ? 10 \ : 2) --- 585,593 ---- : (CLASS1) != FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 10 \ : (((CLASS1) == SPECIAL_REGS || (CLASS1) == MQ_REGS \ ! || (CLASS1) == LINK_REGS || (CLASS1) == CTR_REGS \ ! || (CLASS1) == LINK_OR_CTR_REGS) \ && ((CLASS2) == SPECIAL_REGS || (CLASS2) == MQ_REGS \ ! || (CLASS2) == LINK_REGS || (CLASS2) == CTR_REGS \ ! || (CLASS2) == LINK_OR_CTR_REGS)) ? 10 \ : 2) *************** *** 516,524 **** /* Define this macro to change register usage conditional on target flags. Set MQ register fixed (already call_used) if not POWER architecture ! (RIOS1, RIOS2, RSC, and PPC601) so that it will not be allocated. */ ! #define CONDITIONAL_REGISTER_USAGE \ ! if (!TARGET_POWER) \ ! fixed_regs[64] = 1; /* Specify the registers used for certain standard purposes. --- 623,637 ---- /* Define this macro to change register usage conditional on target flags. Set MQ register fixed (already call_used) if not POWER architecture ! (RIOS1, RIOS2, RSC, and PPC601) so that it will not be allocated. ! Conditionally disable FPRs. */ ! #define CONDITIONAL_REGISTER_USAGE \ ! { \ ! if (! TARGET_POWER) \ ! fixed_regs[64] = 1; \ ! if (TARGET_SOFT_FLOAT) \ ! for (i = 32; i < 64; i++) \ ! fixed_regs[i] = call_used_regs[i] = 1; \ ! } /* Specify the registers used for certain standard purposes. *************** *** 683,687 **** #define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \ ! : (C) == 'R' ? GET_CODE (OP) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (OP)\ : 0) --- 796,800 ---- #define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \ ! : (C) == 'R' ? LEGITIMATE_CONSTANT_POOL_ADDRESS_P (OP) \ : 0) *************** *** 719,723 **** #define CLASS_MAX_NREGS(CLASS, MODE) \ ((CLASS) == FLOAT_REGS \ ! ? ((GET_MODE_SIZE (MODE) + 2 * UNITS_PER_WORD - 1) / (2 * UNITS_PER_WORD)) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) --- 832,836 ---- #define CLASS_MAX_NREGS(CLASS, MODE) \ ((CLASS) == FLOAT_REGS \ ! ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) *************** *** 751,755 **** outgoing parameter area. */ ! #define STARTING_FRAME_OFFSET (current_function_outgoing_args_size + 24) /* If we generate an insn to push BYTES bytes, --- 864,869 ---- outgoing parameter area. */ ! #define STARTING_FRAME_OFFSET (current_function_outgoing_args_size \ ! + (TARGET_64BIT ? 48 : 24)) /* If we generate an insn to push BYTES bytes, *************** *** 761,770 **** On the RS/6000, we define the argument pointer to the start of the fixed area. */ ! #define FIRST_PARM_OFFSET(FNDECL) 24 /* Define this if stack space is still allocated for a parameter passed in a register. The value is the number of bytes allocated to this area. */ ! #define REG_PARM_STACK_SPACE(FNDECL) 32 /* Define this if the above stack space is to be considered part of the --- 875,884 ---- On the RS/6000, we define the argument pointer to the start of the fixed area. */ ! #define FIRST_PARM_OFFSET(FNDECL) (TARGET_64BIT ? 48 : 24) /* Define this if stack space is still allocated for a parameter passed in a register. The value is the number of bytes allocated to this area. */ ! #define REG_PARM_STACK_SPACE(FNDECL) (TARGET_64BIT ? 64 : 32) /* Define this if the above stack space is to be considered part of the *************** *** 775,779 **** For the RS/6000, sp points past the fixed area. */ ! #define STACK_POINTER_OFFSET 24 /* Define this if the maximum size of all the outgoing args is to be --- 889,893 ---- For the RS/6000, sp points past the fixed area. */ ! #define STACK_POINTER_OFFSET (TARGET_64BIT ? 48 : 24) /* Define this if the maximum size of all the outgoing args is to be *************** *** 784,792 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 898,907 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 796,804 **** On RS/6000 an integer value is in r3 and a floating-point value is in ! fp1. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx (REG, TYPE_MODE (VALTYPE), \ ! TREE_CODE (VALTYPE) == REAL_TYPE ? 33 : 3) /* Define how to find the value returned by a library function --- 911,919 ---- On RS/6000 an integer value is in r3 and a floating-point value is in ! fp1, unless -msoft-float. */ #define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx (REG, TYPE_MODE (VALTYPE), \ ! TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_HARD_FLOAT ? 33 : 3) /* Define how to find the value returned by a library function *************** *** 806,810 **** #define LIBCALL_VALUE(MODE) \ ! gen_rtx (REG, MODE, GET_MODE_CLASS (MODE) == MODE_FLOAT ? 33 : 3) /* The definition of this macro implies that there are cases where --- 921,925 ---- #define LIBCALL_VALUE(MODE) \ ! gen_rtx (REG, MODE, GET_MODE_CLASS (MODE) == MODE_FLOAT && TARGET_HARD_FLOAT ? 33 : 3) /* The definition of this macro implies that there are cases where *************** *** 889,893 **** /* Non-zero if we can use a floating-point register to pass this arg. */ #define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ ! (GET_MODE_CLASS (MODE) == MODE_FLOAT && (CUM).fregno < 46) /* Determine where to put an argument to a function. --- 1004,1008 ---- /* Non-zero if we can use a floating-point register to pass this arg. */ #define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ ! (GET_MODE_CLASS (MODE) == MODE_FLOAT && (CUM).fregno < 46 && TARGET_HARD_FLOAT) /* Determine where to put an argument to a function. *************** *** 1049,1052 **** --- 1164,1188 ---- } + /* Definitions for __builtin_return_address and __builtin_frame_address. + __builtin_return_address (0) should give link register (65), enable + this. */ + /* This should be uncommented, so that the link register is used, but + currently this would result in unmatched insns and spilling fixed + registers so we'll leave it for another day. When these problems are + taken care of one additional fetch will be necessary in RETURN_ADDR_RTX. + (mrs) */ + /* #define RETURN_ADDR_IN_PREVIOUS_FRAME */ + /* The current return address is in link register (65). The return address + of anything farther back is accessed normally at an offset of 8 from the + frame pointer. */ + #define RETURN_ADDR_RTX(count, frame) \ + ((count == -1) \ + ? gen_rtx (REG, Pmode, 65) \ + : copy_to_reg (gen_rtx (MEM, Pmode, \ + memory_address (Pmode, \ + plus_constant (copy_to_reg (gen_rtx (MEM, Pmode, \ + memory_address (Pmode, frame))), \ + 8))))) + /* Definitions for register eliminations. *************** *** 1261,1264 **** --- 1397,1401 ---- goto ADDR; \ if ((MODE) != DImode && (MODE) != TImode \ + && (TARGET_HARD_FLOAT || (MODE) != DFmode) \ && LEGITIMATE_INDEXED_ADDRESS_P (X)) \ goto ADDR; \ *************** *** 1307,1310 **** --- 1444,1448 ---- else if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == REG \ && GET_CODE (XEXP (X, 1)) != CONST_INT \ + && (TARGET_HARD_FLOAT || (MODE) != DFmode) \ && (MODE) != DImode && (MODE) != TImode) \ { \ *************** *** 1365,1369 **** /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ ! #define MOVE_MAX 16 /* Nonzero if access to memory by bytes is no faster than for words. --- 1503,1508 ---- /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ ! #define MOVE_MAX (TARGET_POWERPC64 ? 8 : 4) ! #define MAX_MOVE_MAX 8 /* Nonzero if access to memory by bytes is no faster than for words. *************** *** 1412,1421 **** After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ ! #define Pmode SImode /* Mode of a function address in a call instruction (for indexing purposes). Doesn't matter on RS/6000. */ ! #define FUNCTION_MODE SImode /* Define this if addresses of constant functions --- 1551,1560 ---- After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ ! #define Pmode (TARGET_64BIT ? DImode : SImode) /* Mode of a function address in a call instruction (for indexing purposes). Doesn't matter on RS/6000. */ ! #define FUNCTION_MODE (TARGET_64BIT ? DImode : SImode) /* Define this if addresses of constant functions *************** *** 1442,1446 **** return it with a return statement. Otherwise, break from the switch. ! On the RS/6000, if it is legal in the insn, it is free. So this always returns 0. */ --- 1581,1585 ---- return it with a return statement. Otherwise, break from the switch. ! On the RS/6000, if it is valid in the insn, it is free. So this always returns 0. */ *************** *** 1470,1473 **** --- 1609,1613 ---- case PROCESSOR_PPC603: \ return COSTS_N_INSNS (5); \ + case PROCESSOR_PPC403: \ case PROCESSOR_PPC604: \ case PROCESSOR_PPC620: \ *************** *** 1488,1491 **** --- 1628,1633 ---- case PROCESSOR_RIOS2: \ return COSTS_N_INSNS (13); \ + case PROCESSOR_PPC403: \ + return COSTS_N_INSNS (33); \ case PROCESSOR_PPC601: \ return COSTS_N_INSNS (36); \ *************** *** 1496,1499 **** --- 1638,1643 ---- return COSTS_N_INSNS (20); \ } \ + case FFS: \ + return COSTS_N_INSNS (4); \ case MEM: \ /* MEM should be slightly more expensive than (plus (reg) (const)) */ \ *************** *** 1559,1562 **** --- 1703,1719 ---- #define RS6000_ITRUNC "itrunc" #define RS6000_UITRUNC "uitrunc" + + /* Prefix and suffix to use to saving floating point */ + #ifndef SAVE_FP_PREFIX + #define SAVE_FP_PREFIX "._savef" + #define SAVE_FP_SUFFIX "" + #endif + + /* Prefix and suffix to use to restoring floating point */ + #ifndef RESTORE_FP_PREFIX + #define RESTORE_FP_PREFIX "._restf" + #define RESTORE_FP_SUFFIX "" + #endif + /* Control the assembler format that we output. */ *************** *** 1806,1810 **** if ((TREE_CODE (EXP) == STRING_CST \ && !flag_writable_strings) \ ! || (TREE_READONLY (EXP) && ! TREE_THIS_VOLATILE (EXP) \ && DECL_INITIAL (EXP) \ && (DECL_INITIAL (EXP) == error_mark_node \ --- 1963,1968 ---- if ((TREE_CODE (EXP) == STRING_CST \ && !flag_writable_strings) \ ! || (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'd' \ ! && TREE_READONLY (EXP) && ! TREE_THIS_VOLATILE (EXP) \ && DECL_INITIAL (EXP) \ && (DECL_INITIAL (EXP) == error_mark_node \ *************** *** 1829,1844 **** #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ ! if ((NAME)[0] == '*' || (NAME)[strlen (NAME) - 1] != ']') \ ! assemble_name (FILE, NAME); \ ! else \ ! { \ ! int _len = strlen (NAME); \ ! char *_p = alloca (_len + 1); \ \ ! strcpy (_p, NAME); \ ! _p[_len - 4] = '\0'; \ ! assemble_name (FILE, _p); \ ! } /* Output something to declare an external symbol to the assembler. Most assemblers don't need this. --- 1987,2017 ---- #define RS6000_OUTPUT_BASENAME(FILE, NAME) \ ! { \ ! char *_p; \ \ ! STRIP_NAME_ENCODING (_p, (NAME)); \ ! assemble_name ((FILE), _p); \ ! } + /* Remove any trailing [DS] or the like from the symbol name. */ + + #define STRIP_NAME_ENCODING(VAR,NAME) \ + do \ + { \ + if ((NAME)[0] == '*') \ + (VAR) = (NAME)+1; \ + else if ((NAME)[strlen (NAME) - 1] != ']') \ + (VAR) = (NAME); \ + else \ + { \ + int _len = strlen (NAME); \ + (VAR) = alloca (_len + 1); \ + \ + strcpy ((VAR), NAME); \ + (VAR)[_len - 4] = '\0'; \ + } \ + } \ + while (0) + /* Output something to declare an external symbol to the assembler. Most assemblers don't need this. *************** *** 2177,2180 **** --- 2350,2355 ---- {"easy_fp_constant", {CONST_DOUBLE}}, \ {"reg_or_mem_operand", {SUBREG, MEM, REG}}, \ + {"lwa_operand", {SUBREG, MEM, REG}}, \ + {"low_32_bit_operand", {CONST_DOUBLE, CONST_INT}}, \ {"fp_reg_or_mem_operand", {SUBREG, MEM, REG}}, \ {"mem_or_easy_const_operand", {SUBREG, MEM, CONST_DOUBLE}}, \ *************** *** 2195,2196 **** --- 2370,2430 ---- {"scc_comparison_operator", {EQ, NE, LE, LT, GE, \ GT, LEU, LTU, GEU, GTU}}, + + /* Declare functions in rs6000.c */ + extern void rs6000_override_options (); + extern struct rtx_def *rs6000_immed_double_const (); + extern int direct_return (); + extern int any_operand (); + extern int short_cint_operand (); + extern int u_short_cint_operand (); + extern int non_short_cint_operand (); + extern int gpc_reg_operand (); + extern int cc_reg_operand (); + extern int reg_or_short_operand (); + extern int reg_or_neg_short_operand (); + extern int reg_or_u_short_operand (); + extern int reg_or_cint_operand (); + extern int easy_fp_constant (); + extern int low_32_bit_operand (); + extern int fp_reg_or_mem_operand (); + extern int mem_or_easy_const_operand (); + extern int add_operand (); + extern int non_add_cint_operand (); + extern int logical_operand (); + extern int non_logical_operand (); + extern int mask_constant (); + extern int mask_operand (); + extern int and_operand (); + extern int non_and_cint_operand (); + extern int reg_or_mem_operand (); + extern int lwa_operand (); + extern int call_operand (); + extern int current_file_function_operand (); + extern int input_operand (); + extern int expand_block_move (); + extern int load_multiple_operation (); + extern int store_multiple_operation (); + extern int branch_comparison_operator (); + extern int scc_comparison_operator (); + extern int includes_lshift_p (); + extern int includes_rshift_p (); + extern int registers_ok_for_quad_peep (); + extern int addrs_ok_for_quad_peep (); + extern enum reg_class secondary_reload_class (); + extern int ccr_bit (); + extern void print_operand (); + extern void print_operand_address (); + extern int first_reg_to_save (); + extern int first_fp_reg_to_save (); + extern int must_save_cr (); + extern int rs6000_sa_size (); + extern int rs6000_makes_calls (); + extern int rs6000_pushes_stack (); + extern void svr4_traceback (); + extern void output_prolog (); + extern void output_epilog (); + extern void output_toc (); + extern void output_ascii (); + extern void rs6000_gen_section_name (); + extern void output_function_profiler (); + extern int rs6000_adjust_cost (); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/rs6000.md gcc-2.7.0/config/rs6000/rs6000.md *** gcc-2.6.3/config/rs6000/rs6000.md Thu Nov 10 15:41:24 1994 --- gcc-2.7.0/config/rs6000/rs6000.md Thu Jun 15 16:56:45 1995 *************** *** 1,4 **** ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ! ;; Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ! ;; Copyright (C) 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** ;; 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. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. *************** *** 40,44 **** ;; enumeration in rs6000.h. ! (define_attr "cpu" "rios1,rios2,ppc601,ppc603,ppc604,ppc620" (const (symbol_ref "rs6000_cpu_attr"))) --- 41,45 ---- ;; enumeration in rs6000.h. ! (define_attr "cpu" "rios1,rios2,ppc403,ppc601,ppc603,ppc604,ppc620" (const (symbol_ref "rs6000_cpu_attr"))) *************** *** 60,64 **** (define_function_unit "iu" 1 0 (and (eq_attr "type" "load") ! (eq_attr "cpu" "rios1,ppc601")) 2 0) --- 61,65 ---- (define_function_unit "iu" 1 0 (and (eq_attr "type" "load") ! (eq_attr "cpu" "rios1,ppc403,ppc601")) 2 0) *************** *** 77,80 **** --- 78,86 ---- (define_function_unit "iu" 1 0 (and (eq_attr "type" "imul") + (eq_attr "cpu" "ppc403")) + 4 4) + + (define_function_unit "iu" 1 0 + (and (eq_attr "type" "imul") (eq_attr "cpu" "ppc601,ppc603")) 5 5) *************** *** 87,90 **** --- 93,101 ---- (define_function_unit "iu" 1 0 (and (eq_attr "type" "idiv") + (eq_attr "cpu" "ppc403")) + 33 33) + + (define_function_unit "iu" 1 0 + (and (eq_attr "type" "idiv") (eq_attr "cpu" "ppc601")) 36 36) *************** *** 161,165 **** (define_function_unit "bpu" 1 0 (and (eq_attr "type" "mtjmpr") ! (eq_attr "cpu" "ppc601,ppc603,ppc604,ppc620")) 4 0) --- 172,176 ---- (define_function_unit "bpu" 1 0 (and (eq_attr "type" "mtjmpr") ! (eq_attr "cpu" "ppc403,ppc601,ppc603,ppc604,ppc620")) 4 0) *************** *** 423,427 **** (define_insn "" [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r") ! (sign_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r")))] "TARGET_POWERPC64" "@ --- 434,438 ---- (define_insn "" [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r") ! (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))] "TARGET_POWERPC64" "@ *************** *** 745,749 **** {ai.|addic.} %3,%1,%2" [(set_attr "type" "compare")]) ! (define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x,x") --- 756,760 ---- {ai.|addic.} %3,%1,%2" [(set_attr "type" "compare")]) ! (define_insn "" [(set (match_operand:CC 3 "cc_reg_operand" "=x,x") *************** *** 758,762 **** {ai.|addic.} %0,%1,%2" [(set_attr "type" "compare")]) ! ;; Split an add that we can't do in one insn into two insns, each of which ;; does one 16-bit part. This is used by combine. Note that the low-order --- 769,773 ---- {ai.|addic.} %0,%1,%2" [(set_attr "type" "compare")]) ! ;; Split an add that we can't do in one insn into two insns, each of which ;; does one 16-bit part. This is used by combine. Note that the low-order *************** *** 937,943 **** (define_expand "uminsi3" [(set (match_dup 3) (xor:SI (match_operand:SI 1 "gpc_reg_operand" "") ! (const_int -2147483648))) (set (match_dup 4) (xor:SI (match_operand:SI 2 "gpc_reg_operand" "") ! (const_int -2147483648))) (set (match_dup 3) (if_then_else:SI (gt (match_dup 3) (match_dup 4)) (const_int 0) --- 948,954 ---- (define_expand "uminsi3" [(set (match_dup 3) (xor:SI (match_operand:SI 1 "gpc_reg_operand" "") ! (match_dup 5))) (set (match_dup 4) (xor:SI (match_operand:SI 2 "gpc_reg_operand" "") ! (match_dup 5))) (set (match_dup 3) (if_then_else:SI (gt (match_dup 3) (match_dup 4)) (const_int 0) *************** *** 947,957 **** "TARGET_POWER" " ! { operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (SImode); }") (define_expand "umaxsi3" [(set (match_dup 3) (xor:SI (match_operand:SI 1 "gpc_reg_operand" "") ! (const_int -2147483648))) (set (match_dup 4) (xor:SI (match_operand:SI 2 "gpc_reg_operand" "") ! (const_int -2147483648))) (set (match_dup 3) (if_then_else:SI (gt (match_dup 3) (match_dup 4)) (const_int 0) --- 958,972 ---- "TARGET_POWER" " ! { ! operands[3] = gen_reg_rtx (SImode); ! operands[4] = gen_reg_rtx (SImode); ! operands[5] = GEN_INT (-2147483647 - 1); ! }") (define_expand "umaxsi3" [(set (match_dup 3) (xor:SI (match_operand:SI 1 "gpc_reg_operand" "") ! (match_dup 5))) (set (match_dup 4) (xor:SI (match_operand:SI 2 "gpc_reg_operand" "") ! (match_dup 5))) (set (match_dup 3) (if_then_else:SI (gt (match_dup 3) (match_dup 4)) (const_int 0) *************** *** 961,965 **** "TARGET_POWER" " ! { operands[3] = gen_reg_rtx (SImode); operands[4] = gen_reg_rtx (SImode); }") (define_insn "" --- 976,984 ---- "TARGET_POWER" " ! { ! operands[3] = gen_reg_rtx (SImode); ! operands[4] = gen_reg_rtx (SImode); ! operands[5] = GEN_INT (-2147483647 - 1); ! }") (define_insn "" *************** *** 1003,1007 **** ;; We don't need abs with condition code because such comparisons should ;; never be done. ! (define_insn "abssi2" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] --- 1022,1039 ---- ;; We don't need abs with condition code because such comparisons should ;; never be done. ! (define_expand "abssi2" ! [(set (match_operand:SI 0 "gpc_reg_operand" "") ! (abs:SI (match_operand:SI 1 "gpc_reg_operand" "")))] ! "" ! " ! { ! if (!TARGET_POWER) ! { ! emit_insn (gen_abssi2_nopower (operands[0], operands[1])); ! DONE; ! } ! }") ! ! (define_insn "abssi2_power" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] *************** *** 1009,1012 **** --- 1041,1067 ---- "abs %0,%1") + (define_insn "abssi2_nopower" + [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") + (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0"))) + (clobber (match_scratch:SI 2 "=&r,&r"))] + "!TARGET_POWER" + "* + { + return (TARGET_POWERPC) + ? \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%2,%0\" + : \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;{sf|subfc} %0,%2,%0\"; + }" + [(set_attr "length" "12")]) + + (define_split + [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") + (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0"))) + (clobber (match_scratch:SI 2 "=&r,&r"))] + "!TARGET_POWER && reload_completed" + [(set (match_dup 2) (ashiftrt:SI (match_dup 1) (const_int 31))) + (set (match_dup 0) (xor:SI (match_dup 2) (match_dup 1))) + (set (match_dup 0) (minus:SI (match_dup 2) (match_dup 0)))] + "") + (define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") *************** *** 1015,1018 **** --- 1070,1096 ---- "nabs %0,%1") + (define_insn "" + [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") + (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0")))) + (clobber (match_scratch:SI 2 "=&r,&r"))] + "!TARGET_POWER" + "* + { + return (TARGET_POWERPC) + ? \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%0,%2\" + : \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;{sf|subfc} %0,%0,%2\"; + }" + [(set_attr "length" "12")]) + + (define_split + [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,r") + (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0")))) + (clobber (match_scratch:SI 2 "=&r,&r"))] + "!TARGET_POWER && reload_completed" + [(set (match_dup 2) (ashiftrt:SI (match_dup 1) (const_int 31))) + (set (match_dup 0) (xor:SI (match_dup 2) (match_dup 1))) + (set (match_dup 0) (minus:SI (match_dup 0) (match_dup 2)))] + "") + (define_insn "negsi2" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") *************** *** 1041,1046 **** (define_insn "ffssi2" ! [(set (match_operand:SI 0 "register_operand" "=&r") ! (ffs:SI (match_operand:SI 1 "register_operand" "r")))] "" "neg %0,%1\;and %0,%0,%1\;{cntlz|cntlzw} %0,%0\;{sfi|subfic} %0,%0,32" --- 1119,1124 ---- (define_insn "ffssi2" ! [(set (match_operand:SI 0 "gpc_reg_operand" "=&r") ! (ffs:SI (match_operand:SI 1 "gpc_reg_operand" "r")))] "" "neg %0,%1\;and %0,%0,%1\;{cntlz|cntlzw} %0,%0\;{sfi|subfic} %0,%0,32" *************** *** 1377,1381 **** ;; AIX architecture-independent common-mode multiply (DImode), ;; divide/modulus, and quotient subroutine calls. Input operands in R3 and ! ;; R4; results in R3 and somtimes R4; link register always clobbered by bla ;; instruction; R0 sometimes clobbered; also, MQ sometimes clobbered but ;; assumed unused if generating common-mode, so ignore. --- 1455,1459 ---- ;; AIX architecture-independent common-mode multiply (DImode), ;; divide/modulus, and quotient subroutine calls. Input operands in R3 and ! ;; R4; results in R3 and sometimes R4; link register always clobbered by bla ;; instruction; R0 sometimes clobbered; also, MQ sometimes clobbered but ;; assumed unused if generating common-mode, so ignore. *************** *** 1765,1769 **** (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r") (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")) (match_operand:SI 1 "gpc_reg_operand" "0")) --- 1843,1847 ---- (define_insn "" ! [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")) (match_operand:SI 1 "gpc_reg_operand" "0")) *************** *** 1814,1818 **** (match_dup 2))) (const_int 0))) ! (set (match_operand:SI 0 "register_operand" "=r") (ior:SI (and:SI (not:SI (match_dup 2)) (match_dup 1)) (and:SI (match_dup 3) (match_dup 2))))] --- 1892,1896 ---- (match_dup 2))) (const_int 0))) ! (set (match_operand:SI 0 "gpc_reg_operand" "=r") (ior:SI (and:SI (not:SI (match_dup 2)) (match_dup 1)) (and:SI (match_dup 3) (match_dup 2))))] *************** *** 1853,1857 **** ;; Rotate and shift insns, in all their variants. These support shifts, ;; field inserts and extracts, and various combinations thereof. ! (define_insn "insv" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") --- 1931,1935 ---- ;; Rotate and shift insns, in all their variants. These support shifts, ;; field inserts and extracts, and various combinations thereof. ! (define_expand "insv" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") (match_operand:SI 1 "const_int_operand" "i") *************** *** 1859,1862 **** --- 1937,1956 ---- (match_operand:SI 3 "gpc_reg_operand" "r"))] "" + " + { + /* Do not handle 16/8 bit structures that fit in HI/QI modes directly, since + the (SUBREG:SI (REG:HI xxx)) that is otherwise generated can confuse the + compiler if the address of the structure is taken later. */ + if (GET_CODE (operands[0]) == SUBREG + && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (operands[0]))) < UNITS_PER_WORD)) + FAIL; + }") + + (define_insn "" + [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") + (match_operand:SI 1 "const_int_operand" "i") + (match_operand:SI 2 "const_int_operand" "i")) + (match_operand:SI 3 "gpc_reg_operand" "r"))] + "" "* { *************** *** 1869,1873 **** }") ! (define_insn "extzv" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") --- 1963,2059 ---- }") ! (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") ! (match_operand:SI 1 "const_int_operand" "i") ! (match_operand:SI 2 "const_int_operand" "i")) ! (ashift:SI (match_operand:SI 3 "gpc_reg_operand" "r") ! (match_operand:SI 4 "const_int_operand" "i")))] ! "" ! "* ! { ! int shift = INTVAL (operands[4]) & 31; ! int start = INTVAL (operands[2]) & 31; ! int size = INTVAL (operands[1]) & 31; ! ! operands[4] = gen_rtx (CONST_INT, VOIDmode, (shift - start - size) & 31); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); ! return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\"; ! }") ! ! (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") ! (match_operand:SI 1 "const_int_operand" "i") ! (match_operand:SI 2 "const_int_operand" "i")) ! (ashiftrt:SI (match_operand:SI 3 "gpc_reg_operand" "r") ! (match_operand:SI 4 "const_int_operand" "i")))] ! "" ! "* ! { ! int shift = INTVAL (operands[4]) & 31; ! int start = INTVAL (operands[2]) & 31; ! int size = INTVAL (operands[1]) & 31; ! ! operands[4] = gen_rtx (CONST_INT, VOIDmode, (32 - shift - start - size) & 31); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); ! return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\"; ! }") ! ! (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") ! (match_operand:SI 1 "const_int_operand" "i") ! (match_operand:SI 2 "const_int_operand" "i")) ! (lshiftrt:SI (match_operand:SI 3 "gpc_reg_operand" "r") ! (match_operand:SI 4 "const_int_operand" "i")))] ! "" ! "* ! { ! int shift = INTVAL (operands[4]) & 31; ! int start = INTVAL (operands[2]) & 31; ! int size = INTVAL (operands[1]) & 31; ! ! operands[4] = gen_rtx (CONST_INT, VOIDmode, (32 - shift - start - size) & 31); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1); ! return \"{rlimi|rlwimi} %0,%3,%4,%h2,%h1\"; ! }") ! ! (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") ! (match_operand:SI 1 "const_int_operand" "i") ! (match_operand:SI 2 "const_int_operand" "i")) ! (zero_extract:SI (match_operand:SI 3 "gpc_reg_operand" "r") ! (match_operand:SI 4 "const_int_operand" "i") ! (match_operand:SI 5 "const_int_operand" "i")))] ! "INTVAL (operands[4]) >= INTVAL (operands[1])" ! "* ! { ! int extract_start = INTVAL (operands[5]) & 31; ! int extract_size = INTVAL (operands[4]) & 31; ! int insert_start = INTVAL (operands[2]) & 31; ! int insert_size = INTVAL (operands[1]) & 31; ! ! /* Align extract field with insert field */ ! operands[5] = gen_rtx (CONST_INT, VOIDmode, ! (extract_start + extract_size - insert_start - insert_size) & 31); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, insert_start + insert_size - 1); ! return \"{rlimi|rlwimi} %0,%3,%5,%h2,%h1\"; ! }") ! ! (define_expand "extzv" ! [(set (match_operand:SI 0 "gpc_reg_operand" "=r") ! (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") ! (match_operand:SI 2 "const_int_operand" "i") ! (match_operand:SI 3 "const_int_operand" "i")))] ! "" ! " ! { ! /* Do not handle 16/8 bit structures that fit in HI/QI modes directly, since ! the (SUBREG:SI (REG:HI xxx)) that is otherwise generated can confuse the ! compiler if the address of the structure is taken later. */ ! if (GET_CODE (operands[0]) == SUBREG ! && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (operands[0]))) < UNITS_PER_WORD)) ! FAIL; ! }") ! ! (define_insn "" [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") *************** *** 1916,1920 **** return \"{andil.|andi.} %4,%1,%3\"; } ! if (start + size >= 32) operands[3] = const0_rtx; --- 2102,2106 ---- return \"{andil.|andi.} %4,%1,%3\"; } ! if (start + size >= 32) operands[3] = const0_rtx; *************** *** 1944,1948 **** return \"{andil.|andi.} %0,%1,%3\"; } ! if (start + size >= 32) operands[3] = const0_rtx; --- 2130,2134 ---- return \"{andil.|andi.} %0,%1,%3\"; } ! if (start + size >= 32) operands[3] = const0_rtx; *************** *** 2172,2176 **** (match_operand:SI 3 "mask_operand" "L")))] "includes_lshift_p (operands[2], operands[3])" ! "{rlinm|rlwinm} %0,%h1,%h2,%m3,%M3") (define_insn "" --- 2358,2362 ---- (match_operand:SI 3 "mask_operand" "L")))] "includes_lshift_p (operands[2], operands[3])" ! "{rlinm|rlwinm} %0,%1,%h2,%m3,%M3") (define_insn "" *************** *** 2183,2187 **** (clobber (match_scratch:SI 4 "=r"))] "includes_lshift_p (operands[2], operands[3])" ! "{rlinm.|rlwinm.} %4,%h1,%h2,%m3,%M3" [(set_attr "type" "delayed_compare")]) --- 2369,2373 ---- (clobber (match_scratch:SI 4 "=r"))] "includes_lshift_p (operands[2], operands[3])" ! "{rlinm.|rlwinm.} %4,%1,%h2,%m3,%M3" [(set_attr "type" "delayed_compare")]) *************** *** 2196,2200 **** (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] "includes_lshift_p (operands[2], operands[3])" ! "{rlinm.|rlwinm.} %0,%h1,%h2,%m3,%M3" [(set_attr "type" "delayed_compare")]) --- 2382,2386 ---- (and:SI (ashift:SI (match_dup 1) (match_dup 2)) (match_dup 3)))] "includes_lshift_p (operands[2], operands[3])" ! "{rlinm.|rlwinm.} %0,%1,%h2,%m3,%M3" [(set_attr "type" "delayed_compare")]) *************** *** 2511,2515 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_extend:DF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "" "* { --- 2697,2701 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float_extend:DF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "* { *************** *** 2524,2528 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "" "frsp %0,%1" [(set_attr "type" "fp")]) --- 2710,2721 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" ! "frsp %0,%1" ! [(set_attr "type" "fp")]) ! ! (define_insn "aux_truncdfsf2" ! [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (unspec:SF [(match_operand:SF 1 "gpc_reg_operand" "f")] 0))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "frsp %0,%1" [(set_attr "type" "fp")]) *************** *** 2531,2535 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "" "fneg %0,%1" [(set_attr "type" "fp")]) --- 2724,2728 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fneg %0,%1" [(set_attr "type" "fp")]) *************** *** 2538,2542 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "" "fabs %0,%1" [(set_attr "type" "fp")]) --- 2731,2735 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fabs %0,%1" [(set_attr "type" "fp")]) *************** *** 2545,2549 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f"))))] ! "" "fnabs %0,%1" [(set_attr "type" "fp")]) --- 2738,2742 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (neg:SF (abs:SF (match_operand:SF 1 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT" "fnabs %0,%1" [(set_attr "type" "fp")]) *************** *** 2553,2557 **** (plus:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "" "") --- 2746,2750 ---- (plus:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" "") *************** *** 2560,2564 **** (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC" "fadds %0,%1,%2" [(set_attr "type" "fp")]) --- 2753,2757 ---- (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fadds %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2568,2572 **** (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) --- 2761,2765 ---- (plus:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2576,2580 **** (minus:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "" "") --- 2769,2773 ---- (minus:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" "") *************** *** 2583,2587 **** (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC" "fsubs %0,%1,%2" [(set_attr "type" "fp")]) --- 2776,2780 ---- (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fsubs %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2591,2595 **** (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) --- 2784,2788 ---- (minus:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2599,2603 **** (mult:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "" "") --- 2792,2796 ---- (mult:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" "") *************** *** 2606,2610 **** (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC" "fmuls %0,%1,%2" [(set_attr "type" "fp")]) --- 2799,2803 ---- (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fmuls %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2614,2618 **** (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC" "{fm|fmul} %0,%1,%2" [(set_attr "type" "fp")]) --- 2807,2811 ---- (mult:SF (match_operand:SF 1 "gpc_reg_operand" "%f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fm|fmul} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2622,2626 **** (div:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "" "") --- 2815,2819 ---- (div:SF (match_operand:SF 1 "gpc_reg_operand" "") (match_operand:SF 2 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" "") *************** *** 2629,2633 **** (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC" "fdivs %0,%1,%2" [(set_attr "type" "sdiv")]) --- 2822,2826 ---- (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fdivs %0,%1,%2" [(set_attr "type" "sdiv")]) *************** *** 2637,2641 **** (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "sdiv")]) --- 2830,2834 ---- (div:SF (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "sdiv")]) *************** *** 2646,2650 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC" "fmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2839,2843 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2655,2659 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2848,2852 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2664,2668 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC" "fmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2857,2861 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2673,2677 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2866,2870 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2682,2686 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC" "fnmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2875,2879 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fnmadds %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2691,2695 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2884,2888 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2700,2704 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC" "fnmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2893,2897 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "TARGET_POWERPC && TARGET_HARD_FLOAT" "fnmsubs %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2709,2713 **** (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 2902,2906 ---- (match_operand:SF 2 "gpc_reg_operand" "f")) (match_operand:SF 3 "gpc_reg_operand" "f"))))] ! "! TARGET_POWERPC && TARGET_HARD_FLOAT" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2716,2720 **** [(set (match_operand:SF 0 "gpc_reg_operand" "") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "")))] ! "TARGET_PPC_GPOPT || TARGET_POWER2" "") --- 2909,2913 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "")))] ! "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT" "") *************** *** 2722,2726 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GPOPT" "fsqrts %0,%1" [(set_attr "type" "ssqrt")]) --- 2915,2919 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GPOPT && TARGET_HARD_FLOAT" "fsqrts %0,%1" [(set_attr "type" "ssqrt")]) *************** *** 2729,2739 **** [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWER2" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) ! ;; For SMIN, SMAX, UMIN, and UMAX, we use DEFINE_EXPAND's that involve a fsel ! ;; instruction and some auxiliary computations. Then we just have a single ! ;; DEFINE_INSN for fsel and the define_splits to make them if made by ;; combine. (define_expand "maxsf3" --- 2922,2932 ---- [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (sqrt:SF (match_operand:SF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWER2 && TARGET_HARD_FLOAT" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) ! ;; For MIN, MAX, and conditional move, we use DEFINE_EXPAND's that involve a ! ;; fsel instruction and some auxiliary computations. Then we just have a ! ;; single DEFINE_INSN for fsel and the define_splits to make them if made by ;; combine. (define_expand "maxsf3" *************** *** 2746,2750 **** (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT" " { operands[3] = gen_reg_rtx (SFmode); }") --- 2939,2943 ---- (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" " { operands[3] = gen_reg_rtx (SFmode); }") *************** *** 2755,2762 **** (match_operand:SF 2 "gpc_reg_operand" ""))) (clobber (match_operand:SF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT" [(set (match_dup 3) (minus:SF (match_dup 1) (match_dup 2))) ! (set (match_operand:SF 0 "gpc_reg_operand" "") (if_then_else:SF (ge (match_dup 3) (const_int 0)) --- 2948,2955 ---- (match_operand:SF 2 "gpc_reg_operand" ""))) (clobber (match_operand:SF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" [(set (match_dup 3) (minus:SF (match_dup 1) (match_dup 2))) ! (set (match_dup 0) (if_then_else:SF (ge (match_dup 3) (const_int 0)) *************** *** 2774,2778 **** (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT" " { operands[3] = gen_reg_rtx (SFmode); }") --- 2967,2971 ---- (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" " { operands[3] = gen_reg_rtx (SFmode); }") *************** *** 2783,2790 **** (match_operand:SF 2 "gpc_reg_operand" ""))) (clobber (match_operand:SF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT" [(set (match_dup 3) (minus:SF (match_dup 2) (match_dup 1))) ! (set (match_operand:SF 0 "gpc_reg_operand" "") (if_then_else:SF (ge (match_dup 3) (const_int 0)) --- 2976,2983 ---- (match_operand:SF 2 "gpc_reg_operand" ""))) (clobber (match_operand:SF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" [(set (match_dup 3) (minus:SF (match_dup 2) (match_dup 1))) ! (set (match_dup 0) (if_then_else:SF (ge (match_dup 3) (const_int 0)) *************** *** 2793,2797 **** "") ! (define_insn "" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (if_then_else:SF (ge (match_operand:SF 1 "gpc_reg_operand" "f") --- 2986,3060 ---- "") ! (define_expand "movsfcc" ! [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (if_then_else:SF (match_operand 1 "comparison_operator" "") ! (match_operand:SF 2 "gpc_reg_operand" "f") ! (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" ! " ! { ! rtx temp, op0, op1; ! enum rtx_code code = GET_CODE (operands[1]); ! if (! rs6000_compare_fp_p) ! FAIL; ! switch (code) ! { ! case GE: case EQ: case NE: ! op0 = rs6000_compare_op0; ! op1 = rs6000_compare_op1; ! break; ! case GT: ! op0 = rs6000_compare_op1; ! op1 = rs6000_compare_op0; ! temp = operands[2]; operands[2] = operands[3]; operands[3] = temp; ! break; ! case LE: ! op0 = rs6000_compare_op1; ! op1 = rs6000_compare_op0; ! break; ! case LT: ! op0 = rs6000_compare_op0; ! op1 = rs6000_compare_op1; ! temp = operands[2]; operands[2] = operands[3]; operands[3] = temp; ! break; ! default: ! FAIL; ! } ! if (GET_MODE (rs6000_compare_op0) == DFmode) ! { ! temp = gen_reg_rtx (DFmode); ! emit_insn (gen_subdf3 (temp, op0, op1)); ! emit_insn (gen_fseldfsf4 (operands[0], temp, operands[2], operands[3])); ! if (code == EQ) ! { ! emit_insn (gen_negdf2 (temp, temp)); ! emit_insn (gen_fseldfsf4 (operands[0], temp, operands[0], operands[3])); ! } ! if (code == NE) ! { ! emit_insn (gen_negdf2 (temp, temp)); ! emit_insn (gen_fseldfsf4 (operands[0], temp, operands[3], operands[0])); ! } ! } ! else ! { ! temp = gen_reg_rtx (SFmode); ! emit_insn (gen_subsf3 (temp, op0, op1)); ! emit_insn (gen_fselsfsf4 (operands[0], temp, operands[2], operands[3])); ! if (code == EQ) ! { ! emit_insn (gen_negsf2 (temp, temp)); ! emit_insn (gen_fselsfsf4 (operands[0], temp, operands[0], operands[3])); ! } ! if (code == NE) ! { ! emit_insn (gen_negsf2 (temp, temp)); ! emit_insn (gen_fselsfsf4 (operands[0], temp, operands[3], operands[0])); ! } ! } ! DONE; ! }") ! ! (define_insn "fselsfsf4" [(set (match_operand:SF 0 "gpc_reg_operand" "=f") (if_then_else:SF (ge (match_operand:SF 1 "gpc_reg_operand" "f") *************** *** 2799,2803 **** (match_operand:SF 2 "gpc_reg_operand" "f") (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) --- 3062,3076 ---- (match_operand:SF 2 "gpc_reg_operand" "f") (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" ! "fsel %0,%1,%2,%3" ! [(set_attr "type" "fp")]) ! ! (define_insn "fseldfsf4" ! [(set (match_operand:SF 0 "gpc_reg_operand" "=f") ! (if_then_else:SF (ge (match_operand:DF 1 "gpc_reg_operand" "f") ! (const_int 0)) ! (match_operand:SF 2 "gpc_reg_operand" "f") ! (match_operand:SF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" "fsel %0,%1,%2,%3" [(set_attr "type" "fp")]) *************** *** 2806,2810 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "" "fneg %0,%1" [(set_attr "type" "fp")]) --- 3079,3083 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fneg %0,%1" [(set_attr "type" "fp")]) *************** *** 2813,2817 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "" "fabs %0,%1" [(set_attr "type" "fp")]) --- 3086,3090 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fabs %0,%1" [(set_attr "type" "fp")]) *************** *** 2820,2824 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f"))))] ! "" "fnabs %0,%1" [(set_attr "type" "fp")]) --- 3093,3097 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT" "fnabs %0,%1" [(set_attr "type" "fp")]) *************** *** 2828,2832 **** (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) --- 3101,3105 ---- (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fa|fadd} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2836,2840 **** (minus:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) --- 3109,3113 ---- (minus:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fs|fsub} %0,%1,%2" [(set_attr "type" "fp")]) *************** *** 2844,2848 **** (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "" "{fm|fmul} %0,%1,%2" [(set_attr "type" "dmul")]) --- 3117,3121 ---- (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fm|fmul} %0,%1,%2" [(set_attr "type" "dmul")]) *************** *** 2852,2856 **** (div:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "ddiv")]) --- 3125,3129 ---- (div:DF (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fd|fdiv} %0,%1,%2" [(set_attr "type" "ddiv")]) *************** *** 2861,2865 **** (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 3134,3138 ---- (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fma|fmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 2870,2874 **** (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 3143,3147 ---- (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "{fms|fmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 2879,2883 **** (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 3152,3156 ---- (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT" "{fnma|fnmadd} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 2888,2892 **** (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) --- 3161,3165 ---- (match_operand:DF 2 "gpc_reg_operand" "f")) (match_operand:DF 3 "gpc_reg_operand" "f"))))] ! "TARGET_HARD_FLOAT" "{fnms|fnmsub} %0,%1,%2,%3" [(set_attr "type" "dmul")]) *************** *** 2895,2905 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GPOPT || TARGET_POWER2" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) ! ;; For SMIN, SMAX, UMIN, and UMAX, we use DEFINE_EXPAND's that involve a fsel ! ;; instruction and some auxiliary computations. Then we just have a single ! ;; DEFINE_INSN for fsel and the define_splits to make them if made by ;; combine. --- 3168,3178 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT" "fsqrt %0,%1" [(set_attr "type" "dsqrt")]) ! ;; For MIN, MAX, and conditional move, we use DEFINE_EXPAND's that involve a ! ;; fsel instruction and some auxiliary computations. Then we just have a ! ;; single DEFINE_INSN for fsel and the define_splits to make them if made by ;; combine. *************** *** 2913,2917 **** (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT" " { operands[3] = gen_reg_rtx (DFmode); }") --- 3186,3190 ---- (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" " { operands[3] = gen_reg_rtx (DFmode); }") *************** *** 2922,2929 **** (match_operand:DF 2 "gpc_reg_operand" ""))) (clobber (match_operand:DF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT" [(set (match_dup 3) (minus:DF (match_dup 1) (match_dup 2))) ! (set (match_operand:DF 0 "gpc_reg_operand" "") (if_then_else:DF (ge (match_dup 3) (const_int 0)) --- 3195,3202 ---- (match_operand:DF 2 "gpc_reg_operand" ""))) (clobber (match_operand:DF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" [(set (match_dup 3) (minus:DF (match_dup 1) (match_dup 2))) ! (set (match_dup 0) (if_then_else:DF (ge (match_dup 3) (const_int 0)) *************** *** 2941,2945 **** (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT" " { operands[3] = gen_reg_rtx (DFmode); }") --- 3214,3218 ---- (match_dup 1) (match_dup 2)))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" " { operands[3] = gen_reg_rtx (DFmode); }") *************** *** 2950,2957 **** (match_operand:DF 2 "gpc_reg_operand" ""))) (clobber (match_operand:DF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT" [(set (match_dup 3) (minus:DF (match_dup 2) (match_dup 1))) ! (set (match_operand:DF 0 "gpc_reg_operand" "") (if_then_else:DF (ge (match_dup 3) (const_int 0)) --- 3223,3230 ---- (match_operand:DF 2 "gpc_reg_operand" ""))) (clobber (match_operand:DF 3 "gpc_reg_operand" ""))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" [(set (match_dup 3) (minus:DF (match_dup 2) (match_dup 1))) ! (set (match_dup 0) (if_then_else:DF (ge (match_dup 3) (const_int 0)) *************** *** 2960,2964 **** "") ! (define_insn "" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (if_then_else:DF (ge (match_operand:DF 1 "gpc_reg_operand" "f") --- 3233,3307 ---- "") ! (define_expand "movdfcc" ! [(set (match_operand:DF 0 "gpc_reg_operand" "=f") ! (if_then_else:DF (match_operand 1 "comparison_operator" "") ! (match_operand:DF 2 "gpc_reg_operand" "f") ! (match_operand:DF 3 "gpc_reg_operand" "f")))] ! "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" ! " ! { ! rtx temp, op0, op1; ! enum rtx_code code = GET_CODE (operands[1]); ! if (! rs6000_compare_fp_p) ! FAIL; ! switch (code) ! { ! case GE: case EQ: case NE: ! op0 = rs6000_compare_op0; ! op1 = rs6000_compare_op1; ! break; ! case GT: ! op0 = rs6000_compare_op1; ! op1 = rs6000_compare_op0; ! temp = operands[2]; operands[2] = operands[3]; operands[3] = temp; ! break; ! case LE: ! op0 = rs6000_compare_op1; ! op1 = rs6000_compare_op0; ! break; ! case LT: ! op0 = rs6000_compare_op0; ! op1 = rs6000_compare_op1; ! temp = operands[2]; operands[2] = operands[3]; operands[3] = temp; ! break; ! default: ! FAIL; ! } ! if (GET_MODE (rs6000_compare_op0) == DFmode) ! { ! temp = gen_reg_rtx (DFmode); ! emit_insn (gen_subdf3 (temp, op0, op1)); ! emit_insn (gen_fseldfdf4 (operands[0], temp, operands[2], operands[3])); ! if (code == EQ) ! { ! emit_insn (gen_negdf2 (temp, temp)); ! emit_insn (gen_fseldfdf4 (operands[0], temp, operands[0], operands[3])); ! } ! if (code == NE) ! { ! emit_insn (gen_negdf2 (temp, temp)); ! emit_insn (gen_fseldfdf4 (operands[0], temp, operands[3], operands[0])); ! } ! } ! else ! { ! temp = gen_reg_rtx (SFmode); ! emit_insn (gen_subsf3 (temp, op0, op1)); ! emit_insn (gen_fselsfdf4 (operands[0], temp, operands[2], operands[3])); ! if (code == EQ) ! { ! emit_insn (gen_negsf2 (temp, temp)); ! emit_insn (gen_fselsfdf4 (operands[0], temp, operands[0], operands[3])); ! } ! if (code == NE) ! { ! emit_insn (gen_negsf2 (temp, temp)); ! emit_insn (gen_fselsfdf4 (operands[0], temp, operands[3], operands[0])); ! } ! } ! DONE; ! }") ! ! (define_insn "fseldfdf4" [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (if_then_else:DF (ge (match_operand:DF 1 "gpc_reg_operand" "f") *************** *** 2966,2969 **** --- 3309,3322 ---- (match_operand:DF 2 "gpc_reg_operand" "f") (match_operand:DF 3 "gpc_reg_operand" "f")))] + "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT" + "fsel %0,%1,%2,%3" + [(set_attr "type" "fp")]) + + (define_insn "fselsfdf4" + [(set (match_operand:DF 0 "gpc_reg_operand" "=f") + (if_then_else:DF (ge (match_operand:SF 1 "gpc_reg_operand" "f") + (const_int 0)) + (match_operand:DF 2 "gpc_reg_operand" "f") + (match_operand:DF 3 "gpc_reg_operand" "f")))] "TARGET_PPC_GFXOPT" "fsel %0,%1,%2,%3" *************** *** 2980,2997 **** (minus:DF (subreg:DF (match_dup 2) 0) (match_dup 5)))] ! "" " { - #if HOST_BITS_PER_INT != BITS_PER_WORD - /* Maybe someone can figure out how to do this in that case. I don't - want to right now. */ - abort (); - #endif - operands[2] = gen_reg_rtx (DImode); operands[3] = gen_rtx (CONST_INT, VOIDmode, 0x80000000); ! operands[4] = immed_double_const (0, 0x43300000, DImode); ! operands[5] = force_reg (DFmode, immed_double_const (0x43300000, ! 0x80000000, DFmode)); }") --- 3333,3345 ---- (minus:DF (subreg:DF (match_dup 2) 0) (match_dup 5)))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT" " { operands[2] = gen_reg_rtx (DImode); operands[3] = gen_rtx (CONST_INT, VOIDmode, 0x80000000); ! operands[4] = rs6000_immed_double_const (0, 0x43300000, DImode); ! operands[5] = force_reg (DFmode, rs6000_immed_double_const (0x43300000, ! 0x80000000, ! DFmode)); }") *************** *** 3003,3018 **** (minus:DF (subreg:DF (match_dup 2) 0) (match_dup 4)))] ! "" " { - #if HOST_BITS_PER_INT != BITS_PER_WORD - /* Maybe someone can figure out how to do this in that case. I don't - want to right now. */ - abort (); - #endif - operands[2] = gen_reg_rtx (DImode); ! operands[3] = immed_double_const (0, 0x43300000, DImode); ! operands[4] = force_reg (DFmode, immed_double_const (0x43300000, 0, DFmode)); }") --- 3351,3360 ---- (minus:DF (subreg:DF (match_dup 2) 0) (match_dup 4)))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT" " { operands[2] = gen_reg_rtx (DImode); ! operands[3] = rs6000_immed_double_const (0, 0x43300000, DImode); ! operands[4] = force_reg (DFmode, rs6000_immed_double_const (0x43300000, 0, DFmode)); }") *************** *** 3023,3030 **** (xor:SI (match_operand:SI 1 "gpc_reg_operand" "") (match_operand:SI 2 "logical_operand" ""))) ! (match_operand:DI 3 "immediate_operand" "")))] ! "reload_completed && HOST_BITS_PER_INT == BITS_PER_WORD ! && GET_CODE (operands[3]) == CONST_DOUBLE ! && CONST_DOUBLE_LOW (operands[3]) == 0" [(set (match_dup 6) (xor:SI (match_dup 1) (match_dup 2))) (set (match_dup 4) (match_dup 5))] --- 3365,3370 ---- (xor:SI (match_operand:SI 1 "gpc_reg_operand" "") (match_operand:SI 2 "logical_operand" ""))) ! (match_operand:DI 3 "low_32_bit_operand" "")))] ! "reload_completed" [(set (match_dup 6) (xor:SI (match_dup 1) (match_dup 2))) (set (match_dup 4) (match_dup 5))] *************** *** 3040,3057 **** (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r") (match_operand:SI 2 "logical_operand" "rKJ"))) ! (match_operand:DI 3 "immediate_operand" "n")))] ! "HOST_BITS_PER_INT == BITS_PER_WORD ! && GET_CODE (operands[3]) == CONST_DOUBLE ! && CONST_DOUBLE_LOW (operands[3]) == 0" "#" [(set_attr "length" "8")]) ! (define_split [(set (match_operand:DI 0 "gpc_reg_operand" "=") (plus:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "")) ! (match_operand:DI 2 "immediate_operand" "")))] ! "reload_completed && HOST_BITS_PER_INT == BITS_PER_WORD ! && GET_CODE (operands[2]) == CONST_DOUBLE ! && CONST_DOUBLE_LOW (operands[2]) == 0" [(set (match_dup 3) (match_dup 4)) (set (match_dup 5) (match_dup 1))] --- 3380,3393 ---- (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r") (match_operand:SI 2 "logical_operand" "rKJ"))) ! (match_operand:DI 3 "low_32_bit_operand" "n")))] ! "" "#" [(set_attr "length" "8")]) ! (define_split [(set (match_operand:DI 0 "gpc_reg_operand" "=") (plus:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "")) ! (match_operand:DI 2 "low_32_bit_operand" "")))] ! "reload_completed" [(set (match_dup 3) (match_dup 4)) (set (match_dup 5) (match_dup 1))] *************** *** 3079,3086 **** [(set (match_operand:DI 0 "gpc_reg_operand" "=r") (plus:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r")) ! (match_operand:DI 2 "immediate_operand" "n")))] ! "HOST_BITS_PER_INT == BITS_PER_WORD ! && GET_CODE (operands[2]) == CONST_DOUBLE ! && CONST_DOUBLE_LOW (operands[2]) == 0" "#" [(set_attr "length" "8")]) --- 3415,3420 ---- [(set (match_operand:DI 0 "gpc_reg_operand" "=r") (plus:DI (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r")) ! (match_operand:DI 2 "low_32_bit_operand" "n")))] ! "" "#" [(set_attr "length" "8")]) *************** *** 3089,3093 **** [(set (match_operand:SI 0 "gpc_reg_operand" "") (fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))] ! "" " { --- 3423,3427 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "") (fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" " { *************** *** 3115,3119 **** (sign_extend:DI (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))))] ! "TARGET_POWER2 || TARGET_POWERPC" "{fcirz|fctiwz} %0,%1" [(set_attr "type" "fp")]) --- 3449,3453 ---- (sign_extend:DI (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))))] ! "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT" "{fcirz|fctiwz} %0,%1" [(set_attr "type" "fp")]) *************** *** 3122,3126 **** [(set (match_operand:SI 0 "gpc_reg_operand" "") (unsigned_fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))] ! "! TARGET_POWER2 && ! TARGET_POWERPC" " { --- 3456,3460 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "") (unsigned_fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))] ! "! TARGET_POWER2 && ! TARGET_POWERPC && TARGET_HARD_FLOAT" " { *************** *** 3134,3138 **** (fix:SI (match_operand:DF 1 "" ""))) (use (match_operand:SI 2 "" ""))])] ! "" " { --- 3468,3472 ---- (fix:SI (match_operand:DF 1 "" ""))) (use (match_operand:SI 2 "" ""))])] ! "TARGET_HARD_FLOAT" " { *************** *** 3157,3163 **** (set (match_operand:SI 0 "gpc_reg_operand" "") (reg:SI 3))] ! "" " ! { rs6000_trunc_used = 1; }") --- 3491,3497 ---- (set (match_operand:SI 0 "gpc_reg_operand" "") (reg:SI 3))] ! "TARGET_HARD_FLOAT" " ! { rs6000_trunc_used = 1; }") *************** *** 3166,3170 **** [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float:DF (match_operand:DI 1 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC64" "fcfid %0,%1" [(set_attr "type" "fp")]) --- 3500,3504 ---- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") (float:DF (match_operand:DI 1 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT" "fcfid %0,%1" [(set_attr "type" "fp")]) *************** *** 3173,3177 **** [(set (match_operand:DI 0 "gpc_reg_operand" "=f") (fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC64" "fctidz %0,%1" [(set_attr "type" "fp")]) --- 3507,3511 ---- [(set (match_operand:DI 0 "gpc_reg_operand" "=f") (fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT" "fctidz %0,%1" [(set_attr "type" "fp")]) *************** *** 3416,3421 **** (define_insn "ffsdi2" ! [(set (match_operand:DI 0 "register_operand" "=&r") ! (ffs:DI (match_operand:DI 1 "register_operand" "r")))] "TARGET_POWERPC64" "neg %0,%1\;and %0,%0,%1\;cntlzd %0,%0\;subfic %0,%0,64" --- 3750,3755 ---- (define_insn "ffsdi2" ! [(set (match_operand:DI 0 "gpc_reg_operand" "=&r") ! (ffs:DI (match_operand:DI 1 "gpc_reg_operand" "r")))] "TARGET_POWERPC64" "neg %0,%1\;and %0,%0,%1\;cntlzd %0,%0\;subfic %0,%0,64" *************** *** 3699,3707 **** (set_attr "length" "*,*,12,*,8,*,*,*")]) ! ;; For floating-point, we normally deal with the floating-point registers. ! ;; The sole exception is that parameter passing can produce floating-point ! ;; values in fixed-point registers. Unless the value is a simple constant ! ;; or already in memory, we deal with this by allocating memory and copying ! ;; the value explicitly via that memory location. (define_expand "movsf" [(set (match_operand:SF 0 "nonimmediate_operand" "") --- 4033,4041 ---- (set_attr "length" "*,*,12,*,8,*,*,*")]) ! ;; For floating-point, we normally deal with the floating-point registers ! ;; unless -msoft-float is used. The sole exception is that parameter passing ! ;; can produce floating-point values in fixed-point registers. Unless the ! ;; value is a simple constant or already in memory, we deal with this by ! ;; allocating memory and copying the value explicitly via that memory location. (define_expand "movsf" [(set (match_operand:SF 0 "nonimmediate_operand" "") *************** *** 3721,3788 **** operands[1] = alter_subreg (operands[1]); ! if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 32) { ! /* If this is a store to memory or another integer register do the ! move directly. Otherwise store to a temporary stack slot and ! load from there into a floating point register. */ ! ! if (GET_CODE (operands[0]) == MEM ! || (GET_CODE (operands[0]) == REG ! && (REGNO (operands[0]) < 32 ! || (reload_in_progress ! && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER)))) { ! emit_move_insn (operand_subword (operands[0], 0, 0, SFmode), ! operand_subword (operands[1], 0, 0, SFmode)); ! DONE; } ! else { ! rtx stack_slot = assign_stack_temp (SFmode, 4, 0); ! emit_move_insn (stack_slot, operands[1]); ! emit_move_insn (operands[0], stack_slot); ! DONE; } - } ! if (GET_CODE (operands[0]) == MEM) ! { ! /* If operands[1] is a register, it may have double-precision data ! in it, so truncate it to single precision. We need not do ! this for POWERPC. */ ! if (! TARGET_POWERPC && GET_CODE (operands[1]) == REG) { ! rtx newreg = reload_in_progress ? operands[1] : gen_reg_rtx (SFmode); ! emit_insn (gen_truncdfsf2 (newreg, ! gen_rtx (SUBREG, DFmode, operands[1], 0))); ! operands[1] = newreg; ! } ! ! operands[1] = force_reg (SFmode, operands[1]); ! } ! ! if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) ! { ! if (GET_CODE (operands[1]) == MEM #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && ! defined(REAL_IS_NOT_DOUBLE) ! || GET_CODE (operands[1]) == CONST_DOUBLE #endif ! || (GET_CODE (operands[1]) == REG ! && (REGNO (operands[1]) < 32 ! || (reload_in_progress ! && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER)))) ! { ! emit_move_insn (operand_subword (operands[0], 0, 0, SFmode), ! operand_subword (operands[1], 0, 0, SFmode)); ! DONE; ! } ! else ! { ! rtx stack_slot = assign_stack_temp (SFmode, 4, 0); ! ! emit_move_insn (stack_slot, operands[1]); ! emit_move_insn (operands[0], stack_slot); ! DONE; } } --- 4055,4129 ---- operands[1] = alter_subreg (operands[1]); ! if (TARGET_SOFT_FLOAT && GET_CODE (operands[0]) == MEM) ! operands[1] = force_reg (SFmode, operands[1]); ! ! else if (TARGET_HARD_FLOAT) { ! if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 32) { ! /* If this is a store to memory or another integer register do the ! move directly. Otherwise store to a temporary stack slot and ! load from there into a floating point register. */ ! ! if (GET_CODE (operands[0]) == MEM ! || (GET_CODE (operands[0]) == REG ! && (REGNO (operands[0]) < 32 ! || (reload_in_progress ! && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER)))) ! { ! emit_move_insn (operand_subword (operands[0], 0, 0, SFmode), ! operand_subword (operands[1], 0, 0, SFmode)); ! DONE; ! } ! else ! { ! rtx stack_slot = assign_stack_temp (SFmode, 4, 0); ! ! emit_move_insn (stack_slot, operands[1]); ! emit_move_insn (operands[0], stack_slot); ! DONE; ! } } ! ! if (GET_CODE (operands[0]) == MEM) { ! /* If operands[1] is a register, it may have double-precision data ! in it, so truncate it to single precision. We need not do ! this for POWERPC. */ ! if (! TARGET_POWERPC && TARGET_HARD_FLOAT ! && GET_CODE (operands[1]) == REG) ! { ! rtx newreg ! = reload_in_progress ? operands[1] : gen_reg_rtx (SFmode); ! emit_insn (gen_aux_truncdfsf2 (newreg, operands[1])); ! operands[1] = newreg; ! } ! operands[1] = force_reg (SFmode, operands[1]); } ! if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) { ! if (GET_CODE (operands[1]) == MEM #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && ! defined(REAL_IS_NOT_DOUBLE) ! || GET_CODE (operands[1]) == CONST_DOUBLE #endif ! || (GET_CODE (operands[1]) == REG ! && (REGNO (operands[1]) < 32 ! || (reload_in_progress ! && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER)))) ! { ! emit_move_insn (operand_subword (operands[0], 0, 0, SFmode), ! operand_subword (operands[1], 0, 0, SFmode)); ! DONE; ! } ! else ! { ! rtx stack_slot = assign_stack_temp (SFmode, 4, 0); ! ! emit_move_insn (stack_slot, operands[1]); ! emit_move_insn (operands[0], stack_slot); ! DONE; ! } } } *************** *** 3806,3815 **** { operands[2] = operand_subword (operands[0], 0, 0, SFmode); operands[3] = operand_subword (operands[1], 0, 0, SFmode); }") ! (define_insn "" [(set (match_operand:SF 0 "fp_reg_or_mem_operand" "=f,f,m") (match_operand:SF 1 "input_operand" "f,m,f"))] ! "gpc_reg_operand (operands[0], SFmode) ! || gpc_reg_operand (operands[1], SFmode)" "@ fmr %0,%1 --- 4147,4156 ---- { operands[2] = operand_subword (operands[0], 0, 0, SFmode); operands[3] = operand_subword (operands[1], 0, 0, SFmode); }") ! (define_insn "" [(set (match_operand:SF 0 "fp_reg_or_mem_operand" "=f,f,m") (match_operand:SF 1 "input_operand" "f,m,f"))] ! "(gpc_reg_operand (operands[0], SFmode) ! || gpc_reg_operand (operands[1], SFmode)) && TARGET_HARD_FLOAT" "@ fmr %0,%1 *************** *** 3817,3820 **** --- 4158,4176 ---- stfs%U0%X0 %1,%0" [(set_attr "type" "fp,fpload,*")]) + + (define_insn "" + [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m,r,r,r") + (match_operand:SF 1 "input_operand" "r,m,r,I,J,R"))] + "(gpc_reg_operand (operands[0], SFmode) + || gpc_reg_operand (operands[1], SFmode)) && TARGET_SOFT_FLOAT" + "@ + mr %0,%1 + {l%U1%X1|lwz%U1%X1} %0,%1 + {st%U0%X0|stw%U0%X0} %1,%0 + {lil|li} %0,%1 + {liu|lis} %0,%u1 + {cal|la} %0,%1(%*)" + [(set_attr "type" "*,load,*,*,*,*")]) + (define_expand "movdf" *************** *** 3867,3872 **** [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,o,!r,f,f,m") (match_operand:DF 1 "input_operand" "r,o,r,G,f,m,f"))] ! "! TARGET_POWERPC64 && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode))" "* { --- 4223,4229 ---- [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,o,!r,f,f,m") (match_operand:DF 1 "input_operand" "r,o,r,G,f,m,f"))] ! "! TARGET_POWERPC64 && TARGET_HARD_FLOAT ! && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode))" "* { *************** *** 3907,3914 **** (define_insn "" [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,o,!r,f,f,m") (match_operand:DF 1 "input_operand" "r,o,r,G,f,m,f"))] ! "TARGET_POWERPC64 && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode))" "@ mr %0,%1 --- 4264,4309 ---- (define_insn "" + [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,o,r") + (match_operand:DF 1 "input_operand" "r,o,r,G"))] + "! TARGET_POWERPC64 && TARGET_SOFT_FLOAT + && (register_operand (operands[0], DFmode) + || register_operand (operands[1], DFmode))" + "* + { + switch (which_alternative) + { + case 0: + /* We normally copy the low-numbered register first. However, if + the first register operand 0 is the same as the second register of + operand 1, we must copy in the opposite order. */ + if (REGNO (operands[0]) == REGNO (operands[1]) + 1) + return \"mr %L0,%L1\;mr %0,%1\"; + else + return \"mr %0,%1\;mr %L0,%L1\"; + case 1: + /* If the low-address word is used in the address, we must load it + last. Otherwise, load it first. Note that we cannot have + auto-increment in that case since the address register is known to be + dead. */ + if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1, + operands [1], 0)) + return \"{l|lwz} %L0,%L1\;{l|lwz} %0,%1\"; + else + return \"{l%U1|lwz%U1} %0,%1\;{l|lwz} %L0,%L1\"; + case 2: + return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\"; + case 3: + return \"#\"; + } + }" + [(set_attr "type" "*,load,*,*") + (set_attr "length" "8,8,8,8")]) + + (define_insn "" [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,o,!r,f,f,m") (match_operand:DF 1 "input_operand" "r,o,r,G,f,m,f"))] ! "TARGET_POWERPC64 && TARGET_HARD_FLOAT ! && (register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode))" "@ mr %0,%1 *************** *** 3920,3923 **** --- 4315,4331 ---- stfd%U0%X0 %1,%0" [(set_attr "type" "*,load,*,*,fp,fpload,*")]) + + (define_insn "" + [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,o,r") + (match_operand:DF 1 "input_operand" "r,o,r,G"))] + "TARGET_POWERPC64 && TARGET_SOFT_FLOAT + && (register_operand (operands[0], DFmode) + || register_operand (operands[1], DFmode))" + "@ + mr %0,%1 + ld%U1%X1 %0,%1 + sd%U0%X0 %1,%0 + #" + [(set_attr "type" "*,load,*,*")]) ;; Next come the multi-word integer load and store and the load and store *************** *** 4025,4029 **** (match_operand:TI 1 "general_operand" "")) (clobber (scratch:SI))])] ! "TARGET_POWER || TARGET_POWERPC64" " { --- 4433,4437 ---- (match_operand:TI 1 "general_operand" "")) (clobber (scratch:SI))])] ! "TARGET_STRING || TARGET_POWERPC64" " { *************** *** 4053,4062 **** (match_operand:TI 1 "reg_or_mem_operand" "r,r,r,Q,m")) (clobber (match_scratch:SI 2 "=q,q#X,X,X,X"))] ! "TARGET_POWER && ! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode) ! || gpc_reg_operand (operands[1], TImode))" "* { switch (which_alternative) { case 0: return \"{stsi|stswi} %1,%P0,16\"; --- 4461,4473 ---- (match_operand:TI 1 "reg_or_mem_operand" "r,r,r,Q,m")) (clobber (match_scratch:SI 2 "=q,q#X,X,X,X"))] ! "TARGET_STRING && TARGET_POWER && ! TARGET_POWERPC64 ! && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" "* { switch (which_alternative) { + default: + abort (); + case 0: return \"{stsi|stswi} %1,%P0,16\"; *************** *** 4101,4104 **** --- 4512,4560 ---- (define_insn "" + [(set (match_operand:TI 0 "reg_or_mem_operand" "=m,????r,????r") + (match_operand:TI 1 "reg_or_mem_operand" "r,r,m")) + (clobber (match_scratch:SI 2 "=X,X,X"))] + "TARGET_STRING && !TARGET_POWER && ! TARGET_POWERPC64 + && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" + "* + { + switch (which_alternative) + { + default: + abort (); + + case 0: + return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\;{st|stw} %Y1,%Y0\;{st|stw} %Z1,%Z0\"; + + case 1: + /* Normally copy registers with lowest numbered register copied first. + But copy in the other order if the first register of the output + is the second, third, or fourth register in the input. */ + if (REGNO (operands[0]) >= REGNO (operands[1]) + 1 + && REGNO (operands[0]) <= REGNO (operands[1]) + 3) + return \"mr %Z0,%Z1\;mr %Y0,%Y1\;mr %L0,%L1\;mr %0,%1\"; + else + return \"mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1\"; + case 2: + /* If the address register is the same as the register for the lowest- + addressed word, load it last. Similarly for the next two words. + Otherwise load lowest address to highest. */ + if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1, + operands[1], 0)) + return \"{l|lwz} %L0,%L1\;{l|lwz} %Y0,%Y1\;{l|lwz} %Z0,%Z1\;{l|lwz} %0,%1\"; + else if (refers_to_regno_p (REGNO (operands[0]) + 1, + REGNO (operands[0]) + 2, operands[1], 0)) + return \"{l|lwz} %0,%1\;{l|lwz} %Y0,%Y1\;{l|lwz} %Z0,%Z1\;{l|lwz} %L0,%L1\"; + else if (refers_to_regno_p (REGNO (operands[0]) + 2, + REGNO (operands[0]) + 3, operands[1], 0)) + return \"{l|lwz} %0,%1\;{l|lwz} %L0,%L1\;{l|lwz} %Z0,%Z1\;{l|lwz} %Y0,%Y1\"; + else + return \"{l%U1|lwz%U1} %0,%1\;{l|lwz} %L0,%L1\;{l|lwz} %Y0,%Y1\;{l|lwz} %Z0,%Z1\"; + } + }" + [(set_attr "type" "load,*,*") + (set_attr "length" "16,16,16")]) + + (define_insn "" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m") (match_operand:TI 1 "input_operand" "r,m,r"))] *************** *** 4138,4142 **** (match_operand:SI 1 "" "")) (use (match_operand:SI 2 "" ""))])] ! "TARGET_POWER" " { --- 4594,4598 ---- (match_operand:SI 1 "" "")) (use (match_operand:SI 2 "" ""))])] ! "TARGET_STRING" " { *************** *** 4173,4177 **** [(set (match_operand:SI 1 "gpc_reg_operand" "=r") (match_operand:SI 2 "indirect_operand" "Q"))])] ! "TARGET_POWER" "* { --- 4629,4633 ---- [(set (match_operand:SI 1 "gpc_reg_operand" "=r") (match_operand:SI 2 "indirect_operand" "Q"))])] ! "TARGET_STRING" "* { *************** *** 4207,4211 **** (clobber (scratch:SI)) (use (match_operand:SI 2 "" ""))])] ! "TARGET_POWER" " { --- 4663,4667 ---- (clobber (scratch:SI)) (use (match_operand:SI 2 "" ""))])] ! "TARGET_STRING" " { *************** *** 4249,4256 **** (match_operand:SI 2 "gpc_reg_operand" "r")) (clobber (match_scratch:SI 3 "=q"))])] ! "TARGET_POWER" "{stsi|stswi} %2,%P1,%O0") ! ;; Define insns that do load or store with update. Some of these we can ;; get by using pre-decrement or pre-increment, but the hardware can also ;; do cases where the increment is not the size of the object. --- 4705,4983 ---- (match_operand:SI 2 "gpc_reg_operand" "r")) (clobber (match_scratch:SI 3 "=q"))])] ! "TARGET_STRING && TARGET_POWER" ! "{stsi|stswi} %2,%P1,%O0") ! ! (define_insn "" ! [(match_parallel 0 "store_multiple_operation" ! [(set (match_operand:SI 1 "indirect_operand" "=Q") ! (match_operand:SI 2 "gpc_reg_operand" "r")) ! (clobber (match_scratch:SI 3 "X"))])] ! "TARGET_STRING && !TARGET_POWER" "{stsi|stswi} %2,%P1,%O0") + + + ;; String/block move insn. + ;; Argument 0 is the destination + ;; Argument 1 is the source + ;; Argument 2 is the length + ;; Argument 3 is the alignment + + (define_expand "movstrsi" + [(parallel [(set (match_operand:BLK 0 "memory_operand" "") + (match_operand:BLK 1 "memory_operand" "")) + (use (match_operand:SI 2 "general_operand" "")) + (use (match_operand:SI 3 "immediate_operand" ""))])] + "" + " + { + if (expand_block_move (operands)) + DONE; + else + FAIL; + }") + + ;; Move up to 32 bytes at a time. The fixed registers are needed because the + ;; register allocator doesn't have a clue about allocating 8 word registers + (define_expand "movstrsi_8reg" + [(parallel [(set (mem:BLK (match_operand:SI 0 "register_operand" "")) + (mem:BLK (match_operand:SI 1 "register_operand" ""))) + (use (match_operand:SI 2 "immediate_operand" "")) + (use (match_operand:SI 3 "immediate_operand" "")) + (clobber (reg:SI 5)) + (clobber (reg:SI 6)) + (clobber (reg:SI 7)) + (clobber (reg:SI 8)) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 4 ""))])] + "TARGET_STRING" + "") + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_operand:SI 4 "register_operand" "=r")) + (clobber (reg:SI 6)) + (clobber (reg:SI 7)) + (clobber (reg:SI 8)) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 5 "=q"))] + "TARGET_STRING && TARGET_POWER + && ((INTVAL (operands[2]) > 24 && INTVAL (operands[2]) < 32) || INTVAL (operands[2]) == 0) + && (REGNO (operands[0]) < 5 || REGNO (operands[0]) > 12) + && (REGNO (operands[1]) < 5 || REGNO (operands[1]) > 12) + && REGNO (operands[4]) == 5" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_operand:SI 4 "register_operand" "=r")) + (clobber (reg:SI 6)) + (clobber (reg:SI 7)) + (clobber (reg:SI 8)) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 5 "X"))] + "TARGET_STRING && !TARGET_POWER + && ((INTVAL (operands[2]) > 24 && INTVAL (operands[2]) < 32) || INTVAL (operands[2]) == 0) + && (REGNO (operands[0]) < 5 || REGNO (operands[0]) > 12) + && (REGNO (operands[1]) < 5 || REGNO (operands[1]) > 12) + && REGNO (operands[4]) == 5" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + ;; Move up to 24 bytes at a time. The fixed registers are needed because the + ;; register allocator doesn't have a clue about allocating 6 word registers + (define_expand "movstrsi_6reg" + [(parallel [(set (mem:BLK (match_operand:SI 0 "register_operand" "")) + (mem:BLK (match_operand:SI 1 "register_operand" ""))) + (use (match_operand:SI 2 "immediate_operand" "")) + (use (match_operand:SI 3 "immediate_operand" "")) + (clobber (reg:SI 7)) + (clobber (reg:SI 8)) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 4 ""))])] + "TARGET_STRING" + "") + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_operand:SI 4 "register_operand" "=r")) + (clobber (reg:SI 8)) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 5 "=q"))] + "TARGET_STRING && TARGET_POWER + && INTVAL (operands[2]) > 16 && INTVAL (operands[2]) <= 24 + && (REGNO (operands[0]) < 7 || REGNO (operands[0]) > 12) + && (REGNO (operands[1]) < 7 || REGNO (operands[1]) > 12) + && REGNO (operands[4]) == 7" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_operand:SI 4 "register_operand" "=r")) + (clobber (reg:SI 8)) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 5 "X"))] + "TARGET_STRING && !TARGET_POWER + && INTVAL (operands[2]) > 16 && INTVAL (operands[2]) <= 32 + && (REGNO (operands[0]) < 7 || REGNO (operands[0]) > 12) + && (REGNO (operands[1]) < 7 || REGNO (operands[1]) > 12) + && REGNO (operands[4]) == 7" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + ;; Move up to 16 bytes at a time, using 4 fixed registers to avoid spill problems + ;; with TImode + (define_expand "movstrsi_4reg" + [(parallel [(set (mem:BLK (match_operand:SI 0 "register_operand" "")) + (mem:BLK (match_operand:SI 1 "register_operand" ""))) + (use (match_operand:SI 2 "immediate_operand" "")) + (use (match_operand:SI 3 "immediate_operand" "")) + (clobber (reg:SI 9)) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 4 ""))])] + "TARGET_STRING" + "") + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_operand:SI 4 "register_operand" "=r")) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 5 "=q"))] + "TARGET_STRING && TARGET_POWER + && INTVAL (operands[2]) > 8 && INTVAL (operands[2]) <= 16 + && (REGNO (operands[0]) < 9 || REGNO (operands[0]) > 12) + && (REGNO (operands[1]) < 9 || REGNO (operands[1]) > 12) + && REGNO (operands[4]) == 9" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_operand:SI 4 "register_operand" "=r")) + (clobber (reg:SI 10)) + (clobber (reg:SI 11)) + (clobber (reg:SI 12)) + (clobber (match_scratch:SI 5 "X"))] + "TARGET_STRING && !TARGET_POWER + && INTVAL (operands[2]) > 8 && INTVAL (operands[2]) <= 16 + && (REGNO (operands[0]) < 9 || REGNO (operands[0]) > 12) + && (REGNO (operands[1]) < 9 || REGNO (operands[1]) > 12) + && REGNO (operands[4]) == 9" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + ;; Move up to 8 bytes at a time. + (define_expand "movstrsi_2reg" + [(parallel [(set (mem:BLK (match_operand:SI 0 "register_operand" "")) + (mem:BLK (match_operand:SI 1 "register_operand" ""))) + (use (match_operand:SI 2 "immediate_operand" "")) + (use (match_operand:SI 3 "immediate_operand" "")) + (clobber (match_scratch:DI 4 "")) + (clobber (match_scratch:SI 5 ""))])] + "TARGET_STRING && !TARGET_64BIT" + "") + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_scratch:DI 4 "=&r")) + (clobber (match_scratch:SI 5 "=q"))] + "TARGET_STRING && TARGET_POWER && !TARGET_64BIT + && INTVAL (operands[2]) > 4 && INTVAL (operands[2]) <= 8" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_scratch:DI 4 "=&r")) + (clobber (match_scratch:SI 5 "X"))] + "TARGET_STRING && !TARGET_POWER && !TARGET_64BIT + && INTVAL (operands[2]) > 4 && INTVAL (operands[2]) <= 8" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + ;; Move up to 4 bytes at a time. + (define_expand "movstrsi_1reg" + [(parallel [(set (mem:BLK (match_operand:SI 0 "register_operand" "")) + (mem:BLK (match_operand:SI 1 "register_operand" ""))) + (use (match_operand:SI 2 "immediate_operand" "")) + (use (match_operand:SI 3 "immediate_operand" "")) + (clobber (match_scratch:SI 4 "")) + (clobber (match_scratch:SI 5 ""))])] + "TARGET_STRING" + "") + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_scratch:SI 4 "=&r")) + (clobber (match_scratch:SI 5 "=q"))] + "TARGET_STRING && TARGET_POWER + && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) <= 4" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + + (define_insn "" + [(set (mem:BLK (match_operand:SI 0 "register_operand" "b")) + (mem:BLK (match_operand:SI 1 "register_operand" "b"))) + (use (match_operand:SI 2 "immediate_operand" "i")) + (use (match_operand:SI 3 "immediate_operand" "i")) + (clobber (match_scratch:SI 4 "=&r")) + (clobber (match_scratch:SI 5 "X"))] + "TARGET_STRING && !TARGET_POWER + && INTVAL (operands[2]) > 0 && INTVAL (operands[2]) <= 4" + "{lsi|lswi} %4,%1,%2\;{stsi|stswi} %4,%0,%2" + [(set_attr "length" "8")]) + ! ;; Define insns that do load or store with update. Some of these we can ;; get by using pre-decrement or pre-increment, but the hardware can also ;; do cases where the increment is not the size of the object. *************** *** 4274,4277 **** --- 5001,5015 ---- (define_insn "" + [(set (match_operand:DI 3 "gpc_reg_operand" "=r") + (sign_extend:DI + (mem:SI (plus:DI (match_operand:DI 1 "gpc_reg_operand" "0") + (match_operand:DI 2 "gpc_reg_operand" "r"))))) + (set (match_operand:DI 0 "gpc_reg_operand" "=b") + (plus:DI (match_dup 1) (match_dup 2)))] + "TARGET_POWERPC64" + "lwaux %3,%0,%2" + [(set_attr "type" "load")]) + + (define_insn "" [(set (mem:DI (plus:DI (match_operand:DI 1 "gpc_reg_operand" "0,0") (match_operand:DI 2 "reg_or_short_operand" "r,I"))) *************** *** 4398,4402 **** (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "" "@ lfsux %3,%0,%2 --- 5136,5140 ---- (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT" "@ lfsux %3,%0,%2 *************** *** 4410,4414 **** (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "" "@ stfsux %3,%0,%2 --- 5148,5152 ---- (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT" "@ stfsux %3,%0,%2 *************** *** 4421,4425 **** (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "" "@ lfdux %3,%0,%2 --- 5159,5163 ---- (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT" "@ lfdux %3,%0,%2 *************** *** 4433,4445 **** (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "" "@ stfdux %3,%0,%2 stfdu %3,%2(%0)") ;; Next come insns related to the calling sequence. ;; ;; First, an insn to allocate new stack space for dynamic use (e.g., alloca). ! ;; We move the back-chain and decrement the stack pointer. (define_expand "allocate_stack" --- 5171,5209 ---- (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") (plus:SI (match_dup 1) (match_dup 2)))] ! "TARGET_HARD_FLOAT" "@ stfdux %3,%0,%2 stfdu %3,%2(%0)") + + ;; Peephole to convert two consecutive FP loads or stores into lfq/stfq. + + (define_peephole + [(set (match_operand:DF 0 "gpc_reg_operand" "=f") + (match_operand:DF 1 "memory_operand" "")) + (set (match_operand:DF 2 "gpc_reg_operand" "=f") + (match_operand:DF 3 "memory_operand" ""))] + "TARGET_POWER2 + && TARGET_HARD_FLOAT + && registers_ok_for_quad_peep (operands[0], operands[2]) + && ! MEM_VOLATILE_P (operands[1]) && ! MEM_VOLATILE_P (operands[3]) + && addrs_ok_for_quad_peep (XEXP (operands[1], 0), XEXP (operands[3], 0))" + "lfq%U1%X1 %0,%1") + + (define_peephole + [(set (match_operand:DF 0 "memory_operand" "") + (match_operand:DF 1 "gpc_reg_operand" "f")) + (set (match_operand:DF 2 "memory_operand" "") + (match_operand:DF 3 "gpc_reg_operand" "f"))] + "TARGET_POWER2 + && TARGET_HARD_FLOAT + && registers_ok_for_quad_peep (operands[1], operands[3]) + && ! MEM_VOLATILE_P (operands[0]) && ! MEM_VOLATILE_P (operands[2]) + && addrs_ok_for_quad_peep (XEXP (operands[0], 0), XEXP (operands[2], 0))" + "stfq%U0%X0 %1,%0") ;; Next come insns related to the calling sequence. ;; ;; First, an insn to allocate new stack space for dynamic use (e.g., alloca). ! ;; We move the back-chain and decrement the stack pointer. (define_expand "allocate_stack" *************** *** 4498,4502 **** DONE; }") ! (define_expand "restore_stack_nonlocal" [(match_operand:SI 0 "register_operand" "") --- 5262,5266 ---- DONE; }") ! (define_expand "restore_stack_nonlocal" [(match_operand:SI 0 "register_operand" "") *************** *** 4517,4521 **** ;; the actual address of the function, whose second word contains a pointer ;; to its TOC, and whose third word contains a value to place in the static ! ;; chain register (r11). Note that if we load the static chain, our ;; "trampoline" need not have any executable code. ;; --- 5281,5285 ---- ;; the actual address of the function, whose second word contains a pointer ;; to its TOC, and whose third word contains a value to place in the static ! ;; chain register (r11). Note that if we load the static chain, our ;; "trampoline" need not have any executable code. ;; *************** *** 4553,4560 **** --- 5317,5327 ---- if (GET_CODE (operands[0]) != SYMBOL_REF) { + #ifndef USING_SVR4_H + /* AIX function pointers are really pointers to a three word area */ rtx temp = gen_reg_rtx (SImode); emit_insn (gen_call_via_ptr (temp, force_reg (SImode, operands[0]))); operands[0] = temp; + #endif /* !USING_SVR4_H */ } }") *************** *** 4574,4581 **** --- 5341,5351 ---- if (GET_CODE (operands[1]) != SYMBOL_REF) { + #ifndef USING_SVR4_H + /* AIX function pointers are really pointers to a three word area */ rtx temp = gen_reg_rtx (SImode); emit_insn (gen_call_via_ptr (temp, force_reg (SImode, operands[1]))); operands[1] = temp; + #endif /* !USING_SVR4_H */ } }") *************** *** 4591,4595 **** ;; Call to function which may be in another module. Restore the TOC ! ;; pointer (r2) after the call. (define_insn "" --- 5361,5365 ---- ;; Call to function which may be in another module. Restore the TOC ! ;; pointer (r2) after the call unless this is System V. (define_insn "" *************** *** 4598,4604 **** (clobber (match_scratch:SI 2 "=l,l"))] "" ! "@ ! {brl|blrl}\;{l|lwz} 2,20(1) ! bl %z0\;%." [(set_attr "length" "8")]) --- 5368,5386 ---- (clobber (match_scratch:SI 2 "=l,l"))] "" ! "* ! { ! #ifndef USING_SVR4_H ! if (GET_CODE (operands[0]) == REG) ! return \"{brl|blrl}\;{l|lwz} 2,20(1)\"; ! ! return \"bl %z0\;%.\"; ! ! #else ! if (GET_CODE (operands[0]) == REG) ! return \"{brl|blrl}\"; ! ! return \"bl %z0\"; ! #endif ! }" [(set_attr "length" "8")]) *************** *** 4617,4623 **** (clobber (match_scratch:SI 3 "=l,l"))] "" ! "@ ! {brl|blrl}\;{l|lwz} 2,20(1) ! bl %z1\;%." [(set_attr "length" "8")]) --- 5399,5417 ---- (clobber (match_scratch:SI 3 "=l,l"))] "" ! "* ! { ! #ifndef USING_SVR4_H ! if (GET_CODE (operands[1]) == REG) ! return \"{brl|blrl}\;{l|lwz} 2,20(1)\"; ! ! return \"bl %z1\;%.\"; ! ! #else ! if (GET_CODE (operands[1]) == REG) ! return \"{brl|blrl}\"; ! ! return \"bl %z1\"; ! #endif ! }" [(set_attr "length" "8")]) *************** *** 4660,4664 **** ;; Compare insns are next. Note that the RS/6000 has two types of compares, ! ;; signed & unsigned, and one type of branch. ;; ;; Start with the DEFINE_EXPANDs to generate the rtl for compares, scc --- 5454,5458 ---- ;; Compare insns are next. Note that the RS/6000 has two types of compares, ! ;; signed & unsigned, and one type of branch. ;; ;; Start with the DEFINE_EXPANDs to generate the rtl for compares, scc *************** *** 4687,4691 **** [(set (cc0) (compare (match_operand:SF 0 "gpc_reg_operand" "") (match_operand:SF 1 "gpc_reg_operand" "")))] ! "" " { --- 5481,5485 ---- [(set (cc0) (compare (match_operand:SF 0 "gpc_reg_operand" "") (match_operand:SF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" " { *************** *** 4699,4703 **** [(set (cc0) (compare (match_operand:DF 0 "gpc_reg_operand" "") (match_operand:DF 1 "gpc_reg_operand" "")))] ! "" " { --- 5493,5497 ---- [(set (cc0) (compare (match_operand:DF 0 "gpc_reg_operand" "") (match_operand:DF 1 "gpc_reg_operand" "")))] ! "TARGET_HARD_FLOAT" " { *************** *** 5051,5055 **** "#" [(set_attr "length" "8")]) ! (define_insn "" [(set (match_operand:CCUNS 3 "cc_reg_operand" "=y") --- 5845,5849 ---- "#" [(set_attr "length" "8")]) ! (define_insn "" [(set (match_operand:CCUNS 3 "cc_reg_operand" "=y") *************** *** 5061,5065 **** "#" [(set_attr "length" "8")]) ! (define_split [(set (match_operand:CC 3 "cc_reg_operand" "") --- 5855,5859 ---- "#" [(set_attr "length" "8")]) ! (define_split [(set (match_operand:CC 3 "cc_reg_operand" "") *************** *** 5086,5090 **** (compare:CCFP (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) --- 5880,5884 ---- (compare:CCFP (match_operand:SF 1 "gpc_reg_operand" "f") (match_operand:SF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) *************** *** 5094,5098 **** (compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) --- 5888,5892 ---- (compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "f") (match_operand:DF 2 "gpc_reg_operand" "f")))] ! "TARGET_HARD_FLOAT" "fcmpu %0,%1,%2" [(set_attr "type" "fpcompare")]) *************** *** 5261,5265 **** (define_insn "" [(set (match_operand:CC 4 "cc_reg_operand" "=x,x,x,x,x") ! (compare:CC (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r") (match_operand:SI 2 "reg_or_cint_operand" "r,O,K,J,I")) --- 6055,6059 ---- (define_insn "" [(set (match_operand:CC 4 "cc_reg_operand" "=x,x,x,x,x") ! (compare:CC (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r") (match_operand:SI 2 "reg_or_cint_operand" "r,O,K,J,I")) *************** *** 5310,5314 **** (define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,x,x,x") ! (compare:CC (plus:SI (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r") --- 6104,6108 ---- (define_insn "" [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,x,x,x") ! (compare:CC (plus:SI (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r") *************** *** 5329,5333 **** (define_insn "" [(set (match_operand:CC 5 "cc_reg_operand" "=x,x,x,x,x") ! (compare:CC (plus:SI (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r") --- 6123,6127 ---- (define_insn "" [(set (match_operand:CC 5 "cc_reg_operand" "=x,x,x,x,x") ! (compare:CC (plus:SI (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r") *************** *** 5361,5364 **** --- 6155,6169 ---- [(set_attr "length" "12,8,12,12,12")]) + ;; Simplify (ne X (const_int 0)) on the PowerPC. No need to on the Power, + ;; since it nabs/sr is just as fast. + (define_insn "" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (lshiftrt:SI (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r"))) + (const_int 31))) + (clobber (match_scratch:SI 2 "=&r"))] + "!TARGET_POWER" + "{ai|addic} %2,%1,-1\;{sfe|subfe} %0,%2,%1" + [(set_attr "length" "8")]) + ;; This is what (plus (ne X (const_int 0)) Y) looks like. (define_insn "" *************** *** 6298,6302 **** "@ bctr ! {br|blr}") (define_insn "nop" --- 7103,7108 ---- "@ bctr ! {br|blr}" ! [(set_attr "type" "jmpreg")]) (define_insn "nop" *************** *** 6305,6309 **** "{cror 0,0,0|nop}") ! ;; Define the subtract-one-and-jump insns, starting with the template ;; so loop.c knows what to generate. --- 7111,7115 ---- "{cror 0,0,0|nop}") ! ;; Define the subtract-one-and-jump insns, starting with the template ;; so loop.c knows what to generate. *************** *** 6319,6330 **** ;; We need to be able to do this for any operand, including MEM, or we ;; will cause reload to blow up since we don't allow output reloads on ! ;; JUMP_INSNs. (define_insn "" [(set (pc) ! (if_then_else (ne (match_operand:SI 1 "register_operand" "0,*r,*r") (const_int 1)) ! (label_ref (match_operand 2 "" "")) (pc))) ! (set (match_operand:SI 0 "register_operand" "=c,*r,m*q*c*l") (plus:SI (match_dup 1) (const_int -1))) (clobber (match_scratch:CC 3 "=X,&x,&x")) --- 7125,7136 ---- ;; We need to be able to do this for any operand, including MEM, or we ;; will cause reload to blow up since we don't allow output reloads on ! ;; JUMP_INSNs. (define_insn "" [(set (pc) ! (if_then_else (ne (match_operand:SI 1 "register_operand" "2,*r,*r") (const_int 1)) ! (label_ref (match_operand 0 "" "")) (pc))) ! (set (match_operand:SI 2 "register_operand" "=c,*r,m*q*c*l") (plus:SI (match_dup 1) (const_int -1))) (clobber (match_scratch:CC 3 "=X,&x,&x")) *************** *** 6336,6354 **** return \"#\"; else if (get_attr_length (insn) == 8) ! return \"{bdn|bdnz} %l2\"; else ! return \"bdz $+8\;b %l2\"; }" [(set_attr "type" "branch") (set_attr "length" "*,12,16")]) ! ;; Similar, but we can use GE since we have a REG_NONNEG. (define_insn "" [(set (pc) ! (if_then_else (ge (match_operand:SI 1 "register_operand" "0,*r,*r") (const_int 0)) ! (label_ref (match_operand 2 "" "")) (pc))) ! (set (match_operand:SI 0 "register_operand" "=c,*r,m*q*c*l") (plus:SI (match_dup 1) (const_int -1))) (clobber (match_scratch:CC 3 "=X,&x,&X")) --- 7142,7160 ---- return \"#\"; else if (get_attr_length (insn) == 8) ! return \"{bdn|bdnz} %l0\"; else ! return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") (set_attr "length" "*,12,16")]) ! ;; Similar, but we can use GE since we have a REG_NONNEG. (define_insn "" [(set (pc) ! (if_then_else (ge (match_operand:SI 1 "register_operand" "2,*r,*r") (const_int 0)) ! (label_ref (match_operand 0 "" "")) (pc))) ! (set (match_operand:SI 2 "register_operand" "=c,*r,m*q*c*l") (plus:SI (match_dup 1) (const_int -1))) (clobber (match_scratch:CC 3 "=X,&x,&X")) *************** *** 6360,6377 **** return \"#\"; else if (get_attr_length (insn) == 8) ! return \"{bdn|bdnz} %l2\"; else ! return \"bdz $+8\;b %l2\"; }" [(set_attr "type" "branch") (set_attr "length" "*,12,16")]) ! (define_insn "" [(set (pc) ! (if_then_else (eq (match_operand:SI 1 "register_operand" "0,*r,*r") (const_int 1)) ! (label_ref (match_operand 2 "" "")) (pc))) ! (set (match_operand:SI 0 "register_operand" "=c,*r,m*q*c*l") (plus:SI (match_dup 1) (const_int -1))) (clobber (match_scratch:CC 3 "=X,&x,&x")) --- 7166,7183 ---- return \"#\"; else if (get_attr_length (insn) == 8) ! return \"{bdn|bdnz} %l0\"; else ! return \"bdz $+8\;b %l0\"; }" [(set_attr "type" "branch") (set_attr "length" "*,12,16")]) ! (define_insn "" [(set (pc) ! (if_then_else (eq (match_operand:SI 1 "register_operand" "2,*r,*r") (const_int 1)) ! (label_ref (match_operand 0 "" "")) (pc))) ! (set (match_operand:SI 2 "register_operand" "=c,*r,m*q*c*l") (plus:SI (match_dup 1) (const_int -1))) (clobber (match_scratch:CC 3 "=X,&x,&x")) *************** *** 6383,6389 **** return \"#\"; else if (get_attr_length (insn) == 8) ! return \"bdz %l2\"; else ! return \"{bdn|bdnz} $+8\;b %l2\"; }" [(set_attr "type" "branch") --- 7189,7195 ---- return \"#\"; else if (get_attr_length (insn) == 8) ! return \"bdz %l0\"; else ! return \"{bdn|bdnz} $+8\;b %l0\"; }" [(set_attr "type" "branch") diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/sysv4.h gcc-2.7.0/config/rs6000/sysv4.h *** gcc-2.6.3/config/rs6000/sysv4.h --- gcc-2.7.0/config/rs6000/sysv4.h Thu Jun 15 16:28:53 1995 *************** *** 0 **** --- 1,414 ---- + /* Target definitions for GNU compiler for PowerPC running System V.4 + Copyright (C) 1995, Free Software Foundation, Inc. + Contributed by Cygnus Support. + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* eABI local switches -- put here rather than eabi.h, so the switches + can be tested in macros. */ + + #define MASK_NO_BITFIELD_TYPE 0x40000000 /* Set PCC_BITFIELD_TYPE_MATTERS to 0 */ + #define MASK_STRICT_ALIGN 0x20000000 /* Set STRICT_ALIGNMENT to 1. */ + #define MASK_RELOCATABLE 0x10000000 /* GOT pointers are PC relative */ + #define MASK_NO_TRACEBACK 0x08000000 /* eliminate traceback words */ + #define MASK_LITTLE_ENDIAN 0x04000000 /* target is little endian */ + #define MASK_NO_TOC 0x02000000 /* do not use TOC for loading addresses */ + + #define TARGET_NO_BITFIELD_TYPE (target_flags & MASK_NO_BITFIELD_TYPE) + #define TARGET_STRICT_ALIGN (target_flags & MASK_STRICT_ALIGN) + #define TARGET_RELOCATABLE (target_flags & MASK_RELOCATABLE) + #define TARGET_NO_TRACEBACK (target_flags & MASK_NO_TRACEBACK) + #define TARGET_LITTLE_ENDIAN (target_flags & MASK_LITTLE_ENDIAN) + #define TARGET_NO_TOC (target_flags & MASK_NO_TOC) + + #define TARGET_BITFIELD_TYPE (! TARGET_NO_BITFIELD_TYPE) + #define TARGET_TRACEBACK (! TARGET_NO_TRACEBACK) + #define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN) + #define TARGET_TOC (! TARGET_NO_TOC) + + #undef SUBTARGET_SWITCHES + #define SUBTARGET_SWITCHES \ + { "bit-align", -MASK_NO_BITFIELD_TYPE }, \ + { "no-bit-align", MASK_NO_BITFIELD_TYPE }, \ + { "strict-align", MASK_STRICT_ALIGN }, \ + { "no-strict-align", -MASK_STRICT_ALIGN }, \ + { "relocatable", MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC }, \ + { "no-relocatable", -MASK_RELOCATABLE }, \ + { "traceback", -MASK_NO_TRACEBACK }, \ + { "no-traceback", MASK_NO_TRACEBACK }, \ + { "little-endian", MASK_LITTLE_ENDIAN }, \ + { "little", MASK_LITTLE_ENDIAN }, \ + { "big-endian", -MASK_LITTLE_ENDIAN }, \ + { "big", -MASK_LITTLE_ENDIAN }, \ + { "no-toc", MASK_NO_TOC | MASK_MINIMAL_TOC }, \ + { "toc", -MASK_NO_TOC }, + + /* Sometimes certain combinations of command options do not make sense + on a particular target machine. You can define a macro + `OVERRIDE_OPTIONS' to take account of this. This macro, if + defined, is executed once just after all the command options have + been parsed. + + The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to + get control. */ + + #define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + if (TARGET_RELOCATABLE && TARGET_NO_TOC) \ + { \ + target_flags &= ~ MASK_NO_TOC; \ + error ("-mrelocatable and -mno-toc are incompatible."); \ + } \ + \ + if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC) \ + { \ + target_flags |= MASK_MINIMAL_TOC; \ + error ("-mrelocatable and -mno-minimal-toc are incompatible."); \ + } \ + \ + if (TARGET_NO_TOC && !TARGET_MINIMAL_TOC) \ + { \ + target_flags |= MASK_MINIMAL_TOC; \ + error ("-mno-toc and -mno-minimal-toc are incompatible."); \ + } \ + } while (0) + + #include "rs6000/powerpc.h" + + /* System V.4 uses register 13 as a pointer to the small data area, + so it is not available to the normal user. */ + + #undef FIXED_R13 + #define FIXED_R13 1 + + /* Override default big endianism */ + #undef BYTES_BIG_ENDIAN + #undef WORDS_BIG_ENDIAN + #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN) + #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN) + + /* Don't generate XCOFF debugging information. */ + + #undef XCOFF_DEBUGGING_INFO + + /* Don't use the COFF object file format. */ + + #undef OBJECT_FORMAT_COFF + + /* The XCOFF support uses weird symbol suffixes, which we don't want + for ELF. */ + + #undef RS6000_OUTPUT_BASENAME + #define RS6000_OUTPUT_BASENAME(FILE, NAME) assemble_name (FILE, NAME) + + /* Don't bother to output .extern pseudo-ops. They are not needed by + ELF assemblers. */ + + #undef ASM_OUTPUT_EXTERNAL + + /* Undefine some things which are defined by the generic svr4.h. */ + + #undef ASM_FILE_END + #undef ASM_OUTPUT_EXTERNAL_LIBCALL + #undef READONLY_DATA_SECTION + #undef SELECT_SECTION + #undef ASM_DECLARE_FUNCTION_NAME + + /* Use the regular svr4 definitions. */ + + #include "svr4.h" + + /* Prefix and suffix to use to saving floating point */ + #undef SAVE_FP_PREFIX + #undef SAVE_FP_SUFFIX + #define SAVE_FP_PREFIX "_savefpr_" + #define SAVE_FP_SUFFIX "_l" + + /* Prefix and suffix to use to restoring floating point */ + #undef RESTORE_FP_PREFIX + #undef RESTORE_FP_SUFFIX + #define RESTORE_FP_PREFIX "_restfpr_" + #define RESTORE_FP_SUFFIX "_l" + + /* Type used for ptrdiff_t, as a string used in a declaration. */ + #undef PTRDIFF_TYPE + #define PTRDIFF_TYPE "int" + + /* Type used for wchar_t, as a string used in a declaration. */ + #undef WCHAR_TYPE + #define WCHAR_TYPE "short unsigned int" + + /* Width of wchar_t in bits. */ + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 16 + + /* Align stack to 16 byte boundaries */ + #undef STACK_BOUNDARY + #define STACK_BOUNDARY 128 + + /* No data type wants to be aligned rounder than this. */ + #undef BIGGEST_ALIGNMENT + #define BIGGEST_ALIGNMENT 128 + + /* Use ELF style section commands. */ + + #undef TEXT_SECTION_ASM_OP + #define TEXT_SECTION_ASM_OP "\t.section\t\".text\"" + + #undef DATA_SECTION_ASM_OP + #define DATA_SECTION_ASM_OP "\t.section\t\".data\"" + + /* Besides the usual ELF sections, we need a toc section. */ + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_toc + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + CONST_SECTION_FUNCTION \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION \ + TOC_SECTION_FUNCTION + + #define TOC_SECTION_FUNCTION \ + void \ + toc_section () \ + { \ + static int toc_initialized = 0; \ + \ + if (in_section != in_toc) \ + { \ + if (! toc_initialized) \ + { \ + if (!TARGET_RELOCATABLE && !TARGET_NO_TOC) \ + fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \ + \ + if (TARGET_MINIMAL_TOC) \ + { \ + if (!TARGET_RELOCATABLE && !TARGET_NO_TOC) \ + { \ + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LCTOC", 0); \ + fprintf (asm_out_file, "\t.tc "); \ + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); \ + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ + fprintf (asm_out_file, "\n"); \ + } \ + \ + fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ + fprintf (asm_out_file, " = .+32768\n"); \ + } \ + \ + toc_initialized = 1; \ + } \ + \ + else \ + fprintf (asm_out_file, "%s\n", \ + (TARGET_MINIMAL_TOC \ + ? MINIMAL_TOC_SECTION_ASM_OP \ + : TOC_SECTION_ASM_OP)); \ + \ + in_section = in_toc; \ + } \ + } + + #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\"" + #define MINIMAL_TOC_SECTION_ASM_OP "\t.section\t\".got1\",\"aw\"" + + /* Use the TOC section for TOC entries. */ + + #undef SELECT_RTX_SECTION + #define SELECT_RTX_SECTION(MODE, X) \ + { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (X)) \ + toc_section (); \ + else \ + const_section (); \ + } + + /* These macros generate the special .type and .size directives which + are used to set the corresponding fields of the linker symbol table + entries in an ELF object file under SVR4. These macros also output + the starting labels for the relevant functions/objects. */ + + /* Write the extra assembler code needed to declare a function properly. + Some svr4 assemblers need to also have something extra said about the + function's return value. We allow for that here. */ + + extern void svr4_traceback (); + extern int rs6000_pic_labelno; + + #undef ASM_DECLARE_FUNCTION_NAME + #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do { \ + if (TARGET_RELOCATABLE && get_pool_size () != 0) \ + { \ + char buf[256]; \ + \ + ASM_OUTPUT_INTERNAL_LABEL (FILE, "LCL", rs6000_pic_labelno); \ + \ + ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); \ + fprintf (FILE, (TARGET_POWERPC64) ? "\t.quad " : "\t.long "); \ + assemble_name (FILE, buf); \ + putc ('-', FILE); \ + \ + ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); \ + assemble_name (FILE, buf); \ + putc ('\n', FILE); \ + } \ + \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ + putc ('\n', FILE); \ + if (TARGET_TRACEBACK) \ + svr4_traceback (FILE, NAME, DECL); \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + + /* How to renumber registers for dbx and gdb. */ + + #define DBX_REGISTER_NUMBER(REGNO) (REGNO) + + /* svr4.h overrides ASM_OUTPUT_INTERNAL_LABEL. */ + + #undef ASM_OUTPUT_INTERNAL_LABEL_PREFIX + #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ + fprintf (FILE, ".%s", PREFIX) + + /* Pass -mppc to the assembler, since that is what powerpc.h currently + implies. */ + #undef ASM_SPEC + #define ASM_SPEC \ + "-u \ + %{mcpu=601: -m601} %{mcpu=ppc601: -m601} %{mcpu=mpc601: -m601} \ + %{!mcpu=601: %{!mcpu=ppc601: %{!mcpu=mpc601: -mppc }}} \ + %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ + %{mrelocatable} \ + %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}" + + /* This is the end of what might become sysv4.h. */ + + /* Allow stabs and dwarf, prefer dwarf. */ + #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG + #define DBX_DEBUGGING_INFO + #define DWARF_DEBUGGING_INFO + + /* This macro gets just the user-specified name + out of the string in a SYMBOL_REF. Discard + a leading * */ + #undef STRIP_NAME_ENCODING + #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ + (VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*')) + + /* Like block addresses, stabs line numbers are relative to the + current function. */ + + #undef ASM_OUTPUT_SOURCE_LINE + #define ASM_OUTPUT_SOURCE_LINE(file, line) \ + do \ + { \ + static int sym_lineno = 1; \ + char *_p; \ + fprintf (file, "\t.stabn 68,0,%d,.LM%d-", \ + line, sym_lineno); \ + STRIP_NAME_ENCODING (_p, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ + assemble_name (file, _p); \ + fprintf (file, "\n.LM%d:\n", sym_lineno); \ + sym_lineno += 1; \ + } \ + while (0) + + /* But, to make this work, we have to output the stabs for the function + name *first*... */ + + #define DBX_FUNCTION_FIRST + + /* This is the end of what might become sysv4dbx.h. */ + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)"); + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES \ + "-DPPC -Dunix -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(powerpc) -Amachine(powerpc)" + + /* Don't put -Y P, for cross compilers */ + #undef LINK_SPEC + #ifdef CROSS_COMPILE + #define LINK_SPEC "\ + %{h*} %{V} %{v:%{!V:-V}} \ + %{b} %{Wl,*:%*} \ + %{static:-dn -Bstatic} \ + %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \ + %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \ + %{G:-G} \ + %{YP,*} \ + %{Qy:} %{!Qn:-Qy} \ + %{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \ + %{mbig: -oformat elf32-powerpc } %{mbig-endian: -oformat elf32-powerpc }" + #else + + #define LINK_SPEC "\ + %{h*} %{V} %{v:%{!V:-V}} \ + %{b} %{Wl,*:%*} \ + %{static:-dn -Bstatic} \ + %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \ + %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \ + %{G:-G} \ + %{YP,*} \ + %{!nostdlib: %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ + %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \ + %{Qy:} %{!Qn:-Qy} \ + %{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \ + %{mbig: -oformat elf32-powerpc } %{mbig-endian: -oformat elf32-powerpc }" + #endif /* CROSS_COMPILE */ + + #undef CPP_SPEC + #define CPP_SPEC "\ + %{posix: -D_POSIX_SOURCE} \ + %{mrelocatable: -D_RELOCATABLE} \ + %{mlittle: -D_LITTLE_ENDIAN -Amachine(littleendian)} \ + %{mlittle-endian: -D_LITTLE_ENDIAN -Amachine(littleendian)} \ + %{!mlittle: %{!mlittle-endian: -D_BIG_ENDIAN -Amachine(bigendian)}} \ + %{!mcpu*: \ + %{mpower: %{!mpower2: -D_ARCH_PWR}} \ + %{mpower2: -D_ARCH_PWR2} \ + %{mpowerpc*: -D_ARCH_PPC} \ + %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ + %{!mno-powerpc: -D_ARCH_PPC}} \ + %{mcpu=common: -D_ARCH_COM} \ + %{mcpu=power: -D_ARCH_PWR} \ + %{mcpu=powerpc: -D_ARCH_PPC} \ + %{mcpu=rios: -D_ARCH_PWR} \ + %{mcpu=rios1: -D_ARCH_PWR} \ + %{mcpu=rios2: -D_ARCH_PWR2} \ + %{mcpu=rsc: -D_ARCH_PWR} \ + %{mcpu=rsc1: -D_ARCH_PWR} \ + %{mcpu=403: -D_ARCH_PPC} \ + %{mcpu=mpc403: -D_ARCH_PPC} \ + %{mcpu=ppc403: -D_ARCH_PPC} \ + %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=mpc601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=ppc601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=603: -D_ARCH_PPC} \ + %{mcpu=mpc603: -D_ARCH_PPC} \ + %{mcpu=ppc603: -D_ARCH_PPC} \ + %{mcpu=604: -D_ARCH_PPC} \ + %{mcpu=mpc604: -D_ARCH_PPC} \ + %{mcpu=ppc604: -D_ARCH_PPC}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/sysv4le.h gcc-2.7.0/config/rs6000/sysv4le.h *** gcc-2.6.3/config/rs6000/sysv4le.h --- gcc-2.7.0/config/rs6000/sysv4le.h Thu Jun 15 16:29:02 1995 *************** *** 0 **** --- 1,60 ---- + /* Target definitions for GNU compiler for a little endian PowerPC + running System V.4 + Copyright (C) 1995, Free Software Foundation, Inc. + Contributed by Cygnus Support. + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "rs6000/sysv4.h" + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_LITTLE_ENDIAN) + + #undef CPP_SPEC + #define CPP_SPEC "\ + %{posix: -D_POSIX_SOURCE} \ + %{mrelocatable: -D_RELOCATABLE} \ + %{mbig: -D_BIG_ENDIAN -Amachine(bigendian)} \ + %{mbig-endian: -D_BIG_ENDIAN -Amachine(bigendian)} \ + %{!mbig: %{!mbig-endian: -D_LITTLE_ENDIAN -Amachine(littleendian)}} \ + %{!mcpu*: \ + %{mpower: %{!mpower2: -D_ARCH_PWR}} \ + %{mpower2: -D_ARCH_PWR2} \ + %{mpowerpc*: -D_ARCH_PPC} \ + %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ + %{!mno-powerpc: -D_ARCH_PPC}} \ + %{mcpu=common: -D_ARCH_COM} \ + %{mcpu=power: -D_ARCH_PWR} \ + %{mcpu=powerpc: -D_ARCH_PPC} \ + %{mcpu=rios: -D_ARCH_PWR} \ + %{mcpu=rios1: -D_ARCH_PWR} \ + %{mcpu=rios2: -D_ARCH_PWR2} \ + %{mcpu=rsc: -D_ARCH_PWR} \ + %{mcpu=rsc1: -D_ARCH_PWR} \ + %{mcpu=403: -D_ARCH_PPC} \ + %{mcpu=mpc403: -D_ARCH_PPC} \ + %{mcpu=ppc403: -D_ARCH_PPC} \ + %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=mpc601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=ppc601: -D_ARCH_PPC -D_ARCH_PWR} \ + %{mcpu=603: -D_ARCH_PPC} \ + %{mcpu=mpc603: -D_ARCH_PPC} \ + %{mcpu=ppc603: -D_ARCH_PPC} \ + %{mcpu=604: -D_ARCH_PPC} \ + %{mcpu=mpc604: -D_ARCH_PPC} \ + %{mcpu=ppc604: -D_ARCH_PPC}" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/t-eabi gcc-2.7.0/config/rs6000/t-eabi *** gcc-2.6.3/config/rs6000/t-eabi --- gcc-2.7.0/config/rs6000/t-eabi Wed May 10 16:31:16 1995 *************** *** 0 **** --- 1,34 ---- + # Do not build libgcc1. + LIBGCC1 = + CROSS_LIBGCC1 = + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... [taken from t-sparclite] + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c eabi.asm eabi-ctors.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + eabi.asm: $(srcdir)/config/rs6000/eabi.asm + cat $(srcdir)/config/rs6000/eabi.asm > eabi.asm + + eabi-ctors.c: $(srcdir)/config/rs6000/eabi-ctors.c + cat $(srcdir)/config/rs6000/eabi-ctors.c > eabi-ctors.c + + # Build libgcc.a with different options. If no gas support, don't build + # explicit little endian or big endian libraries, since it depends on the + # -mbig/-mlittle switches passed to gas. The -mrelocatable support also needs + # -mrelocatable passed to gas, so don't use it either. + + MULTILIB_OPTIONS = msoft-float + MULTILIB_DIRNAMES = soft-float + MULTILIB_MATCHES = msoft-float=mcpu?403 \ + msoft-float=mcpu?mpc403 \ + msoft-float=mcpu?ppc403 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/t-eabigas gcc-2.7.0/config/rs6000/t-eabigas *** gcc-2.6.3/config/rs6000/t-eabigas --- gcc-2.7.0/config/rs6000/t-eabigas Mon May 22 14:58:43 1995 *************** *** 0 **** --- 1,39 ---- + # Do not build libgcc1. + LIBGCC1 = + CROSS_LIBGCC1 = + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... [taken from t-sparclite] + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c eabi.asm eabi-ctors.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + eabi.asm: $(srcdir)/config/rs6000/eabi.asm + cat $(srcdir)/config/rs6000/eabi.asm > eabi.asm + + eabi-ctors.c: $(srcdir)/config/rs6000/eabi-ctors.c + cat $(srcdir)/config/rs6000/eabi-ctors.c > eabi-ctors.c + + # Build libgcc.a with different options. + + MULTILIB_OPTIONS = msoft-float \ + mrelocatable/mno-toc \ + mlittle/mbig + + MULTILIB_DIRNAMES = soft-float \ + relocatable no-toc \ + little-endian big-endian + + MULTILIB_MATCHES = mlittle=mlittle-endian \ + mbig=mbig-endian \ + msoft-float=mcpu?403 \ + msoft-float=mcpu?mpc403 \ + msoft-float=mcpu?ppc403 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/t-ppc gcc-2.7.0/config/rs6000/t-ppc *** gcc-2.6.3/config/rs6000/t-ppc --- gcc-2.7.0/config/rs6000/t-ppc Wed May 10 16:31:18 1995 *************** *** 0 **** --- 1,27 ---- + # Do not build libgcc1. + LIBGCC1 = + CROSS_LIBGCC1 = + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... [taken from t-sparclite] + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # Build libgcc.a with different options. If no gas support, don't build + # explicit little endian or big endian libraries, since it depends on the + # -mbig/-mlittle switches passed to gas. + + MULTILIB_OPTIONS = msoft-float + MULTILIB_DIRNAMES = soft-float + MULTILIB_MATCHES = msoft-float=mcpu?403 \ + msoft-float=mcpu?mpc403 \ + msoft-float=mcpu?ppc403 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/t-ppcgas gcc-2.7.0/config/rs6000/t-ppcgas *** gcc-2.6.3/config/rs6000/t-ppcgas --- gcc-2.7.0/config/rs6000/t-ppcgas Mon May 22 14:58:44 1995 *************** *** 0 **** --- 1,33 ---- + # Do not build libgcc1. + LIBGCC1 = + CROSS_LIBGCC1 = + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... [taken from t-sparclite] + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # Build libgcc.a with different options. + + MULTILIB_OPTIONS = msoft-float \ + mno-toc \ + mlittle/mbig + + MULTILIB_DIRNAMES = soft-float \ + no-toc \ + little-endian big-endian + + MULTILIB_MATCHES = mlittle=mlittle-endian \ + mbig=mbig-endian \ + msoft-float=mcpu?403 \ + msoft-float=mcpu?mpc403 \ + msoft-float=mcpu?ppc403 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/t-rs6000 gcc-2.7.0/config/rs6000/t-rs6000 *** gcc-2.6.3/config/rs6000/t-rs6000 --- gcc-2.7.0/config/rs6000/t-rs6000 Thu Feb 23 15:33:31 1995 *************** *** 0 **** --- 1,22 ---- + # Do not build libgcc1. + LIBGCC1 = + CROSS_LIBGCC1 = + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... [taken from t-sparclite] + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # Build the libraries for both hard and soft floating point + + MULTILIB_OPTIONS = msoft-float + MULTILIB_DIRNAMES = soft-float + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/x-lynx gcc-2.7.0/config/rs6000/x-lynx *** gcc-2.6.3/config/rs6000/x-lynx --- gcc-2.7.0/config/rs6000/x-lynx Sat Feb 18 12:14:55 1995 *************** *** 0 **** --- 1,14 ---- + # /bin/cc is hopelessly broken, so we must use /bin/gcc instead. + CC = $(OLDCC) + OLDCC = /bin/gcc + + # /bin/sh is too buggy, so use /bin/bash instead. + SHELL = /bin/bash + + # Show we need to use the C version of ALLOCA + ALLOCA=alloca.o + + # configuration for IBM rs6000 running lynx + + # For some reason, we need -lm for cc1. + CLIB=-lm diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/x-sysv4 gcc-2.7.0/config/rs6000/x-sysv4 *** gcc-2.6.3/config/rs6000/x-sysv4 --- gcc-2.7.0/config/rs6000/x-sysv4 Wed Feb 1 17:00:13 1995 *************** *** 0 **** --- 1,2 ---- + X_CFLAGS=-DSVR4 + ALLOCA=alloca.o diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/xm-lynx.h gcc-2.7.0/config/rs6000/xm-lynx.h *** gcc-2.6.3/config/rs6000/xm-lynx.h --- gcc-2.7.0/config/rs6000/xm-lynx.h Thu Jun 15 16:29:10 1995 *************** *** 0 **** --- 1,35 ---- + /* Configuration for GNU C-compiler for rs6000 platforms running LynxOS. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + /* This describes the machine the compiler is hosted on. */ + #define HOST_BITS_PER_CHAR 8 + #define HOST_BITS_PER_SHORT 16 + #define HOST_BITS_PER_INT 32 + #define HOST_BITS_PER_LONG 32 + #define HOST_BITS_PER_LONGLONG 64 + + #define HOST_WORDS_BIG_ENDIAN 1 + + /* target machine dependencies. + tm.h is a symbolic link to the actual target specific file. */ + + #include "tm.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/xm-mach.h gcc-2.7.0/config/rs6000/xm-mach.h *** gcc-2.6.3/config/rs6000/xm-mach.h Sat Dec 26 21:34:38 1992 --- gcc-2.7.0/config/rs6000/xm-mach.h Thu Jun 15 16:29:21 1995 *************** *** 17,23 **** 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 "rs6000/xm-rs6000.h" #undef USG --- 17,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "rs6000/xm-rs6000.h" #undef USG + #undef COLLECT_EXPORT_LIST diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/xm-rs6000.h gcc-2.7.0/config/rs6000/xm-rs6000.h *** gcc-2.6.3/config/rs6000/xm-rs6000.h Sat Jun 26 11:30:34 1993 --- gcc-2.7.0/config/rs6000/xm-rs6000.h Thu Jun 15 16:29:42 1995 *************** *** 1,5 **** /* Configuration for GNU C-compiler for IBM RS/6000. ! Copyright (C) 1990, 1993 Free Software Foundation, Inc. ! Contributed by Richard Kenner (kenner@nyu.edu). This file is part of GNU CC. --- 1,5 ---- /* Configuration for GNU C-compiler for IBM RS/6000. ! Copyright (C) 1990, 1993, 1995 Free Software Foundation, Inc. ! Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu). This file is part of GNU CC. *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 39,44 **** /* Arguments to use with `exit'. */ #define SUCCESS_EXIT_CODE 0 ! #define FAILURE_EXIT_CODE 2 ! #define FATAL_EXIT_CODE 3 /* If not compiled with GNU C, use the C alloca and use only int bitfields. */ --- 40,44 ---- /* Arguments to use with `exit'. */ #define SUCCESS_EXIT_CODE 0 ! #define FATAL_EXIT_CODE 33 /* If not compiled with GNU C, use the C alloca and use only int bitfields. */ *************** *** 53,54 **** --- 53,60 ---- /* Big buffers improve performance. */ #define IO_BUFFER_SIZE (0x8000 - 4096) + + #ifndef CROSS_COMPILE + /* The AIX linker will discard static constructors in object files before + collect has a chance to see them, so scan the object files directly. */ + #define COLLECT_EXPORT_LIST + #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/rs6000/xm-sysv4.h gcc-2.7.0/config/rs6000/xm-sysv4.h *** gcc-2.6.3/config/rs6000/xm-sysv4.h --- gcc-2.7.0/config/rs6000/xm-sysv4.h Thu Jun 15 16:29:52 1995 *************** *** 0 **** --- 1,53 ---- + /* Configuration for GNU C-compiler for PowerPC running System V.4. + Copyright (C) 1995 Free Software Foundation, Inc. + + Cloned from sparc/xm-sysv4.h by Michael Meissner (meissner@cygnus.com). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + /* #defines that need visibility everywhere. */ + #define FALSE 0 + #define TRUE 1 + + /* This describes the machine the compiler is hosted on. */ + #define HOST_BITS_PER_CHAR 8 + #define HOST_BITS_PER_SHORT 16 + #define HOST_BITS_PER_INT 32 + #define HOST_BITS_PER_LONG 32 + #if 0 + #define HOST_BITS_PER_LONGLONG 64 + #endif + + /* Doubles are stored in memory with the high order word first. This + matters when cross-compiling. */ + #define HOST_WORDS_BIG_ENDIAN 1 + + /* target machine dependencies. + 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 + + #include "xm-svr4.h" + + #ifndef __GNUC__ + #define ONLY_INT_FIELDS + #endif Only in gcc-2.6.3/config/sh: ashlsi3.c Only in gcc-2.6.3/config/sh: ashrsi3.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sh/lib1funcs.asm gcc-2.7.0/config/sh/lib1funcs.asm *** gcc-2.6.3/config/sh/lib1funcs.asm Fri Sep 9 19:40:46 1994 --- gcc-2.7.0/config/sh/lib1funcs.asm Thu Jun 15 16:30:08 1995 *************** *** 21,25 **** You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, if you link this library with other files, --- 21,26 ---- You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with other files, *************** *** 35,38 **** --- 36,42 ---- !! sac@cygnus.com + !! ashiftrt_r4_x, ___ashrsi3, ___ashlsi3, ___lshrsi3 routines + !! recoded in assembly by Toshiyasu Morita + !! tm@netcom.com #ifdef L_ashiftrt *************** *** 71,78 **** .global ___ashiftrt_r4_32 ___ashiftrt_r4_32: - shar r4 ___ashiftrt_r4_31: ! shar r4 ___ashiftrt_r4_30: shar r4 --- 75,85 ---- .global ___ashiftrt_r4_32 + .align 1 ___ashiftrt_r4_32: ___ashiftrt_r4_31: ! rotcl r4 ! rts ! subc r4,r4 ! ___ashiftrt_r4_30: shar r4 *************** *** 88,92 **** shar r4 ___ashiftrt_r4_24: ! shar r4 ___ashiftrt_r4_23: shar r4 --- 95,103 ---- shar r4 ___ashiftrt_r4_24: ! shlr16 r4 ! shlr8 r4 ! rts ! exts.b r4,r4 ! ___ashiftrt_r4_23: shar r4 *************** *** 104,108 **** shar r4 ___ashiftrt_r4_16: ! shar r4 ___ashiftrt_r4_15: shar r4 --- 115,122 ---- shar r4 ___ashiftrt_r4_16: ! shlr16 r4 ! rts ! exts.w r4,r4 ! ___ashiftrt_r4_15: shar r4 *************** *** 138,143 **** ___ashiftrt_r4_0: ! or r0,r0 rts #endif --- 152,616 ---- ___ashiftrt_r4_0: ! rts ! nop ! #endif ! ! #ifdef L_ashiftrt_n ! ! ! ! ! ___ashrsi3 ! ! ! ! Entry: ! ! ! ! r4: Value to shift ! ! r5: Shifts ! ! ! ! Exit: ! ! ! ! r0: Result ! ! ! ! Destroys: ! ! ! ! (none) ! ! ! ! .global ___ashrsi3 ! .align 2 ! ___ashrsi3: ! mov #31,r0 ! cmp/hi r0,r5 ! bt L_ashrsi3_31 ! mova L_ashrsi3_table,r0 ! mov.b @(r0,r5),r5 ! add r5,r0 ! Change to braf when gas is fixed ! jmp @r0 ! mov r4,r0 ! ! L_ashrsi3_table: ! .byte L_ashrsi3_0-L_ashrsi3_table ! .byte L_ashrsi3_1-L_ashrsi3_table ! .byte L_ashrsi3_2-L_ashrsi3_table ! .byte L_ashrsi3_3-L_ashrsi3_table ! .byte L_ashrsi3_4-L_ashrsi3_table ! .byte L_ashrsi3_5-L_ashrsi3_table ! .byte L_ashrsi3_6-L_ashrsi3_table ! .byte L_ashrsi3_7-L_ashrsi3_table ! .byte L_ashrsi3_8-L_ashrsi3_table ! .byte L_ashrsi3_9-L_ashrsi3_table ! .byte L_ashrsi3_10-L_ashrsi3_table ! .byte L_ashrsi3_11-L_ashrsi3_table ! .byte L_ashrsi3_12-L_ashrsi3_table ! .byte L_ashrsi3_13-L_ashrsi3_table ! .byte L_ashrsi3_14-L_ashrsi3_table ! .byte L_ashrsi3_15-L_ashrsi3_table ! .byte L_ashrsi3_16-L_ashrsi3_table ! .byte L_ashrsi3_17-L_ashrsi3_table ! .byte L_ashrsi3_18-L_ashrsi3_table ! .byte L_ashrsi3_19-L_ashrsi3_table ! .byte L_ashrsi3_20-L_ashrsi3_table ! .byte L_ashrsi3_21-L_ashrsi3_table ! .byte L_ashrsi3_22-L_ashrsi3_table ! .byte L_ashrsi3_23-L_ashrsi3_table ! .byte L_ashrsi3_24-L_ashrsi3_table ! .byte L_ashrsi3_25-L_ashrsi3_table ! .byte L_ashrsi3_26-L_ashrsi3_table ! .byte L_ashrsi3_27-L_ashrsi3_table ! .byte L_ashrsi3_28-L_ashrsi3_table ! .byte L_ashrsi3_29-L_ashrsi3_table ! .byte L_ashrsi3_30-L_ashrsi3_table ! .byte L_ashrsi3_31-L_ashrsi3_table ! ! L_ashrsi3_31: ! rotcl r0 ! rts ! subc r0,r0 ! ! L_ashrsi3_30: ! shar r0 ! L_ashrsi3_29: ! shar r0 ! L_ashrsi3_28: ! shar r0 ! L_ashrsi3_27: ! shar r0 ! L_ashrsi3_26: ! shar r0 ! L_ashrsi3_25: ! shar r0 ! L_ashrsi3_24: ! shlr16 r0 ! shlr8 r0 ! rts ! exts.b r0,r0 ! ! L_ashrsi3_23: ! shar r0 ! L_ashrsi3_22: ! shar r0 ! L_ashrsi3_21: ! shar r0 ! L_ashrsi3_20: ! shar r0 ! L_ashrsi3_19: ! shar r0 ! L_ashrsi3_18: ! shar r0 ! L_ashrsi3_17: ! shar r0 ! L_ashrsi3_16: ! shlr16 r0 ! rts ! exts.w r0,r0 ! ! L_ashrsi3_15: ! shar r0 ! L_ashrsi3_14: ! shar r0 ! L_ashrsi3_13: ! shar r0 ! L_ashrsi3_12: ! shar r0 ! L_ashrsi3_11: ! shar r0 ! L_ashrsi3_10: ! shar r0 ! L_ashrsi3_9: ! shar r0 ! L_ashrsi3_8: ! shar r0 ! L_ashrsi3_7: ! shar r0 ! L_ashrsi3_6: ! shar r0 ! L_ashrsi3_5: ! shar r0 ! L_ashrsi3_4: ! shar r0 ! L_ashrsi3_3: ! shar r0 ! L_ashrsi3_2: ! shar r0 ! L_ashrsi3_1: ! rts ! shar r0 ! ! L_ashrsi3_0: ! rts ! nop ! ! #endif ! ! #ifdef L_ashiftlt ! ! ! ! ! ___ashlsi3 ! ! ! ! Entry: ! ! ! ! r4: Value to shift ! ! r5: Shifts ! ! ! ! Exit: ! ! ! ! r0: Result ! ! ! ! Destroys: ! ! ! ! (none) ! ! ! .global ___ashlsi3 ! .align 2 ! ___ashlsi3: ! mov #31,r0 ! cmp/hi r0,r5 ! bt L_ashlsi3_32 ! mova L_ashlsi3_table,r0 ! mov.b @(r0,r5),r5 ! add r5,r0 ! Change to braf when gas is fixed ! jmp @r0 ! mov r4,r0 ! ! L_ashlsi3_table: ! .byte L_ashlsi3_0-L_ashlsi3_table ! .byte L_ashlsi3_1-L_ashlsi3_table ! .byte L_ashlsi3_2-L_ashlsi3_table ! .byte L_ashlsi3_3-L_ashlsi3_table ! .byte L_ashlsi3_4-L_ashlsi3_table ! .byte L_ashlsi3_5-L_ashlsi3_table ! .byte L_ashlsi3_6-L_ashlsi3_table ! .byte L_ashlsi3_7-L_ashlsi3_table ! .byte L_ashlsi3_8-L_ashlsi3_table ! .byte L_ashlsi3_9-L_ashlsi3_table ! .byte L_ashlsi3_10-L_ashlsi3_table ! .byte L_ashlsi3_11-L_ashlsi3_table ! .byte L_ashlsi3_12-L_ashlsi3_table ! .byte L_ashlsi3_13-L_ashlsi3_table ! .byte L_ashlsi3_14-L_ashlsi3_table ! .byte L_ashlsi3_15-L_ashlsi3_table ! .byte L_ashlsi3_16-L_ashlsi3_table ! .byte L_ashlsi3_17-L_ashlsi3_table ! .byte L_ashlsi3_18-L_ashlsi3_table ! .byte L_ashlsi3_19-L_ashlsi3_table ! .byte L_ashlsi3_20-L_ashlsi3_table ! .byte L_ashlsi3_21-L_ashlsi3_table ! .byte L_ashlsi3_22-L_ashlsi3_table ! .byte L_ashlsi3_23-L_ashlsi3_table ! .byte L_ashlsi3_24-L_ashlsi3_table ! .byte L_ashlsi3_25-L_ashlsi3_table ! .byte L_ashlsi3_26-L_ashlsi3_table ! .byte L_ashlsi3_27-L_ashlsi3_table ! .byte L_ashlsi3_28-L_ashlsi3_table ! .byte L_ashlsi3_29-L_ashlsi3_table ! .byte L_ashlsi3_30-L_ashlsi3_table ! .byte L_ashlsi3_31-L_ashlsi3_table ! ! L_ashlsi3_6: ! shll2 r0 ! L_ashlsi3_4: ! shll2 r0 ! L_ashlsi3_2: ! rts ! shll2 r0 ! ! L_ashlsi3_7: ! shll2 r0 ! L_ashlsi3_5: ! shll2 r0 ! L_ashlsi3_3: ! shll2 r0 ! L_ashlsi3_1: ! rts ! shll r0 ! ! L_ashlsi3_14: ! shll2 r0 ! L_ashlsi3_12: ! shll2 r0 ! L_ashlsi3_10: ! shll2 r0 ! L_ashlsi3_8: ! rts ! shll8 r0 ! ! L_ashlsi3_15: ! shll2 r0 ! L_ashlsi3_13: ! shll2 r0 ! L_ashlsi3_11: ! shll2 r0 ! L_ashlsi3_9: ! shll8 r0 ! rts ! shll r0 ! ! L_ashlsi3_22: ! shll2 r0 ! L_ashlsi3_20: ! shll2 r0 ! L_ashlsi3_18: ! shll2 r0 ! L_ashlsi3_16: ! rts ! shll16 r0 ! ! L_ashlsi3_23: ! shll2 r0 ! L_ashlsi3_21: ! shll2 r0 ! L_ashlsi3_19: ! shll2 r0 ! L_ashlsi3_17: ! shll16 r0 ! rts ! shll r0 ! ! L_ashlsi3_30: ! shll2 r0 ! L_ashlsi3_28: ! shll2 r0 ! L_ashlsi3_26: ! shll2 r0 ! L_ashlsi3_24: ! shll16 r0 ! rts ! shll8 r0 ! ! L_ashlsi3_31: ! shll2 r0 ! L_ashlsi3_29: ! shll2 r0 ! L_ashlsi3_27: ! shll2 r0 ! L_ashlsi3_25: ! shll16 r0 ! shll8 r0 ! rts ! shll r0 ! ! L_ashlsi3_32: ! rts ! mov #0,r0 ! ! L_ashlsi3_0: ! rts ! nop ! ! #endif ! ! #ifdef L_lshiftrt ! ! ! ! ! ___lshrsi3 ! ! ! ! Entry: ! ! ! ! r4: Value to shift ! ! r5: Shifts ! ! ! ! Exit: ! ! ! ! r0: Result ! ! ! ! Destroys: ! ! ! ! (none) ! ! ! .global ___lshrsi3 ! .align 2 ! ___lshrsi3: ! mov #31,r0 ! cmp/hi r0,r5 ! bt L_lshrsi3_32 ! mova L_lshrsi3_table,r0 ! mov.b @(r0,r5),r5 ! add r5,r0 ! Change to braf when gas is fixed ! jmp @r0 ! mov r4,r0 ! ! L_lshrsi3_table: ! .byte L_lshrsi3_0-L_lshrsi3_table ! .byte L_lshrsi3_1-L_lshrsi3_table ! .byte L_lshrsi3_2-L_lshrsi3_table ! .byte L_lshrsi3_3-L_lshrsi3_table ! .byte L_lshrsi3_4-L_lshrsi3_table ! .byte L_lshrsi3_5-L_lshrsi3_table ! .byte L_lshrsi3_6-L_lshrsi3_table ! .byte L_lshrsi3_7-L_lshrsi3_table ! .byte L_lshrsi3_8-L_lshrsi3_table ! .byte L_lshrsi3_9-L_lshrsi3_table ! .byte L_lshrsi3_10-L_lshrsi3_table ! .byte L_lshrsi3_11-L_lshrsi3_table ! .byte L_lshrsi3_12-L_lshrsi3_table ! .byte L_lshrsi3_13-L_lshrsi3_table ! .byte L_lshrsi3_14-L_lshrsi3_table ! .byte L_lshrsi3_15-L_lshrsi3_table ! .byte L_lshrsi3_16-L_lshrsi3_table ! .byte L_lshrsi3_17-L_lshrsi3_table ! .byte L_lshrsi3_18-L_lshrsi3_table ! .byte L_lshrsi3_19-L_lshrsi3_table ! .byte L_lshrsi3_20-L_lshrsi3_table ! .byte L_lshrsi3_21-L_lshrsi3_table ! .byte L_lshrsi3_22-L_lshrsi3_table ! .byte L_lshrsi3_23-L_lshrsi3_table ! .byte L_lshrsi3_24-L_lshrsi3_table ! .byte L_lshrsi3_25-L_lshrsi3_table ! .byte L_lshrsi3_26-L_lshrsi3_table ! .byte L_lshrsi3_27-L_lshrsi3_table ! .byte L_lshrsi3_28-L_lshrsi3_table ! .byte L_lshrsi3_29-L_lshrsi3_table ! .byte L_lshrsi3_30-L_lshrsi3_table ! .byte L_lshrsi3_31-L_lshrsi3_table ! ! L_lshrsi3_6: ! shlr2 r0 ! L_lshrsi3_4: ! shlr2 r0 ! L_lshrsi3_2: ! rts ! shlr2 r0 ! ! L_lshrsi3_7: ! shlr2 r0 ! L_lshrsi3_5: ! shlr2 r0 ! L_lshrsi3_3: ! shlr2 r0 ! L_lshrsi3_1: ! rts ! shlr r0 ! ! L_lshrsi3_14: ! shlr2 r0 ! L_lshrsi3_12: ! shlr2 r0 ! L_lshrsi3_10: ! shlr2 r0 ! L_lshrsi3_8: ! rts ! shlr8 r0 ! ! L_lshrsi3_15: ! shlr2 r0 ! L_lshrsi3_13: ! shlr2 r0 ! L_lshrsi3_11: ! shlr2 r0 ! L_lshrsi3_9: ! shlr8 r0 ! rts ! shlr r0 ! ! L_lshrsi3_22: ! shlr2 r0 ! L_lshrsi3_20: ! shlr2 r0 ! L_lshrsi3_18: ! shlr2 r0 ! L_lshrsi3_16: ! rts ! shlr16 r0 ! ! L_lshrsi3_23: ! shlr2 r0 ! L_lshrsi3_21: ! shlr2 r0 ! L_lshrsi3_19: ! shlr2 r0 ! L_lshrsi3_17: ! shlr16 r0 ! rts ! shlr r0 ! ! L_lshrsi3_30: ! shlr2 r0 ! L_lshrsi3_28: ! shlr2 r0 ! L_lshrsi3_26: ! shlr2 r0 ! L_lshrsi3_24: ! shlr16 r0 ! rts ! shlr8 r0 ! ! L_lshrsi3_31: ! shlr2 r0 ! L_lshrsi3_29: ! shlr2 r0 ! L_lshrsi3_27: ! shlr2 r0 ! L_lshrsi3_25: ! shlr16 r0 ! shlr8 r0 ! rts ! shlr r0 ! ! L_lshrsi3_32: rts + mov #0,r0 + + L_lshrsi3_0: + rts + nop + #endif *************** *** 153,157 **** add r6,r0 jmp @r0 ! add #64,r4 .align 4 .global ___movstrSI64 --- 626,630 ---- add r6,r0 jmp @r0 ! add #64,r4 .align 4 .global ___movstrSI64 *************** *** 306,310 **** xtrct r2,r3 ! r3 = aacc tst r3,r3 ! msws zero ? ! bf hiset rts ! yes - then weve got the answer sts macl,r0 --- 779,783 ---- xtrct r2,r3 ! r3 = aacc tst r3,r3 ! msws zero ? ! bf hiset rts ! yes - then weve got the answer sts macl,r0 *************** *** 314,325 **** sts macl,r1 mulu r3,r4 | brewing macl = cc*bb ! sts macl,r2 add r1,r2 shll16 r2 rts add r2,r0 ! ! ! #endif #ifdef L_sdivsi3 .title "SH DIVIDE" --- 787,798 ---- sts macl,r1 mulu r3,r4 | brewing macl = cc*bb ! sts macl,r2 add r1,r2 shll16 r2 rts add r2,r0 ! ! ! #endif #ifdef L_sdivsi3 .title "SH DIVIDE" *************** *** 337,341 **** mov r4,r1 mov r5,r0 ! tst r0,r0 bt div0 --- 810,814 ---- mov r4,r1 mov r5,r0 ! tst r0,r0 bt div0 *************** *** 411,418 **** rotcl r1 addc r2,r1 ! rts mov r1,r0 ! div0: rts mov #0,r0 --- 884,891 ---- rotcl r1 addc r2,r1 ! rts mov r1,r0 ! div0: rts mov #0,r0 *************** *** 427,433 **** !! sac@cygnus.com !! ! !! ! !! args in r4 and r5, result in r0, clobbers r4,r6, pr and t bit .global ___udivsi3 --- 900,906 ---- !! sac@cygnus.com !! ! !! ! !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit .global ___udivsi3 *************** *** 435,444 **** longway: mov #0,r0 ! div0u ! ! get one bit from the msb of the numerator into the T ! bit and divide it by whats in r5. Put the answer bit ! into the T bit so it can come out again at the bottom ! rotcl r4 ; div1 r5,r0 rotcl r4 ; div1 r5,r0 rotcl r4 ; div1 r5,r0 --- 908,917 ---- longway: mov #0,r0 ! div0u ! ! get one bit from the msb of the numerator into the T ! bit and divide it by whats in r5. Put the answer bit ! into the T bit so it can come out again at the bottom ! rotcl r4 ; div1 r5,r0 rotcl r4 ; div1 r5,r0 rotcl r4 ; div1 r5,r0 *************** *** 476,483 **** rotcl r4 ; div1 r5,r0 rotcl r4 ; div1 r5,r0 ! rotcl r4 ret: rts mov r4,r0 #endif - --- 949,955 ---- rotcl r4 ; div1 r5,r0 rotcl r4 ; div1 r5,r0 ! rotcl r4 ret: rts mov r4,r0 #endif Only in gcc-2.6.3/config/sh: lshrsi3.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sh/sh.c gcc-2.7.0/config/sh/sh.c *** gcc-2.6.3/config/sh/sh.c Fri Sep 9 19:33:03 1994 --- gcc-2.7.0/config/sh/sh.c Thu Jun 15 16:30:52 1995 *************** *** 1,60 **** ! /* Output routines for GCC for Hitachi Super-H ! Copyright (C) 1993, 1994 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 2, 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. */ ! ! ! /* Contributed by Steve Chamberlain (sac@cygnus.com) */ #include ! #include "assert.h" ! #include "config.h" #include "rtl.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "real.h" - #include "insn-config.h" - #include "conditions.h" - #include "insn-flags.h" #include "tree.h" - #include "output.h" - - #include "insn-attr.h" #include "flags.h" ! #include "obstack.h" #include "expr.h" ! static rtx add_constant (); int pragma_interrupt; ! int pragma_trapa; int current_function_anonymous_args; - extern int current_function_pretend_args_size; - extern char *version_string; - extern int flag_traditional; ! static rtx shiftsyms[32]; ! struct rtx_def *table_lab; ! enum attr_cpu sh_cpu; /* target cpu */ /* Global variables for machine-dependent things. */ /* Saved operands from the last compare to use when we generate an scc ! or bcc insn. */ rtx sh_compare_op0; --- 1,66 ---- ! /* Output routines for GCC for Hitachi Super-H. ! Copyright (C) 1993, 1994, 1995 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 2, 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! /* Contributed by Steve Chamberlain (sac@cygnus.com). ! Improved by Jim Wilson (wilson@cygnus.com). */ ! #include "config.h" #include ! #include "rtl.h" #include "tree.h" #include "flags.h" ! #include "insn-flags.h" #include "expr.h" + #include "regs.h" + #include "hard-reg-set.h" + #include "output.h" ! #define MSW (TARGET_LITTLE_ENDIAN ? 1 : 0) ! #define LSW (TARGET_LITTLE_ENDIAN ? 0 : 1) + /* ??? The pragma interrupt support will not work for SH3. */ + /* This is set by #pragma interrupt and #pragma trapa, and causes gcc to + output code for the next function appropriate for an interrupt handler. */ int pragma_interrupt; ! ! /* This is set by #pragma trapa, and is similar to the above, except that ! the compiler doesn't emit code to preserve all registers. */ ! static int pragma_trapa; + /* This is used for communication between SETUP_INCOMING_VARARGS and + sh_expand_prologue. */ int current_function_anonymous_args; ! /* Global variables from toplev.c and final.c that are used within, but ! not declared in any header file. */ ! extern char *version_string; ! extern int *insn_addresses; /* Global variables for machine-dependent things. */ + /* Which cpu are we scheduling for. */ + enum processor_type sh_cpu; + /* Saved operands from the last compare to use when we generate an scc ! or bcc insn. */ rtx sh_compare_op0; *************** *** 62,66 **** /* Provides the class number of the smallest class containing ! reg number */ int regno_reg_class[FIRST_PSEUDO_REGISTER] = --- 68,72 ---- /* Provides the class number of the smallest class containing ! reg number. */ int regno_reg_class[FIRST_PSEUDO_REGISTER] = *************** *** 75,79 **** /* Provide reg_class from a letter such as appears in the machine ! description. */ enum reg_class reg_class_from_letter[] = --- 81,85 ---- /* Provide reg_class from a letter such as appears in the machine ! description. */ enum reg_class reg_class_from_letter[] = *************** *** 87,274 **** /* y */ NO_REGS, /* z */ R0_REGS }; - - /* Value is 1 if register/mode pair is acceptable on SH. Even - registers can hold DIs and DF values. The rest can only hold - SI's efficiently */ - - - #define REG_ODD \ - ( (1 << (int) QImode) | (1 << (int) HImode) | (1 << (int) SImode) \ - | (1 << (int) QFmode) | (1 << (int) HFmode) | (1 << (int) SFmode) \ - | (1 << (int) CQImode) | (1 << (int) CHImode)| (1<< (int)DFmode) | (1<<(int)DImode)) - - #define REG_EVEN \ - (REG_ODD | (1 << (int) CSImode) | (1 << (int) SCmode)) - - #define SI_ONLY (1<<(int)SImode) - - int hard_regno_mode_ok[] = - { - REG_EVEN, REG_ODD, REG_EVEN, REG_ODD, - REG_EVEN, REG_ODD, REG_EVEN, REG_ODD, - REG_EVEN, REG_ODD, REG_EVEN, REG_ODD, - REG_EVEN, REG_ODD, REG_EVEN, REG_ODD, - REG, 0, SI_ONLY, SI_ONLY, - SI_ONLY, SI_ONLY - }; - - /* Local label counter, used for constants in the pool and inside - pattern branches. */ - static int lf = 100; - - - /* Number of bytes pushed for anonymous args, used to pass information - between expand_prologue and expand_epilogue. */ - static int extra_push; - - - - void - push (rn) - int rn; - { - rtx x ; - x= emit_insn (gen_push (gen_rtx (REG, SImode, rn))); - REG_NOTES (x) = gen_rtx (EXPR_LIST, REG_INC, - gen_rtx(REG, SImode, STACK_POINTER_REGNUM), 0); - } - - void - pop (rn) - int rn; - { - rtx x; - x = emit_insn (gen_pop (gen_rtx (REG, SImode, rn))); - REG_NOTES (x) = gen_rtx (EXPR_LIST, REG_INC, - gen_rtx(REG, SImode, STACK_POINTER_REGNUM), 0); - } - - - /* Adjust the stack and return the number of bytes taken to do it */ - static rtx lastreg; - int lastval; - static void - output_stack_adjust (size) - int size; - { - if (size) - { - rtx val = GEN_INT (size); - rtx insn; - - if (!CONST_OK_FOR_I (size)) - { - lastreg = gen_rtx (REG, SImode, 3); - lastval = size; - emit_insn (gen_movsi (lastreg, val)); - val = lastreg; - - } - - insn = gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, val); - emit_insn (insn); - } - } - - - /* Generate code to push the regs specified in the mask, and return - the number of bytes the insns take. */ - - static void - push_regs (mask) - int mask; - { - int i; - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - { - if (mask & (1 << i)) - { - push (i); - } - } - } - - - /* Print an instruction which would have gone into a delay slot after - an instructiuon, but couldn't because the instruction expanded into a - sequence where putting the slot insn at the end wouldn't work. */ - - static void - print_slot (insn) - rtx insn; - { - final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1); - - INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; - } - - - /* Work out the registers which need to be saved, both as a mask and a - count. - - If doing a pragma interrupt function, then push all regs used by the function, - and if we call another function (we can tell by looking at PR), make sure that all the - regs it clobbers are safe too. - */ - static int - calc_live_regs (count_ptr) - int *count_ptr; - { - int reg; - int live_regs_mask = 0; - int count = 0; - for (reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++) - { - if (reg == ARG_POINTER_REGNUM) - continue; - if (reg == T_REG) - continue; - if (reg == GBR_REG) - continue; - - if (pragma_interrupt && !pragma_trapa) - { - /* Need to save all the regs ever live */ - if ((regs_ever_live[reg] - || (call_used_regs[reg] && regs_ever_live[PR_REG])) - && reg != 15) - { - live_regs_mask |= 1 << reg; - count++; - } - } - else if (TARGET_SMALLCALL) - { - /* Don't need to push anthing, but count the regs which have - been pushed by the wrapper */ - if (call_used_regs[reg]) - count++; - } - else - { - /* Only push those regs which are used and need to be saved */ - if (regs_ever_live[reg] && !call_used_regs[reg]) - { - count++; - live_regs_mask |= (1 << reg); - } - } - } - - - *count_ptr = count; - return live_regs_mask; - } ! ! static int ! need_slot (insn) ! rtx insn; ! { ! return (insn && !INSN_ANNULLED_BRANCH_P (XVECEXP (insn, 0, 0))); ! } ! ! /* Print the operand address in x to the stream */ void --- 93,98 ---- /* y */ NO_REGS, /* z */ R0_REGS }; ! /* Print the operand address in x to the stream. */ void *************** *** 282,285 **** --- 106,110 ---- fprintf (stream, "@%s", reg_names[REGNO (x)]); break; + case PLUS: { *************** *** 287,303 **** rtx index = XEXP (x, 1); - if (GET_CODE (base) != REG) - { - /* Ensure that BASE is a register (one of them must be). */ - rtx temp = base; - base = index; - index = temp; - } - switch (GET_CODE (index)) { case CONST_INT: ! fprintf (stream, "@(%d,%s)", ! INTVAL (index), reg_names[REGNO (base)]); break; --- 112,119 ---- rtx index = XEXP (x, 1); switch (GET_CODE (index)) { case CONST_INT: ! fprintf (stream, "@(%d,%s)", INTVAL (index), reg_names[REGNO (base)]); break; *************** *** 306,310 **** fprintf (stream, "@(r0,%s)", reg_names[MAX (REGNO (base), REGNO (index))]); - break; --- 122,125 ---- *************** *** 314,319 **** } } - break; case PRE_DEC: fprintf (stream, "@-%s", reg_names[REGNO (XEXP (x, 0))]); --- 129,134 ---- } } break; + case PRE_DEC: fprintf (stream, "@-%s", reg_names[REGNO (XEXP (x, 0))]); *************** *** 334,347 **** '.' print a .s if insn needs delay slot - '*' print a local label - '^' increment the local label number - '!' dump the constant table - '#' output a nop if there is nothing to put in the delay slot '@' print rte or rts depending upon pragma interruptness ! 'R' print the next register or memory location along, ie the lsw in ! a double word value 'O' print a constant without the # ! 'M' print a constant as its negative ! 'N' print insides of a @++ or @-- o */ void --- 149,158 ---- '.' print a .s if insn needs delay slot '@' print rte or rts depending upon pragma interruptness ! '#' output a nop if there is nothing to put in the delay slot 'O' print a constant without the # ! 'R' print the LSW of a dp value - changes if in little endian ! 'S' print the MSW of a dp value - changes if in little endian ! 'T' print the next word of a dp value - same as 'R' in big endian mode. */ void *************** *** 354,366 **** { case '.': ! if (need_slot (final_sequence)) fprintf (stream, ".s"); break; - case '*': - fprintf (stream, "LF%d", lf); - break; - case '^': - lf++; - break; case '@': if (pragma_interrupt) --- 165,172 ---- { case '.': ! if (final_sequence ! && ! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) fprintf (stream, ".s"); break; case '@': if (pragma_interrupt) *************** *** 370,390 **** break; case '#': ! /* Output a nop if there's nothing in the delay slot */ if (dbr_sequence_length () == 0) ! { ! fprintf (stream, "\n\tnop"); ! } break; case 'O': output_addr_const (stream, x); break; ! case 'M': ! fprintf (asm_out_file, "#%d", -INTVAL (x)); break; ! case 'N': ! fputs (reg_names[REGNO (XEXP (XEXP (x, 0), 0))], (stream)); break; ! case 'R': ! /* Next location along in memory or register */ switch (GET_CODE (x)) { --- 176,194 ---- break; case '#': ! /* Output a nop if there's nothing in the delay slot. */ if (dbr_sequence_length () == 0) ! fprintf (stream, "\n\tnop"); break; case 'O': output_addr_const (stream, x); break; ! case 'R': ! fputs (reg_names[REGNO (x) + LSW], (stream)); break; ! case 'S': ! fputs (reg_names[REGNO (x) + MSW], (stream)); break; ! case 'T': ! /* Next word of a double. */ switch (GET_CODE (x)) { *************** *** 393,397 **** break; case MEM: ! print_operand_address (stream, XEXP (adj_offsettable_operand (x, 4), 0)); break; } --- 197,202 ---- break; case MEM: ! print_operand_address (stream, ! XEXP (adj_offsettable_operand (x, 4), 0)); break; } *************** *** 415,563 **** } - - static int - sextb (x) - int x; - { - x &= 0xff; - if (x > 127) - { - x = -256 + x; - } - return x; - } - - - - /* Take a move with integer constant source in OPERANDS, see if it can be generated by - devious shifting. If so, generate the instruction sequence and return 1, otherwise - return 0. - - OPERANDS[0] Destination register - OPERANDS[1] Source constant - - 00000000 00000000 00000000 0NNNNNNNN simple load - 00000000 00000000 00000000 NNNNNNNN0 load and shift by 1 - 00000000 00000000 0000000N NNNNNNN00 load and shift by 2 - 00000000 00000000 0NNNNNNN 000000000 load and shift by 8 - 00000000 0NNNNNNN 00000000 000000000 load and shift by 16 - N0000000 00000000 00000000 00NNNNNNN load and rotate right - - 11111111 11111111 11111111 1NNNNNNNN simple load - 11111111 11111111 11111111 NNNNNNNN0 load and shift by 1 - 11111111 11111111 1111111N NNNNNNN00 load and shift by 2 - 11111111 11111111 1NNNNNNN 000000000 load and shift by 8 - 11111111 1NNNNNNN 00000000 000000000 load and shift by 16 - N1111111 11111111 11111111 11NNNNNNN load and rotate right - - 00000000 00000000 00000000 1NNNNNNNN load and zero extend byte - 00000000 00000000 11111111 1NNNNNNNN load and zero extend word - - - */ - - static int - synth_constant (operands, mode) - rtx operands[]; - enum machine_mode mode; - { - rtx dst; - int i = INTVAL (operands[1]) & 0xffffffff; - - if (CONST_OK_FOR_I (i)) - return 0; - - if (TARGET_CLEN0 && mode != QImode) - return 0; - - if (mode != SImode) - { - if (reload_in_progress) - return 0; - dst = gen_reg_rtx (SImode); - } - else - { - dst = operands[0]; - } - - - /* 00000000 00000000 11111111 1NNNNNNNN load and zero extend word */ - if ((i & 0xffffff80) == 0x0000ff80) - { - emit_move_insn (dst, GEN_INT (sextb (i))); - emit_insn (gen_and_ffff (dst, dst)); - } - /* 00000000 00000000 00000000 1NNNNNNNN load and zero extend byte */ - else if ((i & 0xffffff80) == 0x00000080) - { - emit_move_insn (dst, GEN_INT (sextb (i))); - emit_insn (gen_and_ff (dst, dst)); - } - /* 00000000 00000000 00000000 NNNNNNNN0 load and shift by 1 - 11111111 11111111 11111111 NNNNNNNN0 load and shift by 1 */ - else if ((i & 0xffffff01) == 0 - || (i & 0xffffff01) == 0xffffff00) - { - emit_move_insn (dst, GEN_INT (sextb (i >> 1))); - emit_insn (gen_ashlsi3_n (dst, dst, GEN_INT (1))); - } - /* 00000000 00000000 0000000N NNNNNNN00 load and shift by 2 - 11111111 11111111 1111111N NNNNNNN00 load and shift by 2*/ - else if ((i & 0xfffffe03) == 0 - || (i & 0xfffffe03) == 0xfffffe00) - { - emit_move_insn (dst, GEN_INT (sextb (i >> 2))); - emit_insn (gen_ashlsi3_n (dst, dst, GEN_INT (2))); - } - /* 00000000 00000000 0NNNNNNN 000000000 load and shift by 8 - 11111111 11111111 1NNNNNNN 000000000 load and shift by 8 */ - - else if ((i & 0xffff80ff) == 0 - || (i & 0xffff80ff) == 0xffff8000) - { - emit_move_insn (dst, GEN_INT (sextb (i >> 8))); - emit_insn (gen_ashlsi3_n (dst, dst, GEN_INT (8))); - } - /* 00000000 0NNNNNNN 00000000 000000000 load and shift by 16 - 11111111 1NNNNNNN 00000000 000000000 load and shift by 16 */ - else if ((i & 0xff80ffff) == 0x00000000 - || (i & 0xff80ffff) == 0xff800000) - { - emit_move_insn (dst, GEN_INT (sextb (i >> 16))); - emit_insn (gen_ashlsi3_n (dst, dst, GEN_INT (16))); - } - /* 00000000 00000000 0NNNNNNN 0NNNNNNNN load shift 8 and add */ - else if ((i & 0xffff8080) == 0 && TARGET_CLEN3) - { - emit_move_insn (dst, GEN_INT (sextb (i >> 8))); - emit_insn (gen_ashlsi3_n (dst, dst, GEN_INT (8))); - emit_insn (gen_addsi3 (dst, dst, GEN_INT (i & 0x7f))); - } - else - return 0; - - if (mode == DImode) - { - /* Moving from SI to DI, we've got to zero out the high part */ - - emit_insn (gen_rtx (SET, VOIDmode, - gen_rtx (SUBREG, SImode, operands[0], 0), - dst)); - emit_insn (gen_rtx (SET, VOIDmode, - gen_rtx (SUBREG, SImode, operands[0], 1), - const0_rtx)); - - } - else if (mode != SImode) - { - emit_insn (gen_rtx (SET, VOIDmode, operands[0], - gen_rtx (SUBREG, mode, dst, 0))); - - } - return 1; - } - - /* Emit code to perform a block move. Choose the best method. --- 220,223 ---- *************** *** 567,571 **** OPERANDS[3] is the alignment safe to use. */ - int expand_block_move (operands) --- 227,230 ---- *************** *** 575,603 **** int constp = (GET_CODE (operands[2]) == CONST_INT); int bytes = (constp ? INTVAL (operands[2]) : 0); - enum machine_mode mode; - - /* IF odd then fail */ - if (!constp || bytes <= 0) - return 0; ! /* Don't expand if we'd make the code bigger and we don't want big code */ ! ! if (bytes > 8 && TARGET_SMALLCODE) return 0; ! switch (align) ! { ! case 1: ! mode = QImode; ! break; ! case 2: ! mode = HImode; ! break; ! default: ! mode = SImode; ! align = 4; ! } ! ! if (mode == SImode && constp && bytes < 64 && (bytes % 4 == 0)) { char entry[30]; --- 234,244 ---- int constp = (GET_CODE (operands[2]) == CONST_INT); int bytes = (constp ? INTVAL (operands[2]) : 0); ! /* If it isn't a constant number of bytes, or if it doesn't have 4 byte ! alignment, or if it isn't a multiple of 4 bytes, then fail. */ ! if (! constp || align < 4 || (bytes % 4 != 0)) return 0; ! if (bytes < 64) { char entry[30]; *************** *** 606,614 **** rtx r4 = gen_rtx (REG, SImode, 4); rtx r5 = gen_rtx (REG, SImode, 5); ! sprintf (entry, "__movstr%s%d", GET_MODE_NAME (mode), bytes); entry_name = get_identifier (entry); ! func_addr_rtx = copy_to_mode_reg (Pmode, ! gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (entry_name))); emit_insn (gen_move_insn (r4, XEXP (operands[0], 0))); emit_insn (gen_move_insn (r5, XEXP (operands[1], 0))); --- 247,258 ---- rtx r4 = gen_rtx (REG, SImode, 4); rtx r5 = gen_rtx (REG, SImode, 5); ! ! sprintf (entry, "__movstrSI%d", bytes); entry_name = get_identifier (entry); ! func_addr_rtx ! = copy_to_mode_reg (Pmode, ! gen_rtx (SYMBOL_REF, Pmode, ! IDENTIFIER_POINTER (entry_name))); emit_insn (gen_move_insn (r4, XEXP (operands[0], 0))); emit_insn (gen_move_insn (r5, XEXP (operands[1], 0))); *************** *** 616,675 **** return 1; } ! if (mode == SImode && constp && (bytes % 4 == 0)) { tree entry_name; rtx func_addr_rtx; rtx r4 = gen_rtx (REG, SImode, 4); rtx r5 = gen_rtx (REG, SImode, 5); rtx r6 = gen_rtx (REG, SImode, 6); - entry_name = get_identifier ("__movstr"); ! func_addr_rtx = copy_to_mode_reg (Pmode, ! gen_rtx (SYMBOL_REF, Pmode, ! IDENTIFIER_POINTER (entry_name))); emit_insn (gen_move_insn (r4, XEXP (operands[0], 0))); emit_insn (gen_move_insn (r5, XEXP (operands[1], 0))); ! /* r6 controls the size of the move, 16 is decremented from it ! for each 64 bytes moved, then the -ve bit is used as an index into a ! list of move instructions like this: ! ! { ! do { ! *dst++ = *src++; ! *dst++ = *src++; ! *dst++ = *src++; ! ..etc.. 16 in all ! *dst++ = *src++; ! *dst++ = *src++; ! size -= 16; ! } while (size > 0); ! ! switch (size) ! { ! case -15: ! *dst++ = *src++; ! case -14: ! *dst++ = *src++; ! .. etc.. ; ! case -2: ! *dst++ = *src++; ! case -1: ! *dst++ = *src++; ! case 0: ! ; ! } ! } ! ! eg, a 72 byte move would be set up with size(r6) = 14, for one ! iteration through the big while loop, and a switch of -2 for the last part */ ! ! { ! int final_switch = 16 - ((bytes / 4) % 16); ! int while_loop = ((bytes / 4) / 16 - 1) * 16; ! emit_insn (gen_move_insn (r6, GEN_INT (while_loop + final_switch))); ! emit_insn (gen_block_lump_real (func_addr_rtx)); ! return 1; ! } } --- 260,294 ---- return 1; } ! ! /* This is the same number of bytes as a memcpy call, but to a different ! less common function name, so this will occasionally use more space. */ ! if (! TARGET_SMALLCODE) { tree entry_name; rtx func_addr_rtx; + int final_switch, while_loop; rtx r4 = gen_rtx (REG, SImode, 4); rtx r5 = gen_rtx (REG, SImode, 5); rtx r6 = gen_rtx (REG, SImode, 6); ! entry_name = get_identifier ("__movstr"); ! func_addr_rtx ! = copy_to_mode_reg (Pmode, ! gen_rtx (SYMBOL_REF, Pmode, ! IDENTIFIER_POINTER (entry_name))); emit_insn (gen_move_insn (r4, XEXP (operands[0], 0))); emit_insn (gen_move_insn (r5, XEXP (operands[1], 0))); ! /* r6 controls the size of the move. 16 is decremented from it ! for each 64 bytes moved. Then the negative bit left over is used ! as an index into a list of move instructions. e.g., a 72 byte move ! would be set up with size(r6) = 14, for one iteration through the ! big while loop, and a switch of -2 for the last part. */ ! ! final_switch = 16 - ((bytes / 4) % 16); ! while_loop = ((bytes / 4) / 16 - 1) * 16; ! emit_insn (gen_move_insn (r6, GEN_INT (while_loop + final_switch))); ! emit_insn (gen_block_lump_real (func_addr_rtx)); ! return 1; } *************** *** 678,683 **** /* Prepare operands for a move define_expand; specifically, one of the ! operands must be in a register. Take this chance to remove ! addressing modes which can't be coped with very well. */ int --- 297,301 ---- /* Prepare operands for a move define_expand; specifically, one of the ! operands must be in a register. */ int *************** *** 686,818 **** enum machine_mode mode; { ! if (!(reload_in_progress || reload_completed) ! && ((!register_operand (operands[0], mode) ! && !register_operand (operands[1], mode)) ! || GET_CODE (operands[1]) == PLUS)) { ! /* copy the source to a register */ ! operands[1] = copy_to_mode_reg (mode, operands[1]); } ! if ((mode == SImode || mode == HImode || mode == QImode) ! && GET_CODE (operands[1]) == CONST_INT) { ! return synth_constant (operands, mode); } - if (mode == DFmode || mode == DImode) - { - rtx src = operands[1]; - rtx dst = operands[0]; - rtx insns; - - if (src == dst) - { - emit_insn (gen_rtx (SET, VOIDmode, dst, src)); - return 1; - } - - if (GET_CODE (src) == REG && - REGNO (src) >= FIRST_PSEUDO_REGISTER) - return 0; - - if (GET_CODE (dst) == REG && - REGNO (dst) >= FIRST_PSEUDO_REGISTER) - return 0; - - if (push_operand (dst, mode)) - return 0; - - if (GET_CODE (src) == CONST_DOUBLE) - src = force_const_mem (DFmode, src); - - if (reload_in_progress) - { - if (!(offsettable_memref_p (src) || register_operand (src, mode))) - return 0; - if (!(offsettable_memref_p (dst) || register_operand (dst, - mode))) - return 0; - } - start_sequence (); - if (GET_CODE (operands[0]) != REG - || !refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1, operands[1], 0)) - { - emit_move_insn (operand_subword (dst, 0, 1, mode), - operand_subword_force (src, 0, mode)); - emit_move_insn (operand_subword (dst, 1, 1, mode), - operand_subword_force (src, 1, mode)); - } - else - { - emit_move_insn (operand_subword (dst, 1, 1, mode), - operand_subword_force (src, 1, mode)); - emit_move_insn (operand_subword (dst, 0, 1, mode), - operand_subword_force (src, 0, mode)); - } ! insns = get_insns (); ! end_sequence (); ! emit_no_conflict_block (insns, dst, src, 0, src); ! return 1; ! } ! return 0; } ! /* Prepare the operands for an scc instruction; make sure that the ! compare has been done. */ ! rtx ! prepare_scc_operands (code) int code; { ! if (GET_CODE (sh_compare_op0) != REG ! || REGNO (sh_compare_op0) != T_REG) { ! int newcode = code; ! /* First need a compare insn */ ! switch (code) ! { ! case NE: ! newcode = EQ; ! break; ! case LT: ! newcode = GT; ! break; ! case LE: ! newcode = GE; ! break; ! case LTU: ! newcode = GTU; ! break; ! case LEU: ! newcode = GEU; ! break; ! } ! if (newcode != code) ! { ! rtx tmp = sh_compare_op0; ! sh_compare_op0 = sh_compare_op1; ! sh_compare_op1 = tmp; ! code = newcode; ! } ! sh_compare_op0 = force_reg (SImode, sh_compare_op0); ! emit_insn (gen_rtx (SET, VOIDmode, ! gen_rtx (REG, SImode, T_REG), ! gen_rtx (code, SImode, sh_compare_op0, sh_compare_op1))); } ! return gen_rtx (REG, SImode, T_REG); } ! ! /* Functions to output assembly code. */ /* Return a sequence of instructions to perform DI or DF move. Since the SH cannot move a DI or DF in one instruction, we have ! to take care when we see overlapping source and dest registers. - */ - char * output_movedouble (insn, operands, mode) --- 304,390 ---- enum machine_mode mode; { ! /* Copy the source to a register if both operands aren't registers. */ ! if (! reload_in_progress && ! reload_completed ! && ! register_operand (operands[0], mode) ! && ! register_operand (operands[1], mode)) ! operands[1] = copy_to_mode_reg (mode, operands[1]); ! ! return 0; ! } ! ! /* Prepare the operands for an scc instruction; make sure that the ! compare has been done. */ ! rtx ! prepare_scc_operands (code) ! enum rtx_code code; ! { ! rtx t_reg = gen_rtx (REG, SImode, T_REG); ! enum rtx_code oldcode = code; ! ! /* First need a compare insn. */ ! switch (code) { ! case NE: ! /* It isn't possible to handle this case. */ ! abort (); ! case LT: ! code = GT; ! break; ! case LE: ! code = GE; ! break; ! case LTU: ! code = GTU; ! break; ! case LEU: ! code = GEU; ! break; } ! if (code != oldcode) { ! rtx tmp = sh_compare_op0; ! sh_compare_op0 = sh_compare_op1; ! sh_compare_op1 = tmp; } ! sh_compare_op0 = force_reg (SImode, sh_compare_op0); ! if (code != EQ && code != NE ! && (sh_compare_op1 != const0_rtx ! || code == GTU || code == GEU || code == LTU || code == LEU)) ! sh_compare_op1 = force_reg (SImode, sh_compare_op1); ! emit_insn (gen_rtx (SET, VOIDmode, t_reg, ! gen_rtx (code, SImode, sh_compare_op0, ! sh_compare_op1))); ! return t_reg; } ! /* Called from the md file, set up the operands of a compare instruction. */ ! ! void ! from_compare (operands, code) ! rtx *operands; int code; { ! if (code != EQ && code != NE) { ! /* Force args into regs, since we can't use constants here. */ sh_compare_op0 = force_reg (SImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx ! || code == GTU || code == GEU || code == LTU || code == LEU) ! sh_compare_op1 = force_reg (SImode, sh_compare_op1); } ! operands[1] = sh_compare_op0; ! operands[2] = sh_compare_op1; } ! /* Functions to output assembly code. */ /* Return a sequence of instructions to perform DI or DF move. Since the SH cannot move a DI or DF in one instruction, we have ! to take care when we see overlapping source and dest registers. */ char * output_movedouble (insn, operands, mode) *************** *** 824,1046 **** rtx src = operands[1]; - /* fprintf (asm_out_file, "! move double \n"); - fprintf (asm_out_file, "! pc %04x\n", insn_addresses[INSN_UID (insn)]);*/ if (GET_CODE (dst) == MEM ! && GET_CODE (XEXP (dst, 0)) == POST_INC) ! { ! operands[0] = XEXP (XEXP (dst, 0), 0); ! return "mov.l %R1,@(4,%0)\n\tmov.l %1,@%0\n\tadd #8,%0"; ! } if (register_operand (dst, mode) && register_operand (src, mode)) { if (REGNO (src) == MACH_REG) ! return "sts mach,%0\n\tsts macl,%R0"; ! /* ! when mov.d r1,r2 do r2->r3 then r1->r2 ! when mov.d r1,r0 do r1->r0 then r2->r1 ! */ if (REGNO (src) + 1 == REGNO (dst)) ! return "mov %R1,%R0\n\tmov %1,%0 ! cra"; else ! return "mov %1,%0\n\tmov %R1,%R0 ! crb"; } else if (GET_CODE (src) == CONST_INT) { ! HOST_WIDE_INT val = INTVAL (src); ! int rn = REGNO (operands[0]); ! if (val < 0) ! { ! fprintf (asm_out_file, "\tmov #-1,r%d\n", rn); ! } else ! { ! fprintf (asm_out_file, "\tmov #0,r%d\n", rn); ! } ! fprintf (asm_out_file, "\tmov #%d,r%d\n", val, rn + 1); ! return ""; } else if (GET_CODE (src) == MEM) { ! int ptrreg1 = -1; ! int ptrreg2 = -1; int dreg = REGNO (dst); rtx inside = XEXP (src, 0); if (GET_CODE (inside) == REG) ! { ! ptrreg1 = REGNO (inside); ! } else if (GET_CODE (inside) == PLUS) { ! rtx lhs = XEXP (inside, 0); ! rtx rhs = XEXP (inside, 1); ! if (GET_CODE (lhs) == REG) ! ptrreg1 = REGNO (lhs); ! if (GET_CODE (rhs) == REG) ! ptrreg2 = REGNO (rhs); } else if (GET_CODE (inside) == LABEL_REF) ! { ! return "mov.l %1,%0\n\tmov.l %1+4,%R0"; ! } else if (GET_CODE (inside) == POST_INC) ! { ! return "mov.l %1,%0\n\tmov.l %1,%R0 !mdi\n"; ! } else abort (); ! if ((ptrreg1 >= 0 && ptrreg2 >= 0) ! && (dreg == ptrreg1 ! || dreg == ptrreg2 ! || dreg + 1 == ptrreg1 ! || dreg + 1 == ptrreg2)) ! { ! /* This move clobbers both index registers, ! calculate the sum in one register. */ ! fprintf (asm_out_file, " add %s,%s ! special fix\n", ! reg_names[ptrreg2], reg_names[ptrreg1]); ! ! if (dreg == ptrreg1) ! { ! /* Copy into dreg+1 first. */ ! fprintf (asm_out_file, " mov.l @(4,%s),%s\n", ! reg_names[ptrreg1], ! reg_names[dreg + 1]); ! ! fprintf (asm_out_file, " mov.l @(%s),%s\n", ! reg_names[ptrreg1], ! reg_names[dreg]); ! } ! else ! { ! /* Copy into dreg first. */ ! fprintf (asm_out_file, " mov.l @(%s),%s\n", ! reg_names[ptrreg1], ! reg_names[dreg]); ! ! fprintf (asm_out_file, " mov.l @(4,%s),%s\n", ! reg_names[ptrreg1], ! reg_names[dreg + 1]); ! ! } ! warning ("generated complex amode"); ! return ""; ! } ! ! /* Work out the safe way to copy */ ! if (dreg == ptrreg1) ! { ! /* Copy into the second half first */ ! return "mov.l %R1,%R0\n\tmov.l %1,%0 ! cr"; ! } } ! return "mov.l %1,%0\n\tmov.l %R1,%R0"; } ! /* Emit assembly to shift reg by k bits */ ! ! char * ! output_shift (string, reg, k, code) ! char *string; ! rtx reg; ! rtx k; ! int code; { ! int s = INTVAL (k); ! if (s < 0) ! { ! s = -s; ! switch (code) ! { ! case LSHIFTRT: ! case ASHIFTRT: ! code = ASHIFT; ! break; ! case ASHIFT: ! code = ASHIFTRT; ! break; ! default: ! abort (); ! } ! } ! if (code == ASHIFT && s == 31) ! { ! /* Shift left by 31 moving into the t bit, clearing and rotating the other way */ ! ! fprintf (asm_out_file, "\trotr r%d\n", REGNO (reg)); ! fprintf (asm_out_file, "\tmov #0,r%d\n", REGNO (reg)); ! fprintf (asm_out_file, "\trotcr r%d\n", REGNO (reg)); ! s = 0; ! } ! ! if (code == LSHIFTRT && s == 31) ! { ! fprintf (asm_out_file, "\trotl r%d\n", REGNO (reg)); ! fprintf (asm_out_file, "\tmov #0,r%d\n", REGNO (reg)); ! fprintf (asm_out_file, "\trotcl r%d\n", REGNO (reg)); ! s = 0; ! } ! ! while (s) ! { ! char *out; ! int d; ! ! if (s >= 16) ! { ! d = 16; ! out = "16"; ! } ! else if (s >= 8) ! { ! d = 8; ! out = "8"; ! } ! else if (s >= 2) ! { ! d = 2; ! out = "2"; ! } ! else ! { ! d = 1; ! out = ""; ! } ! fprintf (asm_out_file, "\t%s%s\tr%d\n", string, out, REGNO (reg)); ! s -= d; ! } ! return ""; ! } ! ! void ! function_epilogue (stream, size) ! FILE *stream; ! int size; ! { ! pragma_interrupt = pragma_trapa = 0; } ! ! /* Return the text of the branch instruction which matches its length ! attribute. ! ! This gets tricky if we have an insn in the delay slot of a branch ! and the branch needs more than 1 insn to complete. */ ! ! int pending_const_table; ! /* We can't tell if we need a register as a scratch for the jump ! until after branch shortening, and then it's too late to allocate a ! register the 'proper' way. These instruction sequences are rare ! anyway, so to avoid always using a reg up from our limited set, we'll ! grab one when we need one on output. */ char * --- 396,485 ---- rtx src = operands[1]; if (GET_CODE (dst) == MEM ! && GET_CODE (XEXP (dst, 0)) == PRE_DEC) ! return "mov.l %T1,%0\n\tmov.l %1,%0"; ! if (register_operand (dst, mode) && register_operand (src, mode)) { if (REGNO (src) == MACH_REG) ! return "sts mach,%S0\n\tsts macl,%R0"; ! /* When mov.d r1,r2 do r2->r3 then r1->r2; ! when mov.d r1,r0 do r1->r0 then r2->r1. */ if (REGNO (src) + 1 == REGNO (dst)) ! return "mov %T1,%T0\n\tmov %1,%0"; else ! return "mov %1,%0\n\tmov %T1,%T0"; } else if (GET_CODE (src) == CONST_INT) { ! if (INTVAL (src) < 0) ! output_asm_insn ("mov #-1,%S0", operands); else ! output_asm_insn ("mov #0,%S0", operands); ! return "mov %1,%R0"; } else if (GET_CODE (src) == MEM) { ! int ptrreg = -1; int dreg = REGNO (dst); rtx inside = XEXP (src, 0); if (GET_CODE (inside) == REG) ! ptrreg = REGNO (inside); ! else if (GET_CODE (inside) == SUBREG) ! ptrreg = REGNO (SUBREG_REG (inside)) + SUBREG_WORD (inside); else if (GET_CODE (inside) == PLUS) { ! ptrreg = REGNO (XEXP (inside, 0)); ! /* ??? A r0+REG address shouldn't be possible here, because it isn't ! an offsettable address. Unfortunately, offsettable addresses use ! QImode to check the offset, and a QImode offsettable address ! requires r0 for the other operand, which is not currently ! supported, so we can't use the 'o' constraint. ! Thus we must check for and handle r0+REG addresses here. ! We punt for now, since this is likely very rare. */ ! if (GET_CODE (XEXP (inside, 1)) == REG) ! abort (); } else if (GET_CODE (inside) == LABEL_REF) ! return "mov.l %1,%0\n\tmov.l %1+4,%T0"; else if (GET_CODE (inside) == POST_INC) ! return "mov.l %1,%0\n\tmov.l %1,%T0"; else abort (); ! /* Work out the safe way to copy. Copy into the second half first. */ ! if (dreg == ptrreg) ! return "mov.l %T1,%T0\n\tmov.l %1,%0"; } ! return "mov.l %1,%0\n\tmov.l %T1,%T0"; } ! /* Print an instruction which would have gone into a delay slot after ! another instruction, but couldn't because the other instruction expanded ! into a sequence where putting the slot insn at the end wouldn't work. */ + static void + print_slot (insn) + rtx insn; { ! final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1); ! INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; } ! /* We can't tell if we need a register as a scratch for the jump ! until after branch shortening, and then it's too late to allocate a ! register the 'proper' way. These instruction sequences are rare ! anyway, so to avoid always using a reg up from our limited set, we'll ! grab one when we need one on output. */ ! /* ??? Should fix compiler so that using a clobber scratch in jump ! instructions works, and then this will be unnecessary. */ char * *************** *** 1051,1089 **** rtx thislab = gen_label_rtx (); if (dbr_sequence_length ()) ! { ! /* Something to go in what would have been the delay ! slot if this had been a short branch. Make sure the ! reg we use to generate the branch target address ! doesn't conflict */ ! ! int i; ! rtx vec[2]; ! vec[0] = thislab; ! ! for (i = 0; i < 8; i++) ! { ! vec[1] = gen_rtx (REG, SImode, i); ! if (!reg_referenced_p (vec[1], ! PATTERN (XVECEXP (final_sequence, 0, 1)))) ! break; ! } ! ! ! print_slot (final_sequence); ! output_asm_insn ("mov.l %1,@-r15", vec); ! output_asm_insn ("mov.l %O0,%1", vec); ! ! output_asm_insn ("jmp @%1 ! 32 xcond", vec); ! output_asm_insn ("mov.l @r15+,%1", vec); ! } ! else ! { ! output_asm_insn ("mov.l r13,@-r15", 0); ! output_asm_insn ("mov.l %O0,r13", &thislab); ! output_asm_insn ("jmp @r13 ! 32 zcond", 0); ! output_asm_insn ("mov.l @r15+,r13", 0); ! } output_asm_insn (".align 2", 0); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (thislab)); --- 490,501 ---- rtx thislab = gen_label_rtx (); + /* Output the delay slot insn first if any. */ if (dbr_sequence_length ()) ! print_slot (final_sequence); + output_asm_insn ("mov.l r13,@-r15", 0); + output_asm_insn ("mov.l %O0,r13", &thislab); + output_asm_insn ("jmp @r13", 0); + output_asm_insn ("mov.l @r15+,r13", 0); output_asm_insn (".align 2", 0); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (thislab)); *************** *** 1092,1295 **** } char * ! output_branch (logic, insn) int logic; rtx insn; { - extern rtx recog_operand[]; int label = lf++; - /* fprintf (asm_out_file, "! pc %04x\n", insn_addresses[INSN_UID (insn)]);*/ - switch (get_attr_length (insn)) { case 2: ! /* Simple branch in range -200..+200 bytes */ return logic ? "bt%. %l0" : "bf%. %l0"; case 6: ! /* Branch in range -4000..+4000 bytes */ { ! rtx oldop = recog_operand[0]; ! if (need_slot (final_sequence)) { ! fprintf (asm_out_file, "\tb%c.s\tLF%d\n", logic ? 'f' : 't', ! label); ! ! print_slot (final_sequence); } - else ! { ! fprintf (asm_out_file, "\tb%c\tLF%d\n", logic ? 'f' : 't', ! label); ! } ! recog_operand[0] = oldop; ! output_asm_insn ("bra %l0 ! 12 bit cond ", recog_operand); ! fprintf (asm_out_file, "\tor r0,r0\n"); fprintf (asm_out_file, "LF%d:\n", label); } return ""; case 16: ! /* Branches a long way away */ { ! rtx oldop = recog_operand[0]; ! if (need_slot (final_sequence)) ! { ! fprintf (asm_out_file, "\tb%c.s\tLF%d\n", logic ? 'f' : 't', label); ! print_slot (final_sequence); ! } ! else { ! fprintf (asm_out_file, "\tb%c\tLF%d\n", logic ? 'f' : 't', label); } ! output_far_jump (insn, oldop); fprintf (asm_out_file, "LF%d:\n", label); ! return ""; } } return "bad"; } ! ! /* The SH cannot load a large constant into a register, constants have to ! come from a pc relative load. The reference of a pc relative load ! instruction must be less than 1k infront of the instruction. This ! means that we often have to dump a constant inside a function, and ! generate code to branch around it. ! ! It is important to minimize this, since the branches will slow things ! down and make things bigger. ! ! Worst case code looks like: ! ! mov.l L1,rn ! bra L2 ! nop ! align ! L1: .long value ! L2: ! .. ! ! mov.l L3,rn ! bra L4 ! nop ! align ! L3: .long value ! L4: ! .. ! ! We fix this by performing a scan before scheduling, which notices which ! instructions need to have their operands fetched from the constant table ! and builds the table. ! ! ! The algorithm is: ! ! scan, find an instruction which needs a pcrel move. Look forward, find the ! last barrier which is within MAX_COUNT bytes of the requirement. ! If there isn't one, make one. Process all the instructions between ! the find and the barrier. ! ! In the above example, we can tell that L3 is within 1k of L1, so ! the first move can be shrunk from the 3 insn+constant sequence into ! just 1 insn, and the constant moved to L3 to make: ! ! mov.l L1,rn ! .. ! mov.l L3,rn ! bra L4 ! nop ! align ! L3:.long value ! L4:.long value ! ! Then the second move becomes the target for the shortening process. ! ! */ ! ! typedef struct ! { ! rtx value; /* Value in table */ ! rtx label; /* Label of value */ ! enum machine_mode mode; /* Mode of value */ ! } ! ! pool_node; ! ! /* The maximum number of constants that can fit into one pool, since ! the pc relative range is 0...1020 bytes and constants are at least 4 ! bytes long */ ! ! #define MAX_POOL_SIZE (1020/4) ! static pool_node pool_vector[MAX_POOL_SIZE]; ! static int pool_size; ! ! /* Add a constant to the pool and return its label. */ ! ! static rtx ! add_constant (x, mode) ! rtx x; ! enum machine_mode mode; ! { ! int i; ! rtx lab; ! /* First see if we've already got it */ ! ! for (i = 0; i < pool_size; i++) ! { ! if (x->code == pool_vector[i].value->code ! && mode == pool_vector[i].mode) ! { ! if (x->code == CODE_LABEL) ! { ! if (XINT (x, 3) != XINT (pool_vector[i].value, 3)) ! continue; ! } ! if (rtx_equal_p (x, pool_vector[i].value)) ! return pool_vector[i].label; ! } ! } ! ! /* Need a new one */ ! ! pool_vector[pool_size].value = x; ! lab = gen_label_rtx (); ! pool_vector[pool_size].mode = mode; ! pool_vector[pool_size].label = lab; ! pool_size++; ! return lab; ! } ! ! /* Dump out interesting debug info */ ! ! void ! final_prescan_insn (insn, opvec, noperands) ! rtx insn; ! rtx *opvec; ! int noperands; ! { ! if (target_flags & ISIZE_BIT) ! { ! extern int *insn_addresses; ! fprintf (asm_out_file, "\n! at %04x\n", ! insn_addresses[INSN_UID (insn)]); ! } ! } ! ! ! ! ! /* Stuff taken from m88k.c */ - /* Output to FILE the start of the assembler file. */ - struct option { --- 504,600 ---- } + /* Local label counter, used for constants in the pool and inside + pattern branches. */ + + static int lf = 100; + + /* Output code for ordinary branches. */ + char * ! output_branch (logic, insn, operands) int logic; rtx insn; + rtx *operands; { int label = lf++; switch (get_attr_length (insn)) { case 2: ! /* A branch with an unfilled delay slot. */ ! case 4: ! /* Simple branch in range -252..+258 bytes */ return logic ? "bt%. %l0" : "bf%. %l0"; case 6: ! /* A branch with an unfilled delay slot. */ ! case 8: ! /* Branch in range -4092..+4098 bytes. */ { ! /* The call to print_slot will clobber the operands. */ ! rtx op0 = operands[0]; + /* If the instruction in the delay slot is annulled (true), then + there is no delay slot where we can put it now. The only safe + place for it is after the label. */ ! if (final_sequence) { ! fprintf (asm_out_file, "\tb%c%s\tLF%d\n", logic ? 'f' : 't', ! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0)) ! ? "" : ".s", label); ! if (! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) ! print_slot (final_sequence); } else ! fprintf (asm_out_file, "\tb%c\tLF%d\n", logic ? 'f' : 't', label); ! output_asm_insn ("bra %l0", &op0); ! fprintf (asm_out_file, "\tnop\n"); fprintf (asm_out_file, "LF%d:\n", label); + + if (final_sequence + && INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) + print_slot (final_sequence); } return ""; case 16: ! /* A branch with an unfilled delay slot. */ ! case 18: ! /* Branches a long way away. */ { ! /* The call to print_slot will clobber the operands. */ ! rtx op0 = operands[0]; ! /* If the instruction in the delay slot is annulled (true), then ! there is no delay slot where we can put it now. The only safe ! place for it is after the label. */ ! if (final_sequence) { ! fprintf (asm_out_file, "\tb%c%s\tLF%d\n", logic ? 'f' : 't', ! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0)) ! ? "" : ".s", label); ! if (! INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) ! print_slot (final_sequence); } + else + fprintf (asm_out_file, "\tb%c\tLF%d\n", logic ? 'f' : 't', label); ! output_far_jump (insn, op0); fprintf (asm_out_file, "LF%d:\n", label); ! ! if (final_sequence ! && INSN_ANNULLED_BRANCH_P (XVECEXP (final_sequence, 0, 0))) ! print_slot (final_sequence); } + return ""; } return "bad"; } ! /* A copy of the option structure defined in toplev.c. */ struct option { *************** *** 1299,1302 **** --- 604,610 ---- }; + /* Output a single output option string NAME to FILE, without generating + lines longer than MAX. */ + static int output_option (file, sep, type, name, indent, pos, max) *************** *** 1317,1327 **** } static struct { char *name; int value; ! } ! m_options[] = TARGET_SWITCHES; static void --- 625,637 ---- } + /* A copy of the target_switches variable in toplev.c. */ + static struct { char *name; int value; ! } m_options[] = TARGET_SWITCHES; ! /* Output all options to the assembly language file. */ static void *************** *** 1340,1350 **** register int j; - if (optimize) pos = output_option (file, sep, "-O", "", indent, pos, max); if (write_symbols != NO_DEBUG) pos = output_option (file, sep, "-g", "", indent, pos, max); - if (flag_traditional) - pos = output_option (file, sep, "-traditional", "", indent, pos, max); if (profile_flag) pos = output_option (file, sep, "-p", "", indent, pos, max); --- 650,657 ---- *************** *** 1370,1378 **** indent, pos, max); - fprintf (file, term); - fprintf (file, "! %d %d\n", max_count_si, max_count_hi); } void output_file_start (file, f_options, f_len, W_options, W_len) --- 677,685 ---- indent, pos, max); fprintf (file, term); } + /* Output to FILE the start of the assembler file. */ + void output_file_start (file, f_options, f_len, W_options, W_len) *************** *** 1390,1513 **** data_section (); ! ! pos = fprintf (file, "\n! Hitachi SH cc1 (%s) (release I-1) arguments:", version_string); output_options (file, f_options, f_len, W_options, W_len, pos, 75, " ", "\n! ", "\n\n"); } ! /* Return the cost of a shift */ int ! shiftcosts (RTX) ! rtx RTX; { ! /* If shift by a non constant, then this will be expensive. */ ! if (GET_CODE (XEXP (RTX, 1)) != CONST_INT) ! return 20; ! ! /* otherwise, it will be very cheap if by one of the constants ! we can cope with. */ ! if (CONST_OK_FOR_K (INTVAL (XEXP (RTX, 1)))) ! return 1; ! /* otherwise it will be several insns, but we pretend that it will be more than ! just the components, so that combine doesn't glue together a load of shifts into ! one shift which has to be emitted as a bunch anyway - breaking scheduling */ ! return 1; } int ! andcosts (RTX) ! rtx RTX; { int i; ! if (GET_CODE (XEXP (RTX, 1)) != CONST_INT) ! return 2; ! i = INTVAL (XEXP (RTX, 1)); ! /* And can use the extend insns cheaply */ if (i == 0xff || i == 0xffff) return 2; ! /* Any small constant is reasonably cheap - but requires r0 */ if (CONST_OK_FOR_I (i)) ! return 3; ! return 5; ! } ! ! int ! howshift (i) ! int i; ! { ! int total = 0; ! while (i > 0) ! { ! if (i >= 16) ! { ! total++; ! i -= 16; ! } ! else if (i >= 8) ! { ! total++; ! i -= 8; ! } ! else if (i >= 2) ! { ! total++; ! i -= 2; ! } ! else if (i >= 1) ! { ! total++; ! i--; ! } ! } ! return total; } ! /* Return the cost of a multiply */ int ! multcosts (RTX) ! rtx RTX; { - /* If mult by a power of 2 then work out how we'd shift to make it */ - int insn_cost = 0; - - if (GET_CODE (XEXP (RTX, 1)) == CONST_INT) - { - int i = exact_log2 (INTVAL (XEXP (RTX, 1))); - if (i >= 0) - insn_cost = howshift (i); - else - insn_cost = 100000; - } if (TARGET_SH2) { /* We have a mul insn, so we can never take more than the mul and the ! read of the mac reg, but count more because of the latency and extra reg ! usage */ if (TARGET_SMALLCODE) return 2; ! if (insn_cost > 5) ! return 5; ! return insn_cost; } ! /* If we we're aiming at small code, then just count the number of ! insns in a multiply call sequence */ ! if (TARGET_SMALLCODE) ! { ! if (insn_cost > 6) ! return 6; ! return insn_cost; ! } ! /* Otherwise count all the insns in the routine we'd be calling too */ return 20; } ! /* Code to expand a shift */ void --- 697,831 ---- data_section (); ! pos = fprintf (file, "\n! Hitachi SH cc1 (%s) arguments:", version_string); output_options (file, f_options, f_len, W_options, W_len, pos, 75, " ", "\n! ", "\n\n"); + + if (TARGET_LITTLE_ENDIAN) + fprintf (file, "\t.little\n"); } + /* Actual number of instructions used to make a shift by N. */ + static char ashiftrt_insns[] = + { 0,1,2,3,4,5,8,8,8,8,8,8,8,8,8,8,2,3,4,5,8,8,8,8,8,8,8,8,8,8,8,2}; + + /* Left shift and logical right shift are the same. */ + static char shift_insns[] = + { 0,1,1,2,2,3,3,4,1,2,2,3,3,4,3,3,1,2,2,3,3,4,3,3,2,3,3,4,4,4,3,3}; + + /* Individual shift amounts needed to get the above length sequences. + One bit right shifts clobber the T bit, so when possible, put one bit + shifts in the middle of the sequence, so the ends are eligible for + branch delay slots. */ + static short shift_amounts[32][5] = { + {0}, {1}, {2}, {2, 1}, + {2, 2}, {2, 1, 2}, {2, 2, 2}, {2, 2, 1, 2}, + {8}, {8, 1}, {8, 2}, {8, 1, 2}, + {8, 2, 2}, {8, 2, 1, 2}, {8, -2, 8}, {8, -1, 8}, + {16}, {16, 1}, {16, 2}, {16, 1, 2}, + {16, 2, 2}, {16, 2, 1, 2}, {16, -2, 8}, {16, -1, 8}, + {16, 8}, {16, 1, 8}, {16, 8, 2}, {16, 8, 1, 2}, + {16, 8, 2, 2}, {16, -1, -2, 16}, {16, -2, 16}, {16, -1, 16}}; + + /* This is used in length attributes in sh.md to help compute the length + of arbitrary constant shift instructions. */ + + int + shift_insns_rtx (insn) + rtx insn; + { + rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0)); + int shift_count = INTVAL (XEXP (set_src, 1)); + enum rtx_code shift_code = GET_CODE (set_src); + switch (shift_code) + { + case ASHIFTRT: + return ashiftrt_insns[shift_count]; + case LSHIFTRT: + case ASHIFT: + return shift_insns[shift_count]; + default: + abort(); + } + } ! /* Return the cost of a shift. */ int ! shiftcosts (x) ! rtx x; { ! int value = INTVAL (XEXP (x, 1)); ! /* If shift by a non constant, then this will be expensive. */ ! if (GET_CODE (XEXP (x, 1)) != CONST_INT) ! { ! if (TARGET_SH3) ! return 2; ! /* If not an sh3 then we don't even have an instruction for it. */ ! return 20; ! } ! ! /* Otherwise, return the true cost in instructions. */ ! if (GET_CODE (x) == ASHIFTRT) ! return ashiftrt_insns[value]; ! else ! return shift_insns[value]; } + /* Return the cost of an AND operation. */ + int ! andcosts (x) ! rtx x; { int i; ! ! /* Anding with a register is a single cycle and instruction. */ ! if (GET_CODE (XEXP (x, 1)) != CONST_INT) ! return 1; ! ! i = INTVAL (XEXP (x, 1)); ! /* These constants are single cycle extu.[bw] instructions. */ if (i == 0xff || i == 0xffff) + return 1; + /* Constants that can be used in an and immediate instruction is a single + cycle, but this requires r0, so make it a little more expensive. */ + if (CONST_OK_FOR_L (i)) return 2; ! /* Constants that can be loaded with a mov immediate and an and. ! This case is probably unnecessary. */ if (CONST_OK_FOR_I (i)) ! return 2; ! /* Any other constants requires a 2 cycle pc-relative load plus an and. ! This case is probably unnecessary. */ ! return 3; } ! /* Return the cost of a multiply. */ int ! multcosts (x) ! rtx x; { if (TARGET_SH2) { /* We have a mul insn, so we can never take more than the mul and the ! read of the mac reg, but count more because of the latency and extra ! reg usage. */ if (TARGET_SMALLCODE) return 2; ! return 3; } ! /* If we're aiming at small code, then just count the number of ! insns in a multiply call sequence. */ if (TARGET_SMALLCODE) ! return 5; ! /* Otherwise count all the insns in the routine we'd be calling too. */ return 20; } ! /* Code to expand a shift. */ void *************** *** 1517,1520 **** --- 835,848 ---- rtx reg; { + /* Negative values here come from the shift_amounts array. */ + if (n < 0) + { + if (type == ASHIFT) + type = LSHIFTRT; + else + type = ASHIFT; + n = -n; + } + switch (type) { *************** *** 1523,1537 **** break; case LSHIFTRT: - emit_insn (gen_lshrsi3_k (reg, reg, GEN_INT (n))); - break; - case ASHIFT: if (n == 1) ! emit_insn (gen_addsi3 (reg, reg, reg)); else ! emit_insn (gen_ashlsi3_k (reg, reg, GEN_INT (n))); break; } } int gen_shifty_op (code, operands) --- 851,871 ---- break; case LSHIFTRT: if (n == 1) ! emit_insn (gen_lshrsi3_m (reg, reg, GEN_INT (n))); else ! emit_insn (gen_lshrsi3_k (reg, reg, GEN_INT (n))); ! break; ! case ASHIFT: ! emit_insn (gen_ashlsi3_k (reg, reg, GEN_INT (n))); break; } } + /* Output RTL to split a constant shift into its component SH constant + shift instructions. */ + + /* ??? For SH3, should reject constant shifts when slower than loading the + shift count into a register? */ + int gen_shifty_op (code, operands) *************** *** 1539,1655 **** rtx *operands; { ! rtx wrk = gen_reg_rtx (SImode); ! rtx t; ! char *func; ! if (GET_CODE (operands[2]) == CONST_INT) ! { ! int value = INTVAL (operands[2]); ! top: ! switch (code) { ! case ASHIFTRT: ! if (value < 0) { ! code = ASHIFT; ! value = -value; ! goto top; } ! /* Expand a short sequence inline, longer call a magic routine */ ! if (value <= 5) ! { ! emit_move_insn (wrk, operands[1]); ! while (value--) ! { ! gen_ashift (ASHIFTRT, 1, wrk); ! } ! emit_move_insn (operands[0], wrk); ! return 1; ! } ! t = gen_reg_rtx (Pmode); ! /* Load the value into an arg reg and call a helper */ ! emit_move_insn (gen_rtx (REG, SImode, 4), operands[1]); ! if (!shiftsyms[value]) ! { ! func = xmalloc (18); ! sprintf (func, "__ashiftrt_r4_%d", value); ! shiftsyms[value] = gen_rtx (SYMBOL_REF, Pmode, func); ! } ! emit_move_insn (t, shiftsyms[value]); ! emit_insn (gen_ashrsi3_n (GEN_INT (value), t)); ! emit_move_insn (operands[0], gen_rtx (REG, SImode, 4)); ! return 1; ! case ASHIFT: ! if (value < 0) ! { ! code = LSHIFTRT; ! value = -value; ! goto top; ! } ! /* Fall through */ ! case LSHIFTRT: ! if (value < 0) ! { ! code = ASHIFT; ! value = -value; ! goto top; ! } ! emit_move_insn (wrk, operands[1]); ! while (value) ! { ! if (value >= 16) ! { ! gen_ashift (code, 16, wrk); ! value -= 16; ! } ! else if (value >= 8) ! { ! gen_ashift (code, 8, wrk); ! value -= 8; ! } ! else if (value >= 2) ! { ! gen_ashift (code, 2, wrk); ! value -= 2; ! } ! else ! { ! gen_ashift (code, 1, wrk); ! value--; ! } ! } ! emit_move_insn (operands[0], wrk); ! return 1; ! } } ! return 0; } ! /* Dump out any constants accumulated in the final pass - ! which will only be labels */ ! char * ! output_jump_label_table () { int i; ! if (pool_size) { ! fprintf (asm_out_file, "\t.align 2\n"); ! for (i = 0; i < pool_size; i++) { ! pool_node *p = pool_vector + i; ! ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (p->label)); ! output_asm_insn (".long %O0", &p->value); } - pool_size = 0; } ! return ""; } ! /* Output the literal table */ static void --- 873,1083 ---- rtx *operands; { ! int value = INTVAL (operands[2]); ! int max, i; ! ! if (value == 31) ! { ! if (code == LSHIFTRT) ! { ! emit_insn (gen_rotlsi3_1 (operands[0], operands[0])); ! emit_insn (gen_movt (operands[0])); ! return; ! } ! else if (code == ASHIFT) { ! /* There is a two instruction sequence for 31 bit left shifts, ! but it requires r0. */ ! if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == 0) { ! emit_insn (gen_andsi3 (operands[0], operands[0], const1_rtx)); ! emit_insn (gen_rotlsi3_31 (operands[0], operands[0])); ! return; } + } + } ! max = shift_insns[value]; ! for (i = 0; i < max; i++) ! gen_ashift (code, shift_amounts[value][i], operands[0]); ! } ! /* Output RTL for an arithmetic right shift. */ ! /* ??? Rewrite to use super-optimizer sequences. */ ! int ! expand_ashiftrt (operands) ! rtx *operands; ! { ! rtx wrk; ! char func[18]; ! tree func_name; ! int value; ! if (TARGET_SH3 && GET_CODE (operands[2]) != CONST_INT) ! { ! rtx count = copy_to_mode_reg (SImode, operands[2]); ! emit_insn (gen_negsi2 (count, count)); ! emit_insn (gen_ashrsi3_d (operands[0], operands[1], count)); ! return 1; } ! if (GET_CODE (operands[2]) != CONST_INT) ! return 0; ! ! value = INTVAL (operands[2]); ! ! if (value == 31) ! { ! emit_insn (gen_ashrsi2_31 (operands[0], operands[1])); ! return 1; ! } ! else if (value >= 16 && value <= 19) ! { ! wrk = gen_reg_rtx (SImode); ! emit_insn (gen_ashrsi2_16 (wrk, operands[1])); ! value -= 16; ! while (value--) ! gen_ashift (ASHIFTRT, 1, wrk); ! emit_move_insn (operands[0], wrk); ! return 1; ! } ! /* Expand a short sequence inline, longer call a magic routine. */ ! else if (value <= 5) ! { ! wrk = gen_reg_rtx (SImode); ! emit_move_insn (wrk, operands[1]); ! while (value--) ! gen_ashift (ASHIFTRT, 1, wrk); ! emit_move_insn (operands[0], wrk); ! return 1; ! } ! ! wrk = gen_reg_rtx (Pmode); ! ! /* Load the value into an arg reg and call a helper. */ ! emit_move_insn (gen_rtx (REG, SImode, 4), operands[1]); ! sprintf (func, "__ashiftrt_r4_%d", value); ! func_name = get_identifier (func); ! emit_move_insn (wrk, gen_rtx (SYMBOL_REF, Pmode, ! IDENTIFIER_POINTER (func_name))); ! emit_insn (gen_ashrsi3_n (GEN_INT (value), wrk)); ! emit_move_insn (operands[0], gen_rtx (REG, SImode, 4)); ! return 1; } + + /* The SH cannot load a large constant into a register, constants have to + come from a pc relative load. The reference of a pc relative load + instruction must be less than 1k infront of the instruction. This + means that we often have to dump a constant inside a function, and + generate code to branch around it. ! It is important to minimize this, since the branches will slow things ! down and make things bigger. ! ! Worst case code looks like: ! ! mov.l L1,rn ! bra L2 ! nop ! align ! L1: .long value ! L2: ! .. ! ! mov.l L3,rn ! bra L4 ! nop ! align ! L3: .long value ! L4: ! .. ! ! We fix this by performing a scan before scheduling, which notices which ! instructions need to have their operands fetched from the constant table ! and builds the table. ! ! The algorithm is: ! ! scan, find an instruction which needs a pcrel move. Look forward, find the ! last barrier which is within MAX_COUNT bytes of the requirement. ! If there isn't one, make one. Process all the instructions between ! the find and the barrier. ! ! In the above example, we can tell that L3 is within 1k of L1, so ! the first move can be shrunk from the 3 insn+constant sequence into ! just 1 insn, and the constant moved to L3 to make: ! ! mov.l L1,rn ! .. ! mov.l L3,rn ! bra L4 ! nop ! align ! L3:.long value ! L4:.long value ! ! Then the second move becomes the target for the shortening process. */ ! ! typedef struct ! { ! rtx value; /* Value in table. */ ! rtx label; /* Label of value. */ ! enum machine_mode mode; /* Mode of value. */ ! } pool_node; ! ! /* The maximum number of constants that can fit into one pool, since ! the pc relative range is 0...1020 bytes and constants are at least 4 ! bytes long. */ ! ! #define MAX_POOL_SIZE (1020/4) ! static pool_node pool_vector[MAX_POOL_SIZE]; ! static int pool_size; ! ! /* ??? If we need a constant in HImode which is the truncated value of a ! constant we need in SImode, we could combine the two entries thus saving ! two bytes. Is this common enough to be worth the effort of implementing ! it? */ ! ! /* ??? This stuff should be done at the same time that we shorten branches. ! As it is now, we must assume that all branches are the maximum size, and ! this causes us to almost always output constant pools sooner than ! necessary. */ ! ! /* Add a constant to the pool and return its label. */ ! ! static rtx ! add_constant (x, mode) ! rtx x; ! enum machine_mode mode; { int i; ! rtx lab; ! ! /* First see if we've already got it. */ ! for (i = 0; i < pool_size; i++) { ! if (x->code == pool_vector[i].value->code ! && mode == pool_vector[i].mode) { ! if (x->code == CODE_LABEL) ! { ! if (XINT (x, 3) != XINT (pool_vector[i].value, 3)) ! continue; ! } ! if (rtx_equal_p (x, pool_vector[i].value)) ! return pool_vector[i].label; } } ! /* Need a new one. */ ! pool_vector[pool_size].value = x; ! lab = gen_label_rtx (); ! pool_vector[pool_size].mode = mode; ! pool_vector[pool_size].label = lab; ! pool_size++; ! return lab; } ! ! /* Output the literal table. */ static void *************** *** 1660,1669 **** int need_align = 1; - /* Do two passes, first time dump out the HI sized constants */ - for (i = 0; i < pool_size; i++) { ! pool_node *p = pool_vector + i; if (p->mode == HImode) { --- 1088,1097 ---- int need_align = 1; + /* Do two passes, first time dump out the HI sized constants. */ for (i = 0; i < pool_size; i++) { ! pool_node *p = &pool_vector[i]; ! if (p->mode == HImode) { *************** *** 1677,1685 **** } } need_align = 1; for (i = 0; i < pool_size; i++) { ! pool_node *p = pool_vector + i; switch (p->mode) --- 1105,1114 ---- } } + need_align = 1; for (i = 0; i < pool_size; i++) { ! pool_node *p = &pool_vector[i]; switch (p->mode) *************** *** 1718,1779 **** } ! ! /* Non zero if the src operand needs to be fixed up */ ! static ! int ! fixit (src, mode) rtx src; - enum machine_mode mode; { ! if (mode == QImode) ! return 0; /* QIs never need to be fixed */ ! if (GET_CODE (src) == CONST) ! return 1; ! ! if (GET_CODE (src) == SYMBOL_REF) ! { ! return 1; ! } ! if (GET_CODE (src) == LABEL_REF) ! { ! return 1; ! } ! if (GET_CODE (src) == CONST_INT) ! { ! /* All QI insns are ok */ ! if (mode == QImode) ! return 1; ! /* The rest may need to be fixed */ ! return !CONST_OK_FOR_I (INTVAL (src)); ! } ! return 0; } ! /* Return Non-zero if constant would be an ok source for a ! mov.w instead of a mov.l */ ! int ! hi_const (src) ! rtx src; ! { ! if (GET_CODE (src) == CONST ! && GET_CODE (XEXP (src, 0)) == SIGN_EXTEND ! && GET_CODE (XEXP (XEXP (src, 0), 0)) == SYMBOL_REF) ! return 1; ! if (TARGET_SHORTADDR ! && GET_CODE (src) == SYMBOL_REF) return 1; ! return (GET_CODE (src) == CONST_INT ! && INTVAL (src) >= -32768 ! && INTVAL (src) <= 32767); } ! /* Find the last barrier less than MAX_COUNT bytes from FROM, or create one. ! If an HI move is found, then make sure that MAX_COUNT_HI isn't broken from that one. */ ! static ! rtx find_barrier (from) rtx from; --- 1147,1198 ---- } ! /* Return non-zero if constant would be an ok source for a ! mov.w instead of a mov.l. */ ! static int ! hi_const (src) rtx src; { ! return (GET_CODE (src) == CONST_INT ! && INTVAL (src) >= -32768 ! && INTVAL (src) <= 32767); } ! /* Non-zero if the insn is a move instruction which needs to be fixed. */ ! /* ??? For a DImode/DFmode moves, we don't need to fix it if each half of the ! CONST_DOUBLE input value is CONST_OK_FOR_I. For a SFmode move, we don't ! need to fix it if the input value is CONST_OK_FOR_I. */ ! ! static int ! broken_move (insn) ! rtx insn; ! { ! if (GET_CODE (insn) == INSN ! && GET_CODE (PATTERN (insn)) == SET ! /* We can load any 8 bit value if we don't care what the high ! order bits end up as. */ ! && GET_MODE (SET_DEST (PATTERN (insn))) != QImode ! && CONSTANT_P (SET_SRC (PATTERN (insn))) ! && (GET_CODE (SET_SRC (PATTERN (insn))) != CONST_INT ! || ! CONST_OK_FOR_I (INTVAL (SET_SRC (PATTERN (insn)))))) return 1; ! return 0; } ! /* Find the last barrier from insn FROM which is close enough to hold the ! constant pool. If we can't find one, then create one near the end of ! the range. */ ! ! /* ??? It would be good to put constant pool tables between a case jump and ! the jump table. This fails for two reasons. First, there is no ! barrier after the case jump. This is a bug in the casesi pattern. ! Second, inserting the table here may break the mova instruction that ! loads the jump table address, by moving the jump table too far away. ! We fix that problem by never outputting the constant pool between a mova ! and its label. */ ! static rtx find_barrier (from) rtx from; *************** *** 1784,1803 **** int found_si = 0; rtx found_barrier = 0; ! while (from ! && count_si < max_count_si ! && count_hi < max_count_hi) { int inc; if (GET_CODE (from) == BARRIER) ! { ! found_barrier = from; ! } /* Count the length of this insn - we assume that all moves will ! be 2 bytes long, except the DIs */ ! if (GET_CODE (from) == INSN && ! GET_CODE (PATTERN (from)) == SET) { rtx src = SET_SRC (PATTERN (from)); if (hi_const (src)) found_hi = 1; --- 1203,1229 ---- int found_si = 0; rtx found_barrier = 0; ! rtx found_mova = 0; ! ! /* For HImode: range is 510, add 4 because pc counts from address of ! second instruction after this one, subtract 2 for the jump instruction ! that we may need to emit before the table. This gives 512. ! For SImode: range is 1020, add 4 because pc counts from address of ! second instruction after this one, subtract 2 in case pc is 2 byte ! aligned, subtract 2 for the jump instruction that we may need to emit ! before the table. This gives 1020. */ ! while (from && count_si < 1020 && count_hi < 512) { int inc; + if (GET_CODE (from) == BARRIER) ! found_barrier = from; ! /* Count the length of this insn - we assume that all moves will ! be 2 bytes long, except the DImode/DFmode movess. */ ! if (broken_move (from)) { rtx src = SET_SRC (PATTERN (from)); + if (hi_const (src)) found_hi = 1; *************** *** 1807,1813 **** } else ! { ! inc = get_attr_length (from); ! } if (found_si) count_si += inc; --- 1233,1248 ---- } else ! inc = get_attr_length (from); ! ! if (GET_CODE (from) == INSN ! && GET_CODE (PATTERN (from)) == SET ! && GET_CODE (SET_SRC (PATTERN (from))) == UNSPEC ! && XINT (SET_SRC (PATTERN (from)), 1) == 1) ! found_mova = from; ! else if (GET_CODE (from) == JUMP_INSN ! && (GET_CODE (PATTERN (from)) == ADDR_VEC ! || GET_CODE (PATTERN (from)) == ADDR_DIFF_VEC)) ! found_mova = 0; ! if (found_si) count_si += inc; *************** *** 1817,1869 **** } ! if (!found_barrier) { ! /* We didn't find a barrier in time to ! dump our stuff, so we'll make one */ rtx label = gen_label_rtx (); ! /* Walk back to be just before any jump */ from = PREV_INSN (from); ! while (GET_CODE (from) == JUMP_INSN ! || GET_CODE (from) == NOTE || GET_CODE (from) == CODE_LABEL) ! { ! from = PREV_INSN (from); ! } from = emit_jump_insn_after (gen_jump (label), from); JUMP_LABEL (from) = label; found_barrier = emit_barrier_after (from); emit_label_after (label, found_barrier); - return found_barrier; } - return found_barrier; - } - - /* Non zero if the insn is a move instruction which needs to be fixed. */ ! static ! int ! broken_move (insn) ! rtx insn; ! { ! if (!INSN_DELETED_P (insn) ! && GET_CODE (insn) == INSN ! && GET_CODE (PATTERN (insn)) == SET) ! { ! rtx pat = PATTERN (insn); ! rtx src = SET_SRC (pat); ! rtx dst = SET_DEST (pat); ! enum machine_mode mode = GET_MODE (dst); ! if (dst == pc_rtx) ! return 0; ! return fixit (src, mode); ! } ! return 0; } - /* Exported to toplev.c - Scan the function looking for move instructions which have to be changed to ! pcrel loads and insert the literal tables. */ void --- 1252,1290 ---- } ! /* Insert the constant pool table before the mova instruction, to prevent ! the mova label reference from going out of range. */ ! if (found_mova) ! from = found_mova; ! ! if (! found_barrier) { ! /* We didn't find a barrier in time to dump our stuff, ! so we'll make one. */ rtx label = gen_label_rtx (); ! ! /* We went one instruction too far above. */ from = PREV_INSN (from); ! /* Walk back to be just before any jump or label. ! Putting it before a label reduces the number of times the branch ! around the constant pool table will be hit. Putting it before ! a jump makes it more likely that the bra delay slot will be ! filled. */ ! while (GET_CODE (from) == JUMP_INSN || GET_CODE (from) == NOTE || GET_CODE (from) == CODE_LABEL) ! from = PREV_INSN (from); ! from = emit_jump_insn_after (gen_jump (label), from); JUMP_LABEL (from) = label; found_barrier = emit_barrier_after (from); emit_label_after (label, found_barrier); } ! return found_barrier; } + /* Exported to toplev.c. Scan the function looking for move instructions which have to be changed to ! pc-relative loads and insert the literal tables. */ void *************** *** 1872,1885 **** { rtx insn; for (insn = first; insn; insn = NEXT_INSN (insn)) { if (broken_move (insn)) { - /* This is a broken move instruction, scan ahead looking for - a barrier to stick the constant table behind */ rtx scan; rtx barrier = find_barrier (insn); ! /* Now find all the moves between the points and modify them */ for (scan = insn; scan != barrier; scan = NEXT_INSN (scan)) { --- 1293,1307 ---- { rtx insn; + for (insn = first; insn; insn = NEXT_INSN (insn)) { if (broken_move (insn)) { rtx scan; + /* Scan ahead looking for a barrier to stick the constant table + behind. */ rtx barrier = find_barrier (insn); ! /* Now find all the moves between the points and modify them. */ for (scan = insn; scan != barrier; scan = NEXT_INSN (scan)) { *************** *** 1893,1922 **** rtx newinsn; rtx newsrc; - /* This is a broken move instruction, add it to the pool */ if (mode == SImode && hi_const (src)) { ! /* This is an HI source, clobber the dest to get the mode right too */ mode = HImode; while (GET_CODE (dst) == SUBREG) ! dst = SUBREG_REG (dst); ! dst = gen_rtx (REG, HImode, REGNO (dst)); } lab = add_constant (src, mode); newsrc = gen_rtx (MEM, mode, gen_rtx (LABEL_REF, VOIDmode, lab)); - /* Build a jump insn wrapper around the move instead - of an ordinary insn, because we want to have room for - the target label rtx in fld[7], which an ordinary - insn doesn't have. */ - newinsn = emit_jump_insn_after (gen_rtx (SET, VOIDmode, - dst, newsrc), scan); - JUMP_LABEL (newinsn) = lab; - - /* But it's still an ordinary insn */ - PUT_CODE (newinsn, INSN); - - /* Kill old insn */ delete_insn (scan); scan = newinsn; --- 1315,1339 ---- rtx newinsn; rtx newsrc; if (mode == SImode && hi_const (src)) { ! int offset = 0; ! mode = HImode; while (GET_CODE (dst) == SUBREG) ! { ! offset += SUBREG_WORD (dst); ! dst = SUBREG_REG (dst); ! } ! dst = gen_rtx (REG, HImode, REGNO (dst) + offset); } + lab = add_constant (src, mode); newsrc = gen_rtx (MEM, mode, gen_rtx (LABEL_REF, VOIDmode, lab)); + RTX_UNCHANGING_P (newsrc) = 1; + newinsn = emit_insn_after (gen_rtx (SET, VOIDmode, + dst, newsrc), scan); delete_insn (scan); scan = newinsn; *************** *** 1928,2023 **** } ! /* Called from the md file, set up the operands of a compare instruction */ void ! from_compare (operands, code) ! rtx *operands; ! int code; { ! if (code != EQ && code != NE) { ! /* Force args into regs, since we can't use constants here */ ! sh_compare_op0 = force_reg (SImode, sh_compare_op0); ! if (sh_compare_op1 != const0_rtx) ! sh_compare_op1 = force_reg (SImode, sh_compare_op1); } ! operands[1] = sh_compare_op0; ! operands[2] = sh_compare_op1; } ! /* Non-zero if x is EQ or NE */ ! int ! equality_operator (x, mode) ! rtx x; ! enum machine_mode mode; { ! enum rtx_code code = GET_CODE (x); ! return (code == EQ || code == NE); } ! /* Add this function to the list of ones seen - temporary ! gross hack to try out bsrs. */ ! struct flist { ! char *name; ! struct flist *next; ! }; ! struct flist *head; static void ! add_function (name) ! char *name; { ! struct flist *n = (struct flist *) xmalloc (sizeof (struct flist)); ! int l = strlen (name) + 1; ! n->name = xmalloc (l); ! memcpy (n->name, name, l); ! n->next = head; ! head = n; } ! static int ! seen_function (name) ! char *name; { ! struct flist *p = head; ! for (p = head; p; p = p->next) ! { ! if (strcmp (p->name, name) == 0) ! return 1; ! } ! return 0; } ! /* Framefull frame looks like: ! arg-5 ! arg-4 ! [ if current_function_anonymous_args ! arg-3 ! arg-2 ! arg-1 ! arg-0 ] ! saved-fp ! saved-r10 ! saved-r11 ! saved-r12 ! saved-pr ! local-n ! .. ! local-1 ! local-0 <- fp points here ! ! ! If TARGET_SMALLCALL, then the preserved registers are pushed by a ! wrapper before the routine is entered, so the regs are always pushed ! and there are two pr's on the stack - the caller and the wrapper. ! */ ! /* Code to generate prologue and epilogue sequences */ void --- 1345,1524 ---- } ! /* Dump out instruction addresses, which is useful for debugging the ! constant pool table stuff. */ ! ! /* ??? This is unnecessary, and probably should be deleted. This makes ! the insn_addresses declaration above unnecessary. */ + /* ??? The addresses printed by this routine for insns are nonsense for + insns which are inside of a sequence where none of the inner insns have + variable length. This is because the second pass of shorten_branches + does not bother to update them. */ + void ! final_prescan_insn (insn, opvec, noperands) ! rtx insn; ! rtx *opvec; ! int noperands; { ! if (TARGET_DUMPISIZE) ! fprintf (asm_out_file, "\n! at %04x\n", insn_addresses[INSN_UID (insn)]); ! } ! ! /* Dump out any constants accumulated in the final pass. These will ! will only be labels. */ ! ! char * ! output_jump_label_table () ! { ! int i; ! ! if (pool_size) { ! fprintf (asm_out_file, "\t.align 2\n"); ! for (i = 0; i < pool_size; i++) ! { ! pool_node *p = &pool_vector[i]; ! ! ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ! CODE_LABEL_NUMBER (p->label)); ! output_asm_insn (".long %O0", &p->value); ! } ! pool_size = 0; } ! ! return ""; } + + /* A full frame looks like: ! arg-5 ! arg-4 ! [ if current_function_anonymous_args ! arg-3 ! arg-2 ! arg-1 ! arg-0 ] ! saved-fp ! saved-r10 ! saved-r11 ! saved-r12 ! saved-pr ! local-n ! .. ! local-1 ! local-0 <- fp points here. */ ! /* Number of bytes pushed for anonymous args, used to pass information ! between expand_prologue and expand_epilogue. */ ! ! static int extra_push; ! ! /* Adjust the stack and return the number of bytes taken to do it. */ ! ! static void ! output_stack_adjust (size) ! int size; { ! if (size) ! { ! rtx val = GEN_INT (size); ! rtx insn; ! ! if (! CONST_OK_FOR_I (size)) ! { ! rtx reg = gen_rtx (REG, SImode, 3); ! emit_insn (gen_movsi (reg, val)); ! val = reg; ! } ! ! insn = gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, val); ! emit_insn (insn); ! } } + /* Output RTL to push register RN onto the stack. */ ! static void ! push (rn) ! int rn; { ! rtx x; ! x = emit_insn (gen_push (gen_rtx (REG, SImode, rn))); ! REG_NOTES (x) = gen_rtx (EXPR_LIST, REG_INC, ! gen_rtx(REG, SImode, STACK_POINTER_REGNUM), 0); ! } ! ! /* Output RTL to pop register RN from the stack. */ static void ! pop (rn) ! int rn; { ! rtx x; ! x = emit_insn (gen_pop (gen_rtx (REG, SImode, rn))); ! REG_NOTES (x) = gen_rtx (EXPR_LIST, REG_INC, ! gen_rtx(REG, SImode, STACK_POINTER_REGNUM), 0); } ! /* Generate code to push the regs specified in the mask, and return ! the number of bytes the insns take. */ ! ! static void ! push_regs (mask) ! int mask; { ! int i; ! ! for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (mask & (1 << i)) ! push (i); } ! /* Work out the registers which need to be saved, both as a mask and a ! count. ! ! If doing a pragma interrupt function, then push all regs used by the ! function, and if we call another function (we can tell by looking at PR), ! make sure that all the regs it clobbers are safe too. */ ! static int ! calc_live_regs (count_ptr) ! int *count_ptr; ! { ! int reg; ! int live_regs_mask = 0; ! int count = 0; + for (reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++) + { + if (pragma_interrupt && ! pragma_trapa) + { + /* Need to save all the regs ever live. */ + if ((regs_ever_live[reg] + || (call_used_regs[reg] && regs_ever_live[PR_REG])) + && reg != STACK_POINTER_REGNUM && reg != ARG_POINTER_REGNUM + && reg != T_REG && reg != GBR_REG) + { + live_regs_mask |= 1 << reg; + count++; + } + } + else + { + /* Only push those regs which are used and need to be saved. */ + if (regs_ever_live[reg] && ! call_used_regs[reg]) + { + live_regs_mask |= (1 << reg); + count++; + } + } + } ! *count_ptr = count; ! return live_regs_mask; ! } + /* Code to generate prologue and epilogue sequences */ void *************** *** 2025,2044 **** { int live_regs_mask; ! int d; ! extern tree current_function_decl; live_regs_mask = calc_live_regs (&d); /* We have pretend args if we had an object sent partially in registers ! and partially on the stack - eg a large structure */ output_stack_adjust (-current_function_pretend_args_size); if (current_function_anonymous_args) { ! /* Push arg regs as if they'd been provided by caller in stack */ ! int i; for (i = 0; i < NPARM_REGS; i++) { int rn = NPARM_REGS + FIRST_PARM_REG - i - 1; ! if (i > NPARM_REGS - current_function_args_info) break; push (rn); --- 1526,1550 ---- { int live_regs_mask; ! int d, i; live_regs_mask = calc_live_regs (&d); /* We have pretend args if we had an object sent partially in registers ! and partially on the stack, e.g. a large structure. */ output_stack_adjust (-current_function_pretend_args_size); + extra_push = 0; + + /* This is set by SETUP_VARARGS to indicate that this is a varargs + routine. Clear it here so that the next function isn't affected. */ if (current_function_anonymous_args) { ! current_function_anonymous_args = 0; ! ! /* Push arg regs as if they'd been provided by caller in stack. */ for (i = 0; i < NPARM_REGS; i++) { int rn = NPARM_REGS + FIRST_PARM_REG - i - 1; ! if (i > (NPARM_REGS - current_function_args_info ! - current_function_varargs)) break; push (rn); *************** *** 2050,2062 **** if (frame_pointer_needed) ! { ! emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx)); ! } ! if (TARGET_BSR) ! { ! add_function (IDENTIFIER_POINTER (DECL_NAME (current_function_decl))); ! } ! ! } --- 1556,1560 ---- if (frame_pointer_needed) ! emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx)); } *************** *** 2065,2081 **** { int live_regs_mask; ! int d; ! int i; live_regs_mask = calc_live_regs (&d); - if (frame_pointer_needed) ! { ! emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx)); ! } output_stack_adjust (get_frame_size ()); ! /* Pop all the registers */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) --- 1563,1576 ---- { int live_regs_mask; ! int d, i; live_regs_mask = calc_live_regs (&d); if (frame_pointer_needed) ! emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx)); ! output_stack_adjust (get_frame_size ()); ! /* Pop all the registers. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) *************** *** 2083,2099 **** int j = (FIRST_PSEUDO_REGISTER - 1) - i; if (live_regs_mask & (1 << j)) ! { ! pop (j); ! } } output_stack_adjust (extra_push + current_function_pretend_args_size); ! extra_push = 0; ! current_function_pretend_args_size = 0; ! current_function_anonymous_args = 0; ! for (i = 0; i < 32; i++) ! shiftsyms[i] = 0; } --- 1578,1595 ---- int j = (FIRST_PSEUDO_REGISTER - 1) - i; if (live_regs_mask & (1 << j)) ! pop (j); } output_stack_adjust (extra_push + current_function_pretend_args_size); + } ! /* Clear variables at function end. */ + void + function_epilogue (stream, size) + FILE *stream; + int size; + { + pragma_interrupt = pragma_trapa = 0; } *************** *** 2114,2134 **** if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) ! { ! return total_saved_regs_space + total_auto_space; ! } if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) ! { ! return total_saved_regs_space + total_auto_space; ! } if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) ! { ! /* Initial gap between fp and sp is 0 */ ! return 0; ! } abort (); } ! /* Handle machine specific pragmas to be semi-compatible with Hitachi ! compiler */ int --- 1610,1627 ---- if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) ! return total_saved_regs_space + total_auto_space; ! if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) ! return total_saved_regs_space + total_auto_space; ! ! /* Initial gap between fp and sp is 0. */ if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) ! return 0; ! abort (); } ! /* Handle machine specific pragmas to be semi-compatible with Hitachi ! compiler. */ int *************** *** 2165,2227 **** } ! /* insn expand helpers */ ! /* Emit insns to perform a call. ! If TARGET_SHORTADDR then use a bsr. If TARGET_SMALLCALL, then load the ! target address into r1 and call __saveargs, otherwise ! perform the standard call sequence */ ! void ! expand_acall (isa_retval, operands) ! int isa_retval; ! rtx *operands; { ! rtx call; ! rtx ret = operands[0]; ! rtx call_target = operands[isa_retval + 0]; ! rtx numargs = operands[isa_retval + 1]; ! ! if (TARGET_BSR && bsr_operand (call_target, VOIDmode)) ! { ! call = gen_rtx (CALL, VOIDmode, call_target, numargs); ! } ! else ! { ! if (GET_CODE (call_target) == MEM) ! { ! call_target = force_reg (Pmode, ! XEXP (call_target, 0)); ! } ! if (TARGET_SMALLCALL) ! { ! rtx tmp = gen_reg_rtx (SImode); ! rtx r1 = gen_rtx (REG, SImode, 1); ! emit_move_insn (tmp, gen_rtx (SYMBOL_REF, SImode, "__saveargs")); ! emit_move_insn (r1, call_target); ! emit_insn (gen_rtx (USE, VOIDmode, r1)); ! call_target = tmp; ! } ! ! call = gen_rtx (CALL, VOIDmode, gen_rtx (MEM, SImode, call_target), numargs); ! } ! if (isa_retval) { ! call = gen_rtx (SET, VOIDmode, ret, call); } ! ! emit_call_insn (gen_rtx (PARALLEL, VOIDmode, ! gen_rtvec (2, ! call, ! gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 17))))); ! } - - - /* Predicates used by the templates */ - /* Returns 1 if OP can be source of a simple move operation. Same as general_operand, but a LABEL_REF is valid, PRE_DEC is ! invalid as are subregs of system registers. */ int --- 1658,1684 ---- } ! /* Predicates used by the templates. */ ! /* Returns 1 if OP is MACL, MACH or PR. The input must be a REG rtx. ! Used only in general_movsrc_operand. */ ! int ! system_reg_operand (op, mode) ! rtx op; ! enum machine_mode mode; { ! switch (REGNO (op)) { ! case PR_REG: ! case MACL_REG: ! case MACH_REG: ! return 1; } ! return 0; } /* Returns 1 if OP can be source of a simple move operation. Same as general_operand, but a LABEL_REF is valid, PRE_DEC is ! invalid as are subregs of system registers. */ int *************** *** 2230,2238 **** enum machine_mode mode; { - /* Any MEM(label_ref) is ok, that's a pcrel load */ - if (GET_CODE (op) == MEM - && GET_CODE (XEXP (op, 0)) == LABEL_REF) - return 1; - if (GET_CODE (op) == MEM) { --- 1687,1690 ---- *************** *** 2245,2261 **** if (GET_CODE (inside) == PLUS ! && GET_CODE (XEXP (inside,0)) == LABEL_REF ! && GET_CODE (XEXP (inside,1)) == CONST_INT) return 1; - - /* No post inc allowed */ - if (GET_CODE (inside) == POST_DEC - || GET_CODE (inside) == PRE_INC - || GET_CODE (inside) == PRE_DEC) - return 0; ! /* Can't do that with large modes */ ! if (GET_CODE (inside) == POST_INC ! && GET_MODE_SIZE (mode) > 4) return 0; } --- 1697,1706 ---- if (GET_CODE (inside) == PLUS ! && GET_CODE (XEXP (inside, 0)) == LABEL_REF ! && GET_CODE (XEXP (inside, 1)) == CONST_INT) return 1; ! /* Only post inc allowed. */ ! if (GET_CODE (inside) == PRE_DEC) return 0; } *************** *** 2267,2279 **** return 0; - if (GET_CODE (op) == CONST_INT) - { - int i = INTVAL (op); - return CONST_OK_FOR_I (i); - } return general_operand (op, mode); } - /* Returns 1 if OP can be a destination of a move. Same as general_operand, but no preinc allowed. */ --- 1712,1718 ---- *************** *** 2284,2297 **** enum machine_mode mode; { ! /* No pre dec allowed */ ! if (GET_CODE (op) == MEM ! && (GET_CODE (XEXP (op, 0)) == PRE_INC ! || GET_CODE (XEXP (op, 0)) == POST_INC ! || GET_CODE (XEXP (op, 0)) == POST_DEC)) ! return 0; ! ! if (GET_CODE (op) == MEM ! && GET_CODE (XEXP (op, 0)) == PRE_DEC ! && GET_MODE_SIZE (mode) > 4) return 0; --- 1723,1728 ---- enum machine_mode mode; { ! /* Only pre dec allowed. */ ! if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == POST_INC) return 0; *************** *** 2299,2358 **** } - - - /* Returns 1 if OP is valid destination for a bsr. */ - - int - bsr_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (TARGET_BSR) - { - if (GET_CODE (op) == SYMBOL_REF) - { - if (!strcmp (XSTR (op, 0), - IDENTIFIER_POINTER (DECL_NAME (current_function_decl)))) - return 1; - return (seen_function (XSTR (op, 0))); - } - } - return 0; - } - - /* Returns 1 if OP is an immediate ok for a byte index. */ - - int - byte_index_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (GET_CODE (op) == CONST_INT - && INTVAL (op) >= 0 - && INTVAL (op) <= 15); - } - - /* Returns 1 if OP is a pop operand. */ - - int - pop_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (GET_CODE (op) != MEM) - return 0; - - if (GET_MODE (op) != mode) - return 0; - - op = XEXP (op, 0); - - if (GET_CODE (op) != POST_INC) - return 0; - - return XEXP (op, 0) == stack_pointer_rtx; - } - - /* Returns 1 if OP is a normal arithmetic register. */ --- 1730,1733 ---- *************** *** 2366,2370 **** if (GET_CODE (op) == REG) return (REGNO (op) != T_REG ! && REGNO (op) != PR_REG); return 1; } --- 1741,1747 ---- if (GET_CODE (op) == REG) return (REGNO (op) != T_REG ! && REGNO (op) != PR_REG ! && REGNO (op) != MACH_REG ! && REGNO (op) != MACL_REG); return 1; } *************** *** 2372,2396 **** } - /* Returns 1 if OP is MACL, MACH or PR. */ - - int - system_reg_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (GET_CODE (op) == REG) - { - switch (REGNO (op)) - { - case PR_REG: - case MACL_REG: - case MACH_REG: - return 1; - } - } - return 0; - } - - /* Returns 1 if OP is a valid source operand for an arithmetic insn. */ --- 1749,1752 ---- *************** *** 2403,2419 **** return 1; ! if (GET_CODE (op) == CONST_INT) ! { ! if (CONST_OK_FOR_I (INTVAL (op))) ! return 1; ! } return 0; } ! ! /* Returns 1 if OP is a valid source operand for a logical operation. */ int ! logical_operand (op, mode) rtx op; enum machine_mode mode; --- 1759,1772 ---- return 1; ! if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_I (INTVAL (op))) ! return 1; ! return 0; } ! /* Returns 1 if OP is a valid source operand for a compare insn. */ int ! arith_reg_or_0_operand (op, mode) rtx op; enum machine_mode mode; *************** *** 2422,2439 **** return 1; ! if (GET_CODE (op) == CONST_INT) ! { ! if (CONST_OK_FOR_L (INTVAL (op))) ! return 1; ! } return 0; } ! /* Returns 1 if OP is a valid operand for a MAC instruction, ! either a register or indirect memory. For now we don't ! try and recognise a mac insn */ int ! mac_operand (op, mode) rtx op; enum machine_mode mode; --- 1775,1788 ---- return 1; ! if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_N (INTVAL (op))) ! return 1; ! return 0; } ! /* Returns 1 if OP is a valid source operand for a logical operation. */ int ! logical_operand (op, mode) rtx op; enum machine_mode mode; *************** *** 2441,2452 **** if (arith_reg_operand (op, mode)) return 1; ! #if 0 ! Turned off till mac is understood ! if (GET_CODE (op) == MEM) return 1; ! #endif return 0; } ! /* Determine where to put an argument to a function. Value is zero to push the argument on the stack, --- 1790,1800 ---- if (arith_reg_operand (op, mode)) return 1; ! ! if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_L (INTVAL (op))) return 1; ! return 0; } ! /* Determine where to put an argument to a function. Value is zero to push the argument on the stack, *************** *** 2471,2486 **** if (named) { ! int rr = (ROUND_REG ((cum), (mode))); if (rr < NPARM_REGS) ! { ! return (((type) == 0 || !TREE_ADDRESSABLE ((tree) (type))) ! && ((type) == 0 || (mode) != BLKmode ! || (TYPE_ALIGN ((type)) % PARM_BOUNDARY == 0)) ! ? gen_rtx (REG, (mode), ! (FIRST_PARM_REG + rr)) ! : 0); ! ! } } return 0; --- 1819,1827 ---- if (named) { ! int rr = (ROUND_REG (cum, mode)); if (rr < NPARM_REGS) ! return ((type == 0 || ! TREE_ADDRESSABLE (type)) ! ? gen_rtx (REG, mode, FIRST_PARM_REG + rr) : 0); } return 0; *************** *** 2494,2525 **** int ! sh_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED) ! CUMULATIVE_ARGS CUM; ! enum machine_mode MODE; ! tree TYPE; ! int NAMED; ! { ! if ((CUM) < NPARM_REGS) ! { ! if (((TYPE) == 0 || !TREE_ADDRESSABLE ((tree) (TYPE))) ! && ((TYPE) == 0 || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0)) ! && ((CUM) + ((MODE) == BLKmode ! ? ROUND_ADVANCE (int_size_in_bytes (TYPE)) ! : ROUND_ADVANCE (GET_MODE_SIZE (MODE))) - NPARM_REGS > 0)) ! { ! return NPARM_REGS - CUM; ! } ! } ! return 0; ! } ! ! /* Turn this on to recognise shift insns which aren't supported in the ! hardware. This will allow the combiner to notice more patterns, ! but the down side is that the asm outputter will have to emit ! several instructions for each shift which isn't possible in the ! hardware, this makes scheduling perform badly .*/ ! ! int fake_shift() { return 0; } --- 1835,1852 ---- int ! sh_function_arg_partial_nregs (cum, mode, type, named) ! CUMULATIVE_ARGS cum; ! enum machine_mode mode; ! tree type; ! int named; { + if (cum < NPARM_REGS) + { + if ((type == 0 || ! TREE_ADDRESSABLE (type)) + && (cum + (mode == BLKmode + ? ROUND_ADVANCE (int_size_in_bytes (type)) + : ROUND_ADVANCE (GET_MODE_SIZE (mode))) - NPARM_REGS > 0)) + return NPARM_REGS - cum; + } return 0; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sh/sh.h gcc-2.7.0/config/sh/sh.h *** gcc-2.6.3/config/sh/sh.h Tue Sep 6 14:36:43 1994 --- gcc-2.7.0/config/sh/sh.h Thu Jun 15 16:31:06 1995 *************** *** 1,8 **** ! /* Definitions of target machine for GNU compiler, ! for Hitachi Super-H. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. - Contributed by Steve Chamberlain (sac@cygnus.com) - This file is part of GNU CC. --- 1,7 ---- ! /* Definitions of target machine for GNU compiler for Hitachi Super-H. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. ! Contributed by Steve Chamberlain (sac@cygnus.com). ! Improved by Jim Wilson (wilson@cygnus.com). This file is part of GNU CC. *************** *** 19,41 **** 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. */ - - /* Run-time Target Specification. */ - #define TARGET_SH ! #define TARGET_VERSION \ fputs (" (Hitachi SH)", stderr); /* Generate SDB debugging information. */ ! #define SDB_DEBUGGING_INFO 1 - /* CYGNUS LOCAL stabs-in-coff */ /* Output DBX (stabs) debugging information if doing -gstabs. */ #define DBX_DEBUGGING_INFO ! /* Generate SDB debugging information by default. */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG --- 18,37 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #define TARGET_VERSION \ fputs (" (Hitachi SH)", stderr); /* Generate SDB debugging information. */ ! #define SDB_DEBUGGING_INFO /* Output DBX (stabs) debugging information if doing -gstabs. */ #define DBX_DEBUGGING_INFO ! /* Generate SDB debugging information by default. */ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG *************** *** 43,77 **** #define SDB_DELIM ";" #define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)" /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP - #define CONDITIONAL_REGISTER_USAGE \ ! /* Experimental calling convention with fewer saved registers */ \ ! if (TARGET_NOSAVE) \ ! { \ ! call_used_regs[8] = 1; \ ! call_used_regs[9] = 1; \ ! call_used_regs[10] = 1; \ ! call_used_regs[11] = 1; \ ! } \ ! /* Hitachi saves and restores mac registers on call */ \ if (TARGET_HITACHI) \ { \ call_used_regs[MACH_REG] = 0; \ call_used_regs[MACL_REG] = 0; \ ! } ! ! /* Run-time compilation parameters selecting different hardware subsets. */ extern int target_flags; #define ISIZE_BIT (1<<1) - #define FAST_BIT (1<<2) - #define MAC_BIT (1<<3) - #define RTL_BIT (1<<4) - #define DT_BIT (1<<5) #define DALIGN_BIT (1<<6) #define SH0_BIT (1<<7) --- 39,68 ---- #define SDB_DELIM ";" + #define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__}" + #define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)" + #define ASM_SPEC "%{ml:-little}" + + #define LINK_SPEC "%{ml:-m shl}" + /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP #define CONDITIONAL_REGISTER_USAGE \ ! /* Hitachi saves and restores mac registers on call. */ \ if (TARGET_HITACHI) \ { \ call_used_regs[MACH_REG] = 0; \ call_used_regs[MACL_REG] = 0; \ ! } ! /* ??? Need to write documentation for all SH options and add it to the ! invoke.texi file. */ + /* Run-time compilation parameters selecting different hardware subsets. */ + extern int target_flags; #define ISIZE_BIT (1<<1) #define DALIGN_BIT (1<<6) #define SH0_BIT (1<<7) *************** *** 79,198 **** #define SH2_BIT (1<<9) #define SH3_BIT (1<<10) - #define C_BIT (1<<11) - #define R_BIT (1<<12) #define SPACE_BIT (1<<13) #define BIGTABLE_BIT (1<<14) - #define TRYR0_BIT (1<<15) - #define NOSAVE_BIT (1<<16) - #define SMALLCALL_BIT (1<<17) - #define CONSTLEN_2_BIT (1<<20) - #define CONSTLEN_3_BIT (1<<21) #define HITACHI_BIT (1<<22) ! #define PARANOID_BIT (1<<23) ! #define RETR2_BIT (1<<24) ! #define CONSTLEN_0_BIT (1<<25) ! #define BSR_BIT (1<<26) ! #define SHORTADDR_BIT (1<<27) ! #define PACKSTRUCT_BIT (1<<28) ! /* Nonzero if we should generate code using type 0 insns */ #define TARGET_SH0 (target_flags & SH0_BIT) ! /* Nonzero if we should generate code using type 1 insns */ #define TARGET_SH1 (target_flags & SH1_BIT) ! /* Nonzero if we should generate code using type 2 insns */ #define TARGET_SH2 (target_flags & SH2_BIT) ! /* Nonzero if we should generate code using type 3 insns */ #define TARGET_SH3 (target_flags & SH3_BIT) ! /* Nonzero if we should generate faster code rather than smaller code */ ! #define TARGET_FASTCODE (target_flags & FAST_BIT) ! ! /* Nonzero if we should generate faster code rather than smaller code */ #define TARGET_SMALLCODE (target_flags & SPACE_BIT) ! /* Nonzero if we should dump out instruction size info */ ! #define TARGET_DUMPISIZE (target_flags & ISIZE_BIT) ! ! /* Nonzero if we should try to generate mac instructions */ ! #define TARGET_MAC (target_flags & MAC_BIT) ! ! /* Nonzero if we should dump the rtl in the assembly file. */ ! #define TARGET_DUMP_RTL (target_flags & RTL_BIT) ! ! /* Nonzero if we should dump the rtl somewher else. */ ! #define TARGET_DUMP_R (target_flags & R_BIT) ! ! /* Nonzero to align doubles on 64 bit boundaries */ ! #define TARGET_ALIGN_DOUBLE (target_flags & DALIGN_BIT) ! ! /* Nonzero to use long jump tables */ #define TARGET_BIGTABLE (target_flags & BIGTABLE_BIT) ! /* Nonzero if combine dumping wanted */ ! #define TARGET_CDUMP (target_flags & C_BIT) ! ! /* Nonzero if trying to use reg+disp for QIs and HIs. This ! doesn't work yet.*/ ! #define TARGET_TRYR0 (target_flags & TRYR0_BIT) ! ! /* Nonzero if using no save calling convention */ ! #define TARGET_NOSAVE (target_flags & NOSAVE_BIT) ! ! /* Nonzero if using no save calling convention */ ! #define TARGET_SMALLCALL (target_flags & SMALLCALL_BIT) ! ! /* Select max size of computed constant code sequences to be 3 insns */ ! #define TARGET_CLEN3 (target_flags & CONSTLEN_3_BIT) ! ! /* Select max size of computed constant code sequences to be 0 insns - ie don't do it */ ! #define TARGET_CLEN0 (target_flags & CONSTLEN_0_BIT) ! ! /* Nonzero if using Hitachi's calling convention */ #define TARGET_HITACHI (target_flags & HITACHI_BIT) ! #define TARGET_PARANOID (target_flags & PARANOID_BIT) ! #define TARGET_RETR2 (target_flags & RETR2_BIT) ! #define TARGET_SHORTADDR (target_flags & SHORTADDR_BIT) ! #define TARGET_BSR (target_flags & BSR_BIT) ! ! /* Nonzero if packing structures as small as they'll go (incompatible with Hitachi's compiler) */ ! #define TARGET_PACKSTRUCT (target_flags & PACKSTRUCT_BIT) ! ! #define TARGET_SWITCHES \ ! { {"isize", ( ISIZE_BIT) }, \ ! {"space", ( SPACE_BIT) }, \ ! {"0", ( SH0_BIT) }, \ ! {"1", ( SH1_BIT) }, \ ! {"2", ( SH2_BIT) }, \ ! {"3", ( SH3_BIT) }, \ ! {"ac", ( MAC_BIT) }, \ ! {"dalign", ( DALIGN_BIT) }, \ ! {"c", ( C_BIT) }, \ ! {"r", ( RTL_BIT) }, \ ! {"bigtable", ( BIGTABLE_BIT)}, \ ! {"try-r0", ( TRYR0_BIT)}, \ ! {"R", ( R_BIT) }, \ ! {"nosave", ( NOSAVE_BIT) }, \ ! {"clen3", ( CONSTLEN_3_BIT) }, \ ! {"clen0", ( CONSTLEN_0_BIT) }, \ ! {"smallcall", ( SMALLCALL_BIT) }, \ ! {"hitachi", ( HITACHI_BIT) }, \ ! {"paranoid", ( PARANOID_BIT) }, \ ! {"r2", ( RETR2_BIT) }, \ ! {"shortaddr", ( SHORTADDR_BIT) }, \ ! {"bsr", ( BSR_BIT) }, \ ! {"packstruct",( PACKSTRUCT_BIT) }, \ ! {"", TARGET_DEFAULT} \ } ! #define TARGET_DEFAULT (FAST_BIT) ! ! /* Macro to define table for command options with values. */ ! #define TARGET_OPTIONS \ ! { { "maxsi-", &max_si}, \ ! { "maxhi-", &max_hi} } #define OVERRIDE_OPTIONS \ --- 70,136 ---- #define SH2_BIT (1<<9) #define SH3_BIT (1<<10) #define SPACE_BIT (1<<13) #define BIGTABLE_BIT (1<<14) #define HITACHI_BIT (1<<22) ! #define PADSTRUCT_BIT (1<<28) ! #define LITTLE_ENDIAN_BIT (1<<29) ! ! /* Nonzero if we should dump out instruction size info. */ ! #define TARGET_DUMPISIZE (target_flags & ISIZE_BIT) ! ! /* Nonzero to align doubles on 64 bit boundaries. */ ! #define TARGET_ALIGN_DOUBLE (target_flags & DALIGN_BIT) ! /* Nonzero if we should generate code using type 0 insns. */ ! /* ??? Is there such a thing as SH0? If not, we should delete all ! references to it. */ #define TARGET_SH0 (target_flags & SH0_BIT) ! /* Nonzero if we should generate code using type 1 insns. */ #define TARGET_SH1 (target_flags & SH1_BIT) ! /* Nonzero if we should generate code using type 2 insns. */ #define TARGET_SH2 (target_flags & SH2_BIT) ! /* Nonzero if we should generate code using type 3 insns. */ #define TARGET_SH3 (target_flags & SH3_BIT) ! /* Nonzero if we should generate smaller code rather than faster code. */ #define TARGET_SMALLCODE (target_flags & SPACE_BIT) ! /* Nonzero to use long jump tables. */ #define TARGET_BIGTABLE (target_flags & BIGTABLE_BIT) ! /* Nonzero if using Hitachi's calling convention. */ #define TARGET_HITACHI (target_flags & HITACHI_BIT) ! /* Nonzero if padding structures to a multiple of 4 bytes. This is ! incompatible with Hitachi's compiler, and gives unusual structure layouts ! which confuse programmers. ! ??? This option is not useful, but is retained in case there are people ! who are still relying on it. It may be deleted in the future. */ ! #define TARGET_PADSTRUCT (target_flags & PADSTRUCT_BIT) ! ! /* Nonzero if generating code for a little endian SH. */ ! #define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT) ! ! #define TARGET_SWITCHES \ ! { {"0", SH0_BIT}, \ ! {"1", SH1_BIT}, \ ! {"2", SH2_BIT}, \ ! {"3", SH3_BIT|SH2_BIT}, \ ! {"3l", SH3_BIT|SH2_BIT|LITTLE_ENDIAN_BIT}, \ ! {"b", -LITTLE_ENDIAN_BIT}, \ ! {"bigtable", BIGTABLE_BIT}, \ ! {"dalign", DALIGN_BIT}, \ ! {"hitachi", HITACHI_BIT}, \ ! {"isize", ISIZE_BIT}, \ ! {"l", LITTLE_ENDIAN_BIT}, \ ! {"padstruct", PADSTRUCT_BIT}, \ ! {"space", SPACE_BIT}, \ ! {"", TARGET_DEFAULT} \ } ! #define TARGET_DEFAULT (0) #define OVERRIDE_OPTIONS \ *************** *** 206,249 **** sh_cpu = CPU_SH3; \ \ ! /* We *MUST* always define optimize since we *HAVE* to run \ ! shorten branches to get correct code. */ \ ! \ ! optimize = 1; \ flag_delayed_branch = 1; \ ! /* But never run scheduling before reload, since than can \ ! break global alloc, and generates slower code anyway due \ ! to the pressure on R0. */ \ ! flag_schedule_insns = 0; \ ! if (max_si) \ ! max_count_si = atoi (max_si); \ ! else \ ! max_count_si = 1010; \ ! if (max_hi) \ ! max_count_hi = atoi (max_hi); \ ! else \ ! max_count_hi = 500; \ ! if (TARGET_BSR) \ ! flag_no_function_cse = 1; \ } while (0) - ! /* Target machine storage Layout. */ /* Define to use software floating point emulator for REAL_ARITHMETIC and ! decimal <-> binary conversion. */ #define REAL_ARITHMETIC /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ #define BITS_BIG_ENDIAN 0 /* Define this if most significant byte of a word is the lowest numbered. */ ! #define BYTES_BIG_ENDIAN 1 /* Define this if most significant word of a multiword number is the lowest numbered. */ ! #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 --- 144,189 ---- sh_cpu = CPU_SH3; \ \ ! /* We *MUST* always define optimize since we *HAVE* to run \ ! shorten branches to get correct code. */ \ ! /* ??? This is obsolete, since now shorten branches is no \ ! longer required by the SH, and is always run once even \ ! when not optimizing. Changing this now might be \ ! confusing though. */ \ ! optimize = 1; \ flag_delayed_branch = 1; \ ! \ ! /* But never run scheduling before reload, since that can \ ! break global alloc, and generates slower code anyway due \ ! to the pressure on R0. */ \ ! flag_schedule_insns = 0; \ } while (0) ! /* Target machine storage layout. */ /* Define to use software floating point emulator for REAL_ARITHMETIC and ! decimal <-> binary conversion. */ #define REAL_ARITHMETIC /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ + #define BITS_BIG_ENDIAN 0 /* Define this if most significant byte of a word is the lowest numbered. */ ! #define BYTES_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) /* Define this if most significant word of a multiword number is the lowest numbered. */ ! #define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) ! /* Define this to set the endianness to use in libgcc2.c, which can ! not depend on target_flags. */ ! #if defined(__LITTLE_ENDIAN__) ! #define LIBGCC2_WORDS_BIG_ENDIAN 0 ! #else ! #define LIBGCC2_WORDS_BIG_ENDIAN 1 ! #endif ! ! /* Number of bits in an addressable storage unit. */ #define BITS_PER_UNIT 8 *************** *** 268,273 **** #define STACK_BOUNDARY 32 ! /* Allocation boundary (in *bits*) for the code of a function. */ ! #define FUNCTION_BOUNDARY 16 /* Alignment of field after `int : 0' in a structure. */ --- 208,218 ---- #define STACK_BOUNDARY 32 ! /* Allocation boundary (in *bits*) for the code of a function. ! 32 bit alignment is faster, because instructions are always fetched as a ! pair from a longword boundary. */ ! /* ??? Perhaps also define ASM_OUTPUT_ALIGN_CODE and/or ASM_OUTPUT_LOOP_ALIGN ! so as to align jump targets and/or loops to 4 byte boundaries when not ! optimizing for space? */ ! #define FUNCTION_BOUNDARY (TARGET_SMALLCODE ? 16 : 32) /* Alignment of field after `int : 0' in a structure. */ *************** *** 281,285 **** /* Make strings word-aligned so strcpy from constants will be faster. */ ! #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ((TREE_CODE (EXP) == STRING_CST \ && (ALIGN) < FASTEST_ALIGNMENT) \ --- 226,230 ---- /* Make strings word-aligned so strcpy from constants will be faster. */ ! #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ((TREE_CODE (EXP) == STRING_CST \ && (ALIGN) < FASTEST_ALIGNMENT) \ *************** *** 294,304 **** /* Number of bits which any structure or union's size must be a multiple of. Each structure or union's size is rounded up to a ! multiple of this. */ ! #define STRUCTURE_SIZE_BOUNDARY (TARGET_PACKSTRUCT ? 8 : 32) /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 1 - /* Standard register usage. */ --- 239,248 ---- /* Number of bits which any structure or union's size must be a multiple of. Each structure or union's size is rounded up to a ! multiple of this. */ ! #define STRUCTURE_SIZE_BOUNDARY (TARGET_PADSTRUCT ? 32 : 8) /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 1 /* Standard register usage. */ *************** *** 308,312 **** r0 arg return r1..r3 scratch ! r4-r7 args in r8..r13 call saved r14 frame pointer/call saved --- 252,256 ---- r0 arg return r1..r3 scratch ! r4..r7 args in r8..r13 call saved r14 frame pointer/call saved *************** *** 315,321 **** pr subroutine return address t t bit ! mach multiply/accumulate result ! macl ! */ /* Number of actual hardware registers. --- 259,264 ---- pr subroutine return address t t bit ! mach multiply/accumulate result, high part ! macl multiply/accumulate result, low part. */ /* Number of actual hardware registers. *************** *** 323,329 **** 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 AP_REG 16 #define PR_REG 17 #define T_REG 18 --- 266,272 ---- 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 AP_REG 16 #define PR_REG 17 #define T_REG 18 *************** *** 331,349 **** #define MACH_REG 20 #define MACL_REG 21 #define FIRST_PSEUDO_REGISTER 22 /* 1 for registers that have pervasive standard uses ! and are not available for the register allocator. ! mach register is fixed 'cause it's only 10 bits wide */ - /* r0 r1 r2 r3 - r4 r5 r6 r7 - r8 r9 r10 r11 - r12 r13 r14 r15 - ap pr t gbr - mh ml */ - #define FIXED_REGISTERS \ { 0, 0, 0, 0, \ --- 274,287 ---- #define MACH_REG 20 #define MACL_REG 21 + #define SPECIAL_REG(REGNO) ((REGNO) >= 18 && (REGNO) <= 21) #define FIRST_PSEUDO_REGISTER 22 /* 1 for registers that have pervasive standard uses ! and are not available for the register allocator. ! Mach register is fixed 'cause it's only 10 bits wide for SH1. ! It is 32 bits wide for SH2. */ #define FIXED_REGISTERS \ { 0, 0, 0, 0, \ *************** *** 354,358 **** 1, 1} - /* 1 for registers not available across function calls. These must include the FIXED_REGISTERS and also any --- 292,295 ---- *************** *** 362,372 **** Aside from that, you can include as many other registers as you like. */ - /* r0 r1 r2 r3 - r4 r5 r6 r7 - r8 r9 r10 r11 - r12 r13 r14 r15 - ap pr t gbr - mh ml */ - #define CALL_USED_REGISTERS \ { 1, 1, 1, 1, \ --- 299,302 ---- *************** *** 375,379 **** 0, 0, 0, 1, \ 1, 0, 1, 1, \ ! 1, 1} /* Return number of consecutive hard regs needed starting at reg REGNO --- 305,309 ---- 0, 0, 0, 1, \ 1, 0, 1, 1, \ ! 1, 1} /* Return number of consecutive hard regs needed starting at reg REGNO *************** *** 382,396 **** but can be less for certain modes in special long registers. ! On the SH regs are UNITS_PER_WORD bits wide; */ ! #define HARD_REGNO_NREGS(REGNO, MODE) \ (((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. ! We may keep double values in even registers */ ! extern int hard_regno_mode_ok[]; ! #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ! (hard_regno_mode_ok[REGNO] & (1<<(int)MODE)) /* Value is 1 if it is a good idea to tie two pseudo registers --- 312,328 ---- but can be less for certain modes in special long registers. ! On the SH regs are UNITS_PER_WORD bits wide. */ ! #define HARD_REGNO_NREGS(REGNO, MODE) \ (((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. ! We can allow any mode in any general register. The special registers ! only allow SImode. Don't allow any mode in the PR. */ ! #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ! (SPECIAL_REG (REGNO) ? (MODE) == SImode \ ! : (REGNO) == PR_REG ? 0 \ ! : 1) /* Value is 1 if it is a good idea to tie two pseudo registers *************** *** 422,426 **** /* Definitions for register eliminations. ! We have two registers that can be eliminated on the m88k. First, the frame pointer register can often be eliminated in favor of the stack pointer register. Secondly, the argument pointer register can always be --- 354,358 ---- /* Definitions for register eliminations. ! We have two registers that can be eliminated on the SH. First, the frame pointer register can often be eliminated in favor of the stack pointer register. Secondly, the argument pointer register can always be *************** *** 432,440 **** in order of preference. */ - /* This is an array of structures. Each structure initializes one pair - of eliminable registers. The "from" register number is given first, - followed by "to". Eliminations of the same "from" register are listed - in order of preference. */ - #define ELIMINABLE_REGS \ {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ --- 364,367 ---- *************** *** 442,446 **** { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM},} - /* Given FROM and TO register numbers, say whether this elimination is allowed. */ --- 369,372 ---- *************** *** 460,464 **** #define STATIC_CHAIN_REGNUM 13 ! /* The register in which a struct value address is passed */ #define STRUCT_VALUE_REGNUM 2 --- 386,390 ---- #define STATIC_CHAIN_REGNUM 13 ! /* The register in which a struct value address is passed. */ #define STRUCT_VALUE_REGNUM 2 *************** *** 471,480 **** /*#define STRUCT_VALUE ((rtx)0)*/ - /* Don't default to pcc-struct-return, because we have already specified exactly how to return structures in the RETURN_IN_MEMORY macro. */ #define DEFAULT_PCC_STRUCT_RETURN 0 - /* Define the classes of registers for register constraints in the --- 397,404 ---- *************** *** 498,505 **** class that represents their union. */ ! /* The SH has two sorts of general registers, R0 and the rest. R0 can be used as the destination of some of the arithmetic ops. There are also some special purpose registers; the T bit register, the ! Procedure Return Register and the Multipy Accumulate Registers */ enum reg_class --- 422,429 ---- class that represents their union. */ ! /* The SH has two sorts of general registers, R0 and the rest. R0 can be used as the destination of some of the arithmetic ops. There are also some special purpose registers; the T bit register, the ! Procedure Return Register and the Multiply Accumulate Registers. */ enum reg_class *************** *** 517,522 **** #define N_REG_CLASSES (int) LIM_REG_CLASSES ! /* Give names of register classes as strings for dump file. */ ! #define REG_CLASS_NAMES \ { \ "NO_REGS", \ --- 441,446 ---- #define N_REG_CLASSES (int) LIM_REG_CLASSES ! /* Give names of register classes as strings for dump file. */ ! #define REG_CLASS_NAMES \ { \ "NO_REGS", \ *************** *** 533,537 **** of length N_REG_CLASSES. */ ! #define REG_CLASS_CONTENTS \ { \ 0x000000, /* NO_REGS */ \ --- 457,461 ---- of length N_REG_CLASSES. */ ! #define REG_CLASS_CONTENTS \ { \ 0x000000, /* NO_REGS */ \ *************** *** 554,563 **** /* When defined, the compiler allows registers explicitly used in the rtl to be used as spill registers but prevents the compiler from ! extending the lifetime of these registers. */ #define SMALL_REGISTER_CLASSES /* The order in which register should be allocated. */ ! #define REG_ALLOC_ORDER \ { 1,2,3,7,6,5,4,0,8,9,10,11,12,13,14,15,16,17,18,19,20,21 } --- 478,487 ---- /* When defined, the compiler allows registers explicitly used in the rtl to be used as spill registers but prevents the compiler from ! extending the lifetime of these registers. */ #define SMALL_REGISTER_CLASSES /* The order in which register should be allocated. */ ! #define REG_ALLOC_ORDER \ { 1,2,3,7,6,5,4,0,8,9,10,11,12,13,14,15,16,17,18,19,20,21 } *************** *** 566,577 **** #define BASE_REG_CLASS GENERAL_REGS ! /* Get reg_class from a letter such as appears in the machine ! description. */ extern enum reg_class reg_class_from_letter[]; #define REG_CLASS_FROM_LETTER(C) \ ( (C) >= 'a' && (C) <= 'z' ? reg_class_from_letter[(C)-'a'] : 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. --- 490,500 ---- #define BASE_REG_CLASS GENERAL_REGS ! /* Get reg_class from a letter such as appears in the machine ! description. */ extern enum reg_class reg_class_from_letter[]; #define REG_CLASS_FROM_LETTER(C) \ ( (C) >= 'a' && (C) <= 'z' ? reg_class_from_letter[(C)-'a'] : 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. *************** *** 580,600 **** Return 1 if VALUE is in the range specified by C. I: arithmetic operand -127..128, as used in add, sub, etc L: logical operand 0..255, as used in and, or, etc. - J: something ok as a move source - so it must be easy to make M: constant 1 ! N: constant 0 ! K: shift operand 1,2,8 or 16 */ - #define CONST_OK_FOR_I(VALUE) (((int)(VALUE))>= -128 && ((int)(VALUE)) <= 127) #define CONST_OK_FOR_L(VALUE) (((int)(VALUE))>= 0 && ((int)(VALUE)) <= 255) #define CONST_OK_FOR_M(VALUE) ((VALUE)==1) #define CONST_OK_FOR_N(VALUE) ((VALUE)==0) ! #define CONST_OK_FOR_K(VALUE) ((VALUE)==1||(VALUE)==2||(VALUE)==8||(VALUE)==16) ! #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'I' ? CONST_OK_FOR_I (VALUE) \ ! : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ ! : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ ! : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ : 0) --- 503,522 ---- Return 1 if VALUE is in the range specified by C. I: arithmetic operand -127..128, as used in add, sub, etc + K: shift operand 1,2,8 or 16 L: logical operand 0..255, as used in and, or, etc. M: constant 1 ! N: constant 0 */ #define CONST_OK_FOR_I(VALUE) (((int)(VALUE))>= -128 && ((int)(VALUE)) <= 127) + #define CONST_OK_FOR_K(VALUE) ((VALUE)==1||(VALUE)==2||(VALUE)==8||(VALUE)==16) #define CONST_OK_FOR_L(VALUE) (((int)(VALUE))>= 0 && ((int)(VALUE)) <= 255) #define CONST_OK_FOR_M(VALUE) ((VALUE)==1) #define CONST_OK_FOR_N(VALUE) ((VALUE)==0) ! #define CONST_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'I' ? CONST_OK_FOR_I (VALUE) \ ! : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ ! : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ ! : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ ! : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \ : 0) *************** *** 602,609 **** Here VALUE is the CONST_DOUBLE rtx itself. */ ! #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'G' ? CONST_OK_FOR_I (CONST_DOUBLE_HIGH (VALUE)) \ ! && CONST_OK_FOR_I (CONST_DOUBLE_LOW (VALUE)) \ ! : 0) /* Given an rtx X being reloaded into a reg required to be --- 524,528 ---- Here VALUE is the CONST_DOUBLE rtx itself. */ ! #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 /* Given an rtx X being reloaded into a reg required to be *************** *** 614,652 **** #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS - /* Return the register class of a scratch register needed to copy IN into - or out of a register in CLASS in MODE. If it can be done directly, - NO_REGS is returned. */ - - /* Return the maximum number of consecutive registers ! needed to represent mode MODE in a register of class CLASS. ! On SH this is the size of MODE in words */ ! #define CLASS_MAX_NREGS(CLASS, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - /* Stack layout; function entry, exit and calling. */ ! /* Define the number of register that can hold parameters. ! These two macros are used only in other macro definitions below. */ #define NPARM_REGS 4 #define FIRST_PARM_REG 4 ! #define FIRST_RET_REG (TARGET_RETR2 ? 2 : 0) /* Define this if pushing a word on the stack makes the stack pointer a smaller address. */ ! #define STACK_GROWS_DOWNWARD /* Define this macro if the addresses of local variable slots are at negative offsets from the frame pointer. ! The SH only has positive indexes, so grow the frame up ! */ /* #define FRAME_GROWS_DOWNWARD */ /* Offset from the frame pointer to the first local variable slot to ! be allocated. */ #define STARTING_FRAME_OFFSET 0 --- 533,563 ---- #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS /* Return the maximum number of consecutive registers ! needed to represent mode MODE in a register of class CLASS. ! On SH this is the size of MODE in words. */ ! #define CLASS_MAX_NREGS(CLASS, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) /* Stack layout; function entry, exit and calling. */ ! /* Define the number of registers that can hold parameters. ! These three macros are used only in other macro definitions below. */ #define NPARM_REGS 4 #define FIRST_PARM_REG 4 ! #define FIRST_RET_REG 0 /* Define this if pushing a word on the stack makes the stack pointer a smaller address. */ ! #define STACK_GROWS_DOWNWARD /* Define this macro if the addresses of local variable slots are at negative offsets from the frame pointer. ! The SH only has positive indexes, so grow the frame up. */ /* #define FRAME_GROWS_DOWNWARD */ /* Offset from the frame pointer to the first local variable slot to ! be allocated. */ #define STARTING_FRAME_OFFSET 0 *************** *** 660,663 **** --- 571,575 ---- /* Value is the number of byte of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 666,670 **** On the SH, the caller does not pop any of its arguments that were passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE, SIZE) 0 /* Define how to find the value returned by a function. --- 578,582 ---- On the SH, the caller does not pop any of its arguments that were passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. *************** *** 674,697 **** #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! gen_rtx (REG, \ ! TYPE_MODE (VALTYPE) == BLKmode ? SImode : TYPE_MODE (VALTYPE), \ ! FIRST_RET_REG) /* 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, FIRST_RET_REG) /* 1 if N is a possible register number for a function value. On the SH, only r0 can return results. */ ! #define FUNCTION_VALUE_REGNO_P(REGNO) \ ! ((REGNO) == FIRST_RET_REG) ! /* 1 if N is a possible register number for function argument passing.*/ ! #define FUNCTION_ARG_REGNO_P(REGNO) \ ((REGNO) >= FIRST_PARM_REG && (REGNO) < (NPARM_REGS + FIRST_PARM_REG)) - - /* Define a data type for recording info about an argument list --- 586,603 ---- #define FUNCTION_VALUE(VALTYPE, FUNC) \ ! gen_rtx (REG, TYPE_MODE (VALTYPE), FIRST_RET_REG) /* 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, FIRST_RET_REG) /* 1 if N is a possible register number for a function value. On the SH, only r0 can return results. */ ! #define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RET_REG) ! /* 1 if N is a possible register number for function argument passing. */ ! #define FUNCTION_ARG_REGNO_P(REGNO) \ ((REGNO) >= FIRST_PARM_REG && (REGNO) < (NPARM_REGS + FIRST_PARM_REG)) /* Define a data type for recording info about an argument list *************** *** 708,719 **** #define CUMULATIVE_ARGS int ! #define ROUND_ADVANCE(SIZE) \ ((SIZE + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* Round a register number up to a proper boundary for an arg of mode ! MODE. ! The SH doesn't care about double alignment, so we only ! round doubles to even regs when asked to explicitly. */ #define ROUND_REG(X, MODE) \ --- 614,625 ---- #define CUMULATIVE_ARGS int ! #define ROUND_ADVANCE(SIZE) \ ((SIZE + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! /* Round a register number up to a proper boundary for an arg of mode ! MODE. ! The SH doesn't care about double alignment, so we only ! round doubles to even regs when asked to explicitly. */ #define ROUND_REG(X, MODE) \ *************** *** 722,726 **** ? ((X) + ((X) & 1)) : (X)) - /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. --- 628,631 ---- *************** *** 730,734 **** the same reg. */ ! #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME) \ ((CUM) = 0) --- 635,639 ---- the same reg. */ ! #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME) \ ((CUM) = 0) *************** *** 762,768 **** its data type forbids. */ - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! sh_function_arg (CUM, MODE, TYPE, NAMED) extern struct rtx_def *sh_function_arg(); --- 667,672 ---- its data type forbids. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! sh_function_arg (CUM, MODE, TYPE, NAMED) extern struct rtx_def *sh_function_arg(); *************** *** 771,777 **** this is the number of registers used. For args passed entirely in registers or entirely in memory, zero. - - We sometimes split args */ #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ sh_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED) --- 675,681 ---- this is the number of registers used. For args passed entirely in registers or entirely in memory, zero. + We sometimes split args. */ + #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ sh_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED) *************** *** 780,790 **** /* Perform any needed actions needed for a function that is receiving a ! variable number of arguments. */ #define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) \ current_function_anonymous_args = 1; ! ! /* Call the function profiler with a given profile label. */ #define FUNCTION_PROFILER(STREAM,LABELNO) \ --- 684,693 ---- /* Perform any needed actions needed for a function that is receiving a ! variable number of arguments. */ #define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) \ current_function_anonymous_args = 1; ! /* Call the function profiler with a given profile label. */ #define FUNCTION_PROFILER(STREAM,LABELNO) \ *************** *** 795,799 **** } - /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in --- 698,701 ---- *************** *** 803,816 **** #define EXIT_IGNORE_STACK 1 ! /* Generate the assembly code for function exit ! Just dump out any accumulated constant table.*/ #define FUNCTION_EPILOGUE(STREAM, SIZE) function_epilogue (STREAM, SIZE) - /* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. ! On the SH, the trapoline looks like 1 0000 D301 mov.l l1,r3 2 0002 DD02 mov.l l2,r13 --- 705,717 ---- #define EXIT_IGNORE_STACK 1 ! /* Generate the assembly code for function exit ! Just dump out any accumulated constant table. */ #define FUNCTION_EPILOGUE(STREAM, SIZE) function_epilogue (STREAM, SIZE) /* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. ! On the SH, the trampoline looks like 1 0000 D301 mov.l l1,r3 2 0002 DD02 mov.l l2,r13 *************** *** 818,828 **** 4 0006 200B or r0,r0 5 0008 00000000 l1: .long function ! 6 000c 00000000 l2: .long area ! */ #define TRAMPOLINE_TEMPLATE(FILE) \ { \ fprintf ((FILE), " .word 0xd301\n"); \ fprintf ((FILE), " .word 0xdd02\n"); \ ! fprintf ((FILE), " .word 0x4d2b\n"); \ fprintf ((FILE), " .word 0x200b\n"); \ fprintf ((FILE), " .long 0\n"); \ --- 719,728 ---- 4 0006 200B or r0,r0 5 0008 00000000 l1: .long function ! 6 000c 00000000 l2: .long area */ #define TRAMPOLINE_TEMPLATE(FILE) \ { \ fprintf ((FILE), " .word 0xd301\n"); \ fprintf ((FILE), " .word 0xdd02\n"); \ ! fprintf ((FILE), " .word 0x4d2b\n"); \ fprintf ((FILE), " .word 0x200b\n"); \ fprintf ((FILE), " .long 0\n"); \ *************** *** 840,844 **** CXT is an RTX for the static chain value for the function. */ ! #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \ --- 740,744 ---- CXT is an RTX for the static chain value for the function. */ ! #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \ *************** *** 847,851 **** (FNADDR)); \ } - /* Addressing modes, and classification of registers for them. */ --- 747,750 ---- *************** *** 861,875 **** or a pseudo reg currently allocated to a suitable hard reg. Since they use reg_renumber, they are safe only once reg_renumber ! has been allocated, which happens in local-alloc.c. ! ! */ ! #define REGNO_OK_FOR_BASE_P(REGNO) \ ((REGNO) < PR_REG || (unsigned) reg_renumber[(REGNO)] < PR_REG) ! #define REGNO_OK_FOR_INDEX_P(REGNO) \ ((REGNO) == 0 || (unsigned) reg_renumber[(REGNO)] == 0) ! /* Maximum number of registers that can appear in a valid memory ! address. */ #define MAX_REGS_PER_ADDRESS 2 --- 760,772 ---- or a pseudo reg currently allocated to a suitable hard reg. Since they use reg_renumber, they are safe only once reg_renumber ! has been allocated, which happens in local-alloc.c. */ ! #define REGNO_OK_FOR_BASE_P(REGNO) \ ((REGNO) < PR_REG || (unsigned) reg_renumber[(REGNO)] < PR_REG) ! #define REGNO_OK_FOR_INDEX_P(REGNO) \ ((REGNO) == 0 || (unsigned) reg_renumber[(REGNO)] == 0) ! /* Maximum number of registers that can appear in a valid memory ! address. */ #define MAX_REGS_PER_ADDRESS 2 *************** *** 877,889 **** /* Recognize any constant value that is a valid address. */ ! #define CONSTANT_ADDRESS_P(X) \ ! (GET_CODE (X) == LABEL_REF) ! /* Nonzero if the constant value X is a legitimate general operand. */ ! #define LEGITIMATE_CONSTANT_P(X) \ ! (GET_CODE(X) != CONST_DOUBLE /*&& GET_CODE(X) != LABEL_REF*/) - /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. --- 774,787 ---- /* Recognize any constant value that is a valid address. */ ! #define CONSTANT_ADDRESS_P(X) (GET_CODE (X) == LABEL_REF) ! /* Nonzero if the constant value X is a legitimate general operand. */ ! /* ??? Should modify this to accept CONST_DOUBLE, and then modify the ! constant pool table code to fix loads of CONST_DOUBLEs. If that doesn't ! work well, then we can at least handle simple CONST_DOUBLEs here ! such as 0.0. */ ! #define LEGITIMATE_CONSTANT_P(X) (GET_CODE(X) != CONST_DOUBLE) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. *************** *** 895,931 **** #define MODE_DISP_OK_4(X,MODE) ((GET_MODE_SIZE(MODE)==4) && ((unsigned)INTVAL(X)<64) && (!(INTVAL(X) &3))) #define MODE_DISP_OK_8(X,MODE) ((GET_MODE_SIZE(MODE)==8) && ((unsigned)INTVAL(X)<60) && (!(INTVAL(X) &3))) - #define MODE_DISP_OK_2(X,MODE) ((GET_MODE_SIZE(MODE)==2) && ((unsigned)INTVAL(X)<32) && TARGET_TRYR0 && (!INTVAL(X) &1)) - #define MODE_DISP_OK_1(X,MODE) ((GET_MODE_SIZE(MODE)==1) && ((unsigned)INTVAL(X)<16) && TARGET_TRYR0) #ifndef REG_OK_STRICT - /* 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) <= 16 || REGNO(X) >= FIRST_PSEUDO_REGISTER) /* 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) == 0 || REGNO(X) >= FIRST_PSEUDO_REGISTER) - #define REG_OK_FOR_PRE_POST_P(X) \ - (REG_OK_FOR_BASE_P (X)) - #else /* 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)) /* 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)) - #define REG_OK_FOR_PRE_POST_P(X) \ - (REGNO_OK_FOR_BASE_P (REGNO (X))) #endif ! /* The Q is a pc relative load operand */ #define EXTRA_CONSTRAINT_Q(OP) \ (GET_CODE (OP) == MEM && \ --- 793,822 ---- #define MODE_DISP_OK_4(X,MODE) ((GET_MODE_SIZE(MODE)==4) && ((unsigned)INTVAL(X)<64) && (!(INTVAL(X) &3))) #define MODE_DISP_OK_8(X,MODE) ((GET_MODE_SIZE(MODE)==8) && ((unsigned)INTVAL(X)<60) && (!(INTVAL(X) &3))) #ifndef REG_OK_STRICT /* 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) <= 16 || REGNO(X) >= FIRST_PSEUDO_REGISTER) + /* 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) == 0 || REGNO(X) >= FIRST_PSEUDO_REGISTER) #else + /* 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)) /* 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)) #endif ! /* The 'Q' constraint is a pc relative load operand. */ #define EXTRA_CONSTRAINT_Q(OP) \ (GET_CODE (OP) == MEM && \ *************** *** 936,955 **** && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT))) ! /* The U is a label ref */ ! #define EXTRA_CONSTRAINT_U(OP) \ ! (GET_CODE (OP) == LABEL_REF) ! ! #define IS_INDEX(OP) \ ! ((GET_CODE (OP) == PLUS && \ ! (INDEX_REGISTER_RTX_P (XEXP (OP, 0)) && BASE_REGISTER_RTX_P (XEXP (OP, 1))) || \ ! (INDEX_REGISTER_RTX_P (XEXP (OP, 1)) && BASE_REGISTER_RTX_P (XEXP (OP, 0))))) ! ! ! ! #define EXTRA_CONSTRAINT(OP, C) \ ! ((C) == 'Q' ? EXTRA_CONSTRAINT_Q (OP) \ ! : (C) == 'U' ? EXTRA_CONSTRAINT_U (OP) \ ! : 0) ! /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression --- 827,833 ---- && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT))) ! #define EXTRA_CONSTRAINT(OP, C) \ ! ((C) == 'Q' ? EXTRA_CONSTRAINT_Q (OP) \ ! : 0) /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression *************** *** 960,989 **** The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS. */ ! #define BASE_REGISTER_RTX_P(X) \ ! (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) - #define INDEX_REGISTER_RTX_P(X) \ - (GET_CODE (X) == REG && REG_OK_FOR_INDEX_P (X)) - - /* Jump to LABEL if X is a valid address RTX. This must also take REG_OK_STRICT into account when deciding about valid registers, but it uses ! the above macros so we are in luck. ! Allow REG REG+disp REG+r0 REG++ ! --REG ! */ ! /* The SH allows a displacement in a QI or HI amode, but only when the other operand is R0. GCC doesn't handle this very well, so we forgo all of that. ! A legitimate index for a QI or HI is 0, SI and above can be any ! number 0..63 */ ! #define GO_IF_LEGITIMATE_INDEX(MODE, REGNO, OP, LABEL) \ do { \ if (GET_CODE (OP) == CONST_INT) \ --- 838,871 ---- The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS. */ ! #define BASE_REGISTER_RTX_P(X) \ ! ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ ! || (GET_CODE (X) == SUBREG \ ! && GET_CODE (SUBREG_REG (X)) == REG \ ! && REG_OK_FOR_BASE_P (SUBREG_REG (X)))) ! ! #define INDEX_REGISTER_RTX_P(X) \ ! ((GET_CODE (X) == REG && REG_OK_FOR_INDEX_P (X)) \ ! || (GET_CODE (X) == SUBREG \ ! && GET_CODE (SUBREG_REG (X)) == REG \ ! && REG_OK_FOR_INDEX_P (SUBREG_REG (X)))) /* Jump to LABEL if X is a valid address RTX. This must also take REG_OK_STRICT into account when deciding about valid registers, but it uses ! the above macros so we are in luck. ! Allow REG REG+disp REG+r0 REG++ ! --REG */ ! /* The SH allows a displacement in a QI or HI amode, but only when the other operand is R0. GCC doesn't handle this very well, so we forgo all of that. ! A legitimate index for a QI or HI is 0, SI can be any number 0..63, ! DI can be any number 0..60. */ ! #define GO_IF_LEGITIMATE_INDEX(MODE, OP, LABEL) \ do { \ if (GET_CODE (OP) == CONST_INT) \ *************** *** 991,1031 **** if (MODE_DISP_OK_4 (OP, MODE)) goto LABEL; \ if (MODE_DISP_OK_8 (OP, MODE)) goto LABEL; \ - if (MODE_DISP_OK_2 (OP, MODE)) goto LABEL; \ - if (MODE_DISP_OK_1 (OP, MODE)) goto LABEL; \ } \ } while(0) ! ! #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ ! { \ ! if (BASE_REGISTER_RTX_P (X)) \ ! goto LABEL; \ ! else if ((GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC) \ ! && GET_CODE (XEXP (X, 0)) == REG \ ! && REG_OK_FOR_PRE_POST_P (XEXP (X, 0))) \ ! goto LABEL; \ ! else if (GET_CODE (X) == PLUS) \ ! { \ ! rtx xop0 = XEXP(X,0); \ ! rtx xop1 = XEXP(X,1); \ ! if (GET_MODE_SIZE(MODE) <= 8 && BASE_REGISTER_RTX_P (xop0)) \ ! GO_IF_LEGITIMATE_INDEX (MODE, REGNO (xop0), xop1, LABEL); \ ! if (GET_MODE_SIZE(MODE) <= 8 && BASE_REGISTER_RTX_P (xop1)) \ ! GO_IF_LEGITIMATE_INDEX (MODE, REGNO (xop1), xop0, LABEL); \ ! if (GET_MODE_SIZE(MODE)<= 4) { \ ! if(BASE_REGISTER_RTX_P(xop1) && \ ! INDEX_REGISTER_RTX_P(xop0)) goto LABEL; \ ! if(INDEX_REGISTER_RTX_P(xop1) && \ ! BASE_REGISTER_RTX_P(xop0)) goto LABEL; \ ! } \ ! } \ ! else if ((GET_CODE (X) == PRE_INC || GET_CODE (X) == POST_DEC) \ ! && GET_CODE (XEXP (X, 0)) == REG \ ! && REG_OK_FOR_PRE_POST_P (XEXP (X, 0))) \ ! goto LABEL; \ ! } ! ! ! /* 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. --- 873,903 ---- if (MODE_DISP_OK_4 (OP, MODE)) goto LABEL; \ if (MODE_DISP_OK_8 (OP, MODE)) goto LABEL; \ } \ } while(0) ! #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ ! { \ ! if (BASE_REGISTER_RTX_P (X)) \ ! goto LABEL; \ ! else if ((GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC) \ ! && BASE_REGISTER_RTX_P (XEXP (X, 0))) \ ! goto LABEL; \ ! else if (GET_CODE (X) == PLUS) \ ! { \ ! rtx xop0 = XEXP (X, 0); \ ! rtx xop1 = XEXP (X, 1); \ ! if (GET_MODE_SIZE (MODE) <= 8 && BASE_REGISTER_RTX_P (xop0)) \ ! GO_IF_LEGITIMATE_INDEX (MODE, xop1, LABEL); \ ! if (GET_MODE_SIZE (MODE) <= 4) \ ! { \ ! if (BASE_REGISTER_RTX_P (xop1) && INDEX_REGISTER_RTX_P (xop0))\ ! goto LABEL; \ ! if (INDEX_REGISTER_RTX_P (xop1) && BASE_REGISTER_RTX_P (xop0))\ ! goto LABEL; \ ! } \ ! } \ ! } ! ! /* 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. *************** *** 1038,1044 **** It is always safe for this macro to do nothing. It exists to recognize ! opportunities to optimize the output. ! ! */ #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) ; --- 910,914 ---- It is always safe for this macro to do nothing. It exists to recognize ! opportunities to optimize the output. */ #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) ; *************** *** 1046,1053 **** /* Go to LABEL if ADDR (a legitimate address expression) has an effect that depends on the machine mode it is used for. */ ! #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ { \ ! if (GET_CODE(ADDR) == PRE_DEC || GET_CODE(ADDR) == POST_DEC \ ! || GET_CODE(ADDR) == PRE_INC || GET_CODE(ADDR) == POST_INC) \ goto LABEL; \ } --- 916,922 ---- /* Go to LABEL if ADDR (a legitimate address expression) has an effect that depends on the machine mode it is used for. */ ! #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ { \ ! if (GET_CODE(ADDR) == PRE_DEC || GET_CODE(ADDR) == POST_INC) \ goto LABEL; \ } *************** *** 1060,1064 **** 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. */ --- 929,933 ---- 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. */ *************** *** 1068,1072 **** #define EASY_DIV_EXPR TRUNC_DIV_EXPR ! /* 'char' is signed by default */ #define DEFAULT_SIGNED_CHAR 1 --- 937,941 ---- #define EASY_DIV_EXPR TRUNC_DIV_EXPR ! /* 'char' is signed by default. */ #define DEFAULT_SIGNED_CHAR 1 *************** *** 1095,1099 **** /* Define this if zero-extension is slow (more than one real instruction). ! On the SH, it's only one instruction */ /* #define SLOW_ZERO_EXTEND */ --- 964,968 ---- /* Define this if zero-extension is slow (more than one real instruction). ! On the SH, it's only one instruction. */ /* #define SLOW_ZERO_EXTEND */ *************** *** 1107,1114 **** /* Immediate shift counts are truncated by the output routines (or was it ! the assembler?). Shift counts in a register are truncated by ARM. Note that the native compiler puts too large (> 32) immediate shift counts ! into a register and shifts by the register, letting the ARM decide what to do instead of doing that itself. */ #define SHIFT_COUNT_TRUNCATED 1 --- 976,990 ---- /* Immediate shift counts are truncated by the output routines (or was it ! the assembler?). Shift counts in a register are truncated by SH. Note that the native compiler puts too large (> 32) immediate shift counts ! into a register and shifts by the register, letting the SH decide what to do instead of doing that itself. */ + /* ??? This is defined, but the library routines in lib1funcs.asm do not + truncate the shift count. This may result in incorrect results for + unusual cases. Truncating the shift counts in the library routines would + make them faster. However, the SH3 has hardware shifts that do not + truncate, so it appears that we need to leave this undefined for correct + SH3 code. We can still using truncation in the library routines though to + make them faster. */ #define SHIFT_COUNT_TRUNCATED 1 *************** *** 1125,1129 **** #define PROMOTE_PROTOTYPES 1 ! /* The machine modes of pointers and functions */ #define Pmode SImode #define FUNCTION_MODE Pmode --- 1001,1005 ---- #define PROMOTE_PROTOTYPES 1 ! /* The machine modes of pointers and functions. */ #define Pmode SImode #define FUNCTION_MODE Pmode *************** *** 1132,1139 **** REG = 1, SUBREG = 2, any node = (2 + sum of subnodes). */ ! #define CONST_COSTS(RTX, CODE, OUTER_CODE) \ case CONST_INT: \ ! if (INTVAL(RTX)==0) return 0; \ ! if (CONST_OK_FOR_I (INTVAL(RTX))) \ return 1; \ else \ --- 1008,1019 ---- REG = 1, SUBREG = 2, any node = (2 + sum of subnodes). */ ! #define CONST_COSTS(RTX, CODE, OUTER_CODE) \ case CONST_INT: \ ! if (INTVAL (RTX) == 0) \ ! return 0; \ ! else if (CONST_OK_FOR_I (INTVAL (RTX))) \ ! return 1; \ ! else if ((OUTER_CODE == AND || OUTER_CODE == IOR || OUTER_CODE == XOR) \ ! && CONST_OK_FOR_L (INTVAL (RTX))) \ return 1; \ else \ *************** *** 1148,1156 **** #define RTX_COSTS(X, CODE, OUTER_CODE) \ case AND: \ ! return COSTS_N_INSNS (andcosts (X)); \ case MULT: \ return COSTS_N_INSNS (multcosts (X)); \ case ASHIFT: \ case ASHIFTRT: \ return COSTS_N_INSNS (shiftcosts (X)) ; \ case DIV: \ --- 1028,1037 ---- #define RTX_COSTS(X, CODE, OUTER_CODE) \ case AND: \ ! return COSTS_N_INSNS (andcosts (X)); \ case MULT: \ return COSTS_N_INSNS (multcosts (X)); \ case ASHIFT: \ case ASHIFTRT: \ + case LSHIFTRT: \ return COSTS_N_INSNS (shiftcosts (X)) ; \ case DIV: \ *************** *** 1158,1172 **** case MOD: \ case UMOD: \ ! return COSTS_N_INSNS (100); \ case FLOAT: \ case FIX: \ return 100; ! /* The multiply and divide insns on the SH are actually function calls ! with some special constraints on arguments and register usage. ! ! These macros tell reorg that the references to arguments and ! register clobbers for insns of type sfunc do not appear to happen until after the millicode call. This allows reorg to put insns which set the argument registers into the delay slot of the millicode --- 1039,1053 ---- case MOD: \ case UMOD: \ ! return COSTS_N_INSNS (20); \ case FLOAT: \ case FIX: \ return 100; + /* The multiply insn on the SH1 and the divide insns on the SH1 and SH2 + are actually function calls with some special constraints on arguments + and register usage. ! These macros tell reorg that the references to arguments and ! register clobbers for insns of type sfunc do not appear to happen until after the millicode call. This allows reorg to put insns which set the argument registers into the delay slot of the millicode *************** *** 1189,1214 **** && GET_CODE (PATTERN (X)) != USE \ && GET_CODE (PATTERN (X)) != CLOBBER \ ! && get_attr_type (X) == TYPE_SFUNC)) /* Compute extra cost of moving data between one register class ! and another. On the SH it is hard to move into the T reg, but simple to load ! from it. ! */ ! #define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \ (((DSTCLASS == T_REGS) || (DSTCLASS == PR_REG)) ? 10 : 1) - - /* Assembler output control */ - - /* The text to go at the start of the assembler file */ - #define ASM_FILE_START(STREAM) \ - output_file_start (STREAM, f_options, sizeof f_options / sizeof f_options[0], \ - W_options, sizeof W_options / sizeof W_options[0]); ! #define ASM_FILE_END(STREAM) #define ASM_APP_ON "" --- 1070,1097 ---- && GET_CODE (PATTERN (X)) != USE \ && GET_CODE (PATTERN (X)) != CLOBBER \ ! && get_attr_type (X) == TYPE_SFUNC)) /* Compute extra cost of moving data between one register class ! and another. On the SH it is hard to move into the T reg, but simple to load ! from it. */ ! #define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \ (((DSTCLASS == T_REGS) || (DSTCLASS == PR_REG)) ? 10 : 1) + /* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option? This + would be so that people would slow memory systems could generate + different code that does fewer memory accesses. */ + + /* Assembler output control. */ ! /* The text to go at the start of the assembler file. */ ! #define ASM_FILE_START(STREAM) \ ! output_file_start (STREAM, f_options, \ ! sizeof f_options / sizeof f_options[0], \ ! W_options, sizeof W_options / sizeof W_options[0]); + #define ASM_FILE_END(STREAM) #define ASM_APP_ON "" *************** *** 1217,1221 **** #define IDENT_ASM_OP "\t.ident\n" ! /* How to change between sections. */ #define TEXT_SECTION_ASM_OP "\t.text" --- 1100,1104 ---- #define IDENT_ASM_OP "\t.ident\n" ! /* How to change between sections. */ #define TEXT_SECTION_ASM_OP "\t.text" *************** *** 1225,1261 **** #define INIT_SECTION_ASM_OP "\t.section\t.init\n" #define EXTRA_SECTIONS in_ctors, in_dtors ! #define EXTRA_SECTION_FUNCTIONS \ ! void \ ! ctors_section() \ ! { \ ! if (in_section != in_ctors) \ ! { \ ! fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ ! in_section = in_ctors; \ ! } \ ! } \ ! void \ ! dtors_section() \ ! { \ ! if (in_section != in_dtors) \ ! { \ ! fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ ! in_section = in_dtors; \ ! } \ ! } ! /* Assemble generic sections. ! This is currently only used to support section attributes. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, NAME) \ do { fprintf (FILE, ".section\t%s\n", NAME); } while (0) ! #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { ctors_section(); fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0) ! #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ do { dtors_section(); fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0) ! #undef DO_GLOBAL_CTORS_BODY #define DO_GLOBAL_CTORS_BODY \ --- 1108,1146 ---- #define INIT_SECTION_ASM_OP "\t.section\t.init\n" #define EXTRA_SECTIONS in_ctors, in_dtors ! #define EXTRA_SECTION_FUNCTIONS \ ! void \ ! ctors_section() \ ! { \ ! if (in_section != in_ctors) \ ! { \ ! fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ ! in_section = in_ctors; \ ! } \ ! } \ ! void \ ! dtors_section() \ ! { \ ! if (in_section != in_dtors) \ ! { \ ! fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ ! in_section = in_dtors; \ ! } \ ! } ! /* A C statement to output something to the assembler file to switch to section ! NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or ! NULL_TREE. Some target formats do not support arbitrary sections. Do not ! define this macro in such cases. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ do { fprintf (FILE, ".section\t%s\n", NAME); } while (0) ! #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { ctors_section(); fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0) ! #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ do { dtors_section(); fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0) ! #undef DO_GLOBAL_CTORS_BODY #define DO_GLOBAL_CTORS_BODY \ *************** *** 1265,1276 **** extern pfunc __ctors_end[]; \ pfunc *p; \ ! for (p = __ctors; p < __ctors_end; p++) \ { \ ! (*p)(); \ } \ ! } ! #undef DO_GLOBAL_DTORS_BODY ! #define DO_GLOBAL_DTORS_BODY \ { \ typedef (*pfunc)(); \ --- 1150,1161 ---- extern pfunc __ctors_end[]; \ pfunc *p; \ ! for (p = __ctors_end; p > __ctors; ) \ { \ ! (*--p)(); \ } \ ! } ! #undef DO_GLOBAL_DTORS_BODY ! #define DO_GLOBAL_DTORS_BODY \ { \ typedef (*pfunc)(); \ *************** *** 1282,1287 **** (*p)(); \ } \ ! } ! #define ASM_OUTPUT_REG_PUSH(file, v) \ --- 1167,1171 ---- (*p)(); \ } \ ! } #define ASM_OUTPUT_REG_PUSH(file, v) \ *************** *** 1291,1295 **** fprintf (file, "\tmov.l @r15+,r%s\n", v); - /* The assembler's names for the registers. RFP need not always be used as the Real framepointer; it can also be used as a normal general register. --- 1175,1178 ---- *************** *** 1303,1314 **** } ! /* DBX register number for a given compiler register number */ #define DBX_REGISTER_NUMBER(REGNO) (REGNO) /* Output a label definition. */ ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) - /* This is how to output an assembler line that says to advance the location counter --- 1186,1196 ---- } ! /* DBX register number for a given compiler register number. */ #define DBX_REGISTER_NUMBER(REGNO) (REGNO) /* Output a label definition. */ ! #define ASM_OUTPUT_LABEL(FILE,NAME) \ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) /* This is how to output an assembler line that says to advance the location counter *************** *** 1324,1342 **** /* Output a globalising directive for a label. */ ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! (fprintf (STREAM, "\t.global\t"), \ ! assemble_name (STREAM, NAME), \ ! fputc ('\n',STREAM)) \ /* Output a reference to a label. */ ! #define ASM_OUTPUT_LABELREF(STREAM,NAME) \ fprintf (STREAM, "_%s", NAME) /* Make an internal label into a string. */ ! #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ sprintf (STRING, "*%s%d", PREFIX, NUM) /* Output an internal label definition. */ ! #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, "%s%d:\n", PREFIX, NUM) --- 1206,1224 ---- /* Output a globalising directive for a label. */ ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! (fprintf (STREAM, "\t.global\t"), \ ! assemble_name (STREAM, NAME), \ ! fputc ('\n',STREAM)) /* Output a reference to a label. */ ! #define ASM_OUTPUT_LABELREF(STREAM,NAME) \ fprintf (STREAM, "_%s", NAME) /* Make an internal label into a string. */ ! #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ sprintf (STRING, "*%s%d", PREFIX, NUM) /* Output an internal label definition. */ ! #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, "%s%d:\n", PREFIX, NUM) *************** *** 1344,1376 **** /* Construct a private name. */ ! #define ASM_FORMAT_PRIVATE_NAME(OUTVAR,NAME,NUMBER) \ ! ((OUTVAR) = (char *) alloca (strlen (NAME) + 10), \ sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER))) ! /* Jump tables must be 32 bit aligned, no matter the size of the element */ #define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \ ! fprintf (STREAM, "\t.align 2\n%s%d:\n", PREFIX, NUM); ! /* Output a relative address table. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,VALUE,REL) \ if (TARGET_BIGTABLE) \ ! fprintf (STREAM, "\t.long L%d-L%d\n", VALUE,REL); \ else \ ! fprintf (STREAM, "\t.word L%d-L%d\n", VALUE,REL); \ ! /* Output an absolute table element */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ if (TARGET_BIGTABLE) \ ! fprintf (STREAM, "\t.long L%d\n", VALUE); \ else \ ! fprintf (STREAM, "\t.word L%d\n", VALUE); \ /* Output various types of constants. */ - /* This is how to output an assembler line defining a `double' */ - #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { char dstr[30]; \ --- 1226,1257 ---- /* Construct a private name. */ ! #define ASM_FORMAT_PRIVATE_NAME(OUTVAR,NAME,NUMBER) \ ! ((OUTVAR) = (char *) alloca (strlen (NAME) + 10), \ sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER))) ! /* Jump tables must be 32 bit aligned, no matter the size of the element. */ #define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \ ! fprintf (STREAM, "\t.align 2\n%s%d:\n", PREFIX, NUM); ! /* Output a relative address table. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,VALUE,REL) \ if (TARGET_BIGTABLE) \ ! fprintf (STREAM, "\t.long L%d-L%d\n", VALUE,REL); \ else \ ! fprintf (STREAM, "\t.word L%d-L%d\n", VALUE,REL); \ ! /* Output an absolute table element. */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \ if (TARGET_BIGTABLE) \ ! fprintf (STREAM, "\t.long L%d\n", VALUE); \ else \ ! fprintf (STREAM, "\t.word L%d\n", VALUE); \ /* Output various types of constants. */ + /* This is how to output an assembler line defining a `double'. */ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { char dstr[30]; \ *************** *** 1379,1385 **** } while (0) - /* This is how to output an assembler line defining a `float' constant. */ ! #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { char dstr[30]; \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ --- 1260,1265 ---- } while (0) /* This is how to output an assembler line defining a `float' constant. */ ! #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { char dstr[30]; \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ *************** *** 1390,1399 **** (fprintf (STREAM, "\t.long\t"), \ output_addr_const (STREAM, (EXP)), \ ! fputc ('\n', STREAM)) ! #define ASM_OUTPUT_SHORT(STREAM, EXP) \ ! (fprintf (STREAM, "\t.short\t"), \ ! output_addr_const (STREAM, (EXP)), \ ! fputc ('\n', STREAM)) #define ASM_OUTPUT_CHAR(STREAM, EXP) \ --- 1270,1279 ---- (fprintf (STREAM, "\t.long\t"), \ output_addr_const (STREAM, (EXP)), \ ! fputc ('\n', STREAM)) ! #define ASM_OUTPUT_SHORT(STREAM, EXP) \ ! (fprintf (STREAM, "\t.short\t"), \ ! output_addr_const (STREAM, (EXP)), \ ! fputc ('\n', STREAM)) #define ASM_OUTPUT_CHAR(STREAM, EXP) \ *************** *** 1408,1412 **** that says to advance the location counter by SIZE bytes. */ ! #define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.space %d\n", (SIZE)) --- 1288,1292 ---- that says to advance the location counter by SIZE bytes. */ ! #define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.space %d\n", (SIZE)) *************** *** 1414,1418 **** to define a global common symbol. */ ! #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ( fputs ("\t.comm ", (FILE)), \ assemble_name ((FILE), (NAME)), \ --- 1294,1298 ---- to define a global common symbol. */ ! #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ( fputs ("\t.comm ", (FILE)), \ assemble_name ((FILE), (NAME)), \ *************** *** 1427,1431 **** fprintf ((FILE), ",%d\n", (SIZE))) - /* The assembler's parentheses characters. */ #define ASM_OPEN_PAREN "(" --- 1307,1310 ---- *************** *** 1441,1449 **** #define TARGET_CR 015 - /* Only perform branch elimination (by making instructions conditional) if ! we're optimising. Otherwise it's of no use anyway. */ ! #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ ! final_prescan_insn (INSN, OPVEC, NOPERANDS) /* Print operand X (an rtx) in assembler syntax to file FILE. --- 1320,1327 ---- #define TARGET_CR 015 /* Only perform branch elimination (by making instructions conditional) if ! we're optimizing. Otherwise it's of no use anyway. */ ! #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ ! final_prescan_insn (INSN, OPVEC, NOPERANDS) /* Print operand X (an rtx) in assembler syntax to file FILE. *************** *** 1458,1473 **** #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ! ((CHAR)=='.' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR)=='!' || (CHAR)=='@') ! extern struct rtx_def *sh_compare_op0; extern struct rtx_def *sh_compare_op1; extern struct rtx_def *prepare_scc_operands(); ! extern struct rtx_def *table_lab; ! extern enum attr_cpu sh_cpu; /* target cpu */ ! /* Declare functions defined in sh.c and used in templates. */ extern char *output_branch(); --- 1336,1359 ---- #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ! ((CHAR)=='.' || (CHAR) == '#' || (CHAR)=='@') extern struct rtx_def *sh_compare_op0; extern struct rtx_def *sh_compare_op1; extern struct rtx_def *prepare_scc_operands(); ! ! /* Which processor to schedule for. The elements of the enumeration must ! match exactly the cpu attribute in the sh.md file. */ + enum processor_type { + PROCESSOR_SH0, + PROCESSOR_SH1, + PROCESSOR_SH2, + PROCESSOR_SH3 + }; ! #define sh_cpu_attr ((enum attr_cpu)sh_cpu) ! extern enum processor_type sh_cpu; ! /* Declare functions defined in sh.c and used in templates. */ extern char *output_branch(); *************** *** 1478,1482 **** extern char *output_far_jump(); - #define MACHINE_DEPENDENT_REORG(X) machine_dependent_reorg(X) --- 1364,1367 ---- *************** *** 1487,1497 **** #define HANDLE_PRAGMA(finput) return handle_pragma (finput) ! /* Set when processing a function with pragma interrupt turned on. */ extern int pragma_interrupt; ! #define MOVE_RATIO (TARGET_SMALLCODE ? 4 : 16) ! char *max_si; ! char *max_hi; ! int max_count_si; ! int max_count_hi; --- 1372,1432 ---- #define HANDLE_PRAGMA(finput) return handle_pragma (finput) ! /* Set when processing a function with pragma interrupt turned on. */ extern int pragma_interrupt; ! ! #define MOVE_RATIO (TARGET_SMALLCODE ? 2 : 16) ! ! /* Instructions with unfilled delay slots take up an extra two bytes for ! the nop in the delay slot. */ ! ! #define ADJUST_INSN_LENGTH(X, LENGTH) \ ! if (((GET_CODE (X) == INSN \ ! && GET_CODE (PATTERN (X)) != SEQUENCE \ ! && GET_CODE (PATTERN (X)) != USE \ ! && GET_CODE (PATTERN (X)) != CLOBBER) \ ! || GET_CODE (X) == CALL_INSN \ ! || (GET_CODE (X) == JUMP_INSN \ ! && GET_CODE (PATTERN (X)) != ADDR_DIFF_VEC \ ! && GET_CODE (PATTERN (X)) != ADDR_VEC)) \ ! && get_attr_needs_delay_slot (X) == NEEDS_DELAY_SLOT_YES) \ ! LENGTH += 2; ! ! /* Enable a bug fix for the shorten_branches pass. */ ! #define SHORTEN_WITH_ADJUST_INSN_LENGTH ! ! /* Define the codes that are matched by predicates in sh.c. */ ! #define PREDICATE_CODES \ ! {"arith_reg_operand", {SUBREG, REG}}, \ ! {"arith_operand", {SUBREG, REG, CONST_INT}}, \ ! {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ ! {"logical_operand", {SUBREG, REG, CONST_INT}}, \ ! {"general_movsrc_operand", {SUBREG, REG, CONST_INT, MEM}}, \ ! {"general_movdst_operand", {SUBREG, REG, CONST_INT, MEM}}, ! ! /* Define this macro if it is advisable to hold scalars in registers ! in a wider mode than that declared by the program. In such cases, ! the value is constrained to be within the bounds of the declared ! type, but kept valid in the wider mode. The signedness of the ! extension may differ from that of the type. ! ! Leaving the unsignedp unchanged gives better code than always setting it ! to 0. This is despite the fact that we have only signed char and short ! load instructions. */ ! #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ ! if (GET_MODE_CLASS (MODE) == MODE_INT \ ! && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ ! MODE = SImode; ! ! /* PROMOTE_FUNCTION_ARGS and PROMOTE_FUNCTION_RETURN appear to have no ! effect, because all unprototyped char/shorts are already promoted to ! int, and because PROMOTE_PROTOTYPES causes all prototypes char/shorts ! to be promoted to it. */ ! ! /* ??? Define ACCUMULATE_OUTGOING_ARGS? This is more efficient than pushing ! and poping arguments. However, we do have push/pop instructions, and ! rather limited offsets (4 bits) in load/store instructions, so it isn't ! clear if this would give better code. If implemented, should check for ! compatibility problems. */ ! /* ??? Define ADJUST_COSTS? */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sh/sh.md gcc-2.7.0/config/sh/sh.md *** gcc-2.6.3/config/sh/sh.md Mon Nov 7 17:47:49 1994 --- gcc-2.7.0/config/sh/sh.md Thu Jun 15 16:57:16 1995 *************** *** 1,5 **** ! ;;- Machine description the Hitachi SH ! ;; Copyright (C) 1993 Free Software Foundation, Inc. ! ;; Contributed by Steve Chamberlain (sac@cygnus.com) ;; This file is part of GNU CC. --- 1,6 ---- ! ;;- Machine description for the Hitachi SH. ! ;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. ! ;; Contributed by Steve Chamberlain (sac@cygnus.com). ! ;; Improved by Jim Wilson (wilson@cygnus.com). ;; This file is part of GNU CC. *************** *** 17,29 **** ;; 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. ;; Special constraints for SH machine description: ;; ! ;; t -- T ! ;; x -- mac ! ;; l -- pr ;; z -- r0 ;; --- 18,49 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. + ;; ??? Should be enhanced to include support for many more GNU superoptimizer + ;; sequences. Especially the sequences for arithmetic right shifts. + ;; ??? Should check all DImode patterns for consistency and usefulness. + + ;; ??? Should add support for using BSR for short function calls. + + ;; ??? The MAC.W and MAC.L instructions are not supported. There is no + ;; way to generate them. + + ;; ??? The BSR instruction is not supported. It might be possible to + ;; generate it by keeping track of function sizes (and hence relative + ;; addresses), and then using it only if the target is earlier in the same + ;; file, and is within range. Better would be assembler/linker relaxing, + ;; but that is much harder. + + ;; ??? The cmp/str instruction is not supported. Perhaps it can be used + ;; for a str* inline function. + ;; Special constraints for SH machine description: ;; ! ;; t -- T ! ;; x -- mac ! ;; l -- pr ;; z -- r0 ;; *************** *** 31,42 **** ;; ;; %. -- print a .s if insn needs delay slot ! ;; %* -- print a local label ! ;; %^ -- increment the local label number ;; %# -- output a nop if there is nothing to put in the delay slot - ;; %R -- print the next register or memory location along, ie the lsw in - ;; a double word value ;; %O -- print a constant without the # ! ;; %M -- print a constant as its negative ! ;; ;; ;; Special predicates: --- 51,60 ---- ;; ;; %. -- print a .s if insn needs delay slot ! ;; %@ -- print rte/rts if is/isn't an interrupt function ;; %# -- output a nop if there is nothing to put in the delay slot ;; %O -- print a constant without the # ! ;; %R -- print the lsw reg of a double ! ;; %S -- print the msw reg of a double ! ;; %T -- print next word of a double REG or MEM ;; ;; Special predicates: *************** *** 44,53 **** ;; arith_operand -- operand is valid source for arithmetic op ;; arith_reg_operand -- operand is valid register for arithmetic op - ;; byte_index_operand -- operand is ok as an index in a mov.b ;; general_movdst_operand -- operand is valid move destination ;; general_movsrc_operand -- operand is valid move source ;; logical_operand -- operand is valid source for logical op - ;; pop_operand -- operand is a pop from the stack - ;; system_reg_operand -- operand is MACL, MACH, or PR ;; ------------------------------------------------------------------------- ;; Attributes --- 62,68 ---- *************** *** 57,64 **** (define_attr "cpu" "sh0,sh1,sh2,sh3" ! (const (symbol_ref "sh_cpu"))) - (define_attr "interrupt_function" "no,yes" - (const (symbol_ref "pragma_interrupt"))) ;; ;; cbranch conditional branch instructions --- 72,77 ---- (define_attr "cpu" "sh0,sh1,sh2,sh3" ! (const (symbol_ref "sh_cpu_attr"))) ;; ;; cbranch conditional branch instructions *************** *** 68,170 **** ;; store to memory ;; move register to register ! ;; smpy single precision integer multiply ! ;; dmpy double precision integer multiply ;; return rts ! ;; pload load of pr reg (can't be put into delay slot of rts) ! ;; pcloadsi pc relative load of SI value ! ;; pcloadhi pc relative load of HI value ;; rte return from exception ;; sfunc special function call with known used registers ! (define_attr "type" ! "cbranch,jump,arith,other,load,store,move,smpy,dmpy,return,pload,pcloadsi,pcloadhi,rte,sfunc" (const_string "other")) ! ; If a conditional branch destination is within -120..120 bytes away ; from the instruction it can be 2 bytes long. Something in the ! ; range -4090..4090 bytes can be 6 bytes long, all other conditional ! ; branches are 8 bytes long. ! ; An unconditional jump which can reach forward or back 4k can be ! ; 6 bytes long (including the delay slot). If it is too big, it ! ; must be 10 bytes long. - ; If a pcrel instruction is within 500 bytes of the constant, then the insn is - ; 2 bytes long, otherwise 12 bytes ; All other instructions are two bytes long by default. ! (define_attr "length" "" (cond [(eq_attr "type" "cbranch") ! (if_then_else (and (ge (minus (pc) (match_dup 0)) ! (const_int -122)) ! (le (minus (pc) (match_dup 0)) ! (const_int 122))) (const_int 2) ! (if_then_else (and (ge (minus (pc) (match_dup 0)) (const_int -4090)) ! (le (minus (pc) (match_dup 0)) ! (const_int 4090))) (const_int 6) (const_int 16))) (eq_attr "type" "jump") ! (if_then_else (and (ge (minus (pc) (match_dup 0)) ! (const_int -4090)) ! (le (minus (pc) (match_dup 0)) ! (const_int 4090))) ! (const_int 4) ! (const_int 10)) ! (eq_attr "type" "pcloadsi") ! (if_then_else (gt (pc) (minus (match_dup 0) (const_int 1000))) ! (const_int 2) ! (const_int 12)) ! (eq_attr "type" "pcloadhi") ! (if_then_else (gt (pc) (minus (match_dup 0) (const_int 500))) (const_int 2) ! (const_int 12)) ! ] (const_int 2))) ;; (define_function_unit {name} {num-units} {n-users} {test} ;; {ready-delay} {issue-delay} [{conflict-list}]) - - (define_function_unit "memory" 1 0 (eq_attr "type" "load,pcloadsi,pcloadhi") 2 0) - (define_function_unit "mpy" 1 0 (eq_attr "type" "smpy") 3 0) - (define_function_unit "mpy" 1 0 (eq_attr "type" "dmpy") 5 0) - - (define_attr "needs_delay_slot" "yes,no" - (cond [(eq_attr "type" "jump") (const_string "yes") - (eq_attr "type" "return") (const_string "yes")] - (const_string "no"))) ! (define_delay ! (eq_attr "needs_delay_slot" "yes") ! [(eq_attr "in_delay_slot" "yes") (nil) (nil)]) ! (define_delay ! (eq_attr "type" "return") ! [(and (eq_attr "in_delay_slot" "yes") ! (ior (eq_attr "interrupt_function" "no") ! (eq_attr "hit_stack" "no"))) (nil) (nil)]) (define_attr "hit_stack" "yes,no" (const_string "no")) ! (define_delay ! (and (eq_attr "type" "cbranch") ! (eq_attr "cpu" "sh2")) ! [(eq_attr "in_delay_slot" "yes") (nil) (nil)]) ! (define_attr "in_delay_slot" "maybe,yes,no" (cond [(eq_attr "type" "cbranch") (const_string "no") ! (eq_attr "type" "jump") (const_string "no") ! (eq_attr "type" "pload") (const_string "no") ! (eq_attr "type" "pcloadsi") (const_string "no") ! (eq_attr "type" "pcloadhi") (const_string "no") ! (eq_attr "type" "return") (const_string "no") (eq_attr "length" "2") (const_string "yes") ! (eq_attr "length" "4,6,8,10,12") (const_string "no") ! ] (const_string "yes"))) ;; ------------------------------------------------------------------------- --- 81,200 ---- ;; store to memory ;; move register to register ! ;; smpy word precision integer multiply ! ;; dmpy longword or doublelongword precision integer multiply ;; return rts ! ;; pload load of pr reg, which can't be put into delay slot of rts ! ;; pstore store of pr reg, which can't be put into delay slot of jsr ! ;; pcload pc relative load of constant value ;; rte return from exception ;; sfunc special function call with known used registers + ;; call function call ! (define_attr "type" ! "cbranch,jump,arith,other,load,store,move,smpy,dmpy,return,pload,pstore,pcload,rte,sfunc,call" (const_string "other")) ! ; If a conditional branch destination is within -252..258 bytes away ; from the instruction it can be 2 bytes long. Something in the ! ; range -4090..4100 bytes can be 6 bytes long. All other conditional ! ; branches are 16 bytes long. ! ; An unconditional jump in the range -4092..4098 can be 2 bytes long. ! ; Otherwise, it must be 14 bytes long. ; All other instructions are two bytes long by default. ! ; All positive offsets have an adjustment added, which is the number of bytes ! ; difference between this instruction length and the next larger instruction ! ; length. This is because shorten_branches starts with the largest ! ; instruction size and then tries to reduce them. ! ! (define_attr "length" "" (cond [(eq_attr "type" "cbranch") ! (if_then_else (and (ge (minus (match_dup 0) (pc)) ! (const_int -252)) ! (le (minus (match_dup 0) (pc)) ! (const_int 262))) (const_int 2) ! (if_then_else (and (ge (minus (match_dup 0) (pc)) (const_int -4090)) ! (le (minus (match_dup 0) (pc)) ! (const_int 4110))) (const_int 6) (const_int 16))) (eq_attr "type" "jump") ! (if_then_else (and (ge (minus (match_dup 0) (pc)) ! (const_int -4092)) ! (le (minus (match_dup 0) (pc)) ! (const_int 4110))) (const_int 2) ! (const_int 14)) ] (const_int 2))) ;; (define_function_unit {name} {num-units} {n-users} {test} ;; {ready-delay} {issue-delay} [{conflict-list}]) ! ;; ??? These are probably not correct. ! (define_function_unit "memory" 1 0 (eq_attr "type" "load,pcload,pload") 2 2) ! (define_function_unit "mpy" 1 0 (eq_attr "type" "smpy") 2 2) ! (define_function_unit "mpy" 1 0 (eq_attr "type" "dmpy") 3 3) ! ; Definitions for filling branch delay slots. ! ! (define_attr "needs_delay_slot" "yes,no" (const_string "no")) (define_attr "hit_stack" "yes,no" (const_string "no")) ! (define_attr "interrupt_function" "no,yes" ! (const (symbol_ref "pragma_interrupt"))) ! (define_attr "in_delay_slot" "yes,no" (cond [(eq_attr "type" "cbranch") (const_string "no") ! (eq_attr "type" "pcload") (const_string "no") ! (eq_attr "needs_delay_slot" "yes") (const_string "no") (eq_attr "length" "2") (const_string "yes") ! ] (const_string "no"))) ! ! (define_delay ! (eq_attr "needs_delay_slot" "yes") ! [(eq_attr "in_delay_slot" "yes") (nil) (nil)]) ! ! ;; On the SH and SH2, the rte instruction reads the return pc from the stack, ! ;; and thus we can't put a pop instruction in its delay slot. ! ;; ??? On the SH3, the rte instruction does not use the stack, so a pop ! ;; instruction can go in the delay slot. + ;; Since a normal return (rts) implicitly uses the PR register, + ;; we can't allow PR register loads in an rts delay slot. + (define_delay + (eq_attr "type" "return") + [(and (eq_attr "in_delay_slot" "yes") + (ior (and (eq_attr "interrupt_function" "no") + (eq_attr "type" "!pload")) + (and (eq_attr "interrupt_function" "yes") + (eq_attr "hit_stack" "no")))) (nil) (nil)]) + + ;; Since a call implicitly uses the PR register, we can't allow + ;; a PR register store in a jsr delay slot. + + (define_delay + (ior (eq_attr "type" "call") (eq_attr "type" "sfunc")) + [(and (eq_attr "in_delay_slot" "yes") + (eq_attr "type" "!pstore")) (nil) (nil)]) + + ;; Say that we have annulled true branches, since this gives smaller and + ;; faster code when branches are predicted as not taken. + + ;; ??? Branches which are out-of-range actually have two delay slots, + ;; the first is either always executed or else annulled false, and the + ;; second is always annulled false. Handling these differently from + ;; in range branches would give better code. + + (define_delay + (and (eq_attr "type" "cbranch") + (eq_attr "cpu" "sh2,sh3")) + [(eq_attr "in_delay_slot" "yes") (const_int 1) (nil)]) ;; ------------------------------------------------------------------------- *************** *** 177,207 **** (const_int 1)))] "" ! "movt %0 !movt1") ! (define_insn "" ! [(set (reg:SI 18) (gt:SI (match_operand:SI 0 "arith_reg_operand" "r") ! (const_int 0)))] ! "" ! "cmp/pl %0") (define_insn "" ! [(set (reg:SI 18) (ge:SI (match_operand:SI 0 "arith_reg_operand" "r") ! (const_int 0)))] "" ! "cmp/pz %0") ! (define_insn "cmpeq_0" ! [(set (reg:SI 18) (eq:SI (match_operand:SI 0 "arith_reg_operand" "r") ! (const_int 0)))] ! "" ! "tst %0,%0 ! t0") (define_insn "cmpeqsi_t" ! [(set (reg:SI 18) (eq:SI (match_operand:SI 0 "arith_operand" "r,N,z,r") ! (match_operand:SI 1 "arith_operand" "N,r,rI,r")))] "" "@ ! tst %0,%0 !t1 ! tst %1,%1 !t2 cmp/eq %1,%0 cmp/eq %1,%0") --- 207,236 ---- (const_int 1)))] "" ! "movt %0") ! ;; ??? This combiner pattern does not work, because combine does not combine ! ;; instructions that set a hard register when SMALL_REGISTER_CLASSES is ! ;; defined. Perhaps use a pseudo-reg for the T bit? (define_insn "" ! [(set (reg:SI 18) ! (eq:SI (and:SI (match_operand:SI 0 "arith_reg_operand" "z,r") ! (match_operand:SI 1 "arith_operand" "L,r")) ! (const_int 0)))] "" ! "tst %1,%0") ! ;; ??? Perhaps should only accept reg/constant if the register is reg 0. ! ;; That would still allow reload to create cmpi instructions, but would ! ;; perhaps allow forcing the constant into a register when that is better. ! ;; Probably should use r0 for mem/imm compares, but force constant into a ! ;; register for pseudo/imm compares. (define_insn "cmpeqsi_t" ! [(set (reg:SI 18) (eq:SI (match_operand:SI 0 "arith_reg_operand" "r,z,r") ! (match_operand:SI 1 "arith_operand" "N,rI,r")))] "" "@ ! tst %0,%0 cmp/eq %1,%0 cmp/eq %1,%0") *************** *** 209,226 **** (define_insn "cmpgtsi_t" [(set (reg:SI 18) (gt:SI (match_operand:SI 0 "arith_reg_operand" "r,r") ! (match_operand:SI 1 "arith_operand" "N,r")))] "" "@ ! cmp/pl %0 ! cmp/gt %1,%0") (define_insn "cmpgesi_t" [(set (reg:SI 18) (ge:SI (match_operand:SI 0 "arith_reg_operand" "r,r") ! (match_operand:SI 1 "arith_operand" "N,r")))] "" "@ ! cmp/pz %0 ! cmp/ge %1,%0") ! ;; ------------------------------------------------------------------------- --- 238,254 ---- (define_insn "cmpgtsi_t" [(set (reg:SI 18) (gt:SI (match_operand:SI 0 "arith_reg_operand" "r,r") ! (match_operand:SI 1 "arith_reg_or_0_operand" "r,N")))] "" "@ ! cmp/gt %1,%0 ! cmp/pl %0") (define_insn "cmpgesi_t" [(set (reg:SI 18) (ge:SI (match_operand:SI 0 "arith_reg_operand" "r,r") ! (match_operand:SI 1 "arith_reg_or_0_operand" "r,N")))] "" "@ ! cmp/ge %1,%0 ! cmp/pz %0") ;; ------------------------------------------------------------------------- *************** *** 229,246 **** (define_insn "cmpgeusi_t" ! [(set (reg:SI 18) (geu:SI (match_operand:SI 0 "arith_reg_operand" "r,r") ! (match_operand:SI 1 "arith_operand" "N,r")))] "" ! "@ ! cmp/pz %1 ! cmp/hs %1,%0") (define_insn "cmpgtusi_t" ! [(set (reg:SI 18) (gtu:SI (match_operand:SI 0 "arith_operand" "r,r") ! (match_operand:SI 1 "arith_operand" "N,r")))] "" ! "@ ! cmp/pl %1 ! cmp/hi %1,%0") ;; We save the compare operands in the cmpxx patterns and use them when --- 257,270 ---- (define_insn "cmpgeusi_t" ! [(set (reg:SI 18) (geu:SI (match_operand:SI 0 "arith_reg_operand" "r") ! (match_operand:SI 1 "arith_reg_operand" "r")))] "" ! "cmp/hs %1,%0") (define_insn "cmpgtusi_t" ! [(set (reg:SI 18) (gtu:SI (match_operand:SI 0 "arith_reg_operand" "r") ! (match_operand:SI 1 "arith_reg_operand" "r")))] "" ! "cmp/hi %1,%0") ;; We save the compare operands in the cmpxx patterns and use them when *************** *** 257,261 **** DONE; }") - ;; ------------------------------------------------------------------------- --- 281,284 ---- *************** *** 263,294 **** ;; ------------------------------------------------------------------------- ! ;; this should be a define split. (define_insn "adddi3" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (plus:DI (match_operand:DI 1 "register_operand" "%0") ! (match_operand:DI 2 "register_operand" "r"))) (clobber (reg:SI 18))] "" ! "clrt\;addc %R2,%R0\;addc %2,%0" [(set_attr "length" "6")]) ! ! (define_insn "addsi3_real" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (plus:SI (match_operand:SI 1 "arith_reg_operand" "%0") ! (match_operand:SI 2 "arith_operand" "rI")))] ! "" ! "add %2,%0" ! [(set_attr "length" "2") ! (set_attr "type" "arith")]) ! ! (define_expand "addsi3" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (plus:SI (match_operand:SI 1 "arith_operand" "%0") (match_operand:SI 2 "arith_operand" "rI")))] "" ! "") ! ;; ------------------------------------------------------------------------- --- 286,307 ---- ;; ------------------------------------------------------------------------- ! ;; ??? This should be a define expand. (define_insn "adddi3" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (plus:DI (match_operand:DI 1 "arith_reg_operand" "%0") ! (match_operand:DI 2 "arith_reg_operand" "r"))) (clobber (reg:SI 18))] "" ! "clrt\;addc %R2,%R0\;addc %S2,%S0" [(set_attr "length" "6")]) ! (define_insn "addsi3" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (plus:SI (match_operand:SI 1 "arith_operand" "%0") (match_operand:SI 2 "arith_operand" "rI")))] "" ! "add %2,%0" ! [(set_attr "type" "arith")]) ;; ------------------------------------------------------------------------- *************** *** 296,307 **** ;; ------------------------------------------------------------------------- (define_insn "subdi3" ! [(set (match_operand:DI 0 "register_operand" "=r") ! (minus:DI (match_operand:DI 1 "register_operand" "0") ! (match_operand:DI 2 "register_operand" "r"))) (clobber (reg:SI 18))] "" ! "clrt\;subc %R2,%R0\;subc %2,%0" [(set_attr "length" "6")]) --- 309,321 ---- ;; ------------------------------------------------------------------------- + ;; ??? This should be a define expand. (define_insn "subdi3" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (minus:DI (match_operand:DI 1 "arith_reg_operand" "0") ! (match_operand:DI 2 "arith_reg_operand" "r"))) (clobber (reg:SI 18))] "" ! "clrt\;subc %R2,%R0\;subc %S2,%S0" [(set_attr "length" "6")]) *************** *** 309,317 **** [(set (match_operand:SI 0 "arith_reg_operand" "=r") (minus:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "arith_operand" "r")))] "" "sub %2,%0" [(set_attr "type" "arith")]) - ;; ------------------------------------------------------------------------- --- 323,330 ---- [(set (match_operand:SI 0 "arith_reg_operand" "=r") (minus:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "arith_reg_operand" "r")))] "" "sub %2,%0" [(set_attr "type" "arith")]) ;; ------------------------------------------------------------------------- *************** *** 319,361 **** ;; ------------------------------------------------------------------------- ! ! ;; we take advantage of the library routines which don't clobber as many ;; registers as a normal function call would. (define_insn "" ! [(set (reg:SI 0) (udiv:SI (reg:SI 4) (reg:SI 5))) (clobber (reg:SI 18)) (clobber (reg:SI 17)) - (clobber (reg:SI 6)) (clobber (reg:SI 4)) ! (use (match_operand:SI 0 "register_operand" "r"))] "" "jsr @%0%#" [(set_attr "type" "sfunc") - (set_attr "length" "4") (set_attr "needs_delay_slot" "yes")]) (define_expand "udivsi3" ! [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "g")) ! (set (reg:SI 5) (match_operand:SI 2 "general_operand" "g")) (set (match_dup 3) (symbol_ref:SI "__udivsi3")) ! (parallel[(set (reg:SI 0) ! (udiv:SI (reg:SI 4) ! (reg:SI 5))) ! (clobber (reg:SI 18)) ! (clobber (reg:SI 17)) ! (clobber (reg:SI 6)) ! (clobber (reg:SI 4)) ! (use (match_dup 3))]) ! (set (match_operand:SI 0 "general_operand" "=g") ! (reg:SI 0))] "" "operands[3] = gen_reg_rtx(SImode);") - (define_insn "" ! [(set (reg:SI 0) (div:SI (reg:SI 4) (reg:SI 5))) (clobber (reg:SI 18)) --- 332,374 ---- ;; ------------------------------------------------------------------------- ! ;; We take advantage of the library routines which don't clobber as many ;; registers as a normal function call would. + ;; We must use a pseudo-reg forced to reg 0 in the SET_DEST rather than + ;; hard register 0. If we used hard register 0, then the next instruction + ;; would be a move from hard register 0 to a pseudo-reg. If the pseudo-reg + ;; gets allocated to a stack slot that needs its address reloaded, then + ;; there is nothing to prevent reload from using r0 to reload the address. + ;; This reload would clobber the value in r0 we are trying to store. + ;; If we let reload allocate r0, then this problem can never happen. (define_insn "" ! [(set (match_operand:SI 1 "register_operand" "=z") (udiv:SI (reg:SI 4) (reg:SI 5))) (clobber (reg:SI 18)) (clobber (reg:SI 17)) (clobber (reg:SI 4)) ! (use (match_operand:SI 0 "arith_reg_operand" "r"))] "" "jsr @%0%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) (define_expand "udivsi3" ! [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) ! (set (reg:SI 5) (match_operand:SI 2 "general_operand" "")) (set (match_dup 3) (symbol_ref:SI "__udivsi3")) ! (parallel [(set (match_operand:SI 0 "register_operand" "") ! (udiv:SI (reg:SI 4) ! (reg:SI 5))) ! (clobber (reg:SI 18)) ! (clobber (reg:SI 17)) ! (clobber (reg:SI 4)) ! (use (match_dup 3))])] "" "operands[3] = gen_reg_rtx(SImode);") (define_insn "" ! [(set (match_operand:SI 1 "register_operand" "=z") (div:SI (reg:SI 4) (reg:SI 5))) (clobber (reg:SI 18)) *************** *** 364,392 **** (clobber (reg:SI 2)) (clobber (reg:SI 3)) ! (use (match_operand:SI 0 "register_operand" "r"))] "" "jsr @%0%#" [(set_attr "type" "sfunc") - (set_attr "length" "4") (set_attr "needs_delay_slot" "yes")]) (define_expand "divsi3" ! [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "g")) ! (set (reg:SI 5) (match_operand:SI 2 "general_operand" "g")) (set (match_dup 3) (symbol_ref:SI "__sdivsi3")) ! (parallel[(set (reg:SI 0) ! (div:SI (reg:SI 4) (reg:SI 5))) ! (clobber (reg:SI 18)) ! (clobber (reg:SI 17)) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 3)) ! (use (match_dup 3))]) ! (set (match_operand:SI 0 "general_operand" "=g") ! (reg:SI 0))] "" "operands[3] = gen_reg_rtx(SImode);") - ;; ------------------------------------------------------------------------- --- 377,401 ---- (clobber (reg:SI 2)) (clobber (reg:SI 3)) ! (use (match_operand:SI 0 "arith_reg_operand" "r"))] "" "jsr @%0%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) (define_expand "divsi3" ! [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) ! (set (reg:SI 5) (match_operand:SI 2 "general_operand" "")) (set (match_dup 3) (symbol_ref:SI "__sdivsi3")) ! (parallel [(set (match_operand:SI 0 "register_operand" "") ! (div:SI (reg:SI 4) (reg:SI 5))) ! (clobber (reg:SI 18)) ! (clobber (reg:SI 17)) ! (clobber (reg:SI 1)) ! (clobber (reg:SI 2)) ! (clobber (reg:SI 3)) ! (use (match_dup 3))])] "" "operands[3] = gen_reg_rtx(SImode);") ;; ------------------------------------------------------------------------- *************** *** 415,422 **** [(set (reg:SI 21) (mult:SI (sign_extend:SI ! (match_operand:HI 1 "mac_operand" "r")) (sign_extend:SI ! (match_operand:HI 2 "mac_operand" "r")))) ! (set (match_operand:SI 0 "arith_reg_operand" "=r") (reg:SI 21))] "" --- 424,431 ---- [(set (reg:SI 21) (mult:SI (sign_extend:SI ! (match_operand:HI 1 "arith_reg_operand" "")) (sign_extend:SI ! (match_operand:HI 2 "arith_reg_operand" "")))) ! (set (match_operand:SI 0 "arith_reg_operand" "") (reg:SI 21))] "" *************** *** 426,433 **** [(set (reg:SI 21) (mult:SI (zero_extend:SI ! (match_operand:HI 1 "arith_reg_operand" "r")) (zero_extend:SI ! (match_operand:HI 2 "arith_reg_operand" "r")))) ! (set (match_operand:SI 0 "arith_reg_operand" "=r") (reg:SI 21))] "" --- 435,442 ---- [(set (reg:SI 21) (mult:SI (zero_extend:SI ! (match_operand:HI 1 "arith_reg_operand" "")) (zero_extend:SI ! (match_operand:HI 2 "arith_reg_operand" "")))) ! (set (match_operand:SI 0 "arith_reg_operand" "") (reg:SI 21))] "" *************** *** 438,442 **** (define_insn "" ! [(set (reg:SI 0) (mult:SI (reg:SI 4) (reg:SI 5))) (clobber (reg:SI 21)) --- 447,451 ---- (define_insn "" ! [(set (match_operand:SI 1 "register_operand" "=z") (mult:SI (reg:SI 4) (reg:SI 5))) (clobber (reg:SI 21)) *************** *** 446,461 **** (clobber (reg:SI 2)) (clobber (reg:SI 1)) ! (use (match_operand:SI 0 "register_operand" "r"))] "" "jsr @%0%#" [(set_attr "type" "sfunc") - (set_attr "length" "4") (set_attr "needs_delay_slot" "yes")]) (define_expand "mulsi3_call" ! [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "g")) ! (set (reg:SI 5) (match_operand:SI 2 "general_operand" "g")) (set (match_dup 3) (symbol_ref:SI "__mulsi3")) ! (parallel[(set (reg:SI 0) (mult:SI (reg:SI 4) (reg:SI 5))) --- 455,469 ---- (clobber (reg:SI 2)) (clobber (reg:SI 1)) ! (use (match_operand:SI 0 "arith_reg_operand" "r"))] "" "jsr @%0%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) (define_expand "mulsi3_call" ! [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) ! (set (reg:SI 5) (match_operand:SI 2 "general_operand" "")) (set (match_dup 3) (symbol_ref:SI "__mulsi3")) ! (parallel[(set (match_operand:SI 0 "register_operand" "") (mult:SI (reg:SI 4) (reg:SI 5))) *************** *** 466,475 **** (clobber (reg:SI 2)) (clobber (reg:SI 1)) ! (use (match_dup 3))]) ! (set (match_operand:SI 0 "general_operand" "=g") ! (reg:SI 0))] "" "operands[3] = gen_reg_rtx(SImode);") ! (define_insn "mul_l" [(set (reg:SI 21) --- 474,481 ---- (clobber (reg:SI 2)) (clobber (reg:SI 1)) ! (use (match_dup 3))])] "" "operands[3] = gen_reg_rtx(SImode);") ! (define_insn "mul_l" [(set (reg:SI 21) *************** *** 478,491 **** "TARGET_SH2" "mul.l %1,%0" ! [(set_attr "type" "smpy")]) (define_expand "mulsi3" [(set (reg:SI 21) ! (mult:SI (match_operand:SI 1 "arith_reg_operand" "r") ! (match_operand:SI 2 "arith_reg_operand" "r"))) ! (set (match_operand:SI 0 "arith_reg_operand" "=r") (reg:SI 21))] ! "TARGET_SH2" ! "") (define_insn "" --- 484,508 ---- "TARGET_SH2" "mul.l %1,%0" ! [(set_attr "type" "dmpy")]) (define_expand "mulsi3" [(set (reg:SI 21) ! (mult:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "arith_reg_operand" ""))) ! (set (match_operand:SI 0 "arith_reg_operand" "") (reg:SI 21))] ! "" ! " ! { ! if (!TARGET_SH2) ! { ! FAIL; ! /* ??? Does this give worse or better code? */ ! emit_insn (gen_mulsi3_call (operands[0], operands[1], operands[2])); ! DONE; ! } ! }") ! ! ;; ??? Why is this disabled? (define_insn "" *************** *** 493,526 **** (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))] ! "TARGET_SH2" "dmuls.l %2,%1" [(set_attr "type" "dmpy")]) (define_expand "mulsidi3" [(set (reg:DI 20) ! (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) ! (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r")))) ! (set (match_operand:DI 0 "arith_reg_operand" "=r") (reg:DI 20))] ! "TARGET_SH2" "") (define_insn "" [(set (reg:DI 20) (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))] ! "TARGET_SH2" "dmulu.l %2,%1" [(set_attr "type" "dmpy")]) (define_expand "umulsidi3" [(set (reg:DI 20) ! (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) ! (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r")))) ! (set (match_operand:DI 0 "arith_reg_operand" "=r") (reg:DI 20))] ! "TARGET_SH2" "") - ;; ------------------------------------------------------------------------- --- 510,548 ---- (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))] ! "(TARGET_SH2) && 0" "dmuls.l %2,%1" [(set_attr "type" "dmpy")]) + ;; ??? Why is this disabled? + (define_expand "mulsidi3" [(set (reg:DI 20) ! (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "")) ! (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "")))) ! (set (match_operand:DI 0 "arith_reg_operand" "") (reg:DI 20))] ! "(TARGET_SH2) && 0" "") + ;; ??? Why is this disabled? + (define_insn "" [(set (reg:DI 20) (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))] ! "(TARGET_SH2) && 0" "dmulu.l %2,%1" [(set_attr "type" "dmpy")]) + ;; ??? Why is this disabled? + (define_expand "umulsidi3" [(set (reg:DI 20) ! (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "")) ! (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "")))) ! (set (match_operand:DI 0 "arith_reg_operand" "") (reg:DI 20))] ! "(TARGET_SH2) && 0" "") ;; ------------------------------------------------------------------------- *************** *** 528,547 **** ;; ------------------------------------------------------------------------- - (define_insn "and_ffff" - [(set (match_operand:SI 0 "arith_reg_operand" "=r") - (and:SI (match_operand:SI 1 "arith_reg_operand" "r") - (const_int 65535)))] - "" - "extu.w %1,%0" - [(set_attr "type" "arith")]) - - (define_insn "and_ff" - [(set (match_operand:SI 0 "arith_reg_operand" "=r") - (and:SI (match_operand:SI 1 "arith_reg_operand" "r") - (const_int 255)))] - "" - "extu.b %1,%0" - [(set_attr "type" "arith")]) - (define_insn "" [(set (match_operand:SI 0 "arith_reg_operand" "=r,z") --- 550,553 ---- *************** *** 552,555 **** --- 558,564 ---- [(set_attr "type" "arith")]) + ;; If the constant is 255, then emit a extu.b instruction instead of an + ;; and, since that will give better code. + (define_expand "andsi3" [(set (match_operand:SI 0 "arith_reg_operand" "") *************** *** 557,561 **** (match_operand:SI 2 "logical_operand" "")))] "" ! "") (define_insn "iorsi3" --- 566,578 ---- (match_operand:SI 2 "logical_operand" "")))] "" ! " ! { ! if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 255) ! { ! emit_insn (gen_zero_extendqisi2 (operands[0], ! gen_lowpart (QImode, operands[1]))); ! DONE; ! } ! }") (define_insn "iorsi3" *************** *** 573,577 **** "xor %2,%0" [(set_attr "type" "arith")]) - ;; ------------------------------------------------------------------------- --- 590,593 ---- *************** *** 579,651 **** ;; ------------------------------------------------------------------------- ! (define_insn "rotlsi3_k" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (rotate:SI (match_operand:SI 1 "arith_reg_operand" "0") (const_int 1))) ! (clobber (reg:SI 18))] "" "rotl %0") ! (define_expand "rotlsi3" ! [(parallel[(set (match_operand:SI 0 "arith_reg_operand" "") ! (rotate:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] ! "" ! "{ if (GET_CODE(operands[2]) != CONST_INT || INTVAL(operands[2]) != 1) FAIL;}") ! ! (define_insn "rotrsi3_k" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (rotatert:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (const_int 1))) (clobber (reg:SI 18))] "" "rotr %0") ! (define_expand "rotrsi3" ! [(parallel[(set (match_operand:SI 0 "arith_reg_operand" "") ! (rotatert:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "{ if (GET_CODE(operands[2]) != CONST_INT || INTVAL(operands[2]) != 1) FAIL;}") ;; ;; shift left (define_insn "ashlsi3_k" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0,0") ! (match_operand:SI 2 "immediate_operand" "M,K"))) ! (clobber (reg:SI 18))] "CONST_OK_FOR_K (INTVAL (operands[2]))" "@ ! shll %0 shll%O2 %0") - ; seperate pattern for shifts by any N. Look at pnum_clobbers - ; to see if this is being recognised inside combine. If so, dont - ; match, since combine will try and merge shifts, which will break - ; scheduling - (define_insn "ashlsi3_n" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "immediate_operand" "n"))) (clobber (reg:SI 18))] ! "fake_shift()" ! "*return output_shift(\"shll\", operands[0], operands[2], ASHIFT);" ! [(set_attr "length" "12") ! (set_attr "in_delay_slot" "no") (set_attr "type" "arith")]) (define_expand "ashlsi3" ! [(parallel[(set (match_operand:SI 0 "arith_reg_operand" "") ! (ashift:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "if (gen_shifty_op (ASHIFT, operands)) DONE; else FAIL;") ; --- 595,729 ---- ;; ------------------------------------------------------------------------- ! (define_insn "rotlsi3_1" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (rotate:SI (match_operand:SI 1 "arith_reg_operand" "0") (const_int 1))) ! (set (reg:SI 18) ! (lshiftrt:SI (match_dup 1) (const_int 31)))] "" "rotl %0") ! (define_insn "rotlsi3_31" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (rotate:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (const_int 31))) (clobber (reg:SI 18))] "" "rotr %0") ! (define_insn "" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (rotate:SI (match_operand:SI 1 "arith_reg_operand" "r") ! (const_int 16)))] ! "" ! "swap.w %1,%0") ! ! (define_expand "rotlsi3" ! [(set (match_operand:SI 0 "arith_reg_operand" "") ! (rotate:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "immediate_operand" "")))] ! "" ! " ! { ! if (GET_CODE (operands[2]) != CONST_INT) ! FAIL; ! ! if (INTVAL (operands[2]) == 1) ! { ! emit_insn (gen_rotlsi3_1 (operands[0], operands[1])); ! DONE; ! } ! else if (INTVAL (operands[2]) == 31) ! { ! emit_insn (gen_rotlsi3_31 (operands[0], operands[1])); ! DONE; ! } ! else if (INTVAL (operands[2]) != 16) ! FAIL; ! }") ! ! (define_insn "" ! [(set (match_operand:HI 0 "arith_reg_operand" "=r") ! (rotate:HI (match_operand:HI 1 "arith_reg_operand" "r") ! (const_int 8)))] "" ! "swap.b %1,%0") + (define_expand "rotlhi3" + [(set (match_operand:HI 0 "arith_reg_operand" "") + (rotate:HI (match_operand:HI 1 "arith_reg_operand" "") + (match_operand:HI 2 "immediate_operand" "")))] + "" + " + { + if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 8) + FAIL; + }") ;; ;; shift left + (define_insn "ashlsi3_d" + [(set (match_operand:SI 0 "arith_reg_operand" "=r") + (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0") + (match_operand:SI 2 "arith_reg_operand" "r")))] + "TARGET_SH3" + "shld %2,%0") + (define_insn "ashlsi3_k" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0,0") ! (match_operand:SI 2 "const_int_operand" "M,K")))] "CONST_OK_FOR_K (INTVAL (operands[2]))" "@ ! add %0,%0 shll%O2 %0") (define_insn "ashlsi3_n" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "const_int_operand" "n"))) (clobber (reg:SI 18))] ! "" ! "#" ! [(set (attr "length") ! (cond [(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 1)) ! (const_string "2") ! (eq (symbol_ref "shift_insns_rtx (insn)") (const_int 2)) ! (const_string "4") ! (eq (symbol_ref "shift_insns_rtx (insn)") (const_int 3)) ! (const_string "6")] ! (const_string "8"))) (set_attr "type" "arith")]) + (define_split + [(set (match_operand:SI 0 "arith_reg_operand" "") + (ashift:SI (match_operand:SI 1 "arith_reg_operand" "") + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (reg:SI 18))] + "" + [(use (reg:SI 0))] + " + { + gen_shifty_op (ASHIFT, operands); + DONE; + }") + (define_expand "ashlsi3" ! [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") ! (ashift:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "nonmemory_operand" ""))) ! (clobber (reg:SI 18))])] "" ! " ! { ! if (TARGET_SH3 && arith_reg_operand (operands[2], GET_MODE (operands[2]))) ! { ! emit_insn (gen_ashlsi3_d (operands[0], operands[1], operands[2])); ! DONE; ! } ! if (! immediate_operand (operands[2], GET_MODE (operands[2]))) ! FAIL; ! }") ; *************** *** 656,693 **** [(set (match_operand:SI 0 "arith_reg_operand" "=r") (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "immediate_operand" "M"))) (clobber (reg:SI 18))] ! "INTVAL(operands[2]) == 1" "shar %0" [(set_attr "type" "arith")]) ! (define_insn "ashrsi3_16" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "immediate_operand" "i"))) (clobber (reg:SI 18))] ! "INTVAL(operands[2]) == 16" ! "shlr16 %0\;exts.w %0,%0" ! [(set_attr "type" "arith") ! (set_attr "length" "4")]) ! ! ; an arithmetic shift right by 16 is better as a logical shift and a ! ; sign extend ! ! ;(define_split ! ; [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! ; (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! ; (const_int 16))) ! ; (clobber (reg:SI 18))] ! ; "" ! ; [(set (match_dup 3) (match_dup 0)) ! ; (set (match_dup 3) (lshiftrt:SI (match_dup 3) (const_int 16))) ! ; (set (match_dup 0) (sign_extend:SI (subreg:HI (match_dup 3) 0)))] ! ; "operands[3] = gen_reg_rtx (SImode);") (define_insn "ashrsi3_n" [(set (reg:SI 4) (ashiftrt:SI (reg:SI 4) ! (match_operand:SI 0 "immediate_operand" "i"))) (clobber (reg:SI 18)) (clobber (reg:SI 17)) --- 734,776 ---- [(set (match_operand:SI 0 "arith_reg_operand" "=r") (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "const_int_operand" "M"))) (clobber (reg:SI 18))] ! "INTVAL (operands[2]) == 1" "shar %0" [(set_attr "type" "arith")]) ! ;; ??? This should be a define expand. ! ! (define_insn "ashrsi2_16" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "r") ! (const_int 16)))] ! "" ! "swap.w %1,%0\;exts.w %0,%0" ! [(set_attr "length" "4")]) ! ! ;; ??? This should be a define expand. ! ! (define_insn "ashrsi2_31" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (const_int 31))) (clobber (reg:SI 18))] ! "" ! "@ ! shll %0\;subc %0,%0" ! [(set_attr "length" "4")]) ! ! (define_insn "ashrsi3_d" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (neg:SI (match_operand:SI 2 "arith_reg_operand" "r"))))] ! "TARGET_SH3" ! "shad %2,%1") (define_insn "ashrsi3_n" [(set (reg:SI 4) (ashiftrt:SI (reg:SI 4) ! (match_operand:SI 0 "const_int_operand" "i"))) (clobber (reg:SI 18)) (clobber (reg:SI 17)) *************** *** 696,744 **** "jsr @%1%#" [(set_attr "type" "sfunc") - (set_attr "in_delay_slot" "no") - (set_attr "length" "4") (set_attr "needs_delay_slot" "yes")]) (define_expand "ashrsi3" ! [(parallel[(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "r") ! (match_operand:SI 2 "nonmemory_operand" "M"))) ! (clobber (reg:SI 18))])] "" ! "if (gen_shifty_op (ASHIFTRT, operands)) DONE; else FAIL;") ! ; logical shift right ! ; ! (define_insn "lshrsi3_k" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0,0") ! (match_operand:SI 2 "immediate_operand" "M,K"))) (clobber (reg:SI 18))] ! "CONST_OK_FOR_K (INTVAL (operands[2]))" ! "@ ! shlr %0 ! shlr%O2 %0") ! ; seperate pattern for shifts by any N. (define_insn "lshrsi3_n" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "immediate_operand" "n"))) (clobber (reg:SI 18))] ! "fake_shift()" ! "* return output_shift (\"shlr\", operands[0], operands[2], LSHIFTRT);" ! [(set_attr "length" "12") ! (set_attr "in_delay_slot" "no") (set_attr "type" "arith")]) (define_expand "lshrsi3" ! [(parallel[(set (match_operand:SI 0 "arith_reg_operand" "") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "if (gen_shifty_op (LSHIFTRT, operands)) DONE; else FAIL;") (define_insn "ashldi3_k" --- 779,869 ---- "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) (define_expand "ashrsi3" ! [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") ! (ashiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "nonmemory_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "if (expand_ashiftrt (operands)) DONE; else FAIL;") ! ;; logical shift right ! (define_insn "lshrsi3_d" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (neg:SI (match_operand:SI 2 "arith_reg_operand" "r"))))] ! "TARGET_SH3" ! "shld %2,%0") ! ! ;; Only the single bit shift clobbers the T bit. ! ! (define_insn "lshrsi3_m" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "const_int_operand" "M"))) (clobber (reg:SI 18))] ! "CONST_OK_FOR_M (INTVAL (operands[2]))" ! "shlr %0") ! (define_insn "lshrsi3_k" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "const_int_operand" "K")))] ! "CONST_OK_FOR_K (INTVAL (operands[2])) ! && ! CONST_OK_FOR_M (INTVAL (operands[2]))" ! "shlr%O2 %0") (define_insn "lshrsi3_n" [(set (match_operand:SI 0 "arith_reg_operand" "=r") (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0") ! (match_operand:SI 2 "const_int_operand" "n"))) (clobber (reg:SI 18))] ! "" ! "#" ! [(set (attr "length") ! (cond [(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 1)) ! (const_string "2") ! (eq (symbol_ref "shift_insns_rtx (insn)") (const_int 2)) ! (const_string "4") ! (eq (symbol_ref "shift_insns_rtx (insn)") (const_int 3)) ! (const_string "6")] ! (const_string "8"))) (set_attr "type" "arith")]) + (define_split + [(set (match_operand:SI 0 "arith_reg_operand" "") + (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") + (match_operand:SI 2 "const_int_operand" "n"))) + (clobber (reg:SI 18))] + "" + [(use (reg:SI 0))] + " + { + gen_shifty_op (LSHIFTRT, operands); + DONE; + }") + (define_expand "lshrsi3" ! [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "") ! (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "") ! (match_operand:SI 2 "nonmemory_operand" ""))) ! (clobber (reg:SI 18))])] "" ! " ! { ! if (TARGET_SH3 && arith_reg_operand (operands[2], GET_MODE (operands[2]))) ! { ! rtx count = copy_to_mode_reg (SImode, operands[2]); ! emit_insn (gen_negsi2 (count, count)); ! emit_insn (gen_ashlsi3_d (operands[0], operands[1], count)); ! DONE; ! } ! if (! immediate_operand (operands[2], GET_MODE (operands[2]))) ! FAIL; ! }") ! ! ;; ??? This should be a define expand. (define_insn "ashldi3_k" *************** *** 748,764 **** (clobber (reg:SI 18))] "" ! "shll %R0\;rotcl %0" [(set_attr "length" "4")]) (define_expand "ashldi3" ! [(parallel[(set (match_operand:DI 0 "arith_reg_operand" "") ! (ashift:DI (match_operand:DI 1 "arith_reg_operand" "") ! (match_operand:DI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] ! "" ! "{ if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) != 1) FAIL;} ") (define_insn "lshrdi3_k" [(set (match_operand:DI 0 "arith_reg_operand" "=r") --- 873,890 ---- (clobber (reg:SI 18))] "" ! "shll %R0\;rotcl %S0" [(set_attr "length" "4")]) (define_expand "ashldi3" ! [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") ! (ashift:DI (match_operand:DI 1 "arith_reg_operand" "") ! (match_operand:DI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "{ if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) != 1) FAIL;} ") + ;; ??? This should be a define expand. + (define_insn "lshrdi3_k" [(set (match_operand:DI 0 "arith_reg_operand" "=r") *************** *** 767,781 **** (clobber (reg:SI 18))] "" ! "shlr %0\;rotcr %R0" [(set_attr "length" "4")]) (define_expand "lshrdi3" ! [(parallel[(set (match_operand:DI 0 "arith_reg_operand" "") ! (lshiftrt:DI (match_operand:DI 1 "arith_reg_operand" "") (match_operand:DI 2 "immediate_operand" ""))) (clobber (reg:SI 18))])] "" ! "{ if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) != 1) FAIL;} ") (define_insn "ashrdi3_k" --- 893,909 ---- (clobber (reg:SI 18))] "" ! "shlr %S0\;rotcr %R0" [(set_attr "length" "4")]) (define_expand "lshrdi3" ! [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") ! (lshiftrt:DI (match_operand:DI 1 "arith_reg_operand" "") (match_operand:DI 2 "immediate_operand" ""))) (clobber (reg:SI 18))])] "" ! "{ if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) != 1) FAIL;} ") ! ! ;; ??? This should be a define expand. (define_insn "ashrdi3_k" *************** *** 785,800 **** (clobber (reg:SI 18))] "" ! "shar %0\;rotcr %R0" [(set_attr "length" "4")]) (define_expand "ashrdi3" ! [(parallel[(set (match_operand:DI 0 "arith_reg_operand" "") ! (ashiftrt:DI (match_operand:DI 1 "arith_reg_operand" "") ! (match_operand:DI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "{ if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) != 1) FAIL; } ") ! ;; ------------------------------------------------------------------------- --- 913,927 ---- (clobber (reg:SI 18))] "" ! "shar %S0\;rotcr %R0" [(set_attr "length" "4")]) (define_expand "ashrdi3" ! [(parallel [(set (match_operand:DI 0 "arith_reg_operand" "") ! (ashiftrt:DI (match_operand:DI 1 "arith_reg_operand" "") ! (match_operand:DI 2 "immediate_operand" ""))) ! (clobber (reg:SI 18))])] "" ! "{ if (GET_CODE (operands[2]) != CONST_INT ! || INTVAL (operands[2]) != 1) FAIL; } ") ;; ------------------------------------------------------------------------- *************** *** 802,833 **** ;; ------------------------------------------------------------------------- - (define_insn "negc" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (neg:SI (plus:SI (reg:SI 18) (match_operand:SI 1 "arith_reg_operand" "r"))))] "" "negc %1,%0" ! [(set_attr "length" "2") ! (set_attr "type" "arith")]) (define_expand "negdi2" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (neg:DI (match_operand:DI 1 "arith_reg_operand" "r"))) (clobber (reg:SI 18))] "" ! "{ ! rtx low_src = operand_subword (operands[1], 1, 0, DImode); ! rtx high_src = operand_subword (operands[1], 0, 0, DImode); ! ! rtx low_dst = operand_subword (operands[0], 1, 1, DImode); ! rtx high_dst = operand_subword (operands[0], 0, 1, DImode); ! ! emit_insn (gen_clrt ()); ! emit_insn (gen_negc (low_dst, low_src)); ! emit_insn (gen_negc (high_dst, high_src)); ! DONE; ! } ! ") (define_insn "negsi2" --- 929,961 ---- ;; ------------------------------------------------------------------------- (define_insn "negc" [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (neg:SI (plus:SI (reg:SI 18) ! (match_operand:SI 1 "arith_reg_operand" "r")))) ! (set (reg:SI 18) ! (ne:SI (ior:SI (reg:SI 18) (match_dup 1)) ! (const_int 0)))] "" "negc %1,%0" ! [(set_attr "type" "arith")]) (define_expand "negdi2" ! [(set (match_operand:DI 0 "arith_reg_operand" "") ! (neg:DI (match_operand:DI 1 "arith_reg_operand" ""))) (clobber (reg:SI 18))] "" ! " ! { ! rtx low_src = operand_subword (operands[1], 1, 0, DImode); ! rtx high_src = operand_subword (operands[1], 0, 0, DImode); ! ! rtx low_dst = operand_subword (operands[0], 1, 1, DImode); ! rtx high_dst = operand_subword (operands[0], 0, 1, DImode); + emit_insn (gen_clrt ()); + emit_insn (gen_negc (low_dst, low_src)); + emit_insn (gen_negc (high_dst, high_src)); + DONE; + }") (define_insn "negsi2" *************** *** 844,848 **** "not %1,%0" [(set_attr "type" "arith")]) - ;; ------------------------------------------------------------------------- --- 972,975 ---- *************** *** 862,866 **** "" "extu.b %1,%0" ! [(set_attr "type" "arith")]) (define_insn "zero_extendqihi2" --- 989,993 ---- "" "extu.b %1,%0" ! [(set_attr "type" "arith")]) (define_insn "zero_extendqihi2" *************** *** 869,874 **** "" "extu.b %1,%0" ! [(set_attr "type" "arith")]) ! ;; ------------------------------------------------------------------------- --- 996,1000 ---- "" "extu.b %1,%0" ! [(set_attr "type" "arith")]) ;; ------------------------------------------------------------------------- *************** *** 876,919 **** ;; ------------------------------------------------------------------------- (define_insn "extendsidi2" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r,r") ! (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "0,r"))) (clobber (reg:SI 18))] "" ! "@ ! mov %1,%0\;shll %0\;subc %0,%0 ! b sidi2 ! mov %1,%0\;mov %1,%R0\;shll %0\;subc %0,%0 ! a sidi2" ! [(set_attr "length" "6,8")]) (define_insn "extendhisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,z,r") ! (sign_extend:SI (match_operand:HI 1 "arith_operand" "r,u,m")))] "" "@ exts.w %1,%0 - mov.w %1,%0 mov.w %1,%0" ! [(set_attr "type" "arith,load,load")]) (define_insn "extendqisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,z,r") ! (sign_extend:SI (match_operand:QI 1 "general_movsrc_operand" "r,U,m")))] "" "@ exts.b %1,%0 ! mov.b %1,%0 !p9 ! mov.b %1,%0 !p8" ! [(set_attr "type" "arith,load,load")]) (define_insn "extendqihi2" ! [(set (match_operand:HI 0 "arith_reg_operand" "=r,z,r") ! (sign_extend:HI (match_operand:QI 1 "general_movsrc_operand" "r,U,m")))] "" "@ exts.b %1,%0 ! mov.b %1,%0 !p7 ! mov.b %1,%0 ! p6" ! [(set_attr "type" "arith,load,load")]) ! ;; ------------------------------------------------------------------------- --- 1002,1042 ---- ;; ------------------------------------------------------------------------- + ;; ??? This should be a define expand. + ;; ??? Or perhaps it should be dropped? + (define_insn "extendsidi2" ! [(set (match_operand:DI 0 "arith_reg_operand" "=r") ! (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r"))) (clobber (reg:SI 18))] "" ! "mov %1,%S0\;mov %1,%R0\;shll %S0\;subc %S0,%S0" ! [(set_attr "length" "8")]) (define_insn "extendhisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (sign_extend:SI (match_operand:HI 1 "general_movsrc_operand" "r,m")))] "" "@ exts.w %1,%0 mov.w %1,%0" ! [(set_attr "type" "arith,load")]) (define_insn "extendqisi2" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") ! (sign_extend:SI (match_operand:QI 1 "general_movsrc_operand" "r,m")))] "" "@ exts.b %1,%0 ! mov.b %1,%0" ! [(set_attr "type" "arith,load")]) (define_insn "extendqihi2" ! [(set (match_operand:HI 0 "arith_reg_operand" "=r,r") ! (sign_extend:HI (match_operand:QI 1 "general_movsrc_operand" "r,m")))] "" "@ exts.b %1,%0 ! mov.b %1,%0" ! [(set_attr "type" "arith,load")]) ;; ------------------------------------------------------------------------- *************** *** 925,963 **** (define_insn "push" [(set (mem:SI (pre_dec:SI (reg:SI 15))) ! (match_operand:SI 0 "register_operand" "r,lx"))] "" "@ mov.l %0,@-r15 ! sts.l %0,@-r15 ! push" ! [(set_attr "type" "store") (set_attr "hit_stack" "yes")]) (define_insn "pop" ! [(set (match_operand:SI 0 "register_operand" "=r,lx") (mem:SI (post_inc:SI (reg:SI 15))))] "" "@ mov.l @r15+,%0 lds.l @r15+,%0" ! [(set_attr "type" "load,pload") (set_attr "hit_stack" "yes")]) ! (define_insn "" ! [(set (match_operand:SI 0 "push_operand" "=<,<") ! (match_operand:SI 1 "arith_reg_operand" "r,xl"))] ! "" ! "@ ! mov.l %1,%0 ! sts.l %1,%0" ! [(set_attr "type" "store")]) ! ! (define_insn "" ! [(set (match_operand:SI 0 "arith_reg_operand" "=r,xl") ! (match_operand:SI 1 "pop_operand" "=>,>"))] ! "" ! "@ ! mov.l %1,%0 ! lds.l %1,%0" ! [(set_attr "type" "load")]) (define_insn "clrt" --- 1048,1074 ---- (define_insn "push" [(set (mem:SI (pre_dec:SI (reg:SI 15))) ! (match_operand:SI 0 "register_operand" "r,l,x"))] "" "@ mov.l %0,@-r15 ! sts.l %0,@-r15 ! sts.l %0,@-r15" ! [(set_attr "type" "store,pstore,store") (set_attr "hit_stack" "yes")]) (define_insn "pop" ! [(set (match_operand:SI 0 "register_operand" "=r,l,x") (mem:SI (post_inc:SI (reg:SI 15))))] "" "@ mov.l @r15+,%0 + lds.l @r15+,%0 lds.l @r15+,%0" ! [(set_attr "type" "load,pload,load") (set_attr "hit_stack" "yes")]) ! ;; These two patterns can happen as the result of optimization, when ! ;; comparisons get simplified to a move of zero or 1 into the T reg. ! ;; They don't disappear completely, because the T reg is a fixed hard reg. (define_insn "clrt" *************** *** 966,982 **** "clrt") ! ;(define_insn "movsi_pi" ! ; [(set (match_operand:SI 0 "general_movdst_operand" "=r") ! ; (mem:SI (post_inc (match_operand:SI 1 "register_operand" "r"))))] ! ; "" ! ; "mov.l @%1,%0\;add #4,%1" ! ; [(set_attr "length" "4")]) ! (define_insn "movsi_i" ! [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,r,m,xl,t,r,xl,r,>,r,i"))] ! "" "@ mov.l %1,%0 mov %1,%0 --- 1077,1094 ---- "clrt") ! (define_insn "sett" ! [(set (reg:SI 18) (const_int 1))] ! "" ! "sett") + ;; t/z is first, so that it will be preferred over r/r when reloading a move + ;; of a pseudo-reg into the T reg (define_insn "movsi_i" ! [(set (match_operand:SI 0 "general_movdst_operand" "=t,r,r,r,r,r,m,<,xl,xl,r") ! (match_operand:SI 1 "general_movsrc_operand" "z,Q,rI,m,xl,t,r,xl,r,>,i"))] ! "register_operand (operands[0], SImode) ! || register_operand (operands[1], SImode)" "@ + tst %1,%1\;rotcl %1\;xor #1,%1\;rotcr %1 mov.l %1,%0 mov %1,%0 *************** *** 988,1007 **** lds %1,%0 lds.l %1,%0 ! tst %1,%1\;bt T%*\;bra F%*\;sett\;T%*:clrt\;F%*:%^ ! fake %1,%0" ! [(set_attr "type" "pcloadsi,move,load,move,store,store,move,load,move,move,move")]) ! (define_expand "movsi" [(set (match_operand:SI 0 "general_movdst_operand" "") (match_operand:SI 1 "general_movsrc_operand" ""))] "" ! ! "{ if (prepare_move_operands(operands, SImode)) DONE; } ") - (define_insn "movqi_i" ! [(set (match_operand:QI 0 "general_movdst_operand" "=r,r,>m,r,r,l") ! (match_operand:QI 1 "general_movsrc_operand" "ri,m,t,r,i,l,r"))] ! "" "@ mov.w %1,%0 --- 1128,1138 ---- (match_operand:QI 1 "general_operand" ""))] "" ! "{ if (prepare_move_operands (operands, QImode)) DONE; }") (define_insn "movhi_i" ! [(set (match_operand:HI 0 "general_movdst_operand" "=r,r,r,r,m,r,l,r") ! (match_operand:HI 1 "general_movsrc_operand" "Q,rI,m,t,r,l,r,i"))] ! "arith_reg_operand (operands[0], HImode) ! || arith_reg_operand (operands[1], HImode)" "@ mov.w %1,%0 *************** *** 1031,1039 **** movt %0 mov.w %1,%0 - fake %1,%0 sts %1,%0 ! lds %1,%0" ! [(set_attr "length" "*,2,2,2,2,2,2,2") ! (set_attr "type" "pcloadhi,move,load,move,store,move,move,move")]) (define_expand "movhi" --- 1141,1148 ---- movt %0 mov.w %1,%0 sts %1,%0 ! lds %1,%0 ! fake %1,%0" ! [(set_attr "type" "pcload,move,load,move,store,move,move,move")]) (define_expand "movhi" *************** *** 1041,1076 **** (match_operand:HI 1 "general_movsrc_operand" ""))] "" ! "if (prepare_move_operands (operands, HImode)) DONE;") ! (define_insn "" ! [(set (match_operand:DI 0 "push_operand" "=<") ! (match_operand:DI 1 "arith_reg_operand" "r"))] ! "" ! "mov.l %R1,%0\;mov.l %1,%0" ! [(set_attr "length" "4") ! (set_attr "type" "store")]) (define_insn "" [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,m,r") (match_operand:DI 1 "general_movsrc_operand" "Q,r,m,r,i"))] ! "register_operand (operands[0], DImode) ! || register_operand (operands[1], DImode)" "* return output_movedouble (insn, operands, DImode);" ! [(set_attr "length" "*,4,4,4,4") ! (set_attr "type" "pcloadsi,move,load,store,move")]) ;; If the output is a register and the input is memory, we have to be careful ;; and see which word needs to be loaded first. ! ;; (define_split [(set (match_operand:DI 0 "general_movdst_operand" "") (match_operand:DI 1 "general_movsrc_operand" ""))] ! "! (GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[1]) == REG && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[0]) == REG && GET_CODE (operands[1]) == REG ! && ! reload_completed ! && reg_overlap_mentioned_p (operands[0], operands[1])) && ! EXTRA_CONSTRAINT_Q (operands[1])" [(set (match_dup 2) (match_dup 3)) --- 1150,1186 ---- (match_operand:HI 1 "general_movsrc_operand" ""))] "" ! "{ if (prepare_move_operands (operands, HImode)) DONE; }") ! ;; ??? This should be a define expand. (define_insn "" [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,m,r") (match_operand:DI 1 "general_movsrc_operand" "Q,r,m,r,i"))] ! "arith_reg_operand (operands[0], DImode) ! || arith_reg_operand (operands[1], DImode)" "* return output_movedouble (insn, operands, DImode);" ! [(set_attr "length" "4") ! (set_attr "type" "pcload,move,load,store,move")]) ;; If the output is a register and the input is memory, we have to be careful ;; and see which word needs to be loaded first. ! ! ;; ??? Why are Q constraint addresses rejected here but not in the DFmode ! ;; split pattern? ! (define_split [(set (match_operand:DI 0 "general_movdst_operand" "") (match_operand:DI 1 "general_movsrc_operand" ""))] ! "! (GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[1]) == REG && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[0]) == REG && GET_CODE (operands[1]) == REG ! && ! reload_completed ! && reg_overlap_mentioned_p (operands[0], operands[1])) ! && ! (GET_CODE (operands[0]) == MEM ! && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) ! && ! (GET_CODE (operands[1]) == MEM ! && GET_CODE (XEXP (operands[1], 0)) == POST_INC) && ! EXTRA_CONSTRAINT_Q (operands[1])" [(set (match_dup 2) (match_dup 3)) *************** *** 1099,1122 **** }") - (define_expand "movdi" [(set (match_operand:DI 0 "general_movdst_operand" "") (match_operand:DI 1 "general_movsrc_operand" ""))] "" ! "if ( prepare_move_operands(operands, DImode)) DONE; ") ! (define_insn "" ! [(set (match_operand:DF 0 "push_operand" "=<") ! (match_operand:DF 1 "arith_reg_operand" "r"))] ! "" ! "mov.l %R1,%0\;mov.l %1,%0" ! [(set_attr "length" "4") ! (set_attr "type" "store")]) (define_insn "movdf_k" [(set (match_operand:DF 0 "general_movdst_operand" "=r,r,m") (match_operand:DF 1 "general_movsrc_operand" "r,m,r"))] ! "register_operand (operands[0], DFmode) ! || register_operand (operands[1], DFmode)" "* return output_movedouble (insn, operands, DFmode);" [(set_attr "length" "4") --- 1209,1225 ---- }") (define_expand "movdi" [(set (match_operand:DI 0 "general_movdst_operand" "") (match_operand:DI 1 "general_movsrc_operand" ""))] "" ! "{ if ( prepare_move_operands (operands, DImode)) DONE; }") ! ;; ??? This should be a define expand. (define_insn "movdf_k" [(set (match_operand:DF 0 "general_movdst_operand" "=r,r,m") (match_operand:DF 1 "general_movsrc_operand" "r,m,r"))] ! "arith_reg_operand (operands[0], DFmode) ! || arith_reg_operand (operands[1], DFmode)" "* return output_movedouble (insn, operands, DFmode);" [(set_attr "length" "4") *************** *** 1125,1139 **** ;; If the output is a register and the input is memory, we have to be careful ;; and see which word needs to be loaded first. ! ;; (define_split [(set (match_operand:DF 0 "general_movdst_operand" "") (match_operand:DF 1 "general_movsrc_operand" ""))] ! "! (GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[1]) == REG && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[0]) == REG && GET_CODE (operands[1]) == REG ! && ! reload_completed ! && reg_overlap_mentioned_p (operands[0], operands[1]))" [(set (match_dup 2) (match_dup 3)) (set (match_dup 4) (match_dup 5))] --- 1228,1246 ---- ;; If the output is a register and the input is memory, we have to be careful ;; and see which word needs to be loaded first. ! (define_split [(set (match_operand:DF 0 "general_movdst_operand" "") (match_operand:DF 1 "general_movsrc_operand" ""))] ! "! (GET_CODE (operands[0]) == REG ! && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[1]) == REG && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) && ! (GET_CODE (operands[0]) == REG && GET_CODE (operands[1]) == REG ! && ! reload_completed ! && reg_overlap_mentioned_p (operands[0], operands[1])) ! && ! (GET_CODE (operands[0]) == MEM ! && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) ! && ! (GET_CODE (operands[1]) == MEM ! && GET_CODE (XEXP (operands[1], 0)) == POST_INC)" [(set (match_dup 2) (match_dup 3)) (set (match_dup 4) (match_dup 5))] *************** *** 1161,1185 **** }") - (define_expand "movdf" [(set (match_operand:DF 0 "general_movdst_operand" "") (match_operand:DF 1 "general_movsrc_operand" ""))] "" ! "{ if (prepare_move_operands(operands, DFmode)) DONE; } ") - (define_insn "" - [(set (match_operand:SF 0 "push_operand" "=<") - (match_operand:SF 1 "arith_reg_operand" "r"))] - "" - "mov.l %1,%0" - [(set_attr "type" "store")]) - (define_insn "movsf_i" ! [(set (match_operand:SF 0 "general_movdst_operand" "=>,r,r,r,r,m,l,r") ! (match_operand:SF 1 "general_movsrc_operand" "r,<,r,I,m,r,r,l"))] ! "" "@ - mov.l %1,@%N0\;add #4,%N0 !bad - add #-4,%1\;mov.l @%N1,%0 !bad mov %1,%0 mov %1,%0 --- 1268,1283 ---- }") (define_expand "movdf" [(set (match_operand:DF 0 "general_movdst_operand" "") (match_operand:DF 1 "general_movsrc_operand" ""))] "" ! "{ if (prepare_move_operands (operands, DFmode)) DONE; }") (define_insn "movsf_i" ! [(set (match_operand:SF 0 "general_movdst_operand" "=r,r,r,m,l,r") ! (match_operand:SF 1 "general_movsrc_operand" "r,I,m,r,r,l"))] ! "arith_reg_operand (operands[0], SFmode) ! || arith_reg_operand (operands[1], SFmode)" "@ mov %1,%0 mov %1,%0 *************** *** 1188,1193 **** lds %1,%0 sts %1,%0" ! [(set_attr "type" "store,load,move,move,load,store,move,move") ! (set_attr "length" "4,4,*,*,*,*,*,*")]) (define_expand "movsf" --- 1286,1290 ---- lds %1,%0 sts %1,%0" ! [(set_attr "type" "move,move,load,store,move,move")]) (define_expand "movsf" *************** *** 1195,1200 **** (match_operand:SF 1 "general_movsrc_operand" ""))] "" ! "if (prepare_move_operands (operands, SFmode)) DONE;") ! ;; ------------------------------------------------------------------------ --- 1292,1296 ---- (match_operand:SF 1 "general_movsrc_operand" ""))] "" ! "{ if (prepare_move_operands (operands, SFmode)) DONE; }") ;; ------------------------------------------------------------------------ *************** *** 1207,1211 **** (pc)))] "" ! "* return output_branch (1, insn);" [(set_attr "type" "cbranch")]) --- 1303,1307 ---- (pc)))] "" ! "* return output_branch (1, insn, operands);" [(set_attr "type" "cbranch")]) *************** *** 1215,1219 **** (pc)))] "" ! "* return output_branch (0, insn);" [(set_attr "type" "cbranch")]) --- 1311,1315 ---- (pc)))] "" ! "* return output_branch (0, insn, operands);" [(set_attr "type" "cbranch")]) *************** *** 1223,1227 **** (label_ref (match_operand 0 "" ""))))] "" ! "* return output_branch (0, insn);" [(set_attr "type" "cbranch")]) --- 1319,1323 ---- (label_ref (match_operand 0 "" ""))))] "" ! "* return output_branch (0, insn, operands);" [(set_attr "type" "cbranch")]) *************** *** 1231,1237 **** (label_ref (match_operand 0 "" ""))))] "" ! "* return output_branch (1, insn);" [(set_attr "type" "cbranch")]) - ;; Conditional branch insns --- 1327,1332 ---- (label_ref (match_operand 0 "" ""))))] "" ! "* return output_branch (1, insn, operands);" [(set_attr "type" "cbranch")]) ;; Conditional branch insns *************** *** 1240,1245 **** [(set (reg:SI 18) (eq:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (label_ref (match_operand 0 "" "")) (pc)))] --- 1335,1339 ---- [(set (reg:SI 18) (eq:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (label_ref (match_operand 0 "" "")) (pc)))] *************** *** 1252,1257 **** [(set (reg:SI 18) (eq:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] --- 1346,1350 ---- [(set (reg:SI 18) (eq:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] *************** *** 1262,1269 **** [(set (reg:SI 18) (gt:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (label_ref (match_operand 0 "" "")) ! (pc))) ] "" "from_compare (operands, GT);") --- 1355,1361 ---- [(set (reg:SI 18) (gt:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (label_ref (match_operand 0 "" "")) ! (pc)))] "" "from_compare (operands, GT);") *************** *** 1272,1276 **** [(set (reg:SI 18) (ge:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18)(const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] --- 1364,1368 ---- [(set (reg:SI 18) (ge:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] *************** *** 1281,1289 **** [(set (reg:SI 18) (gt:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (pc) ! (label_ref (match_operand 0 "" "")))) ! ] "" "from_compare (operands, LE);") --- 1373,1379 ---- [(set (reg:SI 18) (gt:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (pc) ! (label_ref (match_operand 0 "" ""))))] "" "from_compare (operands, LE);") *************** *** 1292,1299 **** [(set (reg:SI 18) (ge:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (label_ref (match_operand 0 "" "")) ! (pc))) ] "" "from_compare (operands, GE);") --- 1382,1388 ---- [(set (reg:SI 18) (ge:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (label_ref (match_operand 0 "" "")) ! (pc)))] "" "from_compare (operands, GE);") *************** *** 1302,1307 **** [(set (reg:SI 18) (gtu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (label_ref (match_operand 0 "" "")) (pc)))] --- 1391,1395 ---- [(set (reg:SI 18) (gtu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (label_ref (match_operand 0 "" "")) (pc)))] *************** *** 1312,1317 **** [(set (reg:SI 18) (geu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] --- 1400,1404 ---- [(set (reg:SI 18) (geu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] *************** *** 1322,1330 **** [(set (reg:SI 18) (geu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (label_ref (match_operand 0 "" "")) ! (pc))) ! ] "" "from_compare (operands, GEU);") --- 1409,1415 ---- [(set (reg:SI 18) (geu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (label_ref (match_operand 0 "" "")) ! (pc)))] "" "from_compare (operands, GEU);") *************** *** 1333,1343 **** [(set (reg:SI 18) (gtu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) ! (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] "" "from_compare (operands, LEU);") - ;; ------------------------------------------------------------------------ --- 1418,1426 ---- [(set (reg:SI 18) (gtu:SI (match_dup 1) (match_dup 2))) (set (pc) ! (if_then_else (eq (reg:SI 18) (const_int 1)) (pc) (label_ref (match_operand 0 "" ""))))] "" "from_compare (operands, LEU);") ;; ------------------------------------------------------------------------ *************** *** 1351,1377 **** "* { ! if (get_attr_length(insn) == 10) ! { ! return output_far_jump(insn, operands[0]); ! } else ! { ! return \"bra %l0%#\"; ! } }" [(set_attr "type" "jump") (set_attr "needs_delay_slot" "yes")]) - - (define_insn "bsr" - [(call (mem:SI (match_operand 0 "bsr_operand" "i")) - (match_operand 1 "" "")) - (clobber (reg:SI 17))] - "TARGET_BSR" - "bsr %O0%#" - [(set_attr "needs_delay_slot" "yes") - (set_attr "in_delay_slot" "no") - (set_attr "length" "4")]) - (define_insn "calli" [(call (mem:SI (match_operand:SI 0 "arith_reg_operand" "r")) --- 1434,1446 ---- "* { ! /* The length is 16 if the delay slot is unfilled. */ ! if (get_attr_length(insn) >= 14) ! return output_far_jump(insn, operands[0]); else ! return \"bra %l0%#\"; }" [(set_attr "type" "jump") (set_attr "needs_delay_slot" "yes")]) (define_insn "calli" [(call (mem:SI (match_operand:SI 0 "arith_reg_operand" "r")) *************** *** 1380,1397 **** "" "jsr @%0%#" ! [(set_attr "needs_delay_slot" "yes") ! (set_attr "in_delay_slot" "no") ! (set_attr "length" "4")]) ! ! (define_insn "bsr_value" ! [(set (match_operand 0 "" "=rf") ! (call (mem:SI (match_operand 1 "bsr_operand" "i")) ! (match_operand 2 "" ""))) ! (clobber (reg:SI 17))] ! "TARGET_BSR" ! "bsr %O1%#" ! [(set_attr "needs_delay_slot" "yes") ! (set_attr "in_delay_slot" "no") ! (set_attr "length" "4")]) (define_insn "call_valuei" --- 1449,1454 ---- "" "jsr @%0%#" ! [(set_attr "type" "call") ! (set_attr "needs_delay_slot" "yes")]) (define_insn "call_valuei" *************** *** 1402,1423 **** "" "jsr @%1%#" ! [(set_attr "needs_delay_slot" "yes") ! (set_attr "in_delay_slot" "no") ! (set_attr "length" "4")]) (define_expand "call" ! [(parallel[(call (match_operand 0 "arith_reg_operand" "o") ! (match_operand 1 "" "")) ! (clobber (reg:SI 17))])] "" ! "expand_acall(0, operands); DONE;") (define_expand "call_value" ! [(parallel[(set (match_operand 0 "" "=rf") ! (call (match_operand 1 "arith_reg_operand" "o") ! (match_operand 2 "" ""))) ! (clobber (reg:SI 17))])] "" ! "expand_acall(1, operands); DONE; ") (define_insn "indirect_jump" --- 1459,1479 ---- "" "jsr @%1%#" ! [(set_attr "type" "call") ! (set_attr "needs_delay_slot" "yes")]) (define_expand "call" ! [(parallel [(call (mem:SI (match_operand 0 "arith_reg_operand" "")) ! (match_operand 1 "" "")) ! (clobber (reg:SI 17))])] "" ! "operands[0] = force_reg (SImode, XEXP (operands[0], 0));") (define_expand "call_value" ! [(parallel [(set (match_operand 0 "arith_reg_operand" "") ! (call (mem:SI (match_operand 1 "arith_reg_operand" "")) ! (match_operand 2 "" ""))) ! (clobber (reg:SI 17))])] "" ! "operands[1] = force_reg (SImode, XEXP (operands[1], 0));") (define_insn "indirect_jump" *************** *** 1426,1433 **** "" "jmp @%0%#" ! [(set_attr "needs_delay_slot" "yes") ! (set_attr "in_delay_slot" "no") ! (set_attr "length" "4")]) ! ;; ------------------------------------------------------------------------ --- 1482,1486 ---- "" "jmp @%0%#" ! [(set_attr "needs_delay_slot" "yes")]) ;; ------------------------------------------------------------------------ *************** *** 1435,1447 **** ;; ------------------------------------------------------------------------ (define_insn "dect" ! [(parallel[ ! (set (reg:SI 18) ! (eq:SI (match_operand:SI 0 "register_operand" "=r") ! (const_int 1))) ! ! (set (match_dup 0) ! (plus:SI (match_dup 0) ! (const_int -1)))])] "TARGET_SH2" "dt %0") --- 1488,1502 ---- ;; ------------------------------------------------------------------------ + ;; ??? This combiner pattern does not work, because combine does not combine + ;; instructions that set a hard register when SMALL_REGISTER_CLASSES is + ;; defined. Perhaps use a pseudo-reg for the T bit? + (define_insn "dect" ! [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (plus:SI (match_dup 0) ! (const_int -1))) ! (set (reg:SI 18) ! (eq:SI (plus:SI (match_dup 0) (const_int -1)) ! (const_int 0)))])] "TARGET_SH2" "dt %0") *************** *** 1450,1470 **** [(const_int 0)] "" ! "or r0,r0") ! ! ; experimental use of auto inc and dec made these... ! ; can be deleted ! ! (define_insn "fake" ! [(set (match_operand:QI 0 "register_operand" "=r") ! (mem:QI (pre_dec:SI (match_operand:SI 1 "register_operand" "r"))))] ! "" ! "add #-1,%1\;mov.b @%1,%0 !bad" ! [(set_attr "length" "4")]) ;; Load address of a label. This is only generated by the casesi expand. (define_insn "mova" ! [(set (reg:SI 0) ! (label_ref (match_operand 0 "" "")))] "" "mova %O0,r0" --- 1505,1516 ---- [(const_int 0)] "" ! "nop") ;; Load address of a label. This is only generated by the casesi expand. + ;; This must use unspec, because this only works immediately before a casesi. (define_insn "mova" ! [(set (reg:SI 0) ! (unspec [(label_ref (match_operand 0 "" ""))] 1))] "" "mova %O0,r0" *************** *** 1479,1482 **** --- 1525,1530 ---- ;; operand 4 is the CODE_LABEL to go to if index out of range. + ;; ??? There should be a barrier after the jump at the end. + (define_expand "casesi" [(set (match_dup 5) (match_operand:SI 0 "arith_reg_operand" "")) *************** *** 1485,1489 **** (set (reg:SI 18) (gtu:SI (match_dup 5) ! (match_operand:SI 2 "arith_operand" ""))) (set (pc) (if_then_else (eq (reg:SI 18) --- 1533,1537 ---- (set (reg:SI 18) (gtu:SI (match_dup 5) ! (match_operand:SI 2 "arith_reg_operand" ""))) (set (pc) (if_then_else (eq (reg:SI 18) *************** *** 1492,1502 **** (pc))) (set (match_dup 6) (match_dup 5)) ! (parallel[(set (match_dup 6) (ashift:SI (match_dup 6) (match_dup 7))) ! (clobber (reg:SI 18))]) ! (set (reg:SI 0) (label_ref (match_operand 3 "" ""))) ! (parallel[(set (reg:SI 0) (plus:SI (reg:SI 0) ! (mem:HI (plus:SI (reg:SI 0) ! (match_dup 6))))) ! (set (match_dup 6) (mem:HI (plus:SI (reg:SI 0) (match_dup 6))))]) (set (pc) (reg:SI 0))] "" --- 1540,1549 ---- (pc))) (set (match_dup 6) (match_dup 5)) ! (set (match_dup 6) (ashift:SI (match_dup 6) (match_dup 7))) ! (set (reg:SI 0) (unspec [(label_ref (match_operand 3 "" ""))] 1)) ! (parallel [(set (reg:SI 0) (plus:SI (reg:SI 0) ! (mem:HI (plus:SI (reg:SI 0) ! (match_dup 6))))) ! (set (match_dup 6) (mem:HI (plus:SI (reg:SI 0) (match_dup 6))))]) (set (pc) (reg:SI 0))] "" *************** *** 1511,1530 **** (define_insn "casesi_worker" ! [(set (reg:SI 0) ! (plus:SI (reg:SI 0) (mem:HI (plus:SI (reg:SI 0) ! (match_operand:SI 0 "register_operand" "=r"))))) (set (match_dup 0) (mem:HI (plus:SI (reg:SI 0) (match_dup 0))))] "" "* ! if (TARGET_BIGTABLE) ! return \"mov.l @(r0,%0),%0\;add %0,r0\"; ! else ! return \"mov.w @(r0,%0),%0\;add %0,r0\";" ! [(set_attr "needs_delay_slot" "no") ! (set_attr "in_delay_slot" "no") ! (set_attr "length" "4")]) ! (define_insn "return" --- 1558,1576 ---- (define_insn "casesi_worker" ! [(set (reg:SI 0) ! (plus:SI (reg:SI 0) (mem:HI (plus:SI (reg:SI 0) ! (match_operand:SI 0 "arith_reg_operand" "=r"))))) (set (match_dup 0) (mem:HI (plus:SI (reg:SI 0) (match_dup 0))))] "" "* ! { ! if (TARGET_BIGTABLE) ! return \"mov.l @(r0,%0),%0\;add %0,r0\"; ! else ! return \"mov.w @(r0,%0),%0\;add %0,r0\"; ! }" ! [(set_attr "length" "4")]) (define_insn "return" *************** *** 1532,1536 **** "reload_completed" "%@ %#" ! [(set_attr "type" "return")]) (define_expand "prologue" --- 1578,1583 ---- "reload_completed" "%@ %#" ! [(set_attr "type" "return") ! (set_attr "needs_delay_slot" "yes")]) (define_expand "prologue" *************** *** 1549,1553 **** "" [(set_attr "length" "0")]) - ;; ------------------------------------------------------------------------ --- 1596,1599 ---- *************** *** 1559,1563 **** (eq:SI (reg:SI 18) (const_int 1)))] "" ! "movt %0 ! ") (define_expand "seq" --- 1605,1609 ---- (eq:SI (reg:SI 18) (const_int 1)))] "" ! "movt %0") (define_expand "seq" *************** *** 1623,1739 **** ;; ------------------------------------------------------------------------- - ;; Peepholes - ;; ------------------------------------------------------------------------- - - - (define_peephole - [(set (match_operand:QI 0 "arith_reg_operand" "") - (mem:QI (match_operand:SI 1 "arith_reg_operand" ""))) - (set (match_dup 1) (plus:SI (match_dup 1) (const_int 1)))] - "REGNO (operands[1]) != REGNO (operands[0])" - "mov.b @%1+,%0") - - (define_peephole - [(set (match_operand:HI 0 "arith_reg_operand" "") - (mem:HI (match_operand:SI 1 "arith_reg_operand" ""))) - (set (match_dup 1) (plus:SI (match_dup 1) (const_int 2)))] - "REGNO (operands[1]) != REGNO (operands[0])" - "mov.w @%1+,%0") - - (define_peephole - [(set (match_operand:SI 0 "arith_reg_operand" "") - (mem:SI (match_operand:SI 1 "arith_reg_operand" ""))) - (set (match_dup 1) (plus:SI (match_dup 1) (const_int 4)))] - "REGNO (operands[1]) != REGNO (operands[0])" - "mov.l @%1+,%0") - - (define_peephole - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "memory_operand" "g")) - (set (match_operand:SI 2 "register_operand" "=r") - (sign_extend:SI (match_dup 0)))] - "REGNO (operands[0]) == REGNO (operands[2])" - "mov.b %1,%0 !p 5") - - (define_peephole - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "general_movsrc_operand" "g")) - (set (match_operand:SI 2 "register_operand" "=r") - (sign_extend:SI (match_dup 0)))] - "REGNO (operands[0]) != REGNO (operands[2]) - && 0 && dead_or_set_p (insn, operands[0])" - "mov.b %1,%2 ! p4") - - - ;; ------------------------------------------------------------------------- - ;; Peepholes - ;; ------------------------------------------------------------------------- - - (define_peephole - [(set (reg:SI 0) (label_ref (match_operand 0 "" ""))) - (set (match_operand:SI 1 "register_operand" "=r") - (reg:SI 0)) - (set (reg:SI 0) (label_ref (match_dup 0))) - (set (match_operand:SI 2 "register_operand" "=r") - (reg:SI 0))] - "" - "mova %O0,r0\;mov r0,%1\;mov r0,%2" - [(set_attr "length" "6") - (set_attr "in_delay_slot" "no")]) - - - ;; ------------------------------------------------------------------------- - ;; Combine patterns - ;; ------------------------------------------------------------------------- - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (match_operand:HI 1 "register_operand" "%0") - (match_operand:SI 2 "register_operand" "r")))] - "" - "add %2,%0 ! why") - - (define_insn "addc_2" - [(set (match_operand:SI 0 "arith_reg_operand" "=&r") - (plus:SI (reg:SI 18) - (match_operand:SI 1 "arith_reg_operand" "r"))) - (clobber (reg:SI 18))] - "" - "mov #0,%0\;addc %1,%0 ! addc1" - [(set_attr "length" "4")]) - - (define_insn "combine_1" - [(set (match_operand:SI 0 "arith_reg_operand" "=r") - (sign_extend:SI (mem:QI (match_operand:SI 1 "arith_reg_operand" "r"))))] - "" - "mov.b @%1,%0 ! why" - [(set_attr "type" "load")]) - - (define_insn "combine_2" - [(set (reg:SI 18) - (eq:SI (and:SI (match_operand:SI 0 "arith_reg_operand" "z,r") - (match_operand:SI 1 "arith_operand" "L,r")) - (const_int 0)))] - "" - "tst %1,%0 !t2c") - - (define_split - [(set (pc) - (if_then_else - (match_operator 2 "equality_operator" [(match_operand:SI 0 "arith_reg_operand" "r") - (const_int 0)]) - (label_ref (match_operand 1 "" "")) - (pc))) - (clobber (reg:SI 18))] - "" - [(set (reg:SI 18) (eq:SI (and:SI (match_dup 0) (match_dup 0)) - (const_int 0))) - (set (pc) - (if_then_else (match_op_dup 2 [(reg:SI 18) (const_int 1)]) - (label_ref (match_dup 1)) - (pc)))] - "") - - ;; ------------------------------------------------------------------------- ;; Instructions to cope with inline literal tables ;; ------------------------------------------------------------------------- --- 1669,1672 ---- *************** *** 1804,1864 **** [(set_attr "in_delay_slot" "no")]) - - ;(define_split - ; [(set (subreg:SI (match_operand:QI 0 "register_operand" "=r") 0) - ; (plus:SI (subreg:SI (match_operand:QI 1 "general_operand" "g") 0) - ; (subreg:SI (match_operand:QI 2 "general_operand" "g") 0)))] - ; "" - ; [(set (match_dup 3) (plus:SI (match_dup 1) (match_dup 2))) - ; (set (match_dup 1) (subreg:SI (match_dup 3) 0))] - ; "operands[3] = gen_reg_rtx(SImode);") - - - ; byte arithmetic involving constants which need to be sign extended can be - ; fixed up... - - - (define_split - [(set (subreg:SI (match_operand:QI 0 "register_operand" "=r") 0) - (plus:SI (subreg:SI (match_operand:QI 1 "register_operand" "0") 0) - (subreg:SI (match_operand 2 "immediate_operand" "n") 0)))] - "" - [(set (match_dup 4) (plus:SI (match_dup 2) (match_dup 3))) - (set (match_dup 0) (and:SI (match_dup 0) (const_int 255)))] - "{ int i = INTVAL(operands[2]) & 0xff; - if (i > 127) i = i - 256; - operands[3] = GEN_INT(i); - operands[4] = gen_reg_rtx(SImode);} ") - - - ;; these instructions don't really exist - they are needed - ;; before machine_dependent_reorg - - (define_insn "movsi_k" - [(set (match_operand:SI 0 "register_operand" "=r") - (match_operand:SI 1 "immediate_operand" ""))] - "" - "! this is a fake") - - - (define_insn "movhi_k" - [(set (match_operand:HI 0 "register_operand" "=r") - (match_operand:HI 1 "immediate_operand" ""))] - "" - "! this is a fake") - - (define_insn "movdi_k" - [(set (match_operand:DI 0 "register_operand" "=r") - (match_operand:DI 1 "immediate_operand" ""))] - "" - "! this is a fake") - ;; ------------------------------------------------------------------------- ;; Misc ;; ------------------------------------------------------------------------- - ;; String/block move insn. - (define_expand "movstrsi" [(parallel [(set (mem:BLK (match_operand:BLK 0 "" "")) --- 1737,1746 ---- [(set_attr "in_delay_slot" "no")]) ;; ------------------------------------------------------------------------- ;; Misc ;; ------------------------------------------------------------------------- + ;; String/block move insn. (define_expand "movstrsi" [(parallel [(set (mem:BLK (match_operand:BLK 0 "" "")) *************** *** 1883,1893 **** (use (match_operand:SI 0 "arith_reg_operand" "r")) (clobber (reg:SI 17)) - (clobber (reg:SI 4)) - (clobber (reg:SI 5)) (clobber (reg:SI 0))])] "" "jsr @%0%#" ! [(set_attr "length" "4") ! (set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) --- 1765,1772 ---- (use (match_operand:SI 0 "arith_reg_operand" "r")) (clobber (reg:SI 17)) (clobber (reg:SI 0))])] "" "jsr @%0%#" ! [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) *************** *** 1904,1920 **** "" "jsr @%0%#" ! [(set_attr "length" "4") ! (set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) ! (define_insn "mac" ! [(set (reg:SI 21) ! (mult:SI (sign_extend:SI (mem:HI (post_inc:SI ! (match_operand:SI 0 "arith_reg_operand" "r")))) ! (sign_extend:SI (mem:HI (post_inc:SI ! (match_operand:SI 1 "arith_reg_operand" "r"))))))] ! "" ! "mac.w @%0+,@%1+") ! --- 1783,1812 ---- "" "jsr @%0%#" ! [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) ! ;; ------------------------------------------------------------------------- ! ;; Peepholes ! ;; ------------------------------------------------------------------------- ! ! ;; This matches cases where a stack pointer increment at the start of the ! ;; epilogue combines with a stack slot read loading the return value. + (define_peephole + [(set (match_operand:SI 0 "arith_reg_operand" "") + (mem:SI (match_operand:SI 1 "arith_reg_operand" ""))) + (set (match_dup 1) (plus:SI (match_dup 1) (const_int 4)))] + "REGNO (operands[1]) != REGNO (operands[0])" + "mov.l @%1+,%0") ! ;; See the comment on the dt combiner pattern above. ! ! (define_peephole ! [(set (match_operand:SI 0 "arith_reg_operand" "=r") ! (plus:SI (match_dup 0) ! (const_int -1))) ! (set (reg:SI 18) ! (eq:SI (match_dup 0) ! (const_int 0)))] ! "TARGET_SH2" ! "dt %0") diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sh/t-sh gcc-2.7.0/config/sh/t-sh *** gcc-2.6.3/config/sh/t-sh Fri Sep 9 19:33:44 1994 --- gcc-2.7.0/config/sh/t-sh Thu Apr 27 21:02:52 1995 *************** *** 1,32 **** CROSS_LIBGCC1 = libgcc1-asm.a LIB1ASMSRC = sh/lib1funcs.asm ! LIB1ASMFUNCS = _ashiftrt _movstr _mulsi3 _sdivsi3 _udivsi3 - LIBGCC2_CFLAGS=-g -O5 $(GCC_CFLAGS) - - # CYGNUS LOCAL sh - LANGUAGES=c c++ proto - - # CYGNUS LOCAL sh # These are really part of libgcc1, but this will cause them to be ! # built correctly, so... [taken from t-ose68k] ! ! LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c ashlsi3.c ashrsi3.c lshrsi3.c ! ! ashlsi3.c: $(srcdir)/config/sh/ashlsi3.c ! cp $(srcdir)/config/sh/ashlsi3.c ashlsi3.c ! ! ashrsi3.c: $(srcdir)/config/sh/ashrsi3.c ! cp $(srcdir)/config/sh/ashrsi3.c ashrsi3.c ! lshrsi3.c: $(srcdir)/config/sh/lshrsi3.c ! cp $(srcdir)/config/sh/lshrsi3.c lshrsi3.c dp-bit.c: $(srcdir)/config/fp-bit.c ! cat $(srcdir)/config/fp-bit.c > dp-bit.c fp-bit.c: $(srcdir)/config/fp-bit.c echo '#define FLOAT' > fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c --- 1,28 ---- CROSS_LIBGCC1 = libgcc1-asm.a LIB1ASMSRC = sh/lib1funcs.asm ! LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \ ! _mulsi3 _sdivsi3 _udivsi3 # These are really part of libgcc1, but this will cause them to be ! # built correctly, so... ! LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c dp-bit.c: $(srcdir)/config/fp-bit.c ! echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c ! echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c ! echo '#endif' >> dp-bit.c ! cat $(srcdir)/config/fp-bit.c >> dp-bit.c fp-bit.c: $(srcdir)/config/fp-bit.c echo '#define FLOAT' > fp-bit.c + echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c + echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c + MULTILIB_OPTIONS=ml + MULTILIB_DIRNAMES=ml + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sh/xm-sh.h gcc-2.7.0/config/sh/xm-sh.h *** gcc-2.6.3/config/sh/xm-sh.h Sun Nov 14 12:44:02 1993 --- gcc-2.7.0/config/sh/xm-sh.h Thu Jun 15 16:31:40 1995 *************** *** 15,19 **** 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. */ /* #defines that need visibility everywhere. */ --- 15,20 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ *************** *** 42,44 **** #define SUCCESS_EXIT_CODE 0 #define FATAL_EXIT_CODE 33 - --- 43,44 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/lb1spc.asm gcc-2.7.0/config/sparc/lb1spc.asm *** gcc-2.6.3/config/sparc/lb1spc.asm --- gcc-2.7.0/config/sparc/lb1spc.asm Thu Nov 17 14:57:49 1994 *************** *** 0 **** --- 1,486 ---- + /* This is an assembly language implementation of libgcc1.c for the sparc + processor. + + These routines are derived from the Sparc Architecture Manual, version 8, + slightly edited to match the desired calling convention, and also to + optimize them for our purposes. */ + + #ifdef L_mulsi3 + .text + .align 4 + .global .umul + .proc 4 + .umul: + or %o0, %o1, %o4 ! logical or of multiplier and multiplicand + mov %o0, %y ! multiplier to Y register + andncc %o4, 0xfff, %o5 ! mask out lower 12 bits + be mul_shortway ! can do it the short way + andcc %g0, %g0, %o4 ! zero the partial product and clear NV cc + ! + ! long multiply + ! + mulscc %o4, %o1, %o4 ! first iteration of 33 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 ! 32nd iteration + mulscc %o4, %g0, %o4 ! last iteration only shifts + ! the upper 32 bits of product are wrong, but we do not care + retl + rd %y, %o0 + ! + ! short multiply + ! + mul_shortway: + mulscc %o4, %o1, %o4 ! first iteration of 13 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 + mulscc %o4, %o1, %o4 ! 12th iteration + mulscc %o4, %g0, %o4 ! last iteration only shifts + rd %y, %o5 + sll %o4, 12, %o4 ! left shift partial product by 12 bits + srl %o5, 20, %o5 ! right shift partial product by 20 bits + retl + or %o5, %o4, %o0 ! merge for true product + #endif + + #ifdef L_divsi3 + .text + .align 4 + .global .udiv + .proc 4 + .udiv: + save %sp, -64, %sp + b divide + mov 0, %i2 ! result always positive + .global .div + .proc 4 + .div: + save %sp, -64, %sp + orcc %i1, %i0, %g0 ! is either operand negative + bge divide ! if not, skip this junk + xor %i1, %i0, %i2 ! record sign of result in sign of %i2 + tst %i1 + bge 2f + tst %i0 + ! %i1 < 0 + bge divide + neg %i1 + 2: ! %i0 < 0 + neg %i0 + ! FALL THROUGH + divide: + ! Compute size of quotient, scale comparand. + orcc %i1, %g0, %l1 ! movcc %i1, %l1 + te 2 ! if %i1 = 0 + mov %i0, %i3 + mov 0, %i2 + sethi %hi(1<<(32-2-1)), %l3 + cmp %i3, %l3 + blu not_really_big + mov 0, %l0 + ! + ! Here, the %i0 is >= 2^(31-3) or so. We must be careful here, + ! as our usual 3-at-a-shot divide step will cause overflow and havoc. + ! The total number of bits in the result here is 3*%l0+%l4, where + ! %l4 <= 3. + ! Compute %l0 in an unorthodox manner: know we need to Shift %l1 into + ! the top decade: so do not even bother to compare to %i3. + 1: cmp %l1, %l3 + bgeu 3f + mov 1, %l4 + sll %l1, 3, %l1 + b 1b + inc %l0 + ! + ! Now compute %l4 + ! + 2: addcc %l1, %l1, %l1 + bcc not_too_big + add %l4, 1, %l4 + ! + ! We are here if the %i1 overflowed when Shifting. + ! This means that %i3 has the high-order bit set. + ! Restore %l1 and subtract from %i3. + sll %l3, 2, %l3 + srl %l1, 1, %l1 + add %l1, %l3, %l1 + b do_single_div + dec %l4 + not_too_big: + 3: cmp %l1, %i3 + blu 2b + nop + be do_single_div + nop + ! %l1 > %i3: went too far: back up 1 step + ! srl %l1, 1, %l1 + ! dec %l4 + ! do single-bit divide steps + ! + ! We have to be careful here. We know that %i3 >= %l1, so we can do the + ! first divide step without thinking. BUT, the others are conditional, + ! and are only done if %i3 >= 0. Because both %i3 and %l1 may have the + ! high-order bit set in the first step, just falling into the regular + ! division loop will mess up the first time around. + ! So we unroll slightly... + do_single_div: + deccc %l4 + bl end_regular_divide + nop + sub %i3, %l1, %i3 + mov 1, %i2 + b end_single_divloop + nop + single_divloop: + sll %i2, 1, %i2 + bl 1f + srl %l1, 1, %l1 + ! %i3 >= 0 + sub %i3, %l1, %i3 + b 2f + inc %i2 + 1: ! %i3 < 0 + add %i3, %l1, %i3 + dec %i2 + end_single_divloop: + 2: deccc %l4 + bge single_divloop + tst %i3 + b end_regular_divide + nop + not_really_big: + 1: sll %l1, 3, %l1 + cmp %l1, %i3 + bleu 1b + inccc %l0 + be got_result + dec %l0 + do_regular_divide: + ! Do the main division iteration + tst %i3 + ! Fall through into divide loop + divloop: + sll %i2, 3, %i2 + ! depth 1, accumulated bits 0 + bl L.1.8 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + ! depth 2, accumulated bits 1 + bl L.2.9 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + ! depth 3, accumulated bits 3 + bl L.3.11 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (3*2+1), %i2 + L.3.11: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (3*2-1), %i2 + L.2.9: ! remainder is negative + addcc %i3,%l1,%i3 + ! depth 3, accumulated bits 1 + bl L.3.9 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (1*2+1), %i2 + L.3.9: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (1*2-1), %i2 + L.1.8: ! remainder is negative + addcc %i3,%l1,%i3 + ! depth 2, accumulated bits -1 + bl L.2.7 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + ! depth 3, accumulated bits -1 + bl L.3.7 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (-1*2+1), %i2 + L.3.7: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (-1*2-1), %i2 + L.2.7: ! remainder is negative + addcc %i3,%l1,%i3 + ! depth 3, accumulated bits -3 + bl L.3.5 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (-3*2+1), %i2 + L.3.5: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (-3*2-1), %i2 + end_regular_divide: + 9: deccc %l0 + bge divloop + tst %i3 + bge got_result + nop + ! non-restoring fixup here + dec %i2 + got_result: + tst %i2 + bge 1f + restore + ! answer < 0 + retl ! leaf-routine return + neg %o2, %o0 ! quotient <- -%i2 + 1: retl ! leaf-routine return + mov %o2, %o0 ! quotient <- %i2 + #endif + + #ifdef L_modsi3 + .text + .align 4 + .global .urem + .proc 4 + .urem: + save %sp, -64, %sp + b divide + mov 0, %i2 ! result always positive + .global .rem + .proc 4 + .rem: + save %sp, -64, %sp + orcc %i1, %i0, %g0 ! is either operand negative + bge divide ! if not, skip this junk + mov %i0, %i2 ! record sign of result in sign of %i2 + tst %i1 + bge 2f + tst %i0 + ! %i1 < 0 + bge divide + neg %i1 + 2: ! %i0 < 0 + neg %i0 + ! FALL THROUGH + divide: + ! Compute size of quotient, scale comparand. + orcc %i1, %g0, %l1 ! movcc %i1, %l1 + te 2 ! if %i1 = 0 + mov %i0, %i3 + mov 0, %i2 + sethi %hi(1<<(32-2-1)), %l3 + cmp %i3, %l3 + blu not_really_big + mov 0, %l0 + ! + ! Here, the %i0 is >= 2^(31-3) or so. We must be careful here, + ! as our usual 3-at-a-shot divide step will cause overflow and havoc. + ! The total number of bits in the result here is 3*%l0+%l4, where + ! %l4 <= 3. + ! Compute %l0 in an unorthodox manner: know we need to Shift %l1 into + ! the top decade: so do not even bother to compare to %i3. + 1: cmp %l1, %l3 + bgeu 3f + mov 1, %l4 + sll %l1, 3, %l1 + b 1b + inc %l0 + ! + ! Now compute %l4 + ! + 2: addcc %l1, %l1, %l1 + bcc not_too_big + add %l4, 1, %l4 + ! + ! We are here if the %i1 overflowed when Shifting. + ! This means that %i3 has the high-order bit set. + ! Restore %l1 and subtract from %i3. + sll %l3, 2, %l3 + srl %l1, 1, %l1 + add %l1, %l3, %l1 + b do_single_div + dec %l4 + not_too_big: + 3: cmp %l1, %i3 + blu 2b + nop + be do_single_div + nop + ! %l1 > %i3: went too far: back up 1 step + ! srl %l1, 1, %l1 + ! dec %l4 + ! do single-bit divide steps + ! + ! We have to be careful here. We know that %i3 >= %l1, so we can do the + ! first divide step without thinking. BUT, the others are conditional, + ! and are only done if %i3 >= 0. Because both %i3 and %l1 may have the + ! high-order bit set in the first step, just falling into the regular + ! division loop will mess up the first time around. + ! So we unroll slightly... + do_single_div: + deccc %l4 + bl end_regular_divide + nop + sub %i3, %l1, %i3 + mov 1, %i2 + b end_single_divloop + nop + single_divloop: + sll %i2, 1, %i2 + bl 1f + srl %l1, 1, %l1 + ! %i3 >= 0 + sub %i3, %l1, %i3 + b 2f + inc %i2 + 1: ! %i3 < 0 + add %i3, %l1, %i3 + dec %i2 + end_single_divloop: + 2: deccc %l4 + bge single_divloop + tst %i3 + b end_regular_divide + nop + not_really_big: + 1: sll %l1, 3, %l1 + cmp %l1, %i3 + bleu 1b + inccc %l0 + be got_result + dec %l0 + do_regular_divide: + ! Do the main division iteration + tst %i3 + ! Fall through into divide loop + divloop: + sll %i2, 3, %i2 + ! depth 1, accumulated bits 0 + bl L.1.8 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + ! depth 2, accumulated bits 1 + bl L.2.9 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + ! depth 3, accumulated bits 3 + bl L.3.11 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (3*2+1), %i2 + L.3.11: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (3*2-1), %i2 + L.2.9: ! remainder is negative + addcc %i3,%l1,%i3 + ! depth 3, accumulated bits 1 + bl L.3.9 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (1*2+1), %i2 + L.3.9: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (1*2-1), %i2 + L.1.8: ! remainder is negative + addcc %i3,%l1,%i3 + ! depth 2, accumulated bits -1 + bl L.2.7 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + ! depth 3, accumulated bits -1 + bl L.3.7 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (-1*2+1), %i2 + L.3.7: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (-1*2-1), %i2 + L.2.7: ! remainder is negative + addcc %i3,%l1,%i3 + ! depth 3, accumulated bits -3 + bl L.3.5 + srl %l1,1,%l1 + ! remainder is positive + subcc %i3,%l1,%i3 + b 9f + add %i2, (-3*2+1), %i2 + L.3.5: ! remainder is negative + addcc %i3,%l1,%i3 + b 9f + add %i2, (-3*2-1), %i2 + end_regular_divide: + 9: deccc %l0 + bge divloop + tst %i3 + bge got_result + nop + ! non-restoring fixup here + add %i3, %i1, %i3 + got_result: + tst %i2 + bge 1f + restore + ! answer < 0 + retl ! leaf-routine return + neg %o3, %o0 ! remainder <- -%i3 + 1: retl ! leaf-routine return + mov %o3, %o0 ! remainder <- %i3 + #endif + + diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/lb1spl.asm gcc-2.7.0/config/sparc/lb1spl.asm *** gcc-2.6.3/config/sparc/lb1spl.asm --- gcc-2.7.0/config/sparc/lb1spl.asm Thu Nov 17 14:57:50 1994 *************** *** 0 **** --- 1,246 ---- + /* This is an assembly language implementation of libgcc1.c for the sparclite + processor. + + These routines are all from the Sparclite User's Guide, slightly edited + to match the desired calling convention, and also to optimize them. */ + + #ifdef L_udivsi3 + .text + .align 4 + .global .udiv + .proc 04 + .udiv: + wr %g0,%g0,%y ! Not a delayed write for sparclite + tst %g0 + divscc %o0,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + retl + divscc %g1,%o1,%o0 + #endif + + #ifdef L_umodsi3 + .text + .align 4 + .global .urem + .proc 04 + .urem: + wr %g0,%g0,%y ! Not a delayed write for sparclite + tst %g0 + divscc %o0,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + divscc %g1,%o1,%g1 + bl 1f + rd %y,%o0 + retl + nop + 1: retl + add %o0,%o1,%o0 + #endif + + #ifdef L_divsi3 + .text + .align 4 + .global .div + .proc 04 + ! ??? This routine could be made faster if was optimized, and if it was + ! rewritten to only calculate the quotient. + .div: + wr %g0,%g0,%y ! Not a delayed write for sparclite + mov %o1,%o4 + tst %o1 + bl,a 1f + sub %g0,%o4,%o4 + 1: tst %o0 + bl,a 2f + mov -1,%y + 2: divscc %o0,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + be 6f + mov %y,%o3 + bg 4f + addcc %o3,%o4,%g0 + be,a 6f + mov %g0,%o3 + tst %o0 + bl 5f + tst %g1 + ba 5f + add %o3,%o4,%o3 + 4: subcc %o3,%o4,%g0 + be,a 6f + mov %g0,%o3 + tst %o0 + bge 5f + tst %g1 + sub %o3,%o4,%o3 + 5: bl,a 6f + add %g1,1,%g1 + 6: tst %o1 + bl,a 7f + sub %g0,%g1,%g1 + 7: retl + mov %g1,%o0 ! Quotient is in %g1. + #endif + + #ifdef L_modsi3 + .text + .align 4 + .global .rem + .proc 04 + ! ??? This routine could be made faster if was optimized, and if it was + ! rewritten to only calculate the remainder. + .rem: + wr %g0,%g0,%y ! Not a delayed write for sparclite + mov %o1,%o4 + tst %o1 + bl,a 1f + sub %g0,%o4,%o4 + 1: tst %o0 + bl,a 2f + mov -1,%y + 2: divscc %o0,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + divscc %g1,%o4,%g1 + be 6f + mov %y,%o3 + bg 4f + addcc %o3,%o4,%g0 + be,a 6f + mov %g0,%o3 + tst %o0 + bl 5f + tst %g1 + ba 5f + add %o3,%o4,%o3 + 4: subcc %o3,%o4,%g0 + be,a 6f + mov %g0,%o3 + tst %o0 + bge 5f + tst %g1 + sub %o3,%o4,%o3 + 5: bl,a 6f + add %g1,1,%g1 + 6: tst %o1 + bl,a 7f + sub %g0,%g1,%g1 + 7: retl + mov %o3,%o0 ! Remainder is in %o3. + #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/lite.h gcc-2.7.0/config/sparc/lite.h *** gcc-2.6.3/config/sparc/lite.h Fri Sep 9 15:32:43 1994 --- gcc-2.7.0/config/sparc/lite.h Thu Jun 15 16:31:59 1995 *************** *** 17,21 **** 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 "sparc/sparc.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "sparc/sparc.h" *************** *** 31,32 **** --- 32,38 ---- #undef TARGET_DEFAULT #define TARGET_DEFAULT (1024+130) + + /* US Software GOFAST library support. */ + #include "gofast.h" + #undef INIT_SUBTARGET_OPTABS + #define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/litecoff.h gcc-2.7.0/config/sparc/litecoff.h *** gcc-2.6.3/config/sparc/litecoff.h --- gcc-2.7.0/config/sparc/litecoff.h Thu Jun 15 16:32:09 1995 *************** *** 0 **** --- 1,149 ---- + /* Definitions of target machine for GNU compiler, for SPARClite w/o FPU, COFF. + Copyright (C) 1994 Free Software Foundation, Inc. + Written by Ken Raeburn (raeburn@cygnus.com). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "sparc/lite.h" + + #undef ASM_OUTPUT_IDENT + + #undef SELECT_SECTION + #undef SELECT_RTX_SECTION + #define BSS_SECTION_ASM_OP ".section\t\".bss\"" + + #include "svr3.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu(sparc) -Amachine(sparc)" + + /* just in case */ + #undef DBX_DEBUGGING_INFO + #undef PREFERRED_DEBUGGING_TYPE + #define DBX_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + /* These are all necessary because this is how gdb expects gcc to output + stabs in coff. */ + + /* Be function-relative for block and source line stab directives. */ + + #define DBX_BLOCKS_FUNCTION_RELATIVE 1 + + /* but, to make this work, functions must appear prior to line info. */ + + #define DBX_FUNCTION_FIRST + + /* Generate a blank trailing N_SO to mark the end of the .o file, since + we can't depend upon the linker to mark .o file boundaries with + embedded stabs. */ + + #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ + fprintf (FILE, \ + "\t.text\n\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO) + + /* This is copied from final.c and sparc.h. */ + #undef ASM_OUTPUT_SOURCE_LINE + #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ + { if (write_symbols == SDB_DEBUG) { \ + fprintf ((FILE), "\t.ln\t%d\n", \ + ((sdb_begin_function_line > -1) \ + ? (LINE) - sdb_begin_function_line : 1)); \ + } else if (write_symbols == DBX_DEBUG) { \ + static int sym_lineno = 1; \ + fprintf (FILE, ".stabn 68,0,%d,.LM%d-", \ + LINE, sym_lineno); \ + assemble_name (FILE, \ + XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ + fprintf (FILE, "\n.LM%d:\n", sym_lineno); \ + sym_lineno += 1; \ + } } + + /* Support the ctors and dtors sections for g++. */ + + #undef INIT_SECTION_ASM_OP + + /* Support the ctors and dtors sections for g++. */ + + #undef CTORS_SECTION_ASM_OP + #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" + #undef DTORS_SECTION_ASM_OP + #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" + + /* A list of other sections which the compiler might be "in" at any + given time. */ + + #undef EXTRA_SECTIONS + #define EXTRA_SECTIONS in_const, in_bss, in_ctors, in_dtors + + /* A list of extra section function definitions. */ + + #undef EXTRA_SECTION_FUNCTIONS + #define EXTRA_SECTION_FUNCTIONS \ + CONST_SECTION_FUNCTION \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + + #define CTORS_SECTION_FUNCTION \ + void \ + ctors_section () \ + { \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ + } + + #define DTORS_SECTION_FUNCTION \ + void \ + dtors_section () \ + { \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ + } + + #define INT_ASM_OP ".long" + + /* A C statement (sans semicolon) to output an element in the table of + global constructors. */ + #undef ASM_OUTPUT_CONSTRUCTOR + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. */ + #undef ASM_OUTPUT_DESTRUCTOR + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + + #undef DO_GLOBAL_CTORS_BODY + #undef DO_GLOBAL_DTORS_BODY diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/lynx-ng.h gcc-2.7.0/config/sparc/lynx-ng.h *** gcc-2.6.3/config/sparc/lynx-ng.h Mon Jul 11 16:31:24 1994 --- gcc-2.7.0/config/sparc/lynx-ng.h Thu Jun 15 16:32:16 1995 *************** *** 1,4 **** /* Definitions for SPARC running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for SPARC running LynxOS, using Lynx's old as and ld. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,23 **** 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 "sparc/sparc.h" ! #include "lynx-ng.h" /* ??? Must redefine to get sparclite and v8 defines. Can this be done --- 16,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include ! #include /* ??? Must redefine to get sparclite and v8 defines. Can this be done diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/lynx.h gcc-2.7.0/config/sparc/lynx.h *** gcc-2.6.3/config/sparc/lynx.h Mon Jul 11 16:58:22 1994 --- gcc-2.7.0/config/sparc/lynx.h Thu Jun 15 16:32:25 1995 *************** *** 1,4 **** /* Definitions for SPARC running LynxOS. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions for SPARC running LynxOS. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,22 **** 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 "sparc/sparc.h" #undef ASM_OUTPUT_IDENT --- 16,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #include #undef ASM_OUTPUT_IDENT *************** *** 26,30 **** #define BSS_SECTION_ASM_OP ".section\t\".bss\"" ! #include "lynx.h" /* ??? Must redefine to get sparclite and v8 defines. Can this be done --- 27,31 ---- #define BSS_SECTION_ASM_OP ".section\t\".bss\"" ! #include /* ??? Must redefine to get sparclite and v8 defines. Can this be done diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/netbsd.h gcc-2.7.0/config/sparc/netbsd.h *** gcc-2.6.3/config/sparc/netbsd.h Fri Sep 9 15:16:50 1994 --- gcc-2.7.0/config/sparc/netbsd.h Tue May 9 18:23:43 1995 *************** *** 1,7 **** ! #include "sparc/sparc.h" /* Get generic NetBSD definitions. */ ! #include "netbsd.h" /* Names to predefine in the preprocessor for this target machine. */ --- 1,7 ---- ! #include /* Get generic NetBSD definitions. */ ! #include /* Names to predefine in the preprocessor for this target machine. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/pbd.h gcc-2.7.0/config/sparc/pbd.h *** gcc-2.6.3/config/sparc/pbd.h Sat Oct 2 04:23:33 1993 --- gcc-2.7.0/config/sparc/pbd.h Thu Jun 15 16:32:34 1995 *************** *** 20,24 **** 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 "sparc/sparc.h" --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "sparc/sparc.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sol2-c1.asm gcc-2.7.0/config/sparc/sol2-c1.asm *** gcc-2.6.3/config/sparc/sol2-c1.asm Wed Sep 9 05:02:37 1992 --- gcc-2.7.0/config/sparc/sol2-c1.asm Thu Jun 15 16:32:48 1995 *************** *** 24,28 **** ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files --- 24,29 ---- ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 59 Temple Place - Suite 330, ! ! Boston, MA 02111-1307, USA. ! ! As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sol2-ci.asm gcc-2.7.0/config/sparc/sol2-ci.asm *** gcc-2.6.3/config/sparc/sol2-ci.asm Mon Jul 27 22:55:26 1992 --- gcc-2.7.0/config/sparc/sol2-ci.asm Thu Jun 15 16:33:02 1995 *************** *** 24,28 **** ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files --- 24,29 ---- ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 59 Temple Place - Suite 330, ! ! Boston, MA 02111-1307, USA. ! ! As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sol2-cn.asm gcc-2.7.0/config/sparc/sol2-cn.asm *** gcc-2.6.3/config/sparc/sol2-cn.asm Mon Jul 27 22:55:31 1992 --- gcc-2.7.0/config/sparc/sol2-cn.asm Thu Jun 15 16:33:17 1995 *************** *** 24,28 **** ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files --- 24,29 ---- ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! ! the Free Software Foundation, 59 Temple Place - Suite 330, ! ! Boston, MA 02111-1307, USA. ! ! As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sol2.h gcc-2.7.0/config/sparc/sol2.h *** gcc-2.6.3/config/sparc/sol2.h Fri Sep 2 14:23:40 1994 --- gcc-2.7.0/config/sparc/sol2.h Thu Jun 15 16:33:27 1995 *************** *** 19,23 **** 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. */ /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ *************** *** 26,30 **** #undef CPP_PREDEFINES #define CPP_PREDEFINES \ ! "-Dsun -Dsparc -Dunix -D__svr4__ \ -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)\ -D__GCC_NEW_VARARGS__" --- 27,31 ---- #undef CPP_PREDEFINES #define CPP_PREDEFINES \ ! "-Dsun -Dsparc -Dunix -D__svr4__ -D__SVR4 \ -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)\ -D__GCC_NEW_VARARGS__" *************** *** 99,120 **** We don't use the standard LIB_SPEC only because we don't yet support c++ */ - /* If we cannot find the GNU *crt*.o files in the STANDARD_STARTFILE_PREFIX - directory, our fallback strategy must be to look for these files instead - in the Sun C 2.0 directory. */ - - #undef MD_STARTFILE_PREFIX - #define MD_STARTFILE_PREFIX "/opt/SUNWspro/SC2.0/" - #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared: \ %{!symbolic: \ %{pg:crt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \ ! %{pg:gmon.o%s} \ ! %{pg:crti.o%s}%{!pg:crti.o%s} \ ! %{ansi:/usr/ccs/lib/values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:/usr/ccs/lib/values-Xt.o%s} \ ! %{!traditional:/usr/ccs/lib/values-Xa.o%s}}}} \ ! crtbegin.o%s" /* ??? Note: in order for -compat-bsd to work fully, --- 100,114 ---- We don't use the standard LIB_SPEC only because we don't yet support c++ */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!shared: \ %{!symbolic: \ %{pg:crt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \ ! %{pg:gmon.o%s}}} \ ! %{pg:crti.o%s}%{!pg:crti.o%s} \ ! %{ansi:values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional:values-Xa.o%s}} \ ! crtbegin.o%s" /* ??? Note: in order for -compat-bsd to work fully, *************** *** 124,131 **** #undef LIB_SPEC #define LIB_SPEC \ ! "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \ ! %{!shared:%{!symbolic:-lc}} \ ! crtend.o%s \ ! %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}" /* This should be the same as in svr4.h, except with -R added. */ --- 118,125 ---- #undef LIB_SPEC #define LIB_SPEC \ ! "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}" ! ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}" /* This should be the same as in svr4.h, except with -R added. */ *************** *** 135,143 **** %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy} \ ! %{symbolic:-Bsymbolic -G -dy} \ %{G:-G} \ %{YP,*} \ ! %{R*} \ %{compat-bsd: \ %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ --- 129,137 ---- %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \ ! %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \ %{G:-G} \ %{YP,*} \ ! %{R*} %{!static:%{!R*:%{L*:-R %*}}} \ %{compat-bsd: \ %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sp64-aout.h gcc-2.7.0/config/sparc/sp64-aout.h *** gcc-2.6.3/config/sparc/sp64-aout.h Wed Jun 15 03:37:15 1994 --- gcc-2.7.0/config/sparc/sp64-aout.h Thu Jun 15 16:33:43 1995 *************** *** 18,22 **** 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 is a v9 only compiler. -mv8 is not expected to work. If you want --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This is a v9 only compiler. -mv8 is not expected to work. If you want diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sp64-elf.h gcc-2.7.0/config/sparc/sp64-elf.h *** gcc-2.6.3/config/sparc/sp64-elf.h Wed Jun 29 15:42:02 1994 --- gcc-2.7.0/config/sparc/sp64-elf.h Thu Jun 15 16:33:56 1995 *************** *** 1,5 **** /* Definitions of target machine for GNU compiler, for Sun SPARC-V9 on a hypothetical elf format machine. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Doug Evans, dje@cygnus.com. --- 1,5 ---- /* Definitions of target machine for GNU compiler, for Sun SPARC-V9 on a hypothetical elf format machine. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Doug Evans, dje@cygnus.com. *************** *** 18,22 **** 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 is a v9 only compiler. -mv8 is not expected to work. If you want --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This is a v9 only compiler. -mv8 is not expected to work. If you want *************** *** 38,41 **** --- 39,45 ---- #include "sparc/sol2.h" + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)") + /* A v9 compiler with stack-bias, 32 bit integers and 64 bit pointers, in a Medium/Anywhere code model environment. */ *************** *** 45,52 **** (MASK_V9 + MASK_STACK_BIAS + MASK_MEDANY + MASK_PTR64 + MASK_HARD_QUAD + MASK_EPILOGUE + MASK_FPU) #undef CPP_PREDEFINES ! #define CPP_PREDEFINES \ ! "-Dsun -Dsparc -Dunix -D__svr4__ -D__sparc_v9__ \ ! -Asystem(unix) -Asystem(svr4) -Acpu(sparc64) -Amachine(sparc64)" #undef CPP_SPEC --- 49,58 ---- (MASK_V9 + MASK_STACK_BIAS + MASK_MEDANY + MASK_PTR64 + MASK_HARD_QUAD + MASK_EPILOGUE + MASK_FPU) + /* __svr4__ is used by the C library */ #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "\ ! -D__sparc__ -D__sparc_v9__ -D__svr4__ \ ! -Acpu(sparc64) -Amachine(sparc64) \ ! " #undef CPP_SPEC *************** *** 59,83 **** #undef MD_STARTFILE_PREFIX ! /* Use the default (for now). */ ! #undef STARTFILE_SPEC ! ! /* Use the default (for now). */ ! #undef LIB_SPEC /* This is taken from sol2.h. */ #undef LINK_SPEC #define LINK_SPEC "\ ! %{!nostdlib:%{!r*:%{!e*:-e _start}}} \ ! %{h*} %{V} %{v:%{!V:-V}} \ ! %{b} %{Wl,*:%*} \ ! %{static:-dn -Bstatic} \ ! %{shared:-G -dy} \ ! %{symbolic:-Bsymbolic -G -dy} \ ! %{G:-G} \ ! %{YP,*} \ ! %{R*} \ ! %{Qy:} %{!Qn:-Qy} \ " /* Unfortunately, svr4.h redefines these so we have to restore them to their original values in sparc.h. */ --- 65,93 ---- #undef MD_STARTFILE_PREFIX ! #undef ASM_SPEC ! #define ASM_SPEC "\ ! %{V} %{v:%{!V:-V}} -s %{fpic:-K PIC} %{fPIC:-K PIC} \ ! " /* This is taken from sol2.h. */ #undef LINK_SPEC #define LINK_SPEC "\ ! %{V} %{v:%{!V:-V}} \ " + /* We need something a little simpler for the embedded environment. + Profiling doesn't really work yet so we just copy the default. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "\ + %{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}} \ + crtbegin.o%s \ + " + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC "%{!nostartfiles:crtend.o%s}" + + /* Use the default (for now). */ + #undef LIB_SPEC + /* Unfortunately, svr4.h redefines these so we have to restore them to their original values in sparc.h. */ *************** *** 121,141 **** /* DWARF stuff. */ ! #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL) \ ! do { fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP); \ ! assemble_name (FILE, LABEL); \ ! fprintf (FILE, "\n"); \ ! } while (0) ! ! #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX) \ ! do { \ ! fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP); \ ! output_addr_const ((FILE), (RTX)); \ ! fputc ('\n', (FILE)); \ ! } while (0) /* ??? Not sure if this should be 4 or 8 bytes. 4 works for now. */ ! #define ASM_OUTPUT_DWARF_REF(FILE,LABEL) \ ! do { fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ ! assemble_name (FILE, LABEL); \ ! fprintf (FILE, "\n"); \ ! } while (0) --- 131,153 ---- /* DWARF stuff. */ ! #define ASM_OUTPUT_DWARF_ADDR(FILE, LABEL) \ ! do { \ ! fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP); \ ! assemble_name ((FILE), (LABEL)); \ ! fprintf ((FILE), "\n"); \ ! } while (0) ! ! #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE, RTX) \ ! do { \ ! fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP); \ ! output_addr_const ((FILE), (RTX)); \ ! fputc ('\n', (FILE)); \ ! } while (0) /* ??? Not sure if this should be 4 or 8 bytes. 4 works for now. */ ! #define ASM_OUTPUT_DWARF_REF(FILE, LABEL) \ ! do { \ ! fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ ! assemble_name ((FILE), (LABEL)); \ ! fprintf ((FILE), "\n"); \ ! } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sparc-aout.h gcc-2.7.0/config/sparc/sparc-aout.h *** gcc-2.6.3/config/sparc/sparc-aout.h --- gcc-2.7.0/config/sparc/sparc-aout.h Thu Jun 15 16:34:05 1995 *************** *** 0 **** --- 1,26 ---- + /* Definitions of target machine for GNU compiler, for SPARC using a.out. + Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com). + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "aoutos.h" /* A.out definitions */ + #include "sparc/sparc.h" /* SPARC definitions */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sparc.c gcc-2.7.0/config/sparc/sparc.c *** gcc-2.6.3/config/sparc/sparc.c Tue Oct 18 20:51:05 1994 --- gcc-2.7.0/config/sparc/sparc.c Thu Jun 15 16:34:24 1995 *************** *** 1,4 **** /* Subroutines for insn-output.c for Sun SPARC. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, --- 1,4 ---- /* Subroutines for insn-output.c for Sun SPARC. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, *************** *** 19,23 **** 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 --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 188,191 **** --- 189,207 ---- } + /* Miscellaneous utilities. */ + + /* Nonzero if CODE, a comparison, is suitable for use in v9 conditional move + or branch on register contents instructions. */ + + int + v9_regcmp_p (code) + enum rtx_code code; + { + return (code == EQ || code == NE || code == GE || code == LT + || code == LE || code == GT); + } + + /* Operand constraints. */ + /* Return non-zero only if OP is a register of mode MODE, or const0_rtx. */ *************** *** 454,466 **** int ! memop (op, mode) rtx op; enum machine_mode mode; { ! if (GET_CODE (op) == MEM) ! return (mode == VOIDmode || mode == GET_MODE (op)); ! return 0; } /* Return truth value of whether OP is EQ or NE. */ --- 470,496 ---- int ! splittable_symbolic_memory_operand (op, mode) rtx op; enum machine_mode mode; { ! if (GET_CODE (op) != MEM) ! return 0; ! if (! symbolic_operand (XEXP (op, 0), Pmode)) ! return 0; ! return 1; } + int + splittable_immediate_memory_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) != MEM) + return 0; + if (! immediate_operand (XEXP (op, 0), Pmode)) + return 0; + return 1; + } + /* Return truth value of whether OP is EQ or NE. */ *************** *** 525,530 **** return 0; ! return (code == EQ || code == NE || code == GE || code == LT ! || code == LE || code == GT); } --- 555,559 ---- return 0; ! return v9_regcmp_p (code); } *************** *** 753,757 **** patterns by using the ldxfsr/stxfsr v9 insns. I tried it: you need two registers (say %g1,%g5) and it takes about 6 insns. A better fix would be ! to tell cse that CCFPE mode registers (even pseudoes) are call clobbered. */ --- 782,786 ---- patterns by using the ldxfsr/stxfsr v9 insns. I tried it: you need two registers (say %g1,%g5) and it takes about 6 insns. A better fix would be ! to tell cse that CCFPE mode registers (even pseudos) are call clobbered. */ *************** *** 1925,1929 **** } ! /* Normal case: move the four words in lowest to higest address order. */ output_asm_insn (singlemove_string (wordpart[0]), wordpart[0]); --- 1954,1958 ---- } ! /* Normal case: move the four words in lowest to highest address order. */ output_asm_insn (singlemove_string (wordpart[0]), wordpart[0]); *************** *** 3518,3523 **** { last_order_nonleaf = !last_order_nonleaf; ! bcopy (reg_alloc_orders[last_order_nonleaf], reg_alloc_order, ! FIRST_PSEUDO_REGISTER * sizeof (int)); } } --- 3547,3552 ---- { last_order_nonleaf = !last_order_nonleaf; ! bcopy ((char *) reg_alloc_orders[last_order_nonleaf], ! (char *) reg_alloc_order, FIRST_PSEUDO_REGISTER * sizeof (int)); } } *************** *** 3780,3783 **** --- 3809,3819 ---- } + case 'f': + /* Operand must be a MEM; write its address. */ + if (GET_CODE (x) != MEM) + output_operand_lossage ("Invalid %%f operand"); + output_address (XEXP (x, 0)); + return; + case 0: /* Do nothing special. */ *************** *** 4045,4050 **** mechanism would be better here. ! Emit 3 FLUSH instructions (UNSPEC_VOLATILE 3) to synchonize the data ! and instruction caches. ??? v9: We assume the top 32 bits of function addresses are 0. */ --- 4081,4085 ---- mechanism would be better here. ! Emit 3 FLUSH instructions to synchronize the data and instruction caches. ??? v9: We assume the top 32 bits of function addresses are 0. */ *************** *** 4081,4093 **** emit_insn (gen_iorsi3 (low_cxt, low_cxt, tem)); emit_move_insn (gen_rtx (MEM, SImode, plus_constant (tramp, 16)), low_cxt); ! emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, ! gen_rtvec (1, plus_constant (tramp, 0)), ! 3)); ! emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, ! gen_rtvec (1, plus_constant (tramp, 8)), ! 3)); ! emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, ! gen_rtvec (1, plus_constant (tramp, 16)), ! 3)); } --- 4116,4124 ---- emit_insn (gen_iorsi3 (low_cxt, low_cxt, tem)); emit_move_insn (gen_rtx (MEM, SImode, plus_constant (tramp, 16)), low_cxt); ! emit_insn (gen_flush (validize_mem (gen_rtx (MEM, SImode, tramp)))); ! emit_insn (gen_flush (validize_mem (gen_rtx (MEM, SImode, ! plus_constant (tramp, 8))))); ! emit_insn (gen_flush (validize_mem (gen_rtx (MEM, SImode, ! plus_constant (tramp, 16))))); } *************** *** 4129,4141 **** emit_insn (gen_iorsi3 (low_cxt, low_cxt, tem)); emit_move_insn (gen_rtx (MEM, SImode, plus_constant (tramp, 16)), low_cxt); ! emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, ! gen_rtvec (1, plus_constant (tramp, 0)), ! 3)); ! emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, ! gen_rtvec (1, plus_constant (tramp, 8)), ! 3)); ! emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, ! gen_rtvec (1, plus_constant (tramp, 16)), ! 3)); } --- 4160,4168 ---- emit_insn (gen_iorsi3 (low_cxt, low_cxt, tem)); emit_move_insn (gen_rtx (MEM, SImode, plus_constant (tramp, 16)), low_cxt); ! emit_insn (gen_flush (validize_mem (gen_rtx (MEM, DImode, tramp)))); ! emit_insn (gen_flush (validize_mem (gen_rtx (MEM, DImode, ! plus_constant (tramp, 8))))); ! emit_insn (gen_flush (validize_mem (gen_rtx (MEM, DImode, ! plus_constant (tramp, 16))))); } *************** *** 4488,4492 **** the gdb folk first. */ ! /* Is the entire register save area offsetable from %sp? */ if (reg_offset < 4096 - 64 * UNITS_PER_WORD) { --- 4515,4519 ---- the gdb folk first. */ ! /* Is the entire register save area offsettable from %sp? */ if (reg_offset < 4096 - 64 * UNITS_PER_WORD) { *************** *** 4638,4642 **** } ! /* Is the entire register save area offsetable from %sp? */ if (reg_offset < 4096 - 64 * UNITS_PER_WORD) { --- 4665,4669 ---- } ! /* Is the entire register save area offsettable from %sp? */ if (reg_offset < 4096 - 64 * UNITS_PER_WORD) { diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sparc.h gcc-2.7.0/config/sparc/sparc.h *** gcc-2.6.3/config/sparc/sparc.h Mon Oct 31 13:22:04 1994 --- gcc-2.7.0/config/sparc/sparc.h Thu Jun 15 16:34:48 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for Sun SPARC. ! Copyright (C) 1987, 1988, 1989, 1992, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, --- 1,4 ---- /* Definitions of target machine for GNU compiler, for Sun SPARC. ! Copyright (C) 1987, 88, 89, 92, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, *************** *** 19,23 **** 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. */ /* Note that some other tm.h files include this one and then override --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Note that some other tm.h files include this one and then override *************** *** 61,74 **** #endif ! #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" /* Provide required defaults for linker -e and -d switches. */ #define LINK_SPEC \ ! "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}" /* Special flags to the Sun-4 assembler when using pipe for input. */ ! #define ASM_SPEC " %| %{!pg:%{!p:%{fpic:-k} %{fPIC:-k}}}" /* Define macros to distinguish architectures. */ --- 62,77 ---- #endif ! #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}}" /* Provide required defaults for linker -e and -d switches. */ #define LINK_SPEC \ ! "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp} %{static:-Bstatic} \ ! %{assert*} %{shared:-assert pure-text}" /* Special flags to the Sun-4 assembler when using pipe for input. */ ! #define ASM_SPEC \ ! " %| %{R} %{!pg:%{!p:%{fpic:-k} %{fPIC:-k}}} %{keep-local-as-symbols:-L}" /* Define macros to distinguish architectures. */ *************** *** 130,138 **** flag_omit_frame_pointer = 0; \ } \ ! SUBTARGET_OVERRIDE_OPTIONS \ sparc_override_options (); \ } while (0) ! /* This is meant to be redefined in the host dependent files */ #define SUBTARGET_OVERRIDE_OPTIONS --- 133,141 ---- flag_omit_frame_pointer = 0; \ } \ ! SUBTARGET_OVERRIDE_OPTIONS; \ sparc_override_options (); \ } while (0) ! /* This is meant to be redefined in the host dependent files. */ #define SUBTARGET_OVERRIDE_OPTIONS *************** *** 369,373 **** /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_V9 ? 8 : 4) ! #define MAX_UNITS_PER_WORD 8 /* Now define the sizes of the C data types. */ --- 372,376 ---- /* Width of a word, in units (bytes). */ #define UNITS_PER_WORD (TARGET_V9 ? 8 : 4) ! #define MIN_UNITS_PER_WORD 4 /* Now define the sizes of the C data types. */ *************** *** 446,449 **** --- 449,461 ---- #define MAX_TEXT_ALIGN 32 + /* This forces all variables and constants to the data section when PIC. + This is because the SunOS 4 shared library scheme thinks everything in + text is a function, and patches the address to point to a loader stub. */ + /* This is defined to zero for every system which doesn't use the a.out object + file format. */ + #ifndef SUNOS4_SHARED_LIBRARIES + #define SUNOS4_SHARED_LIBRARIES 0 + #endif + /* This is defined differently for v9 in a cover file. */ #define SELECT_SECTION(T,RELOC) \ *************** *** 456,460 **** || TREE_CONSTANT (DECL_INITIAL (T))) \ && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \ ! && ! (flag_pic && (RELOC))) \ text_section (); \ else \ --- 468,472 ---- || TREE_CONSTANT (DECL_INITIAL (T))) \ && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \ ! && ! (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ text_section (); \ else \ *************** *** 463,467 **** else if (TREE_CODE (T) == CONSTRUCTOR) \ { \ ! if (flag_pic != 0 && (RELOC) != 0) \ data_section (); \ } \ --- 475,479 ---- else if (TREE_CODE (T) == CONSTRUCTOR) \ { \ ! if (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES)) \ data_section (); \ } \ *************** *** 469,473 **** { \ if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \ ! || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN) \ data_section (); \ else \ --- 481,486 ---- { \ if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \ ! || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN \ ! || (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ data_section (); \ else \ *************** *** 482,486 **** { \ if (GET_MODE_BITSIZE (MODE) <= MAX_TEXT_ALIGN \ ! && ! (flag_pic && symbolic_operand (X))) \ text_section (); \ else \ --- 495,499 ---- { \ if (GET_MODE_BITSIZE (MODE) <= MAX_TEXT_ALIGN \ ! && ! (flag_pic && (symbolic_operand (X) || SUNOS4_SHARED_LIBRARIES))) \ text_section (); \ else \ *************** *** 1087,1091 **** #define SECONDARY_MEMORY_NEEDED_RTX(MODE) \ (get_frame_size () == 0 \ ! ? assign_stack_local (mode, GET_MODE_SIZE (mode), 0) \ : gen_rtx (MEM, MODE, gen_rtx (PLUS, Pmode, frame_pointer_rtx, \ GEN_INT (STARTING_FRAME_OFFSET)))) --- 1100,1104 ---- #define SECONDARY_MEMORY_NEEDED_RTX(MODE) \ (get_frame_size () == 0 \ ! ? assign_stack_local (MODE, GET_MODE_SIZE (MODE), 0) \ : gen_rtx (MEM, MODE, gen_rtx (PLUS, Pmode, frame_pointer_rtx, \ GEN_INT (STARTING_FRAME_OFFSET)))) *************** *** 1096,1104 **** #define SECONDARY_MEMORY_NEEDED_MODE(MODE) \ (TARGET_V9 \ ! ? (GET_MODE_BITSIZE (mode) < 32 \ ! ? mode_for_size (32, GET_MODE_CLASS (mode), 0) \ : MODE) \ ! : (GET_MODE_BITSIZE (mode) < BITS_PER_WORD \ ! ? mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (mode), 0) \ : MODE)) --- 1109,1117 ---- #define SECONDARY_MEMORY_NEEDED_MODE(MODE) \ (TARGET_V9 \ ! ? (GET_MODE_BITSIZE (MODE) < 32 \ ! ? mode_for_size (32, GET_MODE_CLASS (MODE), 0) \ : MODE) \ ! : (GET_MODE_BITSIZE (MODE) < BITS_PER_WORD \ ! ? mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (MODE), 0) \ : MODE)) *************** *** 1167,1175 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Some subroutine macros specific to this machine. --- 1180,1189 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Some subroutine macros specific to this machine. *************** *** 1480,1486 **** extern int gen_v9_scc (); - - /* ??? This is a hack until conditional move support is complete. */ - #define HAVE_conditional_move (TARGET_V9) /* Generate the special assembly code needed to tell the assembler whatever --- 1494,1497 ---- *************** *** 2080,2083 **** --- 2091,2095 ---- #define ADDTF3_LIBCALL "_Q_add" #define SUBTF3_LIBCALL "_Q_sub" + #define NEGTF2_LIBCALL "_Q_neg" #define MULTF3_LIBCALL "_Q_mul" #define DIVTF3_LIBCALL "_Q_div" *************** *** 2100,2108 **** and the compiler will notice and try to use the TFmode sqrt instruction for calls to the builtin function sqrt, but this fails. */ ! #define INIT_TARGET_OPTABS \ ! do { \ ! INIT_SUBTARGET_OPTABS; \ ! if (TARGET_FPU) \ ! sqrt_optab->handlers[(int) TFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "_Q_sqrt"); \ } while (0) --- 2112,2145 ---- and the compiler will notice and try to use the TFmode sqrt instruction for calls to the builtin function sqrt, but this fails. */ ! #define INIT_TARGET_OPTABS \ ! do { \ ! add_optab->handlers[(int) TFmode].libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, ADDTF3_LIBCALL); \ ! sub_optab->handlers[(int) TFmode].libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, SUBTF3_LIBCALL); \ ! neg_optab->handlers[(int) TFmode].libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, NEGTF2_LIBCALL); \ ! smul_optab->handlers[(int) TFmode].libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, MULTF3_LIBCALL); \ ! flodiv_optab->handlers[(int) TFmode].libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, DIVTF3_LIBCALL); \ ! eqtf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, EQTF2_LIBCALL); \ ! netf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, NETF2_LIBCALL); \ ! gttf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, GTTF2_LIBCALL); \ ! getf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, GETF2_LIBCALL); \ ! lttf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, LTTF2_LIBCALL); \ ! letf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, LETF2_LIBCALL); \ ! trunctfsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, TRUNCTFSF2_LIBCALL); \ ! trunctfdf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, TRUNCTFDF2_LIBCALL); \ ! extendsftf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, EXTENDSFTF2_LIBCALL); \ ! extenddftf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, EXTENDDFTF2_LIBCALL); \ ! floatsitf_libfunc = gen_rtx (SYMBOL_REF, Pmode, FLOATSITF2_LIBCALL); \ ! fixtfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, FIX_TRUNCTFSI2_LIBCALL); \ ! fixunstfsi_libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, FIXUNS_TRUNCTFSI2_LIBCALL); \ ! if (TARGET_FPU) \ ! sqrt_optab->handlers[(int) TFmode].libfunc \ ! = gen_rtx (SYMBOL_REF, Pmode, "_Q_sqrt"); \ ! INIT_SUBTARGET_OPTABS; \ } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sparc.md gcc-2.7.0/config/sparc/sparc.md *** gcc-2.6.3/config/sparc/sparc.md Mon Oct 31 13:22:27 1994 --- gcc-2.7.0/config/sparc/sparc.md Thu Jun 15 16:57:52 1995 *************** *** 1,7 **** ;;- Machine description for SPARC chip for GNU C compiler ! ;; Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. ! ;; Contributed by Michael Tiemann (tiemann@cygnus.com) ! ;; 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, ! ;; at Cygnus Support. ;; This file is part of GNU CC. --- 1,7 ---- ;;- Machine description for SPARC chip for GNU C compiler ! ;; Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. ! ;; Contributed by Michael Tiemann (tiemann@cygnus.com) ! ;; 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, ! ;; at Cygnus Support. ;; This file is part of GNU CC. *************** *** 19,23 **** ;; 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. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. --- 19,24 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. *************** *** 689,693 **** ;; Now the DEFINE_INSNs for the compare and scc cases. First the compares. ! (define_insn "" [(set (reg:CC 0) (compare:CC (match_operand:SI 0 "register_operand" "r") --- 690,694 ---- ;; Now the DEFINE_INSNs for the compare and scc cases. First the compares. ! (define_insn "*cmpsi_insn" [(set (reg:CC 0) (compare:CC (match_operand:SI 0 "register_operand" "r") *************** *** 697,701 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCFPE 0) (compare:CCFPE (match_operand:SF 0 "register_operand" "f") --- 698,702 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmpsf_fpe_sp32" [(set (reg:CCFPE 0) (compare:CCFPE (match_operand:SF 0 "register_operand" "f") *************** *** 705,709 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (reg:CCFPE 0) (compare:CCFPE (match_operand:DF 0 "register_operand" "e") --- 706,710 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpdf_fpe_sp32" [(set (reg:CCFPE 0) (compare:CCFPE (match_operand:DF 0 "register_operand" "e") *************** *** 713,717 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (reg:CCFPE 0) (compare:CCFPE (match_operand:TF 0 "register_operand" "e") --- 714,718 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmptf_fpe_sp32" [(set (reg:CCFPE 0) (compare:CCFPE (match_operand:TF 0 "register_operand" "e") *************** *** 721,725 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (reg:CCFP 0) (compare:CCFP (match_operand:SF 0 "register_operand" "f") --- 722,726 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpsf_fp_sp32" [(set (reg:CCFP 0) (compare:CCFP (match_operand:SF 0 "register_operand" "f") *************** *** 729,733 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (reg:CCFP 0) (compare:CCFP (match_operand:DF 0 "register_operand" "e") --- 730,734 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpdf_fp_sp32" [(set (reg:CCFP 0) (compare:CCFP (match_operand:DF 0 "register_operand" "e") *************** *** 737,741 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (reg:CCFP 0) (compare:CCFP (match_operand:TF 0 "register_operand" "e") --- 738,742 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmptf_fp_sp32" [(set (reg:CCFP 0) (compare:CCFP (match_operand:TF 0 "register_operand" "e") *************** *** 745,749 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (reg:CCX 0) (compare:CCX (match_operand:DI 0 "register_operand" "r") --- 746,750 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpdi_sp64" [(set (reg:CCX 0) (compare:CCX (match_operand:DI 0 "register_operand" "r") *************** *** 753,757 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (match_operand:CCFPE 0 "ccfp_reg_operand" "=c") (compare:CCFPE (match_operand:SF 1 "register_operand" "f") --- 754,758 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmpsf_fpe_sp64" [(set (match_operand:CCFPE 0 "ccfp_reg_operand" "=c") (compare:CCFPE (match_operand:SF 1 "register_operand" "f") *************** *** 761,765 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (match_operand:CCFPE 0 "ccfp_reg_operand" "=c") (compare:CCFPE (match_operand:DF 1 "register_operand" "e") --- 762,766 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpdf_fpe_sp64" [(set (match_operand:CCFPE 0 "ccfp_reg_operand" "=c") (compare:CCFPE (match_operand:DF 1 "register_operand" "e") *************** *** 769,773 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (match_operand:CCFPE 0 "ccfp_reg_operand" "=c") (compare:CCFPE (match_operand:TF 1 "register_operand" "e") --- 770,774 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmptf_fpe_sp64" [(set (match_operand:CCFPE 0 "ccfp_reg_operand" "=c") (compare:CCFPE (match_operand:TF 1 "register_operand" "e") *************** *** 777,781 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (match_operand:CCFP 0 "ccfp_reg_operand" "=c") (compare:CCFP (match_operand:SF 1 "register_operand" "f") --- 778,782 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpsf_fp_sp64" [(set (match_operand:CCFP 0 "ccfp_reg_operand" "=c") (compare:CCFP (match_operand:SF 1 "register_operand" "f") *************** *** 785,789 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (match_operand:CCFP 0 "ccfp_reg_operand" "=c") (compare:CCFP (match_operand:DF 1 "register_operand" "e") --- 786,790 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmpdf_fp_sp64" [(set (match_operand:CCFP 0 "ccfp_reg_operand" "=c") (compare:CCFP (match_operand:DF 1 "register_operand" "e") *************** *** 793,797 **** [(set_attr "type" "fpcmp")]) ! (define_insn "" [(set (match_operand:CCFP 0 "ccfp_reg_operand" "=c") (compare:CCFP (match_operand:TF 1 "register_operand" "e") --- 794,798 ---- [(set_attr "type" "fpcmp")]) ! (define_insn "*cmptf_fp_sp64" [(set (match_operand:CCFP 0 "ccfp_reg_operand" "=c") (compare:CCFP (match_operand:TF 1 "register_operand" "e") *************** *** 804,808 **** ;; without any branching and do not involve a COMPARE. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (ne:SI (match_operand:SI 1 "register_operand" "r") --- 805,809 ---- ;; without any branching and do not involve a COMPARE. ! (define_insn "*snesi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (ne:SI (match_operand:SI 1 "register_operand" "r") *************** *** 814,818 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ne:SI (match_operand:SI 1 "register_operand" "r") --- 815,819 ---- (set_attr "length" "2")]) ! (define_insn "*neg_snesi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ne:SI (match_operand:SI 1 "register_operand" "r") *************** *** 824,828 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ne:DI (match_operand:DI 1 "register_operand" "r") --- 825,829 ---- (set_attr "length" "2")]) ! (define_insn "*snedi_zero" [(set (match_operand:DI 0 "register_operand" "=r") (ne:DI (match_operand:DI 1 "register_operand" "r") *************** *** 834,838 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (ne:DI (match_operand:DI 1 "register_operand" "r") --- 835,839 ---- (set_attr "length" "2")]) ! (define_insn "*neg_snedi_zero" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (ne:DI (match_operand:DI 1 "register_operand" "r") *************** *** 844,848 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (eq:SI (match_operand:SI 1 "register_operand" "r") --- 845,849 ---- (set_attr "length" "2")]) ! (define_insn "*seqsi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (eq:SI (match_operand:SI 1 "register_operand" "r") *************** *** 854,858 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (eq:SI (match_operand:SI 1 "register_operand" "r") --- 855,859 ---- (set_attr "length" "2")]) ! (define_insn "*neg_seqsi_zero" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (eq:SI (match_operand:SI 1 "register_operand" "r") *************** *** 864,868 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (eq:DI (match_operand:DI 1 "register_operand" "r") --- 865,869 ---- (set_attr "length" "2")]) ! (define_insn "*seqdi_zero" [(set (match_operand:DI 0 "register_operand" "=r") (eq:DI (match_operand:DI 1 "register_operand" "r") *************** *** 874,878 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (eq:DI (match_operand:DI 1 "register_operand" "r") --- 875,879 ---- (set_attr "length" "2")]) ! (define_insn "*neg_seqdi_zero" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (eq:DI (match_operand:DI 1 "register_operand" "r") *************** *** 888,892 **** ;; versions for v9. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ne:SI (match_operand:SI 1 "register_operand" "r") --- 889,893 ---- ;; versions for v9. ! (define_insn "*x_plus_i_ne_0" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ne:SI (match_operand:SI 1 "register_operand" "r") *************** *** 898,902 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") --- 899,903 ---- [(set_attr "length" "2")]) ! (define_insn "*x_minus_i_ne_0" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") *************** *** 908,912 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (eq:SI (match_operand:SI 1 "register_operand" "r") --- 909,913 ---- [(set_attr "length" "2")]) ! (define_insn "*x_plus_i_eq_0" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (eq:SI (match_operand:SI 1 "register_operand" "r") *************** *** 918,922 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") --- 919,923 ---- [(set_attr "length" "2")]) ! (define_insn "*x_minus_i_eq_0" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 2 "register_operand" "r") *************** *** 932,936 **** ;; versions for v9. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (ltu:SI (reg:CC 0) (const_int 0)))] --- 933,937 ---- ;; versions for v9. ! (define_insn "*sltu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (ltu:SI (reg:CC 0) (const_int 0)))] *************** *** 939,943 **** [(set_attr "type" "misc")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ltu:SI (reg:CC 0) (const_int 0))))] --- 940,944 ---- [(set_attr "type" "misc")]) ! (define_insn "*neg_sltu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (ltu:SI (reg:CC 0) (const_int 0))))] *************** *** 947,951 **** ;; ??? Combine should canonicalize these next two to the same pattern. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (neg:SI (ltu:SI (reg:CC 0) (const_int 0))) --- 948,952 ---- ;; ??? Combine should canonicalize these next two to the same pattern. ! (define_insn "*neg_sltu_minus_x" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (neg:SI (ltu:SI (reg:CC 0) (const_int 0))) *************** *** 955,959 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (plus:SI (ltu:SI (reg:CC 0) (const_int 0)) --- 956,960 ---- [(set_attr "type" "unary")]) ! (define_insn "*neg_sltu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (plus:SI (ltu:SI (reg:CC 0) (const_int 0)) *************** *** 963,967 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (geu:SI (reg:CC 0) (const_int 0)))] --- 964,968 ---- [(set_attr "type" "unary")]) ! (define_insn "*sgeu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (geu:SI (reg:CC 0) (const_int 0)))] *************** *** 970,974 **** [(set_attr "type" "misc")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (geu:SI (reg:CC 0) (const_int 0))))] --- 971,975 ---- [(set_attr "type" "misc")]) ! (define_insn "*neg_sgeu_insn" [(set (match_operand:SI 0 "register_operand" "=r") (neg:SI (geu:SI (reg:CC 0) (const_int 0))))] *************** *** 981,985 **** ;; versions for v9. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ltu:SI (reg:CC 0) (const_int 0)) --- 982,986 ---- ;; versions for v9. ! (define_insn "*sltu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ltu:SI (reg:CC 0) (const_int 0)) *************** *** 989,993 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ltu:SI (reg:CC 0) (const_int 0)) --- 990,994 ---- [(set_attr "type" "unary")]) ! (define_insn "*sltu_plus_x_plus_y" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (ltu:SI (reg:CC 0) (const_int 0)) *************** *** 997,1001 **** "addx %1,%2,%0") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") --- 998,1002 ---- "addx %1,%2,%0") ! (define_insn "*x_minus_sltu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1006,1010 **** ;; ??? Combine should canonicalize these next two to the same pattern. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r") --- 1007,1011 ---- ;; ??? Combine should canonicalize these next two to the same pattern. ! (define_insn "*x_minus_y_minus_sltu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1014,1018 **** "subx %1,%2,%0") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") --- 1015,1019 ---- "subx %1,%2,%0") ! (define_insn "*x_minus_sltu_plus_y" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1022,1026 **** "subx %1,%2,%0") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (geu:SI (reg:CC 0) (const_int 0)) --- 1023,1027 ---- "subx %1,%2,%0") ! (define_insn "*sgeu_plus_x" [(set (match_operand:SI 0 "register_operand" "=r") (plus:SI (geu:SI (reg:CC 0) (const_int 0)) *************** *** 1030,1034 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") --- 1031,1035 ---- [(set_attr "type" "unary")]) ! (define_insn "*x_minus_sgeu" [(set (match_operand:SI 0 "register_operand" "=r") (minus:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1044,1048 **** ;; turn something that does not require a jump into something that does. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (match_operator:SI 1 "noov_compare_op" [(reg 0) (const_int 0)]))] --- 1045,1049 ---- ;; turn something that does not require a jump into something that does. ! (define_insn "*scc_si" [(set (match_operand:SI 0 "register_operand" "=r") (match_operator:SI 1 "noov_compare_op" [(reg 0) (const_int 0)]))] *************** *** 1052,1056 **** (set_attr "length" "3")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (match_operator:DI 1 "noov_compare_op" [(reg 0) (const_int 0)]))] --- 1053,1057 ---- (set_attr "length" "3")]) ! (define_insn "*scc_di" [(set (match_operand:DI 0 "register_operand" "=r") (match_operator:DI 1 "noov_compare_op" [(reg 0) (const_int 0)]))] *************** *** 1252,1256 **** ;; Now match both normal and inverted jump. ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "noov_compare_op" --- 1253,1257 ---- ;; Now match both normal and inverted jump. ! (define_insn "*normal_branch" [(set (pc) (if_then_else (match_operator 0 "noov_compare_op" *************** *** 1267,1271 **** [(set_attr "type" "branch")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "noov_compare_op" --- 1268,1272 ---- [(set_attr "type" "branch")]) ! (define_insn "*inverted_branch" [(set (pc) (if_then_else (match_operator 0 "noov_compare_op" *************** *** 1282,1286 **** [(set_attr "type" "branch")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" --- 1283,1287 ---- [(set_attr "type" "branch")]) ! (define_insn "*normal_fp_branch_sp64" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" *************** *** 1298,1302 **** [(set_attr "type" "branch")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" --- 1299,1303 ---- [(set_attr "type" "branch")]) ! (define_insn "*inverted_fp_branch_sp64" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" *************** *** 1314,1318 **** [(set_attr "type" "branch")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" --- 1315,1319 ---- [(set_attr "type" "branch")]) ! (define_insn "*normal_fpe_branch_sp64" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" *************** *** 1330,1334 **** [(set_attr "type" "branch")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" --- 1331,1335 ---- [(set_attr "type" "branch")]) ! (define_insn "*inverted_fpe_branch_sp64" [(set (pc) (if_then_else (match_operator 0 "comparison_operator" *************** *** 1351,1355 **** ;; There are no 32 bit brreg insns. ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "v9_regcmp_op" --- 1352,1356 ---- ;; There are no 32 bit brreg insns. ! (define_insn "*normal_int_branch_sp64" [(set (pc) (if_then_else (match_operator 0 "v9_regcmp_op" *************** *** 1367,1371 **** [(set_attr "type" "branch")]) ! (define_insn "" [(set (pc) (if_then_else (match_operator 0 "v9_regcmp_op" --- 1368,1372 ---- [(set_attr "type" "branch")]) ! (define_insn "*inverted_int_branch_sp64" [(set (pc) (if_then_else (match_operator 0 "v9_regcmp_op" *************** *** 1385,1389 **** ;; Esoteric move insns (lo_sum, high, pic). ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") --- 1386,1390 ---- ;; Esoteric move insns (lo_sum, high, pic). ! (define_insn "*lo_sum_si" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1399,1403 **** ;; For PIC, symbol_refs are put inside unspec so that the optimizer will not ;; confuse them with real addresses. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") --- 1400,1404 ---- ;; For PIC, symbol_refs are put inside unspec so that the optimizer will not ;; confuse them with real addresses. ! (define_insn "*pic_lo_sum_si" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") *************** *** 1413,1417 **** ;; For PIC, symbol_refs are put inside unspec so that the optimizer will not ;; confuse them with real addresses. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (unspec:SI [(match_operand 1 "" "")] 0)))] --- 1414,1418 ---- ;; For PIC, symbol_refs are put inside unspec so that the optimizer will not ;; confuse them with real addresses. ! (define_insn "*pic_sethi_si" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (unspec:SI [(match_operand 1 "" "")] 0)))] *************** *** 1421,1425 **** (set_attr "length" "1")]) ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] --- 1422,1426 ---- (set_attr "length" "1")]) ! (define_insn "*sethi_si" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] *************** *** 1429,1433 **** (set_attr "length" "1")]) ! (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (high:HI (match_operand 1 "" "")))] --- 1430,1434 ---- (set_attr "length" "1")]) ! (define_insn "*sethi_hi" [(set (match_operand:HI 0 "register_operand" "=r") (high:HI (match_operand 1 "" "")))] *************** *** 1441,1445 **** ;; there. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (match_operand:SI 1 "move_pic_label" "i")) --- 1442,1446 ---- ;; there. ! (define_insn "*move_pic_label_si" [(set (match_operand:SI 0 "register_operand" "=r") (match_operand:SI 1 "move_pic_label" "i")) *************** *** 1452,1456 **** ;; v9 special pic pattern, for loading the address of a label into a register. ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "move_pic_label" "i")) --- 1453,1457 ---- ;; v9 special pic pattern, for loading the address of a label into a register. ! (define_insn "*move_pic_label_di" [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "move_pic_label" "i")) *************** *** 1461,1465 **** (set_attr "length" "4")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "0") --- 1462,1466 ---- (set_attr "length" "4")]) ! (define_insn "*lo_sum_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "0") *************** *** 1482,1486 **** ;; ??? Optimizer does not handle "or %o1,%lo(0),%o1". How about add? ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "0") --- 1483,1487 ---- ;; ??? Optimizer does not handle "or %o1,%lo(0),%o1". How about add? ! (define_insn "*lo_sum_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (lo_sum:DI (match_operand:DI 1 "register_operand" "0") *************** *** 1501,1505 **** [(set_attr "length" "1")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" "")))] --- 1502,1506 ---- [(set_attr "length" "1")]) ! (define_insn "*sethi_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" "")))] *************** *** 1539,1543 **** ;;; ??? This pattern originally clobbered a scratch register. However, this ! ;;; is illegal, the movdi pattern may not use a temp register because it ;;; may be called from reload to reload a DImode value. In that case, we ;;; end up with a scratch register that never gets allocated. To avoid this, --- 1540,1544 ---- ;;; ??? This pattern originally clobbered a scratch register. However, this ! ;;; is invalid, the movdi pattern may not use a temp register because it ;;; may be called from reload to reload a DImode value. In that case, we ;;; end up with a scratch register that never gets allocated. To avoid this, *************** *** 1552,1556 **** ;;; ??? This comment is obsolete, gas handles them now. ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "const_double_operand" ""))) --- 1553,1557 ---- ;;; ??? This comment is obsolete, gas handles them now. ! (define_insn "*sethi_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "const_double_operand" ""))) *************** *** 1594,1598 **** ;; When TARGET_FULLANY, symbolic addresses are 64 bits. ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" ""))) --- 1595,1599 ---- ;; When TARGET_FULLANY, symbolic addresses are 64 bits. ! (define_insn "*sethi_di_medlow" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" ""))) *************** *** 1607,1611 **** ;; You cannot OR in %lo(%1), it must be added in. ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "data_segment_operand" ""))) --- 1608,1612 ---- ;; You cannot OR in %lo(%1), it must be added in. ! (define_insn "*sethi_di_medany_data" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "data_segment_operand" ""))) *************** *** 1617,1621 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "text_segment_operand" ""))) --- 1618,1622 ---- (set_attr "length" "2")]) ! (define_insn "*sethi_di_medany_text" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "text_segment_operand" ""))) *************** *** 1627,1631 **** (set_attr "length" "1")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" ""))) --- 1628,1632 ---- (set_attr "length" "1")]) ! (define_insn "*sethi_di_fullany" [(set (match_operand:DI 0 "register_operand" "=r") (high:DI (match_operand 1 "" ""))) *************** *** 1648,1652 **** }") ! (define_insn "" [(set (match_operand:QI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,Q") (match_operand:QI 1 "move_operand" "rI,K,Q,rJ"))] --- 1649,1653 ---- }") ! (define_insn "*movqi_insn" [(set (match_operand:QI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,Q") (match_operand:QI 1 "move_operand" "rI,K,Q,rJ"))] *************** *** 1662,1666 **** (set_attr "length" "*,1,*,1")]) ! (define_insn "" [(set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (lo_sum:SI (match_operand:QI 1 "register_operand" "r") --- 1663,1667 ---- (set_attr "length" "*,1,*,1")]) ! (define_insn "*lo_sum_qi" [(set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (lo_sum:SI (match_operand:QI 1 "register_operand" "r") *************** *** 1670,1674 **** [(set_attr "length" "1")]) ! (define_insn "" [(set (mem:QI (match_operand:SI 0 "symbolic_operand" "")) (match_operand:QI 1 "reg_or_0_operand" "rJ")) --- 1671,1675 ---- [(set_attr "length" "1")]) ! (define_insn "*store_qi" [(set (mem:QI (match_operand:SI 0 "symbolic_operand" "")) (match_operand:QI 1 "reg_or_0_operand" "rJ")) *************** *** 1689,1693 **** }") ! (define_insn "" [(set (match_operand:HI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,Q") (match_operand:HI 1 "move_operand" "rI,K,Q,rJ"))] --- 1690,1694 ---- }") ! (define_insn "*movhi_insn" [(set (match_operand:HI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,Q") (match_operand:HI 1 "move_operand" "rI,K,Q,rJ"))] *************** *** 1703,1707 **** (set_attr "length" "*,1,*,1")]) ! (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (lo_sum:HI (match_operand:HI 1 "register_operand" "r") --- 1704,1708 ---- (set_attr "length" "*,1,*,1")]) ! (define_insn "*lo_sum_hi" [(set (match_operand:HI 0 "register_operand" "=r") (lo_sum:HI (match_operand:HI 1 "register_operand" "r") *************** *** 1711,1715 **** [(set_attr "length" "1")]) ! (define_insn "" [(set (mem:HI (match_operand:SI 0 "symbolic_operand" "")) (match_operand:HI 1 "reg_or_0_operand" "rJ")) --- 1712,1716 ---- [(set_attr "length" "1")]) ! (define_insn "*store_hi" [(set (mem:HI (match_operand:SI 0 "symbolic_operand" "")) (match_operand:HI 1 "reg_or_0_operand" "rJ")) *************** *** 1738,1742 **** ;; in an fp register, or an fp number is an integer register. ! (define_insn "" [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand" "=r,f,r,r,f,Q,Q") (match_operand:SI 1 "move_operand" "rI,!f,K,Q,!Q,rJ,!f"))] --- 1739,1743 ---- ;; in an fp register, or an fp number is an integer register. ! (define_insn "*movsi_insn" [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand" "=r,f,r,r,f,Q,Q") (match_operand:SI 1 "move_operand" "rI,!f,K,Q,!Q,rJ,!f"))] *************** *** 1755,1759 **** (set_attr "length" "*,*,1,*,*,*,*")]) ! (define_insn "" [(set (mem:SI (match_operand:SI 0 "symbolic_operand" "")) (match_operand:SI 1 "reg_or_0_operand" "rJ")) --- 1756,1760 ---- (set_attr "length" "*,*,1,*,*,*,*")]) ! (define_insn "*store_si" [(set (mem:SI (match_operand:SI 0 "symbolic_operand" "")) (match_operand:SI 1 "reg_or_0_operand" "rJ")) *************** *** 1774,1778 **** }") ! (define_insn "" [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "=r,T,U,Q,r,r,?f,?f,?Q") (match_operand:DI 1 "general_operand" "r,U,T,r,Q,i,f,Q,f"))] --- 1775,1779 ---- }") ! (define_insn "*movdi_sp32_insn" [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "=r,T,U,Q,r,r,?f,?f,?Q") (match_operand:DI 1 "general_operand" "r,U,T,r,Q,i,f,Q,f"))] *************** *** 1798,1802 **** ;;; This needs the original value of operands[1], not the inverted value. ! (define_insn "" [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,Q,?f,?f,?Q") (match_operand:DI 1 "move_operand" "rI,K,Q,rJ,f,Q,f"))] --- 1799,1803 ---- ;;; This needs the original value of operands[1], not the inverted value. ! (define_insn "*movdi_sp64_insn" [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "=r,r,r,Q,?f,?f,?Q") (match_operand:DI 1 "move_operand" "rI,K,Q,rJ,f,Q,f"))] *************** *** 1881,1885 **** ;}") ! ;(define_insn "" ; [(set (mem:BLK (match_operand:SI 0 "register_operand" "+r")) ; (mem:BLK (match_operand:SI 1 "register_operand" "+r"))) --- 1882,1886 ---- ;}") ! ;(define_insn "*block_move_insn" ; [(set (mem:BLK (match_operand:SI 0 "register_operand" "+r")) ; (mem:BLK (match_operand:SI 1 "register_operand" "+r"))) *************** *** 1901,1907 **** ;; to be reloaded by putting the constant into memory. ;; It must come before the more general movsf pattern. ! (define_insn "" [(set (match_operand:SF 0 "general_operand" "=?r,f,m") ! (match_operand:SF 1 "" "?E,m,G"))] "TARGET_FPU && GET_CODE (operands[1]) == CONST_DOUBLE" "* --- 1902,1908 ---- ;; to be reloaded by putting the constant into memory. ;; It must come before the more general movsf pattern. ! (define_insn "*movsf_const_insn" [(set (match_operand:SF 0 "general_operand" "=?r,f,m") ! (match_operand:SF 1 "" "?F,m,G"))] "TARGET_FPU && GET_CODE (operands[1]) == CONST_DOUBLE" "* *************** *** 1930,1934 **** }") ! (define_insn "" [(set (match_operand:SF 0 "reg_or_nonsymb_mem_operand" "=f,r,f,r,Q,Q") (match_operand:SF 1 "reg_or_nonsymb_mem_operand" "f,r,Q,Q,f,r"))] --- 1931,1935 ---- }") ! (define_insn "*movsf_insn" [(set (match_operand:SF 0 "reg_or_nonsymb_mem_operand" "=f,r,f,r,Q,Q") (match_operand:SF 1 "reg_or_nonsymb_mem_operand" "f,r,Q,Q,f,r"))] *************** *** 1949,1953 **** ;; when -mno-fpu. ! (define_insn "" [(set (match_operand:SF 0 "reg_or_nonsymb_mem_operand" "=r,r,Q") (match_operand:SF 1 "reg_or_nonsymb_mem_operand" "r,Q,r"))] --- 1950,1954 ---- ;; when -mno-fpu. ! (define_insn "*movsf_no_f_insn" [(set (match_operand:SF 0 "reg_or_nonsymb_mem_operand" "=r,r,Q") (match_operand:SF 1 "reg_or_nonsymb_mem_operand" "r,Q,r"))] *************** *** 1961,1965 **** [(set_attr "type" "move,load,store")]) ! (define_insn "" [(set (mem:SF (match_operand:SI 0 "symbolic_operand" "i")) (match_operand:SF 1 "reg_or_0_operand" "rfG")) --- 1962,1966 ---- [(set_attr "type" "move,load,store")]) ! (define_insn "*store_sf" [(set (mem:SF (match_operand:SI 0 "symbolic_operand" "i")) (match_operand:SF 1 "reg_or_0_operand" "rfG")) *************** *** 1974,1980 **** ;; It must come before the more general movdf pattern. ! (define_insn "" [(set (match_operand:DF 0 "general_operand" "=?r,e,o") ! (match_operand:DF 1 "" "?E,m,G"))] "TARGET_FPU && GET_CODE (operands[1]) == CONST_DOUBLE" "* --- 1975,1981 ---- ;; It must come before the more general movdf pattern. ! (define_insn "*movdf_const_insn" [(set (match_operand:DF 0 "general_operand" "=?r,e,o") ! (match_operand:DF 1 "" "?F,m,G"))] "TARGET_FPU && GET_CODE (operands[1]) == CONST_DOUBLE" "* *************** *** 2011,2015 **** }") ! (define_insn "" [(set (match_operand:DF 0 "reg_or_nonsymb_mem_operand" "=T,U,e,r,Q,Q,e,r") (match_operand:DF 1 "reg_or_nonsymb_mem_operand" "U,T,e,r,e,r,Q,Q"))] --- 2012,2016 ---- }") ! (define_insn "*movdf_insn" [(set (match_operand:DF 0 "reg_or_nonsymb_mem_operand" "=T,U,e,r,Q,Q,e,r") (match_operand:DF 1 "reg_or_nonsymb_mem_operand" "U,T,e,r,e,r,Q,Q"))] *************** *** 2030,2034 **** ;; when -mno-fpu. ! (define_insn "" [(set (match_operand:DF 0 "reg_or_nonsymb_mem_operand" "=T,U,r,Q,&r") (match_operand:DF 1 "reg_or_nonsymb_mem_operand" "U,T,r,r,Q"))] --- 2031,2035 ---- ;; when -mno-fpu. ! (define_insn "*movdf_no_e_insn" [(set (match_operand:DF 0 "reg_or_nonsymb_mem_operand" "=T,U,r,Q,&r") (match_operand:DF 1 "reg_or_nonsymb_mem_operand" "U,T,r,r,Q"))] *************** *** 2070,2074 **** }") ! (define_insn "" [(set (mem:DF (match_operand:SI 0 "symbolic_operand" "i,i")) (match_operand:DF 1 "reg_or_0_operand" "re,G")) --- 2071,2075 ---- }") ! (define_insn "*store_df" [(set (mem:DF (match_operand:SI 0 "symbolic_operand" "i,i")) (match_operand:DF 1 "reg_or_0_operand" "re,G")) *************** *** 2089,2095 **** ;; to be reloaded by putting the constant into memory. ;; It must come before the more general movtf pattern. ! (define_insn "" [(set (match_operand:TF 0 "general_operand" "=?r,e,o") ! (match_operand:TF 1 "" "?E,m,G"))] "TARGET_FPU && GET_CODE (operands[1]) == CONST_DOUBLE" "* --- 2090,2096 ---- ;; to be reloaded by putting the constant into memory. ;; It must come before the more general movtf pattern. ! (define_insn "*movtf_const_insn" [(set (match_operand:TF 0 "general_operand" "=?r,e,o") ! (match_operand:TF 1 "" "?F,m,G"))] "TARGET_FPU && GET_CODE (operands[1]) == CONST_DOUBLE" "* *************** *** 2130,2134 **** }") ! (define_insn "" [(set (match_operand:TF 0 "reg_or_nonsymb_mem_operand" "=e,r,Q,Q,e,&r") (match_operand:TF 1 "reg_or_nonsymb_mem_operand" "e,r,e,r,Q,Q"))] --- 2131,2135 ---- }") ! (define_insn "*movtf_insn" [(set (match_operand:TF 0 "reg_or_nonsymb_mem_operand" "=e,r,Q,Q,e,&r") (match_operand:TF 1 "reg_or_nonsymb_mem_operand" "e,r,e,r,Q,Q"))] *************** *** 2149,2153 **** ;; when -mno-fpu. ! (define_insn "" [(set (match_operand:TF 0 "reg_or_nonsymb_mem_operand" "=r,Q,&r") (match_operand:TF 1 "reg_or_nonsymb_mem_operand" "r,r,Q"))] --- 2150,2154 ---- ;; when -mno-fpu. ! (define_insn "*movtf_no_e_insn" [(set (match_operand:TF 0 "reg_or_nonsymb_mem_operand" "=r,Q,&r") (match_operand:TF 1 "reg_or_nonsymb_mem_operand" "r,r,Q"))] *************** *** 2167,2171 **** ;; byte alignment. Adding an offset of 8 or 12 to an 8 byte aligned %lo may ;; cause it to overflow. See also GO_IF_LEGITIMATE_ADDRESS. ! (define_insn "" [(set (mem:TF (match_operand:SI 0 "symbolic_operand" "i,i")) (match_operand:TF 1 "reg_or_0_operand" "re,G")) --- 2168,2172 ---- ;; byte alignment. Adding an offset of 8 or 12 to an 8 byte aligned %lo may ;; cause it to overflow. See also GO_IF_LEGITIMATE_ADDRESS. ! (define_insn "*store_tf" [(set (mem:TF (match_operand:SI 0 "symbolic_operand" "i,i")) (match_operand:TF 1 "reg_or_0_operand" "re,G")) *************** *** 2185,2190 **** ;; Sparc V9 conditional move instructions. ! ; ??? There is not actually a 32 bit version of this instruction. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2186,2325 ---- ;; Sparc V9 conditional move instructions. ! ;; We can handle larger constants here for some flavors, but for now we play ! ;; it safe and only allow those constants supported by all flavours. ! ! (define_expand "movsicc" ! [(set (match_operand:SI 0 "register_operand" "") ! (if_then_else (match_operand 1 "comparison_operator" "") ! (match_operand:SI 2 "arith10_operand" "") ! (match_operand:SI 3 "register_operand" "")))] ! "TARGET_V9" ! " ! { ! enum rtx_code code = GET_CODE (operands[1]); ! ! if (sparc_compare_op1 == const0_rtx ! && GET_CODE (sparc_compare_op0) == REG ! && GET_MODE (sparc_compare_op0) == DImode ! && v9_regcmp_p (code)) ! { ! operands[1] = gen_rtx (code, DImode, ! sparc_compare_op0, sparc_compare_op1); ! } ! else ! { ! rtx cc_reg = gen_compare_reg (code, ! sparc_compare_op0, sparc_compare_op1); ! operands[1] = gen_rtx (code, GET_MODE (cc_reg), cc_reg, const0_rtx); ! } ! }") ! ! (define_expand "movdicc" ! [(set (match_operand:DI 0 "register_operand" "") ! (if_then_else (match_operand 1 "comparison_operator" "") ! (match_operand:DI 2 "arith10_operand" "") ! (match_operand:DI 3 "register_operand" "")))] ! "TARGET_V9" ! " ! { ! enum rtx_code code = GET_CODE (operands[1]); ! ! if (sparc_compare_op1 == const0_rtx ! && GET_CODE (sparc_compare_op0) == REG ! && GET_MODE (sparc_compare_op0) == DImode ! && v9_regcmp_p (code)) ! { ! operands[1] = gen_rtx (code, DImode, ! sparc_compare_op0, sparc_compare_op1); ! } ! else ! { ! rtx cc_reg = gen_compare_reg (code, ! sparc_compare_op0, sparc_compare_op1); ! operands[1] = gen_rtx (code, GET_MODE (cc_reg), cc_reg, const0_rtx); ! } ! }") ! ! (define_expand "movsfcc" ! [(set (match_operand:SF 0 "register_operand" "") ! (if_then_else (match_operand 1 "comparison_operator" "") ! (match_operand:SF 2 "register_operand" "") ! (match_operand:SF 3 "register_operand" "")))] ! "TARGET_V9" ! " ! { ! enum rtx_code code = GET_CODE (operands[1]); ! ! if (sparc_compare_op1 == const0_rtx ! && GET_CODE (sparc_compare_op0) == REG ! && GET_MODE (sparc_compare_op0) == DImode ! && v9_regcmp_p (code)) ! { ! operands[1] = gen_rtx (code, DImode, ! sparc_compare_op0, sparc_compare_op1); ! } ! else ! { ! rtx cc_reg = gen_compare_reg (code, ! sparc_compare_op0, sparc_compare_op1); ! operands[1] = gen_rtx (code, GET_MODE (cc_reg), cc_reg, const0_rtx); ! } ! }") ! ! (define_expand "movdfcc" ! [(set (match_operand:DF 0 "register_operand" "") ! (if_then_else (match_operand 1 "comparison_operator" "") ! (match_operand:DF 2 "register_operand" "") ! (match_operand:DF 3 "register_operand" "")))] ! "TARGET_V9" ! " ! { ! enum rtx_code code = GET_CODE (operands[1]); ! ! if (sparc_compare_op1 == const0_rtx ! && GET_CODE (sparc_compare_op0) == REG ! && GET_MODE (sparc_compare_op0) == DImode ! && v9_regcmp_p (code)) ! { ! operands[1] = gen_rtx (code, DImode, ! sparc_compare_op0, sparc_compare_op1); ! } ! else ! { ! rtx cc_reg = gen_compare_reg (code, ! sparc_compare_op0, sparc_compare_op1); ! operands[1] = gen_rtx (code, GET_MODE (cc_reg), cc_reg, const0_rtx); ! } ! }") ! ! (define_expand "movtfcc" ! [(set (match_operand:TF 0 "register_operand" "") ! (if_then_else (match_operand 1 "comparison_operator" "") ! (match_operand:TF 2 "register_operand" "") ! (match_operand:TF 3 "register_operand" "")))] ! "TARGET_V9" ! " ! { ! enum rtx_code code = GET_CODE (operands[1]); ! ! if (sparc_compare_op1 == const0_rtx ! && GET_CODE (sparc_compare_op0) == REG ! && GET_MODE (sparc_compare_op0) == DImode ! && v9_regcmp_p (code)) ! { ! operands[1] = gen_rtx (code, DImode, ! sparc_compare_op0, sparc_compare_op1); ! } ! else ! { ! rtx cc_reg = gen_compare_reg (code, ! sparc_compare_op0, sparc_compare_op1); ! operands[1] = gen_rtx (code, GET_MODE (cc_reg), cc_reg, const0_rtx); ! } ! }") ! ! /* Conditional move define_insns. */ ! ! (define_insn "*movsi_cc_sp64" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2196,2200 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2331,2335 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdi_cc_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2206,2211 **** [(set_attr "type" "cmove")]) ! ;; ??? There is not actually a 32 bit version of this instruction. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2341,2345 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsi_ccx_sp64" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2217,2221 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2351,2355 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdi_ccx_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2227,2232 **** [(set_attr "type" "cmove")]) ! ;; ??? There is not actually a 32 bit version of this instruction. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2361,2365 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsi_ccfp_sp64" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2239,2244 **** [(set_attr "type" "cmove")]) ! ;; ??? There is not actually a 32 bit version of this instruction. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2372,2376 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsi_ccfpe_sp64" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2251,2255 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2383,2387 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdi_ccfp_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2262,2266 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" --- 2394,2398 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdi_ccfpe_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2273,2278 **** [(set_attr "type" "cmove")]) ! ;; ??? There is not actually a 32 bit version of this instruction. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "v9_regcmp_op" --- 2405,2409 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsi_cc_reg_sp64" [(set (match_operand:SI 0 "register_operand" "=r") (if_then_else (match_operator 1 "v9_regcmp_op" *************** *** 2285,2289 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "v9_regcmp_op" --- 2416,2420 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdi_cc_reg_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else (match_operator 1 "v9_regcmp_op" *************** *** 2296,2300 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "v9_regcmp_op" --- 2427,2431 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsf_cc_reg_sp64" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "v9_regcmp_op" *************** *** 2307,2311 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "v9_regcmp_op" --- 2438,2442 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdf_cc_reg_sp64" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "v9_regcmp_op" *************** *** 2318,2322 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "v9_regcmp_op" --- 2449,2453 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movtf_cc_reg_sp64" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "v9_regcmp_op" *************** *** 2329,2333 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" --- 2460,2464 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsf_ccfp_sp64" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2340,2344 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" --- 2471,2475 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsf_ccfpe_sp64" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2351,2355 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2482,2486 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdf_ccfp_sp64" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2362,2366 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2493,2497 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdf_ccfpe_sp64" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2373,2377 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2504,2508 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movtf_ccfp_sp64" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2384,2388 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2515,2519 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movtf_ccfpe_sp64" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2395,2399 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" --- 2526,2530 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsf_cc_sp64" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2405,2409 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2536,2540 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdf_cc_sp64" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2415,2419 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2546,2550 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movtf_cc_sp64" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2425,2429 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" --- 2556,2560 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movsf_ccx_sp64" [(set (match_operand:SF 0 "register_operand" "=f") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2435,2439 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2566,2570 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movdf_ccx_sp64" [(set (match_operand:DF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2445,2449 **** [(set_attr "type" "cmove")]) ! (define_insn "" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" --- 2576,2580 ---- [(set_attr "type" "cmove")]) ! (define_insn "*movtf_ccx_sp64" [(set (match_operand:TF 0 "register_operand" "=e") (if_then_else (match_operator 1 "comparison_operator" *************** *** 2484,2488 **** }") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))] --- 2615,2619 ---- }") ! (define_insn "*zero_extendhisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))] *************** *** 2497,2501 **** "") ! (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r,r") (zero_extend:HI (match_operand:QI 1 "sparc_operand" "r,Q")))] --- 2628,2632 ---- "") ! (define_insn "*zero_extendqihi2_insn" [(set (match_operand:HI 0 "register_operand" "=r,r") (zero_extend:HI (match_operand:QI 1 "sparc_operand" "r,Q")))] *************** *** 2513,2517 **** "") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r") (zero_extend:SI (match_operand:QI 1 "sparc_operand" "r,Q")))] --- 2644,2648 ---- "") ! (define_insn "*zero_extendqisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r,r") (zero_extend:SI (match_operand:QI 1 "sparc_operand" "r,Q")))] *************** *** 2529,2533 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:QI 1 "sparc_operand" "r,Q")))] --- 2660,2664 ---- "") ! (define_insn "*zero_extendqidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:QI 1 "sparc_operand" "r,Q")))] *************** *** 2562,2566 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:HI 1 "memory_operand" "m")))] --- 2693,2697 ---- }") ! (define_insn "*zero_extendhidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (match_operand:HI 1 "memory_operand" "m")))] *************** *** 2577,2581 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:SI 1 "sparc_operand" "r,Q")))] --- 2708,2712 ---- "") ! (define_insn "*zero_extendsidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (match_operand:SI 1 "sparc_operand" "r,Q")))] *************** *** 2589,2593 **** ;; Simplify comparisons of extended values. ! (define_insn "" [(set (reg:CC 0) (compare:CC (zero_extend:SI (match_operand:QI 0 "register_operand" "r")) --- 2720,2724 ---- ;; Simplify comparisons of extended values. ! (define_insn "*cmp_zero_extendqisi2" [(set (reg:CC 0) (compare:CC (zero_extend:SI (match_operand:QI 0 "register_operand" "r")) *************** *** 2597,2601 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC (zero_extend:SI (match_operand:QI 1 "register_operand" "r")) --- 2728,2732 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_zero_extendqisi2_set" [(set (reg:CC 0) (compare:CC (zero_extend:SI (match_operand:QI 1 "register_operand" "r")) *************** *** 2609,2613 **** ;; Similarly, handle SI->QI mode truncation followed by a compare. ! (define_insn "" [(set (reg:CC 0) (compare:CC (subreg:QI (match_operand:SI 0 "register_operand" "r") 0) --- 2740,2744 ---- ;; Similarly, handle SI->QI mode truncation followed by a compare. ! (define_insn "*cmp_siqi_trunc" [(set (reg:CC 0) (compare:CC (subreg:QI (match_operand:SI 0 "register_operand" "r") 0) *************** *** 2617,2621 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC (subreg:QI (match_operand:SI 1 "register_operand" "r") 0) --- 2748,2752 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_siqi_trunc_set" [(set (reg:CC 0) (compare:CC (subreg:QI (match_operand:SI 1 "register_operand" "r") 0) *************** *** 2656,2660 **** }") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))] --- 2787,2791 ---- }") ! (define_insn "*sign_extendhisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))] *************** *** 2693,2697 **** }") ! (define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))] --- 2824,2828 ---- }") ! (define_insn "*sign_extendqihi2_insn" [(set (match_operand:HI 0 "register_operand" "=r") (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))] *************** *** 2723,2727 **** }") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))] --- 2854,2858 ---- }") ! (define_insn "*sign_extendqisi2_insn" [(set (match_operand:SI 0 "register_operand" "=r") (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))] *************** *** 2753,2757 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:QI 1 "memory_operand" "m")))] --- 2884,2888 ---- }") ! (define_insn "*sign_extendqidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:QI 1 "memory_operand" "m")))] *************** *** 2783,2787 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:HI 1 "memory_operand" "m")))] --- 2914,2918 ---- }") ! (define_insn "*sign_extendhidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r") (sign_extend:DI (match_operand:HI 1 "memory_operand" "m")))] *************** *** 2796,2800 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (sign_extend:DI (match_operand:SI 1 "sparc_operand" "r,Q")))] --- 2927,2931 ---- "") ! (define_insn "*sign_extendsidi2_insn" [(set (match_operand:DI 0 "register_operand" "=r,r") (sign_extend:DI (match_operand:SI 1 "sparc_operand" "r,Q")))] *************** *** 2809,2813 **** ;; because combine uses this as a canonical form. ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 2940,2944 ---- ;; because combine uses this as a canonical form. ! (define_insn "*cmp_zero_extract" [(set (reg:CC 0) (compare:CC *************** *** 2827,2831 **** }") ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 2958,2962 ---- }") ! (define_insn "*cmp_zero_extract_sp64" [(set (reg:CCX 0) (compare:CCX *************** *** 2957,2961 **** }") ! (define_insn "" [(parallel [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "general_operand" "rm"))) --- 3088,3092 ---- }") ! (define_insn "*floatdisf2_insn" [(parallel [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "general_operand" "rm"))) *************** *** 2974,2978 **** (set_attr "length" "3")]) ! (define_insn "" [(parallel [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:DI 1 "general_operand" "rm"))) --- 3105,3109 ---- (set_attr "length" "3")]) ! (define_insn "*floatdidf2_insn" [(parallel [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:DI 1 "general_operand" "rm"))) *************** *** 2991,2995 **** (set_attr "length" "3")]) ! (define_insn "" [(parallel [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:DI 1 "general_operand" "rm"))) --- 3122,3126 ---- (set_attr "length" "3")]) ! (define_insn "*floatditf2_insn" [(parallel [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:DI 1 "general_operand" "rm"))) *************** *** 3010,3014 **** ;; ??? Ideally, these are what we would like to use. ! (define_insn "floatdisf2_v9" [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "e")))] --- 3141,3145 ---- ;; ??? Ideally, these are what we would like to use. ! (define_insn "floatdisf2_sp64" [(set (match_operand:SF 0 "register_operand" "=f") (float:SF (match_operand:DI 1 "register_operand" "e")))] *************** *** 3017,3021 **** [(set_attr "type" "fp")]) ! (define_insn "floatdidf2_v9" [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:DI 1 "register_operand" "e")))] --- 3148,3152 ---- [(set_attr "type" "fp")]) ! (define_insn "floatdidf2_sp64" [(set (match_operand:DF 0 "register_operand" "=e") (float:DF (match_operand:DI 1 "register_operand" "e")))] *************** *** 3024,3028 **** [(set_attr "type" "fp")]) ! (define_insn "floatditf2_v9" [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:DI 1 "register_operand" "e")))] --- 3155,3159 ---- [(set_attr "type" "fp")]) ! (define_insn "floatditf2_sp64" [(set (match_operand:TF 0 "register_operand" "=e") (float:TF (match_operand:DI 1 "register_operand" "e")))] *************** *** 3099,3103 **** }") ! (define_insn "" [(parallel [(set (match_operand:DI 0 "general_operand" "=rm") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f")))) --- 3230,3234 ---- }") ! (define_insn "*fix_truncsfdi2_insn" [(parallel [(set (match_operand:DI 0 "general_operand" "=rm") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f")))) *************** *** 3116,3120 **** (set_attr "length" "3")]) ! (define_insn "" [(parallel [(set (match_operand:DI 0 "general_operand" "=rm") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e")))) --- 3247,3251 ---- (set_attr "length" "3")]) ! (define_insn "*fix_truncdfdi2_insn" [(parallel [(set (match_operand:DI 0 "general_operand" "=rm") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e")))) *************** *** 3133,3137 **** (set_attr "length" "3")]) ! (define_insn "" [(parallel [(set (match_operand:DI 0 "general_operand" "=rm") (fix:DI (fix:TF (match_operand:TF 1 "register_operand" "e")))) --- 3264,3268 ---- (set_attr "length" "3")]) ! (define_insn "*fix_trunctfdi2_insn" [(parallel [(set (match_operand:DI 0 "general_operand" "=rm") (fix:DI (fix:TF (match_operand:TF 1 "register_operand" "e")))) *************** *** 3152,3156 **** ;; ??? Ideally, these are what we would like to use. ! (define_insn "fix_truncsfdi2_v9" [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] --- 3283,3287 ---- ;; ??? Ideally, these are what we would like to use. ! (define_insn "fix_truncsfdi2_sp64" [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f"))))] *************** *** 3159,3163 **** [(set_attr "type" "fp")]) ! (define_insn "fix_truncdfdi2_v9" [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e"))))] --- 3290,3294 ---- [(set_attr "type" "fp")]) ! (define_insn "fix_truncdfdi2_sp64" [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e"))))] *************** *** 3166,3170 **** [(set_attr "type" "fp")]) ! (define_insn "fix_trunctfdi2_v9" [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:TF (match_operand:TF 1 "register_operand" "e"))))] --- 3297,3301 ---- [(set_attr "type" "fp")]) ! (define_insn "fix_trunctfdi2_sp64" [(set (match_operand:DI 0 "register_operand" "=e") (fix:DI (fix:TF (match_operand:TF 1 "register_operand" "e"))))] *************** *** 3193,3197 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3324,3328 ---- }") ! (define_insn "*adddi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3229,3233 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3360,3364 ---- [(set_attr "length" "2")]) ! (define_insn "*adddi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3244,3248 **** [(set_attr "type" "ialu")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (plus:SI (match_operand:SI 0 "arith_operand" "%r") --- 3375,3379 ---- [(set_attr "type" "ialu")]) ! (define_insn "*cmp_cc_plus" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (plus:SI (match_operand:SI 0 "arith_operand" "%r") *************** *** 3253,3257 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (plus:DI (match_operand:DI 0 "arith_double_operand" "%r") --- 3384,3388 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_ccx_plus" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (plus:DI (match_operand:DI 0 "arith_double_operand" "%r") *************** *** 3262,3266 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (plus:SI (match_operand:SI 1 "arith_operand" "%r") --- 3393,3397 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_plus_set" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (plus:SI (match_operand:SI 1 "arith_operand" "%r") *************** *** 3272,3276 **** "addcc %1,%2,%0") ! (define_insn "" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3403,3407 ---- "addcc %1,%2,%0") ! (define_insn "*cmp_ccx_plus_set" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (plus:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3300,3304 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") --- 3431,3435 ---- }") ! (define_insn "*subdi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") *************** *** 3336,3340 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") --- 3467,3471 ---- [(set_attr "length" "2")]) ! (define_insn "*subdi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (minus:DI (match_operand:DI 1 "register_operand" "r") *************** *** 3351,3355 **** [(set_attr "type" "ialu")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (minus:SI (match_operand:SI 0 "register_operand" "r") --- 3482,3486 ---- [(set_attr "type" "ialu")]) ! (define_insn "*cmp_minus_cc" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (minus:SI (match_operand:SI 0 "register_operand" "r") *************** *** 3360,3364 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (minus:DI (match_operand:DI 0 "register_operand" "r") --- 3491,3495 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_minus_ccx" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (minus:DI (match_operand:DI 0 "register_operand" "r") *************** *** 3369,3373 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (minus:SI (match_operand:SI 1 "register_operand" "r") --- 3500,3504 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_minus_cc_set" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (minus:SI (match_operand:SI 1 "register_operand" "r") *************** *** 3379,3383 **** "subcc %1,%2,%0") ! (define_insn "" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (minus:DI (match_operand:DI 1 "register_operand" "r") --- 3510,3514 ---- "subcc %1,%2,%0") ! (define_insn "*cmp_minus_ccx_set" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (minus:DI (match_operand:DI 1 "register_operand" "r") *************** *** 3409,3413 **** ;; It is not known whether this will match. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (mult:SI (match_operand:SI 1 "arith_operand" "%r") --- 3540,3544 ---- ;; It is not known whether this will match. ! (define_insn "*cmp_mul_set" [(set (match_operand:SI 0 "register_operand" "=r") (mult:SI (match_operand:SI 1 "arith_operand" "%r") *************** *** 3434,3438 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) --- 3565,3569 ---- }") ! (define_insn "*mulsidi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) *************** *** 3442,3446 **** [(set_attr "length" "2")]) ! ;; Extra pattern, because sign_extend of a constant isn't legal. (define_insn "const_mulsidi3" --- 3573,3577 ---- [(set_attr "length" "2")]) ! ;; Extra pattern, because sign_extend of a constant isn't valid. (define_insn "const_mulsidi3" *************** *** 3468,3472 **** }") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI --- 3599,3603 ---- }") ! (define_insn "*smulsidi3_highpart_sp32" [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI *************** *** 3502,3506 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) --- 3633,3637 ---- }") ! (define_insn "*umulsidi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) *************** *** 3510,3514 **** [(set_attr "length" "2")]) ! ;; Extra pattern, because sign_extend of a constant isn't legal. (define_insn "const_umulsidi3" --- 3641,3645 ---- [(set_attr "length" "2")]) ! ;; Extra pattern, because sign_extend of a constant isn't valid. (define_insn "const_umulsidi3" *************** *** 3536,3540 **** }") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI --- 3667,3671 ---- }") ! (define_insn "*umulsidi3_highpart_sp32" [(set (match_operand:SI 0 "register_operand" "=r") (truncate:SI *************** *** 3577,3581 **** ;; It is not known whether this will match. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (div:SI (match_operand:SI 1 "register_operand" "r") --- 3708,3712 ---- ;; It is not known whether this will match. ! (define_insn "*cmp_sdiv_cc_set" [(set (match_operand:SI 0 "register_operand" "=r") (div:SI (match_operand:SI 1 "register_operand" "r") *************** *** 3606,3610 **** ;; It is not known whether this will match. ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (udiv:SI (match_operand:SI 1 "register_operand" "r") --- 3737,3741 ---- ;; It is not known whether this will match. ! (define_insn "*cmp_udiv_cc_set" [(set (match_operand:SI 0 "register_operand" "=r") (udiv:SI (match_operand:SI 1 "register_operand" "r") *************** *** 3628,3632 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3759,3763 ---- "") ! (define_insn "*anddi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3662,3666 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3793,3797 ---- [(set_attr "length" "2")]) ! (define_insn "*anddi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3692,3696 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (not:DI (match_operand:DI 1 "register_operand" "r")) --- 3823,3827 ---- }") ! (define_insn "*and_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (not:DI (match_operand:DI 1 "register_operand" "r")) *************** *** 3700,3704 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (not:DI (match_operand:DI 1 "register_operand" "r")) --- 3831,3835 ---- [(set_attr "length" "2")]) ! (define_insn "*and_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (and:DI (not:DI (match_operand:DI 1 "register_operand" "r")) *************** *** 3707,3711 **** "andn %2,%1,%0") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (and:SI (not:SI (match_operand:SI 1 "register_operand" "r")) --- 3838,3842 ---- "andn %2,%1,%0") ! (define_insn "*and_not_si" [(set (match_operand:SI 0 "register_operand" "=r") (and:SI (not:SI (match_operand:SI 1 "register_operand" "r")) *************** *** 3722,3726 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3853,3857 ---- "") ! (define_insn "*iordi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3756,3760 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3887,3891 ---- [(set_attr "length" "2")]) ! (define_insn "*iordi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3786,3790 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (not:DI (match_operand:DI 1 "register_operand" "r")) --- 3917,3921 ---- }") ! (define_insn "*or_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (not:DI (match_operand:DI 1 "register_operand" "r")) *************** *** 3794,3798 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (not:DI (match_operand:DI 1 "register_operand" "r")) --- 3925,3929 ---- [(set_attr "length" "2")]) ! (define_insn "*or_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (ior:DI (not:DI (match_operand:DI 1 "register_operand" "r")) *************** *** 3801,3805 **** "orn %2,%1,%0") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (ior:SI (not:SI (match_operand:SI 1 "register_operand" "r")) --- 3932,3936 ---- "orn %2,%1,%0") ! (define_insn "*or_not_si" [(set (match_operand:SI 0 "register_operand" "=r") (ior:SI (not:SI (match_operand:SI 1 "register_operand" "r")) *************** *** 3816,3820 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (xor:DI (match_operand:DI 1 "arith_double_operand" "%r") --- 3947,3951 ---- "") ! (define_insn "*xorsi3_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (xor:DI (match_operand:DI 1 "arith_double_operand" "%r") *************** *** 3850,3854 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (xor:DI (match_operand:DI 1 "arith_double_operand" "%rJ") --- 3981,3985 ---- [(set_attr "length" "2")]) ! (define_insn "*xordi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (xor:DI (match_operand:DI 1 "arith_double_operand" "%rJ") *************** *** 3897,3901 **** ;; xnor patterns. Note that (a ^ ~b) == (~a ^ b) == ~(a ^ b). ;; Combine now canonicalizes to the rightmost expression. ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_operand:DI 1 "register_operand" "r") --- 4028,4032 ---- ;; xnor patterns. Note that (a ^ ~b) == (~a ^ b) == ~(a ^ b). ;; Combine now canonicalizes to the rightmost expression. ! (define_insn "*xor_not_di_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_operand:DI 1 "register_operand" "r") *************** *** 3905,3909 **** [(set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") --- 4036,4040 ---- [(set_attr "length" "2")]) ! (define_insn "*xor_not_di_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (xor:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") *************** *** 3912,3916 **** "xnor %r1,%2,%0") ! (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (not:SI (xor:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") --- 4043,4047 ---- "xnor %r1,%2,%0") ! (define_insn "*xor_not_si" [(set (match_operand:SI 0 "register_operand" "=r") (not:SI (xor:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") *************** *** 3923,3927 **** ;; want to set the condition code. ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 4054,4058 ---- ;; want to set the condition code. ! (define_insn "*cmp_cc_arith_op" [(set (reg:CC 0) (compare:CC *************** *** 3934,3938 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 4065,4069 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_ccx_arith_op" [(set (reg:CCX 0) (compare:CCX *************** *** 3945,3949 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 4076,4080 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_arith_op_set" [(set (reg:CC 0) (compare:CC *************** *** 3957,3961 **** "%A3cc %1,%2,%0") ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 4088,4092 ---- "%A3cc %1,%2,%0") ! (define_insn "*cmp_ccx_arith_op_set" [(set (reg:CCX 0) (compare:CCX *************** *** 3969,3973 **** "%A3cc %1,%2,%0") ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 4100,4104 ---- "%A3cc %1,%2,%0") ! (define_insn "*cmp_cc_xor_not" [(set (reg:CC 0) (compare:CC *************** *** 3979,3983 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 4110,4114 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_ccx_xor_not" [(set (reg:CCX 0) (compare:CCX *************** *** 3989,3993 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 4120,4124 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_xor_not_set" [(set (reg:CC 0) (compare:CC *************** *** 4000,4004 **** "xnorcc %r1,%2,%0") ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 4131,4135 ---- "xnorcc %r1,%2,%0") ! (define_insn "*cmp_ccx_xor_not_set" [(set (reg:CCX 0) (compare:CCX *************** *** 4011,4015 **** "xnorcc %r1,%2,%0") ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 4142,4146 ---- "xnorcc %r1,%2,%0") ! (define_insn "*cmp_cc_arith_op_not" [(set (reg:CC 0) (compare:CC *************** *** 4022,4026 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 4153,4157 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_ccx_arith_op_not" [(set (reg:CCX 0) (compare:CCX *************** *** 4033,4037 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC --- 4164,4168 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_arith_op_not_set" [(set (reg:CC 0) (compare:CC *************** *** 4045,4049 **** "%B3cc %r2,%1,%0") ! (define_insn "" [(set (reg:CCX 0) (compare:CCX --- 4176,4180 ---- "%B3cc %r2,%1,%0") ! (define_insn "*cmp_ccx_arith_op_not_set" [(set (reg:CCX 0) (compare:CCX *************** *** 4076,4080 **** }") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r"))) --- 4207,4211 ---- }") ! (define_insn "*negdi2_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r"))) *************** *** 4085,4089 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r")))] --- 4216,4220 ---- (set_attr "length" "2")]) ! (define_insn "*negdi2_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (neg:DI (match_operand:DI 1 "register_operand" "r")))] *************** *** 4100,4104 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (neg:SI (match_operand:SI 0 "arith_operand" "rI")) --- 4231,4235 ---- [(set_attr "type" "unary")]) ! (define_insn "*cmp_cc_neg" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (neg:SI (match_operand:SI 0 "arith_operand" "rI")) *************** *** 4108,4112 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (neg:DI (match_operand:DI 0 "arith_double_operand" "rHI")) --- 4239,4243 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_ccx_neg" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (neg:DI (match_operand:DI 0 "arith_double_operand" "rHI")) *************** *** 4116,4120 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (neg:SI (match_operand:SI 1 "arith_operand" "rI")) --- 4247,4251 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_set_neg" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (neg:SI (match_operand:SI 1 "arith_operand" "rI")) *************** *** 4126,4130 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (neg:DI (match_operand:DI 1 "arith_double_operand" "rHI")) --- 4257,4261 ---- [(set_attr "type" "unary")]) ! (define_insn "*cmp_ccx_set_neg" [(set (reg:CCX_NOOV 0) (compare:CCX_NOOV (neg:DI (match_operand:DI 1 "arith_double_operand" "rHI")) *************** *** 4144,4148 **** "") ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_operand:DI 1 "register_operand" "r")))] --- 4275,4279 ---- "") ! (define_insn "*one_cmpldi2_sp32" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_operand:DI 1 "register_operand" "r")))] *************** *** 4152,4156 **** (set_attr "length" "2")]) ! (define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_operand:DI 1 "arith_double_operand" "rHI")))] --- 4283,4287 ---- (set_attr "length" "2")]) ! (define_insn "*one_cmpldi2_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (not:DI (match_operand:DI 1 "arith_double_operand" "rHI")))] *************** *** 4166,4170 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC (not:SI (match_operand:SI 0 "arith_operand" "rI")) --- 4297,4301 ---- [(set_attr "type" "unary")]) ! (define_insn "*cmp_cc_not" [(set (reg:CC 0) (compare:CC (not:SI (match_operand:SI 0 "arith_operand" "rI")) *************** *** 4174,4178 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CCX 0) (compare:CCX (not:DI (match_operand:DI 0 "arith_double_operand" "rHI")) --- 4305,4309 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_ccx_not" [(set (reg:CCX 0) (compare:CCX (not:DI (match_operand:DI 0 "arith_double_operand" "rHI")) *************** *** 4182,4186 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC 0) (compare:CC (not:SI (match_operand:SI 1 "arith_operand" "rI")) --- 4313,4317 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_set_not" [(set (reg:CC 0) (compare:CC (not:SI (match_operand:SI 1 "arith_operand" "rI")) *************** *** 4192,4196 **** [(set_attr "type" "unary")]) ! (define_insn "" [(set (reg:CCX 0) (compare:CCX (not:DI (match_operand:DI 1 "arith_double_operand" "rHI")) --- 4323,4327 ---- [(set_attr "type" "unary")]) ! (define_insn "*cmp_ccx_set_not" [(set (reg:CCX 0) (compare:CCX (not:DI (match_operand:DI 1 "arith_double_operand" "rHI")) *************** *** 4276,4280 **** [(set_attr "type" "fpmul")]) ! (define_insn "" [(set (match_operand:DF 0 "register_operand" "=e") (mult:DF (float_extend:DF (match_operand:SF 1 "register_operand" "f")) --- 4407,4411 ---- [(set_attr "type" "fpmul")]) ! (define_insn "*muldf3_extend" [(set (match_operand:DF 0 "register_operand" "=e") (mult:DF (float_extend:DF (match_operand:SF 1 "register_operand" "f")) *************** *** 4284,4288 **** [(set_attr "type" "fpmul")]) ! (define_insn "" [(set (match_operand:TF 0 "register_operand" "=e") (mult:TF (float_extend:TF (match_operand:DF 1 "register_operand" "e")) --- 4415,4419 ---- [(set_attr "type" "fpmul")]) ! (define_insn "*multf3_extend" [(set (match_operand:TF 0 "register_operand" "=e") (mult:TF (float_extend:TF (match_operand:DF 1 "register_operand" "e")) *************** *** 4455,4459 **** }") ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (ashift:SI (match_operand:SI 0 "register_operand" "r") --- 4586,4590 ---- }") ! (define_insn "*cmp_cc_ashift_1" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (ashift:SI (match_operand:SI 0 "register_operand" "r") *************** *** 4464,4468 **** [(set_attr "type" "compare")]) ! (define_insn "" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (ashift:SI (match_operand:SI 1 "register_operand" "r") --- 4595,4599 ---- [(set_attr "type" "compare")]) ! (define_insn "*cmp_cc_set_ashift_1" [(set (reg:CC_NOOV 0) (compare:CC_NOOV (ashift:SI (match_operand:SI 1 "register_operand" "r") *************** *** 4545,4549 **** [(parallel [(set (pc) (match_operand 0 "register_operand" "r")) (use (label_ref (match_operand 1 "" "")))])] ! "" " { --- 4676,4680 ---- [(parallel [(set (pc) (match_operand 0 "register_operand" "r")) (use (label_ref (match_operand 1 "" "")))])] ! "! TARGET_MEDANY" " { *************** *** 4579,4583 **** [(set_attr "type" "uncond_branch")]) ! (define_insn "" [(set (pc) (match_operand:SI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] --- 4710,4714 ---- [(set_attr "type" "uncond_branch")]) ! (define_insn "*tablejump_sp32" [(set (pc) (match_operand:SI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] *************** *** 4586,4590 **** [(set_attr "type" "uncond_branch")]) ! (define_insn "" [(set (pc) (match_operand:DI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] --- 4717,4721 ---- [(set_attr "type" "uncond_branch")]) ! (define_insn "*tablejump_sp64" [(set (pc) (match_operand:DI 0 "address_operand" "p")) (use (label_ref (match_operand 1 "" "")))] *************** *** 4593,4597 **** [(set_attr "type" "uncond_branch")]) ! (define_insn "" [(set (pc) (label_ref (match_operand 0 "" ""))) (set (reg:SI 15) (label_ref (match_dup 0)))] --- 4724,4728 ---- [(set_attr "type" "uncond_branch")]) ! (define_insn "*get_pc_sp32" [(set (pc) (label_ref (match_operand 0 "" ""))) (set (reg:SI 15) (label_ref (match_dup 0)))] *************** *** 4600,4604 **** [(set_attr "type" "uncond_branch")]) ! (define_insn "" [(set (pc) (label_ref (match_operand 0 "" ""))) (set (reg:DI 15) (label_ref (match_dup 0)))] --- 4731,4735 ---- [(set_attr "type" "uncond_branch")]) ! (define_insn "*get_pc_sp64" [(set (pc) (label_ref (match_operand 0 "" ""))) (set (reg:DI 15) (label_ref (match_dup 0)))] *************** *** 4607,4614 **** [(set_attr "type" "uncond_branch")]) ;; This pattern recognizes the "instruction" that appears in ;; a function call that wants a structure value, ;; to inform the called function if compiled with Sun CC. ! ;(define_insn "" ; [(match_operand:SI 0 "immediate_operand" "")] ; "GET_CODE (operands[0]) == CONST_INT && INTVAL (operands[0]) > 0" --- 4738,4779 ---- [(set_attr "type" "uncond_branch")]) + ;; Implement a switch statement for the medium/anywhere code model. + ;; This wouldn't be necessary if we could distinguish label refs of the jump + ;; table from other label refs. The problem is that jump tables live in the + ;; .rodata section and thus we need to add %g4 to get their address. + + (define_expand "casesi" + [(set (match_dup 5) + (minus:SI (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "nonmemory_operand" ""))) + (set (reg:CC 0) + (compare:CC (match_dup 5) + (match_operand:SI 2 "nonmemory_operand" ""))) + (set (pc) + (if_then_else (gtu (reg:CC 0) + (const_int 0)) + (label_ref (match_operand 4 "" "")) + (pc))) + (parallel [(set (match_dup 6) (high:DI (label_ref (match_operand 3 "" "")))) + (clobber (reg:DI 1))]) + (set (match_dup 6) + (lo_sum:DI (match_dup 6) (label_ref (match_dup 3)))) + (set (match_dup 6) (plus:DI (match_dup 6) (reg:DI 4))) + (set (match_dup 7) (zero_extend:DI (match_dup 5))) + (set (match_dup 7) (ashift:DI (match_dup 7) (const_int 3))) + (set (match_dup 7) (mem:DI (plus:DI (match_dup 6) (match_dup 7)))) + (set (pc) (match_dup 7))] + "TARGET_MEDANY" + " + { + operands[5] = gen_reg_rtx (SImode); + operands[6] = gen_reg_rtx (DImode); + operands[7] = gen_reg_rtx (DImode); + }") + ;; This pattern recognizes the "instruction" that appears in ;; a function call that wants a structure value, ;; to inform the called function if compiled with Sun CC. ! ;(define_insn "*unimp_insn" ; [(match_operand:SI 0 "immediate_operand" "")] ; "GET_CODE (operands[0]) == CONST_INT && INTVAL (operands[0]) > 0" *************** *** 4700,4704 **** ;; in the address may not be properly reloaded. ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "address_operand" "p")) (match_operand 1 "" "")) --- 4865,4869 ---- ;; in the address may not be properly reloaded. ! (define_insn "*call_address_sp32" [(call (mem:SI (match_operand:SI 0 "address_operand" "p")) (match_operand 1 "" "")) *************** *** 4712,4716 **** [(set_attr "type" "call")]) ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) --- 4877,4881 ---- [(set_attr "type" "call")]) ! (define_insn "*call_symbolic_sp32" [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) *************** *** 4724,4728 **** [(set_attr "type" "call")]) ! (define_insn "" [(call (mem:SI (match_operand:DI 0 "address_operand" "p")) (match_operand 1 "" "")) --- 4889,4893 ---- [(set_attr "type" "call")]) ! (define_insn "*call_address_sp64" [(call (mem:SI (match_operand:DI 0 "address_operand" "p")) (match_operand 1 "" "")) *************** *** 4736,4740 **** [(set_attr "type" "call")]) ! (define_insn "" [(call (mem:SI (match_operand:DI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) --- 4901,4905 ---- [(set_attr "type" "call")]) ! (define_insn "*call_symbolic_sp64" [(call (mem:SI (match_operand:DI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) *************** *** 4750,4754 **** ;; This is a call that wants a structure value. ;; There is no such critter for v9 (??? we may need one anyway). ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "address_operand" "p")) (match_operand 1 "" "")) --- 4915,4919 ---- ;; This is a call that wants a structure value. ;; There is no such critter for v9 (??? we may need one anyway). ! (define_insn "*call_address_struct_value_sp32" [(call (mem:SI (match_operand:SI 0 "address_operand" "p")) (match_operand 1 "" "")) *************** *** 4765,4769 **** ;; This is a call that wants a structure value. ;; There is no such critter for v9 (??? we may need one anyway). ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) --- 4930,4934 ---- ;; This is a call that wants a structure value. ;; There is no such critter for v9 (??? we may need one anyway). ! (define_insn "*call_symbolic_struct_value_sp32" [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) *************** *** 4780,4784 **** ;; This is a call that may want a structure value. This is used for ;; untyped_calls. ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "address_operand" "p")) (match_operand 1 "" "")) --- 4945,4949 ---- ;; This is a call that may want a structure value. This is used for ;; untyped_calls. ! (define_insn "*call_address_untyped_struct_value_sp32" [(call (mem:SI (match_operand:SI 0 "address_operand" "p")) (match_operand 1 "" "")) *************** *** 4794,4798 **** ;; This is a call that wants a structure value. ! (define_insn "" [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) --- 4959,4963 ---- ;; This is a call that wants a structure value. ! (define_insn "*call_symbolic_untyped_struct_value_sp32" [(call (mem:SI (match_operand:SI 0 "symbolic_operand" "s")) (match_operand 1 "" "")) *************** *** 4845,4849 **** }") ! (define_insn "" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:SI 1 "address_operand" "p")) --- 5010,5014 ---- }") ! (define_insn "*call_value_address_sp32" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:SI 1 "address_operand" "p")) *************** *** 4858,4862 **** [(set_attr "type" "call")]) ! (define_insn "" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:SI 1 "symbolic_operand" "s")) --- 5023,5027 ---- [(set_attr "type" "call")]) ! (define_insn "*call_value_symbolic_sp32" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:SI 1 "symbolic_operand" "s")) *************** *** 4871,4875 **** [(set_attr "type" "call")]) ! (define_insn "" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:DI 1 "address_operand" "p")) --- 5036,5040 ---- [(set_attr "type" "call")]) ! (define_insn "*call_value_address_sp64" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:DI 1 "address_operand" "p")) *************** *** 4884,4888 **** [(set_attr "type" "call")]) ! (define_insn "" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:DI 1 "symbolic_operand" "s")) --- 5049,5053 ---- [(set_attr "type" "call")]) ! (define_insn "*call_value_symbolic_sp64" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:DI 1 "symbolic_operand" "s")) *************** *** 5002,5006 **** "") ! (define_insn "" [(set (pc) (match_operand:SI 0 "address_operand" "p"))] "! TARGET_PTR64" --- 5167,5171 ---- "") ! (define_insn "*branch_sp32" [(set (pc) (match_operand:SI 0 "address_operand" "p"))] "! TARGET_PTR64" *************** *** 5008,5012 **** [(set_attr "type" "uncond_branch")]) ! (define_insn "" [(set (pc) (match_operand:DI 0 "address_operand" "p"))] "TARGET_PTR64" --- 5173,5177 ---- [(set_attr "type" "uncond_branch")]) ! (define_insn "*branch_sp64" [(set (pc) (match_operand:DI 0 "address_operand" "p"))] "TARGET_PTR64" *************** *** 5014,5018 **** [(set_attr "type" "uncond_branch")]) ! ;; ??? This doesn't handle v9 yet. It also doesn't work with -mflat. (define_expand "nonlocal_goto" [(match_operand:SI 0 "general_operand" "") --- 5179,5183 ---- [(set_attr "type" "uncond_branch")]) ! ;; ??? Doesn't work with -mflat. (define_expand "nonlocal_goto" [(match_operand:SI 0 "general_operand" "") *************** *** 5031,5039 **** already one. */ if (GET_CODE (operands[0]) != REG) ! operands[0] = force_reg (SImode, operands[0]); emit_move_insn (virtual_stack_vars_rtx, operands[0]); /* Find the containing function's current nonlocal goto handler, which will do any cleanups and then jump to the label. */ ! emit_move_insn (gen_rtx (REG, SImode, 8), operands[1]); /* Restore %fp from stack pointer value for containing function. The restore insn that follows will move this to %sp, --- 5196,5204 ---- already one. */ if (GET_CODE (operands[0]) != REG) ! operands[0] = force_reg (Pmode, operands[0]); emit_move_insn (virtual_stack_vars_rtx, operands[0]); /* Find the containing function's current nonlocal goto handler, which will do any cleanups and then jump to the label. */ ! emit_move_insn (gen_rtx (REG, Pmode, 8), operands[1]); /* Restore %fp from stack pointer value for containing function. The restore insn that follows will move this to %sp, *************** *** 5047,5051 **** emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx)); emit_insn (gen_rtx (USE, VOIDmode, static_chain_rtx)); ! emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, SImode, 8))); /* Return, restoring reg window and jumping to goto handler. */ emit_insn (gen_goto_handler_and_restore ()); --- 5212,5216 ---- emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx)); emit_insn (gen_rtx (USE, VOIDmode, static_chain_rtx)); ! emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, Pmode, 8))); /* Return, restoring reg window and jumping to goto handler. */ emit_insn (gen_goto_handler_and_restore ()); *************** *** 5070,5076 **** (define_insn "flush" ! [(unspec_volatile [(match_operand 0 "" "")] 3)] "" ! "* return TARGET_V9 ? \"flush %a0\" : \"iflush %a0\";" [(set_attr "type" "misc")]) --- 5235,5241 ---- (define_insn "flush" ! [(unspec_volatile [(match_operand 0 "memory_operand" "m")] 3)] "" ! "* return TARGET_V9 ? \"flush %f0\" : \"iflush %f0\";" [(set_attr "type" "misc")]) *************** *** 5080,5084 **** ;; searches from the least significant bit. The bit index and treatment of ;; zero also differ. It takes at least 7 instructions to get the proper ! ;; result. Here is an obvious 8 instruction seequence. (define_insn "ffssi2" --- 5245,5249 ---- ;; searches from the least significant bit. The bit index and treatment of ;; zero also differ. It takes at least 7 instructions to get the proper ! ;; result. Here is an obvious 8 instruction sequence. (define_insn "ffssi2" *************** *** 5109,5146 **** (define_split ! [(set (match_operator 0 "memop" [(match_operand:SI 1 "symbolic_operand" "")]) ! (match_operand 2 "reg_or_0_operand" "")) ! (clobber (match_operand:SI 3 "register_operand" ""))] "! flag_pic" ! [(set (match_dup 3) (high:SI (match_dup 1))) ! (set (match_op_dup 0 [(lo_sum:SI (match_dup 3) (match_dup 1))]) ! (match_dup 2))] ! "") (define_split ! [(set (match_operator 0 "memop" ! [(match_operand:SI 1 "immediate_operand" "")]) ! (match_operand 2 "general_operand" "")) ! (clobber (match_operand:SI 3 "register_operand" ""))] "flag_pic" ! [(set (match_op_dup 0 [(match_dup 1)]) ! (match_dup 2))] " { ! operands[1] = legitimize_pic_address (operands[1], GET_MODE (operands[0]), ! operands[3]); }") (define_split [(set (match_operand 0 "register_operand" "") ! (match_operator 1 "memop" ! [(match_operand:SI 2 "immediate_operand" "")]))] "flag_pic" ! [(set (match_dup 0) ! (match_op_dup 1 [(match_dup 2)]))] " { ! operands[2] = legitimize_pic_address (operands[2], GET_MODE (operands[1]), ! operands[0]); }") --- 5274,5324 ---- (define_split ! [(set (match_operand 0 "splittable_symbolic_memory_operand" "") ! (match_operand 1 "reg_or_0_operand" "")) ! (clobber (match_operand:SI 2 "register_operand" ""))] "! flag_pic" ! [(set (match_dup 2) (high:SI (match_dup 3))) ! (set (match_dup 4) (match_dup 1))] ! " ! { ! operands[3] = XEXP (operands[0], 0); ! operands[4] = gen_rtx (MEM, GET_MODE (operands[0]), ! gen_rtx (LO_SUM, SImode, operands[2], operands[3])); ! MEM_IN_STRUCT_P (operands[4]) = MEM_IN_STRUCT_P (operands[0]); ! MEM_VOLATILE_P (operands[4]) = MEM_VOLATILE_P (operands[0]); ! RTX_UNCHANGING_P (operands[4]) = RTX_UNCHANGING_P (operands[0]); ! }") (define_split ! [(set (match_operand 0 "splittable_immediate_memory_operand" "") ! (match_operand 1 "general_operand" "")) ! (clobber (match_operand:SI 2 "register_operand" ""))] "flag_pic" ! [(set (match_dup 3) (match_dup 1))] " { ! rtx addr = legitimize_pic_address (XEXP (operands[0], 0), ! GET_MODE (operands[0]), ! operands[2]); ! operands[3] = gen_rtx (MEM, GET_MODE (operands[0]), addr); ! MEM_IN_STRUCT_P (operands[3]) = MEM_IN_STRUCT_P (operands[0]); ! MEM_VOLATILE_P (operands[3]) = MEM_VOLATILE_P (operands[0]); ! RTX_UNCHANGING_P (operands[3]) = RTX_UNCHANGING_P (operands[0]); }") (define_split [(set (match_operand 0 "register_operand" "") ! (match_operand 1 "splittable_immediate_memory_operand" ""))] "flag_pic" ! [(set (match_dup 0) (match_dup 2))] " { ! rtx addr = legitimize_pic_address (XEXP (operands[1], 0), ! GET_MODE (operands[1]), ! operands[0]); ! operands[2] = gen_rtx (MEM, GET_MODE (operands[1]), addr); ! MEM_IN_STRUCT_P (operands[2]) = MEM_IN_STRUCT_P (operands[1]); ! MEM_VOLATILE_P (operands[2]) = MEM_VOLATILE_P (operands[1]); ! RTX_UNCHANGING_P (operands[2]) = RTX_UNCHANGING_P (operands[1]); }") *************** *** 5149,5162 **** (define_split [(set (match_operand 0 "register_operand" "") ! (match_operator 1 "extend_op" ! [(match_operator 2 "memop" ! [(match_operand:SI 3 "immediate_operand" "")])]))] "flag_pic" ! [(set (match_dup 0) ! (match_op_dup 1 [(match_op_dup 2 [(match_dup 3)])]))] " { ! operands[3] = legitimize_pic_address (operands[3], GET_MODE (operands[2]), ! operands[0]); }") --- 5327,5342 ---- (define_split [(set (match_operand 0 "register_operand" "") ! (match_operator 1 "extend_op" [(match_operand 2 "splittable_immediate_memory_operand" "")]))] "flag_pic" ! [(set (match_dup 0) (match_op_dup 1 [(match_dup 3)]))] " { ! rtx addr = legitimize_pic_address (XEXP (operands[2], 0), ! GET_MODE (operands[2]), ! operands[0]); ! operands[3] = gen_rtx (MEM, GET_MODE (operands[2]), addr); ! MEM_IN_STRUCT_P (operands[3]) = MEM_IN_STRUCT_P (operands[2]); ! MEM_VOLATILE_P (operands[3]) = MEM_VOLATILE_P (operands[2]); ! RTX_UNCHANGING_P (operands[3]) = RTX_UNCHANGING_P (operands[2]); }") *************** *** 5456,5487 **** "ldsb %1,%0\;orcc %0,%%g0,%2") - (define_peephole - [(set (match_operand:HI 0 "register_operand" "") - (match_operand:HI 1 "memory_operand" "")) - (set (match_operand:SI 2 "register_operand" "") - (sign_extend:SI (match_dup 0)))] - "dead_or_set_p (insn, operands[0])" - "* - { - warning (\"bad peephole\"); - if (! MEM_VOLATILE_P (operands[1])) - abort (); - return \"ldsh %1,%2\"; - }") - - (define_peephole - [(set (match_operand:QI 0 "register_operand" "") - (match_operand:QI 1 "memory_operand" "")) - (set (match_operand:SI 2 "register_operand" "") - (sign_extend:SI (match_dup 0)))] - "dead_or_set_p (insn, operands[0])" - "* - { - warning (\"bad peephole\"); - if (! MEM_VOLATILE_P (operands[1])) - abort (); - return \"ldsb %1,%2\"; - }") - ;; Floating-point move peepholes ;; ??? v9: Do we want similar ones? --- 5636,5639 ---- *************** *** 5518,5522 **** ;; It might be possible to write one more general pattern instead of three. ! (define_insn "" [(set (match_operand:QI 0 "restore_operand" "") (match_operand:QI 1 "arith_operand" "rI")) --- 5670,5674 ---- ;; It might be possible to write one more general pattern instead of three. ! (define_insn "*return_qi" [(set (match_operand:QI 0 "restore_operand" "") (match_operand:QI 1 "arith_operand" "rI")) *************** *** 5532,5536 **** [(set_attr "type" "multi")]) ! (define_insn "" [(set (match_operand:HI 0 "restore_operand" "") (match_operand:HI 1 "arith_operand" "rI")) --- 5684,5688 ---- [(set_attr "type" "multi")]) ! (define_insn "*return_hi" [(set (match_operand:HI 0 "restore_operand" "") (match_operand:HI 1 "arith_operand" "rI")) *************** *** 5546,5550 **** [(set_attr "type" "multi")]) ! (define_insn "" [(set (match_operand:SI 0 "restore_operand" "") (match_operand:SI 1 "arith_operand" "rI")) --- 5698,5702 ---- [(set_attr "type" "multi")]) ! (define_insn "*return_si" [(set (match_operand:SI 0 "restore_operand" "") (match_operand:SI 1 "arith_operand" "rI")) *************** *** 5563,5567 **** ;; when the insn winds up in the epilogue. This can only happen when ;; ! TARGET_FPU because otherwise fp return values are in %f0. ! (define_insn "" [(set (match_operand:SF 0 "restore_operand" "r") (match_operand:SF 1 "register_operand" "r")) --- 5715,5719 ---- ;; when the insn winds up in the epilogue. This can only happen when ;; ! TARGET_FPU because otherwise fp return values are in %f0. ! (define_insn "*return_sf_no_fpu" [(set (match_operand:SF 0 "restore_operand" "r") (match_operand:SF 1 "register_operand" "r")) *************** *** 5577,5581 **** [(set_attr "type" "multi")]) ! (define_insn "" [(set (match_operand:SI 0 "restore_operand" "") (plus:SI (match_operand:SI 1 "arith_operand" "%r") --- 5729,5733 ---- [(set_attr "type" "multi")]) ! (define_insn "*return_addsi" [(set (match_operand:SI 0 "restore_operand" "") (plus:SI (match_operand:SI 1 "arith_operand" "%r") *************** *** 5592,5596 **** [(set_attr "type" "multi")]) ! (define_insn "" [(set (match_operand:DI 0 "restore_operand" "") (match_operand:DI 1 "arith_double_operand" "rHI")) --- 5744,5748 ---- [(set_attr "type" "multi")]) ! (define_insn "*return_di" [(set (match_operand:DI 0 "restore_operand" "") (match_operand:DI 1 "arith_double_operand" "rHI")) *************** *** 5600,5604 **** [(set_attr "type" "multi")]) ! (define_insn "" [(set (match_operand:DI 0 "restore_operand" "") (plus:DI (match_operand:DI 1 "arith_operand" "%r") --- 5752,5756 ---- [(set_attr "type" "multi")]) ! (define_insn "*return_adddi" [(set (match_operand:DI 0 "restore_operand" "") (plus:DI (match_operand:DI 1 "arith_operand" "%r") *************** *** 5612,5616 **** ;; is turned into addition) and because it would do the wrong thing ;; when operand 2 is -4096 (--4096 == 4096 is not a valid immediate). ! ;;(define_insn "" ;; [(set (match_operand:SI 0 "restore_operand" "") ;; (minus:SI (match_operand:SI 1 "register_operand" "r") --- 5764,5768 ---- ;; is turned into addition) and because it would do the wrong thing ;; when operand 2 is -4096 (--4096 == 4096 is not a valid immediate). ! ;;(define_insn "*minus_const" ;; [(set (match_operand:SI 0 "restore_operand" "") ;; (minus:SI (match_operand:SI 1 "register_operand" "r") *************** *** 5623,5627 **** ;; The following pattern is only generated by delayed-branch scheduling, ;; when the insn winds up in the epilogue. ! (define_insn "" [(set (reg:SF 32) (match_operand:SF 0 "register_operand" "f")) --- 5775,5779 ---- ;; The following pattern is only generated by delayed-branch scheduling, ;; when the insn winds up in the epilogue. ! (define_insn "*return_sf" [(set (reg:SF 32) (match_operand:SF 0 "register_operand" "f")) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sunos4.h gcc-2.7.0/config/sparc/sunos4.h *** gcc-2.6.3/config/sparc/sunos4.h --- gcc-2.7.0/config/sparc/sunos4.h Thu Jun 15 16:35:09 1995 *************** *** 0 **** --- 1,23 ---- + /* Definitions of target machine for GNU compiler, for SunOS 4.x + Copyright (C) 1994 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define SUNOS4_SHARED_LIBRARIES 1 + + #include "sparc/sparc.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/sysv4.h gcc-2.7.0/config/sparc/sysv4.h *** gcc-2.6.3/config/sparc/sysv4.h Fri Sep 2 14:23:46 1994 --- gcc-2.7.0/config/sparc/sysv4.h Thu Jun 15 16:37:19 1995 *************** *** 1,4 **** /* Target definitions for GNU compiler for Sparc running System V.4 ! Copyright (C) 1991, 1992 Free Software Foundation, Inc. Written by Ron Guilmette (rfg@netcom.com). --- 1,4 ---- /* Target definitions for GNU compiler for Sparc running System V.4 ! Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. Written by Ron Guilmette (rfg@netcom.com). *************** *** 18,22 **** 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 "sparc/sparc.h" --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "sparc/sparc.h" *************** *** 38,44 **** case of svr4 running on a Sparc. */ - #undef CTORS_SECTION_ASM_OP - #undef DTORS_SECTION_ASM_OP #undef INIT_SECTION_ASM_OP #undef CONST_SECTION_ASM_OP #undef TYPE_OPERAND_FMT --- 39,44 ---- case of svr4 running on a Sparc. */ #undef INIT_SECTION_ASM_OP + #undef FINI_SECTION_ASM_OP #undef CONST_SECTION_ASM_OP #undef TYPE_OPERAND_FMT *************** *** 78,99 **** } - /* The specialized code which needs to appear in the .init section prior - to the prologue code for `__do_global_ctors' (see crtstuff.c). - - On Sparcs running svr4, the /usr/ccs/lib/crti.o file (with gets linked - in prior to the crtbegin.o file) has a single `save' instruction in its - .init section. That `save' instruction tries to setup a stack frame for - the sake of any subsequent code in the .init section. Unfortunately, - the size it uses for the stack frame is only a guess, and is not really - adequate for our purposes. More importantly, we independently put our - own standard function prologue (for __do_global_ctors) into the .init - section and that function prologue includes its own `save' instruction! - Thus, unless we do something to correct the situation, we'll get *two* - stack frames allocated when crt0.o calls the code in the .init section, - and havoc will ensue. The following macro definition prevents such woes. - */ - - #define INIT_SECTION_PREAMBLE asm ("restore") - /* This is the string used to begin an assembly language comment for the Sparc/svr4 assembler. */ --- 78,81 ---- *************** *** 173,188 **** #define CONST_SECTION_ASM_OP ".section\t\".rodata\"" #define INIT_SECTION_ASM_OP ".section\t\".init\"" ! #define CTORS_SECTION_ASM_OP ".section\t\".ctors\",#alloc,#execinstr" ! #define DTORS_SECTION_ASM_OP ".section\t\".dtors\",#alloc,#execinstr" ! ! /* Assemble generic sections. ! This is currently only used to support section attributes. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, NAME) \ ! fprintf (FILE, ".section\t\"%s\",#alloc\n", NAME) ! /* If the host and target formats match, output the floats as hex. */ ! #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT ! #if defined (HOST_WORDS_BIG_ENDIAN) == WORDS_BIG_ENDIAN /* This is how to output assembly code to define a `float' constant. --- 155,195 ---- #define CONST_SECTION_ASM_OP ".section\t\".rodata\"" #define INIT_SECTION_ASM_OP ".section\t\".init\"" ! #define FINI_SECTION_ASM_OP ".section\t\".fini\"" ! /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. ! ! Note that we want to give these sections the SHF_WRITE attribute ! because these sections will actually contain data (i.e. tables of ! addresses of functions in the current root executable or shared library ! file) and, in the case of a shared library, the relocatable addresses ! will have to be properly resolved/relocated (and then written into) by ! the dynamic linker when it actually attaches the given shared library ! to the executing process. (Note that on SVR4, you may wish to use the ! `-z text' option to the ELF linker, when building a shared library, as ! an additional check that you are doing everything right. But if you do ! use the `-z text' option when building a shared library, you will get ! errors unless the .ctors and .dtors sections are marked as writable ! via the SHF_WRITE attribute.) */ ! ! #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t\".ctors\",#alloc,#write" ! #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t\".dtors\",#alloc,#write" ! /* A C statement to output something to the assembler file to switch to section ! NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or ! NULL_TREE. Some target formats do not support arbitrary sections. Do not ! define this macro in such cases. */ ! ! #undef ASM_OUTPUT_SECTION_NAME /* Override svr4.h's definition. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ ! do { \ ! if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ ! fprintf (FILE, ".section\t\"%s\",#alloc,#execinstr\n", (NAME)); \ ! else if ((DECL) && TREE_READONLY (DECL)) \ ! fprintf (FILE, ".section\t\"%s\",#alloc\n", (NAME)); \ ! else \ ! fprintf (FILE, ".section\t\"%s\",#alloc,#write\n", (NAME)); \ ! } while (0) /* This is how to output assembly code to define a `float' constant. *************** *** 210,216 **** fprintf((FILE), "\t.long\t0x%x\n", value[1]); \ } while (0) - - #endif /* word order matches */ - #endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */ /* This is how to output an assembler line defining a `long double' --- 217,220 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-sol2 gcc-2.7.0/config/sparc/t-sol2 *** gcc-2.6.3/config/sparc/t-sol2 Sun Dec 12 07:47:17 1993 --- gcc-2.7.0/config/sparc/t-sol2 Mon Mar 13 18:10:04 1995 *************** *** 2,7 **** # since the user may not have native 'cc' available ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null # gmon build rule: --- 2,7 ---- # since the user may not have native 'cc' available ! LIBGCC1 = ! CROSS_LIBGCC1 = # gmon build rule: *************** *** 17,18 **** --- 17,30 ---- crtn.o: $(srcdir)/config/sparc/sol2-cn.asm $(AS) -o crtn.o $(srcdir)/config/sparc/sol2-cn.asm + + # We need to use -fPIC when we are using gcc to compile the routines in + # crtstuff.c. This is only really needed when we are going to use gcc/g++ + # to produce a shared library, but since we don't know ahead of time when + # we will be doing that, we just always use -fPIC when compiling the + # routines in crtstuff.c. + + # Since the GNU assembler doesn't support PIC yet, we need to force gcc to + # use the native assembler when building crtstuff. If we're a + # cross-compiler, just give up on using PIC. + + CRTSTUFF_T_CFLAGS = `if [ -z "$(CROSS)" ]; then echo -fPIC -B/usr/ccs/bin/; fi` diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-sp64 gcc-2.7.0/config/sparc/t-sp64 *** gcc-2.6.3/config/sparc/t-sp64 Thu Jul 28 14:38:24 1994 --- gcc-2.7.0/config/sparc/t-sp64 Thu Jan 12 13:26:16 1995 *************** *** 1,3 **** ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1 --- 1,3 ---- ! LIBGCC1 = ! CROSS_LIBGCC1 = LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-sparcbare gcc-2.7.0/config/sparc/t-sparcbare *** gcc-2.6.3/config/sparc/t-sparcbare --- gcc-2.7.0/config/sparc/t-sparcbare Mon Dec 5 16:58:36 1994 *************** *** 0 **** --- 1,26 ---- + # configuration file for a bare sparc cpu, aout format files + + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = sparc/lb1spc.asm + LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... + + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + + # MULTILIB_OPTIONS should have msparclite too, but we'd have to make + # gas build... + MULTILIB_OPTIONS=msoft-float mv8 + MULTILIB_DIRNAMES=soft v8 + MULTILIB_MATCHES=msoft-float=mno-fpu + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-sparclite gcc-2.7.0/config/sparc/t-sparclite *** gcc-2.6.3/config/sparc/t-sparclite --- gcc-2.7.0/config/sparc/t-sparclite Thu Jan 12 13:35:47 1995 *************** *** 0 **** --- 1,17 ---- + CROSS_LIBGCC1 = libgcc1-asm.a + LIB1ASMSRC = sparc/lb1spl.asm + LIB1ASMFUNCS = _divsi3 _udivsi3 _modsi3 _umodsi3 + + # These are really part of libgcc1, but this will cause them to be + # built correctly, so... + + LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c + + dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define US_SOFTWARE_GOFAST' > dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + + fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-sunos40 gcc-2.7.0/config/sparc/t-sunos40 *** gcc-2.6.3/config/sparc/t-sunos40 Sat Aug 13 17:11:04 1994 --- gcc-2.7.0/config/sparc/t-sunos40 Thu Jan 12 13:26:19 1995 *************** *** 3,6 **** # multilib build. ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null --- 3,6 ---- # multilib build. ! LIBGCC1 = ! CROSS_LIBGCC1 = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-sunos41 gcc-2.7.0/config/sparc/t-sunos41 *** gcc-2.6.3/config/sparc/t-sunos41 Sat Aug 13 17:11:55 1994 --- gcc-2.7.0/config/sparc/t-sunos41 Thu Jan 12 13:26:21 1995 *************** *** 1,6 **** # SunOS 4.1.* ! LIBGCC1 = libgcc1.null ! CROSS_LIBGCC1 = libgcc1.null MULTILIB_OPTIONS=mv8 --- 1,6 ---- # SunOS 4.1.* ! LIBGCC1 = ! CROSS_LIBGCC1 = MULTILIB_OPTIONS=mv8 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/t-vxsparc gcc-2.7.0/config/sparc/t-vxsparc *** gcc-2.6.3/config/sparc/t-vxsparc --- gcc-2.7.0/config/sparc/t-vxsparc Thu Jan 12 13:26:24 1995 *************** *** 0 **** --- 1,13 ---- + LIBGCC1 = + CROSS_LIBGCC1 = + + # We don't want to put exit in libgcc.a for VxWorks, because VxWorks + # does not have _exit. + LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 -Dexit=unused_exit + + MULTILIB_OPTIONS=msoft-float mv8 + MULTILIB_DIRNAMES=soft v8 + MULTILIB_MATCHES=msoft-float=mno-fpu + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/vxsparc.h gcc-2.7.0/config/sparc/vxsparc.h *** gcc-2.6.3/config/sparc/vxsparc.h --- gcc-2.7.0/config/sparc/vxsparc.h Thu Jun 15 16:37:30 1995 *************** *** 0 **** --- 1,54 ---- + /* Definitions of target machine for GNU compiler. Vxworks SPARC version. + Copyright (C) 1994 Free Software Foundation, Inc. + Contributed by David Henkel-Wallace (gumby@cygnus.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "sparc/sparc-aout.h" + + /* Specify what to link with. */ + /* VxWorks does all the library stuff itself. */ + + #undef LIB_SPEC + #define LIB_SPEC "" + + /* Provide required defaults for linker -e. */ + #undef LINK_SPEC + #define LINK_SPEC "%{!nostdlib:%{!r*:%{!e*:-e start}}}" + + /* VxWorks provides the functionality of crt0.o and friends itself. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dsparc -Acpu(sparc) -Amachine(sparc)" + + #undef PTRDIFF_TYPE + #undef SIZE_TYPE + #undef WCHAR_TYPE + #undef WCHAR_TYPE_SIZE + + #define PTRDIFF_TYPE "long int" + #define SIZE_TYPE "unsigned int" + #define WCHAR_TYPE "char" + #define WCHAR_TYPE_SIZE 8 + + /* US Software GOFAST library support. */ + #include "gofast.h" + #undef INIT_SUBTARGET_OPTABS + #define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/xm-lynx.h gcc-2.7.0/config/sparc/xm-lynx.h *** gcc-2.6.3/config/sparc/xm-lynx.h --- gcc-2.7.0/config/sparc/xm-lynx.h Thu Jun 15 16:37:40 1995 *************** *** 0 **** --- 1,39 ---- + /* Configuration for GNU C-compiler for sparc platforms running LynxOS. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include + + /* This describes the machine the compiler is hosted on. */ + #define HOST_BITS_PER_CHAR 8 + #define HOST_BITS_PER_SHORT 16 + #define HOST_BITS_PER_INT 32 + #define HOST_BITS_PER_LONG 32 + #define HOST_BITS_PER_LONGLONG 64 + + #define HOST_WORDS_BIG_ENDIAN 1 + + /* Include to define the exit status access macros. */ + #include + #include + + /* target machine dependencies. + tm.h is a symbolic link to the actual target specific file. */ + + #include "tm.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/xm-netbsd.h gcc-2.7.0/config/sparc/xm-netbsd.h *** gcc-2.6.3/config/sparc/xm-netbsd.h --- gcc-2.7.0/config/sparc/xm-netbsd.h Tue May 9 18:24:34 1995 *************** *** 0 **** --- 1,4 ---- + /* Configuration for GCC for Sun SPARC running NetBSD as host. */ + + #include + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/xm-sparc.h gcc-2.7.0/config/sparc/xm-sparc.h *** gcc-2.6.3/config/sparc/xm-sparc.h Sat Jun 26 11:28:48 1993 --- gcc-2.7.0/config/sparc/xm-sparc.h Thu Jun 15 16:37:50 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/sparc/xm-sysv4.h gcc-2.7.0/config/sparc/xm-sysv4.h *** gcc-2.6.3/config/sparc/xm-sysv4.h Wed Mar 23 16:31:29 1994 --- gcc-2.7.0/config/sparc/xm-sysv4.h Thu Jun 15 16:37:58 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/spur/spur.c gcc-2.7.0/config/spur/spur.c *** gcc-2.6.3/config/spur/spur.c Sat Dec 26 17:18:15 1992 --- gcc-2.7.0/config/spur/spur.c Thu Jun 15 16:38:11 1995 *************** *** 17,21 **** 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 "config.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/spur/spur.h gcc-2.7.0/config/spur/spur.h *** gcc-2.6.3/config/spur/spur.h Sat Oct 2 04:23:54 1993 --- gcc-2.7.0/config/spur/spur.h Thu Jun 15 16:38:21 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler, for SPUR chip. ! Copyright (C) 1988 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler, for SPUR chip. ! Copyright (C) 1988, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 340,348 **** /* Value is the number of bytes of arguments automatically popped when returning from a subroutine 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. --- 341,350 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. SIZE is the number of bytes of arguments passed on the stack. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/spur/spur.md gcc-2.7.0/config/spur/spur.md *** gcc-2.6.3/config/spur/spur.md Wed Apr 20 11:49:31 1994 --- gcc-2.7.0/config/spur/spur.md Thu Jun 15 16:58:18 1995 *************** *** 16,20 **** ;; 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. --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/spur/xm-spur.h gcc-2.7.0/config/spur/xm-spur.h *** gcc-2.6.3/config/spur/xm-spur.h Sat Jun 26 11:27:18 1993 --- gcc-2.7.0/config/spur/xm-spur.h Thu Jun 15 16:38:32 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/svr3.h gcc-2.7.0/config/svr3.h *** gcc-2.6.3/config/svr3.h Fri Jul 29 14:59:09 1994 --- gcc-2.7.0/config/svr3.h Thu Jun 15 08:52:42 1995 *************** *** 19,23 **** 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. To use this file, make up a file with a name like: --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. To use this file, make up a file with a name like: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/svr4.h gcc-2.7.0/config/svr4.h *** gcc-2.6.3/config/svr4.h Wed Sep 28 18:33:38 1994 --- gcc-2.7.0/config/svr4.h Thu Jun 15 08:53:07 1995 *************** *** 1,6 **** ! /* svr4.h -- operating system specific defines to be used when ! targeting GCC for some generic System V Release 4 system. ! Copyright (C) 1991, 1994 Free Software Foundation, Inc. ! Contributed by Ron Guilmette (rfg@netcom.com). This file is part of GNU CC. --- 1,6 ---- ! /* Operating system specific defines to be used when targeting GCC for some ! generic System V Release 4 system. ! Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. ! Contributed by Ron Guilmette (rfg@segfault.us.com). This file is part of GNU CC. *************** *** 18,22 **** 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. To use this file, make up a file with a name like: --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. To use this file, make up a file with a name like: *************** *** 123,137 **** /* Provide a LIB_SPEC appropriate for svr4. Here we tack on the default ! standard C library (unless we are building a shared library) followed by ! our own magical crtend.o file (see crtstuff.c) which provides part of ! the support for getting C++ file-scope static object constructed before entering `main', followed by the normal svr3/svr4 "finalizer" file, which is either `gcrtn.o' or `crtn.o'. */ ! #undef LIB_SPEC ! #define LIB_SPEC \ ! "%{!shared:%{!symbolic:-lc}} \ ! crtend.o%s \ ! %{!shared:%{!symbolic:%{pg:gcrtn.o}%{!pg:crtn.o%s}}}" /* Provide a LINK_SPEC appropriate for svr4. Here we provide support --- 124,146 ---- /* Provide a LIB_SPEC appropriate for svr4. Here we tack on the default ! standard C library (unless we are building a shared library). */ ! ! #undef LIB_SPEC ! #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}" ! ! /* Provide a LIBGCC_SPEC appropriate for svr4. We also want to exclude ! libgcc when -symbolic. */ ! ! #undef LIBGCC_SPEC ! #define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}" ! ! /* Provide an ENDFILE_SPEC appropriate for svr4. Here we tack on our own ! magical crtend.o file (see crtstuff.c) which provides part of the ! support for getting C++ file-scope static object constructed before entering `main', followed by the normal svr3/svr4 "finalizer" file, which is either `gcrtn.o' or `crtn.o'. */ ! #undef ENDFILE_SPEC ! #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:crtn.o%s}" /* Provide a LINK_SPEC appropriate for svr4. Here we provide support *************** *** 162,167 **** %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy} \ ! %{symbolic:-Bsymbolic -G -dy} \ %{G:-G} \ %{YP,*} \ --- 171,176 ---- %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ ! %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \ ! %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \ %{G:-G} \ %{YP,*} \ *************** *** 185,194 **** #define STARTFILE_SPEC "%{!shared: \ %{!symbolic: \ ! %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \ ! %{pg:gcrti.o%s}%{!pg:crti.o%s} \ ! %{ansi:values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional:values-Xa.o%s}}}} crtbegin.o%s" /* Attach a special .ident directive to the end of the file to identify --- 194,204 ---- #define STARTFILE_SPEC "%{!shared: \ %{!symbolic: \ ! %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ ! %{pg:gcrti.o%s}%{!pg:crti.o%s} \ ! %{ansi:values-Xc.o%s} \ ! %{!ansi: \ ! %{traditional:values-Xt.o%s} \ ! %{!traditional:values-Xa.o%s}} \ ! crtbegin.o%s" /* Attach a special .ident directive to the end of the file to identify *************** *** 292,299 **** { \ static int sym_lineno = 1; \ ! fprintf (file, ".stabn 68,0,%d,.LM%d-%s\n.LM%d:\n", \ ! line, sym_lineno, \ ! XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0), \ ! sym_lineno); \ sym_lineno += 1; \ } \ --- 302,310 ---- { \ static int sym_lineno = 1; \ ! fprintf (file, ".stabn 68,0,%d,.LM%d-", \ ! line, sym_lineno); \ ! assemble_name (file, \ ! XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\ ! fprintf (file, "\n.LM%d:\n", sym_lineno); \ sym_lineno += 1; \ } \ *************** *** 305,308 **** --- 316,327 ---- #define DBX_FUNCTION_FIRST + /* Generate a blank trailing N_SO to mark the end of the .o file, since + we can't depend upon the linker to mark .o file boundaries with + embedded stabs. */ + + #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ + fprintf (FILE, \ + "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", N_SO) + /* Define the actual types of some ANSI-mandated types. (These definitions should work for most SVR4 systems). */ *************** *** 469,482 **** #define CONST_SECTION_ASM_OP ".section\t.rodata" ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"a\",@progbits" ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"a\",@progbits" ! /* On svr4, we *do* have support for the .init section, and we can put ! stuff in there to be executed before `main'. We let crtstuff.c and ! other files know this by defining the following symbol. The definition ! says how to change sections to the .init section. This is the same ! for all know svr4 assemblers. */ #define INIT_SECTION_ASM_OP ".section\t.init" /* A default list of other sections which we might be "in" at any given --- 488,518 ---- #define CONST_SECTION_ASM_OP ".section\t.rodata" ! ! /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. ! Note that we want to give these sections the SHF_WRITE attribute ! because these sections will actually contain data (i.e. tables of ! addresses of functions in the current root executable or shared library ! file) and, in the case of a shared library, the relocatable addresses ! will have to be properly resolved/relocated (and then written into) by ! the dynamic linker when it actually attaches the given shared library ! to the executing process. (Note that on SVR4, you may wish to use the ! `-z text' option to the ELF linker, when building a shared library, as ! an additional check that you are doing everything right. But if you do ! use the `-z text' option when building a shared library, you will get ! errors unless the .ctors and .dtors sections are marked as writable ! via the SHF_WRITE attribute.) */ ! ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\"" ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\"" ! ! /* On svr4, we *do* have support for the .init and .fini sections, and we ! can put stuff in there to be executed before and after `main'. We let ! crtstuff.c and other files know this by defining the following symbols. ! The definitions say how to change sections to the .init and .fini ! sections. This is the same for all known svr4 assemblers. */ #define INIT_SECTION_ASM_OP ".section\t.init" + #define FINI_SECTION_ASM_OP ".section\t.fini" /* A default list of other sections which we might be "in" at any given *************** *** 538,545 **** /* Switch into a generic section. ! This is currently only used to support section attributes. */ - #define ASM_OUTPUT_SECTION(FILE, NAME) \ - fprintf (FILE, ".section\t%s,\"a\",@progbits\n", NAME) /* A C statement (sans semicolon) to output an element in the table of --- 574,586 ---- /* Switch into a generic section. ! This is currently only used to support section attributes. ! ! We make the section read-only and executable for a function decl, ! read-only for a const data decl, and writable for a non-const data decl. */ ! #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ ! fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, \ ! TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \ ! TREE_READONLY (DECL) ? "a" : "aw") /* A C statement (sans semicolon) to output an element in the table of *************** *** 609,614 **** #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" - #define WEAK_ASM_OP ".weak" /* The following macro defines the format used to output the second operand of the .type assembler directive. Different svr4 assemblers --- 650,660 ---- #define TYPE_ASM_OP ".type" #define SIZE_ASM_OP ".size" + /* This is how we tell the assembler that a symbol is weak. */ + + #define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) + /* The following macro defines the format used to output the second operand of the .type assembler directive. Different svr4 assemblers *************** *** 845,846 **** --- 891,895 ---- } \ while (0) + + /* All SVR4 targets use the ELF object file format. */ + #define OBJECT_FORMAT_ELF Only in gcc-2.6.3/config: t-svr3 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/t-svr4 gcc-2.7.0/config/t-svr4 *** gcc-2.6.3/config/t-svr4 Mon Jul 27 22:52:01 1992 --- gcc-2.7.0/config/t-svr4 Mon Mar 13 18:09:56 1995 *************** *** 1,4 **** ! # For svr4 we build crtbegin.o and crtend.o which serve to add begin and ! # end labels to the .ctors and .dtors section when we link using gcc. ! EXTRA_PARTS=crtbegin.o crtend.o --- 1,7 ---- ! # We need to use -fPIC when we are using gcc to compile the routines in ! # crtstuff.c. This is only really needed when we are going to use gcc/g++ ! # to produce a shared library, but since we don't know ahead of time when ! # we will be doing that, we just always use -fPIC when compiling the ! # routines in crtstuff.c. ! CRTSTUFF_T_CFLAGS = -fPIC diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/tahoe/harris.h gcc-2.7.0/config/tahoe/harris.h *** gcc-2.6.3/config/tahoe/harris.h Mon Dec 13 19:05:55 1993 --- gcc-2.7.0/config/tahoe/harris.h Thu Jun 15 16:38:41 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/tahoe/tahoe.c gcc-2.7.0/config/tahoe/tahoe.c *** gcc-2.6.3/config/tahoe/tahoe.c Mon Jul 27 22:44:44 1992 --- gcc-2.7.0/config/tahoe/tahoe.c Thu Jun 15 16:38:52 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/tahoe/tahoe.h gcc-2.7.0/config/tahoe/tahoe.h *** gcc-2.6.3/config/tahoe/tahoe.h Sun Mar 13 08:33:47 1994 --- gcc-2.7.0/config/tahoe/tahoe.h Thu Jun 15 16:39:05 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Tahoe version. ! Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Tahoe version. ! Copyright (C) 1989, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,24 **** 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. */ /* - * File: tahoe.h - * * Original port made at the University of Buffalo by Devon Bowen, * Dale Wiles and Kevin Zachmann. --- 16,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* * Original port made at the University of Buffalo by Devon Bowen, * Dale Wiles and Kevin Zachmann. *************** *** 136,140 **** /* formats are the same in both of the architectures */ ! #define CHECK_FLOAT_VALUE(MODE, D, OVEFLOW) \ if (OVERFLOW) \ (D) = 1.7014117331926443e+38; \ --- 135,139 ---- /* formats are the same in both of the architectures */ ! #define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \ if (OVERFLOW) \ (D) = 1.7014117331926443e+38; \ *************** *** 328,332 **** /* the tahoe return function takes care of everything on the stack */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) (SIZE) /* function values for all types are returned in register 0 */ --- 327,331 ---- /* the tahoe return function takes care of everything on the stack */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) /* function values for all types are returned in register 0 */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/tahoe/tahoe.md gcc-2.7.0/config/tahoe/tahoe.md *** gcc-2.6.3/config/tahoe/tahoe.md Sun Apr 10 07:12:36 1994 --- gcc-2.7.0/config/tahoe/tahoe.md Thu Jun 15 16:58:36 1995 *************** *** 16,20 **** ;; 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. --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/tahoe/xm-tahoe.h gcc-2.7.0/config/tahoe/xm-tahoe.h *** gcc-2.6.3/config/tahoe/xm-tahoe.h Sat Jun 26 11:26:49 1993 --- gcc-2.7.0/config/tahoe/xm-tahoe.h Thu Jun 15 16:39:15 1995 *************** *** 16,20 **** 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. */ /* --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/netbsd.h gcc-2.7.0/config/vax/netbsd.h *** gcc-2.6.3/config/vax/netbsd.h --- gcc-2.7.0/config/vax/netbsd.h Tue May 9 18:25:04 1995 *************** *** 0 **** --- 1,5 ---- + #include + #include + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dunix -Dvax -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/vax.c gcc-2.7.0/config/vax/vax.c *** gcc-2.6.3/config/vax/vax.c Fri Nov 4 17:24:13 1994 --- gcc-2.7.0/config/vax/vax.c Thu Jun 15 16:39:24 1995 *************** *** 16,20 **** 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 --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/vax.h gcc-2.7.0/config/vax/vax.h *** gcc-2.6.3/config/vax/vax.h Fri Jun 24 16:08:29 1994 --- gcc-2.7.0/config/vax/vax.h Thu Jun 15 16:39:37 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. Vax version. ! Copyright (C) 1987, 1988, 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Definitions of target machine for GNU compiler. Vax version. ! Copyright (C) 1987, 88, 91, 93, 94, 95 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 353,356 **** --- 354,358 ---- /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), 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. *************** *** 359,363 **** On the Vax, the RET insn always pops all the args for any function. */ ! #define RETURN_POPS_ARGS(FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. --- 361,365 ---- On the Vax, the RET insn always pops all the args for any function. */ ! #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. *************** *** 956,966 **** { \ if (GET_CODE (SET_SRC (XVECEXP (EXP, 0, 0))) == CALL) \ ! CC_STATUS_INIT; \ else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) != PC) \ { cc_status.flags = 0; \ cc_status.value1 = SET_DEST (XVECEXP (EXP, 0, 0)); \ ! cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0)); } } \ ! /* PARALLELs whose first element sets the PC are aob, sob insns. \ ! They do change the cc's. So drop through and forget the cc's. */ \ else CC_STATUS_INIT; \ if (cc_status.value1 && GET_CODE (cc_status.value1) == REG \ --- 958,970 ---- { \ if (GET_CODE (SET_SRC (XVECEXP (EXP, 0, 0))) == CALL) \ ! CC_STATUS_INIT; \ else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) != PC) \ { cc_status.flags = 0; \ cc_status.value1 = SET_DEST (XVECEXP (EXP, 0, 0)); \ ! cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0)); } \ ! else \ ! /* PARALLELs whose first element sets the PC are aob, \ ! sob insns. They do change the cc's. */ \ ! CC_STATUS_INIT; } \ else CC_STATUS_INIT; \ if (cc_status.value1 && GET_CODE (cc_status.value1) == REG \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/vax.md gcc-2.7.0/config/vax/vax.md *** gcc-2.6.3/config/vax/vax.md Mon Aug 29 17:50:03 1994 --- gcc-2.7.0/config/vax/vax.md Thu Jun 15 16:58:54 1995 *************** *** 1,4 **** ;;- Machine description for GNU compiler, Vax Version ! ;; Copyright (C) 1987, 1988, 1991, 1994 Free Software Foundation, Inc. ;; This file is part of GNU CC. --- 1,4 ---- ;;- Machine description for GNU compiler, Vax Version ! ;; Copyright (C) 1987, 1988, 1991, 1994, 1995 Free Software Foundation, Inc. ;; This file is part of GNU CC. *************** *** 16,20 **** ;; 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. --- 16,21 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. *************** *** 1420,1428 **** ;; When the field position and size are constant and the destination ;; is a register, extv and extzv are much slower than a rotate followed ! ;; by a bicl or sign extension. (define_insn "" [(set (match_operand:SI 0 "general_operand" "=g") ! (sign_extract:SI (match_operand:SI 1 "nonmemory_operand" "r") (match_operand:QI 2 "general_operand" "g") (match_operand:SI 3 "general_operand" "g")))] --- 1421,1430 ---- ;; When the field position and size are constant and the destination ;; is a register, extv and extzv are much slower than a rotate followed ! ;; by a bicl or sign extension. Because we might end up choosing ext[z]v ! ;; anyway, we can't allow immediate values for the primary source operand. (define_insn "" [(set (match_operand:SI 0 "general_operand" "=g") ! (sign_extract:SI (match_operand:SI 1 "nonimmediate_operand" "ro") (match_operand:QI 2 "general_operand" "g") (match_operand:SI 3 "general_operand" "g")))] *************** *** 1441,1445 **** (define_insn "" [(set (match_operand:SI 0 "general_operand" "=g") ! (zero_extract:SI (match_operand:SI 1 "register_operand" "ri") (match_operand:QI 2 "general_operand" "g") (match_operand:SI 3 "general_operand" "g")))] --- 1443,1447 ---- (define_insn "" [(set (match_operand:SI 0 "general_operand" "=g") ! (zero_extract:SI (match_operand:SI 1 "nonimmediate_operand" "ro") (match_operand:QI 2 "general_operand" "g") (match_operand:SI 3 "general_operand" "g")))] diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/vaxv.h gcc-2.7.0/config/vax/vaxv.h *** gcc-2.6.3/config/vax/vaxv.h Mon Dec 13 19:08:56 1993 --- gcc-2.7.0/config/vax/vaxv.h Thu Jun 15 16:39:54 1995 *************** *** 16,20 **** 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 "vax/vax.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "vax/vax.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/vms.h gcc-2.7.0/config/vax/vms.h *** gcc-2.6.3/config/vax/vms.h Fri Nov 4 17:24:17 1994 --- gcc-2.7.0/config/vax/vms.h Thu Jun 15 16:40:04 1995 *************** *** 16,20 **** 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. */ #define VMS_TARGET --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define VMS_TARGET *************** *** 42,46 **** #define CPP_PREDEFINES \ "-Dvax -Dvms -DVMS -D__vax__ -D__vms__ -D__VMS__\ ! -D__GNUC__=2 -D__GNUC_MINOR__=6 -Asystem(vms) -Acpu(vax) -Amachine(vax)" /* These match the definitions used in VAXCRTL, the VMS C run-time library */ --- 43,47 ---- #define CPP_PREDEFINES \ "-Dvax -Dvms -DVMS -D__vax__ -D__vms__ -D__VMS__\ ! -D__GNUC__=2 -D__GNUC_MINOR__=7 -Asystem(vms) -Acpu(vax) -Amachine(vax)" /* These match the definitions used in VAXCRTL, the VMS C run-time library */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/xm-netbsd.h gcc-2.7.0/config/vax/xm-netbsd.h *** gcc-2.6.3/config/vax/xm-netbsd.h --- gcc-2.7.0/config/vax/xm-netbsd.h Tue May 9 18:25:22 1995 *************** *** 0 **** --- 1,2 ---- + #include + #include diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/vax/xm-vms.h gcc-2.7.0/config/vax/xm-vms.h *** gcc-2.6.3/config/vax/xm-vms.h Thu May 12 15:41:11 1994 --- gcc-2.7.0/config/vax/xm-vms.h Thu Jun 15 16:40:24 1995 *************** *** 1,4 **** /* Configuration for GNU C-compiler for Vax. ! Copyright (C) 1987, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Configuration for GNU C-compiler for Vax. ! Copyright (C) 1987, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* #defines that need visibility everywhere. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* #defines that need visibility everywhere. */ *************** *** 49,54 **** #define SUCCESS_EXIT_CODE 1 ! #define FATAL_EXIT_CODE (44 | 0x10000000) /* Failure, and no DCL message. */ ! /* A couple of conditionals for execution machine are controlled here. */ --- 50,54 ---- #define SUCCESS_EXIT_CODE 1 ! #define FATAL_EXIT_CODE (44 | 0x10000000) /* Abort, and no DCL message. */ /* A couple of conditionals for execution machine are controlled here. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/we32k/we32k.c gcc-2.7.0/config/we32k/we32k.c *** gcc-2.6.3/config/we32k/we32k.c Sat Jun 26 03:04:42 1993 --- gcc-2.7.0/config/we32k/we32k.c Thu Jun 15 16:40:36 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/we32k/we32k.h gcc-2.7.0/config/we32k/we32k.h *** gcc-2.6.3/config/we32k/we32k.h Tue Oct 25 16:16:12 1994 --- gcc-2.7.0/config/we32k/we32k.h Thu Jun 15 16:40:46 1995 *************** *** 1,4 **** /* Definitions of target machine for GNU compiler. AT&T we32000 version. ! Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by John Wehle (john@feith1.uucp) --- 1,4 ---- /* Definitions of target machine for GNU compiler. AT&T we32000 version. ! Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by John Wehle (john@feith1.uucp) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 305,312 **** /* 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,SIZE) (SIZE) /* Define how to find the value returned by a function. --- 306,314 ---- /* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. + FUNDECL is the declaration node of the function (as a tree), 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(FUNDECL,FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/we32k/we32k.md gcc-2.7.0/config/we32k/we32k.md *** gcc-2.6.3/config/we32k/we32k.md Sun Apr 10 07:13:11 1994 --- gcc-2.7.0/config/we32k/we32k.md Thu Jun 15 16:41:01 1995 *************** *** 17,21 **** ;; 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. --- 17,22 ---- ;; 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, 59 Temple Place - Suite 330, ! ;; Boston, MA 02111-1307, USA. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/we32k/xm-we32k.h gcc-2.7.0/config/we32k/xm-we32k.h *** gcc-2.6.3/config/we32k/xm-we32k.h Sat Jun 26 11:25:40 1993 --- gcc-2.7.0/config/we32k/xm-we32k.h Thu Jun 15 16:41:11 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/winnt/ld.c gcc-2.7.0/config/winnt/ld.c *** gcc-2.6.3/config/winnt/ld.c Fri Nov 18 18:31:10 1994 --- gcc-2.7.0/config/winnt/ld.c Thu Jun 15 16:41:21 1995 *************** *** 1,4 **** /* Call Windows NT 3.x linker. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu). --- 1,4 ---- /* Call Windows NT 3.x linker. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu). *************** *** 17,21 **** 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 "config.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 30,33 **** --- 31,36 ---- char *linker_path = 0; int verbose = 0; + int subsystem = 0; + int entry = 0; int link_arg_max = -1; *************** *** 39,42 **** --- 42,48 ---- static int is_regular_file (char *name); + /* Add the argument contained in STR to the list of arguments to pass to the + linker */ + static void addarg (str) *************** *** 63,66 **** --- 69,75 ---- } + /* Locate the file named in FILE_NAME in the set of paths contained in + PATH_VAL */ + static char * locate_file (file_name, path_val) *************** *** 111,114 **** --- 120,126 ---- } + /* Given a library name in NAME, i.e. foo. Look first for libfoo.a and then + foo.lib in the set of directories we are allowed to search in */ + static char * expand_lib (name) *************** *** 124,129 **** if (!lib_path) { ! fprintf (stderr, "Couldn't locate library: %s\n", lib); ! exit (1); } --- 136,148 ---- if (!lib_path) { ! strcpy (lib, name); ! strcat (lib, ".lib"); ! lib_path = locate_file (lib, search_dirs); ! if (!lib_path) ! { ! fprintf (stderr, ! "Couldn't locate library: lib%s.a or %s.lib\n", name, name); ! exit (1); ! } } *************** *** 131,134 **** --- 150,156 ---- } + /* Check to see if the file named in NAME is a regular file, i.e. not a + directory */ + static int is_regular_file (name) *************** *** 142,145 **** --- 164,170 ---- } + /* Process the number of args in P_ARGC and contained in ARGV. Look for + special flags, etc. that must be handled for the Microsoft linker */ + static void process_args (p_argc, argv) *************** *** 154,160 **** --- 179,192 ---- if (! strcmp (argv [i], "-v")) verbose = 1; + else if (! strncmp (argv [i], "-subsystem", 10)) + subsystem = 1; + else if (! strncmp (argv [i], "-entry", 6)) + entry = 1; } } + /* The main program. Spawn the Microsoft linker after fixing up the + Unix-like flags and args to be what the Microsoft linker wants */ + main (argc, argv) int argc; *************** *** 185,188 **** --- 217,222 ---- addarg (linker_path); + if (! subsystem) addarg ("-subsystem:console"); + if (! entry) addarg ("-entry:mainCRTStartup"); for (i = 1; i < argc; i++) *************** *** 204,208 **** strcat (buff, ".exe"); addarg (buff); - addarg ("-debug:full -debugtype:coff"); } else if (arg_len > 2 && !strncmp (argv [i], "-L", 2)) --- 238,241 ---- *************** *** 225,231 **** sdbuff[search_dirs_len+1] = 0; strcat (sdbuff, nbuff); - - if (search_dirs) - free (search_dirs); search_dirs = sdbuff; --- 258,261 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/winnt/winnt.h gcc-2.7.0/config/winnt/winnt.h *** gcc-2.6.3/config/winnt/winnt.h Fri Sep 30 17:21:01 1994 --- gcc-2.7.0/config/winnt/winnt.h Thu Jun 15 16:41:30 1995 *************** *** 1,5 **** ! /* winnt.h -- operating system specific defines to be used when ! targeting GCC for Windows NT 3.x. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu). --- 1,5 ---- ! /* Operating system specific defines to be used when targeting GCC for ! Windows NT 3.x. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu). *************** *** 18,44 **** 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. ! To use this file, put in your tm.h file something like: - #include "?????.h" - #include "svr4.h" - - followed by any really system-specific defines (or overrides of - defines) which you find that you need. For example, CPP_PREDEFINES - is defined here with only the defined -Dunix and -DSVR4. You should - probably override that in your target-specific ?????svr4.h file - with a set of defines that includes these, but also contains an - appropriate define for the type of hardware that you are targeting. */ - - #undef LIB_SPEC - #define LIB_SPEC "libc.lib kernel32.lib" - #undef STARTFILE_SPEC #define STARTFILE_SPEC "" #undef LINK_SPEC ! #define LINK_SPEC "-align:0x1000 -subsystem:console -entry:mainCRTStartup \ ! -stack:1000000,1000000" #undef STANDARD_EXEC_PREFIX --- 18,34 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #define TARGET_MEM_FUNCTIONS #undef STARTFILE_SPEC #define STARTFILE_SPEC "" #undef LINK_SPEC ! #define LINK_SPEC "-stack:1000000,1000000" ! ! #undef CPP_SPEC ! #define CPP_SPEC "-lang-c-c++-comments" #undef STANDARD_EXEC_PREFIX *************** *** 65,66 **** --- 55,58 ---- } + #undef STDC_VALUE + #define STDC_VALUE 0 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/winnt/xm-winnt.h gcc-2.7.0/config/winnt/xm-winnt.h *** gcc-2.6.3/config/winnt/xm-winnt.h Fri Sep 30 17:21:03 1994 --- gcc-2.7.0/config/winnt/xm-winnt.h Thu Jun 15 16:42:07 1995 *************** *** 1,5 **** ! /* Configuration for GNU compiler ! for processor running Windows NT 3.x. ! Copyright (C) 1994 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu) --- 1,4 ---- ! /* Configuration for GNU compiler for processor running Windows NT 3.x. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu) *************** *** 18,27 **** 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 ! #define USG ! #define ONLY_INT_FIELDS #define USE_PROTOTYPES 1 #define bcmp(a,b,c) memcmp (a,b,c) #define bcopy(a,b,c) memcpy (b,a,c) --- 17,46 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include ! ! #ifndef USG ! #define USG 1 ! #endif ! ! #ifndef ONLY_INT_FIELD ! #define ONLY_INT_FIELDS 1 ! #endif ! ! #ifndef USE_PROTOTYPES #define USE_PROTOTYPES 1 + #endif + + #ifndef HAVE_PUTENV + #define HAVE_PUTENV 1 + #endif + + #ifndef HAVE_VPRINTF + #define HAVE_VPRINTF 1 + #endif + + #define NO_SYS_SIGLIST 1 #define bcmp(a,b,c) memcmp (a,b,c) #define bcopy(a,b,c) memcpy (b,a,c) *************** *** 31,38 **** #define kill(a,b) raise(b) #define EXECUTABLE_SUFFIX ".exe" #define PATH_SEPARATOR ';' #define DIR_SEPARATOR '\\' - #define HAVE_PUTENV 1 #define S_IRUSR 0000400 --- 50,57 ---- #define kill(a,b) raise(b) + #define OBJECT_SUFFIX ".obj" #define EXECUTABLE_SUFFIX ".exe" #define PATH_SEPARATOR ';' #define DIR_SEPARATOR '\\' #define S_IRUSR 0000400 *************** *** 49,59 **** #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) - #define access _access - #define close _close - #define dup _dup - #define mktemp _mktemp - #define open _open - #define read _read - #define write _write - #define chmod _chmod - #define setjmp _setjmp --- 68,69 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/x-linux gcc-2.7.0/config/x-linux *** gcc-2.6.3/config/x-linux --- gcc-2.7.0/config/x-linux Tue Mar 28 07:43:37 1995 *************** *** 0 **** --- 1,14 ---- + # It is defined in config/xm-linux.h. + # X_CFLAGS = -DPOSIX + + # The following is needed when compiling stages 2 and 3 because gcc's + # limits.h must be picked up before /usr/include/limits.h. This is because + # each does an #include_next of the other if the other hasn't been included. + # /usr/include/limits.h loses if it gets found first because /usr/include is + # at the end of the search order. When a new version of gcc is released, + # gcc's limits.h hasn't been installed yet and hence isn't found. + + BOOT_CFLAGS = -O $(CFLAGS) -Iinclude + + # Don't run fixproto + STMP_FIXPROTO = diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-freebsd.h gcc-2.7.0/config/xm-freebsd.h *** gcc-2.6.3/config/xm-freebsd.h --- gcc-2.7.0/config/xm-freebsd.h Thu Jun 15 08:53:32 1995 *************** *** 0 **** --- 1,33 ---- + /* Configuration for GNU C-compiler for hosts running FreeBSD. + Copyright (C) 1994, 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file defines machine-independent things specific to a host + running FreeBSD. This file should not be specified as $xm_file itself; + instead $xm_file should be CPU/xm-freebsd.h, which should include both + CPU/xm-CPU.h and this file xm-freebsd.h. */ + + /* FreeBSD has strerror. */ + #define HAVE_STRERROR + + /* We have _sys_siglist, but the declaration in conflicts with + the declarations in collect2.c and mips-tfile.c, so disable the declarations + in those files. */ + + #define DONT_DECLARE_SYS_SIGLIST diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-gnu.h gcc-2.7.0/config/xm-gnu.h *** gcc-2.6.3/config/xm-gnu.h Fri Oct 7 19:08:19 1994 --- gcc-2.7.0/config/xm-gnu.h Thu Jun 15 08:54:14 1995 *************** *** 1,4 **** /* Configuration for GNU C-compiler for hosts running GNU. ! Copyright (C) 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Configuration for GNU C-compiler for hosts running GNU. ! Copyright (C) 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 defines machine-independent things specific to a host --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This file defines machine-independent things specific to a host *************** *** 22,28 **** instead $xm_file should be CPU/xm-gnu.h, which should include both CPU/xm-CPU.h and this file xm-gnu.h. */ ! ! /* GNU has strerror. */ ! #define HAVE_STRERROR /* Get a definition of O_RDONLY; some of the GCC files don't include this --- 23,29 ---- instead $xm_file should be CPU/xm-gnu.h, which should include both CPU/xm-CPU.h and this file xm-gnu.h. */ ! ! #define HAVE_STRERROR /* GNU has strerror. */ ! #define POSIX /* GNU complies to POSIX.1. */ /* Get a definition of O_RDONLY; some of the GCC files don't include this diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-linux.h gcc-2.7.0/config/xm-linux.h *** gcc-2.6.3/config/xm-linux.h --- gcc-2.7.0/config/xm-linux.h Thu Jun 15 08:54:34 1995 *************** *** 0 **** --- 1,40 ---- + /* Configuration for GCC for Intel i386 running Linux. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by H.J. Lu (hjl@nynexst.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #define HAVE_VPRINTF + + #define HAVE_STRERROR + + #define POSIX + + #define DONT_DECLARE_SYS_SIGLIST + + /* We do have one, but I'd like to use the one come with gcc since + we have been doing that for a long time with USG defined. H.J. */ + #define NO_STAB_H + + #undef BSTRING + #define BSTRING + #undef bcmp + #undef bcopy + #undef bzero + #undef index + #undef rindex diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-lynx.h gcc-2.7.0/config/xm-lynx.h *** gcc-2.6.3/config/xm-lynx.h Tue Aug 31 17:16:55 1993 --- gcc-2.7.0/config/xm-lynx.h Thu Jun 15 08:55:02 1995 *************** *** 1,4 **** /* Configuration for GNU C-compiler for Lynx. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Configuration for GNU C-compiler for Lynx. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,32 **** 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. */ /* #defines that need visibility everywhere. */ #define FALSE 0 #define TRUE 1 - /* This describes the machine the compiler is hosted on. */ - #define HOST_BITS_PER_CHAR 8 - #define HOST_BITS_PER_SHORT 16 - #define HOST_BITS_PER_INT 32 - #define HOST_BITS_PER_LONG 32 - #define HOST_BITS_PER_LONGLONG 64 - /* Arguments to use with `exit'. */ #define SUCCESS_EXIT_CODE 0 --- 16,30 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ + /* This file defines machine-independent things specific to a host + running Lynx. This file should not be specified as $xm_file itself; + instead $xm_file should be CPU/xm-lynx.h, which should include this one. */ + /* #defines that need visibility everywhere. */ #define FALSE 0 #define TRUE 1 /* Arguments to use with `exit'. */ #define SUCCESS_EXIT_CODE 0 *************** *** 36,42 **** #define vfork fork ! /* target machine dependencies. ! tm.h is a symbolic link to the actual target specific file. */ ! ! #include "tm.h" ! --- 34,51 ---- #define vfork fork ! /* Lynx has a non-standard mktemp function. */ ! /* ??? This is simpler than creating YATM: Yet Another Target Macro. */ ! #define mktemp lynx_mktemp ! ! #define lynx_mktemp(template) \ ! do { \ ! int pid = getpid (); \ ! char *t = template; \ ! char *p; \ ! p = t + strlen (t); \ ! while (*--p == 'X') \ ! { \ ! *p = (pid % 10) + '0'; \ ! pid /= 10; \ ! } \ ! } while (0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-netbsd.h gcc-2.7.0/config/xm-netbsd.h *** gcc-2.6.3/config/xm-netbsd.h --- gcc-2.7.0/config/xm-netbsd.h Thu Jun 15 08:55:17 1995 *************** *** 0 **** --- 1,27 ---- + /* Configuration for GNU C-compiler for hosts running NetBSD. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file defines machine-independent things specific to a host + running NetBSD. This file should not be specified as $xm_file itself; + instead $xm_file should be CPU/xm-netbsd.h, which should include both + CPU/xm-CPU.h and this file xm-netbsd.h. */ + + #define HAVE_STRERROR + #define HAVE_VPRINTF diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-svr3.h gcc-2.7.0/config/xm-svr3.h *** gcc-2.6.3/config/xm-svr3.h Thu Dec 23 08:44:19 1993 --- gcc-2.7.0/config/xm-svr3.h Thu Jun 15 08:55:35 1995 *************** *** 16,20 **** 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. */ #define bcopy(src,dst,len) memcpy ((dst),(src),(len)) --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define bcopy(src,dst,len) memcpy ((dst),(src),(len)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config/xm-svr4.h gcc-2.7.0/config/xm-svr4.h *** gcc-2.6.3/config/xm-svr4.h Mon Jan 11 12:40:56 1993 --- gcc-2.7.0/config/xm-svr4.h Thu Jun 15 08:55:52 1995 *************** *** 16,20 **** 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. */ #define bcopy(src,dst,len) memcpy ((dst),(src),(len)) --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #define bcopy(src,dst,len) memcpy ((dst),(src),(len)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config.guess gcc-2.7.0/config.guess *** gcc-2.6.3/config.guess Mon Nov 14 18:16:45 1994 --- gcc-2.7.0/config.guess Thu Jun 15 18:11:14 1995 *************** *** 1,5 **** ! #!/bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it --- 1,5 ---- ! #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it *************** *** 60,63 **** --- 60,69 ---- echo alpha-dec-osf${UNAME_RELEASE} exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} *************** *** 73,76 **** --- 79,85 ---- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize *************** *** 80,83 **** --- 89,97 ---- exit 0 ;; sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` *************** *** 86,89 **** --- 100,112 ---- echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} *************** *** 125,131 **** echo m68k-tektronix-bsd exit 0 ;; ! *:IRIX:*:*) ! echo mips-sgi-irix${UNAME_RELEASE} exit 0 ;; i[34]86:AIX:*:*) echo i386-ibm-aix --- 148,157 ---- echo m68k-tektronix-bsd exit 0 ;; ! *:IRIX*:*:*) ! echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i[34]86:AIX:*:*) echo i386-ibm-aix *************** *** 171,174 **** --- 197,206 ---- echo rs6000-ibm-aix exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx *************** *** 235,238 **** --- 267,273 ---- echo hppa1.0-hp-osf exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd *************** *** 253,263 **** echo c4-convex-bsd exit 0 ;; ! CRAY*X-MP:UNICOS:*:*) echo xmp-cray-unicos exit 0 ;; ! CRAY*Y-MP:UNICOS:*:*) ! echo ymp-cray-unicos ! exit 0 ;; ! CRAY-2:UNICOS:*:*) echo cray2-cray-unicos exit 0 ;; --- 288,301 ---- echo c4-convex-bsd exit 0 ;; ! CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; ! CRAY*Y-MP:*:*:*) ! echo ymp-cray-unicos${UNAME_RELEASE} ! exit 0 ;; ! CRAY*C90:*:*:*) ! echo c90-cray-unicos${UNAME_RELEASE} ! exit 0 ;; ! CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; *************** *** 265,269 **** echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; ! i[34]86:BSD/386:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; --- 303,307 ---- echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; ! i[34]86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *************** *** 278,283 **** exit 0 ;; *:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux ! exit 0 ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. --- 316,342 ---- exit 0 ;; *:Linux:*:*) ! # Systems without a BFD linker ! if test -d /usr/lib/ldscripts/. ; then ! : ! else ! echo "${UNAME_MACHINE}-unknown-linuxoldld" ! exit 0 ! fi ! # Determine whether the default compiler is a.out or elf ! cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 ! rm -f dummy.c dummy;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. *************** *** 293,303 **** exit 0 ;; i[34]86:*:3.2:*) ! if /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL - elif test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL else echo ${UNAME_MACHINE}-unknown-sysv32 *************** *** 307,310 **** --- 366,372 ---- echo i386-unknown-mach3 exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then *************** *** 366,370 **** printf ("mips-sony-bsd\n"); exit (0); #else ! printf ("m68k-sony-newsos\n"); exit (0); #endif #endif --- 428,439 ---- printf ("mips-sony-bsd\n"); exit (0); #else ! #include ! printf ("m68k-sony-newsos%s\n", ! #ifdef NEWSOS4 ! "4" ! #else ! "" ! #endif ! ); exit (0); #endif #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/config.sub gcc-2.7.0/config.sub *** gcc-2.6.3/config.sub Wed Oct 26 14:23:05 1994 --- gcc-2.7.0/config.sub Thu Jun 15 17:01:49 1995 *************** *** 1,5 **** ! #!/bin/sh # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software --- 1,5 ---- ! #! /bin/sh # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software *************** *** 18,22 **** # 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. # As a special exception to the GNU General Public License, if you --- 18,23 ---- # 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., 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you *************** *** 43,46 **** --- 44,56 ---- # It is wrong to echo any other type of specification. + if [ x$1 = x ] + then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 + fi + # First pass through any local machine types. case $1 in *************** *** 105,109 **** basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; ! -lynx) os=-lynxos ;; --- 115,119 ---- basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; ! -lynx*) os=-lynxos ;; *************** *** 120,128 **** # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. ! tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ ! | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ ! | pdp11 | mips64el | mips64orion | mips64orionel ) basic_machine=$basic_machine-unknown ;; --- 130,140 ---- # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. ! tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ ! | arme[lb] | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ ! | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ ! | pdp11 | mips64el | mips64orion | mips64orionel \ ! | sparc) basic_machine=$basic_machine-unknown ;; *************** *** 135,144 **** vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ ! | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ ! | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ ! | mips64el-* | mips64orion-* | mips64orionel-* ) ;; # Recognize the various machine names and aliases which stand --- 147,156 ---- vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ ! | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ ! | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ ! | mips64el-* | mips64orion-* | mips64orionel-*) ;; # Recognize the various machine names and aliases which stand *************** *** 408,422 **** basic_machine=ns32k-pc532 ;; ! pentium-*) ! # We will change tis to say i586 once there has been ! # time for various packages to start to recognize that. ! basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; ps2) basic_machine=i386-ibm ;; rtpc | rtpc-*) basic_machine=romp-ibm --- 420,460 ---- basic_machine=ns32k-pc532 ;; ! pentium | p5 | p6) ! # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium ! basic_machine=i586-intel ! ;; ! pentium-* | p5-* | p6-*) ! # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium ! basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ! ;; ! k5) ! # We don't have specific support for AMD's K5 yet, so just call it a Pentium ! basic_machine=i586-amd ! ;; ! nexen) ! # We don't have specific support for Nexgen yet, so just call it a Pentium ! basic_machine=i586-nexgen ;; pn) basic_machine=pn-gould ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; + rm[46]00) + basic_machine=mips-siemens + ;; rtpc | rtpc-*) basic_machine=romp-ibm *************** *** 463,466 **** --- 501,508 ---- os=-sunos4 ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; sun3 | sun3-*) basic_machine=m68k-sun *************** *** 479,482 **** --- 521,528 ---- basic_machine=m68k-ncr ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; ultra3) basic_machine=a29k-nyu *************** *** 499,502 **** --- 545,552 ---- os=-vxworks ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; xmp) basic_machine=xmp-cray *************** *** 573,576 **** --- 623,629 ---- os=-solaris2 ;; + -unixware* | svr4*) + os=-sysv4 + ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux|'` *************** *** 578,582 **** # First accept the basic system types. # The portable systems comes first. ! # Each alternative must end in a *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ --- 631,635 ---- # First accept the basic system types. # The portable systems comes first. ! # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ *************** *** 588,592 **** | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ ! | -ptx* | -coff* | -winnt*) ;; -sunos5*) --- 641,647 ---- | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ ! | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ ! | -udi* | -eabi* | -lites* ) ! # Remember, each alternative MUST END IN *, to match a version number. ;; -sunos5*) *************** *** 614,617 **** --- 669,679 ---- os=-sysv ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; -triton*) os=-sysv3 *************** *** 660,663 **** --- 722,728 ---- os=-riscix1.2 ;; + arm*-semi) + os=-aout + ;; pdp11-*) os=-none *************** *** 666,669 **** --- 731,737 ---- os=-ultrix4.2 ;; + m68*-apollo) + os=-domain + ;; i386-sun) os=-sunos4.0.2 *************** *** 735,738 **** --- 803,809 ---- os=-irix ;; + *-siemens) + os=-sysv4 + ;; *-masscomp) os=-rtu *************** *** 785,788 **** --- 856,862 ---- -ptx*) vendor=sequent + ;; + -vxworks*) + vendor=wrs ;; esac diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/configure gcc-2.7.0/configure *** gcc-2.6.3/configure Wed Nov 23 17:26:27 1994 --- gcc-2.7.0/configure Thu Jun 15 17:54:14 1995 *************** *** 1,5 **** #!/bin/sh # Configuration script for GNU CC ! # Copyright (C) 1988, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,5 ---- #!/bin/sh # Configuration script for GNU CC ! # Copyright (C) 1988, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 17,21 **** #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. # --- 17,22 ---- #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, 59 Temple Place - Suite 330, ! #Boston, MA 02111-1307, USA. # *************** *** 36,40 **** --- 37,47 ---- # --with-stabs arrange to use stabs instead of host debug format. # --with-elf arrange to use elf instead of host debug format. + # --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR) + # --disable-FOO do not include feature FOO # --nfp assume system has no FPU. + # --program-prefix=PREFIX specifies prefix for executable names. + # --program-suffix=SUFFIX specifies suffix for executable names. + # --program-transform-name=SED-EXPR specifies `sed' expression to + # apply to executable names. # # If configure succeeds, it leaves its status in config.status. *************** *** 59,62 **** --- 66,73 ---- prefix=/usr/local + # On systems where GCC is the native compiler, $prefix should be + # /usr. But the user can change it with configure --prefix=/foo/bar + native_prefix=/usr + # local_prefix specifies where to find the directory /usr/local/include # We don't use $(prefix) for this *************** *** 72,75 **** --- 83,90 ---- gxx_include_dir='$(libdir)/g++-include' + # Default --program-transform-name to nothing. + program_transform_name= + program_transform_set= + remove=rm hard_link=ln *************** *** 112,115 **** --- 127,131 ---- --prefix) prefix=$arg + native_prefix=$prefix next_arg= ;; *************** *** 126,129 **** --- 142,170 ---- next_arg= ;; + --program-transform-name) + # Double any backslashes or dollar signs in the argument. + if [ -n "${arg}" ] ; then + program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`" + fi + program_transform_set=yes + next_arg= + ;; + --program-prefix) + if [ -n "${arg}" ]; then + program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`," + fi + program_transform_set=yes + next_arg= + ;; + --program-suffix) + if [ -n "${arg}" ]; then + program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`," + fi + program_transform_set=yes + next_arg= + ;; + --x-*) + next_arg= + ;; *) case $arg in *************** *** 167,170 **** --- 208,212 ---- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=`echo $arg | sed 's/-*p[a-z]*=//'` + native_prefix=$prefix ;; -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \ *************** *** 196,199 **** --- 238,290 ---- exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'` ;; + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- | --program-transform \ + | --program-transfor | --program-transfo | --program-transf \ + | --program-trans | --program-tran | --program-tra \ + | --program-tr | --program-t) + next_arg=--program-transform-name + ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* | --program-transfo=* \ + | --program-transf=* | --program-trans=* | --program-tran=* \ + | --program-tra=* | --program-tr=* | --program-t=*) + arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'` + # Double any \ or $ in the argument. + if [ -n "${arg}" ] ; then + program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`" + fi + program_transform_set=yes + ;; + -program-prefix | --program-prefix | --program-prefi \ + | --program-pref | --program-pre | --program-pr \ + | --program-p) + next_arg=--program-prefix + ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* \ + | --program-p=*) + arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'` + if [ -n "${arg}" ]; then + program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`," + fi + program_transform_set=yes + ;; + -program-suffix | --program-suffix | --program-suffi \ + | --program-suff | --program-suf | --program-su \ + | --program-s) + next_arg=--program-suffix + ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* \ + | --program-s=*) + arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'` + if [ -n "${arg}" ]; then + program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`," + fi + program_transform_set=yes + ;; -with-gnu-ld | --with-gnu-ld | --with-gnu-l) gnu_ld=yes *************** *** 219,227 **** -with-* | --with-*) ;; #ignored -without-* | --without-*) ;; #ignored ! -enable-* | --enable-*) ;; #ignored -x | --x) ;; # ignored --he*) ;; # ignored for now (--help) --vers*) ;; # ignored for now (--version) ! --verb*) ;; # ignored for now (--verbose) --program-*) ;; #ignored (--program-prefix, --program-suffix) --c*) ;; #ignored (--cache-file) --- 310,333 ---- -with-* | --with-*) ;; #ignored -without-* | --without-*) ;; #ignored ! -disable-* | --disable-*) ! enableopt=`echo ${arg} | sed 's:^-*disable-:enable_:;s:-:_:g'` ! eval $enableopt=no ! ;; ! -enable-* | --enable-*) ! case "$arg" in ! *=*) optarg=`echo $arg | sed 's:^[^=]*=::;s:-:_:g'` ;; ! *) optarg=yes ;; ! esac ! enableopt=`echo ${arg} | sed 's:^-*::;s:=.*$::;s:-:_:g'` ! eval $enableopt="$optarg" ! ;; -x | --x) ;; # ignored + -x-*=* | --x-*=*) ;; # ignored + -x-* | --x-*) + next_arg=--x-ignored # ignored + ;; --he*) ;; # ignored for now (--help) --vers*) ;; # ignored for now (--version) ! -v | -verb* | --verb*) ;; # ignored for now (--verbose) --program-*) ;; #ignored (--program-prefix, --program-suffix) --c*) ;; #ignored (--cache-file) *************** *** 381,385 **** xmake_file= tmake_file= ! header_files= extra_passes= extra_parts= --- 487,491 ---- xmake_file= tmake_file= ! extra_headers= extra_passes= extra_parts= *************** *** 401,404 **** --- 507,512 ---- # Set this if directory names should be truncated to 14 characters. truncate_target= + # Set this if gdb needs a dir command with `dirname $out_file` + gdb_needs_out_file_path= case $machine in *************** *** 420,429 **** 1750a-*-*) ;; ! a29k-*-bsd*) tm_file=a29k/unix.h xm_file=a29k/xm-unix.h xmake_file=a29k/x-unix use_collect2=yes ;; a29k-*-*) # Default a29k environment. use_collect2=yes --- 528,546 ---- 1750a-*-*) ;; ! a29k-*-bsd* | a29k-*-sym1*) tm_file=a29k/unix.h xm_file=a29k/xm-unix.h xmake_file=a29k/x-unix + tmake_file=a29k/t-a29k use_collect2=yes ;; + a29k-*-udi | a29k-*-coff) + tmake_file=a29k/t-a29kbare + tm_file=a29k/a29k-udi.h + ;; + a29k-*-vxworks*) + tmake_file=a29k/t-vx29k + tm_file=a29k/vx29k.h + ;; a29k-*-*) # Default a29k environment. use_collect2=yes *************** *** 467,470 **** --- 584,598 ---- use_collect2=yes ;; + alpha-*-winnt3*) + tm_file=alpha/winnt.h + xm_file=alpha/xm-winnt.h + tmake_file=t-libc-ok + xmake_file=alpha/x-winnt + fixincludes=fixinc.winnt + if [ x$gnu_ld != xyes ] + then + extra_programs=ld + fi + ;; arm-*-riscix1.[01]*) # Acorn RISC machine (early versions) tm_file=arm/riscix1-1.h *************** *** 482,485 **** --- 610,619 ---- use_collect2=yes ;; + arm-semi-aout | armel-semi-aout) + cpu_type=arm + tm_file=arm/semi.h + tmake_file=arm/t-semi + fixincludes=Makefile.in # There is nothing to fix + ;; arm-*-*) # generic version ;; *************** *** 539,542 **** --- 673,677 ---- tm_file=pa/pa1-osf.h use_collect2=yes + fixincludes=Makefile.in ;; hppa1.0-*-osf*) *************** *** 544,547 **** --- 679,683 ---- tm_file=pa/pa-osf.h use_collect2=yes + fixincludes=Makefile.in ;; hppa1.1-*-bsd*) *************** *** 549,556 **** --- 685,694 ---- tm_file=pa/pa1.h use_collect2=yes + fixincludes=Makefile.in ;; hppa1.0-*-bsd*) cpu_type=pa use_collect2=yes + fixincludes=Makefile.in ;; hppa1.0-*-hpux7*) *************** *** 558,562 **** xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 696,700 ---- xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 573,577 **** xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 711,715 ---- xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 588,592 **** xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 726,730 ---- xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 599,607 **** use_collect2=yes ;; hppa1.1-*-hpux*) cpu_type=pa xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 737,775 ---- use_collect2=yes ;; + hppa1.1-*-hpux9*) + cpu_type=pa + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + tmake_file=pa/t-pa + if [ x$gas = xyes ] + then + tm_file=pa/pa1-ghpux9.h + else + tm_file=pa/pa1-hpux9.h + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.0-*-hpux9*) + cpu_type=pa + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + tmake_file=pa/t-pa + if [ x$gas = xyes ] + then + tm_file=pa/pa-ghpux9.h + else + tm_file=pa/pa-hpux9.h + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; hppa1.1-*-hpux*) cpu_type=pa xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 618,622 **** xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 786,790 ---- xm_file=pa/xm-pahpux.h xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 631,637 **** hppa1.1-*-hiux*) cpu_type=pa ! xm_file=pa/xm-pahiux.h ! xmake_file=pa/x-pa-hiux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 799,805 ---- hppa1.1-*-hiux*) cpu_type=pa ! xm_file=pa/xm-pahpux.h ! xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 646,652 **** hppa1.0-*-hiux*) cpu_type=pa ! xm_file=pa/xm-pahiux.h ! xmake_file=pa/x-pa-hiux ! tmake_file=pa/t-pa-hpux if [ x$gas = xyes ] then --- 814,820 ---- hppa1.0-*-hiux*) cpu_type=pa ! xm_file=pa/xm-pahpux.h ! xmake_file=pa/x-pa-hpux ! tmake_file=pa/t-pa if [ x$gas = xyes ] then *************** *** 659,662 **** --- 827,836 ---- use_collect2=yes ;; + hppa*-*-lites*) + cpu_type=pa + tm_file=pa/pa1.h + use_collect2=yes + fixincludes=Makefile.in + ;; i370-*-mvs*) cpu_type=i370 *************** *** 671,674 **** --- 845,849 ---- tm_file=i386/aix386.h extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff else tm_file=i386/aix386ng.h *************** *** 684,688 **** xmake_file=i386/x-ncr3000 tm_file=i386/sysv4.h ! tmake_file=t-svr4 ;; i[345]86-next-*) --- 859,864 ---- xmake_file=i386/x-ncr3000 tm_file=i386/sysv4.h ! extra_parts="crtbegin.o crtend.o" ! tmake_file=i386/t-crtpic ;; i[345]86-next-*) *************** *** 709,713 **** xmake_file=i386/x-sysv3 tm_file=i386/seq-sysv3.h ! tmake_file=t-svr3 fixincludes=fixinc.ptx extra_parts="crtbegin.o crtend.o" --- 885,889 ---- xmake_file=i386/x-sysv3 tm_file=i386/seq-sysv3.h ! tmake_file=i386/t-crtstuff fixincludes=fixinc.ptx extra_parts="crtbegin.o crtend.o" *************** *** 720,724 **** xmake_file=i386/x-sysv3 tm_file=i386/seq2-sysv3.h ! tmake_file=t-svr3 extra_parts="crtbegin.o crtend.o" fixincludes=fixinc.ptx --- 896,900 ---- xmake_file=i386/x-sysv3 tm_file=i386/seq2-sysv3.h ! tmake_file=i386/t-crtstuff extra_parts="crtbegin.o crtend.o" fixincludes=fixinc.ptx *************** *** 731,737 **** --- 907,919 ---- use_collect2=yes ;; + i[345]86-*-aout*) + cpu_type=i386 + tm_file=i386/i386-aout.h + tmake_file=i386/t-i386bare + ;; i[345]86-*-bsdi* | i[345]86-*-bsd386*) cpu_type=i386 tm_file=i386/bsd386.h + xm_file=i386/xm-bsd386.h # tmake_file=t-libc-ok ;; *************** *** 739,742 **** --- 921,925 ---- cpu_type=i386 tm_file=i386/386bsd.h + xm_file=i386/xm-bsd386.h # tmake_file=t-libc-ok # Next line turned off because both 386BSD and BSD/386 use GNU ld. *************** *** 746,749 **** --- 929,933 ---- cpu_type=i386 tm_file=i386/freebsd.h + xm_file=i386/xm-freebsd.h # On FreeBSD, the headers are already ok. fixincludes=Makefile.in *************** *** 752,770 **** i[345]86-*-netbsd*) cpu_type=i386 ! tm_file=i386/netbsd-i386.h # On NetBSD, the headers are already okay. fixincludes=Makefile.in xmake_file=x-netbsd ;; ! i[345]86-*-gnu*) cpu_type=i386 ! xm_file=i386/xm-gnu.h ! tm_file=i386/gnu.h ! tmake_file=t-libc-ok ! # GNU tools are the only tools. ! gnu_ld=yes ! gas=yes ! # On GNU, the headers are already okay. ! fixincludes=Makefile.in ;; i[345]86-*-isc*) # 80386 running ISC system --- 936,953 ---- i[345]86-*-netbsd*) cpu_type=i386 ! tm_file=i386/netbsd.h ! xm_file=i386/xm-netbsd.h # On NetBSD, the headers are already okay. fixincludes=Makefile.in + tmake_file=t-libc-ok xmake_file=x-netbsd ;; ! i[345]86-*-coff*) cpu_type=i386 ! tm_file=i386/i386-coff.h ! tmake_file=i386/t-i386bare ! ;; ! i[345]86-*-gnu*) ! cpu_type=i386 # GNU supports this CPU; rest done below. ;; i[345]86-*-isc*) # 80386 running ISC system *************** *** 784,789 **** --- 967,974 ---- tm_file=i386/iscdbx.h tmake_file=i386/t-svr3dbx + extra_parts="crtbegin.o crtend.o svr3.ifile svr3z.rfile" else tm_file=i386/isccoff.h + tmake_file=i386/t-crtstuff extra_parts="crtbegin.o crtend.o" fi *************** *** 791,807 **** broken_install=yes ;; ! i[345]86-*-linux*) # Intel 80386's running Linux ! cpu_type=i386 xm_file=i386/xm-linux.h ! xmake_file=i386/x-linux ! if [ x$elf = xyes ] ! then ! tm_file=i386/linuxelf.h ! else ! tm_file=i386/linux.h ! fi fixincludes=Makefile.in #On Linux, the headers are ok already. broken_install=yes ;; i[345]86-*-lynxos*) cpu_type=i386 --- 976,1013 ---- broken_install=yes ;; ! i[345]86-*-linux*oldld*) # Intel 80386's running Linux ! cpu_type=i386 # with a.out format using pre BFD linkers xm_file=i386/xm-linux.h ! xmake_file=x-linux ! tm_file=i386/linux-oldld.h ! fixincludes=Makefile.in #On Linux, the headers are ok already. ! broken_install=yes ! gnu_ld=yes ! ;; ! i[345]86-*-linux*aout*) # Intel 80386's running Linux ! cpu_type=i386 # with a.out format ! xm_file=i386/xm-linux.h ! xmake_file=x-linux ! tm_file=i386/linux-aout.h fixincludes=Makefile.in #On Linux, the headers are ok already. broken_install=yes + gnu_ld=yes ;; + i[345]86-*-linux*) # Intel 80386's running Linux + cpu_type=i386 # with ELF format + xm_file=i386/xm-linux.h + xmake_file=x-linux + tm_file=i386/linux.h + fixincludes=Makefile.in #On Linux, the headers are ok already. + broken_install=yes + gnu_ld=yes + # Don't use it. Linux uses a slightly different one. + # The real one comes with the Linux C library. + #extra_parts="crtbegin.o crtend.o" + ;; + i[345]86-go32-msdos | i[345]86-*-go32) + cpu_type=i386 + tm_file=i386/go32.h + ;; i[345]86-*-lynxos*) cpu_type=i386 *************** *** 812,816 **** tm_file=i386/lynx-ng.h fi ! xm_file=xm-lynx.h xmake_file=x-lynx ;; --- 1018,1023 ---- tm_file=i386/lynx-ng.h fi ! xm_file=i386/xm-lynx.h ! tmake_file=i386/t-i386bare xmake_file=x-lynx ;; *************** *** 846,851 **** --- 1053,1060 ---- tm_file=i386/sco4dbx.h tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.rfile" else tm_file=i386/sco4.h + tmake_file=i386/t-crtstuff extra_parts="crtbegin.o crtend.o" fi *************** *** 861,867 **** --- 1070,1078 ---- tm_file=i386/scodbx.h tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.rfile" else tm_file=i386/sco.h extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff fi truncate_target=yes *************** *** 886,891 **** tm_file=i386/sysv4.h fi ! tmake_file=t-svr4 xmake_file=x-svr4 ;; i[345]86-*-sysv*) # Intel 80386's running system V --- 1097,1103 ---- tm_file=i386/sysv4.h fi ! tmake_file=i386/t-crtpic xmake_file=x-svr4 + extra_parts="crtbegin.o crtend.o" ;; i[345]86-*-sysv*) # Intel 80386's running system V *************** *** 899,911 **** --- 1111,1132 ---- tm_file=i386/svr3dbx.h tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.rfile" else tm_file=i386/svr3gas.h extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff fi else tm_file=i386/sysv3.h extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff fi ;; + i386-*-vsta) # Intel 80386's running VSTa kernel + xm_file=i386/xm-vsta.h + tm_file=i386/vsta.h + tmake_file=i386/t-vsta + xmake_file=i386/x-vsta + ;; i[345]86-*-winnt3*) cpu_type=i386 *************** *** 914,917 **** --- 1135,1141 ---- xm_file=i386/xm-winnt.h xmake_file=i386/x-winnt + tmake_file=i386/t-winnt + extra_objs=winnt.o + fixincludes=fixinc.winnt if [ x$gnu_ld != xyes ] then *************** *** 957,960 **** --- 1181,1200 ---- tm_file=i860/sysv4.h tmake_file=t-svr4 + extra_parts="crtbegin.o crtend.o" + ;; + i960-wrs-vxworks5 | i960-wrs-vxworks5.0*) + tmake_file=i960/t-vxworks960 + tm_file=i960/vx960.h + use_collect2=yes + ;; + i960-wrs-vxworks5*) + tmake_file=i960/t-vxworks960 + tm_file=i960/vx960-coff.h + use_collect2=yes + ;; + i960-wrs-vxworks*) + tmake_file=i960/t-vxworks960 + tm_file=i960/vx960.h + use_collect2=yes ;; i960-*-coff*) *************** *** 971,975 **** tm_file=m68k/ctix.h use_collect2=yes ! header_files=math-68881.h ;; m68000-hp-bsd*) # HP 9000/200 running BSD --- 1211,1215 ---- tm_file=m68k/ctix.h use_collect2=yes ! extra_headers=math-68881.h ;; m68000-hp-bsd*) # HP 9000/200 running BSD *************** *** 978,982 **** xmake_file=m68k/x-hp2bsd use_collect2=yes ! header_files=math-68881.h ;; m68000-hp-hpux*) # HP 9000 series 300 --- 1218,1222 ---- xmake_file=m68k/x-hp2bsd use_collect2=yes ! extra_headers=math-68881.h ;; m68000-hp-hpux*) # HP 9000 series 300 *************** *** 994,998 **** install_headers_dir=install-headers-cpio use_collect2=yes ! header_files=math-68881.h ;; m68000-sun-sunos3*) --- 1234,1238 ---- install_headers_dir=install-headers-cpio use_collect2=yes ! extra_headers=math-68881.h ;; m68000-sun-sunos3*) *************** *** 1000,1004 **** tm_file=m68k/sun2.h use_collect2=yes ! header_files=math-68881.h ;; m68000-sun-sunos4*) --- 1240,1244 ---- tm_file=m68k/sun2.h use_collect2=yes ! extra_headers=math-68881.h ;; m68000-sun-sunos4*) *************** *** 1006,1010 **** tm_file=m68k/sun2o4.h use_collect2=yes ! header_files=math-68881.h ;; m68000-att-sysv*) --- 1246,1250 ---- tm_file=m68k/sun2o4.h use_collect2=yes ! extra_headers=math-68881.h ;; m68000-att-sysv*) *************** *** 1018,1022 **** fi use_collect2=yes ! header_files=math-68881.h ;; m68k-apollo-*) --- 1258,1262 ---- fi use_collect2=yes ! extra_headers=math-68881.h ;; m68k-apollo-*) *************** *** 1024,1028 **** tm_file=m68k/apollo68.h use_collect2=yes ! header_files=math-68881.h ;; m68k-altos-sysv*) # Altos 3068 --- 1264,1268 ---- tm_file=m68k/apollo68.h use_collect2=yes ! extra_headers=math-68881.h ;; m68k-altos-sysv*) # Altos 3068 *************** *** 1035,1039 **** exit 1 fi ! header_files=math-68881.h ;; m68k-bull-sysv*) # Bull DPX/2 --- 1275,1279 ---- exit 1 fi ! extra_headers=math-68881.h ;; m68k-bull-sysv*) # Bull DPX/2 *************** *** 1052,1056 **** xmake_file=m68k/x-dpx2 use_collect2=yes ! header_files=math-68881.h ;; m68k-atari-sysv4*) # Atari variant of V.4. --- 1292,1296 ---- xmake_file=m68k/x-dpx2 use_collect2=yes ! extra_headers=math-68881.h ;; m68k-atari-sysv4*) # Atari variant of V.4. *************** *** 1058,1066 **** xm_file=m68k/xm-atari.h tmake_file=t-svr4 ! header_files=math-68881.h ;; m68k-motorola-sysv*) xm_file=m68k/xm-mot3300.h ! xmake_file=m68k/x-alloca-c if [ x$gas = xyes ] then --- 1298,1307 ---- xm_file=m68k/xm-atari.h tmake_file=t-svr4 ! extra_parts="crtbegin.o crtend.o" ! extra_headers=math-68881.h ;; m68k-motorola-sysv*) xm_file=m68k/xm-mot3300.h ! xmake_file=m68k/x-mot3300 if [ x$gas = xyes ] then *************** *** 1068,1074 **** else tm_file=m68k/mot3300.h fi use_collect2=yes ! header_files=math-68881.h ;; m68k-ncr-sysv*) # NCR Tower 32 SVR3 --- 1309,1316 ---- else tm_file=m68k/mot3300.h + gdb_needs_out_file_path=yes fi use_collect2=yes ! extra_headers=math-68881.h ;; m68k-ncr-sysv*) # NCR Tower 32 SVR3 *************** *** 1077,1081 **** xmake_file=m68k/x-tower extra_parts="crtbegin.o crtend.o" ! header_files=math-68881.h ;; m68k-plexus-sysv*) --- 1319,1323 ---- xmake_file=m68k/x-tower extra_parts="crtbegin.o crtend.o" ! extra_headers=math-68881.h ;; m68k-plexus-sysv*) *************** *** 1083,1092 **** xm_file=m68k/xm-plexus.h use_collect2=yes ! header_files=math-68881.h ;; m68k-tti-*) tm_file=m68k/pbb.h xm_file=m68k/xm-m68kv.h ! header_files=math-68881.h ;; m68k-crds-unos*) --- 1325,1334 ---- xm_file=m68k/xm-plexus.h use_collect2=yes ! extra_headers=math-68881.h ;; m68k-tti-*) tm_file=m68k/pbb.h xm_file=m68k/xm-m68kv.h ! extra_headers=math-68881.h ;; m68k-crds-unos*) *************** *** 1096,1100 **** broken_install=yes use_collect2=yes ! header_files=math-68881.h ;; m68k-cbm-sysv4*) # Commodore variant of V.4. --- 1338,1342 ---- broken_install=yes use_collect2=yes ! extra_headers=math-68881.h ;; m68k-cbm-sysv4*) # Commodore variant of V.4. *************** *** 1103,1112 **** xmake_file=m68k/x-amix tmake_file=t-svr4 ! header_files=math-68881.h ;; m68k-ccur-rtu) tm_file=m68k/ccur-GAS.h xmake_file=m68k/x-ccur ! header_files=math-68881.h use_collect2=yes broken_install=yes --- 1345,1355 ---- xmake_file=m68k/x-amix tmake_file=t-svr4 ! extra_parts="crtbegin.o crtend.o" ! extra_headers=math-68881.h ;; m68k-ccur-rtu) tm_file=m68k/ccur-GAS.h xmake_file=m68k/x-ccur ! extra_headers=math-68881.h use_collect2=yes broken_install=yes *************** *** 1116,1125 **** xmake_file=m68k/x-hp3bsd44 use_collect2=yes ! header_files=math-68881.h ;; m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix tm_file=m68k/hp3bsd.h use_collect2=yes ! header_files=math-68881.h ;; m68k-isi-bsd*) --- 1359,1368 ---- xmake_file=m68k/x-hp3bsd44 use_collect2=yes ! extra_headers=math-68881.h ;; m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix tm_file=m68k/hp3bsd.h use_collect2=yes ! extra_headers=math-68881.h ;; m68k-isi-bsd*) *************** *** 1131,1135 **** fi use_collect2=yes ! header_files=math-68881.h ;; m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. --- 1374,1378 ---- fi use_collect2=yes ! extra_headers=math-68881.h ;; m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. *************** *** 1146,1150 **** install_headers_dir=install-headers-cpio use_collect2=yes ! header_files=math-68881.h ;; m68k-hp-hpux*) # HP 9000 series 300 --- 1389,1393 ---- install_headers_dir=install-headers-cpio use_collect2=yes ! extra_headers=math-68881.h ;; m68k-hp-hpux*) # HP 9000 series 300 *************** *** 1161,1170 **** install_headers_dir=install-headers-cpio use_collect2=yes ! header_files=math-68881.h ;; m68k-sun-mach*) tm_file=m68k/sun3mach.h use_collect2=yes ! header_files=math-68881.h ;; m68k-sony-newsos3*) --- 1404,1413 ---- install_headers_dir=install-headers-cpio use_collect2=yes ! extra_headers=math-68881.h ;; m68k-sun-mach*) tm_file=m68k/sun3mach.h use_collect2=yes ! extra_headers=math-68881.h ;; m68k-sony-newsos3*) *************** *** 1176,1180 **** fi use_collect2=yes ! header_files=math-68881.h ;; m68k-sony-bsd* | m68k-sony-newsos*) --- 1419,1423 ---- fi use_collect2=yes ! extra_headers=math-68881.h ;; m68k-sony-bsd* | m68k-sony-newsos*) *************** *** 1186,1190 **** fi use_collect2=yes ! header_files=math-68881.h ;; m68k-next-nextstep2*) --- 1429,1433 ---- fi use_collect2=yes ! extra_headers=math-68881.h ;; m68k-next-nextstep2*) *************** *** 1194,1198 **** tmake_file=m68k/t-next xmake_file=m68k/x-next ! header_files=math-68881.h use_collect2=yes ;; --- 1437,1441 ---- tmake_file=m68k/t-next xmake_file=m68k/x-next ! extra_headers=math-68881.h use_collect2=yes ;; *************** *** 1203,1207 **** tmake_file=m68k/t-next xmake_file=m68k/x-next ! header_files=math-68881.h ;; m68k-sun-sunos3*) --- 1446,1450 ---- tmake_file=m68k/t-next xmake_file=m68k/x-next ! extra_headers=math-68881.h ;; m68k-sun-sunos3*) *************** *** 1213,1219 **** fi use_collect2=yes ! header_files=math-68881.h ;; ! m68k-sun-sunos* | m68k-wrs-vxworks) # For SunOS 4 (the default). if [ x$nfp = xyes ] then --- 1456,1462 ---- fi use_collect2=yes ! extra_headers=math-68881.h ;; ! m68k-sun-sunos*) # For SunOS 4 (the default). if [ x$nfp = xyes ] then *************** *** 1223,1228 **** fi use_collect2=yes ! header_files=math-68881.h ;; m68k-*-lynxos*) if [ x$gas = xyes ] --- 1466,1486 ---- fi use_collect2=yes ! extra_headers=math-68881.h ;; + m68k-wrs-vxworks*) + tm_file=m68k/vxm68k.h + tmake_file=m68k/t-vxworks68 + extra_headers=math-68881.h + ;; + m68k-*-aout*) + tmake_file=m68k/t-m68kbare + tm_file=m68k/m68k-aout.h + extra_headers=math-68881.h + ;; + m68k-*-coff*) + tmake_file=m68k/t-m68kbare + tm_file=m68k/m68k-coff.h + extra_headers=math-68881.h + ;; m68k-*-lynxos*) if [ x$gas = xyes ] *************** *** 1232,1244 **** tm_file=m68k/lynx-ng.h fi ! xm_file=xm-lynx.h xmake_file=x-lynx ! header_files=math-68881.h ;; m68k-*-netbsd*) cpu_type=m68k ! tm_file=m68k/netbsd-m68k.h # On NetBSD, the headers are already okay. fixincludes=Makefile.in xmake_file=x-netbsd ;; --- 1490,1505 ---- tm_file=m68k/lynx-ng.h fi ! xm_file=m68k/xm-lynx.h xmake_file=x-lynx ! tmake_file=m68k/t-lynx ! extra_headers=math-68881.h ;; m68k-*-netbsd*) cpu_type=m68k ! tm_file=m68k/netbsd.h ! xm_file=m68k/xm-netbsd.h # On NetBSD, the headers are already okay. fixincludes=Makefile.in + tmake_file=t-libc-ok xmake_file=x-netbsd ;; *************** *** 1247,1251 **** xmake_file=m68k/x-m68kv extra_parts="crtbegin.o crtend.o" ! header_files=math-68881.h ;; m68k-*-sysv4*) # Motorola m68k's running system V.4 --- 1508,1512 ---- xmake_file=m68k/x-m68kv extra_parts="crtbegin.o crtend.o" ! extra_headers=math-68881.h ;; m68k-*-sysv4*) # Motorola m68k's running system V.4 *************** *** 1253,1257 **** xm_file=m68k/xm-m68kv.h tmake_file=t-svr4 ! header_files=math-68881.h ;; m88k-dg-dgux*) --- 1514,1519 ---- xm_file=m68k/xm-m68kv.h tmake_file=t-svr4 ! extra_parts="crtbegin.o crtend.o" ! extra_headers=math-68881.h ;; m88k-dg-dgux*) *************** *** 1296,1304 **** fi ;; ! m88k-mot*-sysv4*) ! tm_file=m88k/mot-sysv4.h ! extra_parts="crtbegin.o crtend.o" ! xmake_file=m88k/x-sysv4 ! tmake_file=m88k/t-sysv4 ;; m88k-*-luna*) --- 1558,1569 ---- fi ;; ! m88k-*-aout*) ! cpu_type=m88k ! tm_file=m88k/m88k-aout.h ! ;; ! m88k-*-coff*) ! cpu_type=m88k ! tm_file=m88k/m88k-coff.h ! tmake_file=m88k/t-bug ;; m88k-*-luna*) *************** *** 1328,1331 **** --- 1593,1612 ---- tmake_file=m88k/t-sysv4 ;; + mips-sgi-irix6*) # SGI System V.4., IRIX 6 + tm_file=mips/iris6.h + xm_file=mips/xm-iris6.h + broken_install=yes + fixincludes=Makefile.in + xmake_file=mips/x-iris6 + tmake_file=mips/t-iris6 + ;; + mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64 + tm_file=mips/cross64.h + xm_file=mips/xm-iris5.h + broken_install=yes + fixincludes=Makefile.in + xmake_file=mips/x-iris + tmake_file=mips/t-cross64 + ;; mips-sgi-irix5*) # SGI System V.4., IRIX 5 if [ x$gas = xyes ] *************** *** 1452,1455 **** --- 1733,1744 ---- fi ;; + mips-dec-netbsd*) # Decstation running NetBSD + tm_file=mips/netbsd.h + xm_file=mips/xm-netbsd.h + xmake_file=x-netbsd + tmake_file=t-libc-ok + fixincludes=Makefile.in + prefix=$native_prefix + ;; mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news. if [ x$stabs = xyes ]; then *************** *** 1500,1506 **** if [ x$gas = xyes ] then ! tmake_file=mips/t-svr4-gas else ! tmake_file=mips/t-svr4 extra_passes="mips-tfile mips-tdump" fi --- 1789,1796 ---- if [ x$gas = xyes ] then ! tmake_file=mips/t-mips-gas ! extra_parts="crtbegin.o crtend.o" else ! tmake_file=mips/t-mips extra_passes="mips-tfile mips-tdump" fi *************** *** 1511,1515 **** broken_install=yes ;; ! mips-*-ultrix*) # Decstation. if [ x$stabs = xyes ]; then tm_file=mips/ultrix-gdb.h --- 1801,1805 ---- broken_install=yes ;; ! mips-*-ultrix* | mips-dec-mach3) # Decstation. if [ x$stabs = xyes ]; then tm_file=mips/ultrix-gdb.h *************** *** 1670,1673 **** --- 1960,2014 ---- broken_install=yes ;; + mips-*-gnu*) + cpu_type=mips # GNU supports this CPU; rest done below. + ;; + mipsel-*-ecoff*) + cpu_type=mips + if [ x$stabs = xyes ]; then + tm_file=mips/ecoffl-gdb.h + else + tm_file=mips/ecoffl.h + fi + tmake_file=mips/t-ecoff + ;; + mips-*-ecoff*) + if [ x$stabs = xyes ]; then + tm_file=mips/ecoff-gdb.h + else + tm_file=mips/ecoff.h + fi + tmake_file=mips/t-ecoff + broken_install=yes + ;; + mipsel-*-elf*) + cpu_type=mips + tm_file=mips/elfl.h + tmake_file=mips/t-ecoff + ;; + mips-*-elf*) + cpu_type=mips + tm_file=mips/elf.h + tmake_file=mips/t-ecoff + ;; + mips64el-*-elf*) + cpu_type=mips + tm_file=mips/elfl64.h + tmake_file=mips/t-ecoff + ;; + mips64orionel-*-elf*) + cpu_type=mips + tm_file=mips/elflorion.h + tmake_file=mips/t-ecoff + ;; + mips64-*-elf*) + cpu_type=mips + tm_file=mips/elf64.h + tmake_file=mips/t-ecoff + ;; + mips64orion-*-elf*) + cpu_type=mips + tm_file=mips/elforion.h + tmake_file=mips/t-ecoff + ;; mips-*-*) # Default MIPS RISC-OS 4.0. if [ x$stabs = xyes ]; then *************** *** 1746,1761 **** use_collect2=yes ;; powerpc-ibm-aix*) cpu_type=rs6000 tm_file=rs6000/powerpc.h use_collect2=yes ;; rs6000-ibm-aix3.[01]*) tm_file=rs6000/aix31.h xmake_file=rs6000/x-aix31 use_collect2=yes ;; ! rs6000-ibm-aix4.1*) tm_file=rs6000/aix41.h xmake_file=rs6000/x-aix31 use_collect2=yes --- 2087,2162 ---- use_collect2=yes ;; + powerpc-ibm-aix[456789].*) + cpu_type=rs6000 + tm_file=rs6000/aix41ppc.h + tmake_file=rs6000/t-rs6000 + use_collect2=yes + ;; powerpc-ibm-aix*) cpu_type=rs6000 tm_file=rs6000/powerpc.h + tmake_file=rs6000/t-rs6000 use_collect2=yes ;; + powerpc-*-sysv4* | powerpc-*-elf*) + cpu_type=rs6000 + xm_file=rs6000/xm-sysv4.h + tm_file=rs6000/sysv4.h + if [ x$gas = xyes ] + then + tmake_file=rs6000/t-ppcgas + else + tmake_file=rs6000/t-ppc + fi + xmake_file=rs6000/x-sysv4 + ;; + powerpc-*-eabi*) + cpu_type=rs6000 + tm_file=rs6000/eabi.h + if [ x$gas = xyes ] + then + tmake_file=rs6000/t-eabigas + else + tmake_file=rs6000/t-eabi + fi + fixincludes=Makefile.in + ;; + powerpcle-*-sysv4* | powerpcle-*-elf*) + cpu_type=rs6000 + xm_file=rs6000/xm-sysv4.h + tm_file=rs6000/sysv4le.h + if [ x$gas = xyes ] + then + tmake_file=rs6000/t-ppcgas + else + tmake_file=rs6000/t-ppc + fi + xmake_file=rs6000/x-sysv4 + ;; + powerpcle-*-eabi*) + cpu_type=rs6000 + tm_file=rs6000/eabile.h + if [ x$gas = xyes ] + then + tmake_file=rs6000/t-eabigas + else + tmake_file=rs6000/t-eabi + fi + fixincludes=Makefile.in + ;; rs6000-ibm-aix3.[01]*) tm_file=rs6000/aix31.h + tmake_file=rs6000/t-rs6000 xmake_file=rs6000/x-aix31 use_collect2=yes ;; ! rs6000-ibm-aix3.2.[456789]*) ! tm_file=rs6000/aix3newas.h ! tmake_file=rs6000/t-rs6000 ! use_collect2=yes ! ;; ! rs6000-ibm-aix[456789].*) tm_file=rs6000/aix41.h + tmake_file=rs6000/t-rs6000 xmake_file=rs6000/x-aix31 use_collect2=yes *************** *** 1763,1768 **** --- 2164,2171 ---- rs6000-ibm-aix*) use_collect2=yes + tmake_file=rs6000/t-rs6000 ;; rs6000-bull-bosx) + tmake_file=rs6000/t-rs6000 use_collect2=yes ;; *************** *** 1770,1776 **** --- 2173,2187 ---- xm_file=rs6000/xm-mach.h tm_file=rs6000/mach.h + tmake_file=rs6000/t-rs6000 xmake_file=rs6000/x-mach use_collect2=yes ;; + rs6000-*-lynxos*) + xmake_file=rs6000/x-lynx + xm_file=rs6000/xm-lynx.h + tm_file=rs6000/lynx.h + tmake_file=rs6000/t-rs6000 + use_collect2=yes + ;; sh-*-*) cpu_type=sh *************** *** 1780,1787 **** xm_file=sparc/xm-pbd.h ;; ! sparc-*-netbsd) tm_file=sparc/netbsd.h # On NetBSD, the headers are already okay. fixincludes=Makefile.in xmake_file=x-netbsd ;; --- 2191,2210 ---- xm_file=sparc/xm-pbd.h ;; ! sparc-wrs-vxworks* | sparclite-wrs-vxworks*) ! cpu_type=sparc ! tm_file=sparc/vxsparc.h ! tmake_file=sparc/t-vxsparc ! use_collect2=yes ! ;; ! sparc-*-aout*) ! tmake_file=sparc/t-sparcbare ! tm_file=sparc/sparc-aout.h ! ;; ! sparc-*-netbsd*) tm_file=sparc/netbsd.h + xm_file=sparc/xm-netbsd.h # On NetBSD, the headers are already okay. fixincludes=Makefile.in + tmake_file=t-libc-ok xmake_file=x-netbsd ;; *************** *** 1796,1800 **** tm_file=sparc/lynx-ng.h fi ! xm_file=xm-lynx.h xmake_file=x-lynx ;; --- 2219,2224 ---- tm_file=sparc/lynx-ng.h fi ! xm_file=sparc/xm-lynx.h ! tmake_file=sparc/t-sunos41 xmake_file=x-lynx ;; *************** *** 1809,1818 **** ;; sparc-*-sunos4.0*) ! tm_file=sparc/sparc.h tmake_file=sparc/t-sunos40 use_collect2=yes ;; sparc-*-sunos4*) ! tm_file=sparc/sparc.h tmake_file=sparc/t-sunos41 use_collect2=yes --- 2233,2242 ---- ;; sparc-*-sunos4.0*) ! tm_file=sparc/sunos4.h tmake_file=sparc/t-sunos40 use_collect2=yes ;; sparc-*-sunos4*) ! tm_file=sparc/sunos4.h tmake_file=sparc/t-sunos41 use_collect2=yes *************** *** 1827,1845 **** tmake_file=t-svr4 xmake_file=sparc/x-sysv4 ;; sparclite-*-*) cpu_type=sparc tm_file=sparc/lite.h use_collect2=yes ;; ! sparc64-*-aout) cpu_type=sparc tmake_file=sparc/t-sp64 tm_file=sparc/sp64-aout.h ;; ! sparc64-*-elf) cpu_type=sparc tmake_file=sparc/t-sp64 tm_file=sparc/sp64-elf.h ;; # This hasn't been upgraded to GCC 2. --- 2251,2277 ---- tmake_file=t-svr4 xmake_file=sparc/x-sysv4 + extra_parts="crtbegin.o crtend.o" + ;; + sparclite-*-coff*) + cpu_type=sparc + tm_file=sparc/litecoff.h + tmake_file=sparc/t-sparclite ;; sparclite-*-*) cpu_type=sparc tm_file=sparc/lite.h + tmake_file=sparc/t-sparclite use_collect2=yes ;; ! sparc64-*-aout*) cpu_type=sparc tmake_file=sparc/t-sp64 tm_file=sparc/sp64-aout.h ;; ! sparc64-*-elf*) cpu_type=sparc tmake_file=sparc/t-sp64 tm_file=sparc/sp64-elf.h + extra_parts="crtbegin.o crtend.o" ;; # This hasn't been upgraded to GCC 2. *************** *** 1861,1864 **** --- 2293,2304 ---- tm_file=vax/vaxv.h ;; + vax-*-netbsd*) + tm_file=vax/netbsd.h + xm_file=vax/xm-netbsd.h + tmake_file=t-libc-ok + # On NetBSD, the headers are already okay. + fixincludes=Makefile.in + xmake_file=x-netbsd + ;; vax-*-ultrix*) # vaxen running ultrix tm_file=vax/ultrix.h *************** *** 1884,1887 **** --- 2324,2346 ---- case $machine in + *-*-gnu*) + # On the GNU system, the setup is just about the same on + # each different CPU. The specific machines that GNU + # supports are matched above and just set $cpu_type. + xm_file=${cpu_type}/xm-gnu.h + tm_file=${cpu_type}/gnu.h + extra_parts="crtbegin.o crtend.o" + # GNU always uses ELF. + elf=yes + # Don't build libgcc1.c, because there is no non-GNU + # compiler to build it with. The GNU system C library will + # include assembly versions of any needed functions. + tmake_file=t-libc-ok + # GNU tools are the only tools. + gnu_ld=yes + gas=yes + # On GNU, the headers are already okay. + fixincludes=Makefile.in + ;; *-*-sysv4*) fixincludes=fixinc.svr4 *************** *** 1903,1907 **** target_cpu_default=2 ;; ! mips-*-*) if [ x$gas = xyes ] then --- 2362,2366 ---- target_cpu_default=2 ;; ! mips*-*-*) if [ x$gas = xyes ] then *************** *** 1961,1966 **** then tm_file=$cpu_type/$cpu_type.h; fi ! if [ x$header_files = x ] ! then header_files=; fi if [ x$xm_file = x ] --- 2420,2425 ---- then tm_file=$cpu_type/$cpu_type.h; fi ! if [ x$extra_headers = x ] ! then extra_headers=; fi if [ x$xm_file = x ] *************** *** 1976,1988 **** fi # Set up the list of links to be made. # $links is the list of link names, and $files is the list of names to link to. ! files="$host_xm_file $tm_file $out_file $xm_file $build_xm_file $md_file" ! links="config.h tm.h aux-output.c tconfig.h hconfig.h" ! ! if [ "x$md_cppflags" = x ] ! then links="$links md" ! else links="$links md.pre-cpp" ! fi rm -f config.bak --- 2435,2451 ---- fi + # Say what files are being used for the output code and MD file. + echo "Using \`$srcdir/config/$out_file' to output insns." + echo "Using \`$srcdir/config/$md_file' as machine description file." + echo "Using \`$srcdir/config/$tm_file' as target machine macro file." + echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." + if [ $host_xm_file != $build_xm_file ]; then + echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." + fi + # Set up the list of links to be made. # $links is the list of link names, and $files is the list of names to link to. ! files="$host_xm_file $tm_file $xm_file $build_xm_file" ! links="config.h tm.h tconfig.h hconfig.h" rm -f config.bak *************** *** 1996,2016 **** set $links; link=$1; shift; links=$* ! if [ ! -r ${srcdir}/config/$file ] ! then ! echo "$progname: cannot create a link \`$link'," 1>&2 ! echo "since the file \`config/$file' does not exist" 1>&2 ! exit 1 ! fi ! ! $remove -f $link ! # Make a symlink if possible, otherwise try a hard link ! $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link || $copy ${srcdir}/config/$file $link ! ! if [ ! -r $link ] ! then ! echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'" 1>&2 ! exit 1 ! fi ! echo "Linked \`$link' to \`${srcdir}/config/$file'" done --- 2459,2464 ---- set $links; link=$1; shift; links=$* ! rm -f $link ! echo "#include \"$file\"" >$link done *************** *** 2031,2043 **** case $lang in ..) ;; ! # The odd quoting in the next line is an attempt to work around ! # an apparent bug in bash 1.12 on linux. This is known to not ! # work for bash 1.12.4. Try using ${srcdir}/[*]/config-lang.in ! # here if this doesn't work for you. ! ${srcdir}'/*/config-lang.in') ;; *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; esac done savesrcdir=$srcdir for subdir in . $subdirs --- 2479,2528 ---- case $lang in ..) ;; ! # The odd quoting in the next line works around ! # an apparent bug in bash 1.12 on linux. ! ${srcdir}/[*]/config-lang.in) ;; *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; esac done + # Are we using gcc as the native compiler? + case $canon_host in + *linux*) # All Linux's use gcc as the native compiler. + prefix=$native_prefix + ;; + esac + + # Make empty files to contain the specs and options for each language. + # Then add #include lines to for a compiler that has specs and/or options. + + lang_specs_files= + lang_options_files= + rm -f specs.h options.h + touch specs.h options.h + for subdir in . $subdirs + do + if [ -f $srcdir/$subdir/lang-specs.h ]; then + echo "#include \"$subdir/lang-specs.h\"" >>specs.h + lang_specs_files="$lang_specs_files $subdir/lang-specs.h" + fi + if [ -f $srcdir/$subdir/lang-options.h ]; then + echo "#include \"$subdir/lang-options.h\"" >>options.h + lang_options_files="$lang_options_files $subdir/lang-options.h" + fi + done + + # Define SET_MAKE if this old version of `make' doesn't define $(MAKE). + rm -f Makefile.xx + (echo 'all:'; echo ' @echo maketemp=$(MAKE)') >Makefile.xx + case `${MAKE-make} -f Makefile.xx 2>/dev/null | grep maketemp=` in + 'maketemp=') + SET_MAKE="MAKE = ${MAKE-make}" + ;; + *) + SET_MAKE= + ;; + esac + rm -f Makefile.xx + savesrcdir=$srcdir for subdir in . $subdirs *************** *** 2085,2088 **** --- 2570,2577 ---- echo "dir ." > .gdbinit echo "dir ${srcdir}" >> .gdbinit + if [ x$gdb_needs_out_file_path = xyes ] + then + echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit + fi if [ "x$subdirs" != x ]; then for s in $subdirs *************** *** 2111,2114 **** --- 2600,2612 ---- fi + # Add a definition for MAKE if system wants one. + case "$SET_MAKE" in + ?*) + rm -f Makefile.xx + (echo "$SET_MAKE"; cat Makefile.tem) >Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + esac + # Add a definition for INSTALL if system wants one. # This substitutes for lots of x-* files. *************** *** 2127,2138 **** # as is. ! # Set EXTRA_HEADERS according to header_files. # This substitutes for lots of t-* files. ! if [ "x$header_files" = x ] then true else ! # Prepend ${srcdir}/ginclude/ to every entry in header_files. list= ! for file in $header_files; do list="${list} ${srcdir}/ginclude/${file}" --- 2625,2636 ---- # as is. ! # Set EXTRA_HEADERS according to extra_headers. # This substitutes for lots of t-* files. ! if [ "x$extra_headers" = x ] then true else ! # Prepend ${srcdir}/ginclude/ to every entry in extra_headers. list= ! for file in $extra_headers; do list="${list} ${srcdir}/ginclude/${file}" *************** *** 2182,2186 **** else rm -f Makefile.xx ! sed "s/^EXTRA_OBJS =/EXTRA_OBJS = $extra_objs/" Makefile.tem > Makefile.xx rm -f Makefile.tem mv Makefile.xx Makefile.tem --- 2680,2684 ---- else rm -f Makefile.xx ! sed "s|^EXTRA_OBJS =|EXTRA_OBJS = $extra_objs|" Makefile.tem > Makefile.xx rm -f Makefile.tem mv Makefile.xx Makefile.tem *************** *** 2220,2231 **** # built. Otherwise, we can use the cpp just built. if [ "x$md_cppflags" = x ] ! then true else rm -f Makefile.xx (if [ x$host = x$build ] ; then ! echo "MD_DEPS = md.pre-cpp cpp" ; echo "MD_CPP = ./cpp" else echo "MD_DEPS = md.pre-cpp" ; echo "MD_CPP = \$(HOST_CC) -x c -E" fi echo "MD_CPPFLAGS = $md_cppflags") | \ cat - Makefile.tem | sed -e "s|^MD_FILE[ ]*=.*|MD_FILE = md|" > Makefile.xx --- 2718,2731 ---- # built. Otherwise, we can use the cpp just built. if [ "x$md_cppflags" = x ] ! then ! md_file=$srcdir/config/$md_file else rm -f Makefile.xx (if [ x$host = x$build ] ; then ! echo "MD_DEPS = $(md_file) cpp" ; echo "MD_CPP = ./cpp" else echo "MD_DEPS = md.pre-cpp" ; echo "MD_CPP = \$(HOST_CC) -x c -E" fi + md_file=md echo "MD_CPPFLAGS = $md_cppflags") | \ cat - Makefile.tem | sed -e "s|^MD_FILE[ ]*=.*|MD_FILE = md|" > Makefile.xx *************** *** 2234,2237 **** --- 2734,2760 ---- fi + # If we have gas in the build tree, make a link to it. + if [ -f ../gas/Makefile ]; then + rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null + fi + + # If we have ld in the build tree, make a link to it. + if [ -f ../ld/Makefile ]; then + if [ x$use_collect2 = x ]; then + rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null + else + rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null + fi + fi + + # If using -program-transform-name, override the installation names. + if [ "x${program_transform_set}" = "xyes" ] ; then + sed -e "s/^program_transform_name[ ]*=.*$/program_transform_name = $program_transform_name/" \ + -e "s/^program_transform_cross_name[ ]*=.*$/program_transform_cross_name = $program_transform_name/" \ + Makefile.tem > Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + fi + # Conditionalize the makefile for this target machine. if [ -f ${mainsrcdir}/config/${tmake_file} ] *************** *** 2312,2316 **** install-normal install-common install-info install-man \ uninstall distdir \ ! mostlyclean clean distclean extraclean realclean \ stage1 stage2 stage3 stage4" rm -f Makefile.ll --- 2835,2839 ---- install-normal install-common install-info install-man \ uninstall distdir \ ! mostlyclean clean distclean extraclean maintainer-clean \ stage1 stage2 stage3 stage4" rm -f Makefile.ll *************** *** 2365,2387 **** done fi # Remove all formfeeds, since some Makes get confused by them. # Also arrange to give the variables `target', `host_xmake_file', # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES' ! # and `INSTALL_HEADERS_DIR' values in the Makefile from the values ! # they have in this script. rm -f Makefile.xx ! sed -e "s/ //" -e "s/^target=.*$/target=${target}/" \ ! -e "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" \ ! -e "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" \ ! -e "s|^version=.*$|version=${version}|" \ ! -e "s|^prefix[ ]*=.*|prefix = $prefix|" \ ! -e "s|^gxx_include_dir[ ]*=.*|gxx_include_dir = $gxx_include_dir|" \ ! -e "s|^local_prefix[ ]*=.*|local_prefix = $local_prefix|" \ ! -e "s|^exec_prefix[ ]*=.*|exec_prefix = $exec_prefix|" \ ! -e "s|^FIXINCLUDES[ ]*=.*|FIXINCLUDES = $fixincludes|" \ ! -e "s|^INSTALL_HEADERS_DIR[ ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" \ ! Makefile.tem > Makefile.xx ! rm -f Makefile.tem mv Makefile.xx Makefile.tem --- 2888,2924 ---- done fi + + out_object_file=`basename $out_file .c`.o # Remove all formfeeds, since some Makes get confused by them. # Also arrange to give the variables `target', `host_xmake_file', # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES' ! # `out_file', `out_object', `md_file', `lang_specs_files', ! # `lang_options_files', and `INSTALL_HEADERS_DIR' values in the ! # Makefile from the values they have in this script. rm -f Makefile.xx ! rm -f aux-output.c aux-output.o md ! echo 's| ||' > Makefile.sed ! echo "s|^target=.*$|target=${target}|" >> Makefile.sed ! echo "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" >> Makefile.sed ! echo "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" >> Makefile.sed ! echo "s|^version=.*$|version=${version}|" >> Makefile.sed ! echo "s|^version=.*$|version=${version}|" >> Makefile.sed ! echo "s|^out_file=.*$|out_file=${srcdir}/config/${out_file}|" >> Makefile.sed ! echo "s|^out_object_file=.*$|out_object_file=${out_object_file}|" >> Makefile.sed ! echo "s|^md_file=.*$|md_file=${md_file}|" >> Makefile.sed ! echo "s|^tm_file=.*$|tm_file=${srcdir}/config/${tm_file}|" >> Makefile.sed ! echo "s|^host_xm_file=.*$|host_xm_file=${srcdir}/config/${host_xm_file}|" >> Makefile.sed ! echo "s|^build_xm_file=.*$|build_xm_file=${srcdir}/config/${build_xm_file}|" >> Makefile.sed ! echo "s|^lang_specs_files=.*$|lang_specs_files=${lang_specs_files}|" >> Makefile.sed ! echo "s|^lang_options_files=.*$|lang_options_files=${lang_options_files}|" >> Makefile.sed ! echo "s|^prefix[ ]*=.*|prefix = $prefix|" >> Makefile.sed ! echo "s|^gxx_include_dir[ ]*=.*|gxx_include_dir = $gxx_include_dir|" >> Makefile.sed ! echo "s|^local_prefix[ ]*=.*|local_prefix = $local_prefix|" >> Makefile.sed ! echo "s|^exec_prefix[ ]*=.*|exec_prefix = $exec_prefix|" >> Makefile.sed ! echo "s|^FIXINCLUDES[ ]*=.*|FIXINCLUDES = $fixincludes|" >> Makefile.sed ! echo "s|^INSTALL_HEADERS_DIR[ ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" >> Makefile.sed ! sed -f Makefile.sed Makefile.tem > Makefile.xx ! rm -f Makefile.tem Makefile.sed mv Makefile.xx Makefile.tem *************** *** 2409,2420 **** rm -f Makefile.tem Makefile.xx fi ! echo "Created \`$subdir/Makefile'." ! ! if [ xx${vint} != xx ] ! then ! vintmsg=" (vint)" ! fi ! # If a subdirectory has a configure script, run it. if [ x$subdir != x. ] --- 2946,2952 ---- rm -f Makefile.tem Makefile.xx fi ! echo "Created \`$subdir/Makefile'." ! # If a subdirectory has a configure script, run it. if [ x$subdir != x. ] diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/configure.bat gcc-2.7.0/configure.bat *** gcc-2.6.3/configure.bat Fri Jul 22 09:57:07 1994 --- gcc-2.7.0/configure.bat Tue May 16 18:34:25 1995 *************** *** 1,2 **** @echo off ! config\msdos\configure %1 %2 %3 %4 --- 1,21 ---- @echo off ! if %1.==go32. goto call_go32 ! if %1.==winnt. goto call_winnt ! echo Usage: configure go32 or configure winnt cpu ! goto END ! ! :call_go32 ! call config\msdos\configure %1 %2 %3 %4 ! goto END ! ! :call_winnt ! if %2.==i386. goto really_call_winnt ! if %2.==alpha. goto really_call_winnt ! echo Usage: configure winnt i386 or configure winnt alpha ! goto END ! :really_call_winnt ! call config\%2\config-nt %1 %2 %3 %4 ! goto END ! ! :END ! diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/convert.c gcc-2.7.0/convert.c *** gcc-2.6.3/convert.c Wed May 18 02:46:21 1994 --- gcc-2.7.0/convert.c Thu Jun 15 07:20:12 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 27,33 **** #include "convert.h" ! /* Convert EXPR to some pointer type TYPE. ! EXPR must be pointer, integer, enumeral, or literal zero; in other cases error is called. */ --- 28,34 ---- #include "convert.h" ! /* Convert EXPR to some pointer or reference type TYPE. ! EXPR must be pointer, reference, integer, enumeral, or literal zero; in other cases error is called. */ *************** *** 41,46 **** if (integer_zerop (expr)) { - if (type == TREE_TYPE (null_pointer_node)) - return null_pointer_node; expr = build_int_2 (0, 0); TREE_TYPE (expr) = type; --- 42,45 ---- *************** *** 48,52 **** } ! if (form == POINTER_TYPE) return build1 (NOP_EXPR, type, expr); --- 47,51 ---- } ! if (form == POINTER_TYPE || form == REFERENCE_TYPE) return build1 (NOP_EXPR, type, expr); *************** *** 68,72 **** error ("cannot convert to a pointer type"); ! return null_pointer_node; } --- 67,73 ---- error ("cannot convert to a pointer type"); ! expr = build_int_2 (0, 0); ! TREE_TYPE (expr) = type; ! return expr; } *************** *** 93,97 **** TREE_TYPE (TREE_TYPE (expr)), expr))); ! if (form == POINTER_TYPE) error ("pointer value used where a floating point value was expected"); else --- 94,98 ---- TREE_TYPE (TREE_TYPE (expr)), expr))); ! if (form == POINTER_TYPE || form == REFERENCE_TYPE) error ("pointer value used where a floating point value was expected"); else *************** *** 121,125 **** register enum tree_code form = TREE_CODE (intype); ! if (form == POINTER_TYPE) { if (integer_zerop (expr)) --- 122,126 ---- register enum tree_code form = TREE_CODE (intype); ! if (form == POINTER_TYPE || form == REFERENCE_TYPE) { if (integer_zerop (expr)) *************** *** 450,454 **** } ! if (form == POINTER_TYPE) error ("pointer value used where a complex was expected"); else --- 451,455 ---- } ! if (form == POINTER_TYPE || form == REFERENCE_TYPE) error ("pointer value used where a complex was expected"); else diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/convert.h gcc-2.7.0/convert.h *** gcc-2.6.3/convert.h Wed Mar 3 22:50:45 1993 --- gcc-2.7.0/convert.h Thu Jun 15 07:20:50 1995 *************** *** 16,20 **** 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. */ extern tree convert_to_integer PROTO ((tree, tree)); --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ extern tree convert_to_integer PROTO ((tree, tree)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/ChangeLog gcc-2.7.0/cp/ChangeLog *** gcc-2.6.3/cp/ChangeLog Fri Nov 18 16:45:19 1994 --- gcc-2.7.0/cp/ChangeLog Fri Jun 16 15:09:57 1995 *************** *** 1,76 **** Thu Nov 17 10:56:50 1994 Jason Merrill ! * typeck2.c (build_m_component_ref): Check the basetype of the ! member pointer against the main variant of the object type. Mon Nov 14 14:21:52 1994 Jason Merrill ! * cvt.c (convert_to_reference): Make sure that the original expr ! gets its type back when converting a reference. ! * method.c (build_overload_name): Clear numeric_outputed_need_bar here. ! (build_decl_overload): Instead of here. Tue Nov 8 17:11:24 1994 Jason Merrill ! * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a ! function. ! * typeck.c (convert_for_initialization): Handle initialization from ! a TARGET_EXPR. Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * pt.c (lookup_nested_type_by_name): Fix list-walking logic. ! (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate ! TYPE_READONLY and TYPE_VOLATILE from the argument. ! (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals ! present in parm from arg. ! (type_unification): Strip REFERENCE_TYPE from the argument type. ! (unify): Don't strip REFERENCE_TYPE from the argument type. Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com) ! * pt.c (do_type_instantiation): Check to see if there's a ! IDENTIFIER_TEMPLATE on a class before calling ! instantiate_member_templates(). ! Thu Nov 3 18:48:19 1994 Paul Eggert ! * Makefile.in (spew.o, lex.o, pt.o): ! Depend on $(srcdir)/parse.h, not parse.h. ! Sat Oct 29 07:18:52 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ! * g++.c (main): Cast arg to bzero to avoid warning. Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * call.c (convert_harshness): Check for TREE_UNSIGNED differences ! after checking for integral conversions. Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl2.c: Declare flag_access_control. ! (struct lang_f_options): Add access-control. ! * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control ! for the call to expand_aggr_init to copy the object out of the ! pcc_struct_return slot. ! * search.c (compute_access): if (!flag_access_control) return ! access_public. Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl ! instead of abort, since the OSF/1 dynamic linker doesn't like to see ! relocation entries for abort. ! ! * tree.c (array_type_nelts_total): Use sizetype, not ! integer_type_node. ! (array_type_nelts_top): Ditto. Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (init_decl_processing): Make alloca a builtin. Mon Oct 17 15:56:11 1994 Mike Stump --- 1,2852 ---- + Fri Jun 16 15:07:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Make-lang.in (DEMANGLER_PROG): Add LIBS. + + Thu Jun 15 15:00:41 1995 Jason Merrill + + * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN. + + Wed Jun 7 20:00:31 1995 Mike Stump + + * *.[chy]: Change all callers of finish_decl to cp_finish_decl. + * decl.c (finish_decl): New routine to handle call backs from the + mid end (declare_hidden_char_array). + + Wed Jun 7 19:02:50 1995 Jason Merrill + + * decl.c (start_function): Handle setting C_C_D here. + (set_C_C_D): Removed. + (struct saved_scope): Remove class_decl. + (push_to_top_level): Don't save current_class_decl. + (pop_from_top_level): Don't restore current_class_decl or C_C_D. + (struct cp_function): Add C_C_D. + (push_cp_function_context): Save C_C_D. + (pop_cp_function_context): Restore C_C_D. + + Fri Jun 2 11:05:58 1995 Jason Merrill + + * decl.c (set_C_C_D): New function. + (pop_from_top_level, start_function, pop_cp_function_context): Call it. + + * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references + to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR. + + * decl.c (push_cp_function_context): Save current_class_decl. + (pop_cp_function_context): Restore current_class_decl and set C_C_D. + (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D. + (start_function): Ditto. + + * class.c (popclass): Don't mess with current_class_decl, + current_vtable_decl, or C_C_D. + + on May 29 12:45:10 1995 Paul Eggert + + * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG). + + Wed May 24 15:55:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * decl.c (duplicate_decls): Check simple_cst_equal result against 0. + * decl2.c (finish_anon_union): Likewise. + * method.c (largest_union_member): Likewise. + + Wed May 24 14:41:11 1995 H.J. Lu (hjl@nynexst.com) + + * Make-lang.in (cxxmain.o): Replace single quotes with backslashes. + + Mon May 22 17:38:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG): + Use $@ instead of output name so works even if have .exe. + (cxxmain.o): Use cp if ln -s fails. + (c++.install-man): Use $(exeext) in executable names. + (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names. + * Makefile.in (../cc1plus): Use $(exeext) in name of executable. + + Wed May 24 01:39:03 1995 Jason Merrill + + * call.c (build_method_call): parms can be null, duh. + + Tue May 23 01:32:09 1995 Jason Merrill + + * call.c (build_method_call): If convert_arguments failed, just bail. + + Fri May 19 10:31:11 1995 Jason Merrill + + * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert. + + * tree.c (copy_to_permanent): Oops. + + Fri May 19 10:01:07 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-tree.h (break_out_target_exprs): Add decl. + + Thu May 18 13:02:30 1995 Jason Merrill + + * decl.c (start_function): Move *all* interface handling stuff after + the pushdecl. + + * tree.c (mapcar): Renamed from make_deep_copy and generalized. + (perm_manip): Return t if permanent, otherwise 0. + (copy_to_permanent): Use them. + (bot_manip): Helper for break_out_target_exprs. + (break_out_target_exprs): New function. Uses mapcar. + + * typeck.c (convert_arguments): Use it. + + * method.c (hack_identifier): Use convert_from_reference to + dereference a reference. + + Wed May 17 17:54:54 1995 Mike Stump + + * call.c (convert_harshness): Move reference bashing before pointer + to member bashing. + + Wed May 17 16:57:53 1995 Mike Stump + + * cvt.c (convert_to_reference): Only complain, if complaints are + wanted. + typeck.c (build_function_call_real): Ditto. If LOOKUP_SPECULATIVELY + is set and something won't work, return NULL_TREE. + cvt.c (cp_convert): Ditto. Pass flags down to build_method_call. + (convert): Pass LOOKUP_NORMAL to cp_convert. + typeck.c (convert_for_assignment): Ditto. + (convert_force): Pass LOOKUP_COMPLAIN to cp_convert. + typeck.c (convert_arguments): Get out early if we get an + error_mark_node. + (convert_for_initialization): Use cp_convert instead of convert so + that we can pass flags down. + * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation. + + Wed May 17 01:43:58 1995 Jason Merrill + + * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the + decl type. + + * class.c (finish_struct): Don't complain about a class with no + user-defined constructors but with a member that has no default + constructor, as this is OK for aggregates. + + * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit + constructor call, mark slot addressable. + + Tue May 16 18:37:51 1995 Douglas Rupp (drupp@cs.washington.edu) + + * g++.c: Changed WINNT to _WIN32. + + Tue May 16 12:40:16 1995 Jason Merrill + + * lex.c (handle_sysv_pragma): Don't use token_buffer. + + Tue May 16 12:05:26 1995 Mike Stump + + * call.c (resolve_scope_to_name): Add initial semantic support for + namespaces. + * class.c (finish_struct): Ditto. + * cp-tree.h (NAMESPACE_LEVEL): Ditto. + * cvt.c (build_up_reference, convert_to_reference): Ditto. + * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto. + (resume_binding_level, toplevel_bindings_p): Ditto + (namespace_bindings_p, declare_namespace_level): Ditto. + (resume_level, push_namespace, pop_namespace): Ditto. + (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto. + (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto. + (start_decl, make_temporary_for_reference), Ditto. + (obscure_complex_init, finish_decl, expand_static_init): Ditto. + (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto. + (store_parm_decls, hack_incomplete_structures): Ditto. + * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto. + (push_namespace, pop_namespace, do_namespace_alias): Ditto. + (do_toplevel_using_decl, do_class_using_decl): Ditto. + * error.c (dump_decl): Ditto. + * init.c (build_member_call, build_offset_ref): Ditto. + * lex.c (identifier_type): Ditto. + * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto. + (nested_name_specifier_1): Ditto. + * spew.c (yylex): Ditto. + * tree.def (NAMESPACE_DECL): Ditto. + + Tue May 16 11:55:35 1995 Jason Merrill + + * decl.c (push_overloaded_decl): Return the new decl even if it + can't be pushed. + + Tue May 16 11:00:37 1995 Jason Merrill + + * typeck.c (decay_conversion): Split out from default_conversion. + (default_conversion): Call it. + (build_binary_op): Ditto. + (build_binary_op_nodefault): Use decay_conversion for truth ops. + + Mon May 15 12:47:56 1995 Jason Merrill + + * decl.c (warn_extern_redeclared_static): This is a pedwarn. + (duplicate_decls): Always use the old decl's linkage info. Don't + play with linkage of consts. + (pushdecl): Don't play with linkage of consts. + (redeclaration_error_message): Don't complain about an old public + decl and a new non-public decl here. + (grokvardecl): Handle linkage of consts here. + (grokdeclarator): An 'extern inline' is public. Pass constp to + grokvardecl. + (start_function): Wait until after the pushdecl to do some linkage + stuff. + + * decl2.c (import_export_vtable): Make duplicates weak rather than + static if supported. + (import_export_inline): Ditto. + * pt.c (do_pending_expansions): Ditto. + + * class.c (build_vbase_path): flag_assume_nonnull_objects only + affects reference conversion. + + * init.c (emit_base_init): Build up an RTL_EXPR and add it to + rtl_expr_chain. + * decl.c, decl2.c: s/base_init_insns/base_init_expr/. + + Tue May 16 07:06:28 1995 Paul Eggert + + * method.c (numeric_output_need_bar): Renamed from misspelling. + + * typeck.c (build_ptrmemfunc): Fix misspellings in messages. + + Sun May 14 10:26:22 1995 Richard Kenner + + * lang-options.h, lang-specs.h: New files. + + Thu May 11 00:31:48 1995 Jason Merrill + + * typeck.c (default_conversion): Don't check for BLKmode before + pulling out the decl_constant_value. + + * decl.c (start_function): Clear named_labels and shadowed_labels. + + * typeck.c (build_function_call_real): Also synthesize methods here. + + Wed May 10 00:55:59 1995 Jason Merrill + + * decl2.c (finish_file): Synthesize exported methods before the + reconsider loop. + + * parse.y: Move declaration of flag_new_for_scope to file scope. + + Tue May 9 19:10:33 1995 Mike Stump + + * decl2.c: Add flag_new_for_scope for new -ffor-scope flag. + * parse.y (FOR): Conditionalize the pushing and poping of scope for + the for-init-statement upon the new flag_new_for_scope. + * parse.y (try_block): Simplify and use compstmt. + + Mon May 8 12:41:52 1995 Jason Merrill + + * decl.c (define_function): Mark function decl artificial. + + Sun May 7 00:51:28 1995 Jason Merrill + + * parse.y (simple_stmt, FOR): Put back push/pop for condition scope. + + * decl2.c (grokclassfn): DECLs don't have cv-qualified types. + * tree.c (build_cplus_method_type): Ditto. + + * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1. + + * typeck.c (build_function_call_real): If convert_arguments failed, + just bail. + (convert_arguments): If one of the arguments is error_mark_node, + just bail. + + Sat May 6 02:39:41 1995 Jason Merrill + + * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for + decls that don't include it. + + Fri May 5 14:23:30 1995 Jason Merrill + + * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or + DECL_NOT_REALLY_EXTERN set aren't extern decls. + + * typeck.c (build_indirect_ref): Don't call default_conversion for a + parameter of reference_type. + * cvt.c (convert_from_reference): Just use build_indirect_ref. + + * pt.c (do_type_instantiation): Only instantiate member functions + that actually come from templates. + + Fri May 5 09:46:05 1995 Mike Stump + + * parse.y: Generalized cleanup of poplevels, and compound statements + and compound statements in try blocks. Rewritten `for' rule so that + the scope of variables declared in the for clause is shortened to + span just to the end of the statement, instead of the whole + containing block. + + Fri May 5 00:37:14 1995 Jason Merrill + + * call.c (convert_harshness): Handle pointers to members better. + + Thu May 4 16:00:26 1995 Jason Merrill + + * decl2.c (delete_sanity): Do access control here. + * init.c (build_delete): Instead of here. + + * Make-lang.in: Build c++filt. + + Wed May 3 02:59:53 1995 Jason Merrill + + * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL, + update our IDENTIFIER_TYPE_VALUE. + + Fri Apr 28 07:58:41 1995 Jason Merrill + + * lex.c (cons_up_default_function): Fix linkage of #pragma + implemented functions. + + Thu Apr 27 16:56:24 1995 Jason Merrill + + * method.c (build_overload_name): Simplify and fix repeated type + folding. + + * decl.c (grokdeclarator): Prohibit pointers to void or reference + members. + + Thu Apr 27 09:49:07 1995 Mike Stump + + * typeck2.c (process_init_constructor): Make sure initializers are + fully digested. + + Thu Apr 27 01:11:55 1995 Jason Merrill + + * lex.c (cons_up_default_function): Always defer synthesis. + + Thu Apr 27 00:20:37 1995 Jason Merrill + + * decl2.c (mark_inline_for_output): Don't play with pending_inline + stuff. + + Wed Apr 26 17:48:24 1995 Jason Merrill + + * call.c (user_harshness): New function; like build_type_conversion, + but doesn't actually build anything. + (compute_conversion_costs): Use it instead of build_type_conversion. + + Wed Apr 26 17:11:25 1995 Jason Merrill + + * typeck.c (build_function_call_real): Improve error message for + calling a non-function. + + * method.c (hack_identifier): Lose check for calling a data member. + + Wed Apr 26 16:59:13 1995 Mike Stump + + * typeck2.c (build_functional_cast): Remove very old cruft. + Seems like good code is generated without it. + + Wed Apr 26 00:47:16 1995 Jason Merrill + + * method.c (do_build_assign_ref): Fix handling of anonymous unions. + (do_build_copy_constructor): Ditto. + + * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch. + + * decl.c (push_switch): New function. + (pop_switch): Ditto. + (define_case_label): Check for jumping over initialization. + + * call.c (build_method_call): Check for an inline function being + called before its definition has been seen. + * typeck.c (build_function_call_real): Ditto. + + * decl.c (duplicate_decls): Check for a function being redeclared + inline after its address has been taken. + + * typeck.c (build_conditional_expr): Handle related class lvalues. + + Tue Apr 25 13:20:45 1995 Jason Merrill + + * pt.c (do_pending_expansions): Don't expand unused templates. + + * parse.y (component_decl): Accept a lone semicolon. + + Tue Apr 25 00:25:56 1995 Jason Merrill + + * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the + object parameter anymore. + + * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns. + + Mon Apr 24 12:35:48 1995 Jason Merrill + + * parse.y (simple_stmt, decl case): Clear prefix_attributes. + (lang_extdef): Ditto. + + * parse.y (maybe_parmlist): New rule for use in declarators where + this could either be a list of expressions or parameters. Calls + suspend_momentary before deciding which. + (direct_after_type_declarator): Use it. + (complex_direct_notype_declarator): Use it. + + * pt.c (tsubst): Propagate attributes const and noreturn. + + * typeck.c (build_modify_expr): If warn_synth, call build_opfncall + before doing the default thing. + + Thu Apr 27 21:49:36 1995 Doug Evans + + * typeck.c (common_type): Call lookup_attribute instead of + value_member. + + Tue Apr 25 18:07:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Make-lang.in: Change "realclean" to "maintainer-clean". + + Sun Apr 23 12:32:38 1995 Mike Stump + + * decl2.c (finish_file): Fix broken linked list handling. + + Fri Apr 21 18:08:43 1995 Jason Merrill + + * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF + as often. + (finish_struct): Ditto. + + * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*. + + * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro. + (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro. + + Fri Apr 21 15:52:22 1995 Jason Merrill + + * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if + it is of the same type as the return value. + + Fri Apr 21 03:01:46 1995 Jason Merrill + + * decl2.c (finish_file): Reconsider if synthesizing a method wrote + out its assembly. + + * typeck.c (convert_for_initialization): Don't call a trivial copy + constructor. + + * typeck2.c (store_init_value): Only abort if the type has a + non-trivial copy constructor. + + * typeck.c (c_expand_return): If we're returning in a register and + the return value is a TARGET_EXPR, expand it. Only do + expand_aggr_init if we're returning in memory. + (expand_target_expr): Function to expand a TARGET_EXPR. + (build_modify_expr): Use it. + + * tree.c (build_cplus_new): Layout the slot. + + * expr.c (cplus_expand_expr): Use expand_call to expand the call + under a NEW_EXPR, so the target is not discarded. + + Thu Apr 20 14:59:31 1995 Mike Stump + + * gc.c (build_dynamic_cast): Tighten error checking. + + Thu Apr 20 11:23:54 1995 Jason Merrill + + * expr.c (cplus_expand_expr): Only abort if the returned target is + different from what we expected if the type has a non-trivial copy + constructor. + + * decl2.c (cplus_decl_attributes): Attributes applied to a template + really apply to the template's result. + + * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE + to decide whether to consider a CALL_EXPR an lvalue. + + * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the + type has a non-trivial copy constructor. + + * decl.c (start_function): If interface_known, unset + DECL_NOT_REALLY_EXTERN on the function. + + Wed Apr 19 16:53:13 1995 Jason Merrill + + * pt.c (do_function_instantiation): Handle explicit instantiation of + member functions. + (do_type_instantiation): Handle 'inline template class foo', + meaning just spit out the vtable. + + * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on + the consed functions. + + * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN. + + Wed Apr 19 16:28:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c, + typeck.c: Include output.h. + + Wed Apr 19 14:57:21 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu) + + * call.c (build_method_call): Allow a signature member functions to + be called from a default implementation. + + Wed Apr 19 10:21:17 1995 Jason Merrill + + * repo.c (finish_repo): Remember what directory we are in. + + * search.c (expand_upcast_fixups): Don't mess with abort_fndecl. + + * repo.c: Use obstacks instead of fixed-size buffers. Don't spit + out the second copy of the symbol name. Don't remember COLLECT_GCC. + + Wed Apr 19 02:32:40 1995 Mike Stump + + * search.c (virtual_context): New function to get the virtual + context of a function. + (expand_upcast_fixups): New function to generate runtime vtables. + (fixup_virtual_upcast_offsets): Ditto. + (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to + ensure that the this offsets for upcasts from virtual bases into + other virtual bases or non-virtual bases are correct at construction + time and destruction time. + * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all + vtables in all virtual bases, instead of just one vtable in each + virtual base. + (fixup_vtable_deltas1): Ditto. + + Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com) + + * Makefile.in (lex.o): Add dependency on c-pragma.h. + + * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as + appropriate, instead of 0. + + Mon Apr 17 12:28:42 1995 Jason Merrill + + * decl.c (pushdecl): Use decls_match, not duplicate_decls, for + comparing local and global decls. + + Fri Apr 14 01:46:52 1995 Jason Merrill + + * typeck.c (convert_arguments): Only prohibit passing to ... of + types with non-trivial copy constructors. + + * repo.c (repo_template_used): Don't try to mess with no id. + + Fri Apr 14 23:32:50 1995 Per Bothner + + * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls. + + Thu Apr 13 15:37:42 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-tree.h (current_tinst_level): Delete declaration, since it's + static inside pt.c. + + * typeck.c (build_modify_expr): Catch incompatible array assignment. + + * parse.y (attribute_list, attrib): Rewrite actions to feed the + right stuff to decl_attributes. + + Thu Apr 13 11:24:10 1995 Jason Merrill + + * search.c (dfs_debug_mark): Check for magic virtual like + import_export_vtable. + + * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with + four args. + + Wed Apr 12 12:02:57 1995 Jason Merrill + + * decl2.c (finish_file): Move prevtable pass before needs_messing_up + decision. + + Tue Apr 11 11:20:27 1995 Jason Merrill + + * decl.c (finish_decl): If we're writing out a static data member of + a class, we want the debug info for that class. + + * gc.c (build_t_desc): Check linkage of a class properly. + + * class.c (finish_struct): Set the 'headof' offset for the main + vtable properly. + (prepare_fresh_vtable): Fix typeinfo pointer here. + (modify_one_vtable): Instead of here. + + Mon Apr 10 12:15:59 1995 Jason Merrill + + * repo.c (repo_get_id): New function to return the interesting + identifier for a repo entity. + (repo_template_used): Use it. + (repo_template_instantiated): Mark the id as chosen. + (init_repo): Record whether or not the id was chosen. + (finish_repo): Note if an id was newly chosen. + + * pt.c (do_function_instantiation): Call repo_template_instantiated. + (do_type_instantiation): Ditto. Don't diagnose multiple + instantiation. + + * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding + whether or not to synthesize a method. + + Undo these changes: + * class.c (finish_vtbls): build more vtables if flag_rtti is on. + * class.c (modify_all_direct_vtables): ditto. + * init.c (expand_direct_vtbls_init): expand more vtables if + flag_rtti is on. + + Sat Apr 8 17:45:41 1995 Mike Stump + + * gc.c (build_headof): Use ptrdiff_type_node instead of + integer_type_node on pointer arithmetic. + + Sat Apr 8 11:57:04 1995 Jason Merrill + + * typeck.c (build_modify_expr): Undo previous change. + + Thu Apr 6 01:23:50 1995 Jason Merrill + + * Makefile.in (compiler): Remove ../cc1plus before rebuilding it. + + * repo.c (get_base_filename): Put the .rpo file in the directory + with the object file, not the source. + + * typeck.c (build_conditional_expr): Handle pmf's better. + + * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out + the name of the symbol. + + Wed Apr 5 15:24:12 1995 Jason Merrill + + * repo.c (open_repo_file): Make repo filename DOS-compliant. + (*): Also write a new repo file if some previously-used + templates are no longer used. Only remember the identifier. + + * lex.c (cons_up_default_function): If this function belongs to a + template class, call repo_template_used for it. + + * repo.c (repo_template_used): Using a class means using its vtable, + if any. + (finish_repo): Ditto. + + * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs + if the type has a complex copy constructor. + + * decl2.c (lang_decode_option): -frepo implies + -fno-implicit-templates. + + * decl.c (start_function): Clear current_{base,member}_init_list. + + * lex.c (init_lex): Also unset *_eq if ! flag_operator_names. + + Tue Apr 4 16:11:08 1995 Jason Merrill + + * decl.c (struct cp_function): Add {base,member}_init_list. + (push_cp_function_context): Save current_{base,member}_init_list. + (pop_cp_function_context): Restore them. + + Mon Apr 3 16:55:08 1995 Jason Merrill + + * repo.c (get_base_filename): Take filename parm, fix logic bug. + + * typeck.c (build_compound_expr): Do not warn about a compound expr + in which the first expression has no side effects. + (build_x_compound_expr): Warn here instead. + (build_conditional_expr): Don't warn about a conditional expression + between an enum and the type it promotes to. + + * init.c (build_new): Handle initialization of arrays of builtins + properly. + + Mon Apr 3 15:08:04 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * repo.c: Include config.h to get definitions of bcopy and rindex + on systems that don't have them (e.g., SVR4). + + Mon Apr 3 14:41:55 1995 Mike Stump + + * decl2.c (finish_table): Pass NULL_TREE instead of init to + finish_decl so that it won't try and do error checking on the + initializer. + + Mon Apr 3 10:45:50 1995 Jason Merrill + + * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to + determine whether this compile used -c -o. + (open_repo_file): Use get_base_filename. Remove the extension. + (finish_repo): Spit out the values of main_input_filename, + COLLECT_GCC and COLLECT_GCC_OPTIONS. + + * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name. + + Sun Apr 2 23:43:51 1995 Jason Merrill + + * search.c (compute_access): Don't try to do access control on + nested types. + + Fri Mar 31 10:14:23 1995 Jason Merrill + + * repo.c: New file to handle things repo. + + * pt.c (instantiate_template): Call repo_template_used if the + definition is accessible. + (mark_function_instantiated): Split out from + do_function_instantiation. + (mark_class_instantiated): Split out from do_type_instantiation. + + * parse.y (template_instantiate_once): Call repo_template_used. + + * lex.c (lang_init): Call init_repo. + + * decl2.c: Handle flag_use_repository. + (finish_file): Call finish_repo. + + * decl.c (start_method): Call repo_template_used if this is a + template method. + + * Makefile.in (CXX_OBJS): Add repo.o. + (repo.o): Add dependencies. + + * Make-lang.in (CXX_SRCS): Add repo.c. + + * decl.c (start_function): If DECL_INTERFACE_KNOWN and + DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL. + + * typeck.c (build_binary_op_nodefault): Identify the invalid operand + types used. + + * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN. + + Thu Mar 30 17:54:42 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Tidy up use of build_type + and result_type. When checking for comparison between signed + and unsigned, use result_type rather than the (possibly shortened) + type of op0. Also, don't warn about equality comparison of a + signed operand to an unsigned constant that fits in the signed + type. + + * method.c (do_build_copy_constructor): Reverse + current_base_init_list after we've built it up. + + Thu Mar 30 14:35:18 1995 Mike Stump + + * except.c (build_throw): Never warn about the value of throw not + being used. + + Thu Mar 30 13:16:54 1995 Mike Stump + + * except.c (expand_start_catch_block): Check for bad catch parameter + declarations. + + Thu Mar 30 13:06:11 1995 Jason Merrill + + * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if + DECL_EXTERNAL is not already set. + + Thu Mar 30 11:26:24 1995 Mike Stump + + * method.c (emit_thunk): Let poplevel know that the last level is + for a function so it can create a BLOCK_NODE and set DECL_INITIAL. + + Thu Mar 30 11:15:06 1995 Jason Merrill + + * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN + here. + + * decl.c (grokdeclarator): OK, don't abort if we see a decl with + METHOD_TYPE. + (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on + all deferred inlines. + + Wed Mar 29 19:35:02 1995 Jason Merrill + + * cp-tree.h (DECL_THIS_INLINE): New macro. + (DECL_NOT_REALLY_EXTERN): New macro. + (DECL_THIS_STATIC): New macro. + + * decl.c: Lose all references to current_extern_inline. Break + inline semantics into DECL_INLINE for actual inlining and + DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC. + * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to + emit an inline here. Associated changes. + * lex.c: Ditto. + * pt.c: Ditto. + * typeck.c: Ditto. + + * call.c (build_method_call): Don't bother trying to handle inlines + specially. + * cvt.c (convert_to_aggr): Ditto. + + * pt.c (do_function_instantiation): Handle instantiation of + public inlines, too. + + Wed Mar 29 16:04:25 1995 Mike Stump + + * except.c (init_exception_processing): Change the interface for + __throw_type_match and add decl for new rtti matching routine + __throw_type_match_rtti. + (build_eh_type): New routine to build a run time descriptor for the + expression given. + (expand_start_catch_block): Update to use new calling convention for + the matcher. + (expand_throw): Update to use build_eh_type. + + Mon Mar 27 07:14:33 1995 Warner Losh + + * g++.c: Removed __NetBSD__ from conditional. + Declare strerror if HAVE_STRERROR is defined; otherwise + declare sys_errlist and sys_nerr. + (my_strerror): New function. + + Tue Mar 28 14:16:35 1995 Jason Merrill + + * search.c (get_binfo): Don't try to be so clever. + + * tree.c (copy_to_permanent): Also suspend_momentary(). + + * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even + if the types are the same. + + * decl.c (start_function): Handle extern inlines more like C++ says + we should. + + * init.c (build_member_call): Hand constructor calls off to + build_functional_cast. + + * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get + the name of the type. + + Tue Mar 28 13:13:56 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): Check for the decl returned by + grokfndecl to be null before using build_decl_attribute_variant. + + Mon Mar 27 18:04:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * init.c (build_new): Use build_pointer_type instead of + TYPE_POINTER_TO. + + Fri Mar 24 12:11:24 1995 Jason Merrill + + * typeck.c (build_conditional_expr): Handle pmfs. + (convert_for_assignment): Fix pmf support. + + * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks. + (cp_convert_to_pointer): Handle pmfs. + (cp_convert): Pass pmfs to cp_convert_to_pointer. + + * typeck.c (common_type): Handle inheritance for pmfs. + + * typeck2.c (build_m_component_ref): Do access control. + + * typeck.c (comp_target_types): Check for conversion to void * + before checking trickier conversions. + + * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P. + + * pt.c (push_tinst_level): Complain if template instantiation depth + is greater than max_tinst_depth. + + * typeck.c (common_type): Assume that we can call common_type to + unify the target type of a pointer. + + Thu Mar 23 00:48:44 1995 Jason Merrill + + * decl2.c (finish_file): Don't synthesize methods at + finish_vtable_prevardecl time. Do synthesize methods that are not + used, but are public and not external. + + * cvt.c (build_type_conversion): Only give an error if for_sure. + + * typeck.c (comp_target_types): Only support pointer conversions if + nptrs > 0. + + Wed Mar 22 19:30:15 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * init.c (build_new): Catch use of an initializer list where it + shouldn't be. + + Wed Mar 22 16:21:07 1995 Jason Merrill + + * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is + non-constant. + + * decl2.c: temp_name_counter is now public. + + * decl.c (struct cp_function): Add temp_name_counter field. + (push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + + * typeck.c (common_type): Handle unifying function types, and unify + unmatched things to void* with a compiler_error, rather than + silently like before. + + Wed Mar 22 15:10:34 1995 Mike Stump + + * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert + Brendan's last change and fix latent problem that causes TD entries + to not come out when the things that need them has yet to be + expanded. + + Wed Mar 22 15:12:00 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault, comparison ops): Update type0 + and type1, since we might have changed op0 or op1. + + Wed Mar 22 13:33:45 1995 Jason Merrill + + * typeck.c (common_type): Don't mess up templates. + + Wed Mar 22 04:56:00 1995 Jason Merrill + + * typeck.c (common_type): Handle ptms properly. Also handle + T* -> void*. + (build_binary_op_nodefault): New variable build_type controls what + type is given to the expression when it is created. Set this to + boolean_type_node for comparison ops instead of using result_type. + (comp_target_types): Allow T * -> void *. + + * cvt.c (cp_convert_to_pointer): Do access control when converting + ptms, too. + + Tue Mar 21 17:25:06 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * parse.y (extern_lang_string): Catch use of linkage specs that + aren't all naming the same language. + + * class.c (finish_struct): Delete accidental duplicate code. + + Tue Mar 21 14:00:57 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Disable pedwarns about + comparing functions and incomplete types. + + * decl.c (finish_function): Only unset current_function_decl if + !nested. + (duplicate_decls): Last change went too far; we only want to stop + checking for value/reference ambiguity. + + Tue Mar 21 01:26:39 1995 Mike Stump + + * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it + out fresh, as the new type may be larger. + + Mon Mar 20 19:01:10 1995 Jason Merrill + + * expr.c (extract_init): Try to expand the RTL for the + initialization and figure out what it will look like so we can avoid + run-time initialization. Disabled for now. + (extract_scalar_init): Helper for scalar initialization. + (extract_aggr_init): Helper for aggregate initialization. + + * decl.c (duplicate_decls): Don't complain about ambiguous + declarations. + (obscure_complex_init): Now returns a tree. Call extract_init if + we're optimizing and this is a toplevel decl. + (finish_decl): Update accordingly. + + * lex.c (check_newline): If we're just changing files (not pushing + or popping), update input_file_stack->name. + + Mon Mar 20 17:55:04 1995 Mike Stump + + * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now + in the transitive unification code. + + Mon Mar 20 16:07:50 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on + non-functions. + (grokdeclarator): Don't allow friends to be defined in local classes. + + Sat Mar 18 04:03:33 1995 Jason Merrill + + * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC + rather than DECL_SAVED_INSNS to decide whether or not this method + was declared inline. + + * method.c (synthesize_method): Turn off DECL_INLINE if + function_cannot_inline_p thinks we're too large. + + * typeck.c (build_indirect_ref): Use build_expr_type_conversion. + + Fri Mar 17 17:47:36 1995 Jason Merrill + + * class.c (instantiate_type): Handle pmfs. + + * typeck.c (convert_for_assignment): Check types when assigning one + pmf to another. + + * decl.c (define_label): Fix logic for printing out the name of the + label in an error message. + + * error.c (dump_expr): Support ARRAY_REF. + + Fri Mar 17 17:43:02 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl2.c (finish_vtable_vardecl): Call build_t_desc here. + (finish_prevtable_vardecl): Instead of here. + + Fri Mar 17 14:40:45 1995 Jason Merrill + + * decl.c (expand_static_init): Also use expand_aggr_init if the + initializer is a TREE_LIST. + (grokdeclarator): Only pedwarn about extra qualification if -pedantic. + + * pt.c (unify): Fix unification of return type. + + * expr.c (fixup_result_decl): Use store_expr, rather than + emit_move_insn, to move the return value into the place where + callers will expect it. + + Thu Mar 16 22:05:25 1995 Jason Merrill + + * init.c (build_offset_ref): Call assmble_external on functions. + * typeck.c (build_component_ref): Ditto. + + Thu Mar 16 20:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (struct saved_scope): Add members base_init_list and + member_init_list. + (push_to_top_level): Save current_base_init_list and + current_member_init_list to them. + (pop_from_top_level): Put it back. + + Thu Mar 16 19:21:14 1995 Jason Merrill + + * pt.c (instantiate_template): Call assemble_external. + + Thu Mar 16 18:07:54 1995 Brendan Kehoe (brendan@phydeaux.cygnus.com) + + * class.c: Include rtl.h, to get NULL_RTX. + (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems + on hosts with different sizes for each part of the union. + * tree.c: Also include rtl.h. + (layout_basetypes): Same change for DECL_SAVED_INSNS. + + Thu Mar 16 13:57:36 1995 Jason Merrill + + * pt.c (unify): Fix array domain unification for 64-bit targets. + + * decl2.c (finish_file): Push bizarre type decl before walking the + vtables the first time. + (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed + with TREE_CHAIN (prev). + + * init.c (emit_base_init): Use convert_pointer_to_real instead of + convert_pointer_to when converting to a direct base. + + Wed Mar 15 20:26:29 1995 Mike Stump + + * pt.c (type_unification): Handle transitive unification better. + + Wed Mar 15 13:56:16 1995 Jason Merrill + + * decl2.c (walk_vtables): Always set prev to vars. + (mark_vtable_entries): Call assemble_external on the vtable entries. + + * class.c (finish_struct): Set the vtable's size to NULL_TREE before + calling layout_decl, so that it gets updated properly. + + Finally re-enable dynamic synthesis. This time it works. + * method.c (synthesize_method): Pass decl_function_context (fndecl) + to {push,pop}_cp_function_context. + * decl.c (push_cp_function_context): Now takes a tree argument. + (pop_cp_function_context): Ditto. + * call.c (build_method_call): Enable synthesis. + * lex.c (cons_up_default_function): Ditto. + + Tue Mar 14 19:14:19 1995 Doug Evans + + * parse.y (setattrs): Chain onto prefix_attributes rather than + setting it. + + Wed Mar 15 13:00:00 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (pushdecl): Check if the type of the VAR_DECL is an + error_mark_node before trying to read TYPE_LANG_SPECIFIC. + + Mon Mar 13 21:00:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold, + and convert the size and integer_one_node to the index type. + + Mon Mar 13 08:01:02 1995 Jason Merrill + + * typeck.c (get_member_function_from_ptrfunc): Save the instance + argument, and tack it onto the front of the COND_EXPR to make the + semantics come out right. Grab the instance argument from + '*instance_ptrptr', rather than having it passed in separately. + + * various: Change various consed-up comparison operations to have + boolean type. Remove the instance argument in calls to + get_member_function_from_ptrfunc. + + * error.c (dump_expr): Dump true and false as "true" and "false". + + * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the + global init function. + + * decl.c (finish_function): Only set DECL_EXTERNAL here if the + inline function is public. + + Sat Mar 11 00:58:03 1995 Jason Merrill + + * init.c (is_friend): Be more careful about checking + DECL_CLASS_CONTEXT on non-member functions. + + * decl2.c (finish_vtable_vardecl): Don't bother calling + assemble_external here. + (prune_vtable_vardecl): New function that just splices out the + vtable decl from the top-level decls. + (import_export_inline): Unset DECL_EXTERNAL at first. + (finish_file): Don't bother calling assemble_external here. Do + splice out all of the vtables. + + Fri Mar 10 14:42:29 1995 Jason Merrill + + * decl.c (finish_function): If we're not emitting the function yet, + call assemble_external for it. + + * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries + here. + (finish_vtable_vardecl): Don't do the linkage deduction thing here. + Also don't splice out the current vtable if it is unused. + (finish_file): Move the second walk_vtables and the synthesis check + inside the 'reconsider' loop. Move thunk emission after the + 'reconsider' loop. + + Thu Mar 9 16:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it + was passing bogus values for readonly and volatile from the original + template decl, not the resultant type of the tsubst call. + + * class.c (duplicate_tag_error): Use cp_error_at to point out the + previous definition of the tag. + + Thu Mar 9 10:46:17 1995 Jason Merrill + + * decl.c (start_function): Clear base_init_insns and protect_list. + (struct cp_function): Add base_init_insns field. + (push_cp_function_context): Also save base_init_insns. + (pop_cp_function_context): Also restore base_init_insns. + + Wed Mar 8 13:31:44 1995 Jason Merrill + + * init.c (member_init_ok_or_else): Check for initializing a static + member here. + (emit_base_init): Instead of here. + + Tue Mar 7 16:03:26 1995 Jason Merrill + + * call.c (build_method_call): Disable synthesis as needed. + * lex.c (cons_up_default_function): Ditto. + + Tue Mar 7 10:14:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * parse.y: New rules to allow attributes in a prefix position. + (prefix_attributes): New variable. Pass it into cplus_decl_attributes. + (setattr): New rule. + (reserved_declspecs, declmods): Catch attributes here. + * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument. + * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to + descendent typedef. + (grokdeclarator): Added code to support machine attributes. + * Makefile.in (stamp-parse): Expect 5 shift/reduce failures. + + Mon Mar 6 15:07:02 1995 Jason Merrill + + * call.c (build_method_call): Don't synthesize methods outside of a + function. + + Make base initialization more re-entrant so that synthesis on the + fly will work (and, eventually, template instantation on the fly). + * init.c (sort_member_init): Don't bother with members that can't be + initialized. Reorganize a bit. Don't initialize base members here. + (sort_base_init): New function, like sort_member_init, but for base + classes. Steals some code from emit_base_init. + (emit_base_init): Simplify. Call sort_{member,base}_init before + doing any initialization, so we don't have to save + current_{member,base}_init_list in push_cp_function_context. + (expand_aggr_vbase_init_1): Adjust for sort_base_init. + (expand_aggr_vbase_init): Simplify. + * decl.c (struct cp_function): Add protect_list field. + (push_cp_function_context): Also save protect_list. + (pop_cp_function_context): Also restore protect_list. + * call.c (build_method_call): Enable synthesis at point of call. + * lex.c (cons_up_default_function): Ditto. + + * parse.y: Turn -ansi checks back into -pedantic checks. + + * init.c (build_new): Fix -fcheck-new for array new. + + Sat Mar 4 15:55:42 1995 Fergus Henderson + + * typeck.c (build_compound_expr): warn if left-hand operand of + comma expression has no side-effects. + + Fri Mar 3 15:16:45 1995 Jason Merrill + + * parse.y (primary): Change 'object qualified_id *' rules to 'object + overqualified_id *'. + + Fri Mar 3 12:48:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * parse.y (unary_expr): Catch doing sizeof an overloaded function. + Make the error look the same as the one we issue in c_sizeof. + + * typeck.c (build_binary_op_nodefault): Give an error for trying + to compare a pointer-to-member to `void *'. + + Fri Mar 3 11:28:50 1995 Jason Merrill + + * typeck.c (build_unary_op): Handle bool increment with smoke and + mirrors here, rather than in expand_increment where it belongs, + because Kenner doesn't agree with me. + + Fri Mar 3 00:08:10 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokparms): Catch a PARM_DECL being used for a default + argument as well. + + Thu Mar 2 20:05:54 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * init.c (build_new): Don't allow new on a function type. + + * parse.y (primary): Avoid a crash when seeing if the arg is of + the same type as that given for the typespec in an explicit dtor call. + + Thu Mar 2 00:49:38 1995 Jason Merrill + + * decl.c (finish_function): Change test for calling + mark_inline_for_output. + + Wed Mar 1 11:23:46 1995 Jason Merrill + + * typeck.c (build_modify_expr): Complain if + build_default_binary_type_conversion fails. + + * init.c (expand_default_init): Handle arguments of unknown type + properly. + + * cvt.c (build_expr_type_conversion): Only complain about ambiguity + if 'complain'. + * various: Pass 'complain'. + + * typeck.c (comptypes): Be more picky about comparing UPTs. + + Wed Mar 1 11:03:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): If declarator is null, say that the + type used has an incomplete type. + + Wed Mar 1 10:06:20 1995 Jason Merrill + + * pt.c (instantiate_template): Copy the template arguments to the + permanent_obstack. Also use simple_cst_equal to compare them when + looking for a previous instantiation. + + * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming + they are array domain types). + + Tue Feb 28 23:24:55 1995 Jason Merrill + + * cp-tree.h: Define WANT_* constants for passing to + build_expr_type_conversion. + * cvt.c (build_expr_type_conversion): New function to build + conversion to one of a group of suitable types. + (build_default_binary_type_conversion): Use it. + * decl2.c (grok_array_decl): Ditto. + * typeck.c (build_unary_op): Ditto. + (build_array_ref): Tidy up a bit. + (build_binary_op): Ditto. + + Tue Feb 28 19:57:31 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): Don't allow decl of an argument as `void'. + + Tue Feb 28 17:23:36 1995 Jason Merrill + + * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals + reserved_declspecs' rule. + + * parse.y (expr_or_declarator): Remove notype_qualified_id rule. + (direct_notype_declarator): Ditto. + (complex_direct_notype_declarator): Add notype_qualified_id rule. + + * lex.c (real_yylex): Handle :> digraph properly. + + Tue Feb 28 12:26:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): Check if it's a friend, not if it's + non-virtual, that's being initialized. Move the check up to + before FRIENDP would get cleared. Catch an unnamed var/field + being declared void. Say just `field' instead of `structure field' + in the error message. Only go for the operator name if DECLARATOR + is non-null. + + Tue Feb 28 00:08:01 1995 Jason Merrill + + * decl.c (start_function): Complain about abstract return type. + (grokdeclarator): Complain about declaring constructors and + destructors to be const or volatile. Complain about declaring + destructors to be static. + + * pt.c (uses_template_parms): Handle pmfs. + + * decl.c (grokdeclarator): Don't call variable_size for array bounds + that only depend on template constant parameters. + + Mon Feb 27 15:38:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * error.c (dump_decl): Only look to see if it's a vtable if we + actually have a name to check out. + + Mon Feb 27 13:37:53 1995 Jason Merrill + + * cvt.c (convert_to_aggr): Lose misleading shortcut. + + Sun Feb 26 17:27:32 1995 Doug Evans + + * decl.c (set_nested_typename): Always set DECL_IGNORED_P, + not just for dwarf. + + Sun Feb 26 00:10:18 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): Don't allow a static member to be + declared `register'. + + * init.c (make_friend_class): Move up to a pedwarn for the warning + about a class declaring friends with itself. + + * decl.c (grokdeclarator): You can't do `volatile friend class foo' + or `inline friend class foo'. Only try to make a friend out of + TYPE if we didn't already reset it to integer_type_node. + + Sat Feb 25 22:32:03 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): Don't allow initialization of a + non-virtual function. + + * decl.c (start_function): Do a pedwarn if we're changing `main' + to have an int return type. + + Sat Feb 25 00:02:05 1995 Jason Merrill + + * typeck.c (build_modify_expr): Handle simple assignment from + TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew. + + Fri Feb 24 18:27:14 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * decl.c (grokdeclarator): Also don't allow virtual outside of a + class decl for a scope method definition performed at global binding. + + * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF + of a bitfield. + + * decl.c (grokdeclarator): Don't allow a const to be declared mutable. + + * typeck.c (build_binary_op): Return an error_mark_node if either + one of the args turned into an error_mark_node when we tried to + use default_conversion. + + * typeck.c (build_unary_op): Forbid using postfix -- on a bool. + + * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be + used on `__wchar_t'. + + Fri Feb 24 13:59:53 1995 Mike Stump + + * except.c (end_protect_partials): Do it the right way. + + Wed Feb 22 15:42:56 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Upgrade warning about + comparing distinct pointer types to pedwarn. + + * typeck2.c (digest_init): Cope with extra braces. + + * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead + of INT_CST_LT (..., interger_zero_node). + + Wed Feb 22 14:45:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy + function for systems that don't have EH. + + Tue Feb 21 19:18:31 1995 Jason Merrill + + * call.c (can_convert_arg): Like can_convert, but takes an arg as + well. + + * pt.c (type_unification): Allow implicit conversions for parameters + that do not depend on template parameters. + + Tue Feb 21 18:43:48 1995 Douglas Rupp (drupp@cs.washington.edu) + + * Make-lang.in, config-lang.in: ($exeext): New macro. + * Make-lang.in: Try a "cp" if "ln" fails. + * cp-tree.h (decl_attributes): Added argument. + * decl2.c (cplus_decl_attribute): Add arg to decl_attributes. + * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT. + Modified spawnvp to have to correct number of arguments for OS/2, NT. + + Tue Feb 21 18:36:55 1995 Mike Stump + + * decl.c (finish_function): Add calls to end_protect_partials to end + the exception region that protects constructors so that partially + constructed objects can be partially destructed when the constructor + throws an exception. + * init.c (perform_member_init, sort_member_init, emit_base_init): + Added support for partially constructed objects. + * init.c (build_partial_cleanup_for): New routine to do partial + cleanups of a base class. + * decl2.c (finish_file): Move the emitting of the exception table + down, after we emit all code that might have exception regions in + them. + * except.c (end_protect_partials, might_have_exceptions_p): New + routines. + (emit_exception_table): Always output table if called. + * cp-tree.h (protect_list, end_protect_partials, + might_have_exceptions_p, emit_exception_table): Added. + + Tue Feb 21 16:05:59 1995 Brendan Kehoe (brendan@lisa.cygnus.com) + + * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused + address of a local variable. + * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we + were given a non-null PTR_TO_INSTPTR. + + Tue Feb 21 01:53:18 1995 Jason Merrill + + * decl.c (duplicate_decls): Always lay out the merged decl. + + * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates. + (finish_prevtable_vardecl): Ditto. + + * method.c (synthesize_method): Set interface_{unknown,only} + according to the settings for our class, not the file where it comes + from. + + Sat Feb 18 12:26:48 1995 Mike Stump + + * except.c: Handle systems that define __i386__ but not __i386. + + Fri Feb 17 15:31:31 1995 Jason Merrill + + * decl2.c (reparse_decl_as_expr): Support being called without a + type argument. + + * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r + conflicts. Sigh. + + Fri Feb 17 12:02:06 1995 Mike Stump + + * parse.y (template_def, fndef, fn.def1, return_init, condition, + initdcl0, initdcl, notype_initdcl0, nomods_initdcl0, + component_decl_1, after_type_component_declarator0, + notype_component_declarator0, after_type_component_declarator, + notype_component_declarator, after_type_component_declarator, + full_parm, maybe_raises, exception_specification_opt): Fix up, + include exception_specification_opt maybeasm maybe_attribute and + maybe_init if missing. Rename maybe_raises to + exception_specification_opt to match draft wording. Use maybe_init + to simplify rules. + + Fri Feb 17 01:54:46 1995 Jason Merrill + + * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs + built for news of scalar types. + + Thu Feb 16 17:48:28 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Update code for warning + about signed/unsigned comparisons from C frontend. Realize that the + code in the C frontend is, if anything, even more bogus. Fix it. + (build_binary_op): Undo default_conversion if it wasn't useful. + + * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for + PRE*CREMENT_EXPR. + + * decl2.c (import_export_vtable): Don't try the vtable hack + if the class doesn't have any real non-inline virtual functions. + (finish_vtable_vardecl): Don't bother trying to find a non-inline + virtual function in a non-polymorphic class. + (finish_prevtable_vardecl): Ditto. + + * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN. + + * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5. + + * init.c (expand_virtual_init): Always call assemble_external. + + * class.c (build_vfn_ref): Always call assemble_external. + (build_vtable): Always call import_export_vtable. + (prepare_fresh_vtable): Ditto. + (add_virtual_function): Don't bother setting TREE_ADDRESSABLE. + + Thu Feb 16 03:28:49 1995 Jason Merrill + + * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine + whether an enumerated type fits in a bitfield. + + Wed Feb 15 15:38:12 1995 Jason Merrill + + * class.c (grow_method): Update method_vec after growing the class + obstack. + + Wed Feb 15 13:42:59 1995 Mike Stump + + * parse.y (handler_seq): Push a level for the catch parameters. + + Wed Feb 15 12:42:57 1995 Jason Merrill + + * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my + bases, in case they've been clobbered. + + Wed Feb 15 12:07:29 1995 Mike Stump + + * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here, + so that one day it will always be valid. + * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto. + + * cp-tree.h (copy_binfo): Removed, unused. + * tree.c (copy_binfo): Ditto. + + Wed Feb 15 00:05:30 1995 Jason Merrill + + * init.c (build_new): Save the allocation before calling + expand_vec_init on it. + + * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush + match the TYPE_PRECISION of the underlying type for constant folding + to work. + + Tue Feb 14 15:31:25 1995 Mike Stump + + * except.c (push_eh_entry, expand_start_all_catch, + expand_leftover_cleanups, expand_end_catch_block): Keep track of + the context in which the exception region occurs. + (build_exception_table): If the region was not output, don't output + the entry in the eh table for it. + + Tue Feb 14 02:15:43 1995 Jason Merrill + + * init.c (expand_default_init): Only use a previous constructor call + if it's a call to our constructor. Does the word "Duh" mean + anything to you? + + * decl.c (grokparms): Fine, just don't call + convert_for_initialization at all. OK? Happy now? + + Mon Feb 13 02:23:44 1995 Jason Merrill + + * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class + method vector has a second element before returning it. + + * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling + convert_for_initialization. + + Sun Feb 12 03:57:06 1995 Jason Merrill + + * typeck.c (build_modify_expr): Compare function name to + constructor_name (current_class_type) instead of current_class_name. + + * decl.c (grokparms): Don't do anything with the return value of + convert_for_initialization. + + * error.c (dump_decl): Also dump_readonly_or_volatile on the decl. + + * decl.c (duplicate_decls): Tweak error message. + + * typeck.c (build_const_cast): Implement checking. + (build_reinterpret_cast): Implement some checking. + + * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when + converting to the same aggregate type. + (CONV_STATIC_CAST): Include it. + (CONV_C_CAST): Ditto. + * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT. + (cp_convert): Only force a new temporary if CONV_FORCE_TEMP. + + Fri Feb 10 16:18:52 1995 Jason Merrill + + * typeck.c (build_c_cast): Use non_lvalue to tack something on + where necessary. + + * decl.c (auto_function): Now a function. + * except.c (init_exception_processing): terminate, unexpected, + set_terminate, and set_unexpected have C++ linkage. + + * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of + truthvalue_conversion for converting to bool, as it handles + user-defined conversions properly. + (condition_conversion): Ditto. + + * except.c (expand_throw): Don't call convert_to_reference. + Pass the correct parameters to build_new. + + * method.c (do_build_assign_ref): Don't use access control when + converting to a base reference here. + (do_build_copy_constructor): Or here. + + * init.c (build_new): Unset TREE_READONLY on the dereferenced + pointer before assigning to it. + + * decl.c (maybe_build_cleanup): Don't bother stripping const here. + + * decl2.c (delete_sanity): You can now delete pointer to const. + + Fri Feb 10 13:28:38 1995 Jason Merrill + + * decl.c (finish_function): Don't rely on actual parameters being + evaluated left-to-right. + * except.c (expand_end_catch_block): Ditto. + + Fri Feb 10 00:52:04 1995 Jason Merrill + + * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't + considered lvalues. + * cvt.c (convert_to_reference): Use real_lvalue_p instead of + lvalue_p. + + * cvt.c (build_type_conversion_1): Don't call convert on aggregate + types. + (convert_to_reference): Fix erroneous text substitution. + + * typeck2.c (initializer_constant_valid_p): Update from C frontend. + Add new argument to all callers. + + * typeck.c (convert_arguments): Check for error_mark_node before + trying to do anything with the actual parameter. + + * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and + fold it. + (bool_truthvalue_conversion): Remove. Fix all callers to call + truthvalue_conversion instead. + (various): Fold CLEANUP_POINT_EXPRs. + + * parse.y (conditions): Call condition_conversion rather than + building up a CLEANUP_POINT_EXPR. + + * pt.c (end_template_decl): Don't warn_if_unknown_interface here + under -falt-external-templates. + + Thu Feb 9 05:24:10 1995 Jason Merrill + + * init.c (build_new): Complain about new of const type without + initializer. Other cleanup. + + * call.c (compute_conversion_costs): Don't call + build_type_conversion with a reference type; convert to the target + type and check its lvaluetude. + * cvt.c (convert_to_reference): Ditto. + + * cvt.c (build_type_conversion_1): There will never be any need to + dereference references here now. + + Thu Feb 9 00:37:47 1995 Mike Stump + + * except.c (expand_builtin_throw): Make sure we only `use' the + value of return_val_rtx. + + Wed Feb 8 15:45:55 1995 Jason Merrill + + * parse.y (structsp): Don't complain about declaring a type being + defined to be a friend. + + * decl2.c (warn_if_unknown_interface): Note the template in question + and the point of instantiation, for -falt-external-templates. + * lex.c (reinit_parse_for_method): Pass the decl to + warn_if_unknown_interface. + * pt.c (instantiate_template): Ditto. + (end_template_decl): Ditto. + + * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the + nested name again, to make local classes work a bit better. + + * typeck.c (build_function_call_real): Dereference reference after + checking for incomplete type. + + * init.c (build_new): Accept new of const and volatile types. + + Wed Feb 8 14:04:16 1995 Jason Merrill + + * decl.c (grokdeclarator): Fix error message. + + Wed Feb 8 03:16:15 1995 Jason Merrill + + * typeck.c (convert_for_initialization): Do bash arrays when + converting to a reference to non-array. + + Tue Feb 7 15:50:33 1995 Jason Merrill + + * cvt.c (cp_convert): Don't call convert_to_reference, or + automatically dereference references. Do pass reference conversions + to cp_convert_to_pointer. + (cp_convert_to_pointer): Support references. + + * call.c (build_method_call): Don't build up a reference to the + parameter here; let build_overload_call handle that. + + * typeck.c (build_c_cast): Call convert_to_reference directly if + converting to a reference type. + * method.c (do_build_copy_constructor): Ditto. + * method.c (do_build_copy_constructor): Ditto. + (do_build_assign_ref): Ditto. + + * call.c (build_method_call): Dereference a returned reference. + * typeck.c (build_function_call_real): Ditto. + + * decl.c (xref_basetypes): Check for unions with basetypes here. + (xref_tag): Instead of here. + + * pt.c (process_template_parm): Template type parm decls are + artificial. + + Mon Feb 6 04:32:09 1995 Jason Merrill + + * parse.y (typed_declspecs): Add missing semicolon. + (do_xref_defn): Resurrect. + (named_class_head_sans_basetype): Move template specialization + definition cases to named_class_head_sans_basetype_defn. + + * decl2.c (grokfield): Call pushdecl_class_level after setting the + TYPE_NAME, not before. + + Sun Feb 5 02:50:45 1995 Jason Merrill + + * call.c (convert_harshness): Don't call sorry here. Don't allow + conversions between function pointer types if pedantic. + + * pt.c (overload_template_name): Pass globalize=1 to xref_tag. + + * lex.c (cons_up_default_function): Use the full name for the return + type of op=. + + * decl.c (set_nested_typename): Don't worry about anonymous types, + as they already have a unique name. + (pushdecl): Remove redundant set_nested_typename + (xref_tag): Split out base handling into xref_basetypes. + + * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are + not considered incomplete even though their definition is unknown. + + * decl.c (xref_defn_tag): Lose. + (xref_tag): xref_next_defn = ! globalize. + (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The + ones that should have it set will have it set by pushtag. + (pushdecl_class_level): Ditto. + (pushtag): Tidy up a bit. + (set_nested_typename): Push a decl for the nested typename from + here, rather than from xref_defn_tag. + + * parse.y (do_xref): Lose. + (named_class_head): If we see 'class foo:' we know it's a + definition, so don't worry about base lists for non-definitions. + + * pt.c (push_template_decls): Template parm decls are artificial. + + * decl.c (duplicate_decls): Restore check for qualifier + disagreement for non-functions. + (decls_match): Remove check for qualifier disagreement. + + Fri Feb 3 14:58:58 1995 Jason Merrill + + * decl.c (grok_reference_init): Convert initializer from + reference. + * typeck.c (convert_for_initialization): Ditto. + + * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME. + + * cvt.c (cp_convert): Don't convert to the same class type by just + tacking on a NOP_EXPR. + (convert_to_reference): Use comp_target_types instead of comptypes + so that we don't allow conversions two levels down. + + Thu Feb 2 15:07:58 1995 Jason Merrill + + * class.c (build_vbase_path): Bash types to make the backend happy. + * cvt.c (build_up_reference): Bash the types bashed by + build_vbase_path to be reference types instead of pointer types. + (convert_to_reference): Ditto. + + * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a + reference type. + + * parse.y (structsp): Put back error for 'struct B: public A;'. + + Wed Feb 1 23:02:06 1995 Mike Stump + + * except.c: Add support for mips systems that don't define __mips + but do define mips, like Ultrix. + + Wed Feb 1 22:39:07 1995 Mike Stump + + * except.c: Add support for exception handling on the Alpha. + + Wed Feb 1 10:12:14 1995 Mike Stump + + * decl2.c (finish_file): Fix bug in Jan 31st change. + + Tue Jan 31 16:59:15 1995 Gerald Baumgartner (gb@lorenzo.cs.purdue.edu) + + * sig.c (build_signature_pointer_or_reference_type): Don't set + IS_AGGR_TYPE for signature pointers/reference so expand_default_init + doesn't expect to find a copy constructor. + * call.c (build_method_call): Treat signature pointers/reference + as if IS_AGGR_TYPE were set. + + Tue Jan 31 13:28:56 1995 Mike Stump + + * gc.c (get_typeid): Pawn off error messages to build_t_desc. + (build_t_desc): Inform the user here if they try and build + with -frtti and don't include . + + * decl2.c (finish_prevtable_vardecl): Support rescanning. + (finish_file): Move finish_prevtable_vardecl up to before the global + initializers are done as tdecls are initialized in the global + initializer. Also Pick up any new tdecls or vtables needed by + synthesized methods. + + * class.c (finish_struct): Simplify. We have to do rtti scanning at + end, so we might as well do all of it there. + + Tue Jan 31 05:35:02 1995 Jason Merrill + + * call.c (build_method_call): Fix -fthis-is-variable for 32-bit + targets, too. + + Tue Jan 31 00:11:04 1995 Mike Stump + + * decl2.c (finish_prevtable_vardecl): New routine, mostly split from + finish_vtable_vardecl. It has the first half functionality from + that routine. + * decl2.c (finish_vtable_vardecl): Update to not include stuff not + in finish_prevtable_vardecl. + * decl2.c (finish_file): Call finish_prevtable_vardecl. + * gc.c (build_generic_desc): Allow it to be called when not at the + global binding layer, but behave as if we were. + (build_t_desc): Rearrange a bit so that it really works and is + easier to follow. + * class.c (finish_struct): Don't decide on tdecls here, as we have + to wait until the end of the file in general to decide whether or + not they come out. + + Mon Jan 30 01:00:40 1995 Jason Merrill + + * init.c (build_delete): Check access to operator delete before + calling the destructor. + * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to + return error_mark_node. + * call.c (build_method_call): Use the one-argument op delete even if + it's an error. + + * init.c (build_new): Fix -fthis-is-variable support. + * call.c (build_method_call): Ditto. + + * call.c (convert_harshness): Make conversion from a pointer to bool + worse than conversion to another pointer. + + Sat Jan 28 16:46:10 1995 Jason Merrill + + * init.c (build_new): Check new return value if -fcheck-new. + + * lex.c (check_newline): Clear end_of_file when we're done, too. + + Sat Jan 28 10:38:39 1995 Mike Stump + + * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow + vtables whereever they go. + + * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't + right. + + Sat Jan 28 09:10:44 1995 Mike Stump + + * decl2.c (finish_vtable_vardecl): Now set the + interface/implementation of vtables on the first virtual function, + if one exists, otherwise we use the old method. This is a major win + in terms of cutting down the size of objects and executables in + terms of text space and data space. Now most of the savings that + #pragma interface/implementation gives is automatic in a fair number + of cases. + + Sat Jan 28 04:57:33 1995 Jason Merrill + + * decl.c (grokdeclarator): Discard the template parameters in a + template constructor declaration so that the function is always + named constructor_name (ctype). + + * lex.c (check_newline): Use ungetc to put back the character before + calling HANDLE_PRAGMA. + + Fri Jan 27 17:23:47 1995 Mike Stump + + * decl2.c (check_classfn): If the cname is T and fn_name is T, + make sure we still match them. + + Fri Jan 27 16:32:10 1995 Jason Merrill + + * parse.y: Add END_OF_LINE token. + + * lex.c (check_newline): Set linemode when we see a # directive, and + unset it when we're done. Turn all 'return's into 'goto skipline'. + Fix all uses of '\n', since we won't see it anymore. Put back the + character we read before checking for a sysv or target pragma. + (real_yylex): If we see an EOF in linemode, return END_OF_LINE. + (handle_sysv_pragma): Don't look at the input stream; quit when we + see an END_OF_LINE token. + + * input.c (getch): Return EOF if we're in line mode and at the end + of a line. + (put_back): Don't put back an EOF. + + Thu Jan 26 19:26:34 1995 Mike Stump + + * except.c (expand_throw): Do the newing of the exception object + before we load the type descriptor or the address so that we don't + wipe any of the values out. + + Thu Jan 26 19:20:00 1995 Mike Stump + + * except.c (init_exception_processing): Don't use r12 on the rs6000. + + Tue Jan 24 16:36:31 1995 Jason Merrill + + * decl.c (grokparms): Don't try to build up a reference at this point. + + * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR + will suffice to convert from integer_zero_node. + + Wed Jan 25 15:02:09 1995 David S. Miller (davem@nadzieja.rutgers.edu) + + * class.c (instantiate_type): Change error message text. + * typeck2.c (store_init_value): Likewise. + + Mon Jan 23 21:57:14 1995 Mike Stump + + * pt.c (tsubst): When we copy a node, don't forget to copy + TREE_CHAIN, we use it later. + + Mon Jan 23 03:33:47 1995 Jason Merrill + + * typeck.c (convert_for_assignment): Initialize variable before use. + + Fri Jan 20 01:17:59 1995 Jason Merrill + + * g++.c (main): Link with both libstdc++ and libg++ if called as + something ending with "g++", otherwise only libstdc++. Move -lm to + the end of the line. + + Thu Jan 19 15:43:11 1995 Jason Merrill + + * call.c (build_method_call): Don't mess with 'this' before calling + compute_conversion_costs. + + Wed Jan 18 15:40:55 1995 Jason Merrill + + * search.c (get_matching_virtual): Give line number for previous + declaration. + + * call.c (convert_harshness): Handle conversions to references + better. + + * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*. + + Wed Jan 18 15:21:38 1995 Mike Stump + + * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead, + as the TREE_CHAIN for methods will take us to the next differently + named function, DECL_CHAIN won't. + + Wed Jan 18 14:26:59 1995 Jason Merrill + + * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR. + + * decl2.c (lang_decode_option): -Wall implies -Wparentheses. + warn_parentheses defaults to 0. + + * decl.c (grokparms): Put back call to require_instantiated_type. + + Tue Jan 17 19:56:15 1995 Mike Stump + + * except.c (exception_section): Use the data section on the rs6000. + Change calling convention for named_section. + + Wed Jan 17 18:20:57 1994 Fergus Henderson + + * cp-tree.h : Make if (x=0) warn with wall + * parse.y : Make if (x=0) warn with wall + + Tue Jan 17 14:12:00 1995 Jason Merrill + + * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS, + BITS_PER_UNIT otherwise. + + * search.c (get_matching_virtual): Don't check the binfo if the + types are the same. + + * cvt.c (cp_convert): Just call truthvalue_conversion to convert to + bool. + + Mon Jan 16 13:28:48 1995 Jason Merrill + + * various: Use boolean_type_node, boolean_true_node, + boolean_false_node. + + * search.c (get_matching_virtual): Allow covariant returns that + don't require pointer adjustment. + + * typeck.c (build_conditional_expr): Don't call default_conversion + on ifexp. + + * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR. + + * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn. + + Sun Jan 15 22:17:32 1995 dcb@lovat.fmrco.COM (David Binderman) + + * pt.c (do_function_instantiation): Free targs once we're done. + + Sun Jan 15 22:17:32 1995 Jason Merrill + + * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD. + (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE + for bool. + + Sat Jan 14 05:33:55 1995 Jason Merrill + + * decl2.c (finish_file): We need to mess up if there are any + variables in the list, not just if there is one with a constructor. + + Fri Jan 13 14:42:55 1995 Jason Merrill + + * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR. + (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR. + (finish_function): Trust rest_of_compilation. + + * decl2.c (finish_file): Also call functions designated as static + constructors/destructors. + + * decl.c (grokdeclarator): Allow access decls of operator functions. + (grokparms): Only do convert_for_initialization if the initializer + has a type. + (duplicate_decls): Put back push_obstacks_nochange call. + + * lex.c (real_yylex): Downgrade complaint about the escape sequence + being too large from pedwarn to warning. + + * decl.c (grokdeclarator): Don't complain about long long in system + headers. + + * lex.c (real_yylex): Handle digraphs. + + Thu Jan 12 12:17:24 1995 Jason Merrill + + * decl.c (init_decl_processing): -f{no-,}strict-prototype only + affects C linkage declarations now. + + * typeck.c (comp_target_types): Grok simple contravariant conversions. + (common_type): t1 and t2 are interchangeable. + + * various: Test return value of comp_target_types differently in + different places; it now returns -1 for a contravariant conversion + (which is fine in symmetric cases). + + (common_type): Prefer long double to double even when + they have the same precision. + + * decl.c (grokparms): Call convert_for_initialization to check + default arguments. + + * init.c (build_new): void_type_node has a size (of 0). + + * decl.c (decls_match): Also check for agreement of TREE_READONLY + and TREE_THIS_VOLATILE. + (push_class_level_binding): Properly handle shadowing of + nested tags by fields. + + * search.c (dfs_pushdecls): Ditto. + + * decl2.c (finish_file): Don't second-guess self-initialization. + + * cvt.c (convert_to_reference): Work with expr directly, rather than + a copy. + + * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs. + + * init.c (add_friend): Downgrade duplicate friend message from + pedwarn to warning. + + * decl.c (duplicate_decls): Push obstacks before calling common_type. + + Thu Jan 12 17:15:21 1995 Michael Ben-Gershon + + * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for + exception table labels. + (expand_start_all_catch): Ditto. + (expand_leftover_cleanups): Ditto. + (expand_end_catch_block): Ditto. + * except.c (make_first_label): new function. + (expand_start_all_catch): add a call to make_first_label() before + using a label as a jump destination. + (expand_end_all_catch): Ditto. + (expand_leftover_cleanups): Ditto. + (expand_end_catch_block): Ditto. + (expand_builtin_throw): Ditto. + (expand_throw): Ditto. + * except.c: Add ARM processor support for exception handling. + + Thu Jan 12 12:17:24 1995 Jason Merrill + + (complete_array_type): Copy code from C frontend. + + * lex.c (real_yylex): Don't multiply the length of a wide string + literal by WCHAR_BYTES. + + * decl.c (pushdecl): Check for redeclaration of wchar_t here. + (duplicate_decls): Instead of here. + (define_label): Complain about a label named wchar_t. + (grokdeclarator): Complain about declarations of + operator-function-ids as non-functions. + + * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in + COMPOUND_EXPRs. + (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR. + + * lex.c (real_yylex): Don't skip whitespace when reading the next + character after ->. + + Wed Jan 11 16:32:49 1995 Mike Stump + + * except.c: Allow cc1plus to be built with native compiler on rs6000. + (expand_start_all_catch): Add assemble_external calls for various + routines we call. + (expand_leftover_cleanups): Ditto. + (expand_start_catch_block): Ditto. + (do_unwind): Ditto. + (expand_builtin_throw): Ditto. + + Wed Jan 11 01:05:42 1995 Jason Merrill + + * decl.c (pushtag): Only look for a previous decl in the current + binding level. Use explicit global scope in DECL_NESTED_TYPENAME. + + * gxx.gperf: Add __signature__ and __sigof__ keywords. + + * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It + does set flag_no_gnu_keywords and flag_operator_names. + + * lex.c (init_lex): 'overload' is not a keyword unless -traditional. + Unset extension keywords if -fno-gnu-keywords. + Allow operator names ('bitand') if -foperator-names. + Never unset 'asm'; -fno-asm only affects 'typeof'. + + * decl.c (lookup_name_real): The got_object special lookup only + applies to types. + + Tue Jan 10 18:07:51 1995 Jason Merrill + + * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set. + + * parse.y (primary): Unset got_object after all rules that use the + 'object' nonterminal. + (object): Set got_object. + + * lex.h: Declare got_object. + + * decl.c (lookup_name_real): Also lookup names in the context of an + object specified. + + Tue Jan 10 14:30:30 1995 Mike Stump + + * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node + for things that have to be added to pointers, not size_type. Cures + problems with pointer to members on Alphas. + (build_binary_op_nodefault): Ditto. + (get_delta_difference_: Ditto. + (build_ptrmemfunc): Ditto. + + Tue Jan 10 01:49:25 1995 Jason Merrill + + * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing + it. + + * typeck.c (build_component_ref): Don't build up a COMPONENT_REF + when dealing with overloaded member functions; just act like + build_offset_ref. + (commonparms): Remove misleading comment. + + * decl.c (duplicate_decls): Complain about repeated default + arguments here. + (redeclaration_error_message): Instead of here. + (pushdecl): Complain about missing default arguments here. + (grokparms): Instead of here. + (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME. + (grok_reference_init): Do not complain about missing initializer if + declared 'extern'. + + * search.c (lookup_field): Don't return a TYPE_DECL if there is a + function alternative and want_type is not set. + + Mon Jan 9 18:16:23 1995 Jason Merrill + + * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push + the decl when the type has no TYPE_NAME. + (lookup_nested_type): Don't assume that type has TYPE_NAME set. + (lookup_name_real): Call lookup_field with want_type = + prefer_type. + + * search.c (lookup_field): Handle want_type properly in the presence + of fields with the same name. + + * decl.c (set_nested_typename): Set nested name for file-scope types + to include leading ::. + (pushdecl): Set the nested typename if the decl doesn't have one, + rather than if the type's canonical decl doesn't have one. + + Mon Jan 9 16:48:16 1995 Steve Chamberlain (sac@jonny.cygnus.com) + + * typeck.c (pointer_int_sum): Use offset size when calculating + index expression. + + Mon Jan 9 03:44:33 1995 Jason Merrill + + * typeck.c (convert_for_assignment): Complain about contravariance + violation here. + (comp_target_types): Instead of here. + (build_unary_op): resolve_offset_ref before checking for a valid + type. + + * spew.c (yylex): Decrement looking_for_typename after we see a + _DEFN. + + * decl.c (pushdecl): Don't install an artificial TYPE_DECL in + IDENTIFIER_LOCAL_VALUE if we already have a decl with that name. + + * typeck.c (convert_for_assignment): Converting pointers to bool + does not need a cast. + + Sun Jan 8 18:16:45 1995 Jason Merrill + + * class.c (instantiate_type): Initialize nsubsts parm. + + * pt.c (do_function_instantiation): Ditto. + + Sat Jan 7 14:37:05 1995 Jason Merrill + + * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE && + DECL_SAVED_INSNS to determine whether or not we've seen a definition + of this function. + (instantiate_template): Ditto. + + * call.c (convert_harshness): Allow const reference binding when + called from the overloading code, but not when called from + can_convert (since it isn't a conversion). + (convert_harshness): Put back some disabled code. + + Fri Jan 6 14:10:57 1995 Jason Merrill + + * call.c (convert_harshness): There is no implicit conversion from + void* to other pointer types (unless the parameter is (void*)0). + (convert_harshness): Non-lvalues do not convert to reference types. + + * class.c (finish_struct_methods): Still set + TYPE_HAS_{INT,REAL}_CONVERSION. + + * call.c (can_convert): Don't use aggregate initialization. + + * cp-tree.h: Declare lookup_conversions. + + Thu Jan 5 21:08:00 1995 Mike Stump + + * parse.y (simple_stmt): Fix duplicate case value error messages to + be more readable. + + Wed Jan 4 16:44:19 1995 Jason Merrill + + * cvt.c (build_type_conversion): Total rewrite to use + convert_harshness instead of reproducing conversion logic here. Now + much shorter. + + * call.c (convert_harshness): Support conversions to bool. + (can_convert): Checks whether a conversion is less harsh + than USER_CODE, for build_type_conversion. + + * search.c (add_conversions): Function for passing to dfs_walk which + adds all the type conversion operators in the current type to a list. + (lookup_conversions): Calls dfs_walk with add_conversions and return + the list. + (dfs_walk): Don't require a qfn. + + * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery. + (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC. + + * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery. + (grow_method): A separate function for building onto the growing + method vector. + (finish_struct_methods): Use it. Put all type conversion operators + right after the constructors. Perhaps we should sort the methods + alphabetically? + + Mon Jan 2 14:42:58 1995 Jason Merrill + + * call.c (build_method_call): Lose another misleading shortcut. + + Fri Dec 30 17:57:30 1994 Mike Stump + + * gc.c (build_bltn_desc): Handle bool as a built-in type. + + Fri Dec 30 14:20:21 1994 Mike Stump + + * tree.c (layout_vbasetypes): Ensure that we don't loose alignment + on the complete type because of small virtual bases. + + Fri Dec 30 12:22:29 1994 Mike Stump + + * decl.c (n_incomplete): Bump n_incomplete up to int to match C + front end. + (pushdecl): Also count decls pushed that are of a type being defined + as incomplete things. + * class.c (finish_struct): Move hack_incomplete_structures up to + just after we set it as not being defined, so that the decls we + build for RTTI don't count as incomplete. + + Thu Dec 29 18:20:57 1994 Mike Stump + + * pt.c (tsubst): Fix problem with defining constructors in templated + classes with virtual bases. + + Wed Dec 28 08:31:00 1994 Mike Stump + + * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid + expressions. + * gc.c (build_typeid): Ditto. + + Thu Dec 22 17:26:33 1994 Mike Stump + + * cvt.c (build_up_reference): Fix breakage introduced on Nov 29, + don't assert on complex AGGR inits. + + Thu Dec 22 14:32:31 1994 Mike Stump + + * method.c (build_overload_value): Handle pointer to members as + template arguments. + + Thu Dec 22 13:09:07 1994 Mike Stump + + * typeck.c (unary_complex_lvalue): Don't call sorry if we know how + to do take the address of a data member for a pointer to data + member. + + Thu Dec 22 10:04:19 1994 Mike Stump + + * decl.c (grokdeclarator): Use the typedef name for linkage if the + type doesn't otherwise have a name. + + * decl2.c (grokfield): Ditto. + + * class.c (finish_struct): Since we reuse the TYPE_DECL for the + DECL_NAME of enums, structs and classes, we have to avoid trying to + put it in the TYPE_FIELDS again. + + Wed Dec 21 11:07:05 1994 Mike Stump + + * decl2.c (check_classfn): Ignore this parameter on static functions + when checking to see if we match. + + Tue Dec 20 17:47:02 1994 Mike Stump + + * typeck.c (unary_complex_lvalue): Handle address of non-left most + pointers to members by calling get_delta_difference. + + Mon Dec 19 22:40:53 1994 Mike Stump + + * decl2.c (check_classfn): Don't use decls_match yet, as it modifies + static functions to early. + + Thu Dec 19 22:37:48 1994 Mike Stump + + * method.c (make_thunk): Handle encoding of positive thunk offsets. + + Sat Dec 17 13:29:50 1994 Doug Evans + + * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets. + + Thu Dec 15 16:32:12 1994 Mike Stump + + * decl2.c (check_classfn): Use decls_match to check if this has + already been declared, as the DECL_ASSEMBLER_NAME may have been + changed via asm("new_name"). + * decl.c (decls_match): Make public. + + Thu Dec 15 15:17:55 1994 Mike Stump + + * *.[chy] (expand_aggr_init) Add fourth argument to handle + distinction between = init and (init) style of initializations. + * *.[chy] (finish_decl): Add fifth argument to to handle + distinction between = init and (init) style of initializations. + + Tue Dec 13 19:16:05 1994 Mike Stump + + Fix some random `explicit' bugs. + + * cvt.c (convert_to_reference): Add third parameter to + convert_force. + (convert_force): Ditto. + * call.c (build_method_call): Ditto. + * decl2.c (setup_vtbl_ptr): Ditto. + * init.c (expand_virtual_init): Ditto. + (build_member_call): Ditto. + (build_delete): Ditto. + (build_vbase_delete): Ditto. + * typeck.c (build_component_addr): Ditto. + (build_c_cast): Ditto. + (build_modify_expr): Ditto. + * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can + distinguish the context in which the conversion appears. Add thrid + argument to build_c_cast. + * cvt.c (cp_convert): Pass whether or not we want to consider + non-converting constructors down to build_method_call. + * decl2.c (reparse_absdcl_as_casts): Add third argument to + build_c_cast. + * gc.c (build_m_desc): Ditto. + * init.c (build_new): Ditto. + * parse.y (expr_no_commas): Ditto. + (primary): Ditto. + * typeck.c (build_x_function_call): Ditto. + (build_static_cast): Ditto. + (build_reinterpret_cast): Ditto. + (build_const_cast): Ditto. + (build_c_cast): Ditto. + (build_ptrmemfunc): Ditto. + * typeck2.c (build_functional_cast): Ditto. + * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to + expand_aggr_init_1 as inits are converted to the destination type. + + Tue Dec 13 16:18:57 1994 Jason Merrill + + * Make-lang.in (cc1plus): Depends on c-pragma.o. + + * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o. + + * lex.c (check_newline): If the #pragma is not recognized by g++, + try machine-specific ones too. + (handle_sysv_pragma): Copied from c-lex.c. + + Mon Dec 12 23:53:06 1994 Mike Stump + + * except.c (expand_throw): Fix Dec 6th change, build_new likes a + reference better. + + Mon Dec 12 18:01:00 1994 Jason Merrill + + * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with + IS_AGGR_TYPE, since now they will not both be set on the same type. + + * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on + instantiations controlled by -fexternal-templates. + + * decl.c (duplicate_decls): Don't complain about different values of + __attribute__ ((const)) and ((noreturn)). + + Fri Dec 9 18:17:37 1994 Doug Evans + + * Makefile.in (BISONFLAGS): Delete --yacc. + (PARSE_H): Depend on $(PARSE_C), for parallel makes. + (PARSE_C): Undo last patch. + + Fri Dec 2 10:44:36 1994 Mike Stump (mrs@wombat.gnu.ai.mit.edu) + + * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in + y.tab.c. + + Thu Dec 8 17:39:46 1994 Jason Merrill + + * decl.c (finish_decl): Don't call obscure_complex_init for decls + of indeterminate size. + + Wed Dec 7 16:49:22 1994 Jason Merrill + + * decl.c (obscure_complex_init): Function to tweak the decl to + prevent expand_decl from tring to initialize it. + (finish_decl): Use it rather than writing the same code in three + different places. + + * parse.y (bad_parm): Stop trying to support parms without types. + + Wed Dec 7 12:06:56 1994 Mike Stump + + * decl2.c (grokfield): Make asm specs on static member functions + work. + + Tue Dec 6 15:43:20 1994 Mike Stump + + * except.c (expand_throw): Make a copy of the thrown object. + + Tue Dec 6 14:16:34 1994 Jason Merrill + + * parse.y: : has lower precedence than =. + + Tue Dec 6 12:46:17 1994 Mike Stump + + * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace + manglings. + (grokvardecl): Add namespace into variable name. + + Tue Dec 6 11:26:55 1994 Mike Stump + + * decl2.c (current_namespace_id): New routine to transform a simple + name into a name in a namespace. + * decl.c (grokdeclarator): Use it. + * decl2.c (get_namespace_id): Find the name of the current + namespace. + (push_namespace, pop_namespace): Complete out missing + functionality. + + Mon Dec 5 17:11:51 1994 Jason Merrill + + * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may + not be defined. Fix warning message for enums and restore warning + for non-enums. + + * decl2.c (push_namespace): Dummy function. + (pop_namespace): Ditto. + (do_namespace_alias): Ditto. + (do_using_decl): Ditto. + (do_using_directive): Ditto. + + * parse.y: New token NSNAME for namespace names. + (extdef): Add namespace, using definitions. + (using_decl): New rule for using declarations. + (any_id): New rule for identifiers with any degree of scoping. + (identifier): Add NSNAME. + (notype_identifier): Ditto. + (component_decl): Add using_decl. + (nested_name_specifier): Add NSNAME SCOPE. + + * typeck.c (convert_for_assignment): Handle conversions between + enums and bool. + + * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on + FUNCTION_DECLs. + + Mon Dec 5 13:03:16 1994 Mike Stump + + * class.c (finish_struct): Give an error if one tries to declare a + bit-field's size greater than a long long, as the backend will dump. + It is not an error to declare an enum bit-field greater than its + precision. Warn if an enum bit-field is too small to hold all + its values. + + Mon Dec 5 11:41:50 1994 Mike Stump + + * typeck.c (convert_for_assignment): Use cp_convert instead of + convert so that we don't get static casts. + + Sun Dec 4 11:59:01 1994 Mike Stump + + * cvt.c (cp_convert): Don't complain about int->enum conversion if + we are doing static casts. + + Fri Dec 2 18:32:41 1994 Mike Stump + + * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs + when dumping expressions in error messages. + + Fri Dec 2 17:04:27 1994 Mike Stump + + * gc.c (build_dynamic_cast): Change interface to libg++, ensure that + the return type is the right type, and make references work. + + Fri Dec 2 16:36:43 1994 Jason Merrill + + * decl.c (poplevel): Don't be confused by function-scope + declarations of non-nested functions. + (duplicate_decls): Propagate DECL_MAIN_VARIANT. + (pushdecl): Use duplicate_decls to copy info from old decl into new + function-scope one rather than doing it here. + + * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT + of this decl, in case this is a function-scope declaration. + + * decl.c (finish_enum): Make sure that the type has the right + precision when we call fixup_*_type. + + Tue Nov 29 19:12:07 1994 Jason Merrill + + * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do + want to build up references to rvalues if possible. + (cp_convert): Stick on a NOP_EXPR when converting to the same type. + + Tue Nov 29 11:28:59 1994 Mike Stump + + * parse.y (maybe_raises): Handle throw (). + * parse.y (ansi_raise_identifier): grok type-ids in exception + specifications. + * tree.c (build_exception_variant): Use list compare to check if + two exception specifications match. + * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error + messages. + * call.c (build_method_call): Remove TREE_RAISES. + * cvt.c (convert_to_aggr): Ditto. + * typeck.c (build_function_call_real, convert_arguments): Ditto. + * init.c (expand_aggr_init_1): Ditto. + + Tue Nov 29 09:50:39 1994 Mike Stump + + * except.c: Add support for m68k and mips exception handling + support. + + Tue Nov 29 08:48:33 1994 Mike Stump + + * except.c (expand_end_all_catch): Throw into outer context, if we + fall off end of catch handlers. + + Mon Nov 28 16:44:41 1994 Mike Stump + + * Makefile.in: Make is easier to decide where parse.[ch] will be + built. + + Thu Nov 17 20:11:24 1994 Doug Evans + + * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name. + (GXX_INSTALL_NAME) Likewise. + (CXX_CROSS_NAME) Use program_transform_cross_name. + (GXX_CROSS_NAME) Likewise. + (c++.install-man): Use program_transform_name on g++.1. + (c++.uninstall): Likewise. + + Thu Nov 3 18:48:19 1994 Paul Eggert + + * Makefile.in (spew.o, lex.o, pt.o): + Depend on $(srcdir)/parse.h, not parse.h. + + Mon Nov 28 13:53:03 1994 Mike Stump + + * parse.y (THROW): Fix precedence of throw expressions. + + Mon Nov 28 13:15:16 1994 Mike Stump + + * typeck.c (build_unary_op): Allow promotions from bool to int on + unary ~. + + Sun Nov 27 00:16:21 1994 Jason Merrill + + * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for + classes when appropriate. + (build_overload_nested_name): When dealing with a function context, + use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to + avoid conflicts between local classes of the same name. + + Wed Nov 23 17:59:42 1994 Mike Stump + + * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c + (duplicate_decls, grokdeclarator), cp-tree.h: Add support for + `explicit'. + * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1, + build_type_conversion): Use LOOKUP_ONLYCONVERTING in + build_method_calls so that non-converting constructors are not used. + * call.c (build_method_call): If we shouldn't use a non-converting + constructor, then don't. + + Wed Nov 23 14:46:56 1994 Jason Merrill + + * call.c (build_method_call): Don't try to synthesize methods yet. + + Tue Nov 22 12:45:21 1994 Jason Merrill + + * pt.c (push_template_decls): Create CONST_DECLs for template + constant parameters, not VAR_DECLs. + + Sat Nov 19 15:28:31 1994 Jim Wilson (wilson@chestnut.cygnus.com) + + * typeck.c (build_binary_op_nodefault): Can shorten shift only if + shift count is less than size in bits of arg0. + + Thu Nov 17 15:30:50 1994 Mike Stump + + * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new + ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not, + not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need + to add support for explicit, namespace, typename, and using, support + for the rest is already in. + Thu Nov 17 10:56:50 1994 Jason Merrill ! * typeck2.c (build_m_component_ref): Check the basetype of the ! member pointer against the main variant of the object type. Mon Nov 14 14:21:52 1994 Jason Merrill ! * cvt.c (convert_to_reference): Make sure that the original expr ! gets its type back when converting a reference. ! * method.c (build_overload_name): Clear numeric_outputed_need_bar here. ! (build_decl_overload): Instead of here. Tue Nov 8 17:11:24 1994 Jason Merrill ! * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a ! function. ! * typeck.c (convert_for_initialization): Handle initialization from ! a TARGET_EXPR. Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * pt.c (lookup_nested_type_by_name): Fix list-walking logic. ! (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate ! TYPE_READONLY and TYPE_VOLATILE from the argument. ! (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals ! present in parm from arg. ! (type_unification): Strip REFERENCE_TYPE from the argument type. ! (unify): Don't strip REFERENCE_TYPE from the argument type. Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com) ! * pt.c (do_type_instantiation): Check to see if there's a ! IDENTIFIER_TEMPLATE on a class before calling ! instantiate_member_templates(). ! ! Fri Nov 4 19:04:18 1994 Mike Stump ! ! * gc.c (get_bad_cast_node): New routine to support compile time ! throws of bad_cast. ! * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile ! time. ! Fri Nov 4 11:12:00 1994 Mike Stump ! * except.c: Add hppa support. ! Fri Nov 4 10:50:50 1994 Mike Stump ! * except.c: Add rs6000 support. + Thu Nov 3 14:24:23 1994 Mike Stump + + * except.c (do_unwind): Add i[34]86 support. + + Thu Nov 3 00:10:46 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit + instantiations. + + Wed Nov 2 15:08:24 1994 Kung Hsu (kung@mexican.cygnus.com) + + * decl.c (finish_function): emit types used in method parameters + into symbol table. + + Wed Nov 2 15:05:47 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * pt.c (process_template_parm): Allow pointer to member function + template parameter types. + (uses_template_parms): Handle pointer to member function + CONSTRUCTORs. + + * g++.c (main): Cast first argument of bzero to (char *). + Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'. + + Mon Oct 31 14:50:48 1994 Kung Hsu (kung@mexican.cygnus.com) + + * gc.c (build_dynamic_cast): rewrite to make it work. + * class.c (finish_vtbls): build more vtables if flag_rtti is on. + * class.c (modify_all_direct_vtables): ditto. + * init.c (expand_direct_vtbls_init): expand more vtables if + flag_rtti is on. + * decl.c (init_type_desc): add default return. + + Tue Oct 25 17:13:09 1994 Kung Hsu (kung@mexican.cygnus.com) + + * tree.c (debug_binfo): get rid of the initial size entry of + vtable. + * cp-tree.h: change flag_dossier to flag rtti, define type + descriptor type nodes. + * decl.c (init_type_desc): new function to initialize type + descriptor type nodes. + * decl.c (record_builtin_type): change flag_dossier to flag_rtti. + * lex.c (init_lex): ditto. + * decl.c : change variable flag_dossier to flag_rtti. + * decl.c (duplicate_decls): get rid initial size entry of vtable. + * decl.c (hack_incomplete_structures): take out assert 164. + * search.c (get_abstract_virtuals_1): ditto. + * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to + CLASSTYPE_RTTI. + * parse.y: ditto. + * class.c (prepare_fresh_vtable): for virtual bases, get right + offset. + * class.c (add_virtual_function): change flag_dossier to + flag_rtti. + * class.c (modify_one_vtable): modify the right rtti entry. + * class.c (override_one_vtable): get rid of size entry. + * class.c (finish_struct): change flag_dossier to flag_rtti, and + build extra vtables, build type descriptors for polymorphic + classes. + * gc.c (build_headof): make headof() works correctly with new + rtti. + * gc.c (build_typeid): make this function work with new rtti. + * gc.c (get_typeid): make this function work with new rtti. + * gc.c (build_bltn_desc): new function for new rtti. + * gc.c (build_user_desc): ditto. + * gc.c (build_class_desc): ditto. + * gc.c (build_ptr_desc): ditto. + * gc.c (build_attr_desc): ditto. + * gc.c (build_func_desc): ditto. + * gc.c (build_ptmf_desc): ditto. + * gc.c (build_ptmd_desc): ditto. + * gc.c (build_t_desc): ditto. + * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc. + Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * call.c (convert_harshness): Check for TREE_UNSIGNED differences ! after checking for integral conversions. Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl2.c: Declare flag_access_control. ! (struct lang_f_options): Add access-control. ! * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control ! for the call to expand_aggr_init to copy the object out of the ! pcc_struct_return slot. ! * search.c (compute_access): if (!flag_access_control) return ! access_public. Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * lex.c (cons_up_default_function): Don't try to defer method ! synthesis now. ! ! * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl ! instead of abort, since the OSF/1 dynamic linker doesn't like to see ! relocation entries for abort. ! ! * tree.c (array_type_nelts_total): Use sizetype, not ! integer_type_node. ! (array_type_nelts_top): Ditto. ! ! Thu Oct 20 15:48:27 1994 Mike Stump ! ! * decl.c (grokdeclarator): Added handling for catch parameters ! (CATCHPARM). ! * except.c (expand_start_catch_block): Use the new CATCHPARM context ! instead of NORMAL. ! * except.c (expand_throw): Don't let convert_to_reference complain ! about what we are doing. ! ! Thu Oct 20 12:55:24 1994 Jim Wilson (wilson@cygnus.com) ! ! * method.c (emit_thunk): Call instantiate_virtual_regs. + Wed Oct 19 14:15:33 1994 Mike Stump + + * except.c (expand_exception_blocks): Make sure throw code doesn't + get put in function that won't be output. + Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (init_decl_processing): Make alloca a builtin. ! ! Thu Oct 27 21:10:25 1994 Craig Burley (craig@burley) ! ! * g++.c (main): Only decrement "added" and set "library" to ! NULL when "library" != NULL (just like 940829 fix). Mon Oct 17 15:56:11 1994 Mike Stump *************** *** 85,129 **** be set just below, use current_fndecl instead. Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0. Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the ! bitmask for lexing character constants. ! * call.c (build_method_call): Disable code that tries to do tricky ! stuff with a default parameter that is a constructor call, but ! actually does other tricky stuff that breaks things. Wed Oct 12 16:14:01 1994 Benoit Belley ! * decl.c (finish_enum): Disable code which forces enums to be signed, ! since this conflicts with their use as bitfields. type_promotes_to ! handles promotion of enums of underlying unsigned types to signed ! integer types. Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * cvt.c (type_promotes_to): Also promote enums to long if ! appropriate. ! * typeck.c (default_conversion): Don't expect type_promotes_to to ! return a main variant. Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * call.c (build_scoped_method_call): Don't lose side effects in the ! object expression when calling a non-existent destructor. Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au) ! * call.c (build_scoped_method_call): Remove erroneous error message ! when destructor call is written as a scoped call. Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * various: Cast pointer arguments to bzero and bcopy to char *. Tue Oct 11 19:34:32 1994 Mike Stump --- 2861,2932 ---- be set just below, use current_fndecl instead. + Fri Oct 14 15:12:22 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1 + with LOOKUP_SPECULATIVELY. + (expand_default_init): Abort if build_method_call returns NULL_TREE. + + * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if + the rhs is a TARGET_EXPR. + + * parse.y (left_curly): Anonymous types are not affected by #pragma + interface/implementation. + + * method.c (synthesize_method): Don't call setup_vtbl_ptr for the + default constructor if it isn't needed. + + * lex.c (cons_up_default_function): Do synthesize methods for + anonymous types if necessary. + Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0. Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * typeck.c (build_modify_expr): Understand how to copy an aggregate. ! ! * init.c (expand_default_init): Ditto. Also remove some of the ! crufty code that assumes methods will not be synthesized properly. ! * lex.c (cons_up_default_function): If the containing type has no ! name, these functions should never need to be called, so just ! declare them. + * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the + bitmask for lexing character constants. + + * call.c (build_method_call): Disable code that tries to do tricky + stuff with a default parameter that is a constructor call, but + actually does other tricky stuff that breaks things. + Wed Oct 12 16:14:01 1994 Benoit Belley ! * decl.c (finish_enum): Disable code which forces enums to be signed, ! since this conflicts with their use as bitfields. type_promotes_to ! handles promotion of enums of underlying unsigned types to signed ! integer types. Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * cvt.c (type_promotes_to): Also promote enums to long if ! appropriate. ! * typeck.c (default_conversion): Don't expect type_promotes_to to ! return a main variant. Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * call.c (build_scoped_method_call): Don't lose side effects in the ! object expression when calling a non-existent destructor. Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au) ! * call.c (build_scoped_method_call): Remove erroneous error message ! when destructor call is written as a scoped call. Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! * various: Cast pointer arguments to bzero and bcopy to char *. Tue Oct 11 19:34:32 1994 Mike Stump *************** *** 135,187 **** don't offset from a parent of the DECL_CONTEXT of the function. Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * lex.c (cons_up_default_function): Mark methods in a template class ! as template instances. Store the values of interface_unknown and ! interface_only for do_pending_inlines. ! (do_pending_inlines): Use them. Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * method.c (do_build_copy_constructor): Handle anonymous unions. ! (do_build_assign_ref): Ditto. ! (largest_union_member): Move from lex.c. Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * call.c (build_overload_call_real): Don't immediately do ! array->pointer conversion. ! * pt.c (type_unification): If not passing to a reference, strip ! cv-quals. Also handle array->pointer conversion. Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (grokdeclarator): Don't warn about applying const to a ! const typedef or template type parameter. Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (shadow_tag): Remove obsolete code for pushing tags and ! dealing with exceptions. ! Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com) ! * init.c (resolve_offset_ref): Fix types used in resolving .* ! expressions. ! Thu Sep 29 16:15:36 1994 Michael I Bushnell ! * g++.c: Rework last change so it's done like collect.c (and ! gcc.c). ! Wed Sep 28 19:19:01 1994 Brendan Kehoe (brendan@mole.gnu.ai.mit.edu) ! * except.c (register_exception_table): Use Pmode, not PTRmode. ! Wed Sep 14 10:17:27 1994 Michael I Bushnell ! * g++.c: Include in case `errno' is a macro ! as permitted by ANSI C. Thu Sep 29 16:58:52 1994 Mike Stump --- 2938,3107 ---- don't offset from a parent of the DECL_CONTEXT of the function. + Tue Oct 11 16:10:52 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * pt.c (do_function_instantiation): Set DECL_EXTERNAL and + TREE_STATIC when setting DECL_INTERFACE_KNOWN. + (do_type_instantiation): Ditto. + + * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN, + DECL_EXTERNAL and TREE_STATIC as appropriate. + + * decl2.c (finish_file): Also synthesize methods that don't have + DECL_EXTERNAL set. Set interface_unknown before doing so. + + * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the + function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL. + Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * lex.c (cons_up_default_function): Mark methods in a template class ! as template instances. Store the values of interface_unknown and ! interface_only for do_pending_inlines. ! (do_pending_inlines): Use them. ! ! * decl2.c (finish_file): If we haven't seen a definition of a ! function declared static, make the decl non-PUBLIC so compile_file ! can give an error. Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * method.c (do_build_copy_constructor): Handle anonymous unions. ! (do_build_assign_ref): Ditto. ! (largest_union_member): Move from lex.c. ! ! Sat Oct 8 14:59:43 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! Re-implement g++'s vague linkage independent of TREE_PUBLIC. ! * pt.c (instantiate_member_templates): Lose redundant ! -fexternal-templates handling. ! (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set ! TREE_STATIC or DECL_INTERFACE_KNOWN. ! (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead ! of DECL_EXTERNAL for explicit instantiations. ! (do_function_instantiation): Do the new thing. ! (do_type_instantiation): Ditto. ! (instantiate_template): Deal with member templates defined in a .cc ! file with -fexternal-templates. ! * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to ! decide whether to stick builtin_throw here. ! * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN ! rather than TREE_PUBLIC. Generally fix rules. ! (finish_file): Use DECL_INITIAL to determine whether or not a method ! has been synthesized, rather than TREE_ASM_WRITTEN. ! * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of ! TREE_PUBLIC. ! (pushdecl): Ditto. ! (duplicate_decls): Ditto. Deal with DECL_DECLARED_STATIC and ! DECL_INTERFACE_KNOWN. ! (redeclaration_error_message): Fix checking for conflicting linkage. ! (define_function): Set DECL_INTERFACE_KNOWN. ! (grokfndecl): Function decls are PUBLIC until we are sure about ! their linkage. Set DECL_DECLARED_STATIC as needed. ! (start_function): Deal with linkage. Move pushdecl after linkage ! magic. ! (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines. ! * cp-tree.h (lang_decl_flags): Add interface_known and ! declared_static. ! (DECL_INTERFACE_KNOWN): New macro. ! (DECL_DECLARED_STATIC): New macro. ! (DECL_PUBLIC): New macro. ! ! Clean up bogus use of TREE_PUBLIC. ! * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it ! doesn't correspond to TREE_PROTECTED and TREE_PRIVATE). ! * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC. Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * call.c (build_overload_call_real): Don't immediately do ! array->pointer conversion. ! * pt.c (type_unification): If not passing to a reference, strip ! cv-quals. Also handle array->pointer conversion. Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (grokdeclarator): Don't warn about applying const to a ! const typedef or template type parameter. ! ! * decl2.c (finish_file): Also synthesize methods after walking the ! vtables. Ugly ugly ugly. Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * various: Remove lingering remnants of old exception handling code. ! * decl2.c (finish_file): Synthesize methods before walking the ! vtables, so that the vtables get emitted as needed. ! * decl.c (shadow_tag): Remove obsolete code for pushing tags and ! dealing with exceptions. ! Mon Oct 3 13:05:27 1994 Ian Lance Taylor ! * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS). ! Mon Oct 3 02:59:28 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl2.c (finish_file): Fix inline handling. ! Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! * decl.c (grokdeclarator): Handle redundant scope even better. ! ({push,pop}_cp_function_context): Take toplev parameter. ! ! * method.c (synthesize_method): Pass toplev parameter to ! {push,pop}_cp_function_context depending on decl_function_context ! (fndecl). ! ! * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the ! built-in version. ! ! * method.c (synthesize_method): Don't be confused by __in_chrg ! parameter. ! ! * class.c (popclass): Set C_C_D like start_function does. ! ! * decl.c (grokdeclarator): Handle redundant scope better. ! ! * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule. ! (direct_notype_declarator): Ditto. ! (complex_direct_notype_declarator): Remove it here. ! ! Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com) ! ! * init.c (resolve_offset_ref): Fix types used in resolving .* ! expressions. ! ! Sat Oct 1 15:18:49 1994 Jason Merrill (jason@phydeaux.cygnus.com) ! ! Beginnings of work to synthesize methods only when needed. ! * call.c (build_method_call): Synthesize methods as necessary ! (currently never necessary). ! * class.c (popclass): Don't try to set C_C_D here, as it'll end up ! on the wrong obstack. ! * decl.c (push_cp_function_context): Mostly copied from ! push_c_function_context. ! (pop_cp_function_context): Similarly. ! (finish_function): Reverse order of poplevel and pop_nested_class so ! that current_class_decl is restored properly. ! (start_function): Ditto. ! (finish_function): Add parameter 'nested'. Don't call ! permanent_allocation if (nested). ! * various: Pass extra parameter to finish_function. ! * decl2.c (finish_file): Reorganize end-of-file inline handling, ! synthesizing methods as necessary. ! * lex.c (cons_up_default_function): Call mark_inline_for_output. ! Only synthesize methods immediately if #pragma implementation ! (currently disabled). ! (do_pending_inlines): Call synthesize_method. ! * method.c (synthesize_method): New function; all method synthesis ! goes through here. Calls do_build_assign_ref and ! do_build_copy_constructor. ! (build_default_constructor): Remove. ! (build_dtor): Ditto. ! (build_assign_ref): Rename to do_build_assign_ref and remove stuff ! done by synthesize_method. ! (build_copy_constructor): Similarly. Thu Sep 29 16:58:52 1994 Mike Stump *************** *** 198,202 **** question has a type of error_mark_node. ! Wed Sep 28 21:45:00 1994 Mike Stump (mrs@cygnus.com) * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure --- 3118,3122 ---- question has a type of error_mark_node. ! Wed Sep 28 21:45:00 1994 Mike Stump * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure *************** *** 310,319 **** * pt.c (do_type_instantiation): Don't try to instantiate nested ! enums. Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com) * cvt.c (build_up_reference): Handle preincrement and predecrement ! properly. Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com) --- 3230,3239 ---- * pt.c (do_type_instantiation): Don't try to instantiate nested ! enums. Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com) * cvt.c (build_up_reference): Handle preincrement and predecrement ! properly. Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com) *************** *** 475,479 **** * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE. ! Tue Aug 23 09:28:35 1994 Mike Stump (mrs@cygnus.com) * error.c (dump_decl): Improve wording, so that error messages --- 3395,3399 ---- * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE. ! Tue Aug 23 09:28:35 1994 Mike Stump * error.c (dump_decl): Improve wording, so that error messages *************** *** 494,498 **** CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time. * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and ! CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time. * parse.y (left_curly): New final resting place for setting CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures. --- 3414,3418 ---- CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time. * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and ! CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time. * parse.y (left_curly): New final resting place for setting CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures. *************** *** 510,523 **** * method.c (build_overload_identifier): ditto. ! Thu Aug 18 16:24:43 1994 Mike Stump (mrs@cygnus.com) * error.c (dump_decl): Handle NULL args. ! Thu Aug 18 12:48:09 1994 Mike Stump (mrs@cygnus.com) * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time. * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and ! CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time. * parse.y (left_curly): New final resting place for setting CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING. --- 3430,3453 ---- * method.c (build_overload_identifier): ditto. ! Thu Aug 18 16:24:43 1994 Mike Stump * error.c (dump_decl): Handle NULL args. ! Thu Sep 29 16:15:36 1994 Michael I Bushnell ! ! * g++.c: Rework last change so it's done like collect.c (and ! gcc.c). ! ! Wed Sep 14 10:17:27 1994 Michael I Bushnell ! ! * g++.c: Include in case `errno' is a macro ! as permitted by ANSI C. ! ! Thu Aug 18 12:48:09 1994 Mike Stump * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time. * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and ! CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time. * parse.y (left_curly): New final resting place for setting CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING. *************** *** 722,726 **** mark for later consideration, rather than DECL_FUNCTION_MEMBER_P. ! Fri Aug 5 01:12:20 1994 Mike Stump (mrs@cygnus.com) * class.c (get_class_offset_1, get_class_offset): New routine to --- 3652,3656 ---- mark for later consideration, rather than DECL_FUNCTION_MEMBER_P. ! Fri Aug 5 01:12:20 1994 Mike Stump * class.c (get_class_offset_1, get_class_offset): New routine to *************** *** 868,872 **** reference. ! Fri Jul 8 17:41:46 1994 Mike Stump (mrs@cygnus.com) * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside --- 3798,3802 ---- reference. ! Fri Jul 8 17:41:46 1994 Mike Stump * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside *************** *** 879,883 **** * typeck.c (build_binary_op_nodefault): Don't mess with division by ! zero. Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu) --- 3809,3813 ---- * typeck.c (build_binary_op_nodefault): Don't mess with division by ! zero. Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu) *************** *** 924,928 **** import_export_vtable. ! Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com) * except.c (init_exception_processing): Setup interim_eh_hook to --- 3854,3858 ---- import_export_vtable. ! Wed Jul 6 20:25:48 1994 Mike Stump * except.c (init_exception_processing): Setup interim_eh_hook to *************** *** 1021,1025 **** in a signature, don't complain about it begin static. ! Wed Jun 29 16:44:45 1994 Mike Stump (mrs@cygnus.com) Fixes a problem of the this pointer being wrong in virtual calls to --- 3951,3955 ---- in a signature, don't complain about it begin static. ! Wed Jun 29 16:44:45 1994 Mike Stump Fixes a problem of the this pointer being wrong in virtual calls to *************** *** 1154,1158 **** specially. ! Wed Jun 15 19:05:25 1994 Mike Stump (mrs@cygnus.com) * class.c (override_one_vtable): Don't forget to merge in an old --- 4084,4088 ---- specially. ! Wed Jun 15 19:05:25 1994 Mike Stump * class.c (override_one_vtable): Don't forget to merge in an old *************** *** 1237,1241 **** flag_keep_inline_functions. ! Wed Jun 8 20:48:02 1994 Mike Stump (mrs@cygnus.com) * tree.c (layout_vbasetypes): Align virtual base classes inside --- 4167,4171 ---- flag_keep_inline_functions. ! Wed Jun 8 20:48:02 1994 Mike Stump * tree.c (layout_vbasetypes): Align virtual base classes inside *************** *** 1323,1327 **** checking its TREE_CODE. ! Wed Jun 1 17:40:39 1994 Mike Stump (mrs@cygnus.com) * class.c (get_derived_offset): New routine. --- 4253,4257 ---- checking its TREE_CODE. ! Wed Jun 1 17:40:39 1994 Mike Stump * class.c (get_derived_offset): New routine. *************** *** 1345,1349 **** try to use it in an error. ! Wed Jun 1 09:48:49 1994 Mike Stump (mrs@cygnus.com) * typeck.c (convert_arguments, convert_for_initialization): Don't --- 4275,4279 ---- try to use it in an error. ! Wed Jun 1 09:48:49 1994 Mike Stump * typeck.c (convert_arguments, convert_for_initialization): Don't *************** *** 1441,1445 **** an error. ! Fri May 27 13:50:15 1994 Mike Stump (mrs@cygnus.com) * class.c (override_one_vtable): Don't modify things we don't own. --- 4371,4375 ---- an error. ! Fri May 27 13:50:15 1994 Mike Stump * class.c (override_one_vtable): Don't modify things we don't own. *************** *** 1710,1714 **** has a conversion to enum or bool, too. ! Fri May 13 16:31:27 1994 Mike Stump (mrs@cygnus.com) * method.c (emit_thunk): Make declaration for --- 4640,4644 ---- has a conversion to enum or bool, too. ! Fri May 13 16:31:27 1994 Mike Stump * method.c (emit_thunk): Make declaration for *************** *** 1720,1724 **** (tsubst): Ditto. ! Fri May 13 16:23:32 1994 Mike Stump (mrs@cygnus.com) * pt.c (tsubst): If there is already a function for this expansion, --- 4650,4654 ---- (tsubst): Ditto. ! Fri May 13 16:23:32 1994 Mike Stump * pt.c (tsubst): If there is already a function for this expansion, *************** *** 1735,1739 **** build_const_cast): Add declarations. ! Fri May 13 09:50:31 1994 Mike Stump (mrs@cygnus.com) * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27 --- 4665,4669 ---- build_const_cast): Add declarations. ! Fri May 13 09:50:31 1994 Mike Stump * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27 *************** *** 1756,1760 **** (type_promotes_to): bool promotes to int. ! Fri May 13 01:43:18 1994 Mike Stump (mrs@cygnus.com) Implement the new builtin `bool' type. --- 4686,4690 ---- (type_promotes_to): bool promotes to int. ! Fri May 13 01:43:18 1994 Mike Stump Implement the new builtin `bool' type. *************** *** 1778,1782 **** * g++.c: Use #ifdef for __MSDOS__, not #if. ! Thu May 12 18:05:18 1994 Mike Stump (mrs@cygnus.com) * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps --- 4708,4712 ---- * g++.c: Use #ifdef for __MSDOS__, not #if. ! Thu May 12 18:05:18 1994 Mike Stump * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps *************** *** 1849,1853 **** member before trying to do an initialization for it. ! Tue May 10 11:34:37 1994 Mike Stump (mrs@cygnus.com) * except.c: Don't do anything useful when cross compiling. --- 4779,4783 ---- member before trying to do an initialization for it. ! Tue May 10 11:34:37 1994 Mike Stump * except.c: Don't do anything useful when cross compiling. *************** *** 1886,1890 **** dealing with a temporary binding level. ! Sat May 7 10:52:28 1994 Mike Stump (mrs@cygnus.com) * decl.c (finish_decl): Make sure we run cleanups for initial values --- 4816,4820 ---- dealing with a temporary binding level. ! Sat May 7 10:52:28 1994 Mike Stump * decl.c (finish_decl): Make sure we run cleanups for initial values *************** *** 1958,1962 **** zero out the old RTL. ! Fri May 6 01:25:38 1994 Mike Stump (mrs@cygnus.com) Add alpha exception handling support to the compiler. --- 4888,4892 ---- zero out the old RTL. ! Fri May 6 01:25:38 1994 Mike Stump Add alpha exception handling support to the compiler. *************** *** 2217,2221 **** interpretation. ! Thu Apr 28 15:19:46 1994 Mike Stump (mrs@cygnus.com) * cp-tree.h: disable use of backend EH. --- 5147,5151 ---- interpretation. ! Thu Apr 28 15:19:46 1994 Mike Stump * cp-tree.h: disable use of backend EH. *************** *** 2246,2250 **** shortcut if we're dealing with an overloaded operator. ! Wed Apr 27 17:35:37 1994 Mike Stump (mrs@cygnus.com) * search.c (get_base_distance): Search the virtual base class --- 5176,5180 ---- shortcut if we're dealing with an overloaded operator. ! Wed Apr 27 17:35:37 1994 Mike Stump * search.c (get_base_distance): Search the virtual base class *************** *** 2261,2265 **** * typeck.c (build_unary_op): References are too lvalues. ! Wed Apr 27 13:58:05 1994 Mike Stump (mrs@cygnus.com) * class.c (override_one_vtable): We have to prepare_fresh_vtable --- 5191,5195 ---- * typeck.c (build_unary_op): References are too lvalues. ! Wed Apr 27 13:58:05 1994 Mike Stump * class.c (override_one_vtable): We have to prepare_fresh_vtable *************** *** 2303,2307 **** references to pointers in function parms. Use type_promotes_to. ! Tue Apr 26 23:44:36 1994 Mike Stump (mrs@cygnus.com) Finish off Apr 19th work. --- 5233,5237 ---- references to pointers in function parms. Use type_promotes_to. ! Tue Apr 26 23:44:36 1994 Mike Stump Finish off Apr 19th work. *************** *** 2506,2514 **** See parent makefile. - Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com) - - * Language directory reorganization. - See parent makefile. - Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com) --- 5436,5439 ---- *************** *** 2546,2550 **** (do_pending_inlines): Ditto. ! Tue Apr 19 22:25:41 1994 Mike Stump (mrs@cygnus.com) Reimplement vtable building, and most vtable pointer setting. --- 5471,5475 ---- (do_pending_inlines): Ditto. ! Tue Apr 19 22:25:41 1994 Mike Stump Reimplement vtable building, and most vtable pointer setting. *************** *** 2966,2970 **** got_scope and looking_at_typename; otherwise don't. ! Thu Apr 7 22:05:47 1994 Mike Stump (mrs@cygnus.com) 31th Cygnus<->FSF merge. --- 5891,5895 ---- got_scope and looking_at_typename; otherwise don't. ! Thu Apr 7 22:05:47 1994 Mike Stump 31th Cygnus<->FSF merge. *************** *** 2983,2987 **** * typeck.c (compparms): Also allow t1 to be ... if strict == 0. ! Thu Apr 7 16:17:50 1994 Mike Stump (mrs@cygnus.com) * class.c (build_vtable_entry): Fix breakage introduced Apr 5 --- 5908,5912 ---- * typeck.c (compparms): Also allow t1 to be ... if strict == 0. ! Thu Apr 7 16:17:50 1994 Mike Stump * class.c (build_vtable_entry): Fix breakage introduced Apr 5 *************** *** 3064,3068 **** compatibility, but should become the default in a future release.) ! Wed Apr 6 10:53:56 1994 Mike Stump (mrs@cygnus.com) * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT --- 5989,5993 ---- compatibility, but should become the default in a future release.) ! Wed Apr 6 10:53:56 1994 Mike Stump * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT *************** *** 3129,3133 **** and __builtin_frame_address for C++ as well. ! Thu Mar 31 12:35:49 1994 Mike Stump (mrs@cygnus.com) * typeck2.c (store_init_value): Integral constant variables are --- 6054,6058 ---- and __builtin_frame_address for C++ as well. ! Thu Mar 31 12:35:49 1994 Mike Stump * typeck2.c (store_init_value): Integral constant variables are *************** *** 3139,3143 **** comptypes. ! Wed Mar 30 21:29:25 1994 Mike Stump (mrs@cygnus.com) Cures incorrect errors about pure virtuals in a class, when they --- 6064,6068 ---- comptypes. ! Wed Mar 30 21:29:25 1994 Mike Stump Cures incorrect errors about pure virtuals in a class, when they *************** *** 3175,3179 **** a function is a member. ! Wed Mar 30 14:20:50 1994 Mike Stump (mrs@cygnus.com) Cures calling a more base base class function, when a more derived --- 6100,6104 ---- a function is a member. ! Wed Mar 30 14:20:50 1994 Mike Stump Cures calling a more base base class function, when a more derived *************** *** 3303,3307 **** `this'. ! Thu Mar 24 16:21:52 1994 Mike Stump (mrs@cygnus.com) * init.c (build_new, build_vec_delete): Use global new and delete --- 6228,6232 ---- `this'. ! Thu Mar 24 16:21:52 1994 Mike Stump * init.c (build_new, build_vec_delete): Use global new and delete *************** *** 3322,3330 **** * init.c (build_new): Handle array typedefs properly. ! Wed Mar 23 18:23:33 1994 Mike Stump (mrs@cygnus.com) 30th Cygnus<->FSF merge. ! Wed Mar 23 00:46:24 1994 Mike Stump (mrs@cygnus.com) * class.c (modify_vtable_entries): Avoid running off the end of the --- 6247,6255 ---- * init.c (build_new): Handle array typedefs properly. ! Wed Mar 23 18:23:33 1994 Mike Stump 30th Cygnus<->FSF merge. ! Wed Mar 23 00:46:24 1994 Mike Stump * class.c (modify_vtable_entries): Avoid running off the end of the *************** *** 3342,3346 **** converting function pointer to void *. ! Tue Mar 22 22:23:19 1994 Mike Stump (mrs@cygnus.com) Major revamp of pointer to member functions. Cures major --- 6267,6271 ---- converting function pointer to void *. ! Tue Mar 22 22:23:19 1994 Mike Stump Major revamp of pointer to member functions. Cures major *************** *** 3363,3367 **** get vtable pointer out of right subobject. ! Tue Mar 22 17:56:48 1994 Mike Stump (mrs@cygnus.com) * search.c (get_binfo): Return NULL instead of aborting, when --- 6288,6292 ---- get vtable pointer out of right subobject. ! Tue Mar 22 17:56:48 1994 Mike Stump * search.c (get_binfo): Return NULL instead of aborting, when *************** *** 3500,3504 **** code like `int (*a);'. See the difference? ! Thu Mar 17 12:16:10 1994 Mike Stump (mrs@cygnus.com) These changes break binary compatibility in code with classes --- 6425,6429 ---- code like `int (*a);'. See the difference? ! Thu Mar 17 12:16:10 1994 Mike Stump These changes break binary compatibility in code with classes *************** *** 3527,3531 **** all of the scoped PTYPENAME rules. ! Wed Mar 16 16:39:02 1994 Mike Stump (mrs@cygnus.com) * init.c (build_offset_ref): The value of A::typedef_name is --- 6452,6456 ---- all of the scoped PTYPENAME rules. ! Wed Mar 16 16:39:02 1994 Mike Stump * init.c (build_offset_ref): The value of A::typedef_name is *************** *** 3551,3555 **** OFFSET_REFs). ! Mon Mar 14 16:24:36 1994 Mike Stump (mrs@cygnus.com) * init.c (build_new): Set the return type of multidimensional --- 6476,6480 ---- OFFSET_REFs). ! Mon Mar 14 16:24:36 1994 Mike Stump * init.c (build_new): Set the return type of multidimensional *************** *** 3611,3615 **** with `fcast_or_absdcl type_quals' rule. ! Fri Mar 4 16:18:03 1994 Mike Stump (mrs@cygnus.com) * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it --- 6536,6540 ---- with `fcast_or_absdcl type_quals' rule. ! Fri Mar 4 16:18:03 1994 Mike Stump * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it *************** *** 3621,3625 **** pmfs. ! Fri Mar 4 13:24:33 1994 Mike Stump (mrs@cygnus.com) * typeck.c (convert_arguments): Handle setHandler(A::handlerFn) --- 6546,6550 ---- pmfs. ! Fri Mar 4 13:24:33 1994 Mike Stump * typeck.c (convert_arguments): Handle setHandler(A::handlerFn) *************** *** 3651,3655 **** REFERENCE_TYPE. ! Fri Mar 4 04:46:05 1994 Mike Stump (mrs@cygnus.com) * call.c (build_method_call): Handle b->setHandler(A::handlerFn) --- 6576,6580 ---- REFERENCE_TYPE. ! Fri Mar 4 04:46:05 1994 Mike Stump * call.c (build_method_call): Handle b->setHandler(A::handlerFn) *************** *** 3753,3757 **** * decl.c (start_function): Fix detection of function overloading. ! Thu Feb 24 22:26:19 1994 Mike Stump (mrs@cygnus.com) * lex.c (check_newline): #pragma interface can take a string --- 6678,6682 ---- * decl.c (start_function): Fix detection of function overloading. ! Thu Feb 24 22:26:19 1994 Mike Stump * lex.c (check_newline): #pragma interface can take a string *************** *** 3813,3817 **** options are. ! Mon Feb 21 19:59:40 1994 Mike Stump (mrs@cygnus.com) * Makefile.in (mostlyclean): lex.c is a source file, don't --- 6738,6742 ---- options are. ! Mon Feb 21 19:59:40 1994 Mike Stump * Makefile.in (mostlyclean): lex.c is a source file, don't *************** *** 3974,3978 **** store_init_value succeeds, call expand_decl_init. ! Fri Feb 11 02:49:23 1994 Mike Stump (mrs@cygnus.com) * class.c (build_vbase_path): Use complete_type_p instead of --- 6899,6903 ---- store_init_value succeeds, call expand_decl_init. ! Fri Feb 11 02:49:23 1994 Mike Stump * class.c (build_vbase_path): Use complete_type_p instead of *************** *** 3981,3985 **** virtual base class is one place, when it is in fact someplace else. ! Fri Feb 11 00:26:46 1994 Mike Stump (mrs@cygnus.com) * init.c (resolve_offset_ref): Make sure we first convert to --- 6906,6910 ---- virtual base class is one place, when it is in fact someplace else. ! Fri Feb 11 00:26:46 1994 Mike Stump * init.c (resolve_offset_ref): Make sure we first convert to *************** *** 3988,3992 **** `multiple'' when it is infact, a base type. ! Thu Feb 10 21:49:35 1994 Mike Stump (mrs@cygnus.com) * class.c (modify_other_vtable_entries): Use get_binfo, instead --- 6913,6917 ---- `multiple'' when it is infact, a base type. ! Thu Feb 10 21:49:35 1994 Mike Stump * class.c (modify_other_vtable_entries): Use get_binfo, instead *************** *** 3996,4000 **** base class. ! Thu Feb 10 17:19:32 1994 Mike Stump (mrs@cygnus.com) * class.c (build_vbase_path): Don't complain about ambiguous --- 6921,6925 ---- base class. ! Thu Feb 10 17:19:32 1994 Mike Stump * class.c (build_vbase_path): Don't complain about ambiguous *************** *** 4012,4016 **** * decl.c (grokdeclarator): Fix detection of virtual new/delete. ! Wed Feb 9 22:02:32 1994 Mike Stump (mrs@cygnus.com) * search.c (build_mi_virtuals, add_mi_virtuals, --- 6937,6941 ---- * decl.c (grokdeclarator): Fix detection of virtual new/delete. ! Wed Feb 9 22:02:32 1994 Mike Stump * search.c (build_mi_virtuals, add_mi_virtuals, *************** *** 4196,4200 **** * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0. ! Fri Feb 4 13:02:56 1994 Mike Stump (mrs@cygnus.com) * lex.c (reinit_parse_for_method, cons_up_default_function): --- 7121,7125 ---- * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0. ! Fri Feb 4 13:02:56 1994 Mike Stump * lex.c (reinit_parse_for_method, cons_up_default_function): *************** *** 4350,4354 **** (build_x_conditional_expr): Ditto. ! Mon Jan 31 10:00:30 1994 Mike Stump (mrs@cygnus.com) * cvt.c (build_type_conversion_1): Change call to pedwarn into --- 7275,7279 ---- (build_x_conditional_expr): Ditto. ! Mon Jan 31 10:00:30 1994 Mike Stump * cvt.c (build_type_conversion_1): Change call to pedwarn into *************** *** 4384,4388 **** expect. ! Thu Jan 27 17:37:25 1994 Mike Stump (mrs@cygnus.com) * call.c (build_overload_call_real): Change argument complain to --- 7309,7313 ---- expect. ! Thu Jan 27 17:37:25 1994 Mike Stump * call.c (build_overload_call_real): Change argument complain to *************** *** 4445,4454 **** Why are the friendship functions in init.c, anyway? ! Wed Jan 26 17:50:00 1994 Mike Stump (mrs@cygnus.com) * cvt.c (build_type_conversion_1): Don't conditionalize call to pedwarn upon pedantic. ! Wed Jan 26 17:20:46 1994 Mike Stump (mrs@cygnus.com) * cvt.c (convert_to_reference): Add 8.4.3 checking so that one --- 7370,7379 ---- Why are the friendship functions in init.c, anyway? ! Wed Jan 26 17:50:00 1994 Mike Stump * cvt.c (build_type_conversion_1): Don't conditionalize call to pedwarn upon pedantic. ! Wed Jan 26 17:20:46 1994 Mike Stump * cvt.c (convert_to_reference): Add 8.4.3 checking so that one *************** *** 4458,4462 **** numbers in warnings. ! Wed Jan 26 14:35:06 1994 Mike Stump (mrs@cygnus.com) * init.c (build_delete): Follow style in call.c to construct the --- 7383,7387 ---- numbers in warnings. ! Wed Jan 26 14:35:06 1994 Mike Stump * init.c (build_delete): Follow style in call.c to construct the *************** *** 4475,4479 **** * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR. ! Tue Jan 25 13:54:29 1994 Mike Stump (mrs@cygnus.com) * init.c (build_delete): Back out Jan 17th & 18th pacthes, as --- 7400,7404 ---- * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR. ! Tue Jan 25 13:54:29 1994 Mike Stump * init.c (build_delete): Back out Jan 17th & 18th pacthes, as *************** *** 4594,4598 **** * Makefile.in (TAGS): Don't try to run etags on cp-parse.y. ! Sat Jan 15 18:34:33 1994 Mike Stump (mrs@cygnus.com) * Makefile.in, configure: Handle the C++ front-end in a --- 7519,7523 ---- * Makefile.in (TAGS): Don't try to run etags on cp-parse.y. ! Sat Jan 15 18:34:33 1994 Mike Stump * Makefile.in, configure: Handle the C++ front-end in a *************** *** 4635,4639 **** * cp-lex.c (yyprint): handle SCOPED_NAME. ! Fri Jan 14 17:00:29 1994 Mike Stump (mrs@cygnus.com) * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is --- 7560,7564 ---- * cp-lex.c (yyprint): handle SCOPED_NAME. ! Fri Jan 14 17:00:29 1994 Mike Stump * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is *************** *** 4645,4649 **** have type_flags. ! Thu Jan 13 11:39:34 1994 Mike Stump (mrs@cygnus.com) Ensure that all vtable pointers are initialized with all the right --- 7570,7574 ---- have type_flags. ! Thu Jan 13 11:39:34 1994 Mike Stump Ensure that all vtable pointers are initialized with all the right *************** *** 4695,4699 **** set TYPE_HAS_ASSIGNMENT. ! Mon Jan 10 18:48:06 1994 Mike Stump (mrs@cygnus.com) * cp-cvt.c (convert): Make {double, clashing enum} -> enum --- 7620,7624 ---- set TYPE_HAS_ASSIGNMENT. ! Mon Jan 10 18:48:06 1994 Mike Stump * cp-cvt.c (convert): Make {double, clashing enum} -> enum *************** *** 4754,4763 **** C++ language options. Added explanation for this option. ! Tue Dec 28 21:10:03 1993 Mike Stump (mrs@cygnus.com) * cp-init.c (expand_vec_init): Remove comptypes test, as it is too harsh here. ! Tue Dec 28 13:42:22 1993 Mike Stump (mrs@cygnus.com) * cp-pt.c (do_pending_expansions): Decide to expand a template --- 7679,7688 ---- C++ language options. Added explanation for this option. ! Tue Dec 28 21:10:03 1993 Mike Stump * cp-init.c (expand_vec_init): Remove comptypes test, as it is too harsh here. ! Tue Dec 28 13:42:22 1993 Mike Stump * cp-pt.c (do_pending_expansions): Decide to expand a template *************** *** 4765,4769 **** the first place it was declared. ! Tue Dec 28 05:42:31 1993 Mike Stump (mrs@cygnus.com) * cp-class.c (is_normal): New routine, use to determine when the --- 7690,7694 ---- the first place it was declared. ! Tue Dec 28 05:42:31 1993 Mike Stump * cp-class.c (is_normal): New routine, use to determine when the *************** *** 4899,4903 **** to see if something is a method. ! Wed Dec 15 18:35:58 1993 Mike Stump (mrs@cygnus.com) * cp-typeck.c (build_modify_expr): Avoid error messages on small --- 7824,7828 ---- to see if something is a method. ! Wed Dec 15 18:35:58 1993 Mike Stump * cp-typeck.c (build_modify_expr): Avoid error messages on small *************** *** 4948,4952 **** are compatible. ! Thu Dec 9 18:27:22 1993 Mike Stump (mrs@cygnus.com) * cp-decl.c (flag_huge_objects): New flag to allow large objects. --- 7873,7877 ---- are compatible. ! Thu Dec 9 18:27:22 1993 Mike Stump * cp-decl.c (flag_huge_objects): New flag to allow large objects. *************** *** 4966,4970 **** (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL. ! Wed Dec 8 17:38:06 1993 Mike Stump (mrs@cygnus.com) * cp-decl.c (finish_decl): Make sure things that can go into --- 7891,7895 ---- (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL. ! Wed Dec 8 17:38:06 1993 Mike Stump * cp-decl.c (finish_decl): Make sure things that can go into *************** *** 5254,5258 **** to cons_up_default_function for operator=. ! Tue Nov 23 20:24:58 1993 Mike Stump (mrs@cygnus.com) * cp-cvt.c (convert_force): Add code to perform casting of pointer --- 8179,8183 ---- to cons_up_default_function for operator=. ! Tue Nov 23 20:24:58 1993 Mike Stump * cp-cvt.c (convert_force): Add code to perform casting of pointer *************** *** 5273,5277 **** (xref_tag): Propagate TYPE_GETS_ASSIGN_REF. ! Tue Nov 23 12:26:13 1993 Mike Stump (mrs@cygnus.com) * cp-method.c (build_opfncall): Don't count pointer to member --- 8198,8202 ---- (xref_tag): Propagate TYPE_GETS_ASSIGN_REF. ! Tue Nov 23 12:26:13 1993 Mike Stump * cp-method.c (build_opfncall): Don't count pointer to member diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/Make-lang.in gcc-2.7.0/cp/Make-lang.in *** gcc-2.6.3/cp/Make-lang.in Fri Jun 3 17:34:33 1994 --- gcc-2.7.0/cp/Make-lang.in Fri Jun 16 15:09:57 1995 *************** *** 1,4 **** # Top level makefile fragment for GNU C++. ! # Copyright (C) 1994 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,4 ---- # Top level makefile fragment for GNU C++. ! # Copyright (C) 1994, 1995 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 16,20 **** #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 provides the language dependent support in the main Makefile. --- 16,21 ---- #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, 59 Temple Place - Suite 330, ! #Boston, MA 02111-1307, USA. # This file provides the language dependent support in the main Makefile. *************** *** 25,30 **** # foo.install-normal, foo.install-common, foo.install-info, foo.install-man, # foo.uninstall, foo.distdir, ! # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean, foo.realclean, ! # foo.stage1, foo.stage2, foo.stage3, foo.stage4 # # where `foo' is the name of the language. --- 26,31 ---- # foo.install-normal, foo.install-common, foo.install-info, foo.install-man, # foo.uninstall, foo.distdir, ! # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean, ! # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 # # where `foo' is the name of the language. *************** *** 43,53 **** # Actual names to use when installing a native compiler. ! CXX_INSTALL_NAME = c++ ! GXX_INSTALL_NAME = g++ # Actual names to use when installing a cross-compiler. ! CXX_CROSS_NAME = $(target)-c++ ! GXX_CROSS_NAME = $(target)-g++ # Define the names for selecting c++ in LANGUAGES. --- 44,56 ---- # Actual names to use when installing a native compiler. ! CXX_INSTALL_NAME = `t='$(program_transform_name)'; echo c++ | sed $$t` ! GXX_INSTALL_NAME = `t='$(program_transform_name)'; echo g++ | sed $$t` # Actual names to use when installing a cross-compiler. ! CXX_CROSS_NAME = `t='$(program_transform_cross_name)'; echo c++ | sed $$t` ! GXX_CROSS_NAME = `t='$(program_transform_cross_name)'; echo g++ | sed $$t` + # The name to use for the demangler program. + DEMANGLER_PROG = c++filt # Define the names for selecting c++ in LANGUAGES. *************** *** 57,69 **** C++ c++: cc1plus # Create the compiler driver for g++. g++: $(srcdir)/cp/g++.c $(CONFIG_H) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++ $(srcdir)/cp/g++.c $(LIBS) # Create a version of the g++ driver which calls the cross-compiler. ! g++-cross: $(srcdir)/cp/g++.c ! $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \ -DGCC_NAME=\"$(GCC_CROSS_NAME)\" $(srcdir)/cp/g++.c version.o $(LIBS) CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \ $(srcdir)/cp/except.c $(srcdir)/cp/input.c $(srcdir)/cp/pt.c \ --- 60,87 ---- C++ c++: cc1plus + # Tell GNU make to ignore these if they exist. + .PHONY: C++ c++ + # Create the compiler driver for g++. g++: $(srcdir)/cp/g++.c $(CONFIG_H) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $(srcdir)/cp/g++.c $(LIBS) # Create a version of the g++ driver which calls the cross-compiler. ! g++-cross: $(srcdir)/cp/g++.c version.o $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ \ -DGCC_NAME=\"$(GCC_CROSS_NAME)\" $(srcdir)/cp/g++.c version.o $(LIBS) + cxxmain.o: cplus-dem.c demangle.h + rm -f cxxmain.c + ln -s $(srcdir)/cplus-dem.c cxxmain.c > /dev/null 2>&1 \ + || cp $(srcdir)/cplus-dem.c cxxmain.c + $(CC) -c -DMAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + -DVERSION=\"$(version)\" cxxmain.c + rm -f cxxmain.c + + $(DEMANGLER_PROG): cxxmain.o underscore.o getopt.o getopt1.o $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(LIBS) -o $@ \ + cxxmain.o underscore.o getopt.o getopt1.o + CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \ $(srcdir)/cp/except.c $(srcdir)/cp/input.c $(srcdir)/cp/pt.c \ *************** *** 74,88 **** $(srcdir)/cp/search.c $(srcdir)/cp/typeck.c $(srcdir)/cp/decl.c \ $(srcdir)/cp/error.c $(srcdir)/cp/init.c $(srcdir)/cp/parse.y \ ! $(srcdir)/cp/sig.c $(srcdir)/cp/typeck2.c ! cc1plus: $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o ! cd cp; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus # Build hooks: ! c++.all.build: g++ ! c++.all.cross: g++-cross c++.start.encap: g++ ! c++.rest.encap: c++.info: --- 92,106 ---- $(srcdir)/cp/search.c $(srcdir)/cp/typeck.c $(srcdir)/cp/decl.c \ $(srcdir)/cp/error.c $(srcdir)/cp/init.c $(srcdir)/cp/parse.y \ ! $(srcdir)/cp/sig.c $(srcdir)/cp/typeck2.c $(srcdir)/cp/repo.c ! cc1plus: $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o c-pragma.o ! cd cp; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext) # Build hooks: ! c++.all.build: g++ $(DEMANGLER_PROG) ! c++.all.cross: g++-cross $(DEMANGLER_PROG) c++.start.encap: g++ ! c++.rest.encap: $(DEMANGLER_PROG) c++.info: *************** *** 98,114 **** # and also as either g++ (if native) or $(tooldir)/bin/g++. c++.install-common: ! -if [ -f cc1plus ] ; then \ ! if [ -f g++-cross ] ; then \ ! rm -f $(bindir)/$(GXX_CROSS_NAME); \ ! $(INSTALL_PROGRAM) g++-cross $(bindir)/$(GXX_CROSS_NAME); \ ! chmod a+x $(bindir)/$(GXX_CROSS_NAME); \ ! rm -f $(bindir)/$(CXX_CROSS_NAME); \ ! ln $(bindir)/$(GXX_CROSS_NAME) $(bindir)/$(CXX_CROSS_NAME); \ else \ ! rm -f $(bindir)/$(GXX_INSTALL_NAME); \ ! $(INSTALL_PROGRAM) g++ $(bindir)/$(GXX_INSTALL_NAME); \ ! chmod a+x $(bindir)/$(GXX_INSTALL_NAME); \ ! rm -f $(bindir)/$(CXX_INSTALL_NAME); \ ! ln $(bindir)/$(GXX_INSTALL_NAME) $(bindir)/$(CXX_INSTALL_NAME); \ fi ; \ fi --- 116,136 ---- # and also as either g++ (if native) or $(tooldir)/bin/g++. c++.install-common: ! -if [ -f cc1plus$(exeext) ] ; then \ ! if [ -f g++-cross$(exeext) ] ; then \ ! rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ! $(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ! chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ! rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ ! ln $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \ ! > /dev/null 2>&1 \ ! || cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \ else \ ! rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ! $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ! chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ! rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ ! ln $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \ ! > /dev/null 2>&1 \ ! || cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \ fi ; \ fi *************** *** 117,131 **** c++.install-man: $(srcdir)/cp/g++.1 ! -if [ -f cc1plus ] ; then \ ! $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(mandir)/g++$(manext) ; \ ! chmod a-x $(mandir)/g++$(manext) ; \ else true; fi c++.uninstall: ! -rm -rf $(bindir)/$(CXX_INSTALL_NAME) ! -rm -rf $(bindir)/$(CXX_CROSS_NAME) ! -rm -rf $(bindir)/$(GXX_INSTALL_NAME) ! -rm -rf $(bindir)/$(GXX_CROSS_NAME) ! -rm -rf $(mandir)/g++$(manext) # Clean hooks: --- 139,161 ---- c++.install-man: $(srcdir)/cp/g++.1 ! -if [ -f cc1plus$(exeext) ] ; then \ ! if [ -f g++-cross$(exeext) ] ; then \ ! rm -f $(mandir)/$(GXX_CROSS_NAME)$(manext); \ ! $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(mandir)/$(GXX_CROSS_NAME)$(manext); \ ! chmod a-x $(mandir)/$(GXX_CROSS_NAME)$(manext); \ ! else \ ! rm -f $(mandir)/$(GXX_INSTALL_NAME)$(manext); \ ! $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(mandir)/$(GXX_INSTALL_NAME)$(manext); \ ! chmod a-x $(mandir)/$(GXX_INSTALL_NAME)$(manext); \ ! fi; \ else true; fi c++.uninstall: ! -rm -rf $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ! -rm -rf $(bindir)/$(CXX_CROSS_NAME)$(exeext) ! -rm -rf $(bindir)/$(GXX_INSTALL_NAME)$(exeext) ! -rm -rf $(bindir)/$(GXX_CROSS_NAME)$(exeext) ! -rm -rf $(mandir)/$(GXX_INSTALL_NAME)$(manext) ! -rm -rf $(mandir)/$(GXX_CROSS_NAME)$(manext) # Clean hooks: *************** *** 134,138 **** c++.mostlyclean: ! -rm -f cp/*.o c++.clean: c++.distclean: --- 164,168 ---- c++.mostlyclean: ! -rm -f cp/*$(objext) $(DEMANGLER_PROG) c++.clean: c++.distclean: *************** *** 140,144 **** -rm -f cp/parse.output c++.extraclean: ! c++.realclean: -rm -f cp/parse.c cp/parse.h --- 170,174 ---- -rm -f cp/parse.output c++.extraclean: ! c++.maintainer-clean: -rm -f cp/parse.c cp/parse.h *************** *** 147,157 **** c++.stage1: ! -mv cp/*.o stage1/cp c++.stage2: ! -mv cp/*.o stage2/cp c++.stage3: ! -mv cp/*.o stage3/cp c++.stage4: ! -mv cp/*.o stage4/cp # Maintenance hooks: --- 177,187 ---- c++.stage1: ! -mv cp/*$(objext) stage1/cp c++.stage2: ! -mv cp/*$(objext) stage2/cp c++.stage3: ! -mv cp/*$(objext) stage3/cp c++.stage4: ! -mv cp/*$(objext) stage4/cp # Maintenance hooks: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/Makefile.in gcc-2.7.0/cp/Makefile.in *** gcc-2.6.3/cp/Makefile.in Thu Nov 3 18:46:03 1994 --- gcc-2.7.0/cp/Makefile.in Thu Jun 15 17:05:59 1995 *************** *** 1,4 **** # Makefile for GNU C++ compiler. ! # Copyright (C) 1987, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,4 ---- # Makefile for GNU C++ compiler. ! # Copyright (C) 1987, 88, 90-4, 1995 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 16,23 **** #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. # The makefile built from this file lives in the language subdirectory. ! # It's purpose is to provide support for: # # 1) recursion where necessary, and only then (building .o's), and --- 16,24 ---- #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, 59 Temple Place - Suite 330, ! #Boston, MA 02111-1307, USA. # The makefile built from this file lives in the language subdirectory. ! # Its purpose is to provide support for: # # 1) recursion where necessary, and only then (building .o's), and *************** *** 160,172 **** CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \ class.o decl2.o error.o gc.o lex.o parse.o ptree.o spew.o typeck.o cvt.o \ ! edsel.o except.o init.o method.o search.o tree.o xref.o # Language-independent object files. ! OBJS = `cat ../stamp-objlist` ../c-common.o ! OBJDEPS = ../stamp-objlist ../c-common.o compiler: ../cc1plus ../cc1plus: $(P) $(CXX_OBJS) $(OBJDEPS) $(LIBDEPS) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o ../cc1plus \ $(CXX_OBJS) $(OBJS) $(LIBS) --- 161,174 ---- CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \ class.o decl2.o error.o gc.o lex.o parse.o ptree.o spew.o typeck.o cvt.o \ ! edsel.o except.o init.o method.o search.o tree.o xref.o repo.o # Language-independent object files. ! OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o ! OBJDEPS = ../stamp-objlist ../c-common.o ../c-pragma.o compiler: ../cc1plus ../cc1plus: $(P) $(CXX_OBJS) $(OBJDEPS) $(LIBDEPS) ! rm -f ../cc1plus$(exeext) ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ $(CXX_OBJS) $(OBJS) $(LIBS) *************** *** 188,200 **** $(srcdir)/../machmode.h $(srcdir)/../machmode.def CXX_TREE_H = $(TREE_H) cp-tree.h tree.def ! parse.o : $(srcdir)/parse.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \ ! `echo $(srcdir)/parse.c | sed 's,^\./,,'` ! $(srcdir)/parse.c $(srcdir)/parse.h : $(srcdir)/parse.y ! @echo expect 1 shift/reduce confict and 34 reduce/reduce conflicts. cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o parse.c parse.y cd $(srcdir); grep '^#define[ ]*YYEMPTY' parse.c >>parse.h # hash.h really depends on $(srcdir)/gxx.gperf. --- 190,215 ---- $(srcdir)/../machmode.h $(srcdir)/../machmode.def CXX_TREE_H = $(TREE_H) cp-tree.h tree.def + PARSE_H = $(srcdir)/parse.h + PARSE_C = $(srcdir)/parse.c ! parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \ ! `echo $(PARSE_C) | sed 's,^\./,,'` ! CONFLICTS = expect 5 shift/reduce confict and 38 reduce/reduce conflicts. ! $(PARSE_H) : $(PARSE_C) ! $(PARSE_C) : $(srcdir)/parse.y ! @echo $(CONFLICTS) cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o parse.c parse.y cd $(srcdir); grep '^#define[ ]*YYEMPTY' parse.c >>parse.h + #$(PARSE_C) $(PARSE_H) : stamp-parse ; @true + #stamp-parse: $(srcdir)/parse.y + # @echo $(CONFLICTS) + # $(BISON) $(BISONFLAGS) -d $(srcdir)/parse.y + # grep '^#define[ ]*YYEMPTY' y.tab.c >>y.tab.h + # $(srcdir)/../move-if-change y.tab.c $(PARSE_C) + # $(srcdir)/../move-if-change y.tab.h $(PARSE_H) + # cp $(PARSE_C) y.tab.c + # touch stamp-parse # hash.h really depends on $(srcdir)/gxx.gperf. *************** *** 207,213 **** spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \ ! $(srcdir)/parse.h $(srcdir)/../flags.h lex.h lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \ ! $(srcdir)/parse.h input.c $(srcdir)/../flags.h hash.h lex.h decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \ lex.h decl.h $(srcdir)/../stack.h --- 222,228 ---- spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \ ! $(PARSE_H) $(srcdir)/../flags.h lex.h lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \ ! $(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h $(srcdir)/../c-pragma.h decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \ lex.h decl.h $(srcdir)/../stack.h *************** *** 230,237 **** edsel.o : edsel.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h $(srcdir)/../flags.h xref.o : xref.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../input.h ! pt.o : pt.c $(CONFIG_H) $(CXX_TREE_H) decl.h $(srcdir)/parse.h error.o : error.c $(CONFIG_H) $(CXX_TREE_H) errfn.o : errfn.c $(CONFIG_H) $(CXX_TREE_H) sig.o : sig.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h # These exist for maintenance purposes. --- 245,253 ---- edsel.o : edsel.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h $(srcdir)/../flags.h xref.o : xref.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../input.h ! pt.o : pt.c $(CONFIG_H) $(CXX_TREE_H) decl.h $(PARSE_H) error.o : error.c $(CONFIG_H) $(CXX_TREE_H) errfn.o : errfn.c $(CONFIG_H) $(CXX_TREE_H) sig.o : sig.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h + repo.o : repo.c $(CONFIG_H) $(CXX_TREE_H) # These exist for maintenance purposes. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/call.c gcc-2.7.0/cp/call.c *** gcc-2.6.3/cp/call.c Mon Nov 14 23:40:00 1994 --- gcc-2.7.0/cp/call.c Thu Jun 15 08:15:36 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 28,31 **** --- 29,33 ---- #include "cp-tree.h" #include "class.h" + #include "output.h" #include "flags.h" *************** *** 48,51 **** --- 50,54 ---- #define EVIL_RETURN(ARG) ((ARG).code = EVIL_CODE, (ARG)) + #define STD_RETURN(ARG) ((ARG).code = STD_CODE, (ARG)) #define QUAL_RETURN(ARG) ((ARG).code = QUAL_CODE, (ARG)) #define TRIVIAL_RETURN(ARG) ((ARG).code = TRIVIAL_CODE, (ARG)) *************** *** 118,121 **** --- 121,125 ---- register enum tree_code codel; register enum tree_code coder; + int lvalue; h.code = 0; *************** *** 127,135 **** #endif - if (TYPE_PTRMEMFUNC_P (type)) - type = TYPE_PTRMEMFUNC_FN_TYPE (type); - if (TYPE_PTRMEMFUNC_P (parmtype)) - parmtype = TYPE_PTRMEMFUNC_FN_TYPE (parmtype); - if (TREE_CODE (parmtype) == REFERENCE_TYPE) { --- 131,134 ---- *************** *** 137,141 **** --- 136,150 ---- parm = convert_from_reference (parm); parmtype = TREE_TYPE (parmtype); + lvalue = 1; } + else if (parm) + lvalue = lvalue_p (parm); + else + lvalue = 0; + + if (TYPE_PTRMEMFUNC_P (type)) + type = TYPE_PTRMEMFUNC_FN_TYPE (type); + if (TYPE_PTRMEMFUNC_P (parmtype)) + parmtype = TYPE_PTRMEMFUNC_FN_TYPE (parmtype); codel = TREE_CODE (type); *************** *** 165,172 **** return EVIL_RETURN (h); /* We allow the default conversion between function type and pointer-to-function type for free. */ if (type == parmtype) ! return ZERO_RETURN (h); /* Compare return types. */ --- 174,207 ---- return EVIL_RETURN (h); + if (type != parmtype && coder == METHOD_TYPE) + { + tree ttl = TYPE_METHOD_BASETYPE (type); + tree ttr = TYPE_METHOD_BASETYPE (parmtype); + + int b_or_d = get_base_distance (ttr, ttl, 0, 0); + if (b_or_d < 0) + { + b_or_d = get_base_distance (ttl, ttr, 0, 0); + if (b_or_d < 0) + return EVIL_RETURN (h); + h.distance = -b_or_d; + } + else + h.distance = b_or_d; + h.code = STD_CODE; + + type = build_function_type + (TREE_TYPE (type), TREE_CHAIN (TYPE_ARG_TYPES (type))); + parmtype = build_function_type + (TREE_TYPE (parmtype), TREE_CHAIN (TYPE_ARG_TYPES (parmtype))); + } + /* We allow the default conversion between function type and pointer-to-function type for free. */ if (type == parmtype) ! return h; ! ! if (pedantic) ! return EVIL_RETURN (h); /* Compare return types. */ *************** *** 201,212 **** if (! BINFO_OFFSET_ZEROP (binfo)) { static int explained = 0; if (h2.distance < 0) ! message_2_types (sorry, "cannot cast `%d' to `%d' at function call site", p2, p1); else ! message_2_types (sorry, "cannot cast `%d' to `%d' at function call site", p1, p2); if (! explained++) sorry ("(because pointer values change during conversion)"); return EVIL_RETURN (h); } --- 236,249 ---- if (! BINFO_OFFSET_ZEROP (binfo)) { + #if 0 static int explained = 0; if (h2.distance < 0) ! message_2_types (sorry, "cannot cast `%s' to `%s' at function call site", p2, p1); else ! message_2_types (sorry, "cannot cast `%s' to `%s' at function call site", p1, p2); if (! explained++) sorry ("(because pointer values change during conversion)"); + #endif return EVIL_RETURN (h); } *************** *** 260,263 **** --- 297,302 ---- else if (codel == POINTER_TYPE && coder == OFFSET_TYPE) { + tree ttl, ttr; + /* Get to the OFFSET_TYPE that this might be. */ type = TREE_TYPE (type); *************** *** 266,285 **** return EVIL_RETURN (h); ! if (TYPE_OFFSET_BASETYPE (type) == TYPE_OFFSET_BASETYPE (parmtype)) h.code = 0; ! else if (UNIQUELY_DERIVED_FROM_P (TYPE_OFFSET_BASETYPE (type), ! TYPE_OFFSET_BASETYPE (parmtype))) ! { ! h.code = STD_CODE; ! h.distance = 1; ! } ! else if (UNIQUELY_DERIVED_FROM_P (TYPE_OFFSET_BASETYPE (parmtype), ! TYPE_OFFSET_BASETYPE (type))) { h.code = STD_CODE; - h.distance = -1; } ! else ! return EVIL_RETURN (h); /* Now test the OFFSET_TYPE's target compatibility. */ type = TREE_TYPE (type); --- 305,328 ---- return EVIL_RETURN (h); ! ttl = TYPE_OFFSET_BASETYPE (type); ! ttr = TYPE_OFFSET_BASETYPE (parmtype); ! ! if (ttl == ttr) h.code = 0; ! else { + int b_or_d = get_base_distance (ttr, ttl, 0, 0); + if (b_or_d < 0) + { + b_or_d = get_base_distance (ttl, ttr, 0, 0); + if (b_or_d < 0) + return EVIL_RETURN (h); + h.distance = -b_or_d; + } + else + h.distance = b_or_d; h.code = STD_CODE; } ! /* Now test the OFFSET_TYPE's target compatibility. */ type = TREE_TYPE (type); *************** *** 301,304 **** --- 344,362 ---- return EVIL_RETURN (h); + if (codel == BOOLEAN_TYPE) + { + if (INTEGRAL_CODE_P (coder) || coder == REAL_TYPE) + return STD_RETURN (h); + else if (coder == POINTER_TYPE || coder == OFFSET_TYPE) + { + /* Make this worse than any conversion to another pointer. + FIXME this is how I think the language should work, but it may not + end up being how the language is standardized (jason 1/30/95). */ + h.distance = 32767; + return STD_RETURN (h); + } + return EVIL_RETURN (h); + } + if (INTEGRAL_CODE_P (codel)) { *************** *** 376,384 **** int penalty = 4 * (ttl != ttr); ! /* Anything converts to void *. void * converts to anything. ! Since these may be `const void *' (etc.) use VOID_TYPE ! instead of void_type_node. Otherwise, the targets must be the same, ! except that we do allow (at some cost) conversion between signed and ! unsigned pointer types. */ if ((TREE_CODE (ttl) == METHOD_TYPE --- 434,441 ---- int penalty = 4 * (ttl != ttr); ! /* Anything converts to void *. Since this may be `const void *' ! (etc.) use VOID_TYPE instead of void_type_node. Otherwise, the ! targets must be the same, except that we do allow (at some cost) ! conversion between signed and unsigned pointer types. */ if ((TREE_CODE (ttl) == METHOD_TYPE *************** *** 397,401 **** #if 1 ! if (TREE_CODE (ttl) != VOID_TYPE && TREE_CODE (ttr) != VOID_TYPE) { if (TREE_UNSIGNED (ttl) != TREE_UNSIGNED (ttr)) --- 454,459 ---- #if 1 ! if (TREE_CODE (ttl) != VOID_TYPE ! && (TREE_CODE (ttr) != VOID_TYPE || !parm || !integer_zerop (parm))) { if (TREE_UNSIGNED (ttl) != TREE_UNSIGNED (ttr)) *************** *** 405,409 **** penalty = 10; } ! if (! comp_target_types (ttl, ttr, 0)) return EVIL_RETURN (h); } --- 463,467 ---- penalty = 10; } ! if (comp_target_types (ttl, ttr, 0) <= 0) return EVIL_RETURN (h); } *************** *** 415,419 **** ttr = unsigned_type (ttr), penalty = 10, 0)) ! || (comp_target_types (ttl, ttr, 0)))) return EVIL_RETURN (h); #endif --- 473,477 ---- ttr = unsigned_type (ttr), penalty = 10, 0)) ! || (comp_target_types (ttl, ttr, 0) > 0))) return EVIL_RETURN (h); #endif *************** *** 504,515 **** ttl = TREE_TYPE (type); ! /* When passing a non-const argument into a const reference (or vice ! versa), dig it a little, so a non-const reference is preferred ! over this one. (mrs) */ ! if (TYPE_READONLY (ttl) != constp ! || TYPE_VOLATILE (ttl) != volatilep) ! penalty = 2; ! else ! penalty = 0; ttl = TYPE_MAIN_VARIANT (ttl); --- 562,580 ---- ttl = TREE_TYPE (type); ! /* Only allow const reference binding if we were given a parm to deal ! with, since it isn't really a conversion. This is a hack to ! prevent build_type_conversion from finding this conversion, but ! still allow overloading to find it. */ ! if (! lvalue && ! (parm && TYPE_READONLY (ttl))) ! return EVIL_RETURN (h); ! ! if (TYPE_READONLY (ttl) < constp ! || TYPE_VOLATILE (ttl) < volatilep) ! return EVIL_RETURN (h); ! ! /* When passing a non-const argument into a const reference, dig it a ! little, so a non-const reference is preferred over this one. */ ! penalty = ((TYPE_READONLY (ttl) > constp) ! + (TYPE_VOLATILE (ttl) > volatilep)); ttl = TYPE_MAIN_VARIANT (ttl); *************** *** 521,616 **** } - if (ttl == intype && penalty == 0) - return ZERO_RETURN (h); - else - penalty = 2; - ttr = intype; ! /* If the initializer is not an lvalue, then it does not ! matter if we make life easier for the programmer ! by creating a temporary variable with which to ! hold the result. */ ! if (parm && (INTEGRAL_CODE_P (coder) ! || coder == REAL_TYPE) ! && ! lvalue_p (parm)) ! { ! h = convert_harshness (ttl, ttr, NULL_TREE); ! if (penalty > 2 || h.code != 0) ! h.code |= STD_CODE; ! else ! h.code |= TRIVIAL_CODE; ! h.distance = 0; ! return h; ! } ! ! if (TREE_UNSIGNED (ttl) ^ TREE_UNSIGNED (intype)) ! { ! ttl = unsigned_type (ttl); ! ttr = intype = unsigned_type (intype); ! penalty += 2; ! } ! ! if (ttl == ttr) ! { ! if (penalty > 2) ! { ! h.code = STD_CODE; ! h.distance = 0; ! } ! else ! { ! h.code = TRIVIAL_CODE; ! /* We set this here so that build_overload_call_real will be ! able to see the penalty we found, rather than just looking ! at a TRIVIAL_CODE with no other information. */ ! h.int_penalty = penalty; ! } ! return h; ! } ! ! /* Pointers to voids always convert for pointers. But ! make them less natural than more specific matches. */ ! if (TREE_CODE (ttl) == POINTER_TYPE && TREE_CODE (ttr) == POINTER_TYPE) ! { ! if (TREE_TYPE (ttl) == void_type_node ! || TREE_TYPE (ttr) == void_type_node) ! { ! h.code = STD_CODE; ! h.distance = 0; ! return h; ! } ! } ! ! /* Here it does matter. If this conversion is from derived to base, ! allow it. Otherwise, types must be compatible in the strong sense. */ ! if (TREE_CODE (ttl) == RECORD_TYPE && TREE_CODE (ttr) == RECORD_TYPE) ! { ! int b_or_d = get_base_distance (ttl, ttr, 0, 0); ! if (b_or_d < 0) ! { ! b_or_d = get_base_distance (ttr, ttl, 0, 0); ! if (b_or_d < 0) ! return EVIL_RETURN (h); ! h.distance = -b_or_d; ! } ! /* Say that this conversion is relatively painless. ! If it turns out that there is a user-defined X(X&) ! constructor, then that will be invoked, but that's ! preferable to dealing with other user-defined conversions ! that may produce surprising results. */ ! else ! h.distance = b_or_d; ! h.code = STD_CODE; ! return h; ! } ! if (comp_target_types (ttl, intype, 1)) { ! if (penalty) ! h.code = STD_CODE; ! h.distance = 0; ! return h; } } if (codel == RECORD_TYPE && coder == RECORD_TYPE) --- 586,600 ---- } ttr = intype; ! /* Maybe handle conversion to base here? */ ! h = convert_harshness (ttl, ttr, NULL_TREE); ! if (penalty && h.code == 0) { ! h.code = QUAL_CODE; ! h.int_penalty = penalty; } + return h; } if (codel == RECORD_TYPE && coder == RECORD_TYPE) *************** *** 632,635 **** --- 616,678 ---- } + int + user_harshness (type, parmtype, parm) + register tree type, parmtype; + tree parm; + { + tree conv; + tree winner = NULL_TREE; + int code; + + { + tree typename = build_typename_overload (type); + if (lookup_fnfields (TYPE_BINFO (parmtype), typename, 0)) + return 0; + } + + for (conv = lookup_conversions (parmtype); conv; conv = TREE_CHAIN (conv)) + { + struct harshness_code tmp; + + if (winner && TREE_PURPOSE (winner) == TREE_PURPOSE (conv)) + continue; + + if (tmp = convert_harshness (type, TREE_VALUE (conv), NULL_TREE), + tmp.code < USER_CODE) + { + if (winner) + return EVIL_CODE; + else + { + winner = conv; + code = tmp.code; + } + } + } + + if (winner) + return code; + + return -1; + } + + int + can_convert (to, from) + tree to, from; + { + struct harshness_code h; + h = convert_harshness (to, from, NULL_TREE); + return h.code < USER_CODE; + } + + int + can_convert_arg (to, from, arg) + tree to, from, arg; + { + struct harshness_code h; + h = convert_harshness (to, from, arg); + return h.code < USER_CODE; + } + #ifdef DEBUG_MATCHING static char * *************** *** 913,953 **** && TYPE_HAS_CONVERSION (actual_type)) { ! tree conv; ! /* Don't issue warnings since we're only groping ! around for the right answer, we haven't yet ! committed to going with this solution. */ ! int old_inhibit_warnings = inhibit_warnings; ! ! inhibit_warnings = 1; ! conv = build_type_conversion ! (CALL_EXPR, TREE_VALUE (ttf), TREE_VALUE (tta), 0); ! inhibit_warnings = old_inhibit_warnings; ! if (conv) ! { ! if (conv == error_mark_node) ! win += 2; ! else ! { ! win++; ! if (TREE_CODE (conv) != CALL_EXPR) ! extra_conversions = 1; ! } ! } ! else if (TREE_CODE (TREE_VALUE (ttf)) == REFERENCE_TYPE) { ! conv = build_type_conversion (CALL_EXPR, formal_type, ! TREE_VALUE (tta), 0); ! if (conv) ! { ! if (conv == error_mark_node) ! win += 2; ! else ! { ! win++; ! if (TREE_CODE (conv) != CALL_EXPR) ! extra_conversions = 1; ! } ! } } } --- 956,967 ---- && TYPE_HAS_CONVERSION (actual_type)) { ! int extra = user_harshness (formal_type, actual_type); ! if (extra == EVIL_CODE) ! win += 2; ! else if (extra >= 0) { ! win++; ! extra_conversions = extra; } } *************** *** 1368,1371 **** --- 1382,1386 ---- if (outer_type == NULL_TREE) { + tree x; /* If we have something that's already a type by itself, use that. */ *************** *** 1377,1380 **** --- 1392,1403 ---- return inner_name; } + + x = lookup_name (inner_name, 0); + + if (x && TREE_CODE (x) == NAMESPACE_DECL) + { + x = lookup_namespace_name (x, inner_type); + return x; + } return NULL_TREE; } *************** *** 1598,1603 **** (LOOKUP_SPECULATIVELY|flags) &~LOOKUP_COMPLAIN); ! /* If it works, return it. */ ! if (result && result != error_mark_node) return build_method_call (instance, name, parms, basetype_path, flags); /* If it doesn't work, two argument delete must work */ --- 1621,1626 ---- (LOOKUP_SPECULATIVELY|flags) &~LOOKUP_COMPLAIN); ! /* If it finds a match, return it. */ ! if (result) return build_method_call (instance, name, parms, basetype_path, flags); /* If it doesn't work, two argument delete must work */ *************** *** 1726,1733 **** ? unneeded : maybe_needed; ! instance = C_C_D; ! instance_ptr = current_class_decl; ! result = build_field_call (TYPE_BINFO (current_class_type), ! instance_ptr, name, parms); if (result) --- 1749,1770 ---- ? unneeded : maybe_needed; ! /* If `this' is a signature pointer and `name' is not a constructor, ! we are calling a signature member function. In that case, set the ! `basetype' to the signature type and dereference the `optr' field. */ ! if (IS_SIGNATURE_POINTER (basetype) ! && TYPE_IDENTIFIER (basetype) != name) ! { ! basetype = SIGNATURE_TYPE (basetype); ! instance_ptr = build_optr_ref (instance); ! instance_ptr = convert (TYPE_POINTER_TO (basetype), instance_ptr); ! basetype_path = TYPE_BINFO (basetype); ! } ! else ! { ! instance = C_C_D; ! instance_ptr = current_class_decl; ! basetype_path = TYPE_BINFO (current_class_type); ! } ! result = build_field_call (basetype_path, instance_ptr, name, parms); if (result) *************** *** 1773,1777 **** else { ! if (! IS_AGGR_TYPE (basetype)) goto non_aggr_error; --- 1810,1817 ---- else { ! if (! IS_AGGR_TYPE (basetype) ! && ! (TYPE_LANG_SPECIFIC (basetype) ! && (IS_SIGNATURE_POINTER (basetype) ! || IS_SIGNATURE_REFERENCE (basetype)))) goto non_aggr_error; *************** *** 1803,1807 **** tree temp = get_temp_name (TREE_TYPE (instance), 0); if (IS_AGGR_TYPE (TREE_TYPE (instance))) ! expand_aggr_init (temp, instance, 0); else { --- 1843,1847 ---- tree temp = get_temp_name (TREE_TYPE (instance), 0); if (IS_AGGR_TYPE (TREE_TYPE (instance))) ! expand_aggr_init (temp, instance, 0, flags); else { *************** *** 1814,1822 **** else { ! if (TREE_CODE (instance) != CALL_EXPR ! #ifdef PCC_STATIC_STRUCT_RETURN ! && TREE_CODE (instance) != RTL_EXPR ! #endif ! ) my_friendly_abort (125); if (TYPE_NEEDS_CONSTRUCTING (basetype)) --- 1854,1858 ---- else { ! if (TREE_CODE (instance) != CALL_EXPR) my_friendly_abort (125); if (TYPE_NEEDS_CONSTRUCTING (basetype)) *************** *** 1947,1953 **** constp = 0; volatilep = 0; ! parms = tree_cons (NULL_TREE, ! build1 (NOP_EXPR, TYPE_POINTER_TO (basetype), ! integer_zero_node), parms); } else --- 1983,1989 ---- constp = 0; volatilep = 0; ! instance_ptr = build_int_2 (0, 0); ! TREE_TYPE (instance_ptr) = TYPE_POINTER_TO (basetype); ! parms = tree_cons (NULL_TREE, instance_ptr, parms); } else *************** *** 2076,2098 **** if (TREE_CODE (TREE_TYPE (parm)) == REFERENCE_TYPE) ! { ! /* TREE_VALUE (parms) may have been modified by now; ! restore it to its original value. */ ! TREE_VALUE (parms) = parm; ! friend_parms = parms; ! } else if (TREE_CODE (TREE_TYPE (parm)) == POINTER_TYPE) ! { ! tree new_type; ! parm = build_indirect_ref (parm, "friendifying parms (compiler error)"); ! new_type = cp_build_type_variant (TREE_TYPE (parm), constp, ! volatilep); ! new_type = build_reference_type (new_type); ! parm = convert (new_type, parm); ! friend_parms = tree_cons (NULL_TREE, parm, TREE_CHAIN (parms)); ! } else my_friendly_abort (167); cp->h_len = len; cp->harshness = (struct harshness_code *) --- 2112,2123 ---- if (TREE_CODE (TREE_TYPE (parm)) == REFERENCE_TYPE) ! parm = convert_from_reference (parm); else if (TREE_CODE (TREE_TYPE (parm)) == POINTER_TYPE) ! parm = build_indirect_ref (parm, "friendifying parms (compiler error)"); else my_friendly_abort (167); + friend_parms = tree_cons (NULL_TREE, parm, TREE_CHAIN (parms)); + cp->h_len = len; cp->harshness = (struct harshness_code *) *************** *** 2135,2138 **** --- 2160,2164 ---- basetype = BINFO_TYPE (basetype_path); + #if 0 /* Cast the instance variable if necessary. */ if (basetype != TYPE_MAIN_VARIANT *************** *** 2145,2149 **** tree type = build_pointer_type (build_type_variant (basetype, constp, volatilep)); ! TREE_VALUE (parms) = convert_force (type, instance_ptr); } } --- 2171,2175 ---- tree type = build_pointer_type (build_type_variant (basetype, constp, volatilep)); ! TREE_VALUE (parms) = convert_force (type, instance_ptr, 0); } } *************** *** 2153,2156 **** --- 2179,2183 ---- if (TREE_VALUE (parms) == error_mark_node) return error_mark_node; + #endif if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (function))) *************** *** 2198,2201 **** --- 2225,2234 ---- cp->basetypes = basetype_path; + /* Don't allow non-converting constructors to convert. */ + if (flags & LOOKUP_ONLYCONVERTING + && DECL_LANG_SPECIFIC (function) + && DECL_NONCONVERTING_P (function)) + continue; + /* No "two-level" conversions. */ if (flags & LOOKUP_NO_CONVERSION *************** *** 2203,2219 **** continue; - /* If we used default parameters, we must - check to see whether anyone else might - use them also, and report a possible - ambiguity. */ - if (! TYPE_USES_MULTIPLE_INHERITANCE (save_basetype) - && cp->harshness[len].distance == 0 - && cp->h.code < best) - { - if (! DECL_STATIC_FUNCTION_P (function)) - TREE_VALUE (parms) = cp->arg; - if (best == 1) - goto found_and_maybe_warn; - } cp++; } --- 2236,2239 ---- *************** *** 2435,2438 **** --- 2455,2471 ---- assemble_external (function); + #if 1 + /* Is it a synthesized method that needs to be synthesized? */ + if (DECL_ARTIFICIAL (function) && ! flag_no_inline + && ! DECL_INITIAL (function) + /* Kludge: don't synthesize for default args. */ + && current_function_decl) + synthesize_method (function); + #endif + + if (pedantic && DECL_THIS_INLINE (function) && ! DECL_ARTIFICIAL (function) + && ! DECL_INITIAL (function) && ! DECL_PENDING_INLINE_INFO (function)) + cp_pedwarn ("inline function `%#D' called before definition", function); + fntype = TREE_TYPE (function); if (TREE_CODE (fntype) == POINTER_TYPE) *************** *** 2604,2607 **** --- 2637,2644 ---- #endif + if (parms == error_mark_node + || (parms && TREE_CHAIN (parms) == error_mark_node)) + return error_mark_node; + if (need_vtbl == needed) { *************** *** 2621,2632 **** { is_constructor = DECL_CONSTRUCTOR_P (function); ! if (DECL_INLINE (function)) ! function = build1 (ADDR_EXPR, build_pointer_type (fntype), function); ! else ! { ! assemble_external (function); ! TREE_USED (function) = 1; ! function = default_conversion (function); ! } } else --- 2658,2663 ---- { is_constructor = DECL_CONSTRUCTOR_P (function); ! TREE_USED (function) = 1; ! function = default_conversion (function); } else *************** *** 2640,2646 **** TREE_TYPE (result) = value_type; TREE_SIDE_EFFECTS (result) = 1; - TREE_RAISES (result) - = TYPE_RAISES_EXCEPTIONS (fntype) || (parms && TREE_RAISES (parms)); TREE_HAS_CONSTRUCTOR (result) = is_constructor; return result; } --- 2671,2676 ---- TREE_TYPE (result) = value_type; TREE_SIDE_EFFECTS (result) = 1; TREE_HAS_CONSTRUCTOR (result) = is_constructor; + result = convert_from_reference (result); return result; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/class.c gcc-2.7.0/cp/class.c *** gcc-2.6.3/cp/class.c Sat Oct 15 13:05:49 1994 --- gcc-2.7.0/cp/class.c Thu Jun 15 08:16:07 1995 *************** *** 1,4 **** /* Functions related to building classes and their related objects. ! Copyright (C) 1987, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Functions related to building classes and their related objects. ! Copyright (C) 1987, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 27,30 **** --- 28,33 ---- #include "cp-tree.h" #include "flags.h" + #include "rtl.h" + #include "output.h" #include "obstack.h" *************** *** 71,75 **** tree current_class_decl, C_C_D; /* PARM_DECL: the class instance variable */ - tree current_vtable_decl; /* The following two can be derived from the previous one */ --- 74,77 ---- *************** *** 189,193 **** to the type we want. Until that is done, or until we can recognize when that is, we cannot do the short cut logic. (mrs) */ ! /* Do this, until we can undo any previous convertions. See net35.C for a testcase. */ fixed_type_p = complete_type_p (expr); --- 191,195 ---- to the type we want. Until that is done, or until we can recognize when that is, we cannot do the short cut logic. (mrs) */ ! /* Do this, until we can undo any previous conversions. See net35.C for a testcase. */ fixed_type_p = complete_type_p (expr); *************** *** 236,245 **** ind = build_indirect_ref (nonnull_expr, NULL_PTR); nonnull_expr = build_vbase_pointer (ind, last_virtual); ! if (nonnull == 0 && !flag_assume_nonnull_objects && null_expr == NULL_TREE) { null_expr = build1 (NOP_EXPR, TYPE_POINTER_TO (last_virtual), integer_zero_node); expr = build (COND_EXPR, TYPE_POINTER_TO (last_virtual), ! build (EQ_EXPR, integer_type_node, expr, integer_zero_node), null_expr, nonnull_expr); --- 238,249 ---- ind = build_indirect_ref (nonnull_expr, NULL_PTR); nonnull_expr = build_vbase_pointer (ind, last_virtual); ! if (nonnull == 0 ! && (TREE_CODE (type) == POINTER_TYPE ! || !flag_assume_nonnull_objects) && null_expr == NULL_TREE) { null_expr = build1 (NOP_EXPR, TYPE_POINTER_TO (last_virtual), integer_zero_node); expr = build (COND_EXPR, TYPE_POINTER_TO (last_virtual), ! build (EQ_EXPR, boolean_type_node, expr, integer_zero_node), null_expr, nonnull_expr); *************** *** 304,312 **** if (TREE_INT_CST_LOW (offset)) { /* For multiple inheritance: if `this' can be set by any function, then it could be 0 on entry to any function. Preserve such zeroness here. Otherwise, only in the case of constructors need we worry, and in those cases, ! it will be zero, or initialized to some legal value to which we may add. */ if (nonnull == 0 && (alias_this == 0 || flag_this_is_variable > 0)) --- 308,320 ---- if (TREE_INT_CST_LOW (offset)) { + /* Bash types to make the backend happy. */ + offset = convert (type, offset); + expr = build1 (NOP_EXPR, type, expr); + /* For multiple inheritance: if `this' can be set by any function, then it could be 0 on entry to any function. Preserve such zeroness here. Otherwise, only in the case of constructors need we worry, and in those cases, ! it will be zero, or initialized to some valid value to which we may add. */ if (nonnull == 0 && (alias_this == 0 || flag_this_is_variable > 0)) *************** *** 320,324 **** return build (COND_EXPR, type, ! build (EQ_EXPR, integer_type_node, expr, integer_zero_node), null_expr, build (code, type, expr, offset)); --- 328,332 ---- return build (COND_EXPR, type, ! build (EQ_EXPR, boolean_type_node, expr, integer_zero_node), null_expr, build (code, type, expr, offset)); *************** *** 423,434 **** if (instance == C_C_D) ! { ! if (current_vtable_decl == NULL_TREE ! || current_vtable_decl == error_mark_node ! || !UNIQUELY_DERIVED_FROM_P (DECL_FCONTEXT (CLASSTYPE_VFIELD (current_class_type)), basetype)) ! vtbl = build_indirect_ref (build_vfield_ref (instance, basetype), NULL_PTR); ! else ! vtbl = current_vtable_decl; ! } else { --- 431,436 ---- if (instance == C_C_D) ! vtbl = build_indirect_ref (build_vfield_ref (instance, basetype), ! NULL_PTR); else { *************** *** 475,480 **** NULL_PTR); } ! if (!flag_vtable_thunks) ! assemble_external (vtbl); aref = build_array_ref (vtbl, idx); --- 477,481 ---- NULL_PTR); } ! assemble_external (vtbl); aref = build_array_ref (vtbl, idx); *************** *** 488,496 **** else { ! *ptr_to_instptr ! = build (PLUS_EXPR, TREE_TYPE (*ptr_to_instptr), ! *ptr_to_instptr, ! convert (ptrdiff_type_node, ! build_component_ref (aref, delta_identifier, 0, 0))); return build_component_ref (aref, pfn_identifier, 0, 0); } --- 489,498 ---- else { ! if (ptr_to_instptr) ! *ptr_to_instptr ! = build (PLUS_EXPR, TREE_TYPE (*ptr_to_instptr), ! *ptr_to_instptr, ! convert (ptrdiff_type_node, ! build_component_ref (aref, delta_identifier, 0, 0))); return build_component_ref (aref, pfn_identifier, 0, 0); } *************** *** 549,554 **** /* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */ ! if (! flag_vtable_thunks) ! import_export_vtable (decl, type); IDENTIFIER_GLOBAL_VALUE (name) = decl = pushdecl_top_level (decl); --- 551,555 ---- /* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */ ! import_export_vtable (decl, type, 0); IDENTIFIER_GLOBAL_VALUE (name) = decl = pushdecl_top_level (decl); *************** *** 660,664 **** tree name = build_type_pathname (VTABLE_NAME_FORMAT, basetype, for_type); tree new_decl = build_decl (VAR_DECL, name, TREE_TYPE (orig_decl)); ! tree path; int result; --- 661,665 ---- tree name = build_type_pathname (VTABLE_NAME_FORMAT, basetype, for_type); tree new_decl = build_decl (VAR_DECL, name, TREE_TYPE (orig_decl)); ! tree path, offset; int result; *************** *** 677,685 **** /* Make fresh virtual list, so we can smash it later. */ BINFO_VIRTUALS (binfo) = copy_list (BINFO_VIRTUALS (binfo)); /* Install the value for `headof' if that's what we're doing. */ ! if (flag_dossier) ! TREE_VALUE (TREE_CHAIN (BINFO_VIRTUALS (binfo))) ! = build_vtable_entry (size_binop (MINUS_EXPR, integer_zero_node, BINFO_OFFSET (binfo)), ! FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (TREE_CHAIN (BINFO_VIRTUALS (binfo))))); #ifdef GATHER_STATISTICS --- 678,693 ---- /* Make fresh virtual list, so we can smash it later. */ BINFO_VIRTUALS (binfo) = copy_list (BINFO_VIRTUALS (binfo)); + + if (TREE_VIA_VIRTUAL (binfo)) + offset = BINFO_OFFSET (binfo_member (BINFO_TYPE (binfo), + CLASSTYPE_VBASECLASSES (for_type))); + else + offset = BINFO_OFFSET (binfo); + /* Install the value for `headof' if that's what we're doing. */ ! if (flag_rtti) ! TREE_VALUE (BINFO_VIRTUALS (binfo)) ! = build_vtable_entry (size_binop (MINUS_EXPR, integer_zero_node, offset), ! build_t_desc (for_type, 0)); #ifdef GATHER_STATISTICS *************** *** 689,694 **** /* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */ ! if (! flag_vtable_thunks) ! import_export_vtable (new_decl, for_type); if (TREE_VIA_VIRTUAL (binfo)) --- 697,701 ---- /* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */ ! import_export_vtable (new_decl, for_type, 0); if (TREE_VIA_VIRTUAL (binfo)) *************** *** 793,799 **** #endif - if (!flag_vtable_thunks) - TREE_ADDRESSABLE (fndecl) = CLASSTYPE_VTABLE_NEEDS_WRITING (t); - /* If the virtual function is a redefinition of a prior one, figure out in which base class the new definition goes, --- 800,803 ---- *************** *** 804,812 **** tree entry; ! if (flag_dossier && *has_virtual == 0) { ! /* CLASSTYPE_DOSSIER is only used as a Boolean (NULL or not). */ ! CLASSTYPE_DOSSIER (t) = integer_one_node; *has_virtual = 1; } --- 808,818 ---- tree entry; ! if (flag_rtti && *has_virtual == 0) { ! /* CLASSTYPE_RTTI is only used as a Boolean (NULL or not). */ ! CLASSTYPE_RTTI (t) = integer_one_node; ! #if 0 *has_virtual = 1; + #endif } *************** *** 1084,1100 **** IDENTIFIER_POINTER (DECL_NAME (fdecl))); } ! else if (TREE_PRIVATE (fdecl) && access != access_private) ! cp_error_at ("cannot make private `%D' non-private", fdecl); else if (TREE_PROTECTED (fdecl)) { ! if (access == access_public) ! cp_error_at ("cannot make protected `%D' public", fdecl); goto alter; } /* ARM 11.3: an access declaration may not be used to restrict access to a member that is accessible in the base class. */ ! else if (TREE_PUBLIC (fdecl) ! && (access == access_private ! || access == access_protected)) cp_error_at ("cannot reduce access of public member `%D'", fdecl); else if (elem == NULL_TREE) --- 1090,1108 ---- IDENTIFIER_POINTER (DECL_NAME (fdecl))); } ! else if (TREE_PRIVATE (fdecl)) ! { ! if (access != access_private) ! cp_error_at ("cannot make private `%D' non-private", fdecl); ! goto alter; ! } else if (TREE_PROTECTED (fdecl)) { ! if (access != access_protected) ! cp_error_at ("cannot make protected `%D' non-protected", fdecl); goto alter; } /* ARM 11.3: an access declaration may not be used to restrict access to a member that is accessible in the base class. */ ! else if (access != access_public) cp_error_at ("cannot reduce access of public member `%D'", fdecl); else if (elem == NULL_TREE) *************** *** 1402,1407 **** TYPE_NEEDS_DESTRUCTOR (t) |= TYPE_NEEDS_DESTRUCTOR (basetype); TYPE_HAS_COMPLEX_ASSIGN_REF (t) |= TYPE_HAS_COMPLEX_ASSIGN_REF (basetype); ! TYPE_HAS_COMPLEX_INIT_REF (t) |= (TYPE_HAS_COMPLEX_INIT_REF (basetype) ! || TYPE_NEEDS_CONSTRUCTING (basetype)); TYPE_OVERLOADS_CALL_EXPR (t) |= TYPE_OVERLOADS_CALL_EXPR (basetype); --- 1410,1414 ---- TYPE_NEEDS_DESTRUCTOR (t) |= TYPE_NEEDS_DESTRUCTOR (basetype); TYPE_HAS_COMPLEX_ASSIGN_REF (t) |= TYPE_HAS_COMPLEX_ASSIGN_REF (basetype); ! TYPE_HAS_COMPLEX_INIT_REF (t) |= TYPE_HAS_COMPLEX_INIT_REF (basetype); TYPE_OVERLOADS_CALL_EXPR (t) |= TYPE_OVERLOADS_CALL_EXPR (basetype); *************** *** 1439,1442 **** --- 1446,1450 ---- TREE_VIA_PUBLIC (chain) = TREE_VIA_PUBLIC (base_base_binfo); TREE_VIA_PROTECTED (chain) = TREE_VIA_PROTECTED (base_base_binfo); + BINFO_INHERITANCE_CHAIN (chain) = base_binfo; } *************** *** 1677,1751 **** } ! /* Need to test METHOD_VEC here in case all methods ! (conversions and otherwise) are inherited. */ ! if (TYPE_HAS_CONVERSION (t) && method_vec != NULL_TREE) ! { ! tree first_conversions[last_conversion_type]; ! tree last_conversions[last_conversion_type]; ! enum conversion_type conv_index; ! tree *tmp; ! int i; ! ! bzero ((char *) first_conversions, sizeof (first_conversions)); ! bzero ((char *) last_conversions, sizeof (last_conversions)); ! for (tmp = &TREE_VEC_ELT (method_vec, 1); ! tmp != TREE_VEC_END (method_vec); tmp += 1) ! { ! /* ??? This should compare DECL_NAME (*tmp) == ansi_opname[TYPE_EXPR]. */ ! if (IDENTIFIER_TYPENAME_P (DECL_ASSEMBLER_NAME (*tmp))) ! { ! tree fntype = TREE_TYPE (*tmp); ! tree return_type = TREE_TYPE (fntype); ! my_friendly_assert (TREE_CODE (fntype) == METHOD_TYPE, 171); ! ! if (typecode_p (return_type, POINTER_TYPE)) ! { ! if (TYPE_READONLY (TREE_TYPE (return_type))) ! conv_index = constptr_conv; ! else ! conv_index = ptr_conv; ! } ! else if (typecode_p (return_type, INTEGER_TYPE) ! || typecode_p (return_type, BOOLEAN_TYPE) ! || typecode_p (return_type, ENUMERAL_TYPE)) ! { ! TYPE_HAS_INT_CONVERSION (t) = 1; ! conv_index = int_conv; ! } ! else if (typecode_p (return_type, REAL_TYPE)) ! { ! TYPE_HAS_REAL_CONVERSION (t) = 1; ! conv_index = real_conv; ! } ! else ! continue; ! ! if (first_conversions[(int) conv_index] == NULL_TREE) ! first_conversions[(int) conv_index] = *tmp; ! last_conversions[(int) conv_index] = *tmp; ! } ! } ! ! for (i = 0; i < (int) last_conversion_type; i++) ! if (first_conversions[i] != last_conversions[i]) ! CLASSTYPE_CONVERSION (t, i) = error_mark_node; ! else ! CLASSTYPE_CONVERSION (t, i) = first_conversions[i]; ! } ! ! /* If this type has constructors, force its mode to be BLKmode, ! and force its TREE_ADDRESSABLE bit to be nonzero. */ ! if (TYPE_NEEDS_CONSTRUCTING (t) || TYPE_NEEDS_DESTRUCTOR (t)) { ! tree variants = t; ! if (TREE_CODE (TYPE_NAME (t)) == TYPE_DECL) DECL_MODE (TYPE_NAME (t)) = BLKmode; ! while (variants) { TYPE_MODE (variants) = BLKmode; TREE_ADDRESSABLE (variants) = 1; ! variants = TYPE_NEXT_VARIANT (variants); } } } --- 1685,1757 ---- } ! /* If this type has a copy constructor, force its mode to be BLKmode, and ! force its TREE_ADDRESSABLE bit to be nonzero. This will cause it to ! be passed by invisible reference and prevent it from being returned in ! a register. */ ! if (! TYPE_HAS_TRIVIAL_INIT_REF (t)) { ! tree variants; if (TREE_CODE (TYPE_NAME (t)) == TYPE_DECL) DECL_MODE (TYPE_NAME (t)) = BLKmode; ! for (variants = t; variants; variants = TYPE_NEXT_VARIANT (variants)) { TYPE_MODE (variants) = BLKmode; TREE_ADDRESSABLE (variants) = 1; ! } ! } ! } ! ! /* Add FN to the method_vec growing on the class_obstack. Used by ! finish_struct_methods. */ ! static void ! grow_method (fn, method_vec_ptr) ! tree fn; ! tree *method_vec_ptr; ! { ! tree method_vec = (tree)obstack_base (&class_obstack); ! tree *testp = &TREE_VEC_ELT (method_vec, 0); ! if (*testp == NULL_TREE) ! testp++; ! while (((HOST_WIDE_INT) testp ! < (HOST_WIDE_INT) obstack_next_free (&class_obstack)) ! && DECL_NAME (*testp) != DECL_NAME (fn)) ! testp++; ! if ((HOST_WIDE_INT) testp ! < (HOST_WIDE_INT) obstack_next_free (&class_obstack)) ! { ! tree x, prev_x; ! ! for (x = *testp; x; x = DECL_CHAIN (x)) ! { ! if (DECL_NAME (fn) == ansi_opname[(int) DELETE_EXPR] ! || DECL_NAME (fn) == ansi_opname[(int) VEC_DELETE_EXPR]) ! { ! /* ANSI C++ June 5 1992 WP 12.5.5.1 */ ! cp_error_at ("`%D' overloaded", fn); ! cp_error_at ("previous declaration as `%D' here", x); ! } ! if (DECL_ASSEMBLER_NAME (fn)==DECL_ASSEMBLER_NAME (x)) ! { ! /* We complain about multiple destructors on sight, ! so we do not repeat the warning here. Friend-friend ! ambiguities are warned about outside this loop. */ ! if (!DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fn))) ! cp_error_at ("ambiguous method `%#D' in structure", fn); ! break; ! } ! prev_x = x; } + if (x == 0) + { + if (*testp) + DECL_CHAIN (prev_x) = fn; + else + *testp = fn; + } + } + else + { + obstack_ptr_grow (&class_obstack, fn); + *method_vec_ptr = (tree)obstack_base (&class_obstack); } } *************** *** 1759,1766 **** Data Structure: List of method lists. The outer list is a TREE_LIST, whose TREE_PURPOSE field is the field name and the ! TREE_VALUE is the TREE_CHAIN of the FUNCTION_DECLs. Friends are ! chained in the same way as member functions, but they live in the ! TREE_TYPE field of the outer list. That allows them to be quickly ! deleted, and requires no extra storage. If there are any constructors/destructors, they are moved to the --- 1765,1774 ---- Data Structure: List of method lists. The outer list is a TREE_LIST, whose TREE_PURPOSE field is the field name and the ! TREE_VALUE is the DECL_CHAIN of the FUNCTION_DECLs. TREE_CHAIN ! links the entire list of methods for TYPE_METHODS. Friends are ! chained in the same way as member functions (? TREE_CHAIN or ! DECL_CHAIN), but they live in the TREE_TYPE field of the outer ! list. That allows them to be quickly deleted, and requires no ! extra storage. If there are any constructors/destructors, they are moved to the *************** *** 1779,1782 **** --- 1787,1792 ---- { tree method_vec; + tree save_fn_fields = tree_cons (NULL_TREE, NULL_TREE, fn_fields); + tree lastp; tree name = constructor_name (t); int i, n_baseclasses = CLASSTYPE_N_BASECLASSES (t); *************** *** 1792,1806 **** obstack_blank (&class_obstack, sizeof (struct tree_vec)); ! while (fn_fields) { - /* NEXT Pointer, TEST Pointer, and BASE Pointer. */ - tree nextp, *testp; tree fn_name = DECL_NAME (fn_fields); if (fn_name == NULL_TREE) fn_name = name; - nextp = TREE_CHAIN (fn_fields); - TREE_CHAIN (fn_fields) = NULL_TREE; - /* Clear out this flag. --- 1802,1814 ---- obstack_blank (&class_obstack, sizeof (struct tree_vec)); ! /* First fill in entry 0 with the constructors, and the next few with ! type conversion operators (if any). */ ! ! for (lastp = save_fn_fields; fn_fields; fn_fields = TREE_CHAIN (lastp)) { tree fn_name = DECL_NAME (fn_fields); if (fn_name == NULL_TREE) fn_name = name; /* Clear out this flag. *************** *** 1830,1835 **** } } } ! else if (fn_name == ansi_opname[(int) MODIFY_EXPR]) { tree parmtype = TREE_VALUE (FUNCTION_ARG_CHAIN (fn_fields)); --- 1838,1880 ---- } } + /* Constructors are handled easily in search routines. */ + DECL_CHAIN (fn_fields) = TREE_VEC_ELT (method_vec, 0); + TREE_VEC_ELT (method_vec, 0) = fn_fields; } ! else if (IDENTIFIER_TYPENAME_P (fn_name)) ! { ! tree return_type = TREE_TYPE (TREE_TYPE (fn_fields)); ! ! if (typecode_p (return_type, INTEGER_TYPE) ! || typecode_p (return_type, BOOLEAN_TYPE) ! || typecode_p (return_type, ENUMERAL_TYPE)) ! TYPE_HAS_INT_CONVERSION (t) = 1; ! else if (typecode_p (return_type, REAL_TYPE)) ! TYPE_HAS_REAL_CONVERSION (t) = 1; ! ! grow_method (fn_fields, &method_vec); ! } ! else ! { ! lastp = fn_fields; ! continue; ! } ! ! TREE_CHAIN (lastp) = TREE_CHAIN (fn_fields); ! TREE_CHAIN (fn_fields) = NULL_TREE; ! } ! ! fn_fields = TREE_CHAIN (save_fn_fields); ! while (fn_fields) ! { ! tree nextp; ! tree fn_name = DECL_NAME (fn_fields); ! if (fn_name == NULL_TREE) ! fn_name = name; ! ! nextp = TREE_CHAIN (fn_fields); ! TREE_CHAIN (fn_fields) = NULL_TREE; ! ! if (fn_name == ansi_opname[(int) MODIFY_EXPR]) { tree parmtype = TREE_VALUE (FUNCTION_ARG_CHAIN (fn_fields)); *************** *** 1844,1903 **** } ! /* Constructors are handled easily in search routines. */ ! if (fn_name == name) ! { ! DECL_CHAIN (fn_fields) = TREE_VEC_ELT (method_vec, 0); ! TREE_VEC_ELT (method_vec, 0) = fn_fields; ! } ! else ! { ! testp = &TREE_VEC_ELT (method_vec, 0); ! if (*testp == NULL_TREE) ! testp++; ! while (((HOST_WIDE_INT) testp ! < (HOST_WIDE_INT) obstack_next_free (&class_obstack)) ! && DECL_NAME (*testp) != fn_name) ! testp++; ! if ((HOST_WIDE_INT) testp ! < (HOST_WIDE_INT) obstack_next_free (&class_obstack)) ! { ! tree x, prev_x; ! ! for (x = *testp; x; x = DECL_CHAIN (x)) ! { ! if (DECL_NAME (fn_fields) == ansi_opname[(int) DELETE_EXPR] ! || DECL_NAME (fn_fields) ! == ansi_opname[(int) VEC_DELETE_EXPR]) ! { ! /* ANSI C++ June 5 1992 WP 12.5.5.1 */ ! cp_error_at ("`%D' overloaded", fn_fields); ! cp_error_at ("previous declaration as `%D' here", x); ! } ! if (DECL_ASSEMBLER_NAME (fn_fields)==DECL_ASSEMBLER_NAME (x)) ! { ! /* We complain about multiple destructors on sight, ! so we do not repeat the warning here. Friend-friend ! ambiguities are warned about outside this loop. */ ! if (!DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fn_fields))) ! cp_error_at ("ambiguous method `%#D' in structure", ! fn_fields); ! break; ! } ! prev_x = x; ! } ! if (x == 0) ! { ! if (*testp) ! DECL_CHAIN (prev_x) = fn_fields; ! else ! *testp = fn_fields; ! } ! } ! else ! { ! obstack_ptr_grow (&class_obstack, fn_fields); ! method_vec = (tree)obstack_base (&class_obstack); ! } ! } fn_fields = nextp; } --- 1889,1893 ---- } ! grow_method (fn_fields, &method_vec); fn_fields = nextp; } *************** *** 2029,2032 **** --- 2019,2023 ---- { cp_error ("redefinition of `%#T'", t); + cp_error_at ("previous definition here", t); /* Pretend we haven't defined this type. */ *************** *** 2106,2110 **** DECL_INITIAL (decl) = build_nt (CONSTRUCTOR, NULL_TREE, BINFO_VIRTUALS (binfo)); ! finish_decl (decl, DECL_INITIAL (decl), NULL_TREE, 0); DECL_CONTEXT (decl) = context; } --- 2097,2101 ---- DECL_INITIAL (decl) = build_nt (CONSTRUCTOR, NULL_TREE, BINFO_VIRTUALS (binfo)); ! cp_finish_decl (decl, DECL_INITIAL (decl), NULL_TREE, 0, 0); DECL_CONTEXT (decl) = context; } *************** *** 2240,2249 **** { tree virtuals = BINFO_VIRTUALS (binfo); unsigned HOST_WIDE_INT n; ! n = 0; ! /* Skip initial vtable length field and RTTI fake object. */ ! for (; virtuals && n < 1 + flag_dossier; n++) ! virtuals = TREE_CHAIN (virtuals); while (virtuals) { --- 2231,2257 ---- { tree virtuals = BINFO_VIRTUALS (binfo); + tree old_rtti; unsigned HOST_WIDE_INT n; ! /* update rtti entry */ ! if (flag_rtti) ! { ! if (binfo == TYPE_BINFO (t)) ! { ! if (! BINFO_NEW_VTABLE_MARKED (binfo)) ! build_vtable (TYPE_BINFO (DECL_CONTEXT (CLASSTYPE_VFIELD (t))), t); ! } ! else ! { ! if (! BINFO_NEW_VTABLE_MARKED (binfo)) ! prepare_fresh_vtable (binfo, t); ! } ! } ! if (fndecl == NULL_TREE) return; ! ! /* Skip RTTI fake object. */ ! n = 1; ! if (virtuals) ! virtuals = TREE_CHAIN (virtuals); while (virtuals) { *************** *** 2265,2269 **** stick in before the virtual function table pointer. ! Also, we want just the delta bewteen the most base class that we derived this vfield from and us. */ base_offset = size_binop (PLUS_EXPR, --- 2273,2277 ---- stick in before the virtual function table pointer. ! Also, we want just the delta between the most base class that we derived this vfield from and us. */ base_offset = size_binop (PLUS_EXPR, *************** *** 2273,2283 **** /* Make sure we can modify the derived association with immunity. */ ! if (TREE_USED (binfo)) { my_friendly_assert (0, 999); ! #if 0 ! my_friendly_assert (*binfo2_ptr == binfo, 999); ! *binfo2_ptr = copy_binfo (binfo); ! #endif ! } if (binfo == TYPE_BINFO (t)) { --- 2281,2287 ---- /* Make sure we can modify the derived association with immunity. */ ! if (TREE_USED (binfo)) my_friendly_assert (0, 999); ! if (binfo == TYPE_BINFO (t)) { *************** *** 2335,2344 **** } ! /* Fixup all the delta entries in this vtable that need updating. ! This happens when we have non-overridden virtual functions from a ! virtual base class, that are at a different offset, in the new ! hierarchy, because the layout of the virtual bases has changed. */ static void ! fixup_vtable_deltas (binfo, t) tree binfo, t; { --- 2339,2345 ---- } ! /* Fixup all the delta entries in this one vtable that need updating. */ static void ! fixup_vtable_deltas1 (binfo, t) tree binfo, t; { *************** *** 2346,2353 **** unsigned HOST_WIDE_INT n; ! n = 0; ! /* Skip initial vtable length field and RTTI fake object. */ ! for (; virtuals && n < 1 + flag_dossier; n++) ! virtuals = TREE_CHAIN (virtuals); while (virtuals) { --- 2347,2354 ---- unsigned HOST_WIDE_INT n; ! /* Skip RTTI fake object. */ ! n = 1; ! if (virtuals) ! virtuals = TREE_CHAIN (virtuals); while (virtuals) { *************** *** 2370,2374 **** stick in before the virtual function table pointer. ! Also, we want just the delta bewteen the most base class that we derived this vfield from and us. */ base_offset = size_binop (PLUS_EXPR, --- 2371,2375 ---- stick in before the virtual function table pointer. ! Also, we want just the delta between the most base class that we derived this vfield from and us. */ base_offset = size_binop (PLUS_EXPR, *************** *** 2411,2414 **** --- 2412,2442 ---- } + /* Fixup all the delta entries in all the direct vtables that need updating. + This happens when we have non-overridden virtual functions from a + virtual base class, that are at a different offset, in the new + hierarchy, because the layout of the virtual bases has changed. */ + static void + fixup_vtable_deltas (binfo, init_self, t) + tree binfo, t; + int init_self; + { + tree binfos = BINFO_BASETYPES (binfo); + int i, n_baselinks = binfos ? TREE_VEC_LENGTH (binfos) : 0; + + for (i = 0; i < n_baselinks; i++) + { + tree base_binfo = TREE_VEC_ELT (binfos, i); + int is_not_base_vtable = + i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo)); + if (! TREE_VIA_VIRTUAL (base_binfo)) + fixup_vtable_deltas (base_binfo, is_not_base_vtable, t); + } + /* Should we use something besides CLASSTYPE_VFIELDS? */ + if (init_self && CLASSTYPE_VFIELDS (BINFO_TYPE (binfo))) + { + fixup_vtable_deltas1 (binfo, t); + } + } + /* These are the ones that are through virtual base classes. */ static void *************** *** 2490,2508 **** choose = NEITHER; - /* Skip size entry. */ - virtuals = TREE_CHAIN (virtuals); /* Skip RTTI fake object. */ ! if (flag_dossier) ! { ! virtuals = TREE_CHAIN (virtuals); ! } ! ! /* Skip size entry. */ old_virtuals = TREE_CHAIN (old_virtuals); - /* Skip RTTI fake object. */ - if (flag_dossier) - { - old_virtuals = TREE_CHAIN (old_virtuals); - } while (virtuals) --- 2518,2524 ---- choose = NEITHER; /* Skip RTTI fake object. */ ! virtuals = TREE_CHAIN (virtuals); old_virtuals = TREE_CHAIN (old_virtuals); while (virtuals) *************** *** 2564,2568 **** } { ! /* This MUST be overriden, or the class is ill-formed. */ /* For now, we just make it abstract. */ tree fndecl = TREE_OPERAND (FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (virtuals)), 0); --- 2580,2584 ---- } { ! /* This MUST be overridden, or the class is ill-formed. */ /* For now, we just make it abstract. */ tree fndecl = TREE_OPERAND (FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (virtuals)), 0); *************** *** 2790,2795 **** #endif ! if (flag_dossier) build_t_desc (t, 0); TYPE_BINFO (t) = NULL_TREE; --- 2806,2813 ---- #endif ! #if 0 ! if (flag_rtti) build_t_desc (t, 0); + #endif TYPE_BINFO (t) = NULL_TREE; *************** *** 2962,2965 **** --- 2980,2988 ---- DECL_CLASS_CONTEXT (x) = t; + /* Do both of these, even though they're in the same union; + if the insn `r' member and the size `i' member are + different sizes, as on the alpha, the larger of the two + will end up with garbage in it. */ + DECL_SAVED_INSNS (x) = NULL_RTX; DECL_FIELD_SIZE (x) = 0; *************** *** 3026,3029 **** --- 3049,3053 ---- last_x = x; + DECL_SAVED_INSNS (x) = NULL_RTX; DECL_FIELD_SIZE (x) = 0; *************** *** 3058,3062 **** cant_synth_asn_ref = 1; cant_have_default_ctor = 1; - TYPE_HAS_COMPLEX_INIT_REF (t) = 1; if (! TYPE_HAS_CONSTRUCTOR (t) && extra_warnings) --- 3082,3085 ---- *************** *** 3082,3086 **** cant_synth_asn_ref = 1; cant_have_default_ctor = 1; - TYPE_HAS_COMPLEX_INIT_REF (t) = 1; if (! TYPE_HAS_CONSTRUCTOR (t) && !IS_SIGNATURE (t) --- 3105,3108 ---- *************** *** 3139,3147 **** cp_error_at ("zero width for bit-field `%D'", x); } ! else if ((unsigned)width > TYPE_PRECISION (TREE_TYPE (x))) { DECL_INITIAL (x) = NULL; ! cp_error_at ("width of `%D' exceeds its type", x); } } --- 3161,3188 ---- cp_error_at ("zero width for bit-field `%D'", x); } ! else if (width ! > TYPE_PRECISION (long_long_unsigned_type_node)) { + /* The backend will dump if you try to use something + too big; avoid that. */ DECL_INITIAL (x) = NULL; ! sorry ("bit-fields larger than %d bits", ! TYPE_PRECISION (long_long_unsigned_type_node)); ! cp_error_at (" in declaration of `%D'", x); ! } ! else if (width > TYPE_PRECISION (TREE_TYPE (x)) ! && TREE_CODE (TREE_TYPE (x)) != ENUMERAL_TYPE) ! { ! cp_warning_at ("width of `%D' exceeds its type", x); } + else if (TREE_CODE (TREE_TYPE (x)) == ENUMERAL_TYPE + && ((min_precision (TYPE_MIN_VALUE (TREE_TYPE (x)), + TREE_UNSIGNED (TREE_TYPE (x))) > width) + || (min_precision (TYPE_MAX_VALUE (TREE_TYPE (x)), + TREE_UNSIGNED (TREE_TYPE (x))) > width))) + { + cp_warning_at ("`%D' is too small to hold all values of `%#T'", + x, TREE_TYPE (x)); + } } *************** *** 3220,3226 **** TYPE_NEEDS_DESTRUCTOR (t) |= TYPE_NEEDS_DESTRUCTOR (type); TYPE_HAS_COMPLEX_ASSIGN_REF (t) |= TYPE_HAS_COMPLEX_ASSIGN_REF (type); ! TYPE_HAS_COMPLEX_INIT_REF (t) ! |= (TYPE_HAS_COMPLEX_INIT_REF (type) ! || TYPE_NEEDS_CONSTRUCTING (type)); } --- 3261,3265 ---- TYPE_NEEDS_DESTRUCTOR (t) |= TYPE_NEEDS_DESTRUCTOR (type); TYPE_HAS_COMPLEX_ASSIGN_REF (t) |= TYPE_HAS_COMPLEX_ASSIGN_REF (type); ! TYPE_HAS_COMPLEX_INIT_REF (t) |= TYPE_HAS_COMPLEX_INIT_REF (type); } *************** *** 3243,3246 **** --- 3282,3287 ---- { cant_have_default_ctor = 1; + #if 0 + /* This is wrong for aggregates. */ if (! TYPE_HAS_CONSTRUCTOR (t)) { *************** *** 3252,3255 **** --- 3293,3297 ---- x); } + #endif } } *************** *** 3304,3308 **** if (DECL_VINDEX (dtor) == NULL_TREE - && ! CLASSTYPE_DECLARED_EXCEPTION (t) && (needs_virtual_dtor || pending_virtuals != NULL_TREE --- 3346,3349 ---- *************** *** 3320,3323 **** --- 3361,3367 ---- TYPE_NEEDS_DESTRUCTOR (t) |= TYPE_HAS_DESTRUCTOR (t); + if (flag_rtti && (max_has_virtual > 0 || needs_virtual_dtor) && + has_virtual == 0) + has_virtual = 1; if (! fn_fields) *************** *** 3326,3330 **** TYPE_HAS_COMPLEX_INIT_REF (t) |= (TYPE_HAS_INIT_REF (t) || TYPE_USES_VIRTUAL_BASECLASSES (t) ! || has_virtual || any_default_members || first_vfn_base_index >= 0); TYPE_NEEDS_CONSTRUCTING (t) |= (TYPE_HAS_CONSTRUCTOR (t) || TYPE_USES_VIRTUAL_BASECLASSES (t) --- 3370,3374 ---- TYPE_HAS_COMPLEX_INIT_REF (t) |= (TYPE_HAS_INIT_REF (t) || TYPE_USES_VIRTUAL_BASECLASSES (t) ! || any_default_members); TYPE_NEEDS_CONSTRUCTING (t) |= (TYPE_HAS_CONSTRUCTOR (t) || TYPE_USES_VIRTUAL_BASECLASSES (t) *************** *** 3358,3363 **** TYPE_HAS_REAL_ASSIGN_REF (t) |= TYPE_HAS_ASSIGN_REF (t); TYPE_HAS_COMPLEX_ASSIGN_REF (t) ! |= (TYPE_HAS_ASSIGN_REF (t) || TYPE_USES_VIRTUAL_BASECLASSES (t) ! || has_virtual || first_vfn_base_index >= 0); if (! TYPE_HAS_ASSIGN_REF (t) && ! cant_synth_asn_ref --- 3402,3406 ---- TYPE_HAS_REAL_ASSIGN_REF (t) |= TYPE_HAS_ASSIGN_REF (t); TYPE_HAS_COMPLEX_ASSIGN_REF (t) ! |= TYPE_HAS_ASSIGN_REF (t) || TYPE_USES_VIRTUAL_BASECLASSES (t); if (! TYPE_HAS_ASSIGN_REF (t) && ! cant_synth_asn_ref *************** *** 3375,3379 **** if (TYPE_HAS_CONSTRUCTOR (t) - && ! CLASSTYPE_DECLARED_EXCEPTION (t) && CLASSTYPE_FRIEND_CLASSES (t) == NULL_TREE && DECL_FRIENDLIST (TYPE_NAME (t)) == NULL_TREE) --- 3418,3421 ---- *************** *** 3484,3490 **** DECL_CLASS_CONTEXT (vfield) = t; DECL_FCONTEXT (vfield) = t; DECL_FIELD_SIZE (vfield) = 0; DECL_ALIGN (vfield) = TYPE_ALIGN (ptr_type_node); ! if (CLASSTYPE_DOSSIER (t)) { /* vfield is always first entry in structure. */ --- 3526,3533 ---- DECL_CLASS_CONTEXT (vfield) = t; DECL_FCONTEXT (vfield) = t; + DECL_SAVED_INSNS (vfield) = NULL_RTX; DECL_FIELD_SIZE (vfield) = 0; DECL_ALIGN (vfield) = TYPE_ALIGN (ptr_type_node); ! if (CLASSTYPE_RTTI (t)) { /* vfield is always first entry in structure. */ *************** *** 3555,3599 **** /* Pass layout information about base classes to layout_type, if any. */ - - { - tree field; - for (field = TYPE_FIELDS (t); field; field = TREE_CHAIN (field)) - { - if (TREE_STATIC (field)) - continue; - if (TREE_CODE (field) != FIELD_DECL) - continue; - - /* If this field is an anonymous union, - give each union-member the same position as the union has. - - ??? This is a real kludge because it makes the structure - of the types look strange. This feature is only used by - C++, which should have build_component_ref build two - COMPONENT_REF operations, one for the union and one for - the inner field. We set the offset of this field to zero - so that either the old or the correct method will work. - Setting DECL_FIELD_CONTEXT is wrong unless the inner fields are - moved into the type of this field, but nothing seems to break - by doing this. */ - - if (DECL_NAME (field) == NULL_TREE - && TREE_CODE (TREE_TYPE (field)) == UNION_TYPE) - { - tree uelt = TYPE_FIELDS (TREE_TYPE (field)); - for (; uelt; uelt = TREE_CHAIN (uelt)) - { - if (TREE_CODE (uelt) != FIELD_DECL) - continue; - - DECL_FIELD_CONTEXT (uelt) = DECL_FIELD_CONTEXT (field); - DECL_FIELD_BITPOS (uelt) = DECL_FIELD_BITPOS (field); - } - - DECL_FIELD_BITPOS (field) = integer_zero_node; - } - } - } - if (n_baseclasses) { --- 3598,3601 ---- *************** *** 3681,3692 **** CLASSTYPE_N_VBASECLASSES (t) = list_length (vbases); while (vbases) { ! /* The rtti code should do this. (mrs) */ ! /* Update dossier info with offsets for virtual baseclasses. */ ! if (flag_dossier && ! BINFO_NEW_VTABLE_MARKED (vbases)) prepare_fresh_vtable (vbases, t); vbases = TREE_CHAIN (vbases); } { --- 3683,3696 ---- CLASSTYPE_N_VBASECLASSES (t) = list_length (vbases); + /* The rtti code should do this. (mrs) */ + #if 0 while (vbases) { ! /* Update rtti info with offsets for virtual baseclasses. */ ! if (flag_rtti && ! BINFO_NEW_VTABLE_MARKED (vbases)) prepare_fresh_vtable (vbases, t); vbases = TREE_CHAIN (vbases); } + #endif { *************** *** 3718,3726 **** while (vbases) { ! /* We might be able to shorten the ammount of work we do by only doing this for vtables that come from virtual bases that have differing offsets, but don't want to miss any entries. */ ! fixup_vtable_deltas (vbases, t); vbases = TREE_CHAIN (vbases); } --- 3722,3730 ---- while (vbases) { ! /* We might be able to shorten the amount of work we do by only doing this for vtables that come from virtual bases that have differing offsets, but don't want to miss any entries. */ ! fixup_vtable_deltas (vbases, 1, t); vbases = TREE_CHAIN (vbases); } *************** *** 3751,3754 **** --- 3755,3767 ---- cp_warning ("Doing hard virtuals for %T...", t); #endif + + if (has_virtual > max_has_virtual) + max_has_virtual = has_virtual; + if (max_has_virtual > 0) + TYPE_VIRTUAL_P (t) = 1; + + if (flag_rtti && TYPE_VIRTUAL_P (t) && !pending_hard_virtuals) + modify_all_vtables (t, NULL_TREE, NULL_TREE); + while (pending_hard_virtuals) { *************** *** 3762,3766 **** /* Under our model of GC, every C++ class gets its own virtual function table, at least virtually. */ ! if (pending_virtuals || CLASSTYPE_DOSSIER (t)) { pending_virtuals = nreverse (pending_virtuals); --- 3775,3779 ---- /* Under our model of GC, every C++ class gets its own virtual function table, at least virtually. */ ! if (pending_virtuals || (flag_rtti && TYPE_VIRTUAL_P (t))) { pending_virtuals = nreverse (pending_virtuals); *************** *** 3768,3778 **** if (first_vfn_base_index < 0) { ! if (flag_dossier) pending_virtuals = tree_cons (NULL_TREE, ! build_vtable_entry (integer_zero_node, ! build_t_desc (t, 0)), ! pending_virtuals); pending_virtuals = tree_cons (NULL_TREE, the_null_vtable_entry, pending_virtuals); build_vtable (NULL_TREE, t); } --- 3781,3799 ---- if (first_vfn_base_index < 0) { ! if (flag_rtti) pending_virtuals = tree_cons (NULL_TREE, ! build_vtable_entry (integer_zero_node, build_t_desc (t, 0)), ! pending_virtuals); ! else ! pending_virtuals = tree_cons (NULL_TREE, ! build_vtable_entry (integer_zero_node, integer_zero_node), ! pending_virtuals); ! ! #if 0 ! /* The size is no longer used. */ ! /* now we put the size of the vtable as first entry */ pending_virtuals = tree_cons (NULL_TREE, the_null_vtable_entry, pending_virtuals); + #endif build_vtable (NULL_TREE, t); } *************** *** 3785,3792 **** build_vtable (TREE_VEC_ELT (TYPE_BINFO_BASETYPES (t), first_vfn_base_index), t); ! /* Update the dossier pointer for this class. */ ! if (flag_dossier) ! TREE_VALUE (TREE_CHAIN (TYPE_BINFO_VIRTUALS (t))) ! = build_vtable_entry (integer_zero_node, build_t_desc (t, 0)); } --- 3806,3817 ---- build_vtable (TREE_VEC_ELT (TYPE_BINFO_BASETYPES (t), first_vfn_base_index), t); ! /* Update the rtti pointer for this class. */ ! if (flag_rtti) ! { ! tree offset = get_derived_offset (TYPE_BINFO (t), NULL_TREE); ! offset = size_binop (MINUS_EXPR, integer_zero_node, offset); ! TREE_VALUE (TYPE_BINFO_VIRTUALS (t)) ! = build_vtable_entry (offset, build_t_desc (t, 0)); ! } } *************** *** 3816,3824 **** } - if (has_virtual > max_has_virtual) - max_has_virtual = has_virtual; if (max_has_virtual || first_vfn_base_index >= 0) { - TYPE_VIRTUAL_P (t) = 1; CLASSTYPE_VSIZE (t) = has_virtual; if (first_vfn_base_index >= 0) --- 3841,3846 ---- *************** *** 3874,3877 **** --- 3896,3900 ---- { TREE_TYPE (TYPE_BINFO_VTABLE (t)) = atype; + DECL_SIZE (TYPE_BINFO_VTABLE (t)) = 0; layout_decl (TYPE_BINFO_VTABLE (t), 0); /* At one time the vtable info was grabbed 2 words at a time. This *************** *** 3927,3936 **** while (x) { - #if 0 /* What's wrong with using the decl the type already has? */ - tree tag = build_decl (TYPE_DECL, TREE_PURPOSE (x), TREE_VALUE (x)); - DECL_CONTEXT (tag) = t; - #else tree tag = TYPE_NAME (TREE_VALUE (x)); ! #endif #ifdef DWARF_DEBUGGING_INFO --- 3950,3962 ---- while (x) { tree tag = TYPE_NAME (TREE_VALUE (x)); ! ! /* Check to see if it is already there. This will be the case if ! was do enum { red; } color; */ ! if (chain_member (tag, TYPE_FIELDS (t))) ! { ! x = TREE_CHAIN (x); ! continue; ! } #ifdef DWARF_DEBUGGING_INFO *************** *** 3971,3975 **** build_class_init_list (t); ! if (! CLASSTYPE_DECLARED_EXCEPTION (t) && ! IS_SIGNATURE (t)) embrace_waiting_friends (t); --- 3997,4001 ---- build_class_init_list (t); ! if (! IS_SIGNATURE (t)) embrace_waiting_friends (t); *************** *** 3980,3990 **** if (CLASSTYPE_VSIZE (t) != 0) { - if ((flag_this_is_variable & 1) == 0) - { - tree vtbl_ptr = build_decl (VAR_DECL, get_identifier (VPTR_NAME), - TREE_TYPE (vfield)); - DECL_REGISTER (vtbl_ptr) = 1; - CLASSTYPE_VTBL_PTR (t) = vtbl_ptr; - } #if 0 /* This is now done above. */ --- 4006,4009 ---- *************** *** 4022,4052 **** finish_vtbls (TYPE_BINFO (t), 1, t); TYPE_BEING_DEFINED (t) = 0; ! ! if (flag_dossier && CLASSTYPE_VTABLE_NEEDS_WRITING (t)) ! { ! tree variants; ! tree tdecl; ! ! /* Now instantiate its type descriptors. */ ! tdecl = TREE_OPERAND (build_t_desc (t, 1), 0); ! variants = TYPE_POINTER_TO (t); ! build_type_variant (variants, 1, 0); ! while (variants) ! { ! build_t_desc (variants, 1); ! variants = TYPE_NEXT_VARIANT (variants); ! } ! variants = build_reference_type (t); ! build_type_variant (variants, 1, 0); ! while (variants) ! { ! build_t_desc (variants, 1); ! variants = TYPE_NEXT_VARIANT (variants); ! } ! DECL_CONTEXT (tdecl) = t; ! } ! /* Still need to instantiate this C struct's type descriptor. */ ! else if (flag_dossier && ! CLASSTYPE_DOSSIER (t)) ! build_t_desc (t, 1); #if 0 --- 4041,4045 ---- finish_vtbls (TYPE_BINFO (t), 1, t); TYPE_BEING_DEFINED (t) = 0; ! hack_incomplete_structures (t); #if 0 *************** *** 4059,4064 **** error ("trying to finish struct, but kicked out due to previous parse errors."); - hack_incomplete_structures (t); - resume_momentary (old); --- 4052,4055 ---- *************** *** 4108,4112 **** /* Finish debugging output for this type. */ ! rest_of_type_compilation (t, global_bindings_p ()); return t; --- 4099,4103 ---- /* Finish debugging output for this type. */ ! rest_of_type_compilation (t, toplevel_bindings_p ()); return t; *************** *** 4342,4346 **** tree item; ! /* Hooray, our cacheing was successful, let's just install the cached class_shadowed list, and walk through it to get the IDENTIFIER_TYPE_VALUEs correct. */ --- 4333,4337 ---- tree item; ! /* Hooray, we successfully cached; let's just install the cached class_shadowed list, and walk through it to get the IDENTIFIER_TYPE_VALUEs correct. */ *************** *** 4434,4475 **** current_class_name = *--current_class_stack; - if (current_class_type) - { - if (CLASSTYPE_VTBL_PTR (current_class_type)) - { - current_vtable_decl - = lookup_name (DECL_NAME (CLASSTYPE_VTBL_PTR (current_class_type)), - 0); - if (current_vtable_decl) - current_vtable_decl = build_indirect_ref (current_vtable_decl, - NULL_PTR); - } - current_class_decl = lookup_name (this_identifier, 0); - if (current_class_decl) - { - if (TREE_CODE (TREE_TYPE (current_class_decl)) == POINTER_TYPE) - { - tree temp; - /* Can't call build_indirect_ref here, because it has special - logic to return C_C_D given this argument. */ - C_C_D = build1 (INDIRECT_REF, current_class_type, current_class_decl); - temp = TREE_TYPE (TREE_TYPE (current_class_decl)); - TREE_READONLY (C_C_D) = TYPE_READONLY (temp); - TREE_SIDE_EFFECTS (C_C_D) = TYPE_VOLATILE (temp); - TREE_THIS_VOLATILE (C_C_D) = TYPE_VOLATILE (temp); - } - else - C_C_D = current_class_decl; - } - else - C_C_D = NULL_TREE; - } - else - { - current_class_decl = NULL_TREE; - current_vtable_decl = NULL_TREE; - C_C_D = NULL_TREE; - } - pop_memoized_context (modify); --- 4425,4428 ---- *************** *** 4655,4659 **** while (field && TREE_TYPE (field) != lhstype) ! field = TREE_CHAIN (field); if (field) { --- 4608,4612 ---- while (field && TREE_TYPE (field) != lhstype) ! field = DECL_CHAIN (field); if (field) { *************** *** 4665,4675 **** field = TREE_OPERAND (rhs, 1); while (field && ! comptypes (lhstype, TREE_TYPE (field), 0)) ! field = TREE_CHAIN (field); if (field) { TREE_OPERAND (rhs, 1) = field; ! field = TREE_CHAIN (field); while (field && ! comptypes (lhstype, TREE_TYPE (field), 0)) ! field = TREE_CHAIN (field); if (field) { --- 4618,4628 ---- field = TREE_OPERAND (rhs, 1); while (field && ! comptypes (lhstype, TREE_TYPE (field), 0)) ! field = DECL_CHAIN (field); if (field) { TREE_OPERAND (rhs, 1) = field; ! field = DECL_CHAIN (field); while (field && ! comptypes (lhstype, TREE_TYPE (field), 0)) ! field = DECL_CHAIN (field); if (field) { *************** *** 4703,4706 **** --- 4656,4662 ---- `default_conversion' might do to lhstype. */ + if (TYPE_PTRMEMFUNC_P (lhstype)) + lhstype = TYPE_PTRMEMFUNC_FN_TYPE (lhstype); + if (TREE_CODE (lhstype) == POINTER_TYPE) if (TREE_CODE (TREE_TYPE (lhstype)) == FUNCTION_TYPE *************** *** 4739,4743 **** int n = TREE_VEC_LENGTH (DECL_TEMPLATE_PARMS (elem)); tree *t = (tree *) alloca (sizeof (tree) * n); ! int i, d; i = type_unification (DECL_TEMPLATE_PARMS (elem), t, TYPE_ARG_TYPES (TREE_TYPE (elem)), --- 4695,4699 ---- int n = TREE_VEC_LENGTH (DECL_TEMPLATE_PARMS (elem)); tree *t = (tree *) alloca (sizeof (tree) * n); ! int i, d = 0; i = type_unification (DECL_TEMPLATE_PARMS (elem), t, TYPE_ARG_TYPES (TREE_TYPE (elem)), *************** *** 4763,4767 **** /* No match found, look for a compatible function. */ elem = get_first_fn (rhs); ! while (elem && ! comp_target_types (lhstype, TREE_TYPE (elem), 1)) elem = DECL_CHAIN (elem); if (elem) --- 4719,4724 ---- /* No match found, look for a compatible function. */ elem = get_first_fn (rhs); ! while (elem && comp_target_types (lhstype, ! TREE_TYPE (elem), 1) <= 0) elem = DECL_CHAIN (elem); if (elem) *************** *** 4769,4774 **** tree save_elem = elem; elem = DECL_CHAIN (elem); ! while (elem && ! comp_target_types (lhstype, TREE_TYPE (elem), ! 0)) elem = DECL_CHAIN (elem); if (elem) --- 4726,4731 ---- tree save_elem = elem; elem = DECL_CHAIN (elem); ! while (elem && comp_target_types (lhstype, ! TREE_TYPE (elem), 0) <= 0) elem = DECL_CHAIN (elem); if (elem) *************** *** 4818,4822 **** return elem; else ! elem = TREE_CHAIN (elem); } --- 4775,4779 ---- return elem; else ! elem = DECL_CHAIN (elem); } *************** *** 4826,4837 **** { elem = TREE_VALUE (baselink); ! while (elem && ! comp_target_types (lhstype, TREE_TYPE (elem), 1)) ! elem = TREE_CHAIN (elem); if (elem) { tree save_elem = elem; ! elem = TREE_CHAIN (elem); ! while (elem && ! comp_target_types (lhstype, TREE_TYPE (elem), 0)) ! elem = TREE_CHAIN (elem); if (elem) { --- 4783,4796 ---- { elem = TREE_VALUE (baselink); ! while (elem && comp_target_types (lhstype, ! TREE_TYPE (elem), 1) <= 0) ! elem = DECL_CHAIN (elem); if (elem) { tree save_elem = elem; ! elem = DECL_CHAIN (elem); ! while (elem && comp_target_types (lhstype, ! TREE_TYPE (elem), 0) <= 0) ! elem = DECL_CHAIN (elem); if (elem) { *************** *** 4858,4863 **** } if (complain) ! error ("no static member functions named `%s'", ! IDENTIFIER_POINTER (name)); return error_mark_node; } --- 4817,4821 ---- } if (complain) ! cp_error ("no compatible member functions named `%D'", name); return error_mark_node; } *************** *** 4917,4921 **** case POSTDECREMENT_EXPR: if (complain) ! error ("illegal operation on uninstantiated type"); return error_mark_node; --- 4875,4879 ---- case POSTDECREMENT_EXPR: if (complain) ! error ("invalid operation on uninstantiated type"); return error_mark_node; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/class.h gcc-2.7.0/cp/class.h *** gcc-2.6.3/cp/class.h Thu May 19 16:15:24 1994 --- gcc-2.7.0/cp/class.h Thu Jun 15 08:16:30 1995 *************** *** 16,20 **** 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. */ /* The following structure is used when comparing various alternatives --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* The following structure is used when comparing various alternatives diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/config-lang.in gcc-2.7.0/cp/config-lang.in *** gcc-2.6.3/cp/config-lang.in Fri Apr 22 03:25:50 1994 --- gcc-2.7.0/cp/config-lang.in Thu Jun 15 17:06:36 1995 *************** *** 1,4 **** # Top level configure fragment for GNU C++. ! # Copyright (C) 1994 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,4 ---- # Top level configure fragment for GNU C++. ! # Copyright (C) 1994, 1995 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 16,20 **** #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. # Configure looks for the existence of this file to auto-config each language. --- 16,21 ---- #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, 59 Temple Place - Suite 330, ! #Boston, MA 02111-1307, USA. # Configure looks for the existence of this file to auto-config each language. *************** *** 28,34 **** language="c++" ! compilers="cc1plus" ! stagestuff="g++ g++-cross cc1plus" diff_excludes="-x cp/parse.c -x cp/parse.h" --- 29,35 ---- language="c++" ! compilers="cc1plus\$(exeext)" ! stagestuff="g++\$(exeext) g++-cross\$(exeext) cc1plus\$(exeext)" diff_excludes="-x cp/parse.c -x cp/parse.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/cp-tree.h gcc-2.7.0/cp/cp-tree.h *** gcc-2.6.3/cp/cp-tree.h Mon Sep 26 16:09:45 1994 --- gcc-2.7.0/cp/cp-tree.h Thu Jun 15 08:17:16 1995 *************** *** 1,4 **** /* Definitions for C++ parsing and type checking. ! Copyright (C) 1987, 1993 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Definitions for C++ parsing and type checking. ! Copyright (C) 1987, 1993, 1994, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ #ifndef _CP_TREE_H --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef _CP_TREE_H *************** *** 115,118 **** --- 116,127 ---- /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only. */ #define C_TYPE_FIELDS_READONLY(type) TYPE_LANG_FLAG_0 (type) + + /* Record in each node resulting from a binary operator + what operator was specified for it. */ + #define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp)) + + /* Store a value in that field. */ + #define C_SET_EXP_ORIGINAL_CODE(exp, code) \ + (TREE_COMPLEXITY (exp) = (int)(code)) /* If non-zero, a VAR_DECL whose cleanup will cause a throw to the *************** *** 272,276 **** extern int flag_elide_constructors; ! /* Nonzero means handle things in ANSI, instead of GNU fashion. */ extern int flag_ansi; --- 281,286 ---- extern int flag_elide_constructors; ! /* Nonzero means enable obscure ANSI features and disable GNU extensions ! that might cause ANSI-compliant code to be miscompiled. */ extern int flag_ansi; *************** *** 370,376 **** #define DERIVED_FROM_P(PARENT, TYPE) (get_base_distance (PARENT, TYPE, 0, (tree *)0) != -1) - enum conversion_type { ptr_conv, constptr_conv, int_conv, - real_conv, last_conversion_type }; - /* Statistics show that while the GNU C++ compiler may generate thousands of different types during a compilation run, it --- 380,383 ---- *************** *** 409,413 **** unsigned interface_unknown : 1; unsigned needs_virtual_reinit : 1; ! unsigned declared_exception : 1; unsigned declared_class : 1; unsigned being_defined : 1; --- 416,420 ---- unsigned interface_unknown : 1; unsigned needs_virtual_reinit : 1; ! unsigned vec_delete_takes_size : 1; unsigned declared_class : 1; unsigned being_defined : 1; *************** *** 443,447 **** unsigned has_complex_init_ref : 1; unsigned has_complex_assign_ref : 1; - unsigned vec_delete_takes_size : 1; unsigned has_abstract_assign_ref : 1; --- 450,453 ---- *************** *** 449,453 **** does not fill out to a multiple of 4 bytes. Add a member `dummy' with new bits if you go over the edge. */ ! unsigned dummy : 19; unsigned n_vancestors : 16; --- 455,459 ---- does not fill out to a multiple of 4 bytes. Add a member `dummy' with new bits if you go over the edge. */ ! unsigned dummy : 20; unsigned n_vancestors : 16; *************** *** 489,500 **** union tree_node *id_as_list; union tree_node *binfo_as_list; - union tree_node *vtbl_ptr; - union tree_node *instance_variable; union tree_node *friend_classes; char *mi_matrix; - union tree_node *conversions[last_conversion_type]; ! union tree_node *dossier; union tree_node *methods; --- 495,503 ---- union tree_node *id_as_list; union tree_node *binfo_as_list; union tree_node *friend_classes; char *mi_matrix; ! union tree_node *rtti; union tree_node *methods; *************** *** 630,635 **** #define SIGNATURE_REFERENCE_TO(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature_reference_to) ! /* The is the VAR_DECL that contains NODE's dossier. */ ! #define CLASSTYPE_DOSSIER(NODE) (TYPE_LANG_SPECIFIC(NODE)->dossier) /* List of all explicit methods (chained using DECL_NEXT_METHOD), --- 633,638 ---- #define SIGNATURE_REFERENCE_TO(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature_reference_to) ! /* The is the VAR_DECL that contains NODE's rtti. */ ! #define CLASSTYPE_RTTI(NODE) (TYPE_LANG_SPECIFIC(NODE)->rtti) /* List of all explicit methods (chained using DECL_NEXT_METHOD), *************** *** 659,662 **** --- 662,673 ---- #define CLASSTYPE_METHOD_VEC(NODE) TYPE_METHODS(NODE) + /* The first type conversion operator in the class (the others can be + searched with TREE_CHAIN), or the first non-constructor function if + there are no type conversion operators. */ + #define CLASSTYPE_FIRST_CONVERSION(NODE) \ + TREE_VEC_LENGTH (CLASSTYPE_METHOD_VEC (NODE)) > 1 \ + ? TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (NODE), 1) \ + : NULL_TREE; + /* Pointer from any member function to the head of the list of member functions of the type that member function belongs to. */ *************** *** 796,805 **** #define CLASSTYPE_BINFO_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->binfo_as_list) - /* Slot in which to cache a copy of the local vtable pointer. */ - #define CLASSTYPE_VTBL_PTR(NODE) (TYPE_LANG_SPECIFIC(NODE)->vtbl_ptr) - - /* Hold the instance object associated with this method. */ - #define CLASSTYPE_INST_VAR(NODE) (TYPE_LANG_SPECIFIC(NODE)->instance_variable) - /* A list of class types with which this type is a friend. */ #define CLASSTYPE_FRIEND_CLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->friend_classes) --- 807,810 ---- *************** *** 809,822 **** #define CLASSTYPE_MI_MATRIX(NODE) (TYPE_LANG_SPECIFIC(NODE)->mi_matrix) - /* If there is exactly one conversion to a non-void, non-const pointer type, - remember that here. If there are more than one, put - `error_mark_node' here. If there are none, this holds NULL_TREE. */ - #define CLASSTYPE_CONVERSION(NODE,KIND) \ - (TYPE_LANG_SPECIFIC(NODE)->conversions[(int) KIND]) - /* Say whether this node was declared as a "class" or a "struct". */ #define CLASSTYPE_DECLARED_CLASS(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.declared_class) - /* Say whether this node was declared as a "class" or a "struct". */ - #define CLASSTYPE_DECLARED_EXCEPTION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.declared_exception) /* whether this can be globalized. */ #define CLASSTYPE_NO_GLOBALIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.no_globalize) --- 814,819 ---- *************** *** 841,844 **** --- 838,844 ---- /* Nonzero if a _DECL node requires us to output debug info for this class. */ #define CLASSTYPE_DEBUG_REQUESTED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.debug_requested) + + #define TYPE_INCOMPLETE(NODE) \ + (TYPE_SIZE (NODE) == NULL_TREE && TREE_CODE (NODE) != TEMPLATE_TYPE_PARM) /* Additional macros for inheritance information. */ *************** *** 922,925 **** --- 922,928 ---- this type can raise. */ #define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_NONCOPIED_PARTS (NODE) + + /* The binding level associated with the namespace. */ + #define NAMESPACE_LEVEL(NODE) ((NODE)->decl.arguments) struct lang_decl_flags *************** *** 948,952 **** unsigned use_template : 2; ! unsigned dummy : 8; tree access; --- 951,959 ---- unsigned use_template : 2; ! unsigned c_static : 1; ! unsigned nonconverting : 1; ! unsigned declared_inline : 1; ! unsigned not_really_extern : 1; ! unsigned dummy : 4; tree access; *************** *** 1033,1036 **** --- 1040,1047 ---- #define DECL_MUTABLE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.mutable_flag) + /* Nonzero for _DECL means that this constructor is a non-converting + constructor. */ + #define DECL_NONCONVERTING_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.nonconverting) + /* Nonzero for FUNCTION_DECL means that this member function exists as part of an abstract class's interface. */ *************** *** 1118,1122 **** #if 0 /* Same, but tells if this field is private in current context. */ ! #define DECL_PRIVATE(NODE) (DECL_LANG_FLAG_5 (NODE)) /* Same, but tells if this field is private in current context. */ --- 1129,1133 ---- #if 0 /* Same, but tells if this field is private in current context. */ ! #define DECL_PRIVATE(NODE) (FOO) /* Same, but tells if this field is private in current context. */ *************** *** 1127,1132 **** /* This _DECL represents a compiler-generated entity. */ ! #define DECL_ARTIFICIAL(NODE) (DECL_SOURCE_LINE (NODE) == 0) ! #define SET_DECL_ARTIFICIAL(NODE) (DECL_SOURCE_LINE (NODE) = 0) /* Record whether a typedef for type `int' was actually `signed int'. */ --- 1138,1142 ---- /* This _DECL represents a compiler-generated entity. */ ! #define SET_DECL_ARTIFICIAL(NODE) (DECL_ARTIFICIAL (NODE) = 1) /* Record whether a typedef for type `int' was actually `signed int'. */ *************** *** 1206,1209 **** --- 1216,1229 ---- #define TYPE_NEEDS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_4(NODE)) + /* Nonzero for class type means that initialization of this type can use + a bitwise copy. */ + #define TYPE_HAS_TRIVIAL_INIT_REF(NODE) \ + (TYPE_HAS_INIT_REF (NODE) && ! TYPE_HAS_COMPLEX_INIT_REF (NODE)) + + /* Nonzero for class type means that assignment of this type can use + a bitwise copy. */ + #define TYPE_HAS_TRIVIAL_ASSIGN_REF(NODE) \ + (TYPE_HAS_ASSIGN_REF (NODE) && ! TYPE_HAS_COMPLEX_ASSIGN_REF (NODE)) + /* Nonzero for _TYPE node means that this type is a pointer to member function type. */ *************** *** 1222,1229 **** #define PFN_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, 0, 0), pfn_identifier, 0, 0)) ! /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `external' was specified in its declaration. */ #define DECL_THIS_EXTERN(NODE) (DECL_LANG_FLAG_2(NODE)) /* Nonzero for SAVE_EXPR if used to initialize a PARM_DECL. */ #define PARM_DECL_EXPR(NODE) (TREE_LANG_FLAG_2(NODE)) --- 1242,1253 ---- #define PFN_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, 0, 0), pfn_identifier, 0, 0)) ! /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was specified in its declaration. */ #define DECL_THIS_EXTERN(NODE) (DECL_LANG_FLAG_2(NODE)) + /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `static' was + specified in its declaration. */ + #define DECL_THIS_STATIC(NODE) (DECL_LANG_FLAG_6(NODE)) + /* Nonzero for SAVE_EXPR if used to initialize a PARM_DECL. */ #define PARM_DECL_EXPR(NODE) (TREE_LANG_FLAG_2(NODE)) *************** *** 1323,1326 **** --- 1347,1374 ---- (CLASSTYPE_USE_TEMPLATE(NODE) = 3) + /* We know what we're doing with this decl now. */ + #define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE) + + /* This decl was declared or deduced to have internal linkage. This is + only meaningful if TREE_PUBLIC is set. */ + #define DECL_C_STATIC(NODE) \ + (DECL_LANG_SPECIFIC (NODE)->decl_flags.c_static) + + /* This function was declared inline. This flag controls the linkage + semantics of 'inline'; whether or not the function is inlined is + controlled by DECL_INLINE. */ + #define DECL_THIS_INLINE(NODE) \ + (DECL_LANG_SPECIFIC (NODE)->decl_flags.declared_inline) + + /* DECL_EXTERNAL must be set on a decl until the decl is actually emitted, + so that assemble_external will work properly. So we have this flag to + tell us whether the decl is really not external. */ + #define DECL_NOT_REALLY_EXTERN(NODE) \ + (DECL_LANG_SPECIFIC (NODE)->decl_flags.not_really_extern) + + #define DECL_PUBLIC(NODE) \ + (TREE_CODE (NODE) == FUNCTION_DECL \ + ? ! DECL_C_STATIC (NODE) : TREE_PUBLIC (NODE)) + #define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i) *************** *** 1331,1335 **** /* An enumeration of the kind of tags that C++ accepts. */ enum tag_types { record_type, class_type, union_type, enum_type, ! exception_type, signature_type }; /* Zero means prototype weakly, as in ANSI C (no args means nothing). --- 1379,1383 ---- /* An enumeration of the kind of tags that C++ accepts. */ enum tag_types { record_type, class_type, union_type, enum_type, ! signature_type }; /* Zero means prototype weakly, as in ANSI C (no args means nothing). *************** *** 1353,1357 **** /* in c-common.c */ extern void declare_function_name PROTO((void)); ! extern void decl_attributes PROTO((tree, tree)); extern void init_function_format_info PROTO((void)); extern void record_function_format PROTO((tree, tree, int, int, int)); --- 1401,1405 ---- /* in c-common.c */ extern void declare_function_name PROTO((void)); ! extern void decl_attributes PROTO((tree, tree, tree)); extern void init_function_format_info PROTO((void)); extern void record_function_format PROTO((tree, tree, int, int, int)); *************** *** 1388,1393 **** extern tree vtable_entry_type; extern tree sigtable_entry_type; ! extern tree __t_desc_type_node, __i_desc_type_node, __m_desc_type_node; ! extern tree Type_info_type_node; extern tree class_star_type_node; extern tree this_identifier; --- 1436,1447 ---- extern tree vtable_entry_type; extern tree sigtable_entry_type; ! extern tree __t_desc_type_node; ! extern tree __tp_desc_type_node; ! extern tree __access_mode_type_node; ! extern tree __bltn_desc_type_node, __user_desc_type_node; ! extern tree __class_desc_type_node, __attr_desc_type_node; ! extern tree __ptr_desc_type_node, __func_desc_type_node; ! extern tree __ptmf_desc_type_node, __ptmd_desc_type_node; ! extern tree type_info_type_node; extern tree class_star_type_node; extern tree this_identifier; *************** *** 1403,1411 **** extern tree ptr_type_node, const_ptr_type_node; extern tree class_type_node, record_type_node, union_type_node, enum_type_node; ! extern tree exception_type_node, unknown_type_node; extern tree opaque_type_node, signature_type_node; /* Node for "pointer to (virtual) function". ! This may be distinct from ptr_type_node so gdb can distinuish them. */ #define vfunc_ptr_type_node \ (flag_vtable_thunks ? vtable_entry_type : ptr_type_node) --- 1457,1465 ---- extern tree ptr_type_node, const_ptr_type_node; extern tree class_type_node, record_type_node, union_type_node, enum_type_node; ! extern tree unknown_type_node; extern tree opaque_type_node, signature_type_node; /* Node for "pointer to (virtual) function". ! This may be distinct from ptr_type_node so gdb can distinguish them. */ #define vfunc_ptr_type_node \ (flag_vtable_thunks ? vtable_entry_type : ptr_type_node) *************** *** 1418,1427 **** /* For building calls to `delete'. */ extern tree integer_two_node, integer_three_node; ! extern tree bool_type_node, true_node, false_node; ! ! /* in except.c */ ! extern tree current_exception_type; ! extern tree current_exception_decl; ! extern tree current_exception_object; /* in pt.c */ --- 1472,1476 ---- /* For building calls to `delete'. */ extern tree integer_two_node, integer_three_node; ! extern tree boolean_type_node, boolean_true_node, boolean_false_node; /* in pt.c */ *************** *** 1457,1462 **** }; - extern struct tinst_level *current_tinst_level; - /* in class.c */ extern tree current_class_name; --- 1506,1509 ---- *************** *** 1471,1475 **** extern tree current_class_name, current_class_type, current_class_decl, C_C_D; - extern tree current_vtable_decl; /* in init.c */ --- 1518,1521 ---- *************** *** 1716,1722 **** extern int flag_gc; ! /* Nonzero means generate 'dossiers' that give run-time type information. */ ! extern int flag_dossier; /* Nonzero means do emit exported implementations of functions even if --- 1762,1768 ---- extern int flag_gc; ! /* Nonzero means generate 'rtti' that give run-time type information. */ ! extern int flag_rtti; /* Nonzero means do emit exported implementations of functions even if *************** *** 1733,1737 **** extern int flag_alt_external_templates; ! /* Nonzero means implicit template instantatiations are emitted. */ extern int flag_implicit_templates; --- 1779,1783 ---- extern int flag_alt_external_templates; ! /* Nonzero means implicit template instantiations are emitted. */ extern int flag_implicit_templates; *************** *** 1771,1774 **** --- 1817,1824 ---- LOOKUP_HAS_IN_CHARGE means that the "in charge" variable is already in the parameter list. + LOOKUP_ONLYCONVERTING means that non-conversion constructors are not tried. + LOOKUP_SPECULATIVELY means return NULL_TREE if we cannot find what we are + after. Note, LOOKUP_COMPLAIN is checked and error messages printed + before LOOKUP_SPECULATIVELY is checked. LOOKUP_NO_CONVERSION means that user-defined conversions are not permitted. Built-in conversions are permitted. *************** *** 1783,1787 **** #define LOOKUP_HAS_IN_CHARGE (32) #define LOOKUP_SPECULATIVELY (64) ! /* 128 & 256 are free */ #define LOOKUP_NO_CONVERSION (512) #define LOOKUP_DESTRUCTOR (512) --- 1833,1838 ---- #define LOOKUP_HAS_IN_CHARGE (32) #define LOOKUP_SPECULATIVELY (64) ! #define LOOKUP_ONLYCONVERTING (128) ! /* 256 is free */ #define LOOKUP_NO_CONVERSION (512) #define LOOKUP_DESTRUCTOR (512) *************** *** 1792,1796 **** CONV_CONST : Perform the explicit conversions for const_cast. CONV_REINTERPRET: Perform the explicit conversions for reinterpret_cast. ! CONV_PRIVATE : Perform upcasts to private bases. */ #define CONV_IMPLICIT 1 --- 1843,1850 ---- CONV_CONST : Perform the explicit conversions for const_cast. CONV_REINTERPRET: Perform the explicit conversions for reinterpret_cast. ! CONV_PRIVATE : Perform upcasts to private bases. ! CONV_NONCONVERTING : Allow non-converting constructors to be used. ! CONV_FORCE_TEMP : Require a new temporary when converting to the same ! aggregate type. */ #define CONV_IMPLICIT 1 *************** *** 1799,1808 **** #define CONV_REINTERPRET 8 #define CONV_PRIVATE 16 ! #define CONV_STATIC_CAST (CONV_IMPLICIT | CONV_STATIC) #define CONV_OLD_CONVERT (CONV_IMPLICIT | CONV_STATIC | CONV_CONST \ | CONV_REINTERPRET) #define CONV_C_CAST (CONV_IMPLICIT | CONV_STATIC | CONV_CONST \ ! | CONV_REINTERPRET | CONV_PRIVATE) /* Anatomy of a DECL_FRIENDLIST (which is a TREE_LIST): purpose = friend name (IDENTIFIER_NODE); --- 1853,1875 ---- #define CONV_REINTERPRET 8 #define CONV_PRIVATE 16 ! #define CONV_NONCONVERTING 32 ! #define CONV_FORCE_TEMP 64 ! #define CONV_STATIC_CAST (CONV_IMPLICIT | CONV_STATIC | CONV_FORCE_TEMP) #define CONV_OLD_CONVERT (CONV_IMPLICIT | CONV_STATIC | CONV_CONST \ | CONV_REINTERPRET) #define CONV_C_CAST (CONV_IMPLICIT | CONV_STATIC | CONV_CONST \ ! | CONV_REINTERPRET | CONV_PRIVATE | CONV_FORCE_TEMP) ! ! /* Used by build_expr_type_conversion to indicate which types are ! acceptable as arguments to the expression under consideration. */ + #define WANT_INT 1 /* integer types, including bool */ + #define WANT_FLOAT 2 /* floating point types */ + #define WANT_ENUM 4 /* enumerated types */ + #define WANT_POINTER 8 /* pointer types */ + #define WANT_NULL 16 /* null pointer constant */ + + #define WANT_ARITH (WANT_INT | WANT_FLOAT) + /* Anatomy of a DECL_FRIENDLIST (which is a TREE_LIST): purpose = friend name (IDENTIFIER_NODE); *************** *** 1879,1890 **** extern tree convert_pointer_to_vbase PROTO((tree, tree)); extern tree convert PROTO((tree, tree)); ! extern tree convert_force PROTO((tree, tree)); extern tree build_type_conversion PROTO((enum tree_code, tree, tree, int)); extern int build_default_binary_type_conversion PROTO((enum tree_code, tree *, tree *)); - extern int build_default_unary_type_conversion PROTO((enum tree_code, tree *)); extern tree type_promotes_to PROTO((tree)); /* decl.c */ extern int global_bindings_p PROTO((void)); extern void keep_next_level PROTO((void)); extern int kept_level_p PROTO((void)); --- 1946,1959 ---- extern tree convert_pointer_to_vbase PROTO((tree, tree)); extern tree convert PROTO((tree, tree)); ! extern tree cp_convert PROTO((tree, tree, int, int)); ! extern tree convert_force PROTO((tree, tree, int)); extern tree build_type_conversion PROTO((enum tree_code, tree, tree, int)); + extern tree build_expr_type_conversion PROTO((int, tree, int)); extern int build_default_binary_type_conversion PROTO((enum tree_code, tree *, tree *)); extern tree type_promotes_to PROTO((tree)); /* decl.c */ extern int global_bindings_p PROTO((void)); + extern int toplevel_bindings_p PROTO((void)); extern void keep_next_level PROTO((void)); extern int kept_level_p PROTO((void)); *************** *** 1920,1923 **** --- 1989,1993 ---- extern void push_overloaded_decl_top_level PROTO((tree, int)); extern tree pushdecl_class_level PROTO((tree)); + extern tree pushdecl_nonclass_level PROTO((tree)); extern int overloaded_globals_p PROTO((tree)); extern tree push_overloaded_decl PROTO((tree, int)); *************** *** 1932,1935 **** --- 2002,2006 ---- extern tree typedecl_for_tag PROTO((tree)); extern tree lookup_name PROTO((tree, int)); + extern tree lookup_namespace_name PROTO((tree, tree)); extern tree lookup_name_current_level PROTO((tree)); extern void init_decl_processing PROTO((void)); *************** *** 1939,1943 **** extern tree groktypename PROTO((tree)); extern tree start_decl PROTO((tree, tree, int, tree)); ! extern void finish_decl PROTO((tree, tree, tree, int)); extern void expand_static_init PROTO((tree, tree)); extern int complete_array_type PROTO((tree, tree, int)); --- 2010,2014 ---- extern tree groktypename PROTO((tree)); extern tree start_decl PROTO((tree, tree, int, tree)); ! extern void cp_finish_decl PROTO((tree, tree, tree, int, int)); extern void expand_static_init PROTO((tree, tree)); extern int complete_array_type PROTO((tree, tree, int)); *************** *** 1945,1950 **** extern tree grokdeclarator (); /* PROTO((tree, tree, enum decl_context, int, tree)); */ extern int parmlist_is_exprlist PROTO((tree)); - extern tree xref_defn_tag PROTO((tree, tree, tree)); extern tree xref_tag PROTO((tree, tree, tree, int)); extern tree start_enum PROTO((tree)); extern tree finish_enum PROTO((tree, tree)); --- 2016,2021 ---- extern tree grokdeclarator (); /* PROTO((tree, tree, enum decl_context, int, tree)); */ extern int parmlist_is_exprlist PROTO((tree)); extern tree xref_tag PROTO((tree, tree, tree, int)); + extern void xref_basetypes PROTO((tree, tree, tree, tree)); extern tree start_enum PROTO((tree)); extern tree finish_enum PROTO((tree, tree)); *************** *** 1954,1958 **** extern void store_parm_decls PROTO((void)); extern void store_return_init PROTO((tree, tree)); ! extern void finish_function PROTO((int, int)); extern tree start_method PROTO((tree, tree, tree)); extern tree finish_method PROTO((tree)); --- 2025,2029 ---- extern void store_parm_decls PROTO((void)); extern void store_return_init PROTO((tree, tree)); ! extern void finish_function PROTO((int, int, int)); extern tree start_method PROTO((tree, tree, tree)); extern tree finish_method PROTO((tree)); *************** *** 1978,1981 **** --- 2049,2053 ---- extern tree grokoptypename PROTO((tree, tree)); extern tree build_push_scope PROTO((tree, tree)); + extern void cplus_decl_attributes PROTO((tree, tree, tree)); extern tree constructor_name_full PROTO((tree)); extern tree constructor_name PROTO((tree)); *************** *** 1993,1997 **** extern void walk_sigtables PROTO((void (*)(), void (*)())); extern void finish_file PROTO((void)); ! extern void warn_if_unknown_interface PROTO((void)); extern tree grok_x_components PROTO((tree, tree)); extern tree reparse_absdcl_as_expr PROTO((tree, tree)); --- 2065,2069 ---- extern void walk_sigtables PROTO((void (*)(), void (*)())); extern void finish_file PROTO((void)); ! extern void warn_if_unknown_interface PROTO((tree)); extern tree grok_x_components PROTO((tree, tree)); extern tree reparse_absdcl_as_expr PROTO((tree, tree)); *************** *** 2001,2011 **** extern tree lookup_name_nonclass PROTO((tree)); extern tree check_cp_case_value PROTO((tree)); /* in edsel.c */ /* in except.c */ ! extern void start_protect PROTO((void)); extern void end_protect PROTO((tree)); extern void expand_exception_blocks PROTO((void)); extern void expand_start_try_stmts PROTO((void)); --- 2073,2088 ---- extern tree lookup_name_nonclass PROTO((tree)); extern tree check_cp_case_value PROTO((tree)); + extern tree do_toplevel_using_decl PROTO((tree)); + extern tree do_class_using_decl PROTO((tree)); + extern tree current_namespace_id PROTO((tree)); + extern tree get_namespace_id PROTO((void)); /* in edsel.c */ /* in except.c */ ! extern tree protect_list; extern void start_protect PROTO((void)); extern void end_protect PROTO((tree)); + extern void end_protect_partials (); extern void expand_exception_blocks PROTO((void)); extern void expand_start_try_stmts PROTO((void)); *************** *** 2016,2020 **** extern void end_catch_block PROTO((void)); extern void expand_throw PROTO((tree)); ! extern int build_exception_table PROTO((void)); extern tree build_throw PROTO((tree)); extern void init_exception_processing PROTO((void)); --- 2093,2098 ---- extern void end_catch_block PROTO((void)); extern void expand_throw PROTO((tree)); ! extern int might_have_exceptions_p PROTO((void)); ! extern void emit_exception_table PROTO((void)); extern tree build_throw PROTO((tree)); extern void init_exception_processing PROTO((void)); *************** *** 2049,2053 **** extern void do_member_init PROTO((tree, tree, tree)); extern void expand_member_init PROTO((tree, tree, tree)); ! extern void expand_aggr_init PROTO((tree, tree, int)); extern int is_aggr_typedef PROTO((tree, int)); extern tree get_aggr_from_typedef PROTO((tree, int)); --- 2127,2131 ---- extern void do_member_init PROTO((tree, tree, tree)); extern void expand_member_init PROTO((tree, tree, tree)); ! extern void expand_aggr_init PROTO((tree, tree, int, int)); extern int is_aggr_typedef PROTO((tree, int)); extern tree get_aggr_from_typedef PROTO((tree, int)); *************** *** 2056,2060 **** extern tree build_offset_ref PROTO((tree, tree)); extern tree get_member_function PROTO((tree *, tree, tree)); ! extern tree get_member_function_from_ptrfunc PROTO((tree *, tree, tree)); extern tree resolve_offset_ref PROTO((tree)); extern tree decl_constant_value PROTO((tree)); --- 2134,2138 ---- extern tree build_offset_ref PROTO((tree, tree)); extern tree get_member_function PROTO((tree *, tree, tree)); ! extern tree get_member_function_from_ptrfunc PROTO((tree *, tree)); extern tree resolve_offset_ref PROTO((tree)); extern tree decl_constant_value PROTO((tree)); *************** *** 2219,2222 **** --- 2297,2301 ---- extern void reinit_search_statistics PROTO((void)); extern tree current_scope PROTO((void)); + extern tree lookup_conversions PROTO((tree)); /* in sig.c */ *************** *** 2256,2260 **** extern tree list_hash_lookup_or_cons PROTO((tree)); extern tree make_binfo PROTO((tree, tree, tree, tree, tree)); - extern tree copy_binfo PROTO((tree)); extern tree binfo_value PROTO((tree, tree)); extern tree reverse_path PROTO((tree)); --- 2335,2338 ---- *************** *** 2279,2285 **** extern tree array_type_nelts_total PROTO((tree)); extern tree array_type_nelts_top PROTO((tree)); /* in typeck.c */ ! extern tree bool_truthvalue_conversion PROTO((tree)); extern tree target_type PROTO((tree)); extern tree require_complete_type PROTO((tree)); --- 2357,2364 ---- extern tree array_type_nelts_total PROTO((tree)); extern tree array_type_nelts_top PROTO((tree)); + extern tree break_out_target_exprs PROTO((tree)); /* in typeck.c */ ! extern tree condition_conversion PROTO((tree)); extern tree target_type PROTO((tree)); extern tree require_complete_type PROTO((tree)); *************** *** 2330,2334 **** extern tree build_reinterpret_cast PROTO((tree, tree)); extern tree build_const_cast PROTO((tree, tree)); ! extern tree build_c_cast PROTO((tree, tree)); extern tree build_modify_expr PROTO((tree, enum tree_code, tree)); extern int language_lvalue_valid PROTO((tree)); --- 2409,2413 ---- extern tree build_reinterpret_cast PROTO((tree, tree)); extern tree build_const_cast PROTO((tree, tree)); ! extern tree build_c_cast PROTO((tree, tree, int)); extern tree build_modify_expr PROTO((tree, enum tree_code, tree)); extern int language_lvalue_valid PROTO((tree)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/cvt.c gcc-2.7.0/cp/cvt.c *** gcc-2.6.3/cp/cvt.c Mon Nov 14 23:33:28 1994 --- gcc-2.7.0/cp/cvt.c Thu Jun 15 08:18:06 1995 *************** *** 1,4 **** /* Language-level data type conversion for GNU C++. ! Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Language-level data type conversion for GNU C++. ! Copyright (C) 1987, 1988, 1992, 1993, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 82,102 **** tree type, expr; { ! tree binfo = get_binfo (TYPE_METHOD_BASETYPE (TREE_TYPE (TREE_TYPE (expr))), ! TYPE_METHOD_BASETYPE (TREE_TYPE (type)), ! 1); ! if (binfo == error_mark_node) { ! error (" in pointer to member conversion"); ! return error_mark_node; ! } ! if (binfo == NULL_TREE) ! { ! /* ARM 4.8 restriction. */ ! error ("invalid pointer to member conversion"); ! return error_mark_node; } ! if (BINFO_OFFSET_ZEROP (binfo)) ! return build1 (NOP_EXPR, type, expr); ! return build1 (NOP_EXPR, type, build_thunk (BINFO_OFFSET (binfo), expr)); } --- 83,109 ---- tree type, expr; { ! if (flag_vtable_thunks) { ! tree intype = TREE_TYPE (expr); ! tree binfo = get_binfo (TYPE_METHOD_BASETYPE (TREE_TYPE (intype)), ! TYPE_METHOD_BASETYPE (TREE_TYPE (type)), 1); ! if (binfo == error_mark_node) ! { ! error (" in pointer to member conversion"); ! return error_mark_node; ! } ! if (binfo == NULL_TREE) ! { ! /* ARM 4.8 restriction. */ ! error ("invalid pointer to member conversion"); ! return error_mark_node; ! } ! ! if (BINFO_OFFSET_ZEROP (binfo)) ! return build1 (NOP_EXPR, type, expr); ! return build1 (NOP_EXPR, type, build_thunk (BINFO_OFFSET (binfo), expr)); } ! else ! return build_ptrmemfunc (type, expr, 1); } *************** *** 112,118 **** { register tree intype = TREE_TYPE (expr); ! register enum tree_code form = TREE_CODE (intype); ! ! if (form == POINTER_TYPE) { intype = TYPE_MAIN_VARIANT (intype); --- 119,132 ---- { register tree intype = TREE_TYPE (expr); ! register enum tree_code form; ! ! if (TYPE_PTRMEMFUNC_P (type)) ! type = TYPE_PTRMEMFUNC_FN_TYPE (type); ! if (TYPE_PTRMEMFUNC_P (intype)) ! intype = TYPE_PTRMEMFUNC_FN_TYPE (intype); ! ! form = TREE_CODE (intype); ! ! if (form == POINTER_TYPE || form == REFERENCE_TYPE) { intype = TYPE_MAIN_VARIANT (intype); *************** *** 150,159 **** } } ! if (TYPE_MAIN_VARIANT (type) != intype ! && TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE && TREE_CODE (type) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (intype)) == METHOD_TYPE) return convert_fn_ptr (type, expr); return build1 (NOP_EXPR, type, expr); } --- 164,184 ---- } } ! if (TREE_CODE (TREE_TYPE (intype)) == METHOD_TYPE && TREE_CODE (type) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE) return convert_fn_ptr (type, expr); + if (TREE_CODE (TREE_TYPE (type)) == OFFSET_TYPE + && TREE_CODE (TREE_TYPE (intype)) == OFFSET_TYPE) + { + tree b1 = TYPE_OFFSET_BASETYPE (TREE_TYPE (type)); + tree b2 = TYPE_OFFSET_BASETYPE (TREE_TYPE (intype)); + tree binfo = get_binfo (b1, b2, 1); + if (binfo == NULL_TREE) + binfo = get_binfo (b2, b1, 1); + if (binfo == error_mark_node) + return error_mark_node; + } + return build1 (NOP_EXPR, type, expr); } *************** *** 310,313 **** --- 335,342 ---- if (TREE_CODE (targ) == SAVE_EXPR) targ = TREE_OPERAND (targ, 0); + while (TREE_CODE (targ) == NOP_EXPR + && (TYPE_MAIN_VARIANT (argtype) + == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (targ, 0))))) + targ = TREE_OPERAND (targ, 0); switch (TREE_CODE (targ)) *************** *** 515,518 **** --- 544,559 ---- LOOKUP_PROTECT, checkconst)); + /* Undo the folding... */ + case MIN_EXPR: + case MAX_EXPR: + return build (COND_EXPR, type, + build (TREE_CODE (targ) == MIN_EXPR ? LT_EXPR : GT_EXPR, + boolean_type_node, TREE_OPERAND (targ, 0), + TREE_OPERAND (targ, 1)), + build_up_reference (type, TREE_OPERAND (targ, 0), + LOOKUP_PROTECT, checkconst), + build_up_reference (type, TREE_OPERAND (targ, 1), + LOOKUP_PROTECT, checkconst)); + case WITH_CLEANUP_EXPR: return build (WITH_CLEANUP_EXPR, type, *************** *** 554,563 **** { temp = get_temp_name (argtype, 0); ! if (global_bindings_p ()) { /* Give this new temp some rtl and initialize it. */ DECL_INITIAL (temp) = targ; TREE_STATIC (temp) = 1; ! finish_decl (temp, targ, NULL_TREE, 0); /* Do this after declaring it static. */ rval = build_unary_op (ADDR_EXPR, temp, 0); --- 595,604 ---- { temp = get_temp_name (argtype, 0); ! if (toplevel_bindings_p ()) { /* Give this new temp some rtl and initialize it. */ DECL_INITIAL (temp) = targ; TREE_STATIC (temp) = 1; ! cp_finish_decl (temp, targ, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); /* Do this after declaring it static. */ rval = build_unary_op (ADDR_EXPR, temp, 0); *************** *** 594,597 **** --- 635,641 ---- = convert_to_pointer_force (build_pointer_type (target_type), rval); TREE_TYPE (rval) = type; + if (TREE_CODE (rval) == PLUS_EXPR || TREE_CODE (rval) == MINUS_EXPR) + TREE_TYPE (TREE_OPERAND (rval, 0)) + = TREE_TYPE (TREE_OPERAND (rval, 1)) = type; } TREE_CONSTANT (rval) = literal_flag; *************** *** 606,611 **** we know it's an initialization. */ - tree cp_convert PROTO((tree, tree, int, int)); - tree convert_to_reference (reftype, expr, convtype, flags, decl) --- 650,653 ---- *************** *** 616,628 **** register tree type = TYPE_MAIN_VARIANT (TREE_TYPE (reftype)); register tree intype = TREE_TYPE (expr); - register enum tree_code form = TREE_CODE (intype); tree rval = NULL_TREE; ! if (form == REFERENCE_TYPE) ! intype = TREE_TYPE (intype); intype = TYPE_MAIN_VARIANT (intype); ! if (((convtype & CONV_STATIC) && comptypes (type, intype, -1)) ! || ((convtype & CONV_IMPLICIT) && comptypes (type, intype, 0))) { if (flags & LOOKUP_COMPLAIN) --- 658,691 ---- register tree type = TYPE_MAIN_VARIANT (TREE_TYPE (reftype)); register tree intype = TREE_TYPE (expr); tree rval = NULL_TREE; + tree rval_as_conversion = NULL_TREE; + int i; ! if (TREE_CODE (intype) == REFERENCE_TYPE) ! my_friendly_abort (364); ! intype = TYPE_MAIN_VARIANT (intype); ! i = comp_target_types (type, intype, 0); ! ! if (i <= 0 && (convtype & CONV_IMPLICIT) && IS_AGGR_TYPE (intype) ! && ! (flags & LOOKUP_NO_CONVERSION)) ! { ! /* Look for a user-defined conversion to lvalue that we can use. */ ! ! rval_as_conversion = build_type_conversion (CONVERT_EXPR, type, expr, 1); ! ! if (rval_as_conversion && rval_as_conversion != error_mark_node ! && real_lvalue_p (rval_as_conversion)) ! { ! expr = rval_as_conversion; ! rval_as_conversion = NULL_TREE; ! intype = type; ! i = 1; ! } ! } ! ! if (((convtype & CONV_STATIC) && i == -1) ! || ((convtype & CONV_IMPLICIT) && i == 1)) { if (flags & LOOKUP_COMPLAIN) *************** *** 631,644 **** tree ttr; ! if (form == REFERENCE_TYPE) ! ttr = TREE_TYPE (TREE_TYPE (expr)); ! else ! { ! int r = TREE_READONLY (expr); ! int v = TREE_THIS_VOLATILE (expr); ! ttr = cp_build_type_variant (TREE_TYPE (expr), r, v); ! } ! if (! lvalue_p (expr) && (decl == NULL_TREE || ! TYPE_READONLY (ttl))) { --- 694,704 ---- tree ttr; ! { ! int r = TREE_READONLY (expr); ! int v = TREE_THIS_VOLATILE (expr); ! ttr = cp_build_type_variant (TREE_TYPE (expr), r, v); ! } ! if (! real_lvalue_p (expr) && (decl == NULL_TREE || ! TYPE_READONLY (ttl))) { *************** *** 662,691 **** } - if (form == REFERENCE_TYPE) - { - tree type = TREE_TYPE (expr); - tree tmp = copy_node (expr); - TREE_TYPE (tmp) = build_pointer_type (TREE_TYPE (TREE_TYPE (expr))); - rval = cp_convert (build_pointer_type (TREE_TYPE (reftype)), tmp, - convtype, flags); - TREE_TYPE (tmp) = type; - TREE_TYPE (rval) = reftype; - return rval; - } - return build_up_reference (reftype, expr, flags, ! (convtype & CONV_CONST)); } - - if ((convtype & CONV_IMPLICIT) - && IS_AGGR_TYPE (intype) - && ! (flags & LOOKUP_NO_CONVERSION) - && (rval = build_type_conversion (CONVERT_EXPR, reftype, expr, 1))) - { - if (rval == error_mark_node) - cp_error ("conversion from `%T' to `%T' is ambiguous", - intype, reftype); - return rval; - } else if ((convtype & CONV_REINTERPRET) && lvalue_p (expr)) { --- 722,728 ---- *************** *** 695,701 **** should be done directly (jason). (int &)ri ---> *(int*)&ri */ ! /* B* bp; A& ar = (A&)bp; is legal, but it's probably not what they meant. */ ! if (form == POINTER_TYPE && (comptypes (TREE_TYPE (intype), type, -1))) cp_warning ("casting `%T' to `%T' does not dereference pointer", --- 732,738 ---- should be done directly (jason). (int &)ri ---> *(int*)&ri */ ! /* B* bp; A& ar = (A&)bp; is valid, but it's probably not what they meant. */ ! if (TREE_CODE (intype) == POINTER_TYPE && (comptypes (TREE_TYPE (intype), type, -1))) cp_warning ("casting `%T' to `%T' does not dereference pointer", *************** *** 704,708 **** rval = build_unary_op (ADDR_EXPR, expr, 0); if (rval != error_mark_node) ! rval = convert_force (build_pointer_type (TREE_TYPE (reftype)), rval); if (rval != error_mark_node) rval = build1 (NOP_EXPR, reftype, rval); --- 741,745 ---- rval = build_unary_op (ADDR_EXPR, expr, 0); if (rval != error_mark_node) ! rval = convert_force (build_pointer_type (TREE_TYPE (reftype)), rval, 0); if (rval != error_mark_node) rval = build1 (NOP_EXPR, reftype, rval); *************** *** 710,723 **** else if (decl) { - tree rval_as_conversion = NULL_TREE; tree rval_as_ctor = NULL_TREE; ! if (IS_AGGR_TYPE (intype) ! && (rval = build_type_conversion (CONVERT_EXPR, type, expr, 1))) { ! if (rval == error_mark_node) ! return rval; ! ! rval_as_conversion = build_up_reference (reftype, rval, flags, 1); } --- 747,762 ---- else if (decl) { tree rval_as_ctor = NULL_TREE; ! if (rval_as_conversion) { ! if (rval_as_conversion == error_mark_node) ! { ! cp_error ("conversion from `%T' to `%T' is ambiguous", ! intype, reftype); ! return error_mark_node; ! } ! rval_as_conversion = build_up_reference (reftype, rval_as_conversion, ! flags, 1); } *************** *** 728,743 **** (NULL_TREE, constructor_name_full (type), build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), ! LOOKUP_NO_CONVERSION|LOOKUP_SPECULATIVELY))) { tree init; ! if (global_bindings_p ()) { extern tree static_aggregates; ! tree t = get_temp_name (type, global_bindings_p ()); init = build_method_call (t, constructor_name_full (type), build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), ! LOOKUP_NORMAL|LOOKUP_NO_CONVERSION); if (init == error_mark_node) --- 767,784 ---- (NULL_TREE, constructor_name_full (type), build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), ! LOOKUP_NO_CONVERSION|LOOKUP_SPECULATIVELY ! | LOOKUP_ONLYCONVERTING))) { tree init; ! if (toplevel_bindings_p ()) { extern tree static_aggregates; ! tree t = get_temp_name (type, toplevel_bindings_p ()); init = build_method_call (t, constructor_name_full (type), build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), ! LOOKUP_NORMAL|LOOKUP_NO_CONVERSION ! | LOOKUP_ONLYCONVERTING); if (init == error_mark_node) *************** *** 753,757 **** build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), ! LOOKUP_NORMAL|LOOKUP_NO_CONVERSION); if (init == error_mark_node) --- 794,799 ---- build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), ! LOOKUP_NORMAL|LOOKUP_NO_CONVERSION ! |LOOKUP_ONLYCONVERTING); if (init == error_mark_node) *************** *** 794,805 **** } ! my_friendly_assert (form != OFFSET_TYPE, 189); if (flags & LOOKUP_SPECULATIVELY) return NULL_TREE; - else if (flags & LOOKUP_COMPLAIN) - cp_error ("cannot convert type `%T' to type `%T'", intype, reftype); - return error_mark_node; } --- 836,847 ---- } ! my_friendly_assert (TREE_CODE (intype) != OFFSET_TYPE, 189); ! ! if (flags & LOOKUP_COMPLAIN) ! cp_error ("cannot convert type `%T' to type `%T'", intype, reftype); if (flags & LOOKUP_SPECULATIVELY) return NULL_TREE; return error_mark_node; } *************** *** 815,842 **** if (TREE_CODE (type) == OFFSET_TYPE) type = TREE_TYPE (type); ! if (TREE_CODE (type) == REFERENCE_TYPE) ! { ! tree target_type = TREE_TYPE (type); ! tree nval; ! ! /* This can happen if we cast to a reference type. */ ! if (TREE_CODE (val) == ADDR_EXPR) ! { ! nval = build1 (NOP_EXPR, build_pointer_type (target_type), val); ! nval = build_indirect_ref (nval, NULL_PTR); ! /* The below was missing, are other important flags missing too? */ ! TREE_SIDE_EFFECTS (nval) = TREE_SIDE_EFFECTS (val); ! return nval; ! } ! ! nval = build1 (INDIRECT_REF, target_type, val); ! ! TREE_THIS_VOLATILE (nval) = TYPE_VOLATILE (target_type); ! TREE_SIDE_EFFECTS (nval) = TYPE_VOLATILE (target_type); ! TREE_READONLY (nval) = TYPE_READONLY (target_type); ! /* The below was missing, are other important flags missing too? */ ! TREE_SIDE_EFFECTS (nval) |= TREE_SIDE_EFFECTS (val); ! return nval; ! } return val; } --- 857,862 ---- if (TREE_CODE (type) == OFFSET_TYPE) type = TREE_TYPE (type); ! if (TREE_CODE (type) == REFERENCE_TYPE) ! return build_indirect_ref (val, NULL_PTR); return val; } *************** *** 887,890 **** --- 907,911 ---- parmtypes = tree_cons (NULL_TREE, TYPE_POINTER_TO (basetype), parmtypes); + #if 0 method_name = build_decl_overload (name, parmtypes, 1); *************** *** 920,923 **** --- 941,945 ---- fndecl = DECL_CHAIN (fndecl); } + #endif /* No exact conversion was found. See if an approximate *************** *** 1048,1055 **** fntype = TREE_TYPE (function); ! if (DECL_INLINE (function) && TREE_CODE (function) == FUNCTION_DECL) ! function = build1 (ADDR_EXPR, build_pointer_type (fntype), function); ! else ! function = default_conversion (function); result = build_nt (CALL_EXPR, function, --- 1070,1074 ---- fntype = TREE_TYPE (function); ! function = default_conversion (function); result = build_nt (CALL_EXPR, function, *************** *** 1059,1063 **** TREE_TYPE (result) = TREE_TYPE (fntype); TREE_SIDE_EFFECTS (result) = 1; - TREE_RAISES (result) = !! TYPE_RAISES_EXCEPTIONS (fntype); return result; } --- 1078,1081 ---- *************** *** 1174,1177 **** --- 1192,1199 ---- } + /* Conversion... + + FLAGS indicates how we should behave. */ + tree cp_convert (type, expr, convtype, flags) *************** *** 1182,1193 **** register enum tree_code code = TREE_CODE (type); ! if (type == TREE_TYPE (e) ! || TREE_CODE (e) == ERROR_MARK) ! return e; ! if (TREE_CODE (TREE_TYPE (e)) == ERROR_MARK) return error_mark_node; ! /* Trivial conversion: cv-qualifiers do not matter on rvalues. */ ! if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (e))) return fold (build1 (NOP_EXPR, type, e)); --- 1204,1215 ---- register enum tree_code code = TREE_CODE (type); ! if (TREE_CODE (e) == ERROR_MARK ! || TREE_CODE (TREE_TYPE (e)) == ERROR_MARK) return error_mark_node; ! if (IS_AGGR_TYPE (type) && (convtype & CONV_FORCE_TEMP)) ! /* We need a new temporary; don't take this shortcut. */; ! else if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (e))) ! /* Trivial conversion: cv-qualifiers do not matter on rvalues. */ return fold (build1 (NOP_EXPR, type, e)); *************** *** 1209,1216 **** --- 1231,1240 ---- } + #if 0 if (code == REFERENCE_TYPE) return fold (convert_to_reference (type, e, convtype, flags, NULL_TREE)); else if (TREE_CODE (TREE_TYPE (e)) == REFERENCE_TYPE) e = convert_from_reference (e); + #endif if (TREE_CODE (e) == OFFSET_REF) *************** *** 1227,1231 **** if (flag_int_enum_equivalence == 0 && TREE_CODE (type) == ENUMERAL_TYPE ! && ARITHMETIC_TYPE_P (intype)) { cp_pedwarn ("conversion from `%#T' to `%#T'", intype, type); --- 1251,1256 ---- if (flag_int_enum_equivalence == 0 && TREE_CODE (type) == ENUMERAL_TYPE ! && ARITHMETIC_TYPE_P (intype) ! && ! (convtype & CONV_STATIC)) { cp_pedwarn ("conversion from `%#T' to `%#T'", intype, type); *************** *** 1240,1267 **** if (rval) return rval; ! cp_error ("`%#T' used where a `%T' was expected", intype, type); return error_mark_node; } if (code == BOOLEAN_TYPE) ! { ! tree newe = truthvalue_conversion (e); ! /* Avoid stupid (infinite) recursion from backend. */ ! if (TREE_CODE (newe) != NOP_EXPR || e != TREE_OPERAND (newe, 0)) ! e = newe; ! if (TREE_TYPE (e) == bool_type_node) ! return e; ! else if (TREE_CODE (e) == INTEGER_CST) ! { ! if (e == integer_zero_node) ! e = false_node; ! else ! e = true_node; ! } ! else ! return build1 (NOP_EXPR, bool_type_node, e); ! } return fold (convert_to_integer (type, e)); } ! if (code == POINTER_TYPE) return fold (cp_convert_to_pointer (type, e)); if (code == REAL_TYPE) --- 1265,1280 ---- if (rval) return rval; ! if (flags & LOOKUP_COMPLAIN) ! cp_error ("`%#T' used where a `%T' was expected", intype, type); ! if (flags & LOOKUP_SPECULATIVELY) ! return NULL_TREE; return error_mark_node; } if (code == BOOLEAN_TYPE) ! return truthvalue_conversion (e); return fold (convert_to_integer (type, e)); } ! if (code == POINTER_TYPE || code == REFERENCE_TYPE ! || TYPE_PTRMEMFUNC_P (type)) return fold (cp_convert_to_pointer (type, e)); if (code == REAL_TYPE) *************** *** 1274,1279 **** return rval; else ! cp_error ("`%#T' used where a floating point value was expected", ! TREE_TYPE (e)); } return fold (convert_to_real (type, e)); --- 1287,1293 ---- return rval; else ! if (flags & LOOKUP_COMPLAIN) ! cp_error ("`%#T' used where a floating point value was expected", ! TREE_TYPE (e)); } return fold (convert_to_real (type, e)); *************** *** 1307,1311 **** DECL_INITIAL (sig_ptr) = constructor; CLEAR_SIGNATURE (sig_ty); ! finish_decl (sig_ptr, constructor, 0, 0); SET_SIGNATURE (sig_ty); TREE_READONLY (sig_ptr) = 1; --- 1321,1325 ---- DECL_INITIAL (sig_ptr) = constructor; CLEAR_SIGNATURE (sig_ty); ! cp_finish_decl (sig_ptr, constructor, NULL_TREE, 0, 0); SET_SIGNATURE (sig_ty); TREE_READONLY (sig_ptr) = 1; *************** *** 1327,1331 **** if (conversion == error_mark_node) { ! error ("ambiguous pointer conversion"); return conversion; } --- 1341,1346 ---- if (conversion == error_mark_node) { ! if (flags & LOOKUP_COMPLAIN) ! error ("ambiguous pointer conversion"); return conversion; } *************** *** 1335,1344 **** build_tree_list (NULL_TREE, e), TYPE_BINFO (type), ! LOOKUP_NORMAL | LOOKUP_SPECULATIVELY | (conversion ? LOOKUP_NO_CONVERSION : 0)); if (ctor == error_mark_node) { ! cp_error ("in conversion to type `%T'", type); return error_mark_node; } --- 1350,1363 ---- build_tree_list (NULL_TREE, e), TYPE_BINFO (type), ! (flags & LOOKUP_NORMAL) | LOOKUP_SPECULATIVELY ! | (convtype&CONV_NONCONVERTING ? 0 : LOOKUP_ONLYCONVERTING) | (conversion ? LOOKUP_NO_CONVERSION : 0)); if (ctor == error_mark_node) { ! if (flags & LOOKUP_COMPLAIN) ! cp_error ("in conversion to type `%T'", type); ! if (flags & LOOKUP_SPECULATIVELY) ! return NULL_TREE; return error_mark_node; } *************** *** 1346,1350 **** if (conversion && ctor) { ! error ("both constructor and type conversion operator apply"); return error_mark_node; } --- 1365,1372 ---- if (conversion && ctor) { ! if (flags & LOOKUP_COMPLAIN) ! error ("both constructor and type conversion operator apply"); ! if (flags & LOOKUP_SPECULATIVELY) ! return NULL_TREE; return error_mark_node; } *************** *** 1403,1408 **** return e; ! cp_error ("conversion from `%T' to non-scalar type `%T' requested", ! TREE_TYPE (expr), type); return error_mark_node; } --- 1425,1433 ---- return e; ! if (flags & LOOKUP_COMPLAIN) ! cp_error ("conversion from `%T' to non-scalar type `%T' requested", ! TREE_TYPE (expr), type); ! if (flags & LOOKUP_SPECULATIVELY) ! return NULL_TREE; return error_mark_node; } *************** *** 1418,1422 **** tree type, expr; { ! return cp_convert (type, expr, CONV_OLD_CONVERT, 0); } --- 1443,1447 ---- tree type, expr; { ! return cp_convert (type, expr, CONV_OLD_CONVERT, LOOKUP_NORMAL); } *************** *** 1425,1431 **** (such as conversion from sub-type to private super-type). */ tree ! convert_force (type, expr) tree type; tree expr; { register tree e = expr; --- 1450,1457 ---- (such as conversion from sub-type to private super-type). */ tree ! convert_force (type, expr, convtype) tree type; tree expr; + int convtype; { register tree e = expr; *************** *** 1452,1462 **** return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), e, 1); } ! { ! int old_equiv = flag_int_enum_equivalence; ! flag_int_enum_equivalence = 1; ! e = convert (type, e); ! flag_int_enum_equivalence = old_equiv; ! } ! return e; } --- 1478,1483 ---- return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), e, 1); } ! ! return cp_convert (type, e, CONV_C_CAST|convtype, LOOKUP_NORMAL); } *************** *** 1473,1479 **** if (for_sure == 0) ! flags = LOOKUP_PROTECT; else ! flags = LOOKUP_NORMAL; rval = build_method_call (expr, typename, NULL_TREE, NULL_TREE, flags); --- 1494,1500 ---- if (for_sure == 0) ! flags = LOOKUP_PROTECT|LOOKUP_ONLYCONVERTING; else ! flags = LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING; rval = build_method_call (expr, typename, NULL_TREE, NULL_TREE, flags); *************** *** 1484,1490 **** return error_mark_node; } ! if (TREE_CODE (TREE_TYPE (rval)) == REFERENCE_TYPE ! && TREE_CODE (xtype) != REFERENCE_TYPE) ! rval = default_conversion (rval); if (warn_cast_qual --- 1505,1511 ---- return error_mark_node; } ! ! if (IS_AGGR_TYPE (TREE_TYPE (rval))) ! return rval; if (warn_cast_qual *************** *** 1504,1515 **** If (FOR_SURE & 1) is non-zero, then we allow this type conversion to take place immediately. Otherwise, we build a SAVE_EXPR ! which can be evaluated if the results are ever needed. - If FOR_SURE >= 2, then we only look for exact conversions. - - TYPE may be a reference type, in which case we first look - for something that will convert to a reference type. If - that fails, we will try to look for something of the - reference's target type, and then return a reference to that. */ tree build_type_conversion (code, xtype, expr, for_sure) --- 1525,1530 ---- If (FOR_SURE & 1) is non-zero, then we allow this type conversion to take place immediately. Otherwise, we build a SAVE_EXPR ! which can be evaluated if the results are ever needed. */ tree build_type_conversion (code, xtype, expr, for_sure) *************** *** 1519,1530 **** { /* C++: check to see if we can convert this aggregate type ! into the required scalar type. */ ! tree type, type_default; ! tree typename = build_typename_overload (xtype), *typenames; ! int n_variants = 0; ! tree basetype, save_basetype; ! tree rval; ! int exact_conversion = for_sure >= 2; ! for_sure &= 1; if (expr == error_mark_node) --- 1534,1541 ---- { /* C++: check to see if we can convert this aggregate type ! into the required type. */ ! tree basetype; ! tree conv; ! tree winner = NULL_TREE; if (expr == error_mark_node) *************** *** 1535,1845 **** basetype = TREE_TYPE (basetype); - if (TYPE_PTRMEMFUNC_P (basetype) && TREE_CODE (xtype) == BOOLEAN_TYPE) - { - /* We convert a pointer to member function into a boolean, - by just checking the index value, for == 0, we want false, for - != 0, we want true. */ - return convert (xtype, build_component_ref (expr, index_identifier, 0, 0)); - } - basetype = TYPE_MAIN_VARIANT (basetype); if (! TYPE_LANG_SPECIFIC (basetype) || ! TYPE_HAS_CONVERSION (basetype)) return NULL_TREE; ! if (TREE_CODE (xtype) == POINTER_TYPE ! || TREE_CODE (xtype) == REFERENCE_TYPE) ! { ! /* Prepare to match a variant of this type. */ ! type = TYPE_MAIN_VARIANT (TREE_TYPE (xtype)); ! for (n_variants = 0; type; type = TYPE_NEXT_VARIANT (type)) ! n_variants++; ! typenames = (tree *)alloca (n_variants * sizeof (tree)); ! for (n_variants = 0, type = TYPE_MAIN_VARIANT (TREE_TYPE (xtype)); ! type; n_variants++, type = TYPE_NEXT_VARIANT (type)) ! { ! if (type == TREE_TYPE (xtype)) ! typenames[n_variants] = typename; ! else if (TREE_CODE (xtype) == POINTER_TYPE) ! typenames[n_variants] = build_typename_overload (build_pointer_type (type)); ! else ! typenames[n_variants] = build_typename_overload (build_reference_type (type)); ! } ! } ! ! save_basetype = basetype; ! type = xtype; ! ! while (TYPE_HAS_CONVERSION (basetype)) ! { ! int i; ! if (lookup_fnfields (TYPE_BINFO (basetype), typename, 0)) ! return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); ! for (i = 0; i < n_variants; i++) ! if (typenames[i] != typename ! && lookup_fnfields (TYPE_BINFO (basetype), typenames[i], 0)) ! return build_type_conversion_1 (xtype, basetype, expr, typenames[i], for_sure); ! ! if (TYPE_BINFO_BASETYPES (basetype)) ! basetype = TYPE_BINFO_BASETYPE (basetype, 0); ! else ! break; ! } ! if (TREE_CODE (type) == REFERENCE_TYPE) { ! #if 0 ! /* Only reference variable initializations can use a temporary; this ! must be handled elsewhere (like convert_to_reference and ! compute_conversion_costs). */ ! ! type = TYPE_MAIN_VARIANT (TREE_TYPE (type)); ! typename = build_typename_overload (type); ! basetype = save_basetype; ! /* May need to build a temporary for this. */ ! while (TYPE_HAS_CONVERSION (basetype)) { ! if (lookup_fnfields (TYPE_BINFO (basetype), typename, 0)) { ! int flags; ! ! if (for_sure == 0) ! flags = LOOKUP_PROTECT; ! else ! flags = LOOKUP_NORMAL; ! rval = build_method_call (expr, ! constructor_name_full (typename), ! NULL_TREE, NULL_TREE, flags); ! if (rval == error_mark_node) { ! if (for_sure == 0) ! return NULL_TREE; ! return error_mark_node; } ! ! return convert (xtype, rval); } - if (TYPE_BINFO_BASETYPES (basetype)) - basetype = TYPE_BINFO_BASETYPE (basetype, 0); - else - break; - } - #endif - /* No free conversions for reference types, right?. */ - return NULL_TREE; - } - - if (exact_conversion) - return NULL_TREE; - - if (TREE_CODE (type) == BOOLEAN_TYPE) - { - tree as_int = build_type_conversion (code, long_long_unsigned_type_node, expr, 0); - tree as_ptr = build_type_conversion (code, ptr_type_node, expr, 0); - /* We are missing the conversion to pointer to member type. */ - /* We are missing the conversion to floating type. */ - if (as_int && as_ptr && for_sure) - { - cp_error ("ambiguous conversion from `%T' to `bool', can convert to integral type or pointer", TREE_TYPE (expr)); - return error_mark_node; - } - if (as_int) - { - as_int = build_type_conversion (code, long_long_unsigned_type_node, expr, for_sure+exact_conversion*2); - return convert (xtype, as_int); - } - if (as_ptr) - { - as_ptr = build_type_conversion (code, ptr_type_node, expr, for_sure+exact_conversion*2); - return convert (xtype, as_ptr); - } - return NULL_TREE; - } - - /* No perfect match found, try default. */ - #if 0 /* This is wrong; there is no standard conversion from void* to - anything. -jason */ - if (code == CONVERT_EXPR && TREE_CODE (type) == POINTER_TYPE) - type_default = ptr_type_node; - else - #endif - if (type == void_type_node) - return NULL_TREE; - else - { - tree tmp = default_conversion (build1 (NOP_EXPR, type, integer_zero_node)); - if (tmp == error_mark_node) - return NULL_TREE; - type_default = TREE_TYPE (tmp); - } - - basetype = save_basetype; - - if (type_default != type) - { - type = type_default; - typename = build_typename_overload (type); - - while (TYPE_HAS_CONVERSION (basetype)) - { - if (lookup_fnfields (TYPE_BINFO (basetype), typename, 0)) - return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); - if (TYPE_BINFO_BASETYPES (basetype)) - basetype = TYPE_BINFO_BASETYPE (basetype, 0); else ! break; } } ! if (TREE_CODE (type) == POINTER_TYPE && TYPE_READONLY (TREE_TYPE (type))) ! { ! /* Try converting to some other const pointer type and then using ! standard conversions. */ ! while (TYPE_HAS_CONVERSION (basetype)) ! { ! if (CLASSTYPE_CONVERSION (basetype, constptr_conv) != 0) ! { ! if (CLASSTYPE_CONVERSION (basetype, constptr_conv) == error_mark_node) ! return error_mark_node; ! typename = DECL_NAME (CLASSTYPE_CONVERSION (basetype, constptr_conv)); ! return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); ! } ! if (TYPE_BINFO_BASETYPES (basetype)) ! basetype = TYPE_BINFO_BASETYPE (basetype, 0); ! else ! break; ! } ! } ! if (TREE_CODE (type) == POINTER_TYPE) ! { ! /* Try converting to some other pointer type and then using standard ! conversions. */ ! while (TYPE_HAS_CONVERSION (basetype)) ! { ! if (CLASSTYPE_CONVERSION (basetype, ptr_conv) != 0) ! { ! if (CLASSTYPE_CONVERSION (basetype, ptr_conv) == error_mark_node) ! return error_mark_node; ! typename = DECL_NAME (CLASSTYPE_CONVERSION (basetype, ptr_conv)); ! return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); ! } ! if (TYPE_BINFO_BASETYPES (basetype)) ! basetype = TYPE_BINFO_BASETYPE (basetype, 0); ! else ! break; ! } ! } ! /* Use the longer or shorter conversion that is appropriate. Have ! to check against 0 because the conversion may come from a baseclass. */ ! if (TREE_CODE (type) == INTEGER_TYPE ! && TYPE_HAS_INT_CONVERSION (basetype) ! && CLASSTYPE_CONVERSION (basetype, int_conv) != 0 ! && CLASSTYPE_CONVERSION (basetype, int_conv) != error_mark_node) ! { ! typename = DECL_NAME (CLASSTYPE_CONVERSION (basetype, int_conv)); ! return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); ! } ! if (TREE_CODE (type) == REAL_TYPE ! && TYPE_HAS_REAL_CONVERSION (basetype) ! && CLASSTYPE_CONVERSION (basetype, real_conv) != 0 ! && CLASSTYPE_CONVERSION (basetype, real_conv) != error_mark_node) { ! /* Only accept using an operator double() if there isn't a conflicting ! operator int(). */ ! if (TYPE_HAS_INT_CONVERSION (basetype)) ! { ! if (for_sure) ! { ! cp_error ("two possible conversions for type `%T'", type); ! return error_mark_node; ! } ! else ! return NULL_TREE; ! } ! ! typename = DECL_NAME (CLASSTYPE_CONVERSION (basetype, real_conv)); ! return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); } ! /* THESE ARE TOTAL KLUDGES. */ ! /* Default promotion yields no new alternatives, try ! conversions which are anti-default, such as ! double -> float or int -> unsigned or unsigned -> long ! */ ! if (type_default == type ! && (INTEGRAL_TYPE_P (type) || TREE_CODE (type) == REAL_TYPE)) { ! int not_again = 0; ! if (type == double_type_node) ! typename = build_typename_overload (float_type_node); ! else if (type == integer_type_node) ! typename = build_typename_overload (unsigned_type_node); ! else if (type == unsigned_type_node) ! typename = build_typename_overload (long_integer_type_node); ! again: ! basetype = save_basetype; ! while (TYPE_HAS_CONVERSION (basetype)) { ! if (lookup_fnfields (TYPE_BINFO (basetype), typename, 0)) ! return build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); ! if (TYPE_BINFO_BASETYPES (basetype)) ! basetype = TYPE_BINFO_BASETYPE (basetype, 0); ! else ! break; } ! if (! not_again) { ! if (type == integer_type_node) { ! typename = build_typename_overload (long_integer_type_node); ! not_again = 1; ! goto again; } else ! { ! typename = build_typename_overload (integer_type_node); ! not_again = 1; ! goto again; ! } } } ! /* Now, try C promotions... ! ! float -> int ! int -> float */ ! ! basetype = save_basetype; ! if (TREE_CODE (type) == REAL_TYPE) ! type = integer_type_node; ! else if (TREE_CODE (type) == INTEGER_TYPE) ! if (TYPE_HAS_REAL_CONVERSION (basetype)) ! type = double_type_node; ! else ! return NULL_TREE; ! else ! return NULL_TREE; ! ! typename = build_typename_overload (type); ! while (TYPE_HAS_CONVERSION (basetype)) ! { ! if (lookup_fnfields (TYPE_BINFO (basetype), typename, 0)) ! { ! rval = build_type_conversion_1 (xtype, basetype, expr, typename, for_sure); ! return rval; ! } ! if (TYPE_BINFO_BASETYPES (basetype)) ! basetype = TYPE_BINFO_BASETYPE (basetype, 0); ! else ! break; ! } return NULL_TREE; --- 1546,1683 ---- basetype = TREE_TYPE (basetype); basetype = TYPE_MAIN_VARIANT (basetype); if (! TYPE_LANG_SPECIFIC (basetype) || ! TYPE_HAS_CONVERSION (basetype)) return NULL_TREE; ! /* Do we have an exact match? */ ! { ! tree typename = build_typename_overload (xtype); ! if (lookup_fnfields (TYPE_BINFO (basetype), typename, 0)) ! return build_type_conversion_1 (xtype, basetype, expr, typename, ! for_sure); ! } ! /* Nope; try looking for others. */ ! for (conv = lookup_conversions (basetype); conv; conv = TREE_CHAIN (conv)) { ! if (winner && TREE_PURPOSE (winner) == TREE_PURPOSE (conv)) ! continue; ! if (can_convert (xtype, TREE_VALUE (conv))) { ! if (winner) { ! if (for_sure) { ! cp_error ("ambiguous conversion from `%T' to `%T'", basetype, ! xtype); ! cp_error (" candidate conversions include `%T' and `%T'", ! TREE_VALUE (winner), TREE_VALUE (conv)); } ! return NULL_TREE; } else ! winner = conv; } } ! if (winner) ! return build_type_conversion_1 (xtype, basetype, expr, ! TREE_PURPOSE (winner), for_sure); ! return NULL_TREE; ! } ! /* Convert the given EXPR to one of a group of types suitable for use in an ! expression. DESIRES is a combination of various WANT_* flags (q.v.) ! which indicates which types are suitable. If COMPLAIN is 1, complain ! about ambiguity; otherwise, the caller will deal with it. */ ! tree ! build_expr_type_conversion (desires, expr, complain) ! int desires; ! tree expr; ! int complain; ! { ! tree basetype = TREE_TYPE (expr); ! tree conv; ! tree winner = NULL_TREE; ! if (TREE_CODE (basetype) == OFFSET_TYPE) { ! expr = resolve_offset_ref (expr); ! basetype = TREE_TYPE (expr); } ! if (! IS_AGGR_TYPE (basetype)) ! switch (TREE_CODE (basetype)) ! { ! case INTEGER_TYPE: ! if ((desires & WANT_NULL) && TREE_CODE (expr) == INTEGER_CST ! && integer_zerop (expr)) ! return expr; ! /* else fall through... */ ! ! case BOOLEAN_TYPE: ! return (desires & WANT_INT) ? expr : NULL_TREE; ! case ENUMERAL_TYPE: ! return (desires & WANT_ENUM) ? expr : NULL_TREE; ! case REAL_TYPE: ! return (desires & WANT_FLOAT) ? expr : NULL_TREE; ! case POINTER_TYPE: ! return (desires & WANT_POINTER) ? expr : NULL_TREE; ! ! case FUNCTION_TYPE: ! case ARRAY_TYPE: ! return (desires & WANT_POINTER) ? default_conversion (expr) ! : NULL_TREE; ! default: ! return NULL_TREE; ! } ! if (! TYPE_HAS_CONVERSION (basetype)) ! return NULL_TREE; ! for (conv = lookup_conversions (basetype); conv; conv = TREE_CHAIN (conv)) { ! int win = 0; ! if (winner && TREE_PURPOSE (winner) == TREE_PURPOSE (conv)) ! continue; ! switch (TREE_CODE (TREE_VALUE (conv))) { ! case BOOLEAN_TYPE: ! case INTEGER_TYPE: ! win = (desires & WANT_INT); break; ! case ENUMERAL_TYPE: ! win = (desires & WANT_ENUM); break; ! case REAL_TYPE: ! win = (desires & WANT_FLOAT); break; ! case POINTER_TYPE: ! win = (desires & WANT_POINTER); break; } ! ! if (win) { ! if (winner) { ! if (complain) ! { ! cp_error ("ambiguous default type conversion from `%T'", ! basetype); ! cp_error (" candidate conversions include `%T' and `%T'", ! TREE_VALUE (winner), TREE_VALUE (conv)); ! } ! return error_mark_node; } else ! winner = conv; } } ! if (winner) ! return build_type_conversion_1 (TREE_VALUE (winner), basetype, expr, ! TREE_PURPOSE (winner), 1); return NULL_TREE; *************** *** 1857,1997 **** tree *arg1, *arg2; { ! tree type1 = TREE_TYPE (*arg1); ! tree type2 = TREE_TYPE (*arg2); ! ! if (TREE_CODE (type1) == REFERENCE_TYPE ! || TREE_CODE (type1) == POINTER_TYPE) ! type1 = TREE_TYPE (type1); ! if (TREE_CODE (type2) == REFERENCE_TYPE ! || TREE_CODE (type2) == POINTER_TYPE) ! type2 = TREE_TYPE (type2); ! ! if (TREE_CODE (TYPE_NAME (type1)) != TYPE_DECL) ! { ! tree decl = typedecl_for_tag (type1); ! if (decl) ! error ("type conversion nonexistent for type `%s'", ! IDENTIFIER_POINTER (DECL_NAME (decl))); ! else ! error ("type conversion nonexistent for non-C++ type"); ! return 0; ! } ! if (TREE_CODE (TYPE_NAME (type2)) != TYPE_DECL) { ! tree decl = typedecl_for_tag (type2); ! if (decl) ! error ("type conversion nonexistent for type `%s'", ! IDENTIFIER_POINTER (decl)); ! else ! error ("type conversion nonexistent for non-C++ type"); ! return 0; ! } ! if (!IS_AGGR_TYPE (type1) || !TYPE_HAS_CONVERSION (type1)) ! { ! if (!IS_AGGR_TYPE (type2) || !TYPE_HAS_CONVERSION (type2)) ! cp_error ("no conversion from `%T' and `%T' to types with default `%O' ", ! type1, type2, code); ! else ! cp_error ("no conversion from `%T' to type with default `%O'", ! type1, code); ! return 0; ! } ! else if (!IS_AGGR_TYPE (type2) || !TYPE_HAS_CONVERSION (type2)) ! { ! cp_error ("no conversion from `%T' to type with default `%O'", ! type2, code); ! return 0; ! } ! if (code == TRUTH_ANDIF_EXPR ! || code == TRUTH_ORIF_EXPR) ! { ! *arg1 = convert (bool_type_node, *arg1); ! *arg2 = convert (bool_type_node, *arg2); ! } ! else if (TYPE_HAS_INT_CONVERSION (type1)) ! { ! if (TYPE_HAS_REAL_CONVERSION (type1)) ! cp_pedwarn ("ambiguous type conversion for type `%T', defaulting to int", ! type1); ! *arg1 = build_type_conversion (code, integer_type_node, *arg1, 1); ! *arg2 = build_type_conversion (code, integer_type_node, *arg2, 1); ! } ! else if (TYPE_HAS_REAL_CONVERSION (type1)) ! { ! *arg1 = build_type_conversion (code, double_type_node, *arg1, 1); ! *arg2 = build_type_conversion (code, double_type_node, *arg2, 1); ! } ! else ! { ! *arg1 = build_type_conversion (code, ptr_type_node, *arg1, 1); ! if (*arg1 == error_mark_node) ! error ("ambiguous pointer conversion"); ! *arg2 = build_type_conversion (code, ptr_type_node, *arg2, 1); ! if (*arg1 != error_mark_node && *arg2 == error_mark_node) ! error ("ambiguous pointer conversion"); ! } ! if (*arg1 == 0) ! { ! if (*arg2 == 0 && type1 != type2) ! cp_error ("default type conversion for types `%T' and `%T' failed", ! type1, type2); ! else ! cp_error ("default type conversion for type `%T' failed", type1); ! return 0; ! } ! else if (*arg2 == 0) ! { ! cp_error ("default type conversion for type `%T' failed", type2); ! return 0; ! } ! return 1; ! } ! /* Must convert an aggregate type to non-aggregate type. ! Attempts to find a non-ambiguous, "best" type conversion. ! Return 1 on success, 0 on failure. ! The type of the argument is expected to be of aggregate type here. ! @@ What are the real semantics of this supposed to be??? */ ! int ! build_default_unary_type_conversion (code, arg) ! enum tree_code code; ! tree *arg; ! { ! tree type = TREE_TYPE (*arg); ! if (! TYPE_HAS_CONVERSION (type)) ! { ! cp_error ("type conversion required for type `%T'", type); ! return 0; ! } ! if (code == TRUTH_NOT_EXPR) ! *arg = convert (bool_type_node, *arg); ! else if (TYPE_HAS_INT_CONVERSION (type)) ! { ! if (TYPE_HAS_REAL_CONVERSION (type)) ! cp_pedwarn ("ambiguous type conversion for type `%T', defaulting to int", ! type); ! *arg = build_type_conversion (code, integer_type_node, *arg, 1); ! } ! else if (TYPE_HAS_REAL_CONVERSION (type)) ! *arg = build_type_conversion (code, double_type_node, *arg, 1); ! else ! { ! *arg = build_type_conversion (code, ptr_type_node, *arg, 1); ! if (*arg == error_mark_node) ! error ("ambiguous pointer conversion"); ! } ! if (*arg == NULL_TREE) ! { ! cp_error ("default type conversion for type `%T' failed", type); ! return 0; } ! return 1; } --- 1695,1814 ---- tree *arg1, *arg2; { ! switch (code) { ! case MULT_EXPR: ! case TRUNC_DIV_EXPR: ! case CEIL_DIV_EXPR: ! case FLOOR_DIV_EXPR: ! case ROUND_DIV_EXPR: ! case EXACT_DIV_EXPR: ! *arg1 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg1, 0); ! *arg2 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg2, 0); ! break; ! case TRUNC_MOD_EXPR: ! case FLOOR_MOD_EXPR: ! case LSHIFT_EXPR: ! case RSHIFT_EXPR: ! case BIT_AND_EXPR: ! case BIT_XOR_EXPR: ! case BIT_IOR_EXPR: ! *arg1 = build_expr_type_conversion (WANT_INT | WANT_ENUM, *arg1, 0); ! *arg2 = build_expr_type_conversion (WANT_INT | WANT_ENUM, *arg2, 0); ! break; ! case PLUS_EXPR: ! { ! tree a1, a2, p1, p2; ! int wins; ! a1 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg1, 0); ! a2 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg2, 0); ! p1 = build_expr_type_conversion (WANT_POINTER, *arg1, 0); ! p2 = build_expr_type_conversion (WANT_POINTER, *arg2, 0); ! ! wins = (a1 && a2) + (a1 && p2) + (p1 && a2); ! ! if (wins > 1) ! error ("ambiguous default type conversion for `operator +'"); ! ! if (a1 && a2) ! *arg1 = a1, *arg2 = a2; ! else if (a1 && p2) ! *arg1 = a1, *arg2 = p2; ! else ! *arg1 = p1, *arg2 = a2; ! break; ! } ! case MINUS_EXPR: ! { ! tree a1, a2, p1, p2; ! int wins; ! a1 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg1, 0); ! a2 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg2, 0); ! p1 = build_expr_type_conversion (WANT_POINTER, *arg1, 0); ! p2 = build_expr_type_conversion (WANT_POINTER, *arg2, 0); ! ! wins = (a1 && a2) + (p1 && p2) + (p1 && a2); ! ! if (wins > 1) ! error ("ambiguous default type conversion for `operator -'"); ! ! if (a1 && a2) ! *arg1 = a1, *arg2 = a2; ! else if (p1 && p2) ! *arg1 = p1, *arg2 = p2; ! else ! *arg1 = p1, *arg2 = a2; ! break; ! } ! case GT_EXPR: ! case LT_EXPR: ! case GE_EXPR: ! case LE_EXPR: ! case EQ_EXPR: ! case NE_EXPR: ! { ! tree a1, a2, p1, p2; ! int wins; ! a1 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg1, 0); ! a2 = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, *arg2, 0); ! p1 = build_expr_type_conversion (WANT_POINTER | WANT_NULL, *arg1, 0); ! p2 = build_expr_type_conversion (WANT_POINTER | WANT_NULL, *arg2, 0); ! wins = (a1 && a2) + (p1 && p2); ! ! if (wins > 1) ! cp_error ("ambiguous default type conversion for `%O'", code); ! ! if (a1 && a2) ! *arg1 = a1, *arg2 = a2; ! else ! *arg1 = p1, *arg2 = p2; ! break; ! } ! ! case TRUTH_ANDIF_EXPR: ! case TRUTH_ORIF_EXPR: ! *arg1 = convert (boolean_type_node, *arg1); ! *arg2 = convert (boolean_type_node, *arg2); ! break; ! ! default: ! *arg1 = NULL_TREE; ! *arg2 = NULL_TREE; } ! ! if (*arg1 == error_mark_node || *arg2 == error_mark_node) ! cp_error ("ambiguous default type conversion for `%O'", code); ! ! if (*arg1 && *arg2) ! return 1; ! ! return 0; } *************** *** 2007,2011 **** /* bool always promotes to int (not unsigned), even if it's the same size. */ ! if (type == bool_type_node) type = integer_type_node; --- 1824,1828 ---- /* bool always promotes to int (not unsigned), even if it's the same size. */ ! if (type == boolean_type_node) type = integer_type_node; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/decl.c gcc-2.7.0/cp/decl.c *** gcc-2.6.3/cp/decl.c Mon Nov 14 23:38:49 1994 --- gcc-2.7.0/cp/decl.c Thu Jun 15 19:10:00 1995 *************** *** 1,4 **** /* Process declarations and variables for C compiler. ! Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Process declarations and variables for C compiler. ! Copyright (C) 1988, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 50,53 **** --- 51,56 ---- extern tree cleanups_this_call; + extern tree static_ctors, static_dtors; + /* Stack of places to restore the search obstack back to. */ *************** *** 94,97 **** --- 97,108 ---- #endif + #ifndef BOOL_TYPE_SIZE + #ifdef SLOW_BYTE_ACCESS + #define BOOL_TYPE_SIZE BITS_PER_WORD + #else + #define BOOL_TYPE_SIZE BITS_PER_UNIT + #endif + #endif + /* We let tm.h override the types used here, to handle trivial differences such as the choice of unsigned int or long unsigned int for size_t. *************** *** 112,126 **** #endif - #define builtin_function(NAME, TYPE, CODE, LIBNAME) \ - define_function (NAME, TYPE, CODE, (void (*)())pushdecl, LIBNAME) - #define auto_function(NAME, TYPE, CODE) \ - do { \ - tree __name = NAME; \ - tree __type = TYPE; \ - define_function (IDENTIFIER_POINTER (__name), __type, CODE, \ - (void (*)())push_overloaded_decl_1, \ - IDENTIFIER_POINTER (build_decl_overload (__name, TYPE_ARG_TYPES (__type), 0)));\ - } while (0) - static tree grokparms PROTO((tree, int)); static tree lookup_nested_type PROTO((tree, tree)); --- 123,126 ---- *************** *** 208,212 **** /* The bool data type, and constants */ ! tree bool_type_node, true_node, false_node; /* type `int ()' -- used for implicit declaration of functions. */ --- 208,212 ---- /* The bool data type, and constants */ ! tree boolean_type_node, boolean_true_node, boolean_false_node; /* type `int ()' -- used for implicit declaration of functions. */ *************** *** 235,243 **** tree vtable_entry_type; tree delta_type_node; ! tree __t_desc_type_node, __i_desc_type_node, __m_desc_type_node; tree __t_desc_array_type, __i_desc_array_type, __m_desc_array_type; tree class_star_type_node; tree class_type_node, record_type_node, union_type_node, enum_type_node; ! tree exception_type_node, unknown_type_node; tree opaque_type_node, signature_type_node; tree sigtable_entry_type; --- 235,259 ---- tree vtable_entry_type; tree delta_type_node; ! #if 0 ! /* Old rtti stuff. */ ! tree __baselist_desc_type_node; ! tree __i_desc_type_node, __m_desc_type_node; tree __t_desc_array_type, __i_desc_array_type, __m_desc_array_type; + #endif + tree __t_desc_type_node, __tp_desc_type_node; + tree __access_mode_type_node; + tree __bltn_desc_type_node, __user_desc_type_node, __class_desc_type_node; + tree __ptr_desc_type_node, __attr_desc_type_node, __func_desc_type_node; + tree __ptmf_desc_type_node, __ptmd_desc_type_node; + #if 0 + /* Not needed yet? May be needed one day? */ + tree __bltn_desc_array_type, __user_desc_array_type, __class_desc_array_type; + tree __ptr_desc_array_type, __attr_dec_array_type, __func_desc_array_type; + tree __ptmf_desc_array_type, __ptmd_desc_array_type; + #endif + tree class_star_type_node; tree class_type_node, record_type_node, union_type_node, enum_type_node; ! tree unknown_type_node; tree opaque_type_node, signature_type_node; tree sigtable_entry_type; *************** *** 272,276 **** /* Sequence of insns which represents base initialization. */ ! rtx base_init_insns; /* C++: Keep these around to reduce calls to `get_identifier'. --- 288,292 ---- /* Sequence of insns which represents base initialization. */ ! tree base_init_expr; /* C++: Keep these around to reduce calls to `get_identifier'. *************** *** 392,399 **** static int warn_about_return_type; - /* Nonzero when starting a function declared `extern inline'. */ - - static int current_extern_inline; - /* Nonzero means give `double' the same size as `float'. */ --- 408,411 ---- *************** *** 409,413 **** extern int flag_no_nonansi_builtin; ! /* Nonzero means disable GNU extensions. */ extern int flag_ansi; --- 421,426 ---- extern int flag_no_nonansi_builtin; ! /* Nonzero means enable obscure ANSI features and disable GNU extensions ! that might cause ANSI-compliant code to be miscompiled. */ extern int flag_ansi; *************** *** 419,423 **** /* Nonzero if we want to conserve space in the .o files. We do this by putting uninitialized data and runtime initialized data into ! .common instead of .data at the expense of not flaging multiple definitions. */ extern int flag_conserve_space; --- 432,436 ---- /* Nonzero if we want to conserve space in the .o files. We do this by putting uninitialized data and runtime initialized data into ! .common instead of .data at the expense of not flagging multiple definitions. */ extern int flag_conserve_space; *************** *** 537,541 **** /* Number of decls in `names' that have incomplete structure or union types. */ ! unsigned short n_incomplete; /* 1 for the level that holds the parameters of a function. --- 550,554 ---- /* Number of decls in `names' that have incomplete structure or union types. */ ! unsigned int n_incomplete; /* 1 for the level that holds the parameters of a function. *************** *** 567,572 **** unsigned pseudo_global : 1; ! /* Two bits left for this word. */ #if defined(DEBUG_CP_BINDING_LEVELS) /* Binding depth at which this level began. */ --- 580,588 ---- unsigned pseudo_global : 1; ! /* This is set for a namespace binding level. */ ! unsigned namespace_p : 1; + /* One bit left for this word. */ + #if defined(DEBUG_CP_BINDING_LEVELS) /* Binding depth at which this level began. */ *************** *** 702,705 **** --- 718,805 ---- } } + + static void + suspend_binding_level () + { + if (class_binding_level) + current_binding_level = class_binding_level; + + if (global_binding_level) + { + /* cannot suspend a level, if there are none left to suspend. */ + if (current_binding_level == global_binding_level) + my_friendly_abort (123); + } + /* Suspend the current level. */ + #if defined(DEBUG_CP_BINDING_LEVELS) + binding_depth--; + indent (); + fprintf (stderr, "suspend %s level 0x%08x line %d\n", + (is_class_level) ? "class" : "block", + current_binding_level, lineno); + if (is_class_level != (current_binding_level == class_binding_level)) + #if 0 /* XXX Don't abort when we're watching how things are being managed. */ + abort (); + #else + { + indent (); + fprintf (stderr, "XXX is_class_level != (current_binding_level == class_binding_level)\n"); + } + #endif + is_class_level = 0; + #endif /* defined(DEBUG_CP_BINDING_LEVELS) */ + { + register struct binding_level *level = current_binding_level; + current_binding_level = current_binding_level->level_chain; + #if 0 /* defined(DEBUG_CP_BINDING_LEVELS) */ + if (level->binding_depth != binding_depth) + abort (); + #endif /* defined(DEBUG_CP_BINDING_LEVELS) */ + + class_binding_level = current_binding_level; + if (class_binding_level->parm_flag != 2) + class_binding_level = 0; + while (current_binding_level->parm_flag == 2) + current_binding_level = current_binding_level->level_chain; + } + } + + void + resume_binding_level (b) + struct binding_level *b; + { + if (class_binding_level) + { + #if 1 + /* These are here because we cannot deal with shadows yet. */ + sorry ("cannot resume a namespace inside class"); + return; + #else + b->level_chain = class_binding_level; + class_binding_level = (struct binding_level *)0; + #endif + } + else + { + #if 1 + /* These are here because we cannot deal with shadows yet. */ + if (b->level_chain != current_binding_level) + { + sorry ("cannot resume a namespace inside a different namespace"); + return; + } + #endif + b->level_chain = current_binding_level; + } + current_binding_level = b; + #if defined(DEBUG_CP_BINDING_LEVELS) + b->binding_depth = binding_depth; + indent (); + fprintf (stderr, "resume %s level 0x%08x line %d\n", + (is_class_level) ? "class" : "block", b, lineno); + is_class_level = 0; + binding_depth++; + #endif /* defined(DEBUG_CP_BINDING_LEVELS) */ + } /* Nonzero if we are currently in the global binding level. */ *************** *** 711,714 **** --- 811,841 ---- } + /* Nonzero if we are currently in a toplevel binding level. This + means either the global binding level or a namespace in a toplevel + binding level. */ + + int + toplevel_bindings_p () + { + struct binding_level *b = current_binding_level; + + while (1) + { + if (b == global_binding_level) + return 1; + if (! b->namespace_p) + return 0; + b=b->level_chain; + } + } + + /* Nonzero if this is a namespace scope. */ + + int + namespace_bindings_p () + { + return current_binding_level->namespace_p; + } + void keep_next_level () *************** *** 755,758 **** --- 882,891 ---- } + void + declare_namespace_level () + { + current_binding_level->namespace_p = 1; + } + int pseudo_global_level_p () *************** *** 917,921 **** && ! TREE_ASM_WRITTEN (decl) && DECL_INITIAL (decl) != NULL_TREE ! && TREE_ADDRESSABLE (decl)) { /* If this decl was copied from a file-scope decl --- 1050,1055 ---- && ! TREE_ASM_WRITTEN (decl) && DECL_INITIAL (decl) != NULL_TREE ! && TREE_ADDRESSABLE (decl) ! && decl_function_context (decl) == current_function_decl) { /* If this decl was copied from a file-scope decl *************** *** 1098,1101 **** --- 1232,1260 ---- } + /* Resume a binding level for a namespace. */ + void + resume_level (b) + struct binding_level *b; + { + tree decls, link; + + resume_binding_level (b); + + /* Resume the variable caches. */ + decls = current_binding_level->names; + + /* Restore the meanings of the local variables of this level. */ + + for (link = decls; link; link = TREE_CHAIN (link)) + { + if (DECL_NAME (link) != NULL_TREE) + IDENTIFIER_LOCAL_VALUE (DECL_NAME (link)) = link; + + /* If this is a TYPE_DECL, push it into the type value slot. */ + if (TREE_CODE (link) == TYPE_DECL) + SET_IDENTIFIER_TYPE_VALUE (DECL_NAME (link), TREE_TYPE (link)); + } + } + /* Delete the node BLOCK from the current binding level. This is used for the block inside a stmt expr ({...}) *************** *** 1211,1217 **** IDENTIFIER_LOCAL_VALUE (TREE_PURPOSE (shadowed)) = TREE_VALUE (shadowed); /* If we're leaving a toplevel class, don't bother to do the setting ! of IDENTIFER_CLASS_VALUE to NULL_TREE, since first of all this slot shouldn't even be used when current_class_type isn't set, and second, ! if we don't touch it here, we're able to use the caching effect if the next time we're entering a class scope, it is the same class. */ if (current_class_depth != 1 || force) --- 1370,1376 ---- IDENTIFIER_LOCAL_VALUE (TREE_PURPOSE (shadowed)) = TREE_VALUE (shadowed); /* If we're leaving a toplevel class, don't bother to do the setting ! of IDENTIFIER_CLASS_VALUE to NULL_TREE, since first of all this slot shouldn't even be used when current_class_type isn't set, and second, ! if we don't touch it here, we're able to use the cache effect if the next time we're entering a class scope, it is the same class. */ if (current_class_depth != 1 || force) *************** *** 1416,1419 **** --- 1575,1667 ---- print_binding_level (global_binding_level); } + + /* Push into the scope of the NAME namespace. */ + void + push_namespace (name) + tree name; + { + extern tree current_namespace; + tree old_id = get_namespace_id (); + char *buf; + tree d = make_node (NAMESPACE_DECL); + + DECL_NAME (d) = name; + DECL_ASSEMBLER_NAME (d) = name; + /* pushdecl wants to check the size of it to see if it is incomplete... */ + TREE_TYPE (d) = void_type_node; + /* Mark them as external, so redeclaration_error_message doesn't think + they are duplicates. */ + DECL_EXTERNAL (d) = 1; + d = pushdecl (d); + + if (NAMESPACE_LEVEL (d) == 0) + { + /* This is new for this compilation unit. */ + pushlevel (0); + declare_namespace_level (); + NAMESPACE_LEVEL (d) = (tree)current_binding_level; + } + else + { + resume_level ((struct binding_level*)NAMESPACE_LEVEL (d)); + } + + /* This code is just is bit old now... */ + current_namespace = tree_cons (NULL_TREE, name, current_namespace); + buf = (char *) alloca (4 + (old_id ? IDENTIFIER_LENGTH (old_id) : 0) + + IDENTIFIER_LENGTH (name)); + sprintf (buf, "%s%s", old_id ? IDENTIFIER_POINTER (old_id) : "", + IDENTIFIER_POINTER (name)); + TREE_PURPOSE (current_namespace) = get_identifier (buf); + } + + /* Pop from the scope of the current namespace. */ + void + pop_namespace () + { + extern tree current_namespace; + tree decls, link; + current_namespace = TREE_CHAIN (current_namespace); + + /* Just in case we get out of sync. */ + if (! namespace_bindings_p ()) + poplevel (0, 0, 0); + + decls = current_binding_level->names; + + /* Clear out the meanings of the local variables of this level. */ + + for (link = decls; link; link = TREE_CHAIN (link)) + { + if (DECL_NAME (link) != NULL_TREE) + { + /* If the ident. was used or addressed via a local extern decl, + don't forget that fact. */ + if (DECL_EXTERNAL (link)) + { + if (TREE_USED (link)) + TREE_USED (DECL_ASSEMBLER_NAME (link)) = 1; + if (TREE_ADDRESSABLE (link)) + TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (link)) = 1; + } + IDENTIFIER_LOCAL_VALUE (DECL_NAME (link)) = NULL_TREE; + } + } + + /* Restore all name-meanings of the outer levels + that were shadowed by this level. */ + + for (link = current_binding_level->shadowed; link; link = TREE_CHAIN (link)) + IDENTIFIER_LOCAL_VALUE (TREE_PURPOSE (link)) = TREE_VALUE (link); + for (link = current_binding_level->class_shadowed; + link; link = TREE_CHAIN (link)) + IDENTIFIER_CLASS_VALUE (TREE_PURPOSE (link)) = TREE_VALUE (link); + for (link = current_binding_level->type_shadowed; + link; link = TREE_CHAIN (link)) + IDENTIFIER_TYPE_VALUE (TREE_PURPOSE (link)) = TREE_VALUE (link); + + /* suspend a level. */ + suspend_binding_level (); + } /* Subroutines for reverting temporarily to top-level for instantiation *************** *** 1426,1430 **** tree old_bindings; struct saved_scope *prev; ! tree class_name, class_type, class_decl, function_decl; struct binding_level *class_bindings; tree previous_class_type; --- 1674,1679 ---- tree old_bindings; struct saved_scope *prev; ! tree class_name, class_type, function_decl; ! tree base_init_list, member_init_list; struct binding_level *class_bindings; tree previous_class_type; *************** *** 1501,1506 **** s->class_name = current_class_name; s->class_type = current_class_type; - s->class_decl = current_class_decl; s->function_decl = current_function_decl; s->class_bindings = class_binding_level; s->previous_class_type = previous_class_type; --- 1750,1756 ---- s->class_name = current_class_name; s->class_type = current_class_type; s->function_decl = current_function_decl; + s->base_init_list = current_base_init_list; + s->member_init_list = current_member_init_list; s->class_bindings = class_binding_level; s->previous_class_type = previous_class_type; *************** *** 1510,1514 **** s->lang_name = current_lang_name; s->named_labels = named_labels; ! current_class_name = current_class_type = current_class_decl = NULL_TREE; current_function_decl = NULL_TREE; class_binding_level = (struct binding_level *)0; --- 1760,1764 ---- s->lang_name = current_lang_name; s->named_labels = named_labels; ! current_class_name = current_class_type = NULL_TREE; current_function_decl = NULL_TREE; class_binding_level = (struct binding_level *)0; *************** *** 1550,1558 **** current_class_name = s->class_name; current_class_type = s->class_type; ! current_class_decl = s->class_decl; ! if (current_class_type) ! C_C_D = CLASSTYPE_INST_VAR (current_class_type); ! else ! C_C_D = NULL_TREE; current_function_decl = s->function_decl; class_binding_level = s->class_bindings; --- 1800,1805 ---- current_class_name = s->class_name; current_class_type = s->class_type; ! current_base_init_list = s->base_init_list; ! current_member_init_list = s->member_init_list; current_function_decl = s->function_decl; class_binding_level = s->class_bindings; *************** *** 1618,1645 **** tree decl, classname, name, type; { my_friendly_assert (TREE_CODE (decl) == TYPE_DECL, 136); - if (classname != NULL_TREE) - { - char *buf; - my_friendly_assert (TREE_CODE (classname) == IDENTIFIER_NODE, 137); - my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 138); - buf = (char *) alloca (4 + IDENTIFIER_LENGTH (classname) - + IDENTIFIER_LENGTH (name)); - sprintf (buf, "%s::%s", IDENTIFIER_POINTER (classname), - IDENTIFIER_POINTER (name)); - DECL_NESTED_TYPENAME (decl) = get_identifier (buf); - TREE_MANGLED (DECL_NESTED_TYPENAME (decl)) = 1; ! /* This is a special usage of IDENTIFIER_TYPE_VALUE which have no ! correspondence in any binding_level. This is ok since the ! DECL_NESTED_TYPENAME is just a convenience identifier whose ! IDENTIFIER_TYPE_VALUE will remain constant from now on. */ ! SET_IDENTIFIER_TYPE_VALUE (DECL_NESTED_TYPENAME (decl), type); } ! else ! DECL_NESTED_TYPENAME (decl) = name; } ! /* Pop off extraneous binding levels left over due to syntax errors. */ void pop_everything () --- 1865,1913 ---- tree decl, classname, name, type; { + char *buf; my_friendly_assert (TREE_CODE (decl) == TYPE_DECL, 136); ! /* No need to do this for anonymous names, since they're unique. */ ! if (ANON_AGGRNAME_P (name)) ! { ! DECL_NESTED_TYPENAME (decl) = name; ! return; } ! ! if (classname == NULL_TREE) ! classname = get_identifier (""); ! ! my_friendly_assert (TREE_CODE (classname) == IDENTIFIER_NODE, 137); ! my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 138); ! buf = (char *) alloca (4 + IDENTIFIER_LENGTH (classname) ! + IDENTIFIER_LENGTH (name)); ! sprintf (buf, "%s::%s", IDENTIFIER_POINTER (classname), ! IDENTIFIER_POINTER (name)); ! DECL_NESTED_TYPENAME (decl) = get_identifier (buf); ! TREE_MANGLED (DECL_NESTED_TYPENAME (decl)) = 1; ! ! /* Create an extra decl so that the nested name will have a type value ! where appropriate. */ ! { ! tree nested, type_decl; ! nested = DECL_NESTED_TYPENAME (decl); ! type_decl = build_decl (TYPE_DECL, nested, type); ! DECL_NESTED_TYPENAME (type_decl) = nested; ! SET_DECL_ARTIFICIAL (type_decl); ! /* Mark the TYPE_DECL node created just above as a gratuitous one so that ! dwarfout.c will know not to generate a TAG_typedef DIE for it, and ! sdbout.c won't try to output a .def for "::foo". */ ! DECL_IGNORED_P (type_decl) = 1; ! ! /* Remove this when local classes are fixed. */ ! SET_IDENTIFIER_TYPE_VALUE (nested, type); ! ! pushdecl_nonclass_level (type_decl); ! } } ! /* Pop off extraneous binding levels left over due to syntax errors. ! ! We don't pop past namespaces, as they might be valid. */ void pop_everything () *************** *** 1648,1653 **** fprintf (stderr, "XXX entering pop_everything ()\n"); #endif ! while (current_binding_level != global_binding_level ! && ! current_binding_level->pseudo_global) { if (class_binding_level) --- 1916,1920 ---- fprintf (stderr, "XXX entering pop_everything ()\n"); #endif ! while (! toplevel_bindings_p () && ! pseudo_global_level_p ()) { if (class_binding_level) *************** *** 1693,1697 **** /* Push a tag name NAME for struct/class/union/enum type TYPE. ! Normally put into into the inner-most non-tag-tranparent scope, but if GLOBALIZE is true, put it in the inner-most non-class scope. The latter is needed for implicit declarations. */ --- 1960,1964 ---- /* Push a tag name NAME for struct/class/union/enum type TYPE. ! Normally put into into the inner-most non-tag-transparent scope, but if GLOBALIZE is true, put it in the inner-most non-class scope. The latter is needed for implicit declarations. */ *************** *** 1711,1715 **** b = b->level_chain; ! if (b == global_binding_level) b->tags = perm_tree_cons (name, type, b->tags); else --- 1978,1982 ---- b = b->level_chain; ! if (toplevel_bindings_p ()) b->tags = perm_tree_cons (name, type, b->tags); else *************** *** 1723,1737 **** if (context) c_decl = TREE_CODE (context) == FUNCTION_DECL ! ? context : TYPE_NAME (context); /* Record the identifier as the type's name if it has none. */ if (TYPE_NAME (type) == NULL_TREE) TYPE_NAME (type) = name; /* Do C++ gratuitous typedefing. */ ! if (IDENTIFIER_TYPE_VALUE (name) != type ! && (TREE_CODE (type) != RECORD_TYPE ! || b->parm_flag != 2 ! || !CLASSTYPE_DECLARED_EXCEPTION (type))) { register tree d; --- 1990,2003 ---- if (context) c_decl = TREE_CODE (context) == FUNCTION_DECL ! ? context : TYPE_MAIN_DECL (context); + #if 0 /* Record the identifier as the type's name if it has none. */ if (TYPE_NAME (type) == NULL_TREE) TYPE_NAME (type) = name; + #endif /* Do C++ gratuitous typedefing. */ ! if (IDENTIFIER_TYPE_VALUE (name) != type) { register tree d; *************** *** 1767,1778 **** d = TYPE_NAME (d); /* If it is anonymous, then we are called from pushdecl, ! and we don't want to infinitely recurse. Also, if the ! name is already in scope, we don't want to push it ! again--pushdecl is only for pushing new decls. */ ! if (! ANON_AGGRNAME_P (name) ! && TYPE_NAME (type) ! && (TREE_CODE (TYPE_NAME (type)) != TYPE_DECL ! || lookup_name (name, 1) != TYPE_NAME (type))) { if (b->parm_flag == 2) --- 2033,2041 ---- d = TYPE_NAME (d); + TYPE_NAME (type) = d; + /* If it is anonymous, then we are called from pushdecl, ! and we don't want to infinitely recurse. */ ! if (! ANON_AGGRNAME_P (name)) { if (b->parm_flag == 2) *************** *** 1798,1801 **** --- 2061,2067 ---- } #endif /* DWARF_DEBUGGING_INFO */ + + TYPE_MAIN_DECL (type) = d; + /* Make sure we're in this type's scope when we push the decl for a template, otherwise class_binding_level will *************** *** 1808,1843 **** popclass (0); } ! if (write_symbols != DWARF_DEBUG) { ! if (ANON_AGGRNAME_P (name)) ! DECL_IGNORED_P (d) = 1; ! } ! TYPE_NAME (type) = d; ! if (context == NULL_TREE) ! /* Non-nested class. */ ! DECL_NESTED_TYPENAME (d) = name; ! else if (context && TREE_CODE (context) == FUNCTION_DECL) ! { ! /* Function-nested class. */ ! set_nested_typename (d, DECL_ASSEMBLER_NAME (c_decl), ! name, type); ! /* This builds the links for classes nested in fn scope. */ ! DECL_CONTEXT (d) = context; ! } ! /* else if (TYPE_SIZE (current_class_type) == NULL_TREE) ! */ ! else if (context && IS_AGGR_TYPE (context)) ! { ! /* Class-nested class. */ ! set_nested_typename (d, DECL_NESTED_TYPENAME (c_decl), ! name, type); ! /* This builds the links for classes nested in type scope. */ DECL_CONTEXT (d) = context; } - TYPE_CONTEXT (type) = DECL_CONTEXT (d); - if (newdecl) - DECL_ASSEMBLER_NAME (d) - = get_identifier (build_overload_name (type, 1, 1)); } if (b->parm_flag == 2) --- 2074,2102 ---- popclass (0); } ! if (newdecl) { ! if (write_symbols != DWARF_DEBUG) ! { ! if (ANON_AGGRNAME_P (name)) ! DECL_IGNORED_P (d) = 1; ! } ! if (context == NULL_TREE) ! /* Non-nested class. */ ! set_nested_typename (d, NULL_TREE, name, type); ! else if (context && TREE_CODE (context) == FUNCTION_DECL) ! /* Function-nested class. */ ! set_nested_typename (d, DECL_ASSEMBLER_NAME (c_decl), ! name, type); ! else /* if (context && IS_AGGR_TYPE (context)) */ ! /* Class-nested class. */ ! set_nested_typename (d, DECL_NESTED_TYPENAME (c_decl), ! name, type); ! DECL_CONTEXT (d) = context; + TYPE_CONTEXT (type) = DECL_CONTEXT (d); + DECL_ASSEMBLER_NAME (d) + = get_identifier (build_overload_name (type, 1, 1)); } } if (b->parm_flag == 2) *************** *** 1921,1925 **** `int&' in a parameter position, but `int&' is not confused with `const int&'. */ ! static int decls_match (newdecl, olddecl) tree newdecl, olddecl; --- 2180,2184 ---- `int&' in a parameter position, but `int&' is not confused with `const int&'. */ ! int decls_match (newdecl, olddecl) tree newdecl, olddecl; *************** *** 2050,2060 **** if (flag_traditional ! || TREE_CODE (newdecl) == TYPE_DECL ! || (! warn_extern_inline ! && DECL_INLINE (newdecl))) return; name = DECL_ASSEMBLER_NAME (newdecl); ! if (TREE_PUBLIC (name) && ! TREE_PUBLIC (newdecl)) { /* It's okay to redeclare an ANSI built-in function as static, --- 2309,2317 ---- if (flag_traditional ! || TREE_CODE (newdecl) == TYPE_DECL) return; name = DECL_ASSEMBLER_NAME (newdecl); ! if (TREE_PUBLIC (name) && DECL_THIS_STATIC (newdecl)) { /* It's okay to redeclare an ANSI built-in function as static, *************** *** 2066,2074 **** || DECL_BUILT_IN_NONANSI (olddecl)))) { ! cp_warning (IDENTIFIER_IMPLICIT_DECL (name) ? implicit_extern_static_warning : explicit_extern_static_warning, newdecl); if (olddecl != NULL_TREE) ! cp_warning_at ("previous declaration of `%D'", olddecl); } } --- 2323,2331 ---- || DECL_BUILT_IN_NONANSI (olddecl)))) { ! cp_pedwarn (IDENTIFIER_IMPLICIT_DECL (name) ? implicit_extern_static_warning : explicit_extern_static_warning, newdecl); if (olddecl != NULL_TREE) ! cp_pedwarn_at ("previous declaration of `%D'", olddecl); } } *************** *** 2092,2095 **** --- 2349,2355 ---- tree previous_c_decl = NULL_TREE; + if (TREE_CODE_CLASS (TREE_CODE (olddecl)) == 'd') + DECL_MACHINE_ATTRIBUTES (newdecl) = DECL_MACHINE_ATTRIBUTES (olddecl); + types_match = decls_match (newdecl, olddecl); *************** *** 2120,2124 **** the old definition is overridden, but optionally warn this was a bad choice of name. Ditto for overloads. */ ! if (! TREE_PUBLIC (newdecl) || (TREE_CODE (newdecl) == FUNCTION_DECL && DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl))) --- 2380,2384 ---- the old definition is overridden, but optionally warn this was a bad choice of name. Ditto for overloads. */ ! if (! DECL_PUBLIC (newdecl) || (TREE_CODE (newdecl) == FUNCTION_DECL && DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl))) *************** *** 2200,2204 **** } else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)), ! TYPE_ARG_TYPES (TREE_TYPE (olddecl)), 2)) { cp_error ("new declaration `%#D'", newdecl); --- 2460,2464 ---- } else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)), ! TYPE_ARG_TYPES (TREE_TYPE (olddecl)), 3)) { cp_error ("new declaration `%#D'", newdecl); *************** *** 2209,2222 **** } - if (olddecl == wchar_decl_node) - { - if (pedantic && ! DECL_IN_SYSTEM_HEADER (newdecl)) - cp_pedwarn ("redeclaration of wchar_t as `%T'", - TREE_TYPE (newdecl)); - - /* Throw away the redeclaration. */ - return 1; - } - /* Already complained about this, so don't do so again. */ else if (current_class_type == NULL_TREE --- 2469,2472 ---- *************** *** 2265,2274 **** } ! /* These bits are logically part of the type. */ ! if (pedantic ! && (TREE_READONLY (newdecl) != TREE_READONLY (olddecl) ! || TREE_THIS_VOLATILE (newdecl) != TREE_THIS_VOLATILE (olddecl))) ! cp_error_at ("type qualifiers for `%D' conflict with previous decl", ! newdecl); } --- 2515,2563 ---- } ! if (TREE_CODE (olddecl) == FUNCTION_DECL) ! { ! tree t1 = TYPE_ARG_TYPES (TREE_TYPE (olddecl)); ! tree t2 = TYPE_ARG_TYPES (TREE_TYPE (newdecl)); ! int i = 1; ! ! if (TREE_CODE (TREE_TYPE (newdecl)) == METHOD_TYPE) ! t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2); ! ! for (; t1 && t1 != void_list_node; ! t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2), i++) ! if (TREE_PURPOSE (t1) && TREE_PURPOSE (t2)) ! { ! if (1 == simple_cst_equal (TREE_PURPOSE (t1), ! TREE_PURPOSE (t2))) ! { ! if (pedantic) ! { ! cp_pedwarn ("default argument given for parameter %d of `%#D'", ! i, newdecl); ! cp_pedwarn_at ("after previous specification in `%#D'", ! olddecl); ! } ! } ! else ! { ! cp_error ("default argument given for parameter %d of `%#D'", ! i, newdecl); ! cp_error_at ("conflicts with previous specification in `%#D'", ! olddecl); ! } ! } ! ! if (DECL_THIS_INLINE (newdecl) && ! DECL_THIS_INLINE (olddecl) ! && TREE_ADDRESSABLE (olddecl)) ! cp_pedwarn ("`%#D' was used before it was declared inline", ! newdecl); ! } ! /* These bits are logically part of the type for non-functions. */ ! else if (TREE_READONLY (newdecl) != TREE_READONLY (olddecl) ! || TREE_THIS_VOLATILE (newdecl) != TREE_THIS_VOLATILE (olddecl)) ! { ! cp_pedwarn ("type qualifiers for `%#D'", newdecl); ! cp_pedwarn_at ("conflict with previous decl `%#D'", olddecl); ! } } *************** *** 2296,2299 **** --- 2585,2591 ---- if (DECL_PENDING_INLINE_INFO (newdecl) == (struct pending_inline *)0) DECL_PENDING_INLINE_INFO (newdecl) = DECL_PENDING_INLINE_INFO (olddecl); + DECL_STATIC_CONSTRUCTOR (newdecl) |= DECL_STATIC_CONSTRUCTOR (olddecl); + DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl); + DECL_ABSTRACT_VIRTUAL_P (newdecl) |= DECL_ABSTRACT_VIRTUAL_P (olddecl); } *************** *** 2304,2307 **** --- 2596,2601 ---- register tree oldtype = TREE_TYPE (olddecl); + DECL_NESTED_TYPENAME (newdecl) = DECL_NESTED_TYPENAME (olddecl); + if (newtype != error_mark_node && oldtype != error_mark_node && TYPE_LANG_SPECIFIC (newtype) && TYPE_LANG_SPECIFIC (oldtype)) *************** *** 2338,2342 **** { cp_warning ("redundant redeclaration of `%D' in same scope", newdecl); ! cp_warning ("previous declaration of `%D'", olddecl); } --- 2632,2636 ---- { cp_warning ("redundant redeclaration of `%D' in same scope", newdecl); ! cp_warning_at ("previous declaration of `%D'", olddecl); } *************** *** 2348,2358 **** /* Automatically handles default parameters. */ tree oldtype = TREE_TYPE (olddecl); ! /* Merge the data types specified in the two decls. */ ! tree newtype = common_type (TREE_TYPE (newdecl), TREE_TYPE (olddecl)); ! /* Make sure we put the new type in the same obstack as the old ones. ! If the old types are not both in the same obstack, use the permanent ! one. */ ! if (oldtype && TYPE_OBSTACK (oldtype) == TYPE_OBSTACK (newtype)) push_obstacks (TYPE_OBSTACK (oldtype), TYPE_OBSTACK (oldtype)); else --- 2642,2649 ---- /* Automatically handles default parameters. */ tree oldtype = TREE_TYPE (olddecl); ! tree newtype; ! /* Make sure we put the new type in the same obstack as the old one. */ ! if (oldtype) push_obstacks (TYPE_OBSTACK (oldtype), TYPE_OBSTACK (oldtype)); else *************** *** 2362,2365 **** --- 2653,2659 ---- } + /* Merge the data types specified in the two decls. */ + newtype = common_type (TREE_TYPE (newdecl), TREE_TYPE (olddecl)); + if (TREE_CODE (newdecl) == VAR_DECL) DECL_THIS_EXTERN (newdecl) |= DECL_THIS_EXTERN (olddecl); *************** *** 2379,2383 **** if (! compexcepttypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl), 0)) { ! cp_error ("declaration of `%D' raises different exceptions...", newdecl); cp_error_at ("...from previous declaration here", olddecl); --- 2673,2677 ---- if (! compexcepttypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl), 0)) { ! cp_error ("declaration of `%D' throws different exceptions...", newdecl); cp_error_at ("...from previous declaration here", olddecl); *************** *** 2387,2405 **** /* 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 ! && TREE_CODE (newdecl) != TEMPLATE_DECL) ! layout_decl (newdecl, 0); ! } ! else ! { ! /* Since the type is OLDDECL's, make OLDDECL's size go with. */ ! DECL_SIZE (newdecl) = DECL_SIZE (olddecl); ! } /* Merge the type qualifiers. */ --- 2681,2694 ---- /* Lay the type out, unless already done. */ ! if (oldtype != TREE_TYPE (newdecl) ! && TREE_TYPE (newdecl) != error_mark_node) ! layout_type (TREE_TYPE (newdecl)); ! ! if (TREE_CODE (newdecl) == VAR_DECL ! || TREE_CODE (newdecl) == PARM_DECL ! || TREE_CODE (newdecl) == RESULT_DECL ! || TREE_CODE (newdecl) == FIELD_DECL ! || TREE_CODE (newdecl) == TYPE_DECL) ! layout_decl (newdecl, 0); /* Merge the type qualifiers. */ *************** *** 2450,2494 **** /* Merge the storage class information. */ ! if (DECL_EXTERNAL (newdecl)) ! { ! TREE_STATIC (newdecl) = TREE_STATIC (olddecl); ! DECL_EXTERNAL (newdecl) = DECL_EXTERNAL (olddecl); ! if (TREE_CODE (newdecl) != FUNCTION_DECL) ! TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl); ! } ! else { ! TREE_STATIC (olddecl) = TREE_STATIC (newdecl); ! /* A `const' which was not declared `extern' and is ! in static storage is invisible. */ ! if (TREE_CODE (newdecl) == VAR_DECL ! && TREE_READONLY (newdecl) && TREE_STATIC (newdecl) ! && ! DECL_THIS_EXTERN (newdecl)) ! TREE_PUBLIC (newdecl) = 0; ! else if (TREE_CODE (newdecl) != FUNCTION_DECL) ! TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl); } - /* 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_ASSEMBLER_NAME (olddecl)) = 0; ! } ! /* If either decl says `inline', this fn is inline, ! unless its definition was passed already. */ ! if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == NULL_TREE) ! DECL_INLINE (olddecl) = 1; ! DECL_INLINE (newdecl) = DECL_INLINE (olddecl); - if (TREE_CODE (newdecl) == FUNCTION_DECL) - { if (! types_match) { --- 2739,2765 ---- /* Merge the storage class information. */ ! DECL_WEAK (newdecl) |= DECL_WEAK (olddecl); ! TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl); ! TREE_STATIC (olddecl) = TREE_STATIC (newdecl) |= TREE_STATIC (olddecl); ! if (! DECL_EXTERNAL (olddecl)) ! DECL_EXTERNAL (newdecl) = 0; ! if (TREE_CODE (newdecl) == FUNCTION_DECL) { ! DECL_C_STATIC (newdecl) = DECL_C_STATIC (olddecl); ! DECL_INTERFACE_KNOWN (newdecl) |= DECL_INTERFACE_KNOWN (olddecl); ! DECL_NOT_REALLY_EXTERN (newdecl) |= DECL_NOT_REALLY_EXTERN (olddecl); } if (TREE_CODE (newdecl) == FUNCTION_DECL) { ! DECL_THIS_INLINE (newdecl) |= DECL_THIS_INLINE (olddecl); ! /* If either decl says `inline', this fn is inline, unless its ! definition was passed already. */ ! if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == NULL_TREE) ! DECL_INLINE (olddecl) = 1; ! DECL_INLINE (newdecl) = DECL_INLINE (olddecl); if (! types_match) { *************** *** 2527,2530 **** --- 2798,2808 ---- DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl); } + if (DECL_LANG_SPECIFIC (olddecl)) + DECL_MAIN_VARIANT (newdecl) = DECL_MAIN_VARIANT (olddecl); + } + + if (TREE_CODE (newdecl) == NAMESPACE_DECL) + { + NAMESPACE_LEVEL (newdecl) = NAMESPACE_LEVEL (olddecl); } *************** *** 2552,2555 **** --- 2830,2834 ---- DECL_IN_AGGR_P (newdecl) = DECL_IN_AGGR_P (olddecl); DECL_ACCESS (newdecl) = DECL_ACCESS (olddecl); + DECL_NONCONVERTING_P (newdecl) = DECL_NONCONVERTING_P (olddecl); } *************** *** 2662,2666 **** /* Type are looked up using the DECL_NAME, as that is what the rest of the compiler wants to use. */ ! if (TREE_CODE (x) == TYPE_DECL) name = DECL_NAME (x); #endif --- 2941,2946 ---- /* Type are looked up using the DECL_NAME, as that is what the rest of the compiler wants to use. */ ! if (TREE_CODE (x) == TYPE_DECL || TREE_CODE (x) == VAR_DECL ! || TREE_CODE (x) == NAMESPACE_DECL) name = DECL_NAME (x); #endif *************** *** 2694,2697 **** --- 2974,2985 ---- && is_overloaded_fn (t)) /* don't do anything just yet */; + else if (t == wchar_decl_node) + { + if (pedantic && ! DECL_IN_SYSTEM_HEADER (x)) + cp_pedwarn ("redeclaration of wchar_t as `%T'", TREE_TYPE (x)); + + /* Throw away the redeclaration. */ + return t; + } else if (TREE_CODE (t) != TREE_CODE (x)) { *************** *** 2776,2779 **** --- 3064,3068 ---- tree tname = DECL_NAME (name); + /* This is a disgusting kludge for dealing with UPTs. */ if (global_bindings_p () && ANON_AGGRNAME_P (tname)) { *************** *** 2787,2793 **** my_friendly_assert (TREE_CODE (name) == TYPE_DECL, 140); ! if (DECL_NAME (name) && !DECL_NESTED_TYPENAME (name)) ! set_nested_typename (x, current_class_name, ! DECL_NAME (name), type); if (type != error_mark_node --- 3076,3084 ---- my_friendly_assert (TREE_CODE (name) == TYPE_DECL, 140); ! /* Don't set nested_typename on template type parms, for instance. ! Any artificial decls that need DECL_NESTED_TYPENAME will have it ! set in pushtag. */ ! if (! DECL_NESTED_TYPENAME (x) && ! DECL_ARTIFICIAL (x)) ! set_nested_typename (x, current_class_name, DECL_NAME (x), type); if (type != error_mark_node *************** *** 2836,2855 **** /* Install a global value. */ - /* Rule for VAR_DECLs, but not for other kinds of _DECLs: - A `const' which was not declared `extern' is invisible. */ - if (TREE_CODE (x) == VAR_DECL - && TREE_READONLY (x) && ! DECL_THIS_EXTERN (x)) - TREE_PUBLIC (x) = 0; - /* If the first global decl has external linkage, warn if we later see static one. */ ! if (IDENTIFIER_GLOBAL_VALUE (name) == NULL_TREE && TREE_PUBLIC (x)) TREE_PUBLIC (name) = 1; ! /* Don't install a TYPE_DECL if we already have another ! sort of _DECL with that name. */ if (TREE_CODE (x) != TYPE_DECL || t == NULL_TREE ! || TREE_CODE (t) == TYPE_DECL) IDENTIFIER_GLOBAL_VALUE (name) = x; --- 3127,3140 ---- /* Install a global value. */ /* If the first global decl has external linkage, warn if we later see static one. */ ! if (IDENTIFIER_GLOBAL_VALUE (name) == NULL_TREE && DECL_PUBLIC (x)) TREE_PUBLIC (name) = 1; ! /* Don't install an artificial TYPE_DECL if we already have ! another _DECL with that name. */ if (TREE_CODE (x) != TYPE_DECL || t == NULL_TREE ! || ! DECL_ARTIFICIAL (x)) IDENTIFIER_GLOBAL_VALUE (name) = x; *************** *** 2883,2888 **** tree oldglobal = IDENTIFIER_GLOBAL_VALUE (name); ! b->shadowed = tree_cons (name, oldlocal, b->shadowed); ! IDENTIFIER_LOCAL_VALUE (name) = x; /* If this is a TYPE_DECL, push it into the type value slot. */ --- 3168,3180 ---- tree oldglobal = IDENTIFIER_GLOBAL_VALUE (name); ! /* Don't install an artificial TYPE_DECL if we already have ! another _DECL with that name. */ ! if (TREE_CODE (x) != TYPE_DECL ! || t == NULL_TREE ! || ! DECL_ARTIFICIAL (x)) ! { ! b->shadowed = tree_cons (name, oldlocal, b->shadowed); ! IDENTIFIER_LOCAL_VALUE (name) = x; ! } /* If this is a TYPE_DECL, push it into the type value slot. */ *************** *** 2890,2897 **** set_identifier_type_value_with_scope (name, TREE_TYPE (x), b); /* If this is an extern function declaration, see if we have a global definition or declaration for the function. */ if (oldlocal == NULL_TREE ! && DECL_EXTERNAL (x) && !DECL_INLINE (x) && oldglobal != NULL_TREE && TREE_CODE (x) == FUNCTION_DECL --- 3182,3195 ---- set_identifier_type_value_with_scope (name, TREE_TYPE (x), b); + /* Clear out any TYPE_DECL shadowed by a namespace so that + we won't think this is a type. The C struct hack doesn't + go through namespaces. */ + if (TREE_CODE (x) == NAMESPACE_DECL) + set_identifier_type_value_with_scope (name, NULL_TREE, b); + /* If this is an extern function declaration, see if we have a global definition or declaration for the function. */ if (oldlocal == NULL_TREE ! && DECL_EXTERNAL (x) && oldglobal != NULL_TREE && TREE_CODE (x) == FUNCTION_DECL *************** *** 2899,2935 **** { /* We have one. Their types must agree. */ ! if (! comptypes (TREE_TYPE (x), TREE_TYPE (oldglobal), 1)) { cp_warning ("extern declaration of `%#D' doesn't match", x); cp_warning_at ("global declaration `%#D'", oldglobal); } - else - { - /* Inner extern decl is inline if global one is. - Copy enough to really inline it. */ - if (DECL_INLINE (oldglobal)) - { - DECL_INLINE (x) = DECL_INLINE (oldglobal); - DECL_INITIAL (x) = (current_function_decl == oldglobal - ? NULL_TREE : DECL_INITIAL (oldglobal)); - DECL_SAVED_INSNS (x) = DECL_SAVED_INSNS (oldglobal); - DECL_FRAME_SIZE (x) = DECL_FRAME_SIZE (oldglobal); - DECL_ARGUMENTS (x) = DECL_ARGUMENTS (oldglobal); - DECL_RESULT (x) = DECL_RESULT (oldglobal); - TREE_ASM_WRITTEN (x) = TREE_ASM_WRITTEN (oldglobal); - DECL_ABSTRACT_ORIGIN (x) = oldglobal; - } - /* Inner extern decl is built-in if global one is. */ - if (DECL_BUILT_IN (oldglobal)) - { - DECL_BUILT_IN (x) = DECL_BUILT_IN (oldglobal); - DECL_FUNCTION_CODE (x) = DECL_FUNCTION_CODE (oldglobal); - } - /* Keep the arg types from a file-scope fcn defn. */ - if (TYPE_ARG_TYPES (TREE_TYPE (oldglobal)) != NULL_TREE - && DECL_INITIAL (oldglobal) - && TYPE_ARG_TYPES (TREE_TYPE (x)) == NULL_TREE) - TREE_TYPE (x) = TREE_TYPE (oldglobal); - } } /* If we have a local external declaration, --- 3197,3207 ---- { /* We have one. Their types must agree. */ ! if (decls_match (x, oldglobal)) ! /* OK */; ! else { cp_warning ("extern declaration of `%#D' doesn't match", x); cp_warning_at ("global declaration `%#D'", oldglobal); } } /* If we have a local external declaration, *************** *** 2985,2993 **** 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 != NULL_TREE) ! b->shadowed = tree_cons (name, oldlocal, b->shadowed); } --- 3257,3279 ---- warning (warnstring, IDENTIFIER_POINTER (name)); } + } ! if (TREE_CODE (x) == FUNCTION_DECL) ! { ! /* This is probably the wrong place to check this, but it has to ! come after the call to duplicate_decls. */ ! tree arg = TYPE_ARG_TYPES (TREE_TYPE (x)); ! int saw_def = 0, i = 1; ! for (; arg && arg != void_list_node; arg = TREE_CHAIN (arg), ++i) ! { ! if (TREE_PURPOSE (arg)) ! saw_def = 1; ! else if (saw_def) ! { ! cp_error ("default argument missing for parameter %d of `%#D'", ! i, x); ! break; ! } ! } } *************** *** 3000,3012 **** error ("too many incomplete variables at this point"); } - } ! if (TREE_CODE (x) == TYPE_DECL && name != NULL_TREE) ! { ! if (current_class_name) { ! if (! TREE_MANGLED (name)) ! set_nested_typename (x, current_class_name, DECL_NAME (x), ! TREE_TYPE (x)); } } --- 3286,3299 ---- error ("too many incomplete variables at this point"); } ! /* Keep count of variables in this level with incomplete type. */ ! /* RTTI TD entries are created while defining the type_info. */ ! if (TREE_CODE (x) == VAR_DECL ! && TREE_TYPE (x) != error_mark_node ! && TYPE_LANG_SPECIFIC (TREE_TYPE (x)) ! && TYPE_BEING_DEFINED (TREE_TYPE (x))) { ! if (++b->n_incomplete == 0) ! error ("too many incomplete variables at this point"); } } *************** *** 3136,3140 **** { set_identifier_type_value (name, TREE_TYPE (x)); ! if (!DECL_NESTED_TYPENAME (x)) set_nested_typename (x, current_class_name, name, TREE_TYPE (x)); } --- 3423,3431 ---- { set_identifier_type_value (name, TREE_TYPE (x)); ! ! /* Don't set nested_typename on template type parms, for instance. ! Any artificial decls that need DECL_NESTED_TYPENAME will have it ! set in pushtag. */ ! if (! DECL_NESTED_TYPENAME (x) && ! DECL_ARTIFICIAL (x)) set_nested_typename (x, current_class_name, name, TREE_TYPE (x)); } *************** *** 3175,3178 **** --- 3466,3473 ---- tree x; { + if (TREE_CODE (x) == TYPE_DECL && DECL_ARTIFICIAL (x) + && purpose_member (name, class_binding_level->class_shadowed)) + return; + maybe_push_cache_obstack (); class_binding_level->class_shadowed *************** *** 3258,3268 **** else #endif ! if (TREE_CODE (old) == VAR_DECL) ! { ! cp_error_at ("previous non-function declaration `%#D'", old); ! cp_error ("conflicts with function declaration `%#D'", decl); ! return error_mark_node; ! } ! else if (TREE_CODE (old) == TYPE_DECL) { tree t = TREE_TYPE (old); --- 3553,3557 ---- else #endif ! if (TREE_CODE (old) == TYPE_DECL && DECL_ARTIFICIAL (old)) { tree t = TREE_TYPE (old); *************** *** 3279,3282 **** --- 3568,3577 ---- return tmp; } + else + { + cp_error_at ("previous non-function declaration `%#D'", old); + cp_error ("conflicts with function declaration `%#D'", decl); + return decl; + } } *************** *** 3317,3322 **** In ANSI C, warn_implicit is usually false, so the saves little space. But in C++, it's usually true, hence the extra code. */ ! if (temp && (flag_traditional || !warn_implicit ! || current_binding_level == global_binding_level)) end_temporary_allocation (); --- 3612,3616 ---- In ANSI C, warn_implicit is usually false, so the saves little space. But in C++, it's usually true, hence the extra code. */ ! if (temp && (flag_traditional || !warn_implicit || toplevel_bindings_p ())) end_temporary_allocation (); *************** *** 3377,3390 **** return 0; ! /* Declarations of functions can insist on internal linkage ! but they can't be inconsistent with internal linkage, ! so there can be no error on that account. ! However defining the same name twice is no good. */ if (DECL_INITIAL (olddecl) != NULL_TREE ! && DECL_INITIAL (newdecl) != NULL_TREE ! /* However, defining once as extern inline and a second ! time in another way is ok. */ ! && !(DECL_INLINE (olddecl) && DECL_EXTERNAL (olddecl) ! && !(DECL_INLINE (newdecl) && DECL_EXTERNAL (newdecl)))) { if (DECL_NAME (olddecl) == NULL_TREE) --- 3671,3680 ---- return 0; ! /* We'll complain about linkage mismatches in ! warn_extern_redeclared_static. */ ! ! /* defining the same name twice is no good. */ if (DECL_INITIAL (olddecl) != NULL_TREE ! && DECL_INITIAL (newdecl) != NULL_TREE) { if (DECL_NAME (olddecl) == NULL_TREE) *************** *** 3393,3408 **** return "redefinition of `%#D'"; } - - { - tree t1 = TYPE_ARG_TYPES (TREE_TYPE (olddecl)); - tree t2 = TYPE_ARG_TYPES (TREE_TYPE (newdecl)); - - if (TREE_CODE (TREE_TYPE (newdecl)) == METHOD_TYPE) - t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2); - - for (; t1; t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2)) - if (TREE_PURPOSE (t1) && TREE_PURPOSE (t2)) - return "duplicate default arguments given for `%#D'"; - } return 0; } --- 3683,3686 ---- *************** *** 3419,3426 **** if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl)) return 0; - /* 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 `%#D'"; /* Reject two definitions. */ return "redefinition of `%#D'"; --- 3697,3700 ---- *************** *** 3543,3546 **** --- 3817,3823 ---- } + if (name == get_identifier ("wchar_t")) + cp_pedwarn ("label named wchar_t"); + if (DECL_INITIAL (decl) != NULL_TREE) { *************** *** 3551,3554 **** --- 3828,3832 ---- { tree uses, prev; + int identified = 0; /* Mark label as having been defined. */ *************** *** 3581,3588 **** || TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (new_decls)))) { ! if (IDENTIFIER_ERROR_LOCUS (decl) == NULL_TREE) ! cp_error ("invalid jump to label `%D'", decl); ! SET_IDENTIFIER_ERROR_LOCUS (decl, current_function_decl); ! cp_error ("crosses initialization of `%D'", new_decls); } new_decls = TREE_CHAIN (new_decls); --- 3859,3867 ---- || TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (new_decls)))) { ! if (! identified) ! cp_error ("jump to label `%D'", decl); ! identified = 1; ! cp_error_at (" crosses initialization of `%#D'", ! new_decls); } new_decls = TREE_CHAIN (new_decls); *************** *** 3603,3606 **** --- 3882,3909 ---- } + struct cp_switch + { + struct binding_level *level; + struct cp_switch *next; + }; + + static struct cp_switch *switch_stack; + + void + push_switch () + { + struct cp_switch *p + = (struct cp_switch *) oballoc (sizeof (struct cp_switch)); + p->level = current_binding_level; + p->next = switch_stack; + switch_stack = p; + } + + void + pop_switch () + { + switch_stack = switch_stack->next; + } + /* Same, but for CASE labels. If DECL is NULL_TREE, it's the default. */ /* XXX Note decl is never actually used. (bpk) */ *************** *** 3610,3626 **** { tree cleanup = last_cleanup_this_contour (); if (cleanup) { static int explained = 0; ! cp_error_at ("destructor needed for `%#D'", TREE_PURPOSE (cleanup)); ! error ("where case label appears here"); if (!explained) { ! error ("(enclose actions of previous case statements requiring"); ! error ("destructors in their own binding contours.)"); explained = 1; } } /* After labels, make any new cleanups go into their own new (temporary) binding contour. */ --- 3913,3956 ---- { tree cleanup = last_cleanup_this_contour (); + struct binding_level *b = current_binding_level; + int identified = 0; + if (cleanup) { static int explained = 0; ! cp_warning_at ("destructor needed for `%#D'", TREE_PURPOSE (cleanup)); ! warning ("where case label appears here"); if (!explained) { ! warning ("(enclose actions of previous case statements requiring"); ! warning ("destructors in their own binding contours.)"); explained = 1; } } + for (; b && b != switch_stack->level; b = b->level_chain) + { + tree new_decls = b->names; + for (; new_decls; new_decls = TREE_CHAIN (new_decls)) + { + if (TREE_CODE (new_decls) == VAR_DECL + /* Don't complain about crossing initialization + of internal entities. They can't be accessed, + and they should be cleaned up + by the time we get to the label. */ + && ! DECL_ARTIFICIAL (new_decls) + && ((DECL_INITIAL (new_decls) != NULL_TREE + && DECL_INITIAL (new_decls) != error_mark_node) + || TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (new_decls)))) + { + if (! identified) + error ("jump to case label"); + identified = 1; + cp_error_at (" crosses initialization of `%#D'", + new_decls); + } + } + } + /* After labels, make any new cleanups go into their own new (temporary) binding contour. */ *************** *** 3874,3880 **** break; case FUNCTION_DECL: ! return TYPE_IDENTIFIER (type) ? ! lookup_name (TYPE_IDENTIFIER (type), 1) : NULL_TREE; ! break; default: my_friendly_abort (12); --- 4204,4210 ---- break; case FUNCTION_DECL: ! if (TYPE_NAME (type) && TYPE_IDENTIFIER (type)) ! return lookup_name (TYPE_IDENTIFIER (type), 1); ! return NULL_TREE; default: my_friendly_abort (12); *************** *** 3884,3887 **** --- 4214,4236 ---- } + /* Look up NAME in the NAMESPACE. */ + tree + lookup_namespace_name (namespace, name) + tree namespace, name; + { + struct binding_level *b = (struct binding_level *)NAMESPACE_LEVEL (namespace); + tree x; + + for (x = NULL_TREE; b && !x; b = b->level_chain) + { + for (x = b->names; x; x = TREE_CHAIN (x)) + if (DECL_NAME (x) == name || DECL_ASSEMBLER_NAME (x) == name) + break; + /* Must find directly in the namespace. */ + break; + } + return x; + } + /* Look up NAME in the current binding level and its superiors in the namespace of variables, functions and typedefs. Return a ..._DECL *************** *** 3901,3934 **** register tree val; int yylex = 0; if (prefer_type == -2) { extern int looking_for_typename; yylex = 1; prefer_type = looking_for_typename; ! if (got_scope != NULL_TREE) { ! if (got_scope == error_mark_node) return error_mark_node; ! else if (got_scope == void_type_node) val = IDENTIFIER_GLOBAL_VALUE (name); ! else if (TREE_CODE (got_scope) == TEMPLATE_TYPE_PARM /* TFIXME -- don't do this for UPTs in new model. */ ! || TREE_CODE (got_scope) == UNINSTANTIATED_P_TYPE) { if (prefer_type > 0) ! val = create_nested_upt (got_scope, name); else val = NULL_TREE; } ! else if (! IS_AGGR_TYPE (got_scope)) /* Someone else will give an error about this if needed. */ val = NULL_TREE; ! else if (TYPE_BEING_DEFINED (got_scope)) { val = IDENTIFIER_CLASS_VALUE (name); ! if (val && DECL_CONTEXT (val) != got_scope) { struct binding_level *b = class_binding_level; --- 4250,4294 ---- register tree val; int yylex = 0; + tree from_obj = NULL_TREE; if (prefer_type == -2) { extern int looking_for_typename; + tree type; yylex = 1; prefer_type = looking_for_typename; + + if (got_scope) + type = got_scope; + else + type = got_object; ! if (type) { ! if (type == error_mark_node) return error_mark_node; ! else if (type == void_type_node) val = IDENTIFIER_GLOBAL_VALUE (name); ! else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM /* TFIXME -- don't do this for UPTs in new model. */ ! || TREE_CODE (type) == UNINSTANTIATED_P_TYPE) { if (prefer_type > 0) ! val = create_nested_upt (type, name); else val = NULL_TREE; } ! else if (TREE_CODE (type) == NAMESPACE_DECL) ! { ! val = lookup_namespace_name (type, name); ! } ! else if (! IS_AGGR_TYPE (type)) /* Someone else will give an error about this if needed. */ val = NULL_TREE; ! else if (TYPE_BEING_DEFINED (type)) { val = IDENTIFIER_CLASS_VALUE (name); ! if (val && DECL_CONTEXT (val) != type) { struct binding_level *b = class_binding_level; *************** *** 3937,3941 **** tree t = purpose_member (name, b->class_shadowed); if (t && TREE_VALUE (t) ! && DECL_CONTEXT (TREE_VALUE (t)) == got_scope) { val = TREE_VALUE (t); --- 4297,4301 ---- tree t = purpose_member (name, b->class_shadowed); if (t && TREE_VALUE (t) ! && DECL_CONTEXT (TREE_VALUE (t)) == type) { val = TREE_VALUE (t); *************** *** 3945,3958 **** } if (val == NULL_TREE ! && CLASSTYPE_LOCAL_TYPEDECLS (got_scope)) ! val = lookup_field (got_scope, name, 0, 1); } ! else if (got_scope == current_class_type) val = IDENTIFIER_CLASS_VALUE (name); else ! val = lookup_field (got_scope, name, 0, 0); ! ! goto done; } } --- 4305,4325 ---- } if (val == NULL_TREE ! && CLASSTYPE_LOCAL_TYPEDECLS (type)) ! val = lookup_field (type, name, 0, 1); } ! else if (type == current_class_type) val = IDENTIFIER_CLASS_VALUE (name); else ! val = lookup_field (type, name, 0, prefer_type); } + else + val = NULL_TREE; + + if (got_scope) + goto done; + + /* This special lookup only applies to types. */ + else if (got_object && val && TREE_CODE (val) == TYPE_DECL) + from_obj = val; } *************** *** 3988,4001 **** if (val) { if ((TREE_CODE (val) == TEMPLATE_DECL && looking_for_template) || TREE_CODE (val) == TYPE_DECL || prefer_type <= 0) ! return val; ! ! if (IDENTIFIER_HAS_TYPE_VALUE (name)) ! return TYPE_NAME (IDENTIFIER_TYPE_VALUE (name)); ! ! if (TREE_TYPE (val) == error_mark_node) ! return error_mark_node; } return val; --- 4355,4372 ---- if (val) { + if (from_obj && from_obj != val) + cp_error ("lookup in the scope of `%#T' does not match lookup in the current scope", + got_object); + if ((TREE_CODE (val) == TEMPLATE_DECL && looking_for_template) || TREE_CODE (val) == TYPE_DECL || prefer_type <= 0) ! ; ! else if (IDENTIFIER_HAS_TYPE_VALUE (name)) ! val = TYPE_NAME (IDENTIFIER_TYPE_VALUE (name)); ! else if (TREE_TYPE (val) == error_mark_node) ! val = error_mark_node; } + else if (from_obj) + val = from_obj; return val; *************** *** 4039,4043 **** { for (t = b->names; t; t = TREE_CHAIN (t)) ! if (DECL_NAME (t) == name) goto out; if (b->keep == 2) --- 4410,4414 ---- { for (t = b->names; t; t = TREE_CHAIN (t)) ! if (DECL_NAME (t) == name || DECL_ASSEMBLER_NAME (t) == name) goto out; if (b->keep == 2) *************** *** 4135,4139 **** } ! if (flag_dossier) { if (builtin_type_tdescs_len+5 >= builtin_type_tdescs_max) --- 4506,4510 ---- } ! if (flag_rtti) { if (builtin_type_tdescs_len+5 >= builtin_type_tdescs_max) *************** *** 4193,4196 **** --- 4564,4583 ---- } + #define builtin_function(NAME, TYPE, CODE, LIBNAME) \ + define_function (NAME, TYPE, CODE, (void (*)())pushdecl, LIBNAME) + + #ifdef __GNUC__ + __inline + #endif + tree auto_function (name, type, code) + tree name, type; + enum built_in_function code; + { + return define_function + (IDENTIFIER_POINTER (name), type, code, (void (*)())push_overloaded_decl_1, + IDENTIFIER_POINTER (build_decl_overload (name, TYPE_ARG_TYPES (type), + 0))); + } + /* Create the predefined scalar types of C, and some nodes representing standard constants (0, 1, (void *)0). *************** *** 4215,4218 **** --- 4602,4606 ---- tree temp; tree array_domain_type; + extern int flag_strict_prototype; /* Have to make these distinct before we try using them. */ *************** *** 4220,4225 **** lang_name_c = get_identifier ("C"); ! if (flag_ansi || pedantic) ! strict_prototypes_lang_c = strict_prototypes_lang_cplusplus; /* Initially, C. */ --- 4608,4618 ---- lang_name_c = get_identifier ("C"); ! if (flag_strict_prototype == 2) ! { ! if (pedantic) ! strict_prototypes_lang_c = strict_prototypes_lang_cplusplus; ! } ! else ! strict_prototypes_lang_c = flag_strict_prototype; /* Initially, C. */ *************** *** 4255,4259 **** gcc_obstack_init (&decl_obstack); ! if (flag_dossier) { builtin_type_tdescs_max = 100; --- 4648,4652 ---- gcc_obstack_init (&decl_obstack); ! if (flag_rtti) { builtin_type_tdescs_max = 100; *************** *** 4390,4400 **** TREE_TYPE (integer_three_node) = integer_type_node; ! bool_type_node = make_unsigned_type (CHAR_TYPE_SIZE); ! TREE_SET_CODE (bool_type_node, BOOLEAN_TYPE); ! record_builtin_type (RID_BOOL, "bool", bool_type_node); ! false_node = build_int_2 (0, 0); ! TREE_TYPE (false_node) = bool_type_node; ! true_node = build_int_2 (1, 0); ! TREE_TYPE (true_node) = bool_type_node; /* These are needed by stor-layout.c. */ --- 4783,4793 ---- TREE_TYPE (integer_three_node) = integer_type_node; ! boolean_type_node = make_unsigned_type (BOOL_TYPE_SIZE); ! TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE); ! record_builtin_type (RID_BOOL, "bool", boolean_type_node); ! boolean_false_node = build_int_2 (0, 0); ! TREE_TYPE (boolean_false_node) = boolean_type_node; ! boolean_true_node = build_int_2 (1, 0); ! TREE_TYPE (boolean_true_node) = boolean_type_node; /* These are needed by stor-layout.c. */ *************** *** 4840,4844 **** } ! if (flag_dossier) { /* Must build __t_desc type. Currently, type descriptors look like this: --- 5233,5238 ---- } ! #if 0 ! if (flag_rtti) { /* Must build __t_desc type. Currently, type descriptors look like this: *************** *** 4951,4957 **** } ! /* Now, C++. */ ! current_lang_name = lang_name_cplusplus; ! if (flag_dossier) { int i = builtin_type_tdescs_len; --- 5345,5349 ---- } ! if (flag_rtti) { int i = builtin_type_tdescs_len; *************** *** 4963,4966 **** --- 5355,5362 ---- } } + #endif /*flag_rtti*/ + + /* Now, C++. */ + current_lang_name = lang_name_cplusplus; auto_function (ansi_opname[(int) NEW_EXPR], *************** *** 5003,5007 **** flag_inline_functions = 0; #if 0 ! /* This causes uneccessary emission of inline functions. */ flag_default_inline = 0; #endif --- 5399,5403 ---- flag_inline_functions = 0; #if 0 ! /* This causes unnecessary emission of inline functions. */ flag_default_inline = 0; #endif *************** *** 5017,5020 **** --- 5413,5484 ---- } + /* initialize type descriptor type node of various rtti type. */ + + int + init_type_desc() + { + tree tdecl; + + tdecl = lookup_name (get_identifier ("type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __t_desc_type_node = TREE_TYPE(tdecl); + __tp_desc_type_node = build_pointer_type (__t_desc_type_node); + + #if 0 + tdecl = lookup_name (get_identifier ("__baselist_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __baselist_desc_type_node = TREE_TYPE (tdecl); + #endif + + tdecl = lookup_name (get_identifier ("__builtin_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __bltn_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__user_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __user_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__class_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __class_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_field (__class_desc_type_node, + get_identifier ("access_mode"), 0, 0); + if (tdecl == NULL_TREE) + return 0; + __access_mode_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__attr_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __attr_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__pointer_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __ptr_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__func_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __func_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__ptmf_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __ptmf_desc_type_node = TREE_TYPE (tdecl); + + tdecl = lookup_name (get_identifier ("__ptmd_type_info"), 0); + if (tdecl == NULL_TREE) + return 0; + __ptmd_desc_type_node = TREE_TYPE (tdecl); + + return 1; + } /* Make a definition for a builtin function named NAME and whose data type is TYPE. TYPE should be a function type with argument types. *************** *** 5036,5039 **** --- 5500,5504 ---- DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; + DECL_ARTIFICIAL (decl) = 1; /* Since `pushdecl' relies on DECL_ASSEMBLER_NAME instead of DECL_NAME, *************** *** 5092,5096 **** || value == ridpointers[(int) RID_EXTERN] || value == ridpointers[(int) RID_AUTO] ! || value == ridpointers[(int) RID_REGISTER]) ob_modifier = value; } --- 5557,5564 ---- || value == ridpointers[(int) RID_EXTERN] || value == ridpointers[(int) RID_AUTO] ! || value == ridpointers[(int) RID_REGISTER] ! || value == ridpointers[(int) RID_INLINE] ! || value == ridpointers[(int) RID_VIRTUAL] ! || value == ridpointers[(int) RID_EXPLICIT]) ob_modifier = value; } *************** *** 5123,5129 **** /* Anonymous unions are objects, that's why we only check for inappropriate specifiers in this branch. */ if (ob_modifier) ! cp_error ("`%D' can only be specified for objects and functions", ! ob_modifier); if (found_tag == 0) --- 5591,5607 ---- /* Anonymous unions are objects, that's why we only check for inappropriate specifiers in this branch. */ + if (ob_modifier) ! { ! if (ob_modifier == ridpointers[(int) RID_INLINE] ! || ob_modifier == ridpointers[(int) RID_VIRTUAL]) ! cp_error ("`%D' can only be specified for functions", ob_modifier); ! else if (ob_modifier == ridpointers[(int) RID_EXPLICIT]) ! cp_error ("`%D' can only be specified for constructors", ! ob_modifier); ! else ! cp_error ("`%D' can only be specified for objects and functions", ! ob_modifier); ! } if (found_tag == 0) *************** *** 5155,5159 **** Exception: for arrays where the length is not specified, ! the type is left null, to be filled in by `finish_decl'. Function definitions do not come here; they go to start_function --- 5633,5637 ---- Exception: for arrays where the length is not specified, ! the type is left null, to be filled in by `cp_finish_decl'. Function definitions do not come here; they go to start_function *************** *** 5214,5223 **** } ! /* Interesting work for this is done in `finish_exception_decl'. */ ! if (TREE_CODE (type) == RECORD_TYPE ! && CLASSTYPE_DECLARED_EXCEPTION (type)) ! return decl; ! ! /* Corresponding pop_obstacks is done in `finish_decl'. */ push_obstacks_nochange (); --- 5692,5696 ---- } ! /* Corresponding pop_obstacks is done in `cp_finish_decl'. */ push_obstacks_nochange (); *************** *** 5259,5265 **** } d = build_lang_decl (TEMPLATE_DECL, DECL_NAME (decl), TREE_TYPE (decl)); - if (interface_unknown && flag_external_templates - && ! DECL_IN_SYSTEM_HEADER (decl)) - warn_if_unknown_interface (); TREE_PUBLIC (d) = TREE_PUBLIC (decl); TREE_STATIC (d) = TREE_STATIC (decl); --- 5732,5735 ---- *************** *** 5280,5289 **** /* Is it valid for this decl to have an initializer at all? If not, set INITIALIZED to zero, which will indirectly ! tell `finish_decl' to ignore the initializer once it is parsed. */ switch (TREE_CODE (decl)) { case TYPE_DECL: /* typedef foo = bar means give foo the same type as bar. ! We haven't parsed bar yet, so `finish_decl' will fix that up. Any other case of an initialization in a TYPE_DECL is an error. */ if (pedantic || list_length (declspecs) > 1) --- 5750,5759 ---- /* Is it valid for this decl to have an initializer at all? If not, set INITIALIZED to zero, which will indirectly ! tell `cp_finish_decl' to ignore the initializer once it is parsed. */ switch (TREE_CODE (decl)) { case TYPE_DECL: /* typedef foo = bar means give foo the same type as bar. ! We haven't parsed bar yet, so `cp_finish_decl' will fix that up. Any other case of an initialization in a TYPE_DECL is an error. */ if (pedantic || list_length (declspecs) > 1) *************** *** 5347,5361 **** if (initialized) { ! if (current_binding_level != global_binding_level && DECL_EXTERNAL (decl)) cp_warning ("declaration of `%#D' has `extern' and is initialized", decl); DECL_EXTERNAL (decl) = 0; ! if (current_binding_level == global_binding_level) TREE_STATIC (decl) = 1; /* Tell `pushdecl' this is an initialized decl even though we don't yet have the initializer expression. ! Also tell `finish_decl' it may store the real initializer. */ DECL_INITIAL (decl) = error_mark_node; } --- 5817,5831 ---- if (initialized) { ! if (! toplevel_bindings_p () && DECL_EXTERNAL (decl)) cp_warning ("declaration of `%#D' has `extern' and is initialized", decl); DECL_EXTERNAL (decl) = 0; ! if ( toplevel_bindings_p ()) TREE_STATIC (decl) = 1; /* Tell `pushdecl' this is an initialized decl even though we don't yet have the initializer expression. ! Also tell `cp_finish_decl' it may store the real initializer. */ DECL_INITIAL (decl) = error_mark_node; } *************** *** 5404,5408 **** /* We don't do this yet for GNU C++. */ /* For a local variable, define the RTL now. */ ! if (current_binding_level != global_binding_level /* But not if this is a duplicate decl and we preserved the rtl from the previous one --- 5874,5878 ---- /* We don't do this yet for GNU C++. */ /* For a local variable, define the RTL now. */ ! if (! toplevel_bindings_p () /* But not if this is a duplicate decl and we preserved the rtl from the previous one *************** *** 5481,5485 **** /* When parsing and digesting the initializer, use temporary storage. Do this even if we will ignore the value. */ ! if (current_binding_level == global_binding_level && debug_temp_inits) { if (TYPE_NEEDS_CONSTRUCTING (type) --- 5951,5955 ---- /* When parsing and digesting the initializer, use temporary storage. Do this even if we will ignore the value. */ ! if (toplevel_bindings_p () && debug_temp_inits) { if (TYPE_NEEDS_CONSTRUCTING (type) *************** *** 5519,5524 **** else { ! tmp = get_temp_name (target_type, ! current_binding_level == global_binding_level); tmp_addr = build_unary_op (ADDR_EXPR, tmp, 0); } --- 5989,5993 ---- else { ! tmp = get_temp_name (target_type, toplevel_bindings_p ()); tmp_addr = build_unary_op (ADDR_EXPR, tmp, 0); } *************** *** 5529,5533 **** if (TYPE_NEEDS_CONSTRUCTING (target_type)) { ! if (current_binding_level == global_binding_level) { /* lay this variable out now. Otherwise `output_addressed_constants' --- 5998,6002 ---- if (TYPE_NEEDS_CONSTRUCTING (target_type)) { ! if (toplevel_bindings_p ()) { /* lay this variable out now. Otherwise `output_addressed_constants' *************** *** 5552,5557 **** { DECL_INITIAL (tmp) = init; ! TREE_STATIC (tmp) = current_binding_level == global_binding_level; ! finish_decl (tmp, init, 0, 0); } if (TREE_STATIC (tmp)) --- 6021,6026 ---- { DECL_INITIAL (tmp) = init; ! TREE_STATIC (tmp) = toplevel_bindings_p (); ! cp_finish_decl (tmp, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); } if (TREE_STATIC (tmp)) *************** *** 5561,5565 **** /* Handle initialization of references. ! These three arguments from from `finish_decl', and have the same meaning here that they do there. */ /* quotes on semantics can be found in ARM 8.4.3. */ --- 6030,6034 ---- /* Handle initialization of references. ! These three arguments from from `cp_finish_decl', and have the same meaning here that they do there. */ /* quotes on semantics can be found in ARM 8.4.3. */ *************** *** 5573,5578 **** if (init == NULL_TREE) { ! if (DECL_LANG_SPECIFIC (decl) == 0 ! || DECL_IN_AGGR_P (decl) == 0) { cp_error ("`%D' declared as reference but not initialized", decl); --- 6042,6048 ---- if (init == NULL_TREE) { ! if ((DECL_LANG_SPECIFIC (decl) == 0 ! || DECL_IN_AGGR_P (decl) == 0) ! && ! DECL_THIS_EXTERN (decl)) { cp_error ("`%D' declared as reference but not initialized", decl); *************** *** 5596,5599 **** --- 6066,6072 ---- init = build_compound_expr (init); + if (TREE_CODE (TREE_TYPE (init)) == REFERENCE_TYPE) + init = convert_from_reference (init); + if (TREE_CODE (TREE_TYPE (type)) != ARRAY_TYPE && TREE_CODE (TREE_TYPE (init)) == ARRAY_TYPE) *************** *** 5668,5671 **** --- 6141,6169 ---- } + /* Fill in DECL_INITIAL with some magical value to prevent expand_decl from + mucking with forces it does not comprehend (i.e. initialization with a + constructor). If we are at global scope and won't go into COMMON, fill + it in with a dummy CONSTRUCTOR to force the variable into .data; + otherwise we can use error_mark_node. */ + + static tree + obscure_complex_init (decl, init) + tree decl, init; + { + if (! flag_no_inline && TREE_STATIC (decl)) + { + if (extract_init (decl, init)) + return NULL_TREE; + } + + if (toplevel_bindings_p () && ! DECL_COMMON (decl)) + DECL_INITIAL (decl) = build (CONSTRUCTOR, TREE_TYPE (decl), NULL_TREE, + NULL_TREE); + else + DECL_INITIAL (decl) = error_mark_node; + + return init; + } + /* Finish processing of a declaration; install its line number and initial value. *************** *** 5675,5679 **** Call `pop_obstacks' iff NEED_POP is nonzero. ! For C++, `finish_decl' must be fairly evasive: it must keep initializers for aggregates that have constructors alive on the permanent obstack, so that the global initializing functions can be written at the end. --- 6173,6177 ---- Call `pop_obstacks' iff NEED_POP is nonzero. ! For C++, `cp_finish_decl' must be fairly evasive: it must keep initializers for aggregates that have constructors alive on the permanent obstack, so that the global initializing functions can be written at the end. *************** *** 5682,5695 **** the normal rules. For functions that take default parameters, DECL points to its ! "maximal" instantiation. `finish_decl' must then also declared its subsequently lower and lower forms of instantiation, checking for ambiguity as it goes. This can be sped up later. */ void ! finish_decl (decl, init, asmspec_tree, need_pop) tree decl, init; tree asmspec_tree; int need_pop; { register tree type; --- 6180,6197 ---- the normal rules. + FLAGS is LOOKUP_ONLYCONVERTING is the = init syntax was used, else 0 + if the (init) syntax was used. + For functions that take default parameters, DECL points to its ! "maximal" instantiation. `cp_finish_decl' must then also declared its subsequently lower and lower forms of instantiation, checking for ambiguity as it goes. This can be sped up later. */ void ! cp_finish_decl (decl, init, asmspec_tree, need_pop, flags) tree decl, init; tree asmspec_tree; int need_pop; + int flags; { register tree type; *************** *** 5722,5726 **** if (type == error_mark_node) { ! if (current_binding_level == global_binding_level && temporary) end_temporary_allocation (); --- 6224,6228 ---- if (type == error_mark_node) { ! if (toplevel_bindings_p () && temporary) end_temporary_allocation (); *************** *** 5752,5761 **** goto finish_end; } - if (type != error_mark_node && IS_AGGR_TYPE (type) - && CLASSTYPE_DECLARED_EXCEPTION (type)) - { - CLASSTYPE_GOT_SEMICOLON (type) = 1; - goto finish_end; - } if (TREE_CODE (decl) != FUNCTION_DECL) { --- 6254,6257 ---- *************** *** 5805,5812 **** { /* This must override the asm specifier which was placed ! by grokclassfn. Lay this out fresh. ! ! @@ Should emit an error if this redefines an asm-specified ! @@ name, or if we have already used the function's name. */ DECL_RTL (TREE_TYPE (decl)) = NULL_RTX; DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec); --- 6301,6305 ---- { /* This must override the asm specifier which was placed ! by grokclassfn. Lay this out fresh. */ DECL_RTL (TREE_TYPE (decl)) = NULL_RTX; DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec); *************** *** 5824,5828 **** if (TREE_STATIC (decl)) make_decl_rtl (decl, NULL_PTR, ! current_binding_level == global_binding_level || pseudo_global_level_p ()); grok_reference_init (decl, type, init, &cleanup); --- 6317,6321 ---- if (TREE_STATIC (decl)) make_decl_rtl (decl, NULL_PTR, ! toplevel_bindings_p () || pseudo_global_level_p ()); grok_reference_init (decl, type, init, &cleanup); *************** *** 5902,5920 **** } #endif - - /* We must hide the initializer so that expand_decl - won't try to do something it does not understand. */ - if (current_binding_level == global_binding_level) - { - tree value; - if (DECL_COMMON (decl)) - /* Should this be a NULL_TREE? */ - value = error_mark_node; - else - value = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE); - DECL_INITIAL (decl) = value; - } - else - DECL_INITIAL (decl) = error_mark_node; } else --- 6395,6398 ---- *************** *** 5923,5939 **** if (TREE_CODE (init) != TREE_VEC) init = store_init_value (decl, init); - - /* Don't let anyone try to initialize this variable - until we are ready to do so. */ - if (init) - { - tree value; - if (DECL_COMMON (decl)) - value = error_mark_node; - else - value = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE); - DECL_INITIAL (decl) = value; - } } } else if (DECL_EXTERNAL (decl)) --- 6401,6410 ---- if (TREE_CODE (init) != TREE_VEC) init = store_init_value (decl, init); } + + if (init) + /* We must hide the initializer so that expand_decl + won't try to do something it does not understand. */ + init = obscure_complex_init (decl, init); } else if (DECL_EXTERNAL (decl)) *************** *** 5960,5977 **** cp_error ("uninitialized const `%D'", decl); ! /* Initialize variables in need of static initialization with ! an empty CONSTRUCTOR to keep assemble_variable from putting them in ! the wrong program space. */ ! if (flag_pic == 0 ! && TREE_STATIC (decl) ! && TREE_PUBLIC (decl) ! && ! DECL_EXTERNAL (decl) ! && TREE_CODE (decl) == VAR_DECL ! && TYPE_NEEDS_CONSTRUCTING (type) ! && (DECL_INITIAL (decl) == NULL_TREE ! || DECL_INITIAL (decl) == error_mark_node) ! && ! DECL_COMMON (decl)) ! DECL_INITIAL (decl) = build (CONSTRUCTOR, type, NULL_TREE, ! NULL_TREE); } else if (TREE_CODE (decl) == VAR_DECL --- 6431,6437 ---- cp_error ("uninitialized const `%D'", decl); ! if (TYPE_SIZE (type) != NULL_TREE ! && TYPE_NEEDS_CONSTRUCTING (type)) ! init = obscure_complex_init (decl, NULL_TREE); } else if (TREE_CODE (decl) == VAR_DECL *************** *** 5996,6000 **** temporary data yet. */ ! if (current_binding_level == global_binding_level && temporary) end_temporary_allocation (); --- 6456,6460 ---- temporary data yet. */ ! if (toplevel_bindings_p () && temporary) end_temporary_allocation (); *************** *** 6065,6068 **** --- 6525,6532 ---- note_debug_info_needed (ttype); + if (TREE_STATIC (decl) && DECL_CONTEXT (decl) + && TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (decl))) == 't') + note_debug_info_needed (DECL_CONTEXT (decl)); + if ((DECL_EXTERNAL (decl) || TREE_STATIC (decl)) && DECL_SIZE (decl) != NULL_TREE *************** *** 6111,6116 **** { /* ??? FIXME: What about nested classes? */ ! int toplev = (current_binding_level == global_binding_level ! || pseudo_global_level_p ()); int was_temp = ((flag_traditional --- 6575,6579 ---- { /* ??? FIXME: What about nested classes? */ ! int toplev = toplevel_bindings_p () || pseudo_global_level_p (); int was_temp = ((flag_traditional *************** *** 6122,6126 **** if (TREE_CODE (decl) == VAR_DECL ! && current_binding_level != global_binding_level && ! TREE_STATIC (decl) && type_needs_gc_entry (type)) --- 6585,6589 ---- if (TREE_CODE (decl) == VAR_DECL ! && ! toplevel_bindings_p () && ! TREE_STATIC (decl) && type_needs_gc_entry (type)) *************** *** 6159,6163 **** { /* If this is a static const, change its apparent linkage ! if it belongs to a #pragma interface. */ if (!interface_unknown) { --- 6622,6626 ---- { /* If this is a static const, change its apparent linkage ! if it belongs to a #pragma interface. */ if (!interface_unknown) { *************** *** 6220,6272 **** if (TREE_CODE (decl) == FUNCTION_DECL) ! { ! #if 0 ! /* C++: Handle overloaded functions with default parameters. */ ! if (DECL_OVERLOADED (decl)) ! { ! tree parmtypes = TYPE_ARG_TYPES (type); ! tree prev = NULL_TREE; ! tree original_name = DECL_NAME (decl); ! struct lang_decl *tmp_lang_decl = DECL_LANG_SPECIFIC (decl); ! /* All variants will share an uncollectible lang_decl. */ ! copy_decl_lang_specific (decl); ! ! while (parmtypes && parmtypes != void_list_node) ! { ! /* The default value for the parameter in parmtypes is ! stored in the TREE_PURPOSE of the TREE_LIST. */ ! if (TREE_PURPOSE (parmtypes)) ! { ! tree fnname, fndecl; ! tree *argp; ! ! argp = prev ? & TREE_CHAIN (prev) ! : & TYPE_ARG_TYPES (type); ! ! *argp = NULL_TREE; ! fnname = build_decl_overload (original_name, ! TYPE_ARG_TYPES (type), 0); ! *argp = parmtypes; ! fndecl = build_decl (FUNCTION_DECL, fnname, type); ! DECL_EXTERNAL (fndecl) = DECL_EXTERNAL (decl); ! TREE_PUBLIC (fndecl) = TREE_PUBLIC (decl); ! DECL_INLINE (fndecl) = DECL_INLINE (decl); ! /* Keep G++ from thinking this function is unused. ! It is only used to speed up search in name space. */ ! TREE_USED (fndecl) = 1; ! TREE_ASM_WRITTEN (fndecl) = 1; ! DECL_INITIAL (fndecl) = NULL_TREE; ! DECL_LANG_SPECIFIC (fndecl) = DECL_LANG_SPECIFIC (decl); ! fndecl = pushdecl (fndecl); ! DECL_INITIAL (fndecl) = error_mark_node; ! DECL_RTL (fndecl) = DECL_RTL (decl); ! } ! prev = parmtypes; ! parmtypes = TREE_CHAIN (parmtypes); ! } ! DECL_LANG_SPECIFIC (decl) = tmp_lang_decl; ! } ! #endif ! } else if (DECL_EXTERNAL (decl)) ; --- 6683,6687 ---- if (TREE_CODE (decl) == FUNCTION_DECL) ! ; else if (DECL_EXTERNAL (decl)) ; *************** *** 6330,6334 **** emit_line_note (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); ! expand_aggr_init (decl, init, 0); } --- 6745,6749 ---- emit_line_note (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); ! expand_aggr_init (decl, init, 0, flags); } *************** *** 6413,6416 **** --- 6828,6840 ---- } + /* This is here for a midend callback from c-common.c */ + void + finish_decl (decl, init, asmspec_tree) + tree decl, init; + tree asmspec_tree; + { + cp_finish_decl (decl, init, asmspec_tree, 1, 0); + } + void expand_static_init (decl, init) *************** *** 6426,6431 **** cp_error ("multiple initializations given for `%D'", decl); } ! else if (current_binding_level != global_binding_level ! && current_binding_level->pseudo_global == 0) { /* Emit code to perform this initialization but once. */ --- 6850,6854 ---- cp_error ("multiple initializations given for `%D'", decl); } ! else if (! toplevel_bindings_p () && ! pseudo_global_level_p ()) { /* Emit code to perform this initialization but once. */ *************** *** 6442,6448 **** old_cleanups = cleanups_this_call; expand_assignment (temp, integer_one_node, 0, 0); ! if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl))) { ! expand_aggr_init (decl, init, 0); do_pending_stack_adjust (); } --- 6865,6872 ---- old_cleanups = cleanups_this_call; expand_assignment (temp, integer_one_node, 0, 0); ! if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)) ! || TREE_CODE (init) == TREE_LIST) { ! expand_aggr_init (decl, init, 0, 0); do_pending_stack_adjust (); } *************** *** 6490,6499 **** one less than the size. */ if (TREE_CODE (initial_value) == STRING_CST) ! maxindex = build_int_2 (TREE_STRING_LENGTH (initial_value) - 1, 0); else if (TREE_CODE (initial_value) == CONSTRUCTOR) { ! register int nelts ! = list_length (CONSTRUCTOR_ELTS (initial_value)); ! maxindex = build_int_2 (nelts - 1, - (nelts == 0)); } else --- 6914,6935 ---- one less than the size. */ if (TREE_CODE (initial_value) == STRING_CST) ! { ! int eltsize ! = int_size_in_bytes (TREE_TYPE (TREE_TYPE (initial_value))); ! maxindex = build_int_2 ((TREE_STRING_LENGTH (initial_value) ! / eltsize) - 1, 0); ! } else if (TREE_CODE (initial_value) == CONSTRUCTOR) { ! tree elts = CONSTRUCTOR_ELTS (initial_value); ! maxindex = size_binop (MINUS_EXPR, integer_zero_node, size_one_node); ! for (; elts; elts = TREE_CHAIN (elts)) ! { ! if (TREE_PURPOSE (elts)) ! maxindex = TREE_PURPOSE (elts); ! else ! maxindex = size_binop (PLUS_EXPR, maxindex, size_one_node); ! } ! maxindex = copy_node (maxindex); } else *************** *** 6573,6577 **** cp_error_at ("invalid friend declaration", object); if (raises) ! cp_error_at ("invalid raises declaration", object); } --- 7009,7013 ---- cp_error_at ("invalid friend declaration", object); if (raises) ! cp_error_at ("invalid exception specifications", object); } *************** *** 6589,6593 **** static tree grokfndecl (ctype, type, declarator, virtualp, flags, quals, ! raises, check, publicp) tree ctype, type; tree declarator; --- 7025,7029 ---- static tree grokfndecl (ctype, type, declarator, virtualp, flags, quals, ! raises, check, publicp, inlinep) tree ctype, type; tree declarator; *************** *** 6595,6599 **** enum overload_flags flags; tree quals, raises; ! int check, publicp; { tree cname, decl; --- 7031,7035 ---- enum overload_flags flags; tree quals, raises; ! int check, publicp, inlinep; { tree cname, decl; *************** *** 6624,6629 **** } ! if (publicp) ! TREE_PUBLIC (decl) = 1; DECL_EXTERNAL (decl) = 1; --- 7060,7082 ---- } ! /* All function decls start out public; we'll fix their linkage later (at ! definition or EOF) if appropriate. */ ! TREE_PUBLIC (decl) = 1; ! ! if (ctype == NULL_TREE && ! strcmp (IDENTIFIER_POINTER (declarator), "main")) ! { ! if (inlinep) ! error ("cannot declare `main' to be inline"); ! else if (! publicp) ! error ("cannot declare `main' to be static"); ! inlinep = 0; ! publicp = 1; ! } ! ! if (! publicp) ! DECL_C_STATIC (decl) = 1; ! ! if (inlinep) ! DECL_THIS_INLINE (decl) = DECL_INLINE (decl) = 1; DECL_EXTERNAL (decl) = 1; *************** *** 6795,6803 **** static tree ! grokvardecl (type, declarator, specbits, initialized) tree type; tree declarator; RID_BIT_TYPE specbits; int initialized; { tree decl; --- 7248,7257 ---- static tree ! grokvardecl (type, declarator, specbits, initialized, constp) tree type; tree declarator; RID_BIT_TYPE specbits; int initialized; + int constp; { tree decl; *************** *** 6817,6820 **** --- 7271,7276 ---- decl = build_decl (VAR_DECL, declarator, type); + DECL_ASSEMBLER_NAME (decl) = current_namespace_id (DECL_ASSEMBLER_NAME (decl)); + if (RIDBIT_SETP (RID_EXTERN, specbits)) { *************** *** 6834,6840 **** /* At top level, either `static' or no s.c. makes a definition (perhaps tentative), and absence of `static' makes it public. */ ! else if (current_binding_level == global_binding_level) { ! TREE_PUBLIC (decl) = RIDBIT_NOTSETP (RID_STATIC, specbits); TREE_STATIC (decl) = ! DECL_EXTERNAL (decl); } --- 7290,7297 ---- /* At top level, either `static' or no s.c. makes a definition (perhaps tentative), and absence of `static' makes it public. */ ! else if (toplevel_bindings_p ()) { ! TREE_PUBLIC (decl) = (RIDBIT_NOTSETP (RID_STATIC, specbits) ! && (DECL_EXTERNAL (decl) || ! constp)); TREE_STATIC (decl) = ! DECL_EXTERNAL (decl); } *************** *** 6877,6881 **** /* Let the front-end know this is a pointer to member function. */ ! TYPE_PTRMEMFUNC_FLAG(t) = 1; /* and not really an aggregate. */ IS_AGGR_TYPE (t) = 0; --- 7334,7338 ---- /* Let the front-end know this is a pointer to member function. */ ! TYPE_PTRMEMFUNC_FLAG (t) = 1; /* and not really an aggregate. */ IS_AGGR_TYPE (t) = 0; *************** *** 6921,6924 **** --- 7378,7382 ---- PARM for a parameter declaration (either within a function prototype or before a function body). Make a PARM_DECL, or return void_type_node. + CATCHPARM for a parameter declaration before a catch clause. TYPENAME if for a typename (in a cast or sizeof). Don't make a DECL node; just return the ..._TYPE node. *************** *** 6973,6977 **** int constp; int volatilep; ! int virtualp, friendp, inlinep, staticp; int explicit_int = 0; int explicit_char = 0; --- 7431,7435 ---- int constp; int volatilep; ! int virtualp, explicitp, friendp, inlinep, staticp; int explicit_int = 0; int explicit_char = 0; *************** *** 6984,6987 **** --- 7442,7446 ---- int bitfield = 0; int size_varies = 0; + tree decl_machine_attr = NULL_TREE; /* Set this to error_mark_node for FIELD_DECLs we could not handle properly. All FIELD_DECLs we build here have `init' put into their DECL_INITIAL. */ *************** *** 7080,7084 **** { /* This is actually a variable declaration using constructor ! syntax. We need to call start_decl and finish_decl so we can get the variable initialized... */ --- 7539,7543 ---- { /* This is actually a variable declaration using constructor ! syntax. We need to call start_decl and cp_finish_decl so we can get the variable initialized... */ *************** *** 7093,7103 **** decl = start_decl (declarator, declspecs, 1, NULL_TREE); ! finish_decl (decl, init, NULL_TREE, 1); return 0; } innermost_code = TREE_CODE (decl); - decl = TREE_OPERAND (decl, 0); if (decl_context == FIELD && ctype == NULL_TREE) ctype = current_class_type; if (ctype != NULL_TREE && decl != NULL_TREE && flags != DTOR_FLAG --- 7552,7565 ---- decl = start_decl (declarator, declspecs, 1, NULL_TREE); ! finish_decl (decl, init, NULL_TREE); return 0; } innermost_code = TREE_CODE (decl); if (decl_context == FIELD && ctype == NULL_TREE) ctype = current_class_type; + if (ctype + && TREE_OPERAND (decl, 0) == constructor_name_full (ctype)) + TREE_OPERAND (decl, 0) = constructor_name (ctype); + decl = TREE_OPERAND (decl, 0); if (ctype != NULL_TREE && decl != NULL_TREE && flags != DTOR_FLAG *************** *** 7193,7196 **** --- 7655,7661 ---- } + if (ctype + && TREE_OPERAND (decl, 1) == constructor_name_full (ctype)) + TREE_OPERAND (decl, 1) = constructor_name (ctype); decl = TREE_OPERAND (decl, 1); if (ctype) *************** *** 7204,7213 **** else if (TREE_CODE (decl) == BIT_NOT_EXPR && TREE_CODE (TREE_OPERAND (decl, 0)) == IDENTIFIER_NODE ! && constructor_name (ctype) == TREE_OPERAND (decl, 0)) { return_type = return_dtor; ctor_return_type = ctype; flags = DTOR_FLAG; ! decl = TREE_OPERAND (decl, 0); } } --- 7669,7679 ---- else if (TREE_CODE (decl) == BIT_NOT_EXPR && TREE_CODE (TREE_OPERAND (decl, 0)) == IDENTIFIER_NODE ! && (constructor_name (ctype) == TREE_OPERAND (decl, 0) ! || constructor_name_full (ctype) == TREE_OPERAND (decl, 0))) { return_type = return_dtor; ctor_return_type = ctype; flags = DTOR_FLAG; ! decl = TREE_OPERAND (decl, 0) = constructor_name (ctype); } } *************** *** 7232,7235 **** --- 7698,7709 ---- return 0; + if (((dname && IDENTIFIER_OPNAME_P (dname)) || flags == TYPENAME_FLAG) + && innermost_code != CALL_EXPR + && ! (ctype && declspecs == NULL_TREE)) + { + cp_error ("declaration of `%D' as non-function", dname); + return void_type_node; + } + /* Anything declared one level down from the top level must be one of the parameters of a function *************** *** 7242,7250 **** Since we now wait to push a class scope until we are sure that we are in a legitimate method context, we must set oldcname ! explicitly (since current_class_name is not yet alive). */ ! if (decl_context == NORMAL ! && current_binding_level->level_chain == global_binding_level) ! decl_context = PARM; /* Look through the decl specs and record which ones appear. --- 7716,7731 ---- Since we now wait to push a class scope until we are sure that we are in a legitimate method context, we must set oldcname ! explicitly (since current_class_name is not yet alive). ! We also want to avoid calling this a PARM if it is in a namespace. */ ! ! if (decl_context == NORMAL && ! namespace_bindings_p ()) ! { ! struct binding_level *b = current_binding_level; ! current_binding_level = b->level_chain; ! if (current_binding_level != 0 && toplevel_bindings_p ()) ! decl_context = PARM; ! current_binding_level = b; ! } /* Look through the decl specs and record which ones appear. *************** *** 7285,7289 **** { if (type) ! error ("extraneous `%T' ignored", id); else { --- 7766,7775 ---- { if (type) ! { ! if (id == ridpointers[(int) RID_BOOL]) ! error ("`bool' is now a keyword"); ! else ! cp_error ("extraneous `%T' ignored", id); ! } else { *************** *** 7312,7317 **** if (i == (int) RID_LONG && RIDBIT_SETP (i, specbits)) { ! if (pedantic && flag_ansi) ! pedwarn ("duplicate `long'"); else if (longlong) error ("`long long long' is too long for GCC"); --- 7798,7803 ---- if (i == (int) RID_LONG && RIDBIT_SETP (i, specbits)) { ! if (pedantic && ! in_system_header) ! pedwarn ("ANSI C++ does not support `long long'"); else if (longlong) error ("`long long long' is too long for GCC"); *************** *** 7337,7340 **** --- 7823,7827 ---- { type = TREE_TYPE (t); + decl_machine_attr = DECL_MACHINE_ATTRIBUTES (id); typedef_decl = t; } *************** *** 7419,7423 **** else if (return_type == return_conversion) { ! if (comp_target_types (type, ctor_return_type, 1) == 0) cp_error ("operator `%T' declared to return `%T'", ctor_return_type, type); --- 7906,7910 ---- else if (return_type == return_conversion) { ! if (comptypes (type, ctor_return_type, 1) == 0) cp_error ("operator `%T' declared to return `%T'", ctor_return_type, type); *************** *** 7462,7466 **** if (TREE_CODE (type) == REAL_TYPE) error ("short, signed or unsigned invalid for `%s'", name); ! else if (TREE_CODE (type) != INTEGER_TYPE || type == wchar_type_node) error ("long, short, signed or unsigned invalid for `%s'", name); else if (RIDBIT_SETP (RID_LONG, specbits) --- 7949,7953 ---- if (TREE_CODE (type) == REAL_TYPE) error ("short, signed or unsigned invalid for `%s'", name); ! else if (TREE_CODE (type) != INTEGER_TYPE) error ("long, short, signed or unsigned invalid for `%s'", name); else if (RIDBIT_SETP (RID_LONG, specbits) *************** *** 7554,7557 **** --- 8041,8047 ---- #endif virtualp = RIDBIT_SETP (RID_VIRTUAL, specbits); + RIDBIT_RESET (RID_VIRTUAL, specbits); + explicitp = RIDBIT_SETP (RID_EXPLICIT, specbits) != 0; + RIDBIT_RESET (RID_EXPLICIT, specbits); if (RIDBIT_SETP (RID_STATIC, specbits)) *************** *** 7565,7569 **** } friendp = RIDBIT_SETP (RID_FRIEND, specbits); - RIDBIT_RESET (RID_VIRTUAL, specbits); RIDBIT_RESET (RID_FRIEND, specbits); --- 8055,8058 ---- *************** *** 7572,7586 **** if (decl_context == PARM) { ! error ("non-member `%s' cannot be declared mutable", name); RIDBIT_RESET (RID_MUTABLE, specbits); } else if (friendp || decl_context == TYPENAME) { ! error ("non-object member `%s' cannot be declared mutable", name); RIDBIT_RESET (RID_MUTABLE, specbits); } else if (staticp) { ! error ("static `%s' cannot be declared mutable", name); RIDBIT_RESET (RID_MUTABLE, specbits); } --- 8061,8080 ---- if (decl_context == PARM) { ! error ("non-member `%s' cannot be declared `mutable'", name); RIDBIT_RESET (RID_MUTABLE, specbits); } else if (friendp || decl_context == TYPENAME) { ! error ("non-object member `%s' cannot be declared `mutable'", name); ! RIDBIT_RESET (RID_MUTABLE, specbits); ! } ! else if (constp) ! { ! error ("const `%s' cannot be declared `mutable'", name); RIDBIT_RESET (RID_MUTABLE, specbits); } else if (staticp) { ! error ("static `%s' cannot be declared `mutable'", name); RIDBIT_RESET (RID_MUTABLE, specbits); } *************** *** 7588,7592 **** if (RIDBIT_SETP (RID_TYPEDEF, specbits)) { ! error ("non-object member `%s' cannot be declared mutable", name); RIDBIT_RESET (RID_MUTABLE, specbits); } --- 8082,8086 ---- if (RIDBIT_SETP (RID_TYPEDEF, specbits)) { ! error ("non-object member `%s' cannot be declared `mutable'", name); RIDBIT_RESET (RID_MUTABLE, specbits); } *************** *** 7595,7599 **** else if (decl_context != FIELD) { ! error ("non-member `%s' cannot be declared mutable", name); RIDBIT_RESET (RID_MUTABLE, specbits); } --- 8089,8093 ---- else if (decl_context != FIELD) { ! error ("non-member `%s' cannot be declared `mutable'", name); RIDBIT_RESET (RID_MUTABLE, specbits); } *************** *** 7620,7624 **** /* Give error if `virtual' is used outside of class declaration. */ ! if (virtualp && current_class_name == NULL_TREE) { error ("virtual outside class declaration"); --- 8114,8119 ---- /* Give error if `virtual' is used outside of class declaration. */ ! if (virtualp ! && (current_class_name == NULL_TREE || decl_context != FIELD)) { error ("virtual outside class declaration"); *************** *** 7683,7687 **** else if (decl_context != NORMAL && nclasses > 0) { ! if (decl_context == PARM && (RIDBIT_SETP (RID_REGISTER, specbits) || RIDBIT_SETP (RID_AUTO, specbits))) --- 8178,8182 ---- else if (decl_context != NORMAL && nclasses > 0) { ! if ((decl_context == PARM || decl_context == CATCHPARM) && (RIDBIT_SETP (RID_REGISTER, specbits) || RIDBIT_SETP (RID_AUTO, specbits))) *************** *** 7772,7777 **** if (decl_context == FIELD) { ! tree tmp = TREE_OPERAND (declarator, 0); ! register int op = IDENTIFIER_OPNAME_P (tmp); error ("storage class specified for %s `%s'", IS_SIGNATURE (current_class_type) --- 8267,8278 ---- if (decl_context == FIELD) { ! tree tmp = NULL_TREE; ! register int op = 0; ! ! if (declarator) ! { ! tmp = TREE_OPERAND (declarator, 0); ! op = IDENTIFIER_OPNAME_P (tmp); ! } error ("storage class specified for %s `%s'", IS_SIGNATURE (current_class_type) *************** *** 7779,7787 **** ? "signature member operator" : "signature member function") ! : (op ? "member operator" : "structure field"), op ? operator_name_string (tmp) : name); } else ! error ((decl_context == PARM ? "storage class specified for parameter `%s'" : "storage class specified for typename"), name); --- 8280,8288 ---- ? "signature member operator" : "signature member function") ! : (op ? "member operator" : "field"), op ? operator_name_string (tmp) : name); } else ! error (((decl_context == PARM || decl_context == CATCHPARM) ? "storage class specified for parameter `%s'" : "storage class specified for typename"), name); *************** *** 7799,7805 **** else if (RIDBIT_SETP (RID_EXTERN, specbits) && initialized && !funcdef_flag) { ! if (current_binding_level == global_binding_level) { ! /* It's common practice (and completely legal) to have a const be initialized and declared extern. */ if (! constp) --- 8300,8306 ---- else if (RIDBIT_SETP (RID_EXTERN, specbits) && initialized && !funcdef_flag) { ! if (toplevel_bindings_p ()) { ! /* It's common practice (and completely valid) to have a const be initialized and declared extern. */ if (! constp) *************** *** 7810,7816 **** } else if (RIDBIT_SETP (RID_EXTERN, specbits) && funcdef_flag ! && current_binding_level != global_binding_level) error ("nested function `%s' declared `extern'", name); ! else if (current_binding_level == global_binding_level) { if (RIDBIT_SETP (RID_AUTO, specbits)) --- 8311,8317 ---- } else if (RIDBIT_SETP (RID_EXTERN, specbits) && funcdef_flag ! && ! toplevel_bindings_p ()) error ("nested function `%s' declared `extern'", name); ! else if (toplevel_bindings_p ()) { if (RIDBIT_SETP (RID_AUTO, specbits)) *************** *** 7892,7895 **** --- 8393,8398 ---- register tree itype = NULL_TREE; register tree size = TREE_OPERAND (declarator, 1); + /* The index is a signed object `sizetype' bits wide. */ + tree index_type = signed_type (sizetype); declarator = TREE_OPERAND (declarator, 0); *************** *** 7911,7915 **** /* ARM $8.4.3: Since you can't have a pointer to a reference, you can't have arrays of references. If we allowed them, ! then we'd be saying x[i] is legal for an array x, but then you'd have to ask: what does `*(x + i)' mean? */ if (TREE_CODE (type) == REFERENCE_TYPE) --- 8414,8418 ---- /* ARM $8.4.3: Since you can't have a pointer to a reference, you can't have arrays of references. If we allowed them, ! then we'd be saying x[i] is valid for an array x, but then you'd have to ask: what does `*(x + i)' mean? */ if (TREE_CODE (type) == REFERENCE_TYPE) *************** *** 7971,7975 **** if (TREE_READONLY_DECL_P (size)) size = decl_constant_value (size); ! if (flag_ansi && integer_zerop (size)) cp_pedwarn ("ANSI C++ forbids zero-size array `%D'", dname); if (TREE_CONSTANT (size)) --- 8474,8478 ---- if (TREE_READONLY_DECL_P (size)) size = decl_constant_value (size); ! if (pedantic && integer_zerop (size)) cp_pedwarn ("ANSI C++ forbids zero-size array `%D'", dname); if (TREE_CONSTANT (size)) *************** *** 7981,7990 **** size = integer_one_node; } - itype = build_index_type (size_binop (MINUS_EXPR, size, - integer_one_node)); } else { ! if (flag_ansi) { if (dname) --- 8484,8491 ---- size = integer_one_node; } } else { ! if (pedantic) { if (dname) *************** *** 7994,8006 **** cp_pedwarn ("ANSI C++ forbids variable-size array"); } - dont_grok_size: - itype = - build_binary_op (MINUS_EXPR, size, integer_one_node, 1); /* Make sure the array size remains visibly nonconstant ! even if it is (eg) a const variable with known value. */ size_varies = 1; - itype = variable_size (itype); - itype = build_index_type (itype); } resume_momentary (yes); } --- 8495,8512 ---- cp_pedwarn ("ANSI C++ forbids variable-size array"); } /* Make sure the array size remains visibly nonconstant ! even if it is (eg) a const variable with known value. */ size_varies = 1; } + + dont_grok_size: + itype = + fold (build_binary_op (MINUS_EXPR, + convert (index_type, size), + convert (index_type, + integer_one_node), 1)); + if (! TREE_CONSTANT (itype)) + itype = variable_size (itype); + itype = build_index_type (itype); resume_momentary (yes); } *************** *** 8062,8069 **** inner_decl = TREE_OPERAND (inner_decl, 1); /* Say it's a definition only for the CALL_EXPR closest to the identifier. */ funcdecl_p = ! inner_decl && TREE_CODE (inner_decl) == IDENTIFIER_NODE; if (ctype == NULL_TREE --- 8568,8579 ---- inner_decl = TREE_OPERAND (inner_decl, 1); + /* Pick up type qualifiers which should be applied to `this'. */ + quals = TREE_OPERAND (declarator, 2); + /* Say it's a definition only for the CALL_EXPR closest to the identifier. */ funcdecl_p = ! inner_decl && (TREE_CODE (inner_decl) == IDENTIFIER_NODE ! || TREE_CODE (inner_decl) == BIT_NOT_EXPR); if (ctype == NULL_TREE *************** *** 8089,8102 **** if (staticp == 2) error ("destructor cannot be static member function"); ! if (TYPE_READONLY (type)) { ! error ("destructors cannot be declared `const'"); return void_type_node; } - if (TYPE_VOLATILE (type)) - { - error ("destructors cannot be declared `volatile'"); - return void_type_node; - } if (decl_context == FIELD) { --- 8599,8607 ---- if (staticp == 2) error ("destructor cannot be static member function"); ! if (quals) { ! error ("destructors cannot be declared `const' or `volatile'"); return void_type_node; } if (decl_context == FIELD) { *************** *** 8108,8111 **** --- 8613,8618 ---- else /* it's a constructor. */ { + if (explicitp == 1) + explicitp = 2; /* ANSI C++ June 5 1992 WP 12.1.2. A constructor may not be declared const or volatile. A constructor may *************** *** 8118,8131 **** virtualp = 0; } ! if (TYPE_READONLY (type)) { ! error ("constructors cannot be declared `const'"); return void_type_node; } - if (TYPE_VOLATILE (type)) - { - error ("constructors cannot be declared `volatile'"); - return void_type_node; - } { RID_BIT_TYPE tmp_bits; --- 8625,8633 ---- virtualp = 0; } ! if (quals) { ! error ("constructors cannot be declared `const' or `volatile'"); return void_type_node; } { RID_BIT_TYPE tmp_bits; *************** *** 8156,8173 **** staticp = 0; } ! else if (friendp && virtualp) { ! /* Cannot be both friend and virtual. */ ! error ("virtual functions cannot be friends"); ! RIDBIT_RESET (RID_FRIEND, specbits); ! friendp = 0; } - if (decl_context == NORMAL && friendp) - error ("friend declaration not in class definition"); - - /* Pick up type qualifiers which should be applied to `this'. */ - quals = TREE_OPERAND (declarator, 2); - /* Traditionally, declaring return type float means double. */ --- 8658,8679 ---- staticp = 0; } ! else if (friendp) { ! if (initialized) ! error ("can't initialize friend function `%s'", name); ! if (virtualp) ! { ! /* Cannot be both friend and virtual. */ ! error ("virtual functions cannot be friends"); ! RIDBIT_RESET (RID_FRIEND, specbits); ! friendp = 0; ! } ! if (decl_context == NORMAL) ! error ("friend declaration not in class definition"); ! if (current_function_decl && funcdef_flag) ! cp_error ("can't define friend function `%s' in a local class definition", ! name); } /* Traditionally, declaring return type float means double. */ *************** *** 8232,8235 **** --- 8738,8750 ---- } + if (TREE_CODE (type) == OFFSET_TYPE + && (TREE_CODE (TREE_TYPE (type)) == VOID_TYPE + || TREE_CODE (TREE_TYPE (type)) == REFERENCE_TYPE)) + { + cp_error ("cannot declare pointer to `%#T' member", + TREE_TYPE (type)); + type = TREE_TYPE (type); + } + /* Merge any constancy or volatility into the target type for the pointer. */ *************** *** 8331,8337 **** { if (constp) ! warning ("discarding `const' applied to a reference"); if (volatilep) ! warning ("discarding `volatile' applied to a reference"); constp = volatilep = 0; } --- 8846,8852 ---- { if (constp) ! pedwarn ("discarding `const' applied to a reference"); if (volatilep) ! pedwarn ("discarding `volatile' applied to a reference"); constp = volatilep = 0; } *************** *** 8390,8397 **** basetype :: member . */ ! if (TREE_CODE (type) == FUNCTION_TYPE) { if (current_class_type == NULL_TREE - || TYPE_MAIN_VARIANT (ctype) == current_class_type || friendp) type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), --- 8905,8923 ---- basetype :: member . */ ! if (ctype == current_class_type) ! { ! /* class A { ! void A::f (); ! }; ! ! Is this ill-formed? */ ! ! if (pedantic) ! cp_pedwarn ("extra qualification `%T::' on member `%s' ignored", ! ctype, name); ! } ! else if (TREE_CODE (type) == FUNCTION_TYPE) { if (current_class_type == NULL_TREE || friendp) type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), *************** *** 8404,8414 **** } } - else if (TYPE_MAIN_VARIANT (ctype) == current_class_type) - { - if (extra_warnings) - cp_warning ("redundant qualification `%T' on member `%s' ignored", - ctype, name); - type = build_offset_type (ctype, type); - } else if (TYPE_SIZE (ctype) != NULL_TREE || (RIDBIT_SETP (RID_TYPEDEF, specbits))) --- 8930,8933 ---- *************** *** 8416,8421 **** tree t; /* have to move this code elsewhere in this function. ! this code is used for i.e., typedef int A::M; M *pm; */ if (explicit_int == -1 && decl_context == FIELD && funcdef_flag == 0) --- 8935,8942 ---- tree t; /* have to move this code elsewhere in this function. ! this code is used for i.e., typedef int A::M; M *pm; + It is? How? jason 10/2/94 */ + if (explicit_int == -1 && decl_context == FIELD && funcdef_flag == 0) *************** *** 8442,8446 **** t = DECL_CHAIN (TREE_VALUE (t)); if (t == NULL_TREE) ! error ("class `%s' does not have any constructors", IDENTIFIER_POINTER (sname)); t = build_tree_list (NULL_TREE, t); } --- 8963,8968 ---- t = DECL_CHAIN (TREE_VALUE (t)); if (t == NULL_TREE) ! cp_error ("`%T' does not have any constructors", ! ctype); t = build_tree_list (NULL_TREE, t); } *************** *** 8457,8469 **** if (current_class_type) { ! if (TYPE_MAIN_VARIANT (ctype) != current_class_type) ! { ! cp_error ("cannot declare member `%T::%s' within `%T'", ! ctype, name, current_class_type); ! return void_type_node; ! } ! else if (extra_warnings) ! cp_warning ("extra qualification `%T' on member `%s' ignored", ! ctype, name); } type = build_offset_type (ctype, type); --- 8979,8985 ---- if (current_class_type) { ! cp_error ("cannot declare member `%T::%s' within `%T'", ! ctype, name, current_class_type); ! return void_type_node; } type = build_offset_type (ctype, type); *************** *** 8527,8530 **** --- 9043,9052 ---- } + if (explicitp == 1) + { + error ("only constructors can be declared `explicit'"); + explicitp = 0; + } + /* Now TYPE has the actual type. */ *************** *** 8566,8569 **** --- 9088,9095 ---- else set_nested_typename (d, TYPE_NESTED_NAME (c), declarator, type); + + DECL_ASSEMBLER_NAME (d) = DECL_NAME (d); + DECL_ASSEMBLER_NAME (d) + = get_identifier (build_overload_name (type, 1, 1)); } } *************** *** 8632,8642 **** if (friendp) { ! /* A friendly class? */ ! if (current_class_type) ! make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type)); ! else ! error("trying to make class `%s' a friend of global scope", ! TYPE_NAME_STRING (type)); ! type = void_type_node; } else if (quals) --- 9158,9183 ---- if (friendp) { ! if (volatilep) ! { ! cp_error ("`volatile' specified for friend class declaration"); ! volatilep = 0; ! } ! if (inlinep) ! { ! cp_error ("`inline' specified for friend class declaration"); ! inlinep = 0; ! } ! ! /* Only try to do this stuff if we didn't already give up. */ ! if (type != integer_type_node) ! { ! /* A friendly class? */ ! if (current_class_type) ! make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type)); ! else ! error ("trying to make class `%s' a friend of global scope", ! TYPE_NAME_STRING (type)); ! type = void_type_node; ! } } else if (quals) *************** *** 8659,8662 **** --- 9200,9204 ---- } else if (declarator == NULL_TREE && decl_context != PARM + && decl_context != CATCHPARM && TREE_CODE (type) != UNION_TYPE && ! bitfield) *************** *** 8673,8677 **** if (TYPE_MAIN_VARIANT (type) == void_type_node && decl_context != PARM) { ! if (TREE_CODE (declarator) == IDENTIFIER_NODE) { if (IDENTIFIER_OPNAME_P (declarator)) --- 9215,9221 ---- if (TYPE_MAIN_VARIANT (type) == void_type_node && decl_context != PARM) { ! if (! declarator) ! error ("unnamed variable or field declared void"); ! else if (TREE_CODE (declarator) == IDENTIFIER_NODE) { if (IDENTIFIER_OPNAME_P (declarator)) *************** *** 8716,8719 **** --- 9260,9268 ---- else if (TREE_CODE (type) == OFFSET_TYPE) type = build_pointer_type (type); + else if (type == void_type_node && declarator) + { + error ("declaration of `%s' as void", name); + return NULL_TREE; + } decl = build_decl (PARM_DECL, declarator, type); *************** *** 8790,8835 **** /* Tell grokfndecl if it needs to set TREE_PUBLIC on the node. */ ! publicp = (RIDBIT_SETP (RID_EXTERN, specbits) ! || (ctype != NULL_TREE ! && funcdef_flag >= 0 ! && RIDBIT_NOTSETP (RID_INLINE, specbits)) ! || (friendp ! && ! funcdef_flag ! && RIDBIT_NOTSETP (RID_STATIC, specbits) ! && RIDBIT_NOTSETP (RID_INLINE, specbits))); decl = grokfndecl (ctype, type, declarator, virtualp, flags, quals, ! raises, friendp ? -1 : 0, publicp); if (decl == NULL_TREE) return NULL_TREE; ! DECL_INLINE (decl) = inlinep; } else if (TREE_CODE (type) == METHOD_TYPE) { /* All method decls are public, so tell grokfndecl to set TREE_PUBLIC, also. */ decl = grokfndecl (ctype, type, declarator, virtualp, flags, quals, ! raises, friendp ? -1 : 0, 1); if (decl == NULL_TREE) return NULL_TREE; - - DECL_INLINE (decl) = inlinep; - } - else if (TREE_CODE (type) == RECORD_TYPE - && CLASSTYPE_DECLARED_EXCEPTION (type)) - { - /* Handle a class-local exception declaration. */ - decl = build_lang_field_decl (VAR_DECL, declarator, type); - if (ctype == NULL_TREE) - ctype = current_class_type; - return void_type_node; } else if (TYPE_SIZE (type) == NULL_TREE && !staticp && (TREE_CODE (type) != ARRAY_TYPE || initialized == 0)) { ! error ("field `%s' has incomplete type", ! IDENTIFIER_POINTER (declarator)); /* If we're instantiating a template, tell them which --- 9339,9374 ---- /* Tell grokfndecl if it needs to set TREE_PUBLIC on the node. */ ! publicp = (! friendp ! || RIDBIT_SETP (RID_EXTERN, specbits) ! || ! (funcdef_flag < 0 || inlinep)); decl = grokfndecl (ctype, type, declarator, virtualp, flags, quals, ! raises, friendp ? -1 : 0, publicp, inlinep); if (decl == NULL_TREE) return NULL_TREE; + decl = build_decl_attribute_variant (decl, decl_machine_attr); ! if (explicitp == 2) ! DECL_NONCONVERTING_P (decl) = 1; } else if (TREE_CODE (type) == METHOD_TYPE) { + /* We only get here for friend declarations of + members of other classes. */ /* All method decls are public, so tell grokfndecl to set TREE_PUBLIC, also. */ decl = grokfndecl (ctype, type, declarator, virtualp, flags, quals, ! raises, friendp ? -1 : 0, 1, 0); if (decl == NULL_TREE) return NULL_TREE; } else if (TYPE_SIZE (type) == NULL_TREE && !staticp && (TREE_CODE (type) != ARRAY_TYPE || initialized == 0)) { ! if (declarator) ! cp_error ("field `%D' has incomplete type", declarator); ! else ! cp_error ("name `%T' has incomplete type", type); /* If we're instantiating a template, tell them which *************** *** 8840,8846 **** && declspecs && TREE_VALUE (declspecs) && TREE_TYPE (TREE_VALUE (declspecs)) == type) ! error (" in instantiation of template `%s'", ! TYPE_NAME_STRING (current_class_type)); ! type = error_mark_node; decl = NULL_TREE; --- 9379,9385 ---- && declspecs && TREE_VALUE (declspecs) && TREE_TYPE (TREE_VALUE (declspecs)) == type) ! cp_error (" in instantiation of template `%T'", ! current_class_type); ! type = error_mark_node; decl = NULL_TREE; *************** *** 8907,8911 **** initializer list) is the only way to initialize nonstatic const and reference members. */ ! else if (flag_ansi || ! constp) cp_pedwarn ("ANSI C++ forbids initialization of %s `%D'", constp ? "const member" : "member", declarator); --- 9446,9450 ---- initializer list) is the only way to initialize nonstatic const and reference members. */ ! else if (pedantic || ! constp) cp_pedwarn ("ANSI C++ forbids initialization of %s `%D'", constp ? "const member" : "member", declarator); *************** *** 8953,8957 **** Storage classes other than `extern' are not allowed and `extern' makes no difference. */ ! if (current_binding_level != global_binding_level && ! processing_template_decl && (RIDBIT_SETP (RID_STATIC, specbits) --- 9492,9496 ---- Storage classes other than `extern' are not allowed and `extern' makes no difference. */ ! if (! toplevel_bindings_p () && ! processing_template_decl && (RIDBIT_SETP (RID_STATIC, specbits) *************** *** 8988,8995 **** TREE_TYPE (type), TYPE_ARG_TYPES (type)); ! /* Record presence of `static'. In C++, `inline' is like `static'. */ ! publicp ! = !(RIDBIT_SETP (RID_STATIC, specbits) ! || RIDBIT_SETP (RID_INLINE, specbits)); decl = grokfndecl (ctype, type, original_name, --- 9527,9535 ---- TREE_TYPE (type), TYPE_ARG_TYPES (type)); ! /* Record presence of `static'. In C++, `inline' implies `static'. */ ! publicp = (ctype != NULL_TREE ! || RIDBIT_SETP (RID_EXTERN, specbits) ! || (!RIDBIT_SETP (RID_STATIC, specbits) ! && !RIDBIT_SETP (RID_INLINE, specbits))); decl = grokfndecl (ctype, type, original_name, *************** *** 8997,9006 **** raises, processing_template_decl ? 0 : friendp ? 2 : 1, ! publicp); if (decl == NULL_TREE) return NULL_TREE; if (ctype == NULL_TREE && DECL_LANGUAGE (decl) != lang_c) ! DECL_ASSEMBLER_NAME (decl) = declarator; if (staticp == 1) --- 9537,9546 ---- raises, processing_template_decl ? 0 : friendp ? 2 : 1, ! publicp, inlinep); if (decl == NULL_TREE) return NULL_TREE; if (ctype == NULL_TREE && DECL_LANGUAGE (decl) != lang_c) ! DECL_ASSEMBLER_NAME (decl) = current_namespace_id (declarator); if (staticp == 1) *************** *** 9015,9026 **** illegal_static = 1; } - else if (! ctype - && IDENTIFIER_LENGTH (original_name) == 4 - && IDENTIFIER_POINTER (original_name)[0] == 'm' - && ! strcmp (IDENTIFIER_POINTER (original_name), "main")) - { - error ("cannot declare function `main' to have static linkage"); - illegal_static = 1; - } else if (current_function_decl) { --- 9555,9558 ---- *************** *** 9036,9068 **** } } ! /* Record presence of `inline', if it is reasonable. */ ! if (inlinep) { ! tree last = tree_last (TYPE_ARG_TYPES (type)); ! if (! ctype ! && ! strcmp (IDENTIFIER_POINTER (original_name), "main")) ! error ("cannot inline function `main'"); ! else if (last && last != void_list_node) ! cp_warning ("cannot inline function `%D' which takes `...'", original_name); ! else ! /* Assume that otherwise the function can be inlined. */ ! DECL_INLINE (decl) = 1; ! if (RIDBIT_SETP (RID_EXTERN, specbits)) { ! current_extern_inline = 1; ! if (flag_ansi) ! pedwarn ("ANSI C++ does not permit `extern inline'"); ! } } - } - else - { - /* It's a variable. */ /* An uninitialized decl with `extern' is a reference. */ ! decl = grokvardecl (type, declarator, specbits, initialized); bad_specifiers (decl, "variable", virtualp, quals != NULL_TREE, inlinep, friendp, raises != NULL_TREE); --- 9568,9603 ---- } } + } + else + { + /* It's a variable. */ ! if (decl_context == CATCHPARM) { ! if (ctype) ! { ! ctype = NULL_TREE; ! error ("cannot use `::' in parameter declaration"); ! } ! /* A parameter declared as an array of T is really a pointer to T. ! One declared as a function is really a pointer to a function. ! One declared as a member is really a pointer to member. */ ! if (TREE_CODE (type) == ARRAY_TYPE) { ! /* Transfer const-ness of array into that of type pointed to. */ ! type = build_pointer_type ! (cp_build_type_variant (TREE_TYPE (type), constp, volatilep)); ! volatilep = constp = 0; ! } ! else if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_pointer_type (type); ! else if (TREE_CODE (type) == OFFSET_TYPE) ! type = build_pointer_type (type); } /* An uninitialized decl with `extern' is a reference. */ ! decl = grokvardecl (type, declarator, specbits, initialized, constp); bad_specifiers (decl, "variable", virtualp, quals != NULL_TREE, inlinep, friendp, raises != NULL_TREE); *************** *** 9078,9081 **** --- 9613,9621 ---- RIDBIT_RESET (RID_STATIC, specbits); } + if (RIDBIT_SETP (RID_REGISTER, specbits) && TREE_STATIC (decl)) + { + cp_error ("static member `%D' declared `register'", decl); + RIDBIT_RESET (RID_REGISTER, specbits); + } if (RIDBIT_SETP (RID_EXTERN, specbits)) { *************** *** 9101,9104 **** --- 9641,9647 ---- DECL_THIS_EXTERN (decl) = 1; + if (RIDBIT_SETP (RID_STATIC, specbits)) + DECL_THIS_STATIC (decl) = 1; + /* Record constancy and volatility. */ *************** *** 9126,9130 **** return 0; ! if (current_binding_level == global_binding_level) { /* At the global level, if these are all identifiers, --- 9669,9673 ---- return 0; ! if (toplevel_bindings_p ()) { /* At the global level, if these are all identifiers, *************** *** 9359,9363 **** if (TREE_CODE (init) == SAVE_EXPR) PARM_DECL_EXPR (init) = 1; ! else if (TREE_CODE (init) == VAR_DECL) { if (IDENTIFIER_LOCAL_VALUE (DECL_NAME (init))) --- 9902,9907 ---- if (TREE_CODE (init) == SAVE_EXPR) PARM_DECL_EXPR (init) = 1; ! else if (TREE_CODE (init) == VAR_DECL ! || TREE_CODE (init) == PARM_DECL) { if (IDENTIFIER_LOCAL_VALUE (DECL_NAME (init))) *************** *** 9376,9380 **** else init = require_instantiated_type (type, init, integer_zero_node); ! } else if (any_init) { --- 9920,9926 ---- else init = require_instantiated_type (type, init, integer_zero_node); ! } ! #if 0 /* This is too early to check; trailing parms might be merged in by ! duplicate_decls. */ else if (any_init) { *************** *** 9382,9385 **** --- 9928,9932 ---- any_error = 1; } + #endif } else *************** *** 9766,9836 **** scope.) */ - /* avoid rewriting all callers of xref_tag */ - static int xref_next_defn = 0; - - tree - xref_defn_tag (code_type_node, name, binfo) - tree code_type_node; - tree name, binfo; - { - tree rv, ncp; - xref_next_defn = 1; - - if (class_binding_level) - { - tree n1; - char *buf; - /* we need to build a new IDENTIFIER_NODE for name which nukes - * the pieces... */ - /* - n1 = IDENTIFIER_LOCAL_VALUE (current_class_name); - if (n1) - n1 = DECL_NAME (n1); - else - n1 = current_class_name; - */ - n1 = TYPE_NAME (current_class_type); - if (n1) - n1 = DECL_NESTED_TYPENAME(n1); - else - n1 = current_class_name; - - buf = (char *) alloca (4 + IDENTIFIER_LENGTH (n1) - + IDENTIFIER_LENGTH (name)); - - sprintf (buf, "%s::%s", IDENTIFIER_POINTER (n1), - IDENTIFIER_POINTER (name)); - ncp = get_identifier (buf); - #ifdef SPEW_DEBUG - if (spew_debug) - printf("*** %s ***\n", IDENTIFIER_POINTER (ncp)); - #endif - #if 0 - IDENTIFIER_LOCAL_VALUE (name) = - build_decl (TYPE_DECL, ncp, NULL_TREE); - #endif - rv = xref_tag (code_type_node, name, binfo, 0); - if (! ANON_AGGRNAME_P (name)) - { - register tree type_decl = build_decl (TYPE_DECL, ncp, rv); - SET_DECL_ARTIFICIAL (type_decl); - #ifdef DWARF_DEBUGGING_INFO - /* Mark the TYPE_DECL node created just above as a gratuitous one - so that dwarfout.c will know not to generate a TAG_typedef DIE - for it. */ - if (write_symbols == DWARF_DEBUG) - DECL_IGNORED_P (type_decl) = 1; - #endif /* DWARF_DEBUGGING_INFO */ - pushdecl_nonclass_level (type_decl); - } - } - else - { - rv = xref_tag (code_type_node, name, binfo, 0); - } - xref_next_defn = 0; - return rv; - } - tree xref_tag (code_type_node, name, binfo, globalize) --- 10313,10316 ---- *************** *** 9842,9846 **** enum tree_code code; int temp = 0; ! int i, len; register tree ref, t; struct binding_level *b = inner_binding_level; --- 10322,10326 ---- enum tree_code code; int temp = 0; ! int i; register tree ref, t; struct binding_level *b = inner_binding_level; *************** *** 9851,9867 **** case record_type: case class_type: - case exception_type: case signature_type: code = RECORD_TYPE; - len = list_length (binfo); break; case union_type: code = UNION_TYPE; - if (binfo) - { - cp_error ("derived union `%T' invalid", name); - binfo = NULL_TREE; - } - len = 0; break; case enum_type: --- 10331,10339 ---- *************** *** 9878,9893 **** t = NULL_TREE; ! if (xref_next_defn) { /* If we know we are defining this tag, only look it up in this scope * and don't try to find it as a type. */ ! xref_next_defn = 0; ! if (t && TYPE_CONTEXT(t)) ! { ! if (TREE_MANGLED (name)) ! ref = t; ! else ! ref = lookup_tag (code, name, b, 1); ! } else ref = lookup_tag (code, name, b, 1); --- 10350,10359 ---- t = NULL_TREE; ! if (! globalize) { /* If we know we are defining this tag, only look it up in this scope * and don't try to find it as a type. */ ! if (t && TYPE_CONTEXT(t) && TREE_MANGLED (name)) ! ref = t; else ref = lookup_tag (code, name, b, 1); *************** *** 9950,9964 **** cadillac_start_enum (ref); } - else if (tag_code == exception_type) - { - ref = make_lang_type (code); - /* Enable us to recognize when an exception type is created in - class context. To do nested classes correctly, this should - probably be cleared out when we leave this class's scope. */ - CLASSTYPE_DECLARED_EXCEPTION (ref) = 1; - pushtag (name, ref, globalize); - if (flag_cadillac) - cadillac_start_struct (ref); - } else { --- 10416,10419 ---- *************** *** 9991,10005 **** else { - if (IS_AGGR_TYPE_CODE (code)) - { - if (IS_AGGR_TYPE (ref) - && ((tag_code == exception_type) - != (CLASSTYPE_DECLARED_EXCEPTION (ref) == 1))) - { - cp_error ("type `%T' is both exception and aggregate type", ref); - CLASSTYPE_DECLARED_EXCEPTION (ref) = (tag_code == exception_type); - } - } - /* If it no longer looks like a nested type, make sure it's in global scope. */ --- 10446,10449 ---- *************** *** 10008,10011 **** --- 10452,10456 ---- IDENTIFIER_GLOBAL_VALUE (name) = TYPE_NAME (ref); + #if 0 if (binfo) { *************** *** 10030,10155 **** end_temporary_allocation (); } } if (binfo) ! { ! /* In the declaration `A : X, Y, ... Z' we mark all the types ! (A, X, Y, ..., Z) so we can check for duplicates. */ ! tree binfos; ! ! SET_CLASSTYPE_MARKED (ref); ! BINFO_BASETYPES (TYPE_BINFO (ref)) = binfos = make_tree_vec (len); ! ! for (i = 0; binfo; binfo = TREE_CHAIN (binfo)) ! { ! /* The base of a derived struct is public by default. */ ! int via_public ! = (TREE_PURPOSE (binfo) == (tree)access_public ! || TREE_PURPOSE (binfo) == (tree)access_public_virtual ! || (tag_code != class_type ! && (TREE_PURPOSE (binfo) == (tree)access_default ! || TREE_PURPOSE (binfo) == (tree)access_default_virtual))); ! int via_protected = TREE_PURPOSE (binfo) == (tree)access_protected; ! int via_virtual ! = (TREE_PURPOSE (binfo) == (tree)access_private_virtual ! || TREE_PURPOSE (binfo) == (tree)access_public_virtual ! || TREE_PURPOSE (binfo) == (tree)access_default_virtual); ! tree basetype = TREE_TYPE (TREE_VALUE (binfo)); ! tree base_binfo; ! ! GNU_xref_hier (IDENTIFIER_POINTER (name), ! IDENTIFIER_POINTER (TREE_VALUE (binfo)), ! via_public, via_virtual, 0); ! ! if (basetype && TREE_CODE (basetype) == TYPE_DECL) ! basetype = TREE_TYPE (basetype); ! if (!basetype || TREE_CODE (basetype) != RECORD_TYPE) ! { ! error ("base type `%s' fails to be a struct or class type", ! IDENTIFIER_POINTER (TREE_VALUE (binfo))); ! continue; ! } ! #if 1 ! /* This code replaces similar code in layout_basetypes. */ ! else if (TYPE_SIZE (basetype) == NULL_TREE) ! { ! cp_error ("base class `%T' has incomplete type", basetype); ! continue; ! } ! #endif ! else ! { ! if (CLASSTYPE_MARKED (basetype)) ! { ! if (basetype == ref) ! cp_error ("recursive type `%T' undefined", basetype); ! else ! cp_error ("duplicate base type `%T' invalid", basetype); ! continue; ! } ! ! /* Note that the BINFO records which describe individual ! inheritances are *not* shared in the lattice! They ! cannot be shared because a given baseclass may be ! inherited with different `accessibility' by different ! derived classes. (Each BINFO record describing an ! individual inheritance contains flags which say what ! the `accessibility' of that particular inheritance is.) */ ! ! base_binfo = make_binfo (integer_zero_node, basetype, ! TYPE_BINFO_VTABLE (basetype), ! TYPE_BINFO_VIRTUALS (basetype), NULL_TREE); ! ! TREE_VEC_ELT (binfos, i) = base_binfo; ! TREE_VIA_PUBLIC (base_binfo) = via_public; ! TREE_VIA_PROTECTED (base_binfo) = via_protected; ! TREE_VIA_VIRTUAL (base_binfo) = via_virtual; ! BINFO_INHERITANCE_CHAIN (base_binfo) = TYPE_BINFO (ref); ! ! SET_CLASSTYPE_MARKED (basetype); ! #if 0 ! /* XYZZY TEST VIRTUAL BASECLASSES */ ! if (CLASSTYPE_N_BASECLASSES (basetype) == NULL_TREE ! && TYPE_HAS_DEFAULT_CONSTRUCTOR (basetype) ! && via_virtual == 0) ! { ! warning ("making type `%s' a virtual baseclass", ! TYPE_NAME_STRING (basetype)); ! via_virtual = 1; ! } ! #endif ! /* We are free to modify these bits because they are meaningless ! at top level, and BASETYPE is a top-level type. */ ! if (via_virtual || TYPE_USES_VIRTUAL_BASECLASSES (basetype)) ! { ! TYPE_USES_VIRTUAL_BASECLASSES (ref) = 1; ! TYPE_USES_COMPLEX_INHERITANCE (ref) = 1; ! } ! ! TYPE_OVERLOADS_METHOD_CALL_EXPR (ref) |= TYPE_OVERLOADS_METHOD_CALL_EXPR (basetype); ! TYPE_GETS_NEW (ref) |= TYPE_GETS_NEW (basetype); ! TYPE_GETS_DELETE (ref) |= TYPE_GETS_DELETE (basetype); ! CLASSTYPE_LOCAL_TYPEDECLS (ref) |= CLASSTYPE_LOCAL_TYPEDECLS (basetype); ! i += 1; ! } ! } ! if (i) ! TREE_VEC_LENGTH (binfos) = i; ! else ! BINFO_BASETYPES (TYPE_BINFO (ref)) = NULL_TREE; ! ! if (i > 1) ! TYPE_USES_MULTIPLE_INHERITANCE (ref) = 1; ! else if (i == 1) ! TYPE_USES_MULTIPLE_INHERITANCE (ref) ! = TYPE_USES_MULTIPLE_INHERITANCE (BINFO_TYPE (TREE_VEC_ELT (binfos, 0))); ! if (TYPE_USES_MULTIPLE_INHERITANCE (ref)) ! TYPE_USES_COMPLEX_INHERITANCE (ref) = 1; ! ! /* Unmark all the types. */ ! while (--i >= 0) ! CLEAR_CLASSTYPE_MARKED (BINFO_TYPE (TREE_VEC_ELT (binfos, i))); ! CLEAR_CLASSTYPE_MARKED (ref); ! } just_return: --- 10475,10483 ---- end_temporary_allocation (); } + #endif } if (binfo) ! xref_basetypes (code_type_node, name, ref, binfo); just_return: *************** *** 10172,10175 **** --- 10500,10642 ---- return ref; } + + void + xref_basetypes (code_type_node, name, ref, binfo) + tree code_type_node; + tree name, ref; + tree binfo; + { + /* In the declaration `A : X, Y, ... Z' we mark all the types + (A, X, Y, ..., Z) so we can check for duplicates. */ + tree binfos; + int i, len; + enum tag_types tag_code = (enum tag_types) TREE_INT_CST_LOW (code_type_node); + + if (tag_code == union_type) + { + cp_error ("derived union `%T' invalid", ref); + return; + } + + len = list_length (binfo); + push_obstacks (TYPE_OBSTACK (ref), TYPE_OBSTACK (ref)); + + SET_CLASSTYPE_MARKED (ref); + BINFO_BASETYPES (TYPE_BINFO (ref)) = binfos = make_tree_vec (len); + + for (i = 0; binfo; binfo = TREE_CHAIN (binfo)) + { + /* The base of a derived struct is public by default. */ + int via_public + = (TREE_PURPOSE (binfo) == (tree)access_public + || TREE_PURPOSE (binfo) == (tree)access_public_virtual + || (tag_code != class_type + && (TREE_PURPOSE (binfo) == (tree)access_default + || TREE_PURPOSE (binfo) == (tree)access_default_virtual))); + int via_protected = TREE_PURPOSE (binfo) == (tree)access_protected; + int via_virtual + = (TREE_PURPOSE (binfo) == (tree)access_private_virtual + || TREE_PURPOSE (binfo) == (tree)access_public_virtual + || TREE_PURPOSE (binfo) == (tree)access_default_virtual); + tree basetype = TREE_TYPE (TREE_VALUE (binfo)); + tree base_binfo; + + GNU_xref_hier (IDENTIFIER_POINTER (name), + IDENTIFIER_POINTER (TREE_VALUE (binfo)), + via_public, via_virtual, 0); + + if (basetype && TREE_CODE (basetype) == TYPE_DECL) + basetype = TREE_TYPE (basetype); + if (!basetype || TREE_CODE (basetype) != RECORD_TYPE) + { + cp_error ("base type `%T' fails to be a struct or class type", + TREE_VALUE (binfo)); + continue; + } + #if 1 + /* This code replaces similar code in layout_basetypes. */ + else if (TYPE_INCOMPLETE (basetype)) + { + cp_error ("base class `%T' has incomplete type", basetype); + continue; + } + #endif + else + { + if (CLASSTYPE_MARKED (basetype)) + { + if (basetype == ref) + cp_error ("recursive type `%T' undefined", basetype); + else + cp_error ("duplicate base type `%T' invalid", basetype); + continue; + } + + /* Note that the BINFO records which describe individual + inheritances are *not* shared in the lattice! They + cannot be shared because a given baseclass may be + inherited with different `accessibility' by different + derived classes. (Each BINFO record describing an + individual inheritance contains flags which say what + the `accessibility' of that particular inheritance is.) */ + + base_binfo = make_binfo (integer_zero_node, basetype, + TYPE_BINFO_VTABLE (basetype), + TYPE_BINFO_VIRTUALS (basetype), NULL_TREE); + + TREE_VEC_ELT (binfos, i) = base_binfo; + TREE_VIA_PUBLIC (base_binfo) = via_public; + TREE_VIA_PROTECTED (base_binfo) = via_protected; + TREE_VIA_VIRTUAL (base_binfo) = via_virtual; + BINFO_INHERITANCE_CHAIN (base_binfo) = TYPE_BINFO (ref); + + SET_CLASSTYPE_MARKED (basetype); + #if 0 + /* XYZZY TEST VIRTUAL BASECLASSES */ + if (CLASSTYPE_N_BASECLASSES (basetype) == NULL_TREE + && TYPE_HAS_DEFAULT_CONSTRUCTOR (basetype) + && via_virtual == 0) + { + warning ("making type `%s' a virtual baseclass", + TYPE_NAME_STRING (basetype)); + via_virtual = 1; + } + #endif + /* We are free to modify these bits because they are meaningless + at top level, and BASETYPE is a top-level type. */ + if (via_virtual || TYPE_USES_VIRTUAL_BASECLASSES (basetype)) + { + TYPE_USES_VIRTUAL_BASECLASSES (ref) = 1; + TYPE_USES_COMPLEX_INHERITANCE (ref) = 1; + } + + TYPE_OVERLOADS_METHOD_CALL_EXPR (ref) |= TYPE_OVERLOADS_METHOD_CALL_EXPR (basetype); + TYPE_GETS_NEW (ref) |= TYPE_GETS_NEW (basetype); + TYPE_GETS_DELETE (ref) |= TYPE_GETS_DELETE (basetype); + CLASSTYPE_LOCAL_TYPEDECLS (ref) |= CLASSTYPE_LOCAL_TYPEDECLS (basetype); + i += 1; + } + } + if (i) + TREE_VEC_LENGTH (binfos) = i; + else + BINFO_BASETYPES (TYPE_BINFO (ref)) = NULL_TREE; + + if (i > 1) + TYPE_USES_MULTIPLE_INHERITANCE (ref) = 1; + else if (i == 1) + TYPE_USES_MULTIPLE_INHERITANCE (ref) + = TYPE_USES_MULTIPLE_INHERITANCE (BINFO_TYPE (TREE_VEC_ELT (binfos, 0))); + if (TYPE_USES_MULTIPLE_INHERITANCE (ref)) + TYPE_USES_COMPLEX_INHERITANCE (ref) = 1; + + /* Unmark all the types. */ + while (--i >= 0) + CLEAR_CLASSTYPE_MARKED (BINFO_TYPE (TREE_VEC_ELT (binfos, i))); + CLEAR_CLASSTYPE_MARKED (ref); + + pop_obstacks (); + } + static tree current_local_enum = NULL_TREE; *************** *** 10278,10305 **** int precision = MAX (lowprec, highprec); ! if (! flag_short_enums && precision < TYPE_PRECISION (integer_type_node)) ! precision = TYPE_PRECISION (integer_type_node); ! ! /* ! * The following code is unnecessary since the function ! * type_promotes_to deals correctly with promotion of enums of ! * underlying unsigned types to signed integer types. ! * Moreover, it causes an enum bitfield to require one more bit of ! * storage than defined by the ANSI/ISO C++ resolution section r.7.2 ! * which defines the range of an enum. ! */ ! #if 0 ! /* Unlike the C frontend, we prefer signed types. */ ! if (unsignedp && int_fits_type_p (maxnode, type_for_size (precision, 0))) ! unsignedp = 0; ! #endif TYPE_PRECISION (enumtype) = precision; - TYPE_SIZE (enumtype) = NULL_TREE; if (unsignedp) fixup_unsigned_type (enumtype); else fixup_signed_type (enumtype); } --- 10745,10767 ---- int precision = MAX (lowprec, highprec); ! TYPE_SIZE (enumtype) = NULL_TREE; ! /* Set TYPE_MIN_VALUE and TYPE_MAX_VALUE according to `precision'. */ TYPE_PRECISION (enumtype) = precision; if (unsignedp) fixup_unsigned_type (enumtype); else fixup_signed_type (enumtype); + + if (flag_short_enums || precision > TYPE_PRECISION (integer_type_node)) + /* Use the width of the narrowest normal C type which is wide enough. */ + TYPE_PRECISION (enumtype) = TYPE_PRECISION (type_for_size + (precision, 1)); + else + TYPE_PRECISION (enumtype) = TYPE_PRECISION (integer_type_node); + + TYPE_SIZE (enumtype) = 0; + layout_type (enumtype); } *************** *** 10507,10511 **** current_function_returns_null = 0; warn_about_return_type = 0; ! current_extern_inline = 0; current_function_assigns_this = 0; current_function_just_assigned_this = 0; --- 10969,10974 ---- current_function_returns_null = 0; warn_about_return_type = 0; ! named_labels = 0; ! shadowed_labels = 0; current_function_assigns_this = 0; current_function_just_assigned_this = 0; *************** *** 10514,10517 **** --- 10977,10984 ---- current_function_obstack_index = 0; current_function_obstack_usage = 0; + base_init_expr = NULL_TREE; + protect_list = NULL_TREE; + current_base_init_list = NULL_TREE; + current_member_init_list = NULL_TREE; clear_temp_name (); *************** *** 10563,10571 **** } - if ( !(DECL_VINDEX (decl1) - && write_virtuals >= 2 - && CLASSTYPE_VTABLE_NEEDS_WRITING (ctype))) - current_extern_inline = DECL_THIS_EXTERN (decl1) && DECL_INLINE (decl1); - raises = TYPE_RAISES_EXCEPTIONS (fntype); --- 11030,11033 ---- *************** *** 10609,10613 **** { if (pedantic || warn_return_type) ! warning ("return type for `main' changed to integer type"); TREE_TYPE (decl1) = fntype = default_function_type; } --- 11071,11075 ---- { if (pedantic || warn_return_type) ! pedwarn ("return type for `main' changed to integer type"); TREE_TYPE (decl1) = fntype = default_function_type; } *************** *** 10653,10656 **** --- 11115,11122 ---- } + if (TYPE_LANG_SPECIFIC (TREE_TYPE (fntype)) + && CLASSTYPE_ABSTRACT_VIRTUALS (TREE_TYPE (fntype))) + abstract_virtuals_error (decl1, TREE_TYPE (fntype)); + if (warn_about_return_type) warning ("return-type defaults to `int'"); *************** *** 10680,10706 **** current_function_decl = decl1; /* If this function belongs to an interface, it is public. If it belongs to someone else's interface, it is also external. It doesn't matter whether it's inline or not. */ ! if (interface_unknown == 0 ! && ! TREE_PUBLIC (decl1)) { ! TREE_PUBLIC (decl1) = 1; ! DECL_EXTERNAL (decl1) ! = (interface_only ! || (DECL_INLINE (decl1) && ! flag_implement_inlines)); } else { /* This is a definition, not a reference. ! So normally clear DECL_EXTERNAL. ! However, `extern inline' acts like a declaration except for ! defining how to inline. So set DECL_EXTERNAL in that case. */ ! DECL_EXTERNAL (decl1) = current_extern_inline; ! ! DECL_DEFER_OUTPUT (decl1) ! = DECL_INLINE (decl1) && ! TREE_PUBLIC (decl1) ! && (DECL_FUNCTION_MEMBER_P (decl1) ! || DECL_TEMPLATE_INSTANTIATION (decl1)); } --- 11146,11182 ---- current_function_decl = decl1; + if (DECL_INTERFACE_KNOWN (decl1)) + { + if (DECL_NOT_REALLY_EXTERN (decl1)) + DECL_EXTERNAL (decl1) = 0; + } /* If this function belongs to an interface, it is public. If it belongs to someone else's interface, it is also external. It doesn't matter whether it's inline or not. */ ! else if (interface_unknown == 0) { ! if (DECL_THIS_INLINE (decl1) || DECL_TEMPLATE_INSTANTIATION (decl1)) ! DECL_EXTERNAL (decl1) ! = (interface_only ! || (DECL_THIS_INLINE (decl1) && ! flag_implement_inlines)); ! else ! DECL_EXTERNAL (decl1) = 0; ! DECL_NOT_REALLY_EXTERN (decl1) = 0; ! DECL_INTERFACE_KNOWN (decl1) = 1; } else { /* This is a definition, not a reference. ! So clear DECL_EXTERNAL. */ ! DECL_EXTERNAL (decl1) = 0; ! ! if (DECL_THIS_INLINE (decl1) && ! DECL_INTERFACE_KNOWN (decl1)) ! DECL_DEFER_OUTPUT (decl1) = 1; ! else ! { ! DECL_INTERFACE_KNOWN (decl1) = 1; ! if (DECL_C_STATIC (decl1)) ! TREE_PUBLIC (decl1) = 0; ! } } *************** *** 10717,10732 **** restype = TREE_TYPE (fntype); - pushlevel (0); - current_binding_level->parm_flag = 1; - - /* Save the parm names or decls from this function's declarator - where store_parm_decls will find them. */ - current_function_parms = last_function_parms; - current_function_parm_tags = last_function_parm_tags; - - GNU_xref_function (decl1, current_function_parms); - - make_function_rtl (decl1); - if (ctype) { --- 11193,11196 ---- *************** *** 10742,10771 **** we keep the consistency between `current_class_type' and `current_class_decl'. */ ! current_class_decl = last_function_parms; ! my_friendly_assert (current_class_decl != NULL_TREE ! && TREE_CODE (current_class_decl) == PARM_DECL, 162); ! if (TREE_CODE (TREE_TYPE (current_class_decl)) == POINTER_TYPE) ! { ! tree variant = TREE_TYPE (TREE_TYPE (current_class_decl)); ! if (CLASSTYPE_INST_VAR (ctype) == NULL_TREE) ! { ! /* Can't call build_indirect_ref here, because it has special ! logic to return C_C_D given this argument. */ ! C_C_D = build1 (INDIRECT_REF, current_class_type, current_class_decl); ! CLASSTYPE_INST_VAR (ctype) = C_C_D; ! } ! else ! { ! C_C_D = CLASSTYPE_INST_VAR (ctype); ! /* `current_class_decl' is different for every ! function we compile. */ ! TREE_OPERAND (C_C_D, 0) = current_class_decl; ! } ! TREE_READONLY (C_C_D) = TYPE_READONLY (variant); ! TREE_SIDE_EFFECTS (C_C_D) = TYPE_VOLATILE (variant); ! TREE_THIS_VOLATILE (C_C_D) = TYPE_VOLATILE (variant); ! } ! else ! C_C_D = current_class_decl; } } --- 11206,11220 ---- we keep the consistency between `current_class_type' and `current_class_decl'. */ ! tree t = last_function_parms; ! int i = suspend_momentary (); ! ! my_friendly_assert (t != NULL_TREE ! && TREE_CODE (t) == PARM_DECL, 162); ! ! /* Fool build_indirect_ref. */ ! current_class_decl = NULL_TREE; ! C_C_D = build_indirect_ref (t, NULL_PTR); ! current_class_decl = t; ! resume_momentary (i); } } *************** *** 10776,10781 **** --- 11225,11243 ---- else push_memoized_context (0, 1); + current_class_decl = C_C_D = NULL_TREE; } + pushlevel (0); + current_binding_level->parm_flag = 1; + + /* Save the parm names or decls from this function's declarator + where store_parm_decls will find them. */ + current_function_parms = last_function_parms; + current_function_parm_tags = last_function_parm_tags; + + GNU_xref_function (decl1, current_function_parms); + + make_function_rtl (decl1); + /* Allocate further tree nodes temporarily during compilation of this function only. Tiemann moved up here from bottom of fn. */ *************** *** 10842,10846 **** tree nonparms = NULL_TREE; ! if (current_binding_level == global_binding_level) fatal ("parse errors have confused me too much"); --- 11304,11308 ---- tree nonparms = NULL_TREE; ! if (toplevel_bindings_p ()) fatal ("parse errors have confused me too much"); *************** *** 10973,10979 **** expand_expr (build_function_call (lookup_name (get_identifier ("__gc_main"), 0), NULL_TREE), 0, VOIDmode, 0); ! ! if (flag_dossier) output_builtin_tdesc_entries (); } } --- 11435,11443 ---- expand_expr (build_function_call (lookup_name (get_identifier ("__gc_main"), 0), NULL_TREE), 0, VOIDmode, 0); ! #if 0 ! /* done at a different time */ ! if (flag_rtti) output_builtin_tdesc_entries (); + #endif } } *************** *** 10987,10991 **** tree decl = DECL_RESULT (current_function_decl); ! if (flag_ansi) /* Give this error as many times as there are occurrences, so that users can use Emacs compilation buffers to find --- 11451,11455 ---- tree decl = DECL_RESULT (current_function_decl); ! if (pedantic) /* Give this error as many times as there are occurrences, so that users can use Emacs compilation buffers to find *************** *** 11023,11030 **** } ! /* Let `finish_decl' know that this initializer is ok. */ DECL_INITIAL (decl) = init; pushdecl (decl); ! finish_decl (decl, init, 0, 0); } } --- 11487,11494 ---- } ! /* Let `cp_finish_decl' know that this initializer is ok. */ DECL_INITIAL (decl) = init; pushdecl (decl); ! cp_finish_decl (decl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); } } *************** *** 11044,11050 **** void ! finish_function (lineno, call_poplevel) int lineno; int call_poplevel; { register tree fndecl = current_function_decl; --- 11508,11515 ---- void ! finish_function (lineno, call_poplevel, nested) int lineno; int call_poplevel; + int nested; { register tree fndecl = current_function_decl; *************** *** 11104,11108 **** if (current_function_assigns_this) ! cond = build (NE_EXPR, integer_type_node, current_class_decl, integer_zero_node); else --- 11569,11573 ---- if (current_function_assigns_this) ! cond = build (NE_EXPR, boolean_type_node, current_class_decl, integer_zero_node); else *************** *** 11267,11270 **** --- 11732,11736 ---- if (DECL_CONSTRUCTOR_P (current_function_decl)) { + end_protect_partials (); expand_label (ctor_label); ctor_label = NULL_TREE; *************** *** 11285,11289 **** current_function_assigns_this = 0; current_function_just_assigned_this = 0; ! base_init_insns = NULL_RTX; } else if (DECL_CONSTRUCTOR_P (fndecl)) --- 11751,11755 ---- current_function_assigns_this = 0; current_function_just_assigned_this = 0; ! base_init_expr = NULL_TREE; } else if (DECL_CONSTRUCTOR_P (fndecl)) *************** *** 11329,11334 **** /* Emit insns from `emit_base_init' which sets up virtual function table pointer(s). */ ! emit_insns (base_init_insns); ! base_init_insns = NULL_RTX; /* This is where the body of the constructor begins. --- 11795,11803 ---- /* Emit insns from `emit_base_init' which sets up virtual function table pointer(s). */ ! if (base_init_expr) ! { ! expand_expr_stmt (base_init_expr); ! base_init_expr = NULL_TREE; ! } /* This is where the body of the constructor begins. *************** *** 11347,11350 **** --- 11816,11821 ---- reorder_insns (next_insn (mark), get_last_insn (), last_parm_insn); + end_protect_partials (); + /* This is where the body of the constructor ends. */ expand_label (ctor_label); *************** *** 11353,11357 **** if (call_poplevel) { ! expand_end_bindings (decls = getdecls (), decls != NULL_TREE, 0); poplevel (decls != NULL_TREE, 1, 0); } --- 11824,11829 ---- if (call_poplevel) { ! decls = getdecls (); ! expand_end_bindings (decls, decls != NULL_TREE, 0); poplevel (decls != NULL_TREE, 1, 0); } *************** *** 11381,11392 **** expand_gc_prologue_and_epilogue (); - /* That's the end of the vtable decl's life. Need to mark it such - if doing stupid register allocation. - - Note that current_vtable_decl is really an INDIRECT_REF - on top of a VAR_DECL here. */ - if (obey_regdecls && current_vtable_decl) - use_variable (DECL_RTL (TREE_OPERAND (current_vtable_decl, 0))); - /* If this function is supposed to return a value, ensure that we do not fall into the cleanups by mistake. The end of our --- 11853,11856 ---- *************** *** 11443,11459 **** } - /* reset scope for C++: if we were in the scope of a class, - then when we finish this function, we are not longer so. - This cannot be done until we know for sure that no more - class members will ever be referenced in this function - (i.e., calls to destructors). */ - if (current_class_name) - { - ctype = current_class_type; - pop_nested_class (1); - } - else - pop_memoized_context (1); - /* Generate rtl for function exit. */ expand_function_end (input_filename, lineno, 1); --- 11907,11910 ---- *************** *** 11469,11472 **** --- 11920,11936 ---- poplevel (1, 0, 1); + /* reset scope for C++: if we were in the scope of a class, + then when we finish this function, we are not longer so. + This cannot be done until we know for sure that no more + class members will ever be referenced in this function + (i.e., calls to destructors). */ + if (current_class_name) + { + ctype = current_class_type; + pop_nested_class (1); + } + else + pop_memoized_context (1); + /* Must mark the RESULT_DECL as being in this function. */ DECL_CONTEXT (DECL_RESULT (fndecl)) = DECL_INITIAL (fndecl); *************** *** 11483,11523 **** can_reach_end = 0; ! if (DECL_EXTERNAL (fndecl) ! /* This function is just along for the ride. If we can make ! it inline, that's great. Otherwise, just punt it. */ ! && (DECL_INLINE (fndecl) == 0 ! || flag_no_inline ! || function_cannot_inline_p (fndecl) ! /* ??? Compensate for Sun brain damage in dealing with ! data segments of PIC code. */ ! || (flag_pic ! && (DECL_CONSTRUCTOR_P (fndecl) ! || DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl))) ! && CLASSTYPE_NEEDS_VIRTUAL_REINIT (TYPE_METHOD_BASETYPE (fntype))))) ! ! { ! extern int rtl_dump_and_exit; ! int old_rtl_dump_and_exit = rtl_dump_and_exit; ! int inline_spec = DECL_INLINE (fndecl); ! ! /* This throws away the code for FNDECL. */ ! rtl_dump_and_exit = 1; ! /* This throws away the memory of the code for FNDECL. */ ! if (flag_no_inline) ! DECL_INLINE (fndecl) = 0; ! rest_of_compilation (fndecl); ! rtl_dump_and_exit = old_rtl_dump_and_exit; ! DECL_INLINE (fndecl) = inline_spec; ! } ! else ! { ! /* Run the optimizers and output the assembler code for this ! function. */ ! rest_of_compilation (fndecl); ! } ! if (DECL_INLINE (fndecl) && !TREE_ASM_WRITTEN (fndecl) ! && DECL_DEFER_OUTPUT (fndecl)) { mark_inline_for_output (fndecl); } --- 11947,11960 ---- can_reach_end = 0; ! /* Run the optimizers and output the assembler code for this function. */ ! rest_of_compilation (fndecl); ! if (DECL_SAVED_INSNS (fndecl) && ! TREE_ASM_WRITTEN (fndecl)) { + /* Set DECL_EXTERNAL so that assemble_external will be called as + necessary. We'll clear it again in finish_file. */ + if (! DECL_EXTERNAL (fndecl)) + DECL_NOT_REALLY_EXTERN (fndecl) = 1; + DECL_EXTERNAL (fndecl) = 1; mark_inline_for_output (fndecl); } *************** *** 11555,11559 **** /* Switch back to allocating nodes permanently until we start another function. */ ! permanent_allocation (1); if (flag_cadillac) --- 11992,11997 ---- /* Switch back to allocating nodes permanently until we start another function. */ ! if (! nested) ! permanent_allocation (1); if (flag_cadillac) *************** *** 11571,11576 **** } ! /* Let the error reporting routines know that we're outside a function. */ ! current_function_decl = NULL_TREE; named_label_uses = NULL_TREE; } --- 12009,12025 ---- } ! if (DECL_STATIC_CONSTRUCTOR (fndecl)) ! static_ctors = perm_tree_cons (NULL_TREE, fndecl, static_ctors); ! if (DECL_STATIC_DESTRUCTOR (fndecl)) ! static_dtors = perm_tree_cons (NULL_TREE, fndecl, static_dtors); ! ! if (! nested) ! { ! /* Let the error reporting routines know that we're outside a ! function. For a nested function, this value is used in ! pop_cp_function_context and then reset via pop_function_context. */ ! current_function_decl = NULL_TREE; ! } ! named_label_uses = NULL_TREE; } *************** *** 11634,11642 **** } if (flag_default_inline) DECL_INLINE (fndecl) = 1; if (processing_template_defn) ! SET_DECL_IMPLICIT_INSTANTIATION (fndecl); /* We read in the parameters on the maybepermanent_obstack, --- 12083,12096 ---- } + DECL_THIS_INLINE (fndecl) = 1; + if (flag_default_inline) DECL_INLINE (fndecl) = 1; if (processing_template_defn) ! { ! SET_DECL_IMPLICIT_INSTANTIATION (fndecl); ! repo_template_used (fndecl); ! } /* We read in the parameters on the maybepermanent_obstack, *************** *** 11671,11675 **** } ! finish_decl (fndecl, NULL_TREE, NULL_TREE, 0); /* Make a place for the parms */ --- 12125,12129 ---- } ! cp_finish_decl (fndecl, NULL_TREE, NULL_TREE, 0, 0); /* Make a place for the parms */ *************** *** 11786,11790 **** else { ! int toplevel = global_binding_level == current_binding_level; if (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE && TREE_TYPE (TREE_TYPE (decl)) == type) --- 12240,12244 ---- else { ! int toplevel = toplevel_bindings_p (); if (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE && TREE_TYPE (TREE_TYPE (decl)) == type) *************** *** 11803,11807 **** --- 12257,12263 ---- } } + /* my_friendly_assert (current_binding_level->n_incomplete > 0, 164); + */ --current_binding_level->n_incomplete; } *************** *** 11851,11859 **** flags |= LOOKUP_NONVIRTUAL; - /* Use TYPE_MAIN_VARIANT so we don't get a warning about - calling delete on a `const' variable. */ - if (TYPE_READONLY (TREE_TYPE (TREE_TYPE (rval)))) - rval = build1 (NOP_EXPR, TYPE_POINTER_TO (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (rval)))), rval); - rval = build_delete (TREE_TYPE (rval), rval, integer_two_node, flags, 0); --- 12307,12310 ---- *************** *** 11937,11941 **** if (cond_stack || loop_stack || case_stack) return; ! emit_insns (base_init_insns); check_base_init (current_class_type); } --- 12388,12392 ---- if (cond_stack || loop_stack || case_stack) return; ! expand_expr_stmt (base_init_expr); check_base_init (current_class_type); } *************** *** 11980,11982 **** --- 12431,12550 ---- { return !!purpose_member (id, class_binding_level->class_shadowed); + } + + struct cp_function + { + int returns_value; + int returns_null; + int warn_about_return_type; + int assigns_this; + int just_assigned_this; + int parms_stored; + int temp_name_counter; + tree named_labels; + tree shadowed_labels; + tree ctor_label; + tree dtor_label; + tree protect_list; + tree base_init_list; + tree member_init_list; + tree base_init_expr; + tree class_decl; + tree C_C_D; + rtx result_rtx; + struct cp_function *next; + struct binding_level *binding_level; + }; + + struct cp_function *cp_function_chain; + + extern int temp_name_counter; + + /* Save and reinitialize the variables + used during compilation of a C++ function. */ + + void + push_cp_function_context (context) + tree context; + { + struct cp_function *p + = (struct cp_function *) xmalloc (sizeof (struct cp_function)); + + push_function_context_to (context); + + p->next = cp_function_chain; + cp_function_chain = p; + + p->named_labels = named_labels; + p->shadowed_labels = shadowed_labels; + p->returns_value = current_function_returns_value; + p->returns_null = current_function_returns_null; + p->warn_about_return_type = warn_about_return_type; + p->binding_level = current_binding_level; + p->ctor_label = ctor_label; + p->dtor_label = dtor_label; + p->assigns_this = current_function_assigns_this; + p->just_assigned_this = current_function_just_assigned_this; + p->parms_stored = current_function_parms_stored; + p->result_rtx = original_result_rtx; + p->base_init_expr = base_init_expr; + p->protect_list = protect_list; + p->temp_name_counter = temp_name_counter; + p->base_init_list = current_base_init_list; + p->member_init_list = current_member_init_list; + p->class_decl = current_class_decl; + p->C_C_D = C_C_D; + } + + /* Restore the variables used during compilation of a C++ function. */ + + void + pop_cp_function_context (context) + tree context; + { + struct cp_function *p = cp_function_chain; + tree link; + + /* Bring back all the labels that were shadowed. */ + for (link = shadowed_labels; link; link = TREE_CHAIN (link)) + if (DECL_NAME (TREE_VALUE (link)) != 0) + SET_IDENTIFIER_LABEL_VALUE (DECL_NAME (TREE_VALUE (link)), + TREE_VALUE (link)); + + #if 0 + if (DECL_SAVED_INSNS (current_function_decl) == 0) + { + /* Stop pointing to the local nodes about to be freed. */ + /* But DECL_INITIAL must remain nonzero so we know this + was an actual function definition. */ + DECL_INITIAL (current_function_decl) = error_mark_node; + DECL_ARGUMENTS (current_function_decl) = 0; + } + #endif + + pop_function_context_from (context); + + cp_function_chain = p->next; + + named_labels = p->named_labels; + shadowed_labels = p->shadowed_labels; + current_function_returns_value = p->returns_value; + current_function_returns_null = p->returns_null; + warn_about_return_type = p->warn_about_return_type; + current_binding_level = p->binding_level; + ctor_label = p->ctor_label; + dtor_label = p->dtor_label; + protect_list = p->protect_list; + current_function_assigns_this = p->assigns_this; + current_function_just_assigned_this = p->just_assigned_this; + current_function_parms_stored = p->parms_stored; + original_result_rtx = p->result_rtx; + base_init_expr = p->base_init_expr; + temp_name_counter = p->temp_name_counter; + current_base_init_list = p->base_init_list; + current_member_init_list = p->member_init_list; + current_class_decl = p->class_decl; + C_C_D = p->C_C_D; + + free (p); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/decl.h gcc-2.7.0/cp/decl.h *** gcc-2.6.3/cp/decl.h Fri Apr 8 02:03:22 1994 --- gcc-2.7.0/cp/decl.h Thu Jun 15 08:19:50 1995 *************** *** 16,20 **** 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. */ /* In grokdeclarator, distinguish syntactic contexts of declarators. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* In grokdeclarator, distinguish syntactic contexts of declarators. */ *************** *** 23,26 **** --- 24,28 ---- FUNCDEF, /* Function definition */ PARM, /* Declaration of parm before function body */ + CATCHPARM, /* Declaration of catch parm */ FIELD, /* Declaration inside struct or union */ BITFIELD, /* Likewise but with specified width */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/decl2.c gcc-2.7.0/cp/decl2.c *** gcc-2.6.3/cp/decl2.c Wed Oct 26 21:19:38 1994 --- gcc-2.7.0/cp/decl2.c Thu Jun 15 08:20:47 1995 *************** *** 1,4 **** /* Process declarations and variables for C compiler. ! Copyright (C) 1988, 1992, 1993 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Process declarations and variables for C compiler. ! Copyright (C) 1988, 1992, 1993, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 35,38 **** --- 36,41 ---- #include "decl.h" #include "lex.h" + #include "output.h" + #include "defaults.h" extern tree grokdeclarator (); *************** *** 56,60 **** a function. Reset to 0 by start_function. */ ! static int temp_name_counter; /* Same, but not reset. Local temp variables and global temp variables --- 59,63 ---- a function. Reset to 0 by start_function. */ ! int temp_name_counter; /* Same, but not reset. Local temp variables and global temp variables *************** *** 65,68 **** --- 68,75 ---- extern int spew_debug; + + /* Functions called along with real static constructors and destructors. */ + + tree static_ctors, static_dtors; /* C (and C++) language-specific option variables. */ *************** *** 81,84 **** --- 88,95 ---- int flag_no_asm; + /* Nonzero means don't recognize any extension keywords. */ + + int flag_no_gnu_keywords; + /* Nonzero means don't recognize the non-ANSI builtin functions. */ *************** *** 100,108 **** /* Nonzero means handle `#ident' directives. 0 means ignore them. */ ! int flag_no_ident = 0; ! /* Nonzero means disable GNU extensions. */ ! int flag_ansi = 0; /* Nonzero means do emit exported implementations of functions even if --- 111,120 ---- /* Nonzero means handle `#ident' directives. 0 means ignore them. */ ! int flag_no_ident; ! /* Nonzero means enable obscure ANSI features and disable GNU extensions ! that might cause ANSI-compliant code to be miscompiled. */ ! int flag_ansi; /* Nonzero means do emit exported implementations of functions even if *************** *** 114,118 **** multiple static copies in each file that needs a definition. */ ! int flag_external_templates = 0; /* Nonzero means that the decision to emit or not emit the implementation of a --- 126,130 ---- multiple static copies in each file that needs a definition. */ ! int flag_external_templates; /* Nonzero means that the decision to emit or not emit the implementation of a *************** *** 120,124 **** it is defined. */ ! int flag_alt_external_templates = 0; /* Nonzero means that implicit instantiations will be emitted if needed. */ --- 132,136 ---- it is defined. */ ! int flag_alt_external_templates; /* Nonzero means that implicit instantiations will be emitted if needed. */ *************** *** 136,145 **** /* True if we want to implement vtbvales using "thunks". ! The default is off now, but will be on later. ! Also causes output of vtables to be controlled by whether ! we seen the class's first non-inline virtual function. */ ! int flag_vtable_thunks = 0; /* Nonzero means give string constants the type `const char *' to get extra warnings from them. These warnings will be too numerous --- 148,159 ---- /* True if we want to implement vtbvales using "thunks". ! The default is off now, but will be on later. */ ! ! int flag_vtable_thunks; ! /* True if we want to deal with repository information. */ + int flag_use_repository; + /* Nonzero means give string constants the type `const char *' to get extra warnings from them. These warnings will be too numerous *************** *** 199,203 **** /* Warn if adding () is suggested. */ ! int warn_parentheses = 1; /* Non-zero means warn in function declared in derived class has the --- 213,217 ---- /* Warn if adding () is suggested. */ ! int warn_parentheses; /* Non-zero means warn in function declared in derived class has the *************** *** 216,220 **** int warn_reorder; ! /* Non-zero means warn when sysnthesis behavior differs from Cfront's. */ int warn_synth; --- 230,234 ---- int warn_reorder; ! /* Non-zero means warn when synthesis behavior differs from Cfront's. */ int warn_synth; *************** *** 230,233 **** --- 244,248 ---- argument prototype to mean function takes no arguments. */ + int flag_strict_prototype = 2; int strict_prototype = 1; int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus = 1; *************** *** 302,308 **** int flag_gc; ! /* Controls whether compiler generates 'dossiers' that give run-time type information. */ ! int flag_dossier; /* Nonzero if we wish to output cross-referencing information --- 317,323 ---- int flag_gc; ! /* Controls whether compiler generates 'type descriptor' that give run-time type information. */ ! int flag_rtti; /* Nonzero if we wish to output cross-referencing information *************** *** 320,338 **** and better code can be generated in that case. */ ! int flag_assume_nonnull_objects; /* Nonzero if we want to support huge (> 2^(sizeof(short)*8-1) bytes) objects. */ int flag_huge_objects; /* Nonzero if we want to conserve space in the .o files. We do this by putting uninitialized data and runtime initialized data into ! .common instead of .data at the expense of not flaging multiple definitions. */ int flag_conserve_space; /* Nonzero if we want to obey access control semantics. */ int flag_access_control = 1; /* Table of language-dependent -f options. STRING is the option name. VARIABLE is the address of the variable. --- 335,370 ---- and better code can be generated in that case. */ ! int flag_assume_nonnull_objects = 1; /* Nonzero if we want to support huge (> 2^(sizeof(short)*8-1) bytes) objects. */ + int flag_huge_objects; /* Nonzero if we want to conserve space in the .o files. We do this by putting uninitialized data and runtime initialized data into ! .common instead of .data at the expense of not flagging multiple definitions. */ + int flag_conserve_space; /* Nonzero if we want to obey access control semantics. */ + int flag_access_control = 1; + /* Nonzero if we want to understand the operator names, i.e. 'bitand'. */ + + int flag_operator_names; + + /* Nonzero if we want to check the return value of new and avoid calling + constructors if it is a null pointer. */ + + int flag_check_new; + + /* Nonzero if we want the new ANSI rules for pushing a new scope for `for' + initialization variables. Default to on. */ + + int flag_new_for_scope = 1; + /* Table of language-dependent -f options. STRING is the option name. VARIABLE is the address of the variable. *************** *** 356,360 **** {"stats", &flag_detailed_statistics, 1}, {"this-is-variable", &flag_this_is_variable, 1}, ! {"strict-prototype", &strict_prototypes_lang_cplusplus, 1}, {"all-virtual", &flag_all_virtual, 1}, {"memoize-lookups", &flag_memoize_lookups, 1}, --- 388,392 ---- {"stats", &flag_detailed_statistics, 1}, {"this-is-variable", &flag_this_is_variable, 1}, ! {"strict-prototype", &flag_strict_prototype, 1}, {"all-virtual", &flag_all_virtual, 1}, {"memoize-lookups", &flag_memoize_lookups, 1}, *************** *** 366,370 **** {"enum-int-equiv", &flag_int_enum_equivalence, 1}, {"gc", &flag_gc, 1}, ! {"dossier", &flag_dossier, 1}, {"xref", &flag_gnu_xref, 1}, {"nonnull-objects", &flag_assume_nonnull_objects, 1}, --- 398,402 ---- {"enum-int-equiv", &flag_int_enum_equivalence, 1}, {"gc", &flag_gc, 1}, ! {"rtti", &flag_rtti, 1}, {"xref", &flag_gnu_xref, 1}, {"nonnull-objects", &flag_assume_nonnull_objects, 1}, *************** *** 377,381 **** {"short-temps", &flag_short_temps, 1}, {"access-control", &flag_access_control, 1}, ! {"nonansi-builtins", &flag_no_nonansi_builtin, 0} }; --- 409,418 ---- {"short-temps", &flag_short_temps, 1}, {"access-control", &flag_access_control, 1}, ! {"nonansi-builtins", &flag_no_nonansi_builtin, 0}, ! {"gnu-keywords", &flag_no_gnu_keywords, 0}, ! {"operator-names", &flag_operator_names, 1}, ! {"check-new", &flag_check_new, 1}, ! {"repo", &flag_use_repository, 1}, ! {"for-scope", &flag_new_for_scope, 1} }; *************** *** 390,394 **** if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional")) flag_traditional = 1, dollars_in_ident = 1, flag_writable_strings = 1, ! flag_this_is_variable = 1; /* The +e options are for cfront compatibility. They come in as `-+eN', to kludge around gcc.c's argument handling. */ --- 427,431 ---- if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional")) flag_traditional = 1, dollars_in_ident = 1, flag_writable_strings = 1, ! flag_this_is_variable = 1, flag_new_for_scope = 0; /* The +e options are for cfront compatibility. They come in as `-+eN', to kludge around gcc.c's argument handling. */ *************** *** 443,447 **** flag_gc = 1; /* This must come along for the ride. */ ! flag_dossier = 1; found = 1; } --- 480,484 ---- flag_gc = 1; /* This must come along for the ride. */ ! flag_rtti = 1; found = 1; } *************** *** 450,454 **** flag_gc = 0; /* This must come along for the ride. */ ! flag_dossier = 0; found = 1; } --- 487,491 ---- flag_gc = 0; /* This must come along for the ride. */ ! flag_rtti = 0; found = 1; } *************** *** 467,470 **** --- 504,514 ---- { warning ("-fansi-overloading is no longer meaningful"); + found = 1; + } + else if (!strcmp (p, "repo")) + { + flag_use_repository = 1; + flag_implicit_templates = 0; + found = 1; } else for (j = 0; *************** *** 553,556 **** --- 597,601 ---- warn_switch = setting; warn_format = setting; + warn_parentheses = setting; warn_missing_braces = setting; warn_extern_inline = setting; *************** *** 570,575 **** } else if (!strcmp (p, "-ansi")) ! flag_no_asm = 1, dollars_in_ident = 0, flag_no_nonansi_builtin = 1, ! flag_ansi = 1; #ifdef SPEW_DEBUG /* Undocumented, only ever used when you're invoking cc1plus by hand, since --- 615,620 ---- } else if (!strcmp (p, "-ansi")) ! dollars_in_ident = 0, flag_no_nonansi_builtin = 1, flag_ansi = 1, ! flag_no_gnu_keywords = 1, flag_operator_names = 1; #ifdef SPEW_DEBUG /* Undocumented, only ever used when you're invoking cc1plus by hand, since *************** *** 658,666 **** inform the user. */ void ! warn_if_unknown_interface () { static int already_warned = 0; ! if (++already_warned == 1) ! warning ("templates that are built with -fexternal-templates should be in files that have #pragma interface/implementation"); } --- 703,729 ---- inform the user. */ void ! warn_if_unknown_interface (decl) ! tree decl; { static int already_warned = 0; ! if (already_warned++) ! return; ! ! if (flag_alt_external_templates) ! { ! struct tinst_level *til = tinst_for_decl (); ! int sl = lineno; ! char *sf = input_filename; ! ! lineno = til->line; ! input_filename = til->file; ! cp_warning ("template `%#D' instantiated in file without #pragma interface", ! decl); ! lineno = sl; ! input_filename = sf; ! } ! else ! cp_warning_at ("template `%#D' defined in file without #pragma interface", ! decl); } *************** *** 708,720 **** else if (IS_SIGNATURE(t)) tcode = signature_type_node; - else if (CLASSTYPE_DECLARED_EXCEPTION(t)) - tcode = exception_type_node; ! t = xref_defn_tag(tcode, TYPE_IDENTIFIER(t), NULL_TREE); if (TYPE_CONTEXT(t)) CLASSTYPE_NO_GLOBALIZE(t) = 1; - if (TYPE_LANG_SPECIFIC (t) - && CLASSTYPE_DECLARED_EXCEPTION (t)) - shadow_tag (specs); return NULL_TREE; break; --- 771,778 ---- else if (IS_SIGNATURE(t)) tcode = signature_type_node; ! t = xref_tag (tcode, TYPE_IDENTIFIER (t), NULL_TREE, 0); if (TYPE_CONTEXT(t)) CLASSTYPE_NO_GLOBALIZE(t) = 1; return NULL_TREE; break; *************** *** 727,731 **** tcode = enum_type_node; ! t = xref_defn_tag(tcode, TYPE_IDENTIFIER(t), NULL_TREE); if (TREE_CODE(t) == UNION_TYPE && TYPE_CONTEXT(t)) CLASSTYPE_NO_GLOBALIZE(t) = 1; --- 785,789 ---- tcode = enum_type_node; ! t = xref_tag (tcode, TYPE_IDENTIFIER (t), NULL_TREE, 0); if (TREE_CODE(t) == UNION_TYPE && TYPE_CONTEXT(t)) CLASSTYPE_NO_GLOBALIZE(t) = 1; *************** *** 823,830 **** we may wish to make it special. */ tree type = TREE_VALUE (arg_types); if ((flag_this_is_variable > 0) && (flags == DTOR_FLAG || DECL_CONSTRUCTOR_P (function))) ! type = TYPE_MAIN_VARIANT (type); if (DECL_CONSTRUCTOR_P (function)) --- 881,889 ---- we may wish to make it special. */ tree type = TREE_VALUE (arg_types); + int constp = 1; if ((flag_this_is_variable > 0) && (flags == DTOR_FLAG || DECL_CONSTRUCTOR_P (function))) ! constp = 0; if (DECL_CONSTRUCTOR_P (function)) *************** *** 853,857 **** accidentally complain if someone tries to take its address. */ DECL_REGISTER (parm) = 1; ! if (TYPE_READONLY (type)) TREE_READONLY (parm) = 1; TREE_CHAIN (parm) = last_function_parms; --- 912,916 ---- accidentally complain if someone tries to take its address. */ DECL_REGISTER (parm) = 1; ! if (constp) TREE_READONLY (parm) = 1; TREE_CHAIN (parm) = last_function_parms; *************** *** 929,933 **** #if 0 /* This code is going into the compiler, but currently, it makes ! libg++/src/Interger.cc not compile. The problem is that the nice name winds up going into the symbol table, and conversion operations look for the manged name. */ --- 988,992 ---- #if 0 /* This code is going into the compiler, but currently, it makes ! libg++/src/Integer.cc not compile. The problem is that the nice name winds up going into the symbol table, and conversion operations look for the manged name. */ *************** *** 991,994 **** --- 1050,1054 ---- { tree type = TREE_TYPE (array_expr); + tree p1, p2, i1, i2; if (type == error_mark_node || index_exp == error_mark_node) *************** *** 1013,1038 **** /* Otherwise, create an ARRAY_REF for a pointer or array type. */ - if (TREE_CODE (type) == POINTER_TYPE - || TREE_CODE (type) == ARRAY_TYPE) - return build_array_ref (array_expr, index_exp); - - /* Woops, looks like they did something like `5[a]' instead of `a[5]'. - We don't emit a warning or error for this, since it's allowed - by ARM $8.2.4. */ ! type = TREE_TYPE (index_exp); ! if (TREE_CODE (type) == OFFSET_TYPE ! || TREE_CODE (type) == REFERENCE_TYPE) ! type = TREE_TYPE (type); ! if (TREE_CODE (type) == POINTER_TYPE ! || TREE_CODE (type) == ARRAY_TYPE) ! return build_array_ref (index_exp, array_expr); ! ! /* The expression E1[E2] is identical (by definition) to *((E1)+(E2)). */ ! return build_indirect_ref (build_binary_op (PLUS_EXPR, array_expr, ! index_exp, 1), ! "array indexing"); } --- 1073,1108 ---- /* Otherwise, create an ARRAY_REF for a pointer or array type. */ ! if (TREE_CODE (type) == ARRAY_TYPE) ! p1 = array_expr; ! else ! p1 = build_expr_type_conversion (WANT_POINTER, array_expr, 0); ! if (TREE_CODE (TREE_TYPE (index_exp)) == ARRAY_TYPE) ! p2 = index_exp; ! else ! p2 = build_expr_type_conversion (WANT_POINTER, index_exp, 0); ! ! i1 = build_expr_type_conversion (WANT_INT | WANT_ENUM, array_expr, 0); ! i2 = build_expr_type_conversion (WANT_INT | WANT_ENUM, index_exp, 0); ! ! if ((p1 && i2) && (i1 && p2)) ! error ("ambiguous conversion for array subscript"); ! ! if (p1 && i2) ! array_expr = p1, index_exp = i2; ! else if (i1 && p2) ! array_expr = p2, index_exp = i1; ! else ! { ! cp_error ("invalid types `%T[%T]' for array subscript", ! type, TREE_TYPE (index_exp)); ! return error_mark_node; ! } ! ! if (array_expr == error_mark_node || index_exp == error_mark_node) ! error ("ambiguous conversion for array subscript"); ! return build_array_ref (array_expr, index_exp); } *************** *** 1076,1080 **** } ! /* Deleting a pointer with the value zero is legal and has no effect. */ if (integer_zerop (t)) return build1 (NOP_EXPR, void_type_node, t); --- 1146,1150 ---- } ! /* Deleting a pointer with the value zero is valid and has no effect. */ if (integer_zerop (t)) return build1 (NOP_EXPR, void_type_node, t); *************** *** 1083,1086 **** --- 1153,1158 ---- if (code == POINTER_TYPE) { + #if 0 + /* As of Valley Forge, you can delete a pointer to constant. */ /* You can't delete a pointer to constant. */ if (TREE_READONLY (TREE_TYPE (type))) *************** *** 1089,1092 **** --- 1161,1165 ---- return error_mark_node; } + #endif /* You also can't delete functions. */ if (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) *************** *** 1115,1121 **** integer_two_node, use_global_delete); else ! return build_delete (type, t, integer_three_node, ! LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE, ! use_global_delete); } --- 1188,1207 ---- integer_two_node, use_global_delete); else ! { ! if (IS_AGGR_TYPE (TREE_TYPE (type)) ! && TYPE_GETS_REG_DELETE (TREE_TYPE (type))) ! { ! /* Only do access checking here; we'll be calling op delete ! from the destructor. */ ! tree tmp = build_opfncall (DELETE_EXPR, LOOKUP_NORMAL, t, ! size_zero_node, NULL_TREE); ! if (tmp == error_mark_node) ! return error_mark_node; ! } ! ! return build_delete (type, t, integer_three_node, ! LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE, ! use_global_delete); ! } } *************** *** 1140,1144 **** /* First suss out ctors and dtors. */ ! if (*methods && fn_name == cname) goto got_it; --- 1226,1231 ---- /* First suss out ctors and dtors. */ ! if (*methods ! && (fn_name == cname || fn_name == DECL_NAME (*methods))) goto got_it; *************** *** 1153,1156 **** --- 1240,1268 ---- if (DECL_ASSEMBLER_NAME (function) == DECL_ASSEMBLER_NAME (fndecl)) return; + #if 0 + /* This should work, but causes libg++ to fail + make check-tFix. */ + /* We have to do more extensive argument checking here, as + the name may have been changed by asm("new_name"). */ + if (decls_match (function, fndecl)) + return; + #else + if (DECL_NAME (function) == DECL_NAME (fndecl)) + { + tree p1 = TYPE_ARG_TYPES (TREE_TYPE (function)); + tree p2 = TYPE_ARG_TYPES (TREE_TYPE (fndecl)); + + /* Get rid of the this parameter on functions that become + static. */ + if (DECL_STATIC_FUNCTION_P (fndecl) + && TREE_CODE (TREE_TYPE (function)) == METHOD_TYPE) + p1 = TREE_CHAIN (p1); + + if (comptypes (TREE_TYPE (TREE_TYPE (function)), + TREE_TYPE (TREE_TYPE (fndecl)), 1) + && compparms (p1, p2, 3)) + return; + } + #endif fndecl = DECL_CHAIN (fndecl); } *************** *** 1201,1204 **** --- 1313,1317 ---- register tree value; char *asmspec = 0; + int flags = LOOKUP_ONLYCONVERTING; /* Convert () initializers to = initializers. */ *************** *** 1212,1215 **** --- 1325,1329 ---- init = TREE_OPERAND (declarator, 1); declarator = TREE_OPERAND (declarator, 0); + flags = 0; } *************** *** 1240,1243 **** --- 1354,1368 ---- DECL_CLASS_CONTEXT (value) = current_class_type; CLASSTYPE_LOCAL_TYPEDECLS (current_class_type) = 1; + + /* If we declare a typedef name for something that has no name, + the typedef name is used for linkage. See 7.1.3 p4 94/0158. */ + if (TYPE_NAME (TREE_TYPE (value)) + && TREE_CODE (TYPE_NAME (TREE_TYPE (value))) == TYPE_DECL + && ANON_AGGRNAME_P (TYPE_IDENTIFIER (TREE_TYPE (value)))) + { + TYPE_NAME (TREE_TYPE (value)) = value; + TYPE_STUB_DECL (TREE_TYPE (value)) = value; + } + pushdecl_class_level (value); return value; *************** *** 1320,1324 **** } ! /* The corresponding pop_obstacks is in finish_decl. */ push_obstacks_nochange (); --- 1445,1449 ---- } ! /* The corresponding pop_obstacks is in cp_finish_decl. */ push_obstacks_nochange (); *************** *** 1327,1331 **** /* We cannot call pushdecl here, because that would fill in the value of our TREE_CHAIN. Instead, we ! modify finish_decl to do the right thing, namely, to put this decl out straight away. */ if (TREE_PUBLIC (value)) --- 1452,1456 ---- /* We cannot call pushdecl here, because that would fill in the value of our TREE_CHAIN. Instead, we ! modify cp_finish_decl to do the right thing, namely, to put this decl out straight away. */ if (TREE_PUBLIC (value)) *************** *** 1359,1363 **** DECL_IN_AGGR_P (value) = 1; ! finish_decl (value, init, asmspec_tree, 1); pushdecl_class_level (value); return value; --- 1484,1488 ---- DECL_IN_AGGR_P (value) = 1; ! cp_finish_decl (value, init, asmspec_tree, 1, flags); pushdecl_class_level (value); return value; *************** *** 1366,1373 **** { if (asmspec) ! DECL_ASSEMBLER_NAME (value) = get_identifier (asmspec); if (DECL_INITIAL (value) == error_mark_node) init = error_mark_node; ! finish_decl (value, init, asmspec_tree, 1); DECL_INITIAL (value) = init; DECL_IN_AGGR_P (value) = 1; --- 1491,1503 ---- { if (asmspec) ! { ! /* This must override the asm specifier which was placed ! by grokclassfn. Lay this out fresh. */ ! DECL_RTL (value) = NULL_RTX; ! DECL_ASSEMBLER_NAME (value) = get_identifier (asmspec); ! } if (DECL_INITIAL (value) == error_mark_node) init = error_mark_node; ! cp_finish_decl (value, init, asmspec_tree, 1, flags); DECL_INITIAL (value) = init; DECL_IN_AGGR_P (value) = 1; *************** *** 1384,1388 **** my_friendly_assert (init == NULL_TREE, 193); } ! finish_decl (value, init, asmspec_tree, 1); /* Pass friends back this way. */ --- 1514,1525 ---- my_friendly_assert (init == NULL_TREE, 193); } ! if (asmspec) ! { ! /* This must override the asm specifier which was placed ! by grokclassfn. Lay this out fresh. */ ! DECL_RTL (value) = NULL_RTX; ! DECL_ASSEMBLER_NAME (value) = get_identifier (asmspec); ! } ! cp_finish_decl (value, init, asmspec_tree, 1, flags); /* Pass friends back this way. */ *************** *** 1445,1449 **** return NULL_TREE; } ! finish_decl (value, NULL_TREE, NULL_TREE, 0); if (width != error_mark_node) --- 1582,1586 ---- return NULL_TREE; } ! cp_finish_decl (value, NULL_TREE, NULL_TREE, 0, 0); if (width != error_mark_node) *************** *** 1637,1641 **** } ! finish_decl (decl, NULL_TREE, NULL_TREE, 0); /* If this declaration is common to another declaration --- 1774,1778 ---- } ! cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0, 0); /* If this declaration is common to another declaration *************** *** 1824,1828 **** /* We do need to push the scope in this case, since CTYPE helps ! determine subsequent intializers (i.e., Foo::Bar x = foo_enum_1;). */ push_nested_class (ctype, 3); --- 1961,1965 ---- /* We do need to push the scope in this case, since CTYPE helps ! determine subsequent initializers (i.e., Foo::Bar x = foo_enum_1;). */ push_nested_class (ctype, 3); *************** *** 1831,1839 **** } ! void cplus_decl_attributes (decl, attributes) ! tree decl, attributes; { ! if (decl && decl != void_type_node) ! decl_attributes (decl, attributes); } --- 1968,1985 ---- } ! void ! cplus_decl_attributes (decl, attributes, prefix_attributes) ! tree decl, attributes, prefix_attributes; { ! if (decl == NULL_TREE || decl == void_type_node) ! return; ! ! if (TREE_CODE (decl) == TEMPLATE_DECL) ! decl = DECL_TEMPLATE_RESULT (decl); ! ! decl_attributes (decl, attributes, prefix_attributes); ! ! if (TREE_CODE (decl) == TYPE_DECL) ! SET_IDENTIFIER_TYPE_VALUE (DECL_NAME (decl), TREE_TYPE (decl)); } *************** *** 1888,1949 **** setup_vtbl_ptr () { ! extern rtx base_init_insns; ! if (base_init_insns == 0 && DECL_CONSTRUCTOR_P (current_function_decl)) emit_base_init (current_class_type, 0); - - #if 0 - /* This has something a little wrong with it. - - On a sun4, code like: - - be L6 - ld [%i0],%o1 - - is generated, when the below is used when -O4 is given. The delay - slot it filled with an instruction that is safe, when this isn't - used, like in: - - be L6 - sethi %hi(LC1),%o0 - ld [%i0],%o1 - - on code like: - - struct A { - virtual void print() { printf("xxx"); } - void f(); - }; - - void A::f() { - if (this) { - print(); - } else { - printf("0"); - } - } - - And that is why this is disabled for now. (mrs) - */ - - if ((flag_this_is_variable & 1) == 0 - && optimize - && current_class_type - && CLASSTYPE_VSIZE (current_class_type) - && ! DECL_STATIC_FUNCTION_P (current_function_decl)) - { - tree vfield = build_vfield_ref (C_C_D, current_class_type); - current_vtable_decl = CLASSTYPE_VTBL_PTR (current_class_type); - DECL_RTL (current_vtable_decl) = 0; - DECL_INITIAL (current_vtable_decl) = error_mark_node; - /* Have to cast the initializer, since it may have come from a - more base class then we ascribe CURRENT_VTABLE_DECL to be. */ - finish_decl (current_vtable_decl, convert_force (TREE_TYPE (current_vtable_decl), vfield), 0, 0); - current_vtable_decl = build_indirect_ref (current_vtable_decl, NULL_PTR); - } - else - #endif - current_vtable_decl = NULL_TREE; } --- 2034,2042 ---- setup_vtbl_ptr () { ! extern rtx base_init_expr; ! if (base_init_expr == 0 && DECL_CONSTRUCTOR_P (current_function_decl)) emit_base_init (current_class_type, 0); } *************** *** 1953,1959 **** --- 2046,2055 ---- tree decl; { + decl = DECL_MAIN_VARIANT (decl); if (DECL_SAVED_INLINE (decl)) return; + my_friendly_assert (TREE_PERMANENT (decl), 363); DECL_SAVED_INLINE (decl) = 1; + #if 0 if (DECL_PENDING_INLINE_INFO (decl) != 0 && ! DECL_PENDING_INLINE_INFO (decl)->deja_vu) *************** *** 1975,1978 **** --- 2071,2075 ---- DECL_PENDING_INLINE_INFO (decl) = 0; } + #endif saved_inlines = perm_tree_cons (NULL_TREE, decl, saved_inlines); } *************** *** 1998,2002 **** char buf[sizeof (AUTO_TEMP_FORMAT) + 20]; tree decl; ! int toplev = global_bindings_p (); push_obstacks_nochange (); --- 2095,2099 ---- char buf[sizeof (AUTO_TEMP_FORMAT) + 20]; tree decl; ! int toplev = toplevel_bindings_p (); push_obstacks_nochange (); *************** *** 2110,2114 **** can hold them all. */ if (main_decl == NULL_TREE ! && simple_cst_equal (DECL_SIZE (decl), DECL_SIZE (anon_union_decl))) { main_decl = decl; --- 2207,2212 ---- can hold them all. */ if (main_decl == NULL_TREE ! && 1 == simple_cst_equal (DECL_SIZE (decl), ! DECL_SIZE (anon_union_decl))) { main_decl = decl; *************** *** 2131,2135 **** if (main_decl) { ! make_decl_rtl (main_decl, 0, global_bindings_p ()); DECL_RTL (anon_union_decl) = DECL_RTL (main_decl); } --- 2229,2233 ---- if (main_decl) { ! make_decl_rtl (main_decl, 0, toplevel_bindings_p ()); DECL_RTL (anon_union_decl) = DECL_RTL (main_decl); } *************** *** 2171,2175 **** --- 2269,2275 ---- && TREE_CHAIN (init) == NULL_TREE) { + #if 0 if (empty_table == NULL_TREE) + #endif { empty_table = get_temp_name (atype, 1); *************** *** 2180,2184 **** asmspec = build_string (IDENTIFIER_LENGTH (DECL_NAME (empty_table)), IDENTIFIER_POINTER (DECL_NAME (empty_table))); ! finish_decl (empty_table, init, asmspec, 0); } is_empty = 1; --- 2280,2284 ---- asmspec = build_string (IDENTIFIER_LENGTH (DECL_NAME (empty_table)), IDENTIFIER_POINTER (DECL_NAME (empty_table))); ! cp_finish_decl (empty_table, NULL_TREE, asmspec, 0, 0); } is_empty = 1; *************** *** 2218,2222 **** } ! finish_decl (decl, init, asmspec, 0); return decl; } --- 2318,2322 ---- } ! cp_finish_decl (decl, NULL_TREE, asmspec, 0, 0); return decl; } *************** *** 2348,2354 **** tree entries = TREE_CHAIN (CONSTRUCTOR_ELTS (DECL_INITIAL (decl))); - if (flag_dossier) - entries = TREE_CHAIN (entries); - for (; entries; entries = TREE_CHAIN (entries)) { --- 2448,2451 ---- *************** *** 2361,2370 **** if (flag_vtable_thunks) fnaddr = TREE_VALUE (entries); ! TREE_OPERAND (fnaddr, 0) = abort_fndecl; } } } ! /* Set TREE_PUBLIC and/or TREE_EXTERN on the vtable DECL, based on TYPE and other static flags. --- 2458,2468 ---- if (flag_vtable_thunks) fnaddr = TREE_VALUE (entries); ! TREE_OPERAND (fnaddr, 0) = fn = abort_fndecl; } + assemble_external (fn); } } ! /* Set TREE_PUBLIC and/or DECL_EXTERN on the vtable DECL, based on TYPE and other static flags. *************** *** 2373,2393 **** void ! import_export_vtable (decl, type) ! tree decl, type; { ! if (write_virtuals >= 2 ! || CLASSTYPE_TEMPLATE_INSTANTIATION (type)) ! { ! if (CLASSTYPE_INTERFACE_KNOWN (type)) ! { ! TREE_PUBLIC (decl) = 1; ! DECL_EXTERNAL (decl) = ! CLASSTYPE_VTABLE_NEEDS_WRITING (type); ! } ! } ! else if (write_virtuals != 0) { TREE_PUBLIC (decl) = 1; if (write_virtuals < 0) DECL_EXTERNAL (decl) = 1; } } --- 2471,2533 ---- void ! import_export_vtable (decl, type, final) ! tree decl, type; ! int final; { ! if (DECL_INTERFACE_KNOWN (decl)) ! return; ! ! /* +e0 or +e1 */ ! if (write_virtuals < 2 && write_virtuals != 0) { TREE_PUBLIC (decl) = 1; if (write_virtuals < 0) DECL_EXTERNAL (decl) = 1; + DECL_INTERFACE_KNOWN (decl) = 1; + } + else if (CLASSTYPE_INTERFACE_KNOWN (type)) + { + TREE_PUBLIC (decl) = 1; + DECL_EXTERNAL (decl) = ! CLASSTYPE_VTABLE_NEEDS_WRITING (type); + DECL_INTERFACE_KNOWN (decl) = 1; + } + else + { + /* We can only wait to decide if we have real non-inline virtual + functions in our class, or if we come from a template. */ + + int found = CLASSTYPE_TEMPLATE_INSTANTIATION (type); + + if (! found && ! final) + { + tree method; + for (method = CLASSTYPE_METHODS (type); method != NULL_TREE; + method = DECL_NEXT_METHOD (method)) + if (DECL_VINDEX (method) != NULL_TREE + && ! DECL_THIS_INLINE (method) + && ! DECL_ABSTRACT_VIRTUAL_P (method)) + { + found = 1; + break; + } + } + + if (final || ! found) + { + #ifdef ASSEMBLE_EXTERNAL + if (TREE_PUBLIC (decl)) + cp_error ("all virtual functions redeclared inline"); + #endif + if (SUPPORTS_WEAK) + DECL_WEAK (decl) = 1; + else + TREE_PUBLIC (decl) = 0; + DECL_EXTERNAL (decl) = 0; + } + else + { + TREE_PUBLIC (decl) = 1; + DECL_EXTERNAL (decl) = 1; + } } } *************** *** 2408,2419 **** static void ! finish_vtable_vardecl (prev, vars) tree prev, vars; { tree ctype = DECL_CONTEXT (vars); import_export_template (ctype); - import_export_vtable (vars, ctype); ! if (flag_vtable_thunks && !CLASSTYPE_INTERFACE_KNOWN (ctype)) { tree method; --- 2548,2559 ---- static void ! finish_prevtable_vardecl (prev, vars) tree prev, vars; { tree ctype = DECL_CONTEXT (vars); import_export_template (ctype); ! if (CLASSTYPE_INTERFACE_UNKNOWN (ctype) && TYPE_VIRTUAL_P (ctype) ! && ! CLASSTYPE_TEMPLATE_INSTANTIATION (ctype)) { tree method; *************** *** 2421,2431 **** method = DECL_NEXT_METHOD (method)) { ! if (DECL_VINDEX (method) != NULL_TREE && !DECL_SAVED_INSNS (method) && !DECL_ABSTRACT_VIRTUAL_P (method)) { SET_CLASSTYPE_INTERFACE_KNOWN (ctype); CLASSTYPE_INTERFACE_ONLY (ctype) = DECL_EXTERNAL (method); - TREE_PUBLIC (vars) = 1; - DECL_EXTERNAL (vars) = DECL_EXTERNAL (method); break; } --- 2561,2571 ---- method = DECL_NEXT_METHOD (method)) { ! if (DECL_VINDEX (method) != NULL_TREE ! && !DECL_THIS_INLINE (method) && !DECL_ABSTRACT_VIRTUAL_P (method)) { SET_CLASSTYPE_INTERFACE_KNOWN (ctype); + CLASSTYPE_VTABLE_NEEDS_WRITING (ctype) = ! DECL_EXTERNAL (method); CLASSTYPE_INTERFACE_ONLY (ctype) = DECL_EXTERNAL (method); break; } *************** *** 2433,2456 **** } if (write_virtuals >= 0 && ! DECL_EXTERNAL (vars) && (TREE_PUBLIC (vars) || TREE_USED (vars))) { ! extern tree the_null_vtable_entry; ! ! /* Stuff this virtual function table's size into ! `pfn' slot of `the_null_vtable_entry'. */ ! tree nelts = array_type_nelts (TREE_TYPE (vars)); ! if (flag_vtable_thunks) ! TREE_VALUE (CONSTRUCTOR_ELTS (DECL_INITIAL (vars))) = nelts; ! else ! SET_FNADDR_FROM_VTABLE_ENTRY (the_null_vtable_entry, nelts); ! /* Kick out the dossier before writing out the vtable. */ ! if (flag_dossier) ! rest_of_decl_compilation (TREE_OPERAND (FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (TREE_CHAIN (CONSTRUCTOR_ELTS (DECL_INITIAL (vars))))), 0), 0, 1, 1); /* Write it out. */ mark_vtable_entries (vars); if (TREE_TYPE (DECL_INITIAL (vars)) == 0) ! store_init_value (vars, DECL_INITIAL (vars)); #ifdef DWARF_DEBUGGING_INFO --- 2573,2613 ---- } + import_export_vtable (vars, ctype, 1); + + /* We cannot use TREE_USED here, as it may be set by the expanding of a + ctor that is used to build a global object. The long term plan is to + make the TD entries statically initialized and move this to + finish_vtable_vardecl time. */ + if (flag_rtti && write_virtuals >= 0 + && ! DECL_EXTERNAL (vars) && (TREE_PUBLIC (vars) || 1 || TREE_USED (vars))) + { + /* Kick out the type descriptor before we dump out global + initializers, as they are initialized at run time and + we have to find them when we scan for things that need initialized + at the top level. */ + build_t_desc (ctype, 1); + } + } + + static void + finish_vtable_vardecl (prev, vars) + tree prev, vars; + { if (write_virtuals >= 0 && ! DECL_EXTERNAL (vars) && (TREE_PUBLIC (vars) || TREE_USED (vars))) { ! #if 0 ! /* The long term plan it to make the TD entries statically initialized, ! have the entries built and emitted here. When that happens, this ! can be enabled, and the other call to build_t_desc removed. */ ! /* Kick out the type descriptor before writing out the vtable. */ ! if (flag_rtti) ! build_t_desc (DECL_CONTEXT (vars), 1); ! #endif /* Write it out. */ mark_vtable_entries (vars); if (TREE_TYPE (DECL_INITIAL (vars)) == 0) ! store_init_value (vars, DECL_INITIAL (vars)); #ifdef DWARF_DEBUGGING_INFO *************** *** 2484,2493 **** rest_of_decl_compilation (vars, NULL_PTR, 1, 1); } ! else if (TREE_USED (vars) && flag_vtable_thunks) ! assemble_external (vars); /* We know that PREV must be non-zero here. */ TREE_CHAIN (prev) = TREE_CHAIN (vars); } void walk_vtables (typedecl_fn, vardecl_fn) --- 2641,2660 ---- rest_of_decl_compilation (vars, NULL_PTR, 1, 1); } ! else if (! TREE_USED (vars)) ! /* We don't know what to do with this one yet. */ ! return; ! /* We know that PREV must be non-zero here. */ TREE_CHAIN (prev) = TREE_CHAIN (vars); } + static void + prune_vtable_vardecl (prev, vars) + tree prev, vars; + { + /* We know that PREV must be non-zero here. */ + TREE_CHAIN (prev) = TREE_CHAIN (vars); + } + void walk_vtables (typedecl_fn, vardecl_fn) *************** *** 2501,2517 **** register tree type = TREE_TYPE (vars); ! if (TREE_CODE (vars) == TYPE_DECL ! && type != error_mark_node ! && TYPE_LANG_SPECIFIC (type) ! && CLASSTYPE_VSIZE (type)) { ! if (typedecl_fn) (*typedecl_fn) (prev, vars); } ! else if (TREE_CODE (vars) == VAR_DECL && DECL_VIRTUAL_P (vars)) { ! if (vardecl_fn) (*vardecl_fn) (prev, vars); } ! else ! prev = vars; } } --- 2668,2687 ---- register tree type = TREE_TYPE (vars); ! if (TREE_CODE (vars) == VAR_DECL && DECL_VIRTUAL_P (vars)) { ! if (vardecl_fn) (*vardecl_fn) (prev, vars); ! ! if (prev && TREE_CHAIN (prev) != vars) ! continue; } ! else if (TREE_CODE (vars) == TYPE_DECL ! && type != error_mark_node ! && TYPE_LANG_SPECIFIC (type) ! && CLASSTYPE_VSIZE (type)) { ! if (typedecl_fn) (*typedecl_fn) (prev, vars); } ! ! prev = vars; } } *************** *** 2566,2579 **** tree decl; { ! if (TREE_PUBLIC (decl)) return; ! /* If an explicit instantiation doesn't have TREE_PUBLIC set, it was with ! 'extern'. */ ! if (DECL_EXPLICIT_INSTANTIATION (decl) ! || (DECL_IMPLICIT_INSTANTIATION (decl) && ! flag_implicit_templates)) { ! TREE_PUBLIC (decl) = 1; ! DECL_EXTERNAL (decl) = 1; } else if (DECL_FUNCTION_MEMBER_P (decl)) --- 2736,2753 ---- tree decl; { ! if (DECL_INTERFACE_KNOWN (decl)) return; ! if (DECL_TEMPLATE_INSTANTIATION (decl)) { ! if (DECL_IMPLICIT_INSTANTIATION (decl) && flag_implicit_templates) ! { ! if (SUPPORTS_WEAK) ! DECL_WEAK (decl) = 1; ! else ! TREE_PUBLIC (decl) = 0; ! } ! else ! DECL_NOT_REALLY_EXTERN (decl) = 0; } else if (DECL_FUNCTION_MEMBER_P (decl)) *************** *** 2582,2593 **** if (CLASSTYPE_INTERFACE_KNOWN (ctype)) { ! TREE_PUBLIC (decl) = 1; ! DECL_EXTERNAL (decl) ! = (CLASSTYPE_INTERFACE_ONLY (ctype) ! || (DECL_INLINE (decl) && ! flag_implement_inlines)); } } } ! extern int parse_time, varconst_time; --- 2756,2778 ---- if (CLASSTYPE_INTERFACE_KNOWN (ctype)) { ! DECL_NOT_REALLY_EXTERN (decl) ! = ! (CLASSTYPE_INTERFACE_ONLY (ctype) ! || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines)); } + else if (SUPPORTS_WEAK) + DECL_WEAK (decl) = 1; + else + TREE_PUBLIC (decl) = 0; } + else if (DECL_C_STATIC (decl)) + TREE_PUBLIC (decl) = 0; + else if (SUPPORTS_WEAK) + DECL_WEAK (decl) = 1; + else + TREE_PUBLIC (decl) = 0; + + DECL_INTERFACE_KNOWN (decl) = 1; } ! extern int parse_time, varconst_time; *************** *** 2607,2613 **** tree fnname; ! tree vars = static_aggregates; int needs_cleaning = 0, needs_messing_up = 0; - int have_exception_handlers = build_exception_table (); if (flag_detailed_statistics) --- 2792,2797 ---- tree fnname; ! tree vars; int needs_cleaning = 0, needs_messing_up = 0; if (flag_detailed_statistics) *************** *** 2624,2631 **** push_lang_context (lang_name_c); ! /* Set up the name of the file-level functions we may need. */ ! /* Use a global object (which is already required to be unique over ! the program) rather than the file name (which imposes extra ! constraints). -- Raeburn@MIT.EDU, 10 Jan 1990. */ /* See if we really need the hassle. */ --- 2808,2853 ---- push_lang_context (lang_name_c); ! /* Otherwise, GDB can get confused, because in only knows ! about source for LINENO-1 lines. */ ! lineno -= 1; ! ! interface_unknown = 1; ! interface_only = 0; ! ! #if 1 ! /* The reason for pushing garbage onto the global_binding_level is to ! ensure that we can slice out _DECLs which pertain to virtual function ! tables. If the last thing pushed onto the global_binding_level was a ! virtual function table, then slicing it out would slice away all the ! decls (i.e., we lose the head of the chain). ! ! There are several ways of getting the same effect, from changing the ! way that iterators over the chain treat the elements that pertain to ! virtual function tables, moving the implementation of this code to ! decl.c (where we can manipulate global_binding_level directly), ! popping the garbage after pushing it and slicing away the vtable ! stuff, or just leaving it alone. */ ! ! /* Make last thing in global scope not be a virtual function table. */ ! #if 0 /* not yet, should get fixed properly later */ ! vars = make_type_decl (get_identifier (" @%$#@!"), integer_type_node); ! #else ! vars = build_decl (TYPE_DECL, get_identifier (" @%$#@!"), integer_type_node); ! #endif ! DECL_IGNORED_P (vars) = 1; ! SET_DECL_ARTIFICIAL (vars); ! pushdecl (vars); ! #endif ! ! /* Walk to mark the inline functions we need, then output them so ! that we can pick up any other tdecls that those routines need. */ ! walk_vtables ((void (*)())0, finish_prevtable_vardecl); ! ! vars = static_aggregates; ! ! if (static_ctors || vars || might_have_exceptions_p ()) ! needs_messing_up = 1; ! if (static_dtors) ! needs_cleaning = 1; /* See if we really need the hassle. */ *************** *** 2644,2654 **** vars = TREE_CHAIN (vars); } if (needs_cleaning == 0) goto mess_up; - /* Otherwise, GDB can get confused, because in only knows - about source for LINENO-1 lines. */ - lineno -= 1; - fnname = get_file_function_name ('D'); start_function (void_list_node, build_parse_node (CALL_EXPR, fnname, void_list_node, NULL_TREE), 0, 0); --- 2866,2873 ---- vars = TREE_CHAIN (vars); } + if (needs_cleaning == 0) goto mess_up; fnname = get_file_function_name ('D'); start_function (void_list_node, build_parse_node (CALL_EXPR, fnname, void_list_node, NULL_TREE), 0, 0); *************** *** 2663,2667 **** /* These must be done in backward order to destroy, in which they happen to be! */ ! while (vars) { tree decl = TREE_VALUE (vars); --- 2882,2886 ---- /* These must be done in backward order to destroy, in which they happen to be! */ ! for (vars = static_aggregates; vars; vars = TREE_CHAIN (vars)) { tree decl = TREE_VALUE (vars); *************** *** 2687,2698 **** expand_end_cond (); } - vars = TREE_CHAIN (vars); } expand_end_bindings (getdecls(), 1, 0); poplevel (1, 0, 0); pop_momentary (); ! finish_function (lineno, 0); assemble_destructor (IDENTIFIER_POINTER (fnname)); --- 2906,2920 ---- expand_end_cond (); } } + for (; static_dtors; static_dtors = TREE_CHAIN (static_dtors)) + expand_expr_stmt (build_function_call (TREE_VALUE (static_dtors), + NULL_TREE)); + expand_end_bindings (getdecls(), 1, 0); poplevel (1, 0, 0); pop_momentary (); ! finish_function (lineno, 0, 0); assemble_destructor (IDENTIFIER_POINTER (fnname)); *************** *** 2703,2707 **** /* Must do this while we think we are at the top level. */ vars = nreverse (static_aggregates); ! if (vars != NULL_TREE || have_exception_handlers) { fnname = get_file_function_name ('I'); --- 2925,2929 ---- /* Must do this while we think we are at the top level. */ vars = nreverse (static_aggregates); ! if (needs_messing_up) { fnname = get_file_function_name ('I'); *************** *** 2715,2719 **** expand_start_bindings (0); ! if (have_exception_handlers) register_exception_table (); --- 2937,2941 ---- expand_start_bindings (0); ! if (might_have_exceptions_p ()) register_exception_table (); *************** *** 2744,2750 **** /* 9.5p5: The initializer of a static member of a class has ! the same acess rights as a member function. */ DECL_CLASS_CONTEXT (current_function_decl) = DECL_CONTEXT (decl); if (init) { --- 2966,2974 ---- /* 9.5p5: The initializer of a static member of a class has ! the same access rights as a member function. */ DECL_CLASS_CONTEXT (current_function_decl) = DECL_CONTEXT (decl); + DECL_STATIC_FUNCTION_P (current_function_decl) = 1; + #if 0 if (init) { *************** *** 2765,2769 **** init = NULL_TREE; } - #if 0 else if (TREE_TYPE (decl) == TREE_TYPE (init)) { --- 2989,2992 ---- *************** *** 2778,2787 **** #endif /* 1 */ } - #endif /* 0 */ } } if (IS_AGGR_TYPE (TREE_TYPE (decl)) || TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) ! expand_aggr_init (decl, init, 0); else if (TREE_CODE (init) == TREE_VEC) { --- 3001,3010 ---- #endif /* 1 */ } } } + #endif /* 0 */ if (IS_AGGR_TYPE (TREE_TYPE (decl)) || TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) ! expand_aggr_init (decl, init, 0, 0); else if (TREE_CODE (init) == TREE_VEC) { *************** *** 2804,2808 **** expand_expr (decl, const0_rtx, VOIDmode, 0); free_temp_slots (); ! expand_aggr_init (build_indirect_ref (decl, NULL_PTR), init, 0); } } --- 3027,3031 ---- expand_expr (decl, const0_rtx, VOIDmode, 0); free_temp_slots (); ! expand_aggr_init (build_indirect_ref (decl, NULL_PTR), init, 0, 0); } } *************** *** 2815,2826 **** } expand_end_bindings (getdecls(), 1, 0); poplevel (1, 0, 0); pop_momentary (); ! finish_function (lineno, 0); assemble_constructor (IDENTIFIER_POINTER (fnname)); } /* Done with C language context needs. */ pop_lang_context (); --- 3038,3055 ---- } + for (; static_ctors; static_ctors = TREE_CHAIN (static_ctors)) + expand_expr_stmt (build_function_call (TREE_VALUE (static_ctors), + NULL_TREE)); + expand_end_bindings (getdecls(), 1, 0); poplevel (1, 0, 0); pop_momentary (); ! finish_function (lineno, 0, 0); assemble_constructor (IDENTIFIER_POINTER (fnname)); } + permanent_allocation (1); + /* Done with C language context needs. */ pop_lang_context (); *************** *** 2844,2947 **** start_time = get_run_time (); - /* Now delete from the chain of variables all virtual function tables. - We output them all ourselves, because each will be treated specially. */ - - #if 1 - /* The reason for pushing garbage onto the global_binding_level is to - ensure that we can slice out _DECLs which pertain to virtual function - tables. If the last thing pushed onto the global_binding_level was a - virtual function table, then slicing it out would slice away all the - decls (i.e., we lose the head of the chain). - - There are several ways of getting the same effect, from changing the - way that iterators over the chain treat the elements that pertain to - virtual function tables, moving the implementation of this code to - decl.c (where we can manipulate global_binding_level directly), - popping the garbage after pushing it and slicing away the vtable - stuff, or just leaving it alone. */ - - /* Make last thing in global scope not be a virtual function table. */ - #if 0 /* not yet, should get fixed properly later */ - vars = make_type_decl (get_identifier (" @%$#@!"), integer_type_node); - #else - vars = build_decl (TYPE_DECL, get_identifier (" @%$#@!"), integer_type_node); - #endif - DECL_IGNORED_P (vars) = 1; - SET_DECL_ARTIFICIAL (vars); - pushdecl (vars); - #endif - - walk_vtables ((void (*)())0, finish_vtable_vardecl); if (flag_handle_signatures) walk_sigtables ((void (*)())0, finish_sigtable_vardecl); ! for (vars = getdecls (); vars; vars = TREE_CHAIN (vars)) { ! if (TREE_CODE (vars) == THUNK_DECL) ! emit_thunk (vars); } { ! int reconsider = 0; /* More may be referenced; check again */ ! tree delayed = NULL_TREE; /* These might be referenced later */ ! /* Now write out inline functions which had their addresses taken and ! which were not declared virtual and which were not declared `extern ! inline'. */ ! while (saved_inlines) { ! tree decl = TREE_VALUE (saved_inlines); ! saved_inlines = TREE_CHAIN (saved_inlines); ! /* Redefinition of a member function can cause DECL_SAVED_INSNS to be ! 0; don't crash. */ ! if (TREE_ASM_WRITTEN (decl) || DECL_SAVED_INSNS (decl) == 0) ! continue; ! import_export_inline (decl); ! if (TREE_PUBLIC (decl) ! || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) ! || flag_keep_inline_functions) { ! if (DECL_EXTERNAL (decl)) ! assemble_external (decl); ! else { ! reconsider = 1; ! temporary_allocation (); ! output_inline_function (decl); ! permanent_allocation (1); } - } - else if (TREE_USED (decl) - || TREE_USED (DECL_ASSEMBLER_NAME (decl))) - delayed = tree_cons (NULL_TREE, decl, delayed); - } ! if (reconsider && delayed) ! { ! while (reconsider) ! { ! tree place; ! reconsider = 0; ! for (place = delayed; place; place = TREE_CHAIN (place)) { ! tree decl = TREE_VALUE (place); ! if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) ! && ! TREE_ASM_WRITTEN (decl)) { ! if (DECL_EXTERNAL (decl)) ! assemble_external (decl); ! else ! { ! reconsider = 1; ! temporary_allocation (); ! output_inline_function (decl); ! permanent_allocation (1); ! } } } } } } if (write_virtuals == 2) { --- 3073,3179 ---- start_time = get_run_time (); if (flag_handle_signatures) walk_sigtables ((void (*)())0, finish_sigtable_vardecl); ! for (fnname = saved_inlines; fnname; fnname = TREE_CHAIN (fnname)) { ! tree decl = TREE_VALUE (fnname); ! import_export_inline (decl); ! if (DECL_ARTIFICIAL (decl) && ! DECL_INITIAL (decl) ! && TREE_PUBLIC (decl) && ! DECL_WEAK (decl) ! && DECL_NOT_REALLY_EXTERN (decl)) ! synthesize_method (decl); } + /* Now write out inline functions which had their addresses taken and + which were not declared virtual and which were not declared `extern + inline'. */ { ! int reconsider = 1; /* More may be referenced; check again */ ! while (reconsider) { ! tree last = saved_inlines = tree_cons (NULL_TREE, NULL_TREE, ! saved_inlines); ! tree last_head = last; ! tree place = TREE_CHAIN (saved_inlines); ! reconsider = 0; ! ! walk_vtables ((void (*)())0, finish_vtable_vardecl); ! ! for (; place; place = TREE_CHAIN (place)) { ! tree decl = TREE_VALUE (place); ! ! /* Slice out the empty elements put in just above in the ! previous reconsidering. */ ! if (decl == NULL_TREE) { ! TREE_CHAIN (last) = TREE_CHAIN (place); ! continue; } ! if (DECL_ARTIFICIAL (decl) && ! DECL_INITIAL (decl)) ! { ! if (TREE_USED (decl)) ! { ! synthesize_method (decl); ! if (TREE_ASM_WRITTEN (decl)) ! reconsider = 1; ! } ! else ! { ! last = place; ! continue; ! } ! } ! ! if (TREE_ASM_WRITTEN (decl) || DECL_SAVED_INSNS (decl) == 0) { ! TREE_CHAIN (last) = TREE_CHAIN (place); ! continue; ! } ! ! if ((TREE_PUBLIC (decl) && ! DECL_WEAK (decl)) ! || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) ! || flag_keep_inline_functions) ! { ! TREE_CHAIN (last) = TREE_CHAIN (place); ! ! if (DECL_NOT_REALLY_EXTERN (decl)) { ! DECL_EXTERNAL (decl) = 0; ! reconsider = 1; ! temporary_allocation (); ! output_inline_function (decl); ! permanent_allocation (1); } + + continue; } + + last = place; } } } + /* Now delete from the chain of variables all virtual function tables. + We output them all ourselves, because each will be treated specially. */ + + walk_vtables ((void (*)())0, prune_vtable_vardecl); + + for (vars = getdecls (); vars; vars = TREE_CHAIN (vars)) + { + if (TREE_CODE (vars) == THUNK_DECL) + emit_thunk (vars); + else if (TREE_CODE (vars) == FUNCTION_DECL + && ! DECL_INTERFACE_KNOWN (vars) + && DECL_C_STATIC (vars)) + TREE_PUBLIC (vars) = 0; + } + + if (might_have_exceptions_p ()) + emit_exception_table (); + if (write_virtuals == 2) { *************** *** 2957,2961 **** } ! permanent_allocation (1); this_time = get_run_time (); parse_time -= this_time - start_time; --- 3189,3194 ---- } ! finish_repo (); ! this_time = get_run_time (); parse_time -= this_time - start_time; *************** *** 3030,3034 **** type = groktypename (TREE_VALUE (TREE_OPERAND (decl, 1))); decl = TREE_OPERAND (decl, 0); ! expr = build_c_cast (type, expr); } --- 3263,3267 ---- type = groktypename (TREE_VALUE (TREE_OPERAND (decl, 1))); decl = TREE_OPERAND (decl, 0); ! expr = build_c_cast (type, expr, 0); } *************** *** 3076,3081 **** tree type, decl; { ! decl = build_tree_list (NULL_TREE, reparse_decl_as_expr1 (decl)); ! return build_functional_cast (type, decl); } --- 3309,3317 ---- tree type, decl; { ! decl = reparse_decl_as_expr1 (decl); ! if (type) ! return build_functional_cast (type, build_tree_list (NULL_TREE, decl)); ! else ! return decl; } *************** *** 3154,3156 **** --- 3390,3466 ---- return value; + } + + tree current_namespace; + + /* Get the inner part of a namespace id. It doesn't have any prefix, nor + postfix. Returns 0 if in global namespace. */ + tree + get_namespace_id () + { + tree x = current_namespace; + if (x) + x = TREE_PURPOSE (x); + return x; + } + + /* Build up a DECL_ASSEMBLER_NAME for NAME in the current namespace. */ + tree + current_namespace_id (name) + tree name; + { + tree old_id = get_namespace_id (); + char *buf; + + /* Global names retain old encoding. */ + if (! old_id) + return name; + + buf = (char *) alloca (8 + IDENTIFIER_LENGTH (old_id) + + IDENTIFIER_LENGTH (name)); + sprintf (buf, "__ns_%s_%s", IDENTIFIER_POINTER (old_id), + IDENTIFIER_POINTER (name)); + return get_identifier (buf); + } + + void + do_namespace_alias (alias, namespace) + tree alias, namespace; + { + } + + tree + do_toplevel_using_decl (decl) + tree decl; + { + if (decl == NULL_TREE || decl == error_mark_node) + return; + + if (TREE_CODE (decl) == SCOPE_REF) + decl = resolve_scope_to_name (NULL_TREE, decl); + + /* Is this the right way to do an id list? */ + if (TREE_CODE (decl) != TREE_LIST) + { + pushdecl (decl); + } + else + while (decl) + { + pushdecl (TREE_VALUE (decl)); + decl = TREE_CHAIN (decl); + } + } + + tree + do_class_using_decl (decl) + tree decl; + { + return error_mark_node; + } + + void + do_using_directive (namespace) + tree namespace; + { } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/edsel.c gcc-2.7.0/cp/edsel.c *** gcc-2.6.3/cp/edsel.c Wed Feb 23 20:03:48 1994 --- gcc-2.7.0/cp/edsel.c Thu Jun 15 08:21:29 1995 *************** *** 16,20 **** 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 "config.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/errfn.c gcc-2.7.0/cp/errfn.c *** gcc-2.6.3/cp/errfn.c Thu Aug 18 16:47:45 1994 --- gcc-2.7.0/cp/errfn.c Thu Jun 15 08:21:45 1995 *************** *** 17,21 **** 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 "config.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/error.c gcc-2.7.0/cp/error.c *** gcc-2.6.3/cp/error.c Mon Sep 26 16:11:17 1994 --- gcc-2.7.0/cp/error.c Thu Jun 15 08:22:04 1995 *************** *** 17,21 **** 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 "config.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 276,280 **** } ! /* kludge around wierd behavior on g++.brendan/line1.C */ if (TREE_CODE (name) != IDENTIFIER_NODE) name = DECL_NAME (name); --- 277,281 ---- } ! /* kludge around weird behavior on g++.brendan/line1.C */ if (TREE_CODE (name) != IDENTIFIER_NODE) name = DECL_NAME (name); *************** *** 586,590 **** case VAR_DECL: ! if (VTABLE_NAME_P (DECL_NAME (t))) { OB_PUTS ("vtable for "); --- 587,591 ---- case VAR_DECL: ! if (DECL_NAME (t) && VTABLE_NAME_P (DECL_NAME (t))) { OB_PUTS ("vtable for "); *************** *** 600,603 **** --- 601,605 ---- dump_type_prefix (TREE_TYPE (t), v); OB_PUTC (' '); + dump_readonly_or_volatile (t, after); } /* DECL_CLASS_CONTEXT isn't being set in some cases. Hmm... */ *************** *** 616,619 **** --- 618,625 ---- break; + case NAMESPACE_DECL: + OB_PUTID (DECL_NAME (t)); + break; + case ARRAY_REF: dump_decl (TREE_OPERAND (t, 0), v); *************** *** 933,939 **** OB_PUTCP (p); } ! else if (type == char_type_node ! || type == signed_char_type_node ! || type == unsigned_char_type_node) { OB_PUTC ('\''); --- 939,952 ---- OB_PUTCP (p); } ! else if (type == boolean_type_node) ! { ! if (t == boolean_false_node) ! OB_PUTS ("false"); ! else if (t == boolean_true_node) ! OB_PUTS ("true"); ! else ! my_friendly_abort (366); ! } ! else if (type == char_type_node) { OB_PUTC ('\''); *************** *** 1018,1023 **** else { ! sorry ("operand of SAVE_EXPR not understood"); ! goto error; } break; --- 1031,1035 ---- else { ! dump_expr (TREE_OPERAND (t, 0), 0); } break; *************** *** 1134,1137 **** --- 1146,1156 ---- dump_expr (TREE_OPERAND (t, 1), 1); } + break; + + case ARRAY_REF: + dump_expr (TREE_OPERAND (t, 0), 0); + OB_PUTC ('['); + dump_expr (TREE_OPERAND (t, 1), 0); + OB_PUTC (']'); break; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/except.c gcc-2.7.0/cp/except.c *** gcc-2.6.3/cp/except.c Mon Oct 17 19:01:27 1994 --- gcc-2.7.0/cp/except.c Thu Jun 15 08:22:20 1995 *************** *** 1,4 **** /* Handle exceptional things in C++. ! Copyright (C) 1989, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann Rewritten by Mike Stump , based upon an --- 1,4 ---- /* Handle exceptional things in C++. ! Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann Rewritten by Mike Stump , based upon an *************** *** 19,23 **** 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. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 32,35 **** --- 33,38 ---- #include "expr.h" + tree protect_list; + extern void (*interim_eh_hook) PROTO((tree)); *************** *** 44,47 **** --- 47,68 ---- #endif #endif + #ifdef _IBMR2 + #ifndef __rs6000 + #define __rs6000 + #endif + #endif + #ifdef mips + #ifndef __mips + #define __mips + #endif + #endif + #ifdef __i386__ + #ifndef __i386 + #define __i386 + #endif + #endif + #if defined(__i386) || defined(__rs6000) || defined(__hppa) || defined(__mc68000) || defined (__mips) || defined (__arm) || defined (__alpha) + #define TRY_NEW_EH + #endif #endif *************** *** 121,124 **** --- 142,155 ---- #else + /* Make 'label' the first numbered label of the current function */ + void + make_first_label(label) + rtx label; + { + if (CODE_LABEL_NUMBER(label) < get_first_label_num()) + set_new_first_and_last_label_num (CODE_LABEL_NUMBER(label), + max_label_num()); + } + static int doing_eh (do_warn) *************** *** 146,150 **** 1. The type of the throw and catch must still match exactly (no support yet for matching base classes) ! 2. Throw specifications of functions still doesnt't work. Cool Things: 1. Destructors are called properly :-) --- 177,181 ---- 1. The type of the throw and catch must still match exactly (no support yet for matching base classes) ! 2. Throw specifications of functions still don't work. Cool Things: 1. Destructors are called properly :-) *************** *** 189,246 **** } - /* unwind the stack. */ - static void - do_unwind (throw_label) - rtx throw_label; - { - #ifdef sparc - extern FILE *asm_out_file; - tree fcall; - tree params; - rtx return_val_rtx; - - /* call to __builtin_return_address () */ - params=tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); - fcall = build_function_call (BuiltinReturnAddress, params); - return_val_rtx = expand_expr (fcall, NULL_RTX, SImode, 0); - /* In the return, the new pc is pc+8, as the value comming in is - really the address of the call insn, not the next insn. */ - emit_move_insn (return_val_rtx, plus_constant(gen_rtx (LABEL_REF, - Pmode, - throw_label), -8)); - /* We use three values, PC, type, and value */ - easy_expand_asm ("st %l0,[%fp]"); - easy_expand_asm ("st %l1,[%fp+4]"); - easy_expand_asm ("st %l2,[%fp+8]"); - easy_expand_asm ("ret"); - easy_expand_asm ("restore"); - emit_barrier (); - #endif - #if m88k - rtx temp_frame = frame_pointer_rtx; - - temp_frame = memory_address (Pmode, temp_frame); - temp_frame = copy_to_reg (gen_rtx (MEM, Pmode, temp_frame)); - - /* hopefully this will successfully pop the frame! */ - emit_move_insn (frame_pointer_rtx, temp_frame); - emit_move_insn (stack_pointer_rtx, frame_pointer_rtx); - emit_move_insn (arg_pointer_rtx, frame_pointer_rtx); - emit_insn (gen_add2_insn (stack_pointer_rtx, gen_rtx (CONST_INT, VOIDmode, - (HOST_WIDE_INT)m88k_debugger_offset (stack_pointer_rtx, 0)))); - - #if 0 - emit_insn (gen_add2_insn (arg_pointer_rtx, gen_rtx (CONST_INT, VOIDmode, - -(HOST_WIDE_INT)m88k_debugger_offset (arg_pointer_rtx, 0)))); - - emit_move_insn (stack_pointer_rtx, arg_pointer_rtx); - - emit_insn (gen_add2_insn (stack_pointer_rtx, gen_rtx (CONST_INT, VOIDmode, - (HOST_WIDE_INT)m88k_debugger_offset (arg_pointer_rtx, 0)))); - #endif - #endif - } - - #if 0 --- 220,223 ---- *************** *** 288,294 **** { #ifdef ASM_OUTPUT_SECTION_NAME ! named_section (".gcc_except_table"); #else ! text_section (); #endif } --- 265,278 ---- { #ifdef ASM_OUTPUT_SECTION_NAME ! named_section (NULL_TREE, ".gcc_except_table"); #else ! if (flag_pic) ! data_section (); ! else ! #if defined(__rs6000) ! data_section (); ! #else ! readonly_data_section (); ! #endif #endif } *************** *** 420,426 **** struct labelNode { ! rtx label; ! struct labelNode *chain; ! }; --- 404,410 ---- struct labelNode { ! rtx label; ! struct labelNode *chain; ! }; *************** *** 428,461 **** an exception table entry internally. */ struct ehEntry { ! rtx start_label; ! rtx end_label; ! rtx exception_handler_label; - tree finalization; - }; - struct ehNode { ! struct ehEntry *entry; ! struct ehNode *chain; ! }; struct ehStack { ! struct ehNode *top; ! }; struct ehQueue { ! struct ehNode *head; ! struct ehNode *tail; ! }; struct exceptNode { ! rtx catchstart; ! rtx catchend; ! struct exceptNode *chain; ! }; struct exceptStack { ! struct exceptNode *top; }; /* ========================================================================= */ --- 412,446 ---- an exception table entry internally. */ struct ehEntry { ! rtx start_label; ! rtx end_label; ! rtx exception_handler_label; ! ! tree finalization; ! tree context; ! }; struct ehNode { ! struct ehEntry *entry; ! struct ehNode *chain; ! }; struct ehStack { ! struct ehNode *top; ! }; struct ehQueue { ! struct ehNode *head; ! struct ehNode *tail; ! }; struct exceptNode { ! rtx catchstart; ! rtx catchend; ! struct exceptNode *chain; ! }; struct exceptStack { ! struct exceptNode *top; }; /* ========================================================================= */ *************** *** 628,632 **** --- 613,622 ---- pop_rtl_from_perm (); + LABEL_PRESERVE_P (entry->start_label) = 1; + LABEL_PRESERVE_P (entry->end_label) = 1; + LABEL_PRESERVE_P (entry->exception_handler_label) = 1; + entry->finalization = NULL_TREE; + entry->context = current_function_decl; node->entry = entry; *************** *** 741,744 **** --- 731,736 ---- } + extern tree auto_function PROTO((tree, tree, enum built_in_function)); + /* sets up all the global eh stuff that needs to be initialized at the start of compilation. *************** *** 761,806 **** tree find_first_exception_match_fndecl; tree unwind_fndecl; - tree temp, PFV; - - interim_eh_hook = lang_interim_eh; /* void (*)() */ ! PFV = build_pointer_type (build_function_type (void_type_node, void_list_node)); /* arg list for the build_function_type call for set_terminate () and set_unexpected () */ ! temp = tree_cons (NULL_TREE, PFV, void_list_node); ! push_lang_context (lang_name_c); ! set_terminate_fndecl = ! define_function ("set_terminate", ! build_function_type (PFV, temp), ! NOT_BUILT_IN, ! pushdecl, ! 0); ! set_unexpected_fndecl = ! define_function ("set_unexpected", ! build_function_type (PFV, temp), ! NOT_BUILT_IN, ! pushdecl, ! 0); ! unexpected_fndecl = ! define_function ("unexpected", ! build_function_type (void_type_node, void_list_node), ! NOT_BUILT_IN, ! pushdecl, ! 0); ! terminate_fndecl = ! define_function ("terminate", ! build_function_type (void_type_node, void_list_node), ! NOT_BUILT_IN, ! pushdecl, ! 0); catch_match_fndecl = ! define_function ("__throw_type_match", ! build_function_type (integer_type_node, ! tree_cons (NULL_TREE, string_type_node, tree_cons (NULL_TREE, ptr_type_node, void_list_node))), NOT_BUILT_IN, pushdecl, --- 753,793 ---- tree find_first_exception_match_fndecl; tree unwind_fndecl; /* void (*)() */ ! tree PFV = build_pointer_type (build_function_type ! (void_type_node, void_list_node)); /* arg list for the build_function_type call for set_terminate () and set_unexpected () */ ! tree pfvlist = tree_cons (NULL_TREE, PFV, void_list_node); ! /* void (*pfvtype (void (*) ()))() */ ! tree pfvtype = build_function_type (PFV, pfvlist); ! /* void vtype () */ ! tree vtype = build_function_type (void_type_node, void_list_node); ! ! set_terminate_fndecl = auto_function (get_identifier ("set_terminate"), ! pfvtype, NOT_BUILT_IN); ! set_unexpected_fndecl = auto_function (get_identifier ("set_unexpected"), ! pfvtype, NOT_BUILT_IN); ! unexpected_fndecl = auto_function (get_identifier ("unexpected"), ! vtype, NOT_BUILT_IN); ! terminate_fndecl = auto_function (get_identifier ("terminate"), ! vtype, NOT_BUILT_IN); ! interim_eh_hook = lang_interim_eh; ! ! push_lang_context (lang_name_c); ! catch_match_fndecl = ! define_function (flag_rtti ! ? "__throw_type_match_rtti" ! : "__throw_type_match", ! build_function_type (ptr_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! void_list_node)))), NOT_BUILT_IN, pushdecl, *************** *** 835,842 **** pop_lang_context (); throw_label = gen_label_rtx (); saved_pc = gen_rtx (REG, Pmode, 16); saved_throw_type = gen_rtx (REG, Pmode, 17); saved_throw_value = gen_rtx (REG, Pmode, 18); ! new_eh_queue (&ehqueue); new_eh_queue (&eh_table_output_queue); --- 822,865 ---- pop_lang_context (); throw_label = gen_label_rtx (); + #ifdef sparc saved_pc = gen_rtx (REG, Pmode, 16); saved_throw_type = gen_rtx (REG, Pmode, 17); saved_throw_value = gen_rtx (REG, Pmode, 18); ! #endif ! #ifdef __i386 ! saved_pc = gen_rtx (REG, Pmode, 3); ! saved_throw_type = gen_rtx (REG, Pmode, 4); ! saved_throw_value = gen_rtx (REG, Pmode, 5); ! #endif ! #ifdef __rs6000 ! saved_pc = gen_rtx (REG, Pmode, 13); ! saved_throw_type = gen_rtx (REG, Pmode, 14); ! saved_throw_value = gen_rtx (REG, Pmode, 15); ! #endif ! #ifdef __hppa ! saved_pc = gen_rtx (REG, Pmode, 5); ! saved_throw_type = gen_rtx (REG, Pmode, 6); ! saved_throw_value = gen_rtx (REG, Pmode, 7); ! #endif ! #ifdef __mc68000 ! saved_pc = gen_rtx (REG, Pmode, 10); ! saved_throw_type = gen_rtx (REG, Pmode, 11); ! saved_throw_value = gen_rtx (REG, Pmode, 12); ! #endif ! #ifdef __mips ! saved_pc = gen_rtx (REG, Pmode, 16); ! saved_throw_type = gen_rtx (REG, Pmode, 17); ! saved_throw_value = gen_rtx (REG, Pmode, 18); ! #endif ! #ifdef __arm ! saved_pc = gen_rtx (REG, Pmode, 7); ! saved_throw_type = gen_rtx (REG, Pmode, 8); ! saved_throw_value = gen_rtx (REG, Pmode, 9); ! #endif ! #ifdef __alpha ! saved_pc = gen_rtx (REG, Pmode, 9); ! saved_throw_type = gen_rtx (REG, Pmode, 10); ! saved_throw_value = gen_rtx (REG, Pmode, 11); ! #endif new_eh_queue (&ehqueue); new_eh_queue (&eh_table_output_queue); *************** *** 863,871 **** tree finalization; { ! struct ehEntry *entry = pop_eh_entry (&ehstack); if (! doing_eh (0)) return; emit_label (entry->end_label); --- 886,896 ---- tree finalization; { ! struct ehEntry *entry; if (! doing_eh (0)) return; + entry = pop_eh_entry (&ehstack); + emit_label (entry->end_label); *************** *** 984,988 **** --- 1009,1020 ---- entry->exception_handler_label = gen_label_rtx (); entry->finalization = TerminateFunctionCall; + entry->context = current_function_decl; + assemble_external (TREE_OPERAND (Terminate, 0)); pop_rtl_from_perm (); + + LABEL_PRESERVE_P (entry->start_label) = 1; + LABEL_PRESERVE_P (entry->end_label) = 1; + LABEL_PRESERVE_P (entry->exception_handler_label) = 1; + emit_label (entry->end_label); *************** *** 995,998 **** --- 1027,1031 ---- emit_insn (gen_rtx (USE, VOIDmode, saved_throw_type)); emit_insn (gen_rtx (USE, VOIDmode, saved_throw_value)); + make_first_label(throw_label); emit_jump (throw_label); emit_label (entry->exception_handler_label); *************** *** 1013,1016 **** --- 1046,1057 ---- return; + /* Code to throw out to outer context, if we fall off end of catch + handlers. */ + emit_move_insn (saved_pc, gen_rtx (LABEL_REF, + Pmode, + top_label_entry (&caught_return_label_stack))); + make_first_label(throw_label); + emit_jump (throw_label); + /* Find the start of the catch block. */ last = pop_last_insn (); *************** *** 1071,1075 **** --- 1112,1123 ---- entry.exception_handler_label = gen_label_rtx (); entry.finalization = TerminateFunctionCall; + entry.context = current_function_decl; + assemble_external (TREE_OPERAND (Terminate, 0)); pop_rtl_from_perm (); + + LABEL_PRESERVE_P (entry.start_label) = 1; + LABEL_PRESERVE_P (entry.end_label) = 1; + LABEL_PRESERVE_P (entry.exception_handler_label) = 1; + emit_label (label); *************** *** 1082,1085 **** --- 1130,1134 ---- emit_insn (gen_rtx (USE, VOIDmode, saved_throw_type)); emit_insn (gen_rtx (USE, VOIDmode, saved_throw_value)); + make_first_label(throw_label); emit_jump (throw_label); emit_label (entry.exception_handler_label); *************** *** 1089,1092 **** --- 1138,1166 ---- } + /* Build a type value for use at runtime for a exp that is thrown or + matched against by the exception handling system. */ + static tree + build_eh_type (exp) + tree exp; + { + char *typestring; + tree type; + + if (flag_rtti) + { + exp = build_typeid (exp); + return build1 (ADDR_EXPR, ptr_type_node, exp); + } + type = TREE_TYPE (exp); + + /* peel back references, so they match. */ + if (TREE_CODE (type) == REFERENCE_TYPE) + type = TREE_TYPE (type); + + typestring = build_overload_name (type, 1, 1); + exp = combine_strings (build_string (strlen (typestring)+1, typestring)); + return build1 (ADDR_EXPR, ptr_type_node, exp); + } + /* call this to start a catch block. Typename is the typename, and identifier is the variable to place the object in or NULL if the variable doesn't *************** *** 1100,1105 **** rtx false_label_rtx; rtx protect_label_rtx; ! tree type; ! tree decl; tree init; --- 1174,1178 ---- rtx false_label_rtx; rtx protect_label_rtx; ! tree decl = NULL_TREE; tree init; *************** *** 1110,1140 **** expand_start_bindings (0); - if (declspecs) - { - tree init_type; - decl = grokdeclarator (declarator, declspecs, NORMAL, 1, NULL_TREE); - - /* Figure out the type that the initializer is. */ - init_type = TREE_TYPE (decl); - if (TREE_CODE (init_type) != REFERENCE_TYPE) - init_type = build_reference_type (init_type); - - init = convert_from_reference (save_expr (make_tree (init_type, saved_throw_value))); - - /* Do we need the below two lines? */ - /* Let `finish_decl' know that this initializer is ok. */ - DECL_INITIAL (decl) = init; - /* This needs to be preallocated under the try block, - in a union of all catch variables. */ - pushdecl (decl); - type = TREE_TYPE (decl); - - /* peel back references, so they match. */ - if (TREE_CODE (type) == REFERENCE_TYPE) - type = TREE_TYPE (type); - } - else - type = NULL_TREE; - /* These are saved for the exception table. */ push_rtl_perm (); --- 1183,1186 ---- *************** *** 1145,1176 **** push_label_entry (&false_label_stack, protect_label_rtx); ! if (type) { ! tree params; ! char *typestring; rtx call_rtx, return_value_rtx; ! tree catch_match_fcall; ! tree catchmatch_arg, argval; ! typestring = build_overload_name (type, 1, 1); ! params = tree_cons (NULL_TREE, ! combine_strings (build_string (strlen (typestring)+1, typestring)), ! tree_cons (NULL_TREE, ! make_tree (ptr_type_node, saved_throw_type), ! NULL_TREE)); ! catch_match_fcall = build_function_call (CatchMatch, params); ! call_rtx = expand_call (catch_match_fcall, NULL_RTX, 0); ! return_value_rtx = ! hard_function_value (integer_type_node, catch_match_fcall); /* did the throw type match function return TRUE? */ ! emit_cmp_insn (return_value_rtx, const0_rtx, NE, NULL_RTX, GET_MODE (return_value_rtx), 0, 0); /* if it returned FALSE, jump over the catch block, else fall into it */ ! emit_jump_insn (gen_bne (false_label_rtx)); ! finish_decl (decl, init, NULL_TREE, 0); } else --- 1191,1239 ---- push_label_entry (&false_label_stack, protect_label_rtx); ! if (declspecs) { ! tree exp; rtx call_rtx, return_value_rtx; ! tree init_type; ! ! decl = grokdeclarator (declarator, declspecs, CATCHPARM, 1, NULL_TREE); ! ! if (decl == NULL_TREE) ! { ! error ("invalid catch parameter"); ! return; ! } ! /* Figure out the type that the initializer is. */ ! init_type = TREE_TYPE (decl); ! if (TREE_CODE (init_type) != REFERENCE_TYPE) ! init_type = build_reference_type (init_type); ! exp = make_tree (ptr_type_node, saved_throw_value); ! exp = tree_cons (NULL_TREE, ! build_eh_type (decl), ! tree_cons (NULL_TREE, ! make_tree (ptr_type_node, saved_throw_type), ! tree_cons (NULL_TREE, exp, NULL_TREE))); ! exp = build_function_call (CatchMatch, exp); ! call_rtx = expand_call (exp, NULL_RTX, 0); ! assemble_external (TREE_OPERAND (CatchMatch, 0)); ! return_value_rtx = hard_function_value (ptr_type_node, exp); /* did the throw type match function return TRUE? */ ! emit_cmp_insn (return_value_rtx, const0_rtx, EQ, NULL_RTX, GET_MODE (return_value_rtx), 0, 0); /* if it returned FALSE, jump over the catch block, else fall into it */ ! emit_jump_insn (gen_beq (false_label_rtx)); ! ! init = convert_from_reference (save_expr (make_tree (init_type, call_rtx))); ! ! /* Do we need the below two lines? */ ! /* Let `cp_finish_decl' know that this initializer is ok. */ ! DECL_INITIAL (decl) = init; ! decl = pushdecl (decl); ! cp_finish_decl (decl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); } else *************** *** 1201,1205 **** emit_jump (top_label_entry (&caught_return_label_stack)); ! /* Code to throw out to outer context, if we get an throw from within our catch handler. */ /* These are saved for the exception table. */ --- 1264,1268 ---- emit_jump (top_label_entry (&caught_return_label_stack)); ! /* Code to throw out to outer context, if we get a throw from within our catch handler. */ /* These are saved for the exception table. */ *************** *** 1211,1217 **** --- 1274,1282 ---- Pmode, top_label_entry (&caught_return_label_stack))); + make_first_label(throw_label); emit_jump (throw_label); /* No associated finalization. */ entry.finalization = NULL_TREE; + entry.context = current_function_decl; /* Because we are reordered out of line, we have to protect this. */ *************** *** 1219,1224 **** start_protect_label_rtx = pop_label_entry (&false_label_stack); ! /* Cleanup the EH paramater. */ ! expand_end_bindings (decls = getdecls (), decls != NULL_TREE, 0); /* label we emit to jump to if this catch block didn't match. */ --- 1284,1290 ---- start_protect_label_rtx = pop_label_entry (&false_label_stack); ! /* Cleanup the EH parameter. */ ! decls = getdecls (); ! expand_end_bindings (decls, decls != NULL_TREE, 0); /* label we emit to jump to if this catch block didn't match. */ *************** *** 1229,1232 **** --- 1295,1302 ---- entry.end_label = end_protect_label_rtx; + LABEL_PRESERVE_P (entry.start_label) = 1; + LABEL_PRESERVE_P (entry.end_label) = 1; + LABEL_PRESERVE_P (entry.exception_handler_label) = 1; + /* These set up a call to throw the caught exception into the outer context. */ *************** *** 1248,1256 **** } ! /* is called from expand_excpetion_blocks () to generate the code in a function ! to "throw" if anything in the function needs to preform a throw. ! expands "throw" as the following psuedo code: throw: --- 1318,1412 ---- } + /* unwind the stack. */ + static void + do_unwind (throw_label) + rtx throw_label; + { + #ifdef sparc + extern FILE *asm_out_file; + tree fcall; + tree params; + rtx return_val_rtx; + + /* call to __builtin_return_address () */ + params=tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); + fcall = build_function_call (BuiltinReturnAddress, params); + return_val_rtx = expand_expr (fcall, NULL_RTX, SImode, 0); + /* In the return, the new pc is pc+8, as the value coming in is + really the address of the call insn, not the next insn. */ + emit_move_insn (return_val_rtx, plus_constant(gen_rtx (LABEL_REF, + Pmode, + throw_label), -8)); + /* We use three values, PC, type, and value */ + easy_expand_asm ("st %l0,[%fp]"); + easy_expand_asm ("st %l1,[%fp+4]"); + easy_expand_asm ("st %l2,[%fp+8]"); + easy_expand_asm ("ret"); + easy_expand_asm ("restore"); + emit_barrier (); + #endif + #if defined(__i386) || defined(__rs6000) || defined(__hppa) || defined(__mc68000) || defined (__mips) || defined(__alpha) + extern FILE *asm_out_file; + tree fcall; + tree params; + rtx return_val_rtx; + + /* call to __builtin_return_address () */ + params=tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); + fcall = build_function_call (BuiltinReturnAddress, params); + return_val_rtx = expand_expr (fcall, NULL_RTX, SImode, 0); + #if 0 + /* I would like to do this here, but doesn't seem to work. */ + emit_move_insn (return_val_rtx, gen_rtx (LABEL_REF, + Pmode, + throw_label)); + /* So, for now, just pass throw label to stack unwinder. */ + #endif + /* We use three values, PC, type, and value */ + params = tree_cons (NULL_TREE, make_tree (ptr_type_node, + gen_rtx (LABEL_REF, Pmode, throw_label)), NULL_TREE); + + do_function_call (Unwind, params, NULL_TREE); + assemble_external (TREE_OPERAND (Unwind, 0)); + emit_barrier (); + #endif + #if m88k + rtx temp_frame = frame_pointer_rtx; + + temp_frame = memory_address (Pmode, temp_frame); + temp_frame = copy_to_reg (gen_rtx (MEM, Pmode, temp_frame)); + + /* hopefully this will successfully pop the frame! */ + emit_move_insn (frame_pointer_rtx, temp_frame); + emit_move_insn (stack_pointer_rtx, frame_pointer_rtx); + emit_move_insn (arg_pointer_rtx, frame_pointer_rtx); + emit_insn (gen_add2_insn (stack_pointer_rtx, gen_rtx (CONST_INT, VOIDmode, + (HOST_WIDE_INT)m88k_debugger_offset (stack_pointer_rtx, 0)))); + + #if 0 + emit_insn (gen_add2_insn (arg_pointer_rtx, gen_rtx (CONST_INT, VOIDmode, + -(HOST_WIDE_INT)m88k_debugger_offset (arg_pointer_rtx, 0)))); + + emit_move_insn (stack_pointer_rtx, arg_pointer_rtx); + + emit_insn (gen_add2_insn (stack_pointer_rtx, gen_rtx (CONST_INT, VOIDmode, + (HOST_WIDE_INT)m88k_debugger_offset (arg_pointer_rtx, 0)))); + #endif + #endif + #ifdef __arm + if (flag_omit_frame_pointer) + sorry ("this implementation of exception handling requires a frame pointer"); + + emit_move_insn (stack_pointer_rtx, + gen_rtx (MEM, SImode, plus_constant (hard_frame_pointer_rtx, -8))); + emit_move_insn (hard_frame_pointer_rtx, + gen_rtx (MEM, SImode, plus_constant (hard_frame_pointer_rtx, -12))); + #endif + } ! /* is called from expand_exception_blocks () to generate the code in a function ! to "throw" if anything in the function needs to perform a throw. ! expands "throw" as the following pseudo code: throw: *************** *** 1276,1279 **** --- 1432,1436 ---- rtx goto_unwind_and_throw = gen_label_rtx (); + make_first_label(throw_label); emit_label (throw_label); *************** *** 1282,1285 **** --- 1439,1443 ---- tree_cons (NULL_TREE, make_tree (ptr_type_node, saved_pc), NULL_TREE), ptr_type_node); + assemble_external (TREE_OPERAND (FirstExceptionMatch, 0)); /* did we find one? */ *************** *** 1297,1303 **** --- 1455,1467 ---- /* call to __builtin_return_address () */ + #ifdef __arm + /* This replaces a 'call' to __builtin_return_address */ + return_val_rtx = gen_reg_rtx (Pmode); + emit_move_insn (return_val_rtx, gen_rtx (MEM, SImode, plus_constant (hard_frame_pointer_rtx, -4))); + #else params=tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); fcall = build_function_call (BuiltinReturnAddress, params); return_val_rtx = expand_expr (fcall, NULL_RTX, SImode, 0); + #endif /* did __builtin_return_address () return a valid address? */ *************** *** 1307,1313 **** --- 1471,1497 ---- emit_jump_insn (gen_beq (gotta_call_terminate)); + #ifdef __arm + /* On the ARM, '__builtin_return_address', must have 4 + subtracted from it. */ + emit_insn (gen_add2_insn (return_val_rtx, GEN_INT (-4))); + + /* If we are generating code for an ARM2/ARM3 machine or for an ARM6 in 26 bit + mode, the condition codes must be masked out of the return value, or else + they will confuse BuiltinReturnAddress. This does not apply to ARM6 and + later processors when running in 32 bit mode. */ + if (!TARGET_6) + emit_insn (gen_rtx (SET, SImode, return_val_rtx, gen_rtx (AND, SImode, return_val_rtx, GEN_INT (0x03fffffc)))); + #else + #ifndef sparc + /* On the SPARC, __builtin_return_address is already -8, no need to + subtract any more from it. */ + return_val_rtx = plus_constant (return_val_rtx, -1); + #endif + #endif + /* yes it did */ emit_move_insn (saved_pc, return_val_rtx); do_unwind (throw_label); + make_first_label(throw_label); emit_jump (throw_label); *************** *** 1315,1318 **** --- 1499,1503 ---- emit_label (gotta_call_terminate); do_function_call (Terminate, NULL_TREE, NULL_TREE); + assemble_external (TREE_OPERAND (Terminate, 0)); } *************** *** 1345,1349 **** static int have_done = 0; if (! have_done && TREE_PUBLIC (current_function_decl) ! && ! DECL_INLINE (current_function_decl)) { have_done = 1; --- 1530,1535 ---- static int have_done = 0; if (! have_done && TREE_PUBLIC (current_function_decl) ! && DECL_INTERFACE_KNOWN (current_function_decl) ! && ! DECL_EXTERNAL (current_function_decl)) { have_done = 1; *************** *** 1360,1364 **** 1. Allocate space to save the current PC onto the stack. 2. Generate and emit a label and save its address into the ! newly allocate stack space since we can't save the pc directly. 3. If this is the first call to throw in this function: generate a label for the throw block --- 1546,1550 ---- 1. Allocate space to save the current PC onto the stack. 2. Generate and emit a label and save its address into the ! newly allocated stack space since we can't save the pc directly. 3. If this is the first call to throw in this function: generate a label for the throw block *************** *** 1369,1373 **** { rtx label; - tree type; if (! doing_eh (1)) --- 1555,1558 ---- *************** *** 1379,1411 **** label = gen_label_rtx (); emit_label (label); - emit_move_insn (saved_pc, gen_rtx (LABEL_REF, Pmode, label)); if (exp) { /* throw expression */ /* First, decay it. */ exp = default_conversion (exp); - type = TREE_TYPE (exp); ! { ! char *typestring = build_overload_name (type, 1, 1); ! tree throw_type = build1 (ADDR_EXPR, ptr_type_node, combine_strings (build_string (strlen (typestring)+1, typestring))); ! rtx throw_type_rtx = expand_expr (throw_type, NULL_RTX, VOIDmode, 0); ! rtx throw_value_rtx; ! ! emit_move_insn (saved_throw_type, throw_type_rtx); ! exp = convert_to_reference (build_reference_type (build_type_variant (TREE_TYPE (exp), 1, 0)), exp, CONV_STATIC, LOOKUP_COMPLAIN, NULL_TREE); ! if (exp == error_mark_node) ! error (" in thrown expression"); ! throw_value_rtx = expand_expr (build_unary_op (ADDR_EXPR, exp, 0), NULL_RTX, VOIDmode, 0); ! emit_move_insn (saved_throw_value, throw_value_rtx); ! } } else { /* rethrow current exception */ ! /* This part is easy, as we dont' have to do anything else. */ } emit_jump (throw_label); } --- 1564,1601 ---- label = gen_label_rtx (); emit_label (label); if (exp) { + tree throw_type; + rtx throw_type_rtx; + rtx throw_value_rtx; + /* throw expression */ /* First, decay it. */ exp = default_conversion (exp); ! /* Make a copy of the thrown object. WP 15.1.5 */ ! exp = build_new (NULL_TREE, TREE_TYPE (exp), ! build_tree_list (NULL_TREE, exp), ! 0); ! ! if (exp == error_mark_node) ! error (" in thrown expression"); ! ! throw_type = build_eh_type (build_indirect_ref (exp, NULL_PTR)); ! throw_type_rtx = expand_expr (throw_type, NULL_RTX, VOIDmode, 0); ! ! throw_value_rtx = expand_expr (exp, NULL_RTX, VOIDmode, 0); ! emit_move_insn (saved_throw_value, throw_value_rtx); ! emit_move_insn (saved_throw_type, throw_type_rtx); } else { /* rethrow current exception */ ! /* This part is easy, as we don't have to do anything else. */ } + emit_move_insn (saved_pc, gen_rtx (LABEL_REF, Pmode, label)); + make_first_label(throw_label); emit_jump (throw_label); } *************** *** 1414,1422 **** #endif /* Output the exception table. Return the number of handlers. */ ! int ! build_exception_table () { int count = 0; --- 1604,1630 ---- #endif + void + end_protect_partials () { + while (protect_list) + { + end_protect (TREE_VALUE (protect_list)); + protect_list = TREE_CHAIN (protect_list); + } + } + + int + might_have_exceptions_p () + { + #ifdef TRY_NEW_EH + if (eh_table_output_queue.head) + return 1; + #endif + return 0; + } /* Output the exception table. Return the number of handlers. */ ! void ! emit_exception_table () { int count = 0; *************** *** 1427,1443 **** if (! doing_eh (0)) ! return 0; while (entry = dequeue_eh_entry (&eh_table_output_queue)) { ! if (count == 0) ! { ! exception_section (); ! ! /* Beginning marker for table. */ ! ASM_OUTPUT_ALIGN (asm_out_file, 2); ! ASM_OUTPUT_LABEL (asm_out_file, "__EXCEPTION_TABLE__"); ! fprintf (asm_out_file, " .word 0, 0, 0\n"); ! } count++; output_exception_table_entry (asm_out_file, --- 1635,1655 ---- if (! doing_eh (0)) ! return; + exception_section (); + + /* Beginning marker for table. */ + ASM_OUTPUT_ALIGN (asm_out_file, 2); + ASM_OUTPUT_LABEL (asm_out_file, "__EXCEPTION_TABLE__"); + output_exception_table_entry (asm_out_file, + const0_rtx, const0_rtx, const0_rtx); + while (entry = dequeue_eh_entry (&eh_table_output_queue)) { ! tree context = entry->context; ! ! if (context && ! TREE_ASM_WRITTEN (context)) ! continue; ! count++; output_exception_table_entry (asm_out_file, *************** *** 1446,1458 **** } ! if (count) ! { ! /* Ending marker for table. */ ! ASM_OUTPUT_LABEL (asm_out_file, "__EXCEPTION_END__"); ! fprintf (asm_out_file, " .word -1, -1, -1\n"); ! } #endif /* TRY_NEW_EH */ - return count; } --- 1658,1667 ---- } ! /* Ending marker for table. */ ! ASM_OUTPUT_LABEL (asm_out_file, "__EXCEPTION_END__"); ! output_exception_table_entry (asm_out_file, ! constm1_rtx, constm1_rtx, constm1_rtx); #endif /* TRY_NEW_EH */ } *************** *** 1473,1478 **** tree e; { ! e = build1 (THROW_EXPR, void_type_node, e); ! TREE_SIDE_EFFECTS (e) = 1; return e; } --- 1682,1691 ---- tree e; { ! if (e != error_mark_node) ! { ! e = build1 (THROW_EXPR, void_type_node, e); ! TREE_SIDE_EFFECTS (e) = 1; ! TREE_USED (e) = 1; ! } return e; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/expr.c gcc-2.7.0/cp/expr.c *** gcc-2.6.3/cp/expr.c Wed Oct 26 21:19:39 1994 --- gcc-2.7.0/cp/expr.c Thu Jun 15 08:22:41 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 108,111 **** --- 109,113 ---- /* Don't clobber a value that might be part of a default parameter value. */ + mark_addressable (slot); if (TREE_PERMANENT (args)) args = tree_cons (0, build1 (ADDR_EXPR, type, slot), *************** *** 143,147 **** call_exp = build (CALL_EXPR, type, func, args, 0); TREE_SIDE_EFFECTS (call_exp) = 1; ! return_target = expand_expr (call_exp, call_target, mode, 0); free_temp_slots (); if (call_target == 0) --- 145,149 ---- call_exp = build (CALL_EXPR, type, func, args, 0); TREE_SIDE_EFFECTS (call_exp) = 1; ! return_target = expand_call (call_exp, call_target, ignore); free_temp_slots (); if (call_target == 0) *************** *** 152,166 **** int old_ac = flag_access_control; ! tree init = build (RTL_EXPR, type, 0, return_target); TREE_ADDRESSABLE (init) = 1; flag_access_control = 0; ! expand_aggr_init (slot, init, 0); flag_access_control = old_ac; if (TYPE_NEEDS_DESTRUCTOR (type)) { ! init = build (RTL_EXPR, build_reference_type (type), 0, ! XEXP (return_target, 0)); init = maybe_build_cleanup (convert_from_reference (init)); if (init != NULL_TREE) --- 154,171 ---- int old_ac = flag_access_control; ! tree init = build_decl (VAR_DECL, 0, type); TREE_ADDRESSABLE (init) = 1; + DECL_RTL (init) = return_target; flag_access_control = 0; ! expand_aggr_init (slot, init, 0, LOOKUP_ONLYCONVERTING); flag_access_control = old_ac; if (TYPE_NEEDS_DESTRUCTOR (type)) { ! init = build_decl (VAR_DECL, 0, ! build_reference_type (type)); ! DECL_RTL (init) = XEXP (return_target, 0); ! init = maybe_build_cleanup (convert_from_reference (init)); if (init != NULL_TREE) *************** *** 175,179 **** if (call_target != return_target) { ! my_friendly_assert (! TYPE_NEEDS_CONSTRUCTING (type), 317); if (GET_MODE (return_target) == BLKmode) emit_block_move (call_target, return_target, expr_size (exp), --- 180,184 ---- if (call_target != return_target) { ! my_friendly_assert (TYPE_HAS_TRIVIAL_INIT_REF (type), 317); if (GET_MODE (return_target) == BLKmode) emit_block_move (call_target, return_target, expr_size (exp), *************** *** 196,200 **** /* We got back a reference to the type we want. Now initialize target with that. */ ! expand_aggr_init (slot, init, 0); } --- 201,205 ---- /* We got back a reference to the type we want. Now initialize target with that. */ ! expand_aggr_init (slot, init, 0, LOOKUP_ONLYCONVERTING); } *************** *** 265,269 **** result = real_decl_result; } ! emit_move_insn (result, DECL_RTL (decl)); emit_insn (gen_rtx (USE, VOIDmode, result)); } --- 270,274 ---- result = real_decl_result; } ! store_expr (decl, result, 0); emit_insn (gen_rtx (USE, VOIDmode, result)); } *************** *** 275,278 **** --- 280,284 ---- here because on most RISC machines, a variable's address is not, by itself, a legitimate address. */ + int decl_in_memory_p (decl) *************** *** 280,282 **** --- 286,368 ---- { return DECL_RTL (decl) != 0 && GET_CODE (DECL_RTL (decl)) == MEM; + } + + /* Expand this initialization inline and see if it's simple enough that + it can be done at compile-time. */ + + static tree + extract_aggr_init (decl, init) + tree decl, init; + { + return 0; + } + + static tree + extract_scalar_init (decl, init) + tree decl, init; + { + rtx value, insns, insn; + extern struct obstack temporary_obstack; + tree t = NULL_TREE; + + push_obstacks (&temporary_obstack, &temporary_obstack); + start_sequence (); + value = expand_expr (init, NULL_RTX, VOIDmode, 0); + insns = get_insns (); + end_sequence (); + reg_scan (insns, max_reg_num (), 0); + jump_optimize (insns, 0, 0, 1); + pop_obstacks (); + + for (insn = insns; insn; insn = NEXT_INSN (insn)) + { + rtx r, to; + + if (GET_CODE (insn) == NOTE) + continue; + else if (GET_CODE (insn) != INSN) + return 0; + + r = PATTERN (insn); + if (GET_CODE (r) != SET) + return 0; + + to = XEXP (r, 0); + + if (! (to == value || + (GET_CODE (to) == SUBREG && XEXP (to, 0) == value))) + return 0; + + r = XEXP (r, 1); + + switch (GET_CODE (r)) + { + case CONST_INT: + t = build_int_2 (XEXP (r, 0), 0); + break; + default: + return 0; + } + } + + return t; + } + + int + extract_init (decl, init) + tree decl, init; + { + return 0; + + if (IS_AGGR_TYPE (TREE_TYPE (decl)) + || TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) + init = extract_aggr_init (decl, init); + else + init = extract_scalar_init (decl, init); + + if (init == NULL_TREE) + return 0; + + DECL_INITIAL (decl) = init; + return 1; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/g++.c gcc-2.7.0/cp/g++.c *** gcc-2.6.3/cp/g++.c Sat Oct 29 07:17:44 1994 --- gcc-2.7.0/cp/g++.c Thu Jun 15 08:23:15 1995 *************** *** 1,4 **** /* G++ preliminary semantic processing for the compiler driver. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@cygnus.com). --- 1,4 ---- /* G++ preliminary semantic processing for the compiler driver. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@cygnus.com). *************** *** 17,21 **** 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 program is a wrapper to the main `gcc' driver. For GNU C++, --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This program is a wrapper to the main `gcc' driver. For GNU C++, *************** *** 40,44 **** --- 41,49 ---- #include #include + #ifndef _WIN32 #include /* May get R_OK, etc. on some systems. */ + #else + #include + #endif #include *************** *** 85,97 **** extern int sys_nerr; ! #if defined(bsd4_4) || defined(__NetBSD__) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif /* Name with which this program was invoked. */ static char *programname; #ifdef HAVE_VPRINTF /* Output an error message and exit */ --- 90,128 ---- extern int sys_nerr; ! #ifndef HAVE_STRERROR ! #if defined(bsd4_4) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif + #else + extern char *strerror(); + #endif /* Name with which this program was invoked. */ static char *programname; + char * + my_strerror(e) + int e; + { + + #ifdef HAVE_STRERROR + return strerror(e); + + #else + + static char buffer[30]; + if (!e) + return ""; + + if (e > 0 && e < sys_nerr) + return sys_errlist[e]; + + sprintf (buffer, "Unknown error %d", e); + return buffer; + #endif + } + #ifdef HAVE_VPRINTF /* Output an error message and exit */ *************** *** 284,288 **** if (errno < sys_nerr) s = concat ("installation problem, cannot exec %s: ", ! sys_errlist[errno], ""); else s = "installation problem, cannot exec %s"; --- 315,319 ---- if (errno < sys_nerr) s = concat ("installation problem, cannot exec %s: ", ! my_strerror( errno ), ""); else s = "installation problem, cannot exec %s"; *************** *** 341,347 **** int verbose = 0; ! /* This will be NULL if we encounter a situation where we should not ! link in libg++. */ ! char *library = "-lg++"; /* Used to track options that take arguments, so we don't go wrapping --- 372,378 ---- int verbose = 0; ! /* This will be 0 if we encounter a situation where we should not ! link in libstdc++, or 2 if we should link in libg++ as well. */ ! int library = 1; /* Used to track options that take arguments, so we don't go wrapping *************** *** 362,369 **** /* Non-zero if we saw `-lm' or `-lmath' on the command line. */ ! int saw_math = 0; /* The number of arguments being added to what's in argv. By ! default it's one new argument (adding `-lg++'). We use this to track the number of times we've inserted -xc++/-xnone as well. */ int added = 1; --- 393,400 ---- /* Non-zero if we saw `-lm' or `-lmath' on the command line. */ ! char *saw_math = 0; /* The number of arguments being added to what's in argv. By ! default it's one new argument (adding `-lstdc++'). We use this to track the number of times we've inserted -xc++/-xnone as well. */ int added = 1; *************** *** 374,377 **** --- 405,417 ---- p = argv[0] + strlen (argv[0]); + + /* If we're called as g++ (or i386-aout-g++), link in libg++ as well. */ + + if (strcmp (p - 3, "g++") == 0) + { + library = 2; + ++added; + } + while (p != argv[0] && p[-1] != '/') --p; *************** *** 412,419 **** if (argv[i][0] == '-') { ! if (strcmp (argv[i], "-nostdlib") == 0) { added--; ! library = NULL; } else if (strcmp (argv[i], "-lm") == 0 --- 452,459 ---- if (argv[i][0] == '-') { ! if (library != 0 && strcmp (argv[i], "-nostdlib") == 0) { added--; ! library = 0; } else if (strcmp (argv[i], "-lm") == 0 *************** *** 428,432 **** in libg++. */ added--; ! library = NULL; } } --- 468,472 ---- in libg++. */ added--; ! library = 0; } } *************** *** 437,441 **** || strcmp (argv[i], "-Tdata") == 0)) quote = argv[i]; ! else if (library != NULL && ((argv[i][2] == '\0' && (char *) strchr ("cSEM", argv[i][1]) != NULL) || strcmp (argv[i], "-MM") == 0)) --- 477,481 ---- || strcmp (argv[i], "-Tdata") == 0)) quote = argv[i]; ! else if (library != 0 && ((argv[i][2] == '\0' && (char *) strchr ("cSEM", argv[i][1]) != NULL) || strcmp (argv[i], "-MM") == 0)) *************** *** 444,448 **** cause a warning. */ added--; ! library = NULL; } else --- 484,488 ---- cause a warning. */ added--; ! library = 0; } else *************** *** 488,494 **** if (!saw_math && (args[i] & MATHLIB) && library) { ! saw_math = 1; ! arglist[j] = library; ! arglist[++j] = argv[i]; } --- 528,533 ---- if (!saw_math && (args[i] & MATHLIB) && library) { ! --j; ! saw_math = argv[i]; } *************** *** 508,513 **** /* Add `-lg++' if we haven't already done so. */ ! if (library && !saw_math) ! arglist[j++] = library; arglist[j] = NULL; --- 547,556 ---- /* Add `-lg++' if we haven't already done so. */ ! if (library == 2) ! arglist[j++] = "-lg++"; ! if (library) ! arglist[j++] = "-lstdc++"; ! if (saw_math) ! arglist[j++] = saw_math; arglist[j] = NULL; *************** *** 528,532 **** fprintf (stderr, "\n"); } ! #ifndef OS2 #ifdef __MSDOS__ run_dos (gcc, arglist); --- 571,575 ---- fprintf (stderr, "\n"); } ! #if !defined(OS2) && !defined (_WIN32) #ifdef __MSDOS__ run_dos (gcc, arglist); *************** *** 535,540 **** pfatal_with_name (gcc); #endif /* __MSDOS__ */ ! #else /* OS2 */ ! if (spawnvp (gcc, arglist) < 0) pfatal_with_name (gcc); #endif --- 578,583 ---- pfatal_with_name (gcc); #endif /* __MSDOS__ */ ! #else /* OS2 or _WIN32 */ ! if (spawnvp (1, gcc, arglist) < 0) pfatal_with_name (gcc); #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/gc.c gcc-2.7.0/cp/gc.c *** gcc-2.6.3/cp/gc.c Thu May 5 18:14:19 1994 --- gcc-2.7.0/cp/gc.c Thu Jun 15 08:23:33 1995 *************** *** 1,4 **** /* Garbage collection primitives for GNU C++. ! Copyright (C) 1992, 1993 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Garbage collection primitives for GNU C++. ! Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 24,27 **** --- 25,29 ---- #include "cp-tree.h" #include "flags.h" + #include "output.h" #undef NULL *************** *** 30,33 **** --- 32,36 ---- extern tree define_function (); extern tree build_t_desc_overload (); + extern struct obstack *permanent_obstack; /* This is the function decl for the (pseudo-builtin) __gc_protect *************** *** 111,115 **** || TREE_CODE (ttype) == REFERENCE_TYPE) && IS_AGGR_TYPE (TREE_TYPE (ttype)) ! && CLASSTYPE_DOSSIER (TREE_TYPE (ttype))) return 1; --- 114,118 ---- || TREE_CODE (ttype) == REFERENCE_TYPE) && IS_AGGR_TYPE (TREE_TYPE (ttype)) ! && CLASSTYPE_RTTI (TREE_TYPE (ttype))) return 1; *************** *** 286,290 **** DECL_INITIAL (ref) = build1 (ADDR_EXPR, TREE_TYPE (ref), decl); TREE_CONSTANT (DECL_INITIAL (ref)) = 1; ! finish_decl (ref, DECL_INITIAL (ref), 0, 0); } else --- 289,293 ---- DECL_INITIAL (ref) = build1 (ADDR_EXPR, TREE_TYPE (ref), decl); TREE_CONSTANT (DECL_INITIAL (ref)) = 1; ! cp_finish_decl (ref, DECL_INITIAL (ref), NULL_TREE, 0, 0); } else *************** *** 384,397 **** return error_mark_node; } if (flag_vtable_thunks) abort(); ! vptr = build1 (INDIRECT_REF, TYPE_POINTER_TO (vtable_entry_type), exp); ! offset = build_component_ref (build_array_ref (vptr, integer_one_node), ! get_identifier (VTABLE_DELTA_NAME), NULL_TREE, 0); return build (PLUS_EXPR, class_star_type_node, exp, ! convert (integer_type_node, offset)); } --- 387,409 ---- return error_mark_node; } + type = TREE_TYPE (type); + if (!TYPE_VIRTUAL_P (type) || CLASSTYPE_VFIELD (type) == NULL_TREE) + return (exp); + if (flag_vtable_thunks) abort(); ! vptr = fold (size_binop (PLUS_EXPR, ! size_binop (FLOOR_DIV_EXPR, ! DECL_FIELD_BITPOS (CLASSTYPE_VFIELD (type)), ! size_int (BITS_PER_UNIT)), ! exp)); ! vptr = build1 (INDIRECT_REF, TYPE_POINTER_TO (vtable_entry_type), vptr); ! offset = build_component_ref (build_array_ref (vptr, integer_zero_node), ! delta_identifier, NULL_TREE, 0); return build (PLUS_EXPR, class_star_type_node, exp, ! convert (ptrdiff_type_node, offset)); } *************** *** 420,424 **** } ! /* Return the Type_info node associated with the expression EXP. If EXP is a reference to a polymorphic class, return the dynamic type; otherwise return the static type of the expression. */ --- 432,436 ---- } ! /* Return the type_info node associated with the expression EXP. If EXP is a reference to a polymorphic class, return the dynamic type; otherwise return the static type of the expression. */ *************** *** 429,437 **** tree type; if (exp == error_mark_node) return error_mark_node; type = TREE_TYPE (exp); ! /* if b is an instance of B, typeid(b) == typeid(B). Do this before reference trickiness. */ --- 441,461 ---- tree type; + if (!flag_rtti) + cp_error ("cannot take typeid of object when -frtti is not specified"); + if (exp == error_mark_node) return error_mark_node; type = TREE_TYPE (exp); ! #if 0 ! /* Fergus Henderson says we decided at the Waterloo ! meeting to strip the top cv-qualifiers. */ ! if (TYPE_VOLATILE (exp) || TYPE_READONLY (exp)) ! type = build_type_variant (type, TYPE_READONLY (exp), TYPE_VOLATILE (exp)); ! #else ! /* Strip top-level cv-qualifiers. */ ! type = TYPE_MAIN_VARIANT (type); ! #endif ! /* if b is an instance of B, typeid(b) == typeid(B). Do this before reference trickiness. */ *************** *** 443,464 **** type = build_reference_type (type); ! /* If exp is a reference to polymorphic type, get the real Type_info. */ if (TREE_CODE (type) == REFERENCE_TYPE && TYPE_VIRTUAL_P (TREE_TYPE (type))) { ! /* build reference to Type_info from vtable. */ ! ! sorry ("finding Type_info for an object"); ! return error_mark_node; } ! /* otherwise return the Type_info for the static type of the expr. */ return get_typeid (type); } ! /* Return the Type_info object for TYPE, creating it if necessary. */ tree get_typeid (type) tree type; { if (type == error_mark_node) return error_mark_node; --- 467,492 ---- type = build_reference_type (type); ! /* If exp is a reference to polymorphic type, get the real type_info. */ if (TREE_CODE (type) == REFERENCE_TYPE && TYPE_VIRTUAL_P (TREE_TYPE (type))) { ! /* build reference to type_info from vtable. */ ! tree t; ! t = build_vfn_ref ((tree *) NULL_TREE, exp, build_int_2 (0, 0)); ! TREE_TYPE (t) = build_pointer_type (__class_desc_type_node); ! t = build_indirect_ref (t, NULL); ! return t; } ! /* otherwise return the type_info for the static type of the expr. */ return get_typeid (type); } ! /* Return the type_info object for TYPE, creating it if necessary. */ tree get_typeid (type) tree type; { + tree t, td; + if (type == error_mark_node) return error_mark_node; *************** *** 468,485 **** if (TREE_CODE (type) == REFERENCE_TYPE) type = TREE_TYPE (type); ! ! /* build reference to static Type_info */ ! #if 1 ! sorry ("finding Type_info for a type"); ! return error_mark_node; ! #else ! register tree t = TYPE_TINFO (type); ! if (t) ! return t; ! /* ... */ ! #endif } --- 496,523 ---- if (TREE_CODE (type) == REFERENCE_TYPE) type = TREE_TYPE (type); ! ! td = build_t_desc (type, 1); ! if (td == error_mark_node) ! return error_mark_node; ! t = TREE_OPERAND (td, 0); ! return t; ! } ! /* Get a bad_cast node for the program to throw... ! See libstdc++::exception{,.cc} for __bad_cast_object */ ! tree ! get_bad_cast_node () ! { ! static tree t; ! if (t == NULL_TREE ! && (t = lookup_name (get_identifier ("__bad_cast_object"), 0)) ! == NULL_TREE) ! { ! error ("you must #include "); ! return error_mark_node; ! } ! return t; } *************** *** 501,504 **** --- 539,554 ---- { case POINTER_TYPE: + if (ec == REFERENCE_TYPE) + { + expr = convert_from_reference (expr); + exprtype = TREE_TYPE (expr); + ec = TREE_CODE (exprtype); + } + if (ec != POINTER_TYPE) + goto fail; + if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE) + goto fail; + if (TYPE_SIZE (TREE_TYPE (exprtype)) == 0) + goto fail; if (TREE_TYPE (type) == void_type_node) break; *************** *** 510,516 **** /* else fall through */ default: ! cp_error ("`%#T' is not a valid type argument for dynamic_cast", type); ! error ("(must be either pointer or reference to defined class or void *)"); ! return error_mark_node; } --- 560,564 ---- /* else fall through */ default: ! goto fail; } *************** *** 521,531 **** ec = REFERENCE_TYPE; } ! ! /* the TREE_CODE of exprtype must match that of type. */ ! if (ec != tc) { ! cp_error ("`%E' (of type `%#T') fails to be of %s type", expr, exprtype, ! tc == POINTER_TYPE ? "pointer" : "reference"); ! return error_mark_node; } --- 569,581 ---- ec = REFERENCE_TYPE; } ! ! if (tc == REFERENCE_TYPE) { ! if (ec != REFERENCE_TYPE) ! goto fail; ! if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE) ! goto fail; ! if (TYPE_SIZE (TREE_TYPE (exprtype)) == 0) ! goto fail; } *************** *** 554,563 **** return build1 (NOP_EXPR, type, expr); ! sorry ("finding pointer to complete object"); ! return build1 (NOP_EXPR, type, expr); } else { tree retval; /* If we got here, we can't convert statically. Therefore, --- 604,613 ---- return build1 (NOP_EXPR, type, expr); ! return build_headof (expr); } else { tree retval; + tree result, td1, td2, elems, tmp1, expr1; /* If we got here, we can't convert statically. Therefore, *************** *** 570,576 **** cp_warning ("dynamic_cast of `%#D' to `%#T' can never succeed", expr, type); ! /* cplus_expand_throw (Bad_cast_node); */ ! sorry ("throwing Bad_cast"); ! return error_mark_node; } } --- 620,624 ---- cp_warning ("dynamic_cast of `%#D' to `%#T' can never succeed", expr, type); ! return build_throw (get_bad_cast_node ()); } } *************** *** 582,586 **** && TREE_CODE (TREE_TYPE (op)) == RECORD_TYPE) { ! cp_warning ("dynamic_cast of `%E' to `%#T' can never succeed", expr, type); retval = build_int_2 (0, 0); --- 630,634 ---- && TREE_CODE (TREE_TYPE (op)) == RECORD_TYPE) { ! cp_warning ("dynamic_cast of `%#D' to `%#T' can never succeed", expr, type); retval = build_int_2 (0, 0); *************** *** 589,600 **** } } /* Build run-time conversion. */ ! sorry ("run-time type conversion"); ! retval = build_int_2 (0, 0); ! TREE_TYPE (retval) = type; ! return retval; } } cp_error ("cannot dynamic_cast `%E' (of type `%#T') to type `%#T'", expr, exprtype, type); --- 637,680 ---- } } + + expr1 = expr; + if (tc == REFERENCE_TYPE) + expr1 = build_unary_op (ADDR_EXPR, expr1, 0); + /* Build run-time conversion. */ ! expr1 = build_headof (expr1); ! ! if (ec == POINTER_TYPE) ! td1 = build_typeid (build_indirect_ref (expr, NULL_PTR)); ! else ! td1 = build_typeid (expr); ! ! if (tc == POINTER_TYPE) ! td2 = get_typeid (TREE_TYPE (type)); ! else ! td2 = get_typeid (type); ! ! elems = tree_cons (NULL_TREE, td2, ! tree_cons (NULL_TREE, build_int_2 (1, 0), ! tree_cons (NULL_TREE, expr1, NULL_TREE))); ! result = build_method_call (td1, ! get_identifier ("__rtti_match"), elems, NULL_TREE, LOOKUP_NORMAL); ! ! if (tc == REFERENCE_TYPE) ! { ! expr1 = build_throw (get_bad_cast_node ()); ! expr1 = build_compound_expr (tree_cons (NULL_TREE, expr1, ! build_tree_list (NULL_TREE, convert (type, integer_zero_node)))); ! TREE_TYPE (expr1) = type; ! return build (COND_EXPR, type, result, result, expr1); ! } ! ! /* Now back to the type we want from a void*. */ ! result = convert (type, result); ! return result; } } + fail: cp_error ("cannot dynamic_cast `%E' (of type `%#T') to type `%#T'", expr, exprtype, type); *************** *** 617,637 **** static tree ! build_generic_desc (decl, elems) ! tree decl; tree elems; { ! tree init = build (CONSTRUCTOR, TREE_TYPE (decl), NULL_TREE, elems); TREE_CONSTANT (init) = 1; TREE_STATIC (init) = 1; TREE_READONLY (init) = 1; ! DECL_INITIAL (decl) = init; ! TREE_STATIC (decl) = 1; ! layout_decl (decl, 0); ! finish_decl (decl, init, 0, 0); ! return IDENTIFIER_AS_DESC (DECL_NAME (decl)); } /* Build an initializer for a __t_desc node. So that we can take advantage of recursion, we accept NULL for TYPE. --- 697,1204 ---- static tree ! build_generic_desc (tdecl, type, elems) ! tree tdecl; ! tree type; tree elems; { ! tree init = elems; ! int toplev = global_bindings_p (); ! TREE_CONSTANT (init) = 1; TREE_STATIC (init) = 1; TREE_READONLY (init) = 1; ! TREE_TYPE (tdecl) = type; ! DECL_INITIAL (tdecl) = init; ! TREE_STATIC (tdecl) = 1; ! DECL_SIZE (tdecl) = NULL_TREE; ! layout_decl (tdecl, 0); ! if (! toplev) ! push_to_top_level (); ! cp_finish_decl (tdecl, init, NULL_TREE, 0, 0); ! if (! toplev) ! pop_from_top_level (); ! ! if (! TREE_USED (tdecl)) ! { ! assemble_external (tdecl); ! TREE_USED (tdecl) = 1; ! } ! ! return IDENTIFIER_AS_DESC (DECL_NAME (tdecl)); ! } ! ! /* Build an initializer for a __bltn_desc node. */ ! static tree ! build_bltn_desc (tdecl, type) ! tree tdecl; ! tree type; ! { ! tree elems, t; ! ! if (type == boolean_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_BOOL"), ! 0, 0); ! else if (type == char_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_CHAR"), ! 0, 0); ! else if (type == short_integer_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_SHORT"), ! 0, 0); ! else if (type == integer_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_INT"), ! 0, 0); ! else if (type == long_integer_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_LONG"), ! 0, 0); ! else if (type == long_long_integer_type_node) ! t = lookup_field (__bltn_desc_type_node, ! get_identifier("_RTTI_BI_LONGLONG"), 0, 0); ! else if (type == float_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_FLOAT"), ! 0, 0); ! else if (type == double_type_node) ! t = lookup_field (__bltn_desc_type_node, ! get_identifier("_RTTI_BI_DOUBLE"), 0, 0); ! else if (type == long_double_type_node) ! t = lookup_field (__bltn_desc_type_node, ! get_identifier("_RTTI_BI_LDOUBLE"), 0, 0); ! else if (type == unsigned_char_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_UCHAR"), ! 0, 0); ! else if (type == short_unsigned_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_USHORT"), ! 0, 0); ! else if (type == unsigned_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_UINT"), ! 0, 0); ! else if (type == long_unsigned_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_ULONG"), ! 0, 0); ! else if (type == long_long_unsigned_type_node) ! t = lookup_field (__bltn_desc_type_node, ! get_identifier("_RTTI_BI_ULONGLONG"), 0, 0); ! else if (type == signed_char_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_SCHAR"), ! 0, 0); ! else if (type == wchar_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_WCHAR"), ! 0, 0); ! else if (type == void_type_node) ! t = lookup_field (__bltn_desc_type_node, get_identifier("_RTTI_BI_VOID"), ! 0, 0); ! else ! { ! cp_compiler_error ("type `%T' not handled as a built-in type"); ! } ! ! elems = tree_cons (NULL_TREE, t, NULL_TREE); ! return build_generic_desc (tdecl, __bltn_desc_type_node, elems); ! } ! ! /* Build an initializer for a __user_desc node. */ ! static tree ! build_user_desc (tdecl) ! tree tdecl; ! { ! tree elems, name_string, t; ! tree tname = DECL_NAME (tdecl); ! ! name_string = combine_strings (build_string ! (IDENTIFIER_LENGTH (tname)+1, IDENTIFIER_POINTER (tname))); ! elems = name_string; ! return build_generic_desc (tdecl, __user_desc_type_node, elems); ! } ! ! /* Build an initializer for a __class_type_info node. */ ! static tree ! build_class_desc (tdecl, type) ! tree tdecl; ! tree type; ! { ! tree tname = DECL_NAME (tdecl); ! tree name_string; ! ! int i = CLASSTYPE_N_BASECLASSES (type); ! int n_base = i; ! int base_cnt = 0; ! tree binfos = TYPE_BINFO_BASETYPES (type); ! tree vb = CLASSTYPE_VBASECLASSES (type); ! tree base, elems, access, offset, isvir; ! tree base_list, off_list, acc_list, isvir_list; ! tree t; ! static tree acc_pub = NULL_TREE; ! static tree acc_pro = NULL_TREE; ! static tree acc_pri = NULL_TREE; ! ! if (acc_pub == NULL_TREE) ! { ! acc_pub = lookup_field (__class_desc_type_node, ! get_identifier("_RTTI_ACCESS_PUBLIC"), 0, 0); ! acc_pro = lookup_field (__class_desc_type_node, ! get_identifier("_RTTI_ACCESS_PROTECTED"), 0, 0); ! acc_pri = lookup_field (__class_desc_type_node, ! get_identifier("_RTTI_ACCESS_PRIVATE"), 0, 0); ! } ! ! base_list = build_tree_list (NULL_TREE, integer_zero_node); ! off_list = build_tree_list (NULL_TREE, integer_zero_node); ! acc_list = build_tree_list (NULL_TREE, integer_zero_node); ! isvir_list = build_tree_list (NULL_TREE, integer_zero_node); ! while (--i >= 0) ! { ! tree binfo = TREE_VEC_ELT (binfos, i); ! ! base = build_t_desc (BINFO_TYPE (binfo), 1); ! if (TREE_VIA_VIRTUAL (binfo)) ! { ! tree t = BINFO_TYPE (binfo); ! char *name; ! tree field; ! int off; ! ! name = (char *) alloca (TYPE_NAME_LENGTH (t)+sizeof (VBASE_NAME)+1); ! sprintf (name, VBASE_NAME_FORMAT, TYPE_NAME_STRING (t)); ! field = lookup_field (type, get_identifier (name), 0, 0); ! offset = size_binop (FLOOR_DIV_EXPR, ! DECL_FIELD_BITPOS (field), size_int (BITS_PER_UNIT)); ! } ! else ! offset = BINFO_OFFSET (binfo); ! ! if (TREE_VIA_PUBLIC (binfo)) ! access = acc_pub; ! else if (TREE_VIA_PROTECTED (binfo)) ! access = acc_pro; ! else ! access = acc_pri; ! if (TREE_VIA_VIRTUAL (binfo)) ! isvir = build_int_2 (1, 0); ! else ! isvir = build_int_2 (0, 0); ! ! base_list = tree_cons (NULL_TREE, base, base_list); ! isvir_list = tree_cons (NULL_TREE, isvir, isvir_list); ! acc_list = tree_cons (NULL_TREE, access, acc_list); ! off_list = tree_cons (NULL_TREE, offset, off_list); ! base_cnt++; ! } ! #if 0 ! i = n_base; ! while (vb) ! { ! tree b; ! access = acc_pub; ! while (--i >= 0) ! { ! b = TREE_VEC_ELT (binfos, i); ! if (BINFO_TYPE (vb) == BINFO_TYPE (b) && TREE_VIA_VIRTUAL (b)) ! { ! if (TREE_VIA_PUBLIC (b)) ! access = acc_pub; ! else if (TREE_VIA_PROTECTED (b)) ! access = acc_pro; ! else ! access = acc_pri; ! break; ! } ! } ! base = build_t_desc (BINFO_TYPE (vb), 1); ! offset = BINFO_OFFSET (vb); ! isvir = build_int_2 (1, 0); ! ! base_list = tree_cons (NULL_TREE, base, base_list); ! isvir_list = tree_cons (NULL_TREE, isvir, isvir_list); ! acc_list = tree_cons (NULL_TREE, access, acc_list); ! off_list = tree_cons (NULL_TREE, offset, off_list); ! ! base_cnt++; ! vb = TREE_CHAIN (vb); ! } ! #endif ! base_list = finish_table (NULL_TREE, TYPE_POINTER_TO (__t_desc_type_node), ! base_list, 0); ! off_list = finish_table (NULL_TREE, integer_type_node, ! off_list, 0); ! isvir_list = finish_table (NULL_TREE, integer_type_node, ! isvir_list, 0); ! acc_list = finish_table (NULL_TREE, __access_mode_type_node, ! acc_list, 0); ! ! ! name_string = combine_strings (build_string (IDENTIFIER_LENGTH (tname)+1, IDENTIFIER_POINTER (tname))); ! ! elems = tree_cons (NULL_TREE, name_string, ! tree_cons (NULL_TREE, default_conversion (base_list), ! tree_cons (NULL_TREE, default_conversion (off_list), ! tree_cons (NULL_TREE, default_conversion (isvir_list), ! tree_cons (NULL_TREE, default_conversion (acc_list), ! tree_cons (NULL_TREE, build_int_2 (base_cnt, 0), NULL_TREE)))))); ! ! return build_generic_desc (tdecl, __class_desc_type_node, elems); ! } ! ! /* Build an initializer for a __pointer_type_info node. */ ! static tree ! build_ptr_desc (tdecl, type) ! tree tdecl; ! tree type; ! { ! tree t, elems; ! ! t = TREE_TYPE (type); ! t = build_t_desc (t, 1); ! t = build_indirect_ref (t, NULL); ! elems = tree_cons (NULL_TREE, t, NULL_TREE); ! return build_generic_desc (tdecl, __ptr_desc_type_node, elems); ! } ! ! /* Build an initializer for a __attr_type_info node. */ ! static tree ! build_attr_desc (tdecl, type) ! tree tdecl; ! tree type; ! { ! tree elems, t, attrval; ! ! if (TYPE_READONLY (type)) ! { ! if (TYPE_VOLATILE (type)) ! attrval = lookup_field (__attr_desc_type_node, ! get_identifier("_RTTI_ATTR_CONSTVOL"), 0, 0); ! else ! attrval = lookup_field (__attr_desc_type_node, ! get_identifier("_RTTI_ATTR_CONST"), 0, 0); ! } ! else ! { ! if (TYPE_VOLATILE (type)) ! attrval = lookup_field (__attr_desc_type_node, ! get_identifier("_RTTI_ATTR_VOLATILE"), 0, 0); ! } ! t = build_t_desc (TYPE_MAIN_VARIANT (type), 1); ! t = build_indirect_ref (t , NULL); ! elems = tree_cons (NULL_TREE, attrval, tree_cons (NULL_TREE, t, NULL_TREE)); ! return build_generic_desc (tdecl, __attr_desc_type_node, elems); ! } ! ! /* Build an initializer for a __func_type_info node. */ ! static tree ! build_func_desc (tdecl) ! tree tdecl; ! { ! tree elems, name_string; ! tree tname = DECL_NAME (tdecl); ! ! name_string = combine_strings (build_string ! (IDENTIFIER_LENGTH (tname)+1, IDENTIFIER_POINTER (tname))); ! elems = name_string; ! return build_generic_desc (tdecl, __func_desc_type_node, elems); ! } ! ! /* Build an initializer for a __ptmf_type_info node. */ ! static tree ! build_ptmf_desc (tdecl, type) ! tree tdecl; ! tree type; ! { ! tree elems, name_string; ! tree tname = DECL_NAME (tdecl); ! ! name_string = combine_strings (build_string ! (IDENTIFIER_LENGTH (tname)+1, IDENTIFIER_POINTER (tname))); ! elems = name_string; ! return build_generic_desc (tdecl, __ptmf_desc_type_node, elems); ! } ! ! /* Build an initializer for a __ptmd_type_info node. */ ! static tree ! build_ptmd_desc (tdecl, type) ! tree tdecl; ! tree type; ! { ! tree tc, t, elems; ! tc = build_t_desc (TYPE_OFFSET_BASETYPE (type), 1); ! tc = build_indirect_ref (tc , NULL); ! t = build_t_desc (TREE_TYPE (type), 1); ! t = build_indirect_ref (t , NULL); ! elems = tree_cons (NULL_TREE, tc, ! tree_cons (NULL_TREE, t, NULL_TREE)); ! return build_generic_desc (tdecl, __ptmd_desc_type_node, elems); ! } ! ! struct uninst_st { ! tree type; ! struct uninst_st *next; ! }; ! typedef struct uninst_st uninst_node; ! static uninst_node * uninst_desc = (uninst_node *)NULL; ! ! static void ! add_uninstantiated_desc (type) ! tree type; ! { ! uninst_node *t; ! ! t = (uninst_node *) xmalloc (sizeof (struct uninst_st)); ! t->type = type; ! t->next = uninst_desc; ! uninst_desc = t; ! } ! ! /* We may choose to link the emitting of certain high use TDs for certain ! objects, we do that here. Return the type to link against if such a ! link exists, otherwise just return TYPE. */ ! ! tree ! get_def_to_follow (type) ! tree type; ! { ! #if 0 ! /* For now we don't lay out T&, T* TDs with the main TD for the object. */ ! /* Let T* and T& be written only when T is written (if T is an aggr). ! We do this for const, but not for volatile, since volatile ! is rare and const is not. */ ! if (!TYPE_VOLATILE (taggr) ! && (TREE_CODE (taggr) == POINTER_TYPE ! || TREE_CODE (taggr) == REFERENCE_TYPE) ! && IS_AGGR_TYPE (TREE_TYPE (taggr))) ! taggr = TREE_TYPE (taggr); ! #endif ! return type; ! } ! ! /* build a general type_info node. */ ! tree ! build_t_desc (type, definition) ! tree type; ! int definition; ! { ! tree tdecl; ! tree tname, name_string; ! tree elems; ! tree t, tt, taggr; ! ! if (__ptmd_desc_type_node == NULL_TREE) ! { ! init_type_desc(); ! if (__ptmd_desc_type_node) ! { ! for ( ; uninst_desc; uninst_desc = uninst_desc->next ) ! build_t_desc (uninst_desc->type, 1); ! } ! } ! if (__t_desc_type_node == NULL_TREE) ! { ! static int warned = 0; ! if (! warned) ! { ! cp_error ("failed to build type descriptor node of '%T', maybe typeinfo.h not included", type); ! } ! warned = 1; ! return error_mark_node; ! } ! if (__ptmd_desc_type_node == NULL_TREE) ! { ! add_uninstantiated_desc (type); ! definition = 0; ! } ! ! push_obstacks (&permanent_obstack, &permanent_obstack); ! tname = build_t_desc_overload (type); ! ! if (!IDENTIFIER_AS_DESC (tname)) ! { ! tdecl = build_decl (VAR_DECL, tname, __t_desc_type_node); ! DECL_EXTERNAL (tdecl) = 1; ! TREE_PUBLIC (tdecl) = 1; ! tdecl = pushdecl_top_level (tdecl); ! SET_IDENTIFIER_AS_DESC (tname, build_unary_op (ADDR_EXPR, tdecl, 0)); ! if (!definition) ! cp_finish_decl (tdecl, NULL_TREE, NULL_TREE, 0, 0); ! } ! else ! tdecl = TREE_OPERAND (IDENTIFIER_AS_DESC (tname), 0); ! ! /* If it's not a definition, don't do anything more. */ ! if (!definition) ! return IDENTIFIER_AS_DESC (tname); ! ! /* If it has already been written, don't to anything more. */ ! /* Should this be on tdecl? */ ! if (TREE_ASM_WRITTEN (IDENTIFIER_AS_DESC (tname))) ! return IDENTIFIER_AS_DESC (tname); ! ! /* If we previously defined it, return the defined result. */ ! if (DECL_INITIAL (tdecl)) ! return IDENTIFIER_AS_DESC (tname); ! ! taggr = get_def_to_follow (type); ! ! /* If we know that we don't need to write out this type's ! vtable, then don't write out it's type_info. Somebody ! else will take care of that. */ ! if (IS_AGGR_TYPE (taggr) && CLASSTYPE_VFIELD (taggr)) ! { ! /* Let's play follow the vtable. */ ! TREE_PUBLIC (tdecl) = CLASSTYPE_INTERFACE_KNOWN (taggr); ! DECL_EXTERNAL (tdecl) = CLASSTYPE_INTERFACE_ONLY (taggr); ! } ! else ! { ! DECL_EXTERNAL (tdecl) = 0; ! TREE_PUBLIC (tdecl) = (definition > 1); ! } ! ! if (DECL_EXTERNAL (tdecl)) ! return IDENTIFIER_AS_DESC (tname); ! ! /* Show that we are defining the t_desc for this type. */ ! DECL_INITIAL (tdecl) = error_mark_node; ! t = DECL_CONTEXT (tdecl); ! if ( t && TREE_CODE_CLASS (TREE_CODE (t)) == 't') ! pushclass (t, 2); ! ! if (TYPE_VOLATILE (type) || TYPE_READONLY (type)) ! t = build_attr_desc (tdecl, type); ! else if (TREE_CODE (type) == ARRAY_TYPE) ! t = build_ptr_desc (tdecl, type); ! else if (TREE_CODE (type) == POINTER_TYPE) ! { ! if (TREE_CODE (TREE_TYPE (type)) == OFFSET_TYPE) ! { ! type = TREE_TYPE (type); ! t = build_ptmd_desc (tdecl, type); ! } ! else ! { ! t = build_ptr_desc (tdecl, type); ! } ! } ! else if (TYPE_BUILT_IN (type)) ! t = build_bltn_desc (tdecl, type); ! else if (IS_AGGR_TYPE (type)) ! { ! if (TYPE_PTRMEMFUNC_P (type)) ! { ! t = build_ptmf_desc (tdecl, type); ! } ! else ! { ! t = build_class_desc (tdecl, type); ! } ! } ! else if (TREE_CODE (type) == FUNCTION_TYPE) ! t = build_func_desc (tdecl); ! else ! t = build_user_desc (tdecl); ! pop_obstacks (); ! return t; } + #if 0 + /* This is the old dossier type descriptor generation code, it's much + more extended than rtti. It's reserved for later use. */ /* Build an initializer for a __t_desc node. So that we can take advantage of recursion, we accept NULL for TYPE. *************** *** 692,696 **** TREE_PUBLIC (tdecl) = ! CLASSTYPE_INTERFACE_ONLY (taggr) && CLASSTYPE_INTERFACE_KNOWN (taggr); - TREE_STATIC (tdecl) = 1; DECL_EXTERNAL (tdecl) = 0; } --- 1259,1262 ---- *************** *** 704,716 **** { DECL_EXTERNAL (tdecl) = 0; - TREE_STATIC (tdecl) = 1; TREE_PUBLIC (tdecl) = (definition > 1); } } SET_IDENTIFIER_AS_DESC (tname, build_unary_op (ADDR_EXPR, tdecl, 0)); if (!definition || DECL_EXTERNAL (tdecl)) { /* That's it! */ ! finish_decl (tdecl, 0, 0, 0); return IDENTIFIER_AS_DESC (tname); } --- 1270,1282 ---- { DECL_EXTERNAL (tdecl) = 0; TREE_PUBLIC (tdecl) = (definition > 1); } } SET_IDENTIFIER_AS_DESC (tname, build_unary_op (ADDR_EXPR, tdecl, 0)); + if (!definition || DECL_EXTERNAL (tdecl)) { /* That's it! */ ! cp_finish_decl (tdecl, NULL_TREE, NULL_TREE, 0, 0); return IDENTIFIER_AS_DESC (tname); } *************** *** 765,776 **** } ! parents = finish_table (0, TYPE_POINTER_TO (__t_desc_type_node), parents, 0); ! vbases = finish_table (0, TYPE_POINTER_TO (__t_desc_type_node), vbases, 0); ! offsets = finish_table (0, integer_type_node, offsets, 0); if (methods == NULL_TREE) methods = null_pointer_node; else methods = build_unary_op (ADDR_EXPR, ! finish_table (0, __m_desc_type_node, methods, 0), 0); if (ivars == NULL_TREE) --- 1331,1342 ---- } ! parents = finish_table (NULL_TREE, TYPE_POINTER_TO (__t_desc_type_node), parents, 0); ! vbases = finish_table (NULL_TREE, TYPE_POINTER_TO (__t_desc_type_node), vbases, 0); ! offsets = finish_table (NULL_TREE, integer_type_node, offsets, 0); if (methods == NULL_TREE) methods = null_pointer_node; else methods = build_unary_op (ADDR_EXPR, ! finish_table (NULL_TREE, __m_desc_type_node, methods, 0), 0); if (ivars == NULL_TREE) *************** *** 778,782 **** else ivars = build_unary_op (ADDR_EXPR, ! finish_table (0, __i_desc_type_node, ivars, 0), 0); if (TREE_TYPE (type)) --- 1344,1348 ---- else ivars = build_unary_op (ADDR_EXPR, ! finish_table (NULL_TREE, __i_desc_type_node, ivars, 0), 0); if (TREE_TYPE (type)) *************** *** 863,867 **** } ! parm_types = finish_table (0, TYPE_POINTER_TO (__t_desc_type_node), nreverse (parm_types), 0); parm_count = build_int_2 (p_count, 0); --- 1429,1433 ---- } ! parm_types = finish_table (NULL_TREE, TYPE_POINTER_TO (__t_desc_type_node), nreverse (parm_types), 0); parm_count = build_int_2 (p_count, 0); *************** *** 898,902 **** tree_cons (NULL_TREE, build_t_desc (TREE_TYPE (TREE_TYPE (decl)), ! IS_AGGR_TYPE (taggr)), ! tree_cons (NULL_TREE, build_c_cast (TYPE_POINTER_TO (default_function_type), build_unary_op (ADDR_EXPR, decl, 0)), tree_cons (NULL_TREE, parm_count, tree_cons (NULL_TREE, req_count, --- 1464,1468 ---- tree_cons (NULL_TREE, build_t_desc (TREE_TYPE (TREE_TYPE (decl)), ! IS_AGGR_TYPE (taggr)), ! tree_cons (NULL_TREE, build_c_cast (TYPE_POINTER_TO (default_function_type), build_unary_op (ADDR_EXPR, decl, 0), 0), tree_cons (NULL_TREE, parm_count, tree_cons (NULL_TREE, req_count, *************** *** 909,912 **** --- 1475,1480 ---- return taggr; } + #endif /* dossier */ + /* Conditionally emit code to set up an unwind-protect for the diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/gpcompare.texi gcc-2.7.0/cp/gpcompare.texi *** gcc-2.6.3/cp/gpcompare.texi Thu Apr 14 22:00:31 1994 --- gcc-2.7.0/cp/gpcompare.texi Wed Jan 25 14:54:46 1995 *************** *** 8,12 **** Project. ! @b{Section 3.4}, @i{Start and Termination}. It is now illegal to take the address of the function @samp{main()}. --- 8,12 ---- Project. ! @b{Section 3.4}, @i{Start and Termination}. It is now invalid to take the address of the function @samp{main()}. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/gxx.gperf gcc-2.7.0/cp/gxx.gperf *** gcc-2.6.3/cp/gxx.gperf Thu May 19 16:16:36 1994 --- gcc-2.7.0/cp/gxx.gperf Tue Jan 24 03:09:07 1995 *************** *** 20,25 **** --- 20,27 ---- __inline__, SCSPEC, RID_INLINE __label__, LABEL, NORID + __signature__, AGGR, RID_SIGNATURE /* Extension */, __signed, TYPESPEC, RID_SIGNED __signed__, TYPESPEC, RID_SIGNED + __sigof__, SIGOF, NORID /* Extension */, __typeof, TYPEOF, NORID __typeof__, TYPEOF, NORID *************** *** 28,32 **** --- 30,38 ---- __wchar_t, TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */, asm, ASM_KEYWORD, NORID, + and, ANDAND, NORID, + and_eq, ASSIGN, NORID, auto, SCSPEC, RID_AUTO, + bitand, '&', NORID, + bitor, '|', NORID, bool, TYPESPEC, RID_BOOL, break, BREAK, NORID, *************** *** 36,39 **** --- 42,46 ---- class, AGGR, RID_CLASS, classof, CLASSOF, NORID, + compl, '~', NORID, const, TYPE_QUAL, RID_CONST, const_cast, CONST_CAST, NORID, *************** *** 46,49 **** --- 53,57 ---- else, ELSE, NORID, enum, ENUM, NORID, + explicit, SCSPEC, RID_EXPLICIT, extern, SCSPEC, RID_EXTERN, false, CXX_FALSE, NORID, *************** *** 58,63 **** --- 66,76 ---- long, TYPESPEC, RID_LONG, mutable, SCSPEC, RID_MUTABLE, + namespace, NAMESPACE, NORID, new, NEW, NORID, + not, '!', NORID, + not_eq, EQCOMPARE, NORID, operator, OPERATOR, NORID, + or, OROR, NORID, + or_eq, ASSIGN, NORID, overload, OVERLOAD, NORID, private, VISSPEC, RID_PRIVATE, *************** *** 76,91 **** struct, AGGR, RID_RECORD, switch, SWITCH, NORID, this, THIS, NORID, throw, THROW, NORID, - template, TEMPLATE, RID_TEMPLATE, true, CXX_TRUE, NORID, try, TRY, NORID, typedef, SCSPEC, RID_TYPEDEF, ! typeof, TYPEOF, NORID, typeid, TYPEID, NORID, union, AGGR, RID_UNION, unsigned, TYPESPEC, RID_UNSIGNED, virtual, SCSPEC, RID_VIRTUAL, void, TYPESPEC, RID_VOID, volatile, TYPE_QUAL, RID_VOLATILE, while, WHILE, NORID, --- 89,108 ---- struct, AGGR, RID_RECORD, switch, SWITCH, NORID, + template, TEMPLATE, RID_TEMPLATE, this, THIS, NORID, throw, THROW, NORID, true, CXX_TRUE, NORID, try, TRY, NORID, typedef, SCSPEC, RID_TYPEDEF, ! typename, TYPENAME_KEYWORD, NORID, typeid, TYPEID, NORID, + typeof, TYPEOF, NORID, union, AGGR, RID_UNION, unsigned, TYPESPEC, RID_UNSIGNED, + using, USING, NORID, virtual, SCSPEC, RID_VIRTUAL, void, TYPESPEC, RID_VOID, volatile, TYPE_QUAL, RID_VOLATILE, while, WHILE, NORID, + xor, '^', NORID, + xor_eq, ASSIGN, NORID, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/gxxint.texi gcc-2.7.0/cp/gxxint.texi *** gcc-2.6.3/cp/gxxint.texi Thu Sep 29 20:48:49 1994 --- gcc-2.7.0/cp/gxxint.texi Tue May 16 07:13:35 1995 *************** *** 123,127 **** have themselves as their own @code{MAIN_VARIANT}s. The non-shared right ones, are copies of the left-most one, hence if it is its own ! @code{MAIN_VARIENT}, we know it IS a left-most one, if it is not, it is a non-left-most one. --- 123,127 ---- have themselves as their own @code{MAIN_VARIANT}s. The non-shared right ones, are copies of the left-most one, hence if it is its own ! @code{MAIN_VARIANT}, we know it IS a left-most one, if it is not, it is a non-left-most one. *************** *** 312,316 **** should be alphabetical. Eventually all macros should be documented here. There are some postscript drawings that can be used to better ! understnad from of the more complex data structures, contact Mike Stump (@code{mrs@@cygnus.com}) for information about them. --- 312,316 ---- should be alphabetical. Eventually all macros should be documented here. There are some postscript drawings that can be used to better ! understand from of the more complex data structures, contact Mike Stump (@code{mrs@@cygnus.com}) for information about them. *************** *** 552,556 **** A compiler constructed virtual destructor in derived classes that do not ! define an exlicit destructor that was defined exlicit in a base class has this bit set as well. Also used on __FUNCTION__ and __PRETTY_FUNCTION__ to mark they are ``compiler generated.'' c-decl and --- 552,556 ---- A compiler constructed virtual destructor in derived classes that do not ! define an explicit destructor that was defined explicit in a base class has this bit set as well. Also used on __FUNCTION__ and __PRETTY_FUNCTION__ to mark they are ``compiler generated.'' c-decl and *************** *** 559,563 **** Functions built by the C++ front-end such as default destructors, ! virtual desctructors and default constructors want to be marked that they are compiler generated, but unsure why. --- 559,563 ---- Functions built by the C++ front-end such as default destructors, ! virtual destructors and default constructors want to be marked that they are compiler generated, but unsure why. *************** *** 785,789 **** source file the declaration was found at. A value of 0 indicates that this TYPE_DECL is just an internal binding layer ! marker, and does not correspond to a user suppiled typedef. DECL_SOURCE_FILE --- 785,789 ---- source file the declaration was found at. A value of 0 indicates that this TYPE_DECL is just an internal binding layer ! marker, and does not correspond to a user supplied typedef. DECL_SOURCE_FILE *************** *** 1146,1159 **** semantics by the C++ front-end. The mapping is describe below. ! Objects with RTTI support should use the RTTI information to do mapping ! and checking. Objects without RTTI, like int and const char *, have to ! use another means of matching. Currently we use the normal mangling used in ! building functions names. Int's are "i", const char * is PCc, etc... ! ! Unfortunately, the standard allows standard type conversions on throw ! parameters so they can match catch handlers. This means we need a ! mechanism to handle type conversion at run time, ICK. I read this part ! again, and it appears that we only have to be able to do a few of the ! conversions at run time, so we should be ok. In C++, all cleanups should be protected by exception regions. The --- 1146,1164 ---- semantics by the C++ front-end. The mapping is describe below. ! When -frtti is used, rtti is used to do exception object type checking, ! when it isn't used, the encoded name for the type of the object being ! thrown is used instead. All code that originates exceptions, even code ! that throws exceptions as a side effect, like dynamic casting, and all ! code that catches exceptions must be compiled with either -frtti, or ! -fno-rtti. It is not possible to mix rtti base exception handling ! objects with code that doesn't use rtti. The exceptions to this, are ! code that doesn't catch or throw exceptions, catch (...), and code that ! just rethrows an exception. ! ! Currently we use the normal mangling used in building functions names ! (int's are "i", const char * is PCc) to build the non-rtti base type ! descriptors for exception handling. These descriptors are just plain ! NULL terminated strings, and internally they are passed around as char ! *. In C++, all cleanups should be protected by exception regions. The *************** *** 1186,1212 **** adjusted back to the normal value for the frame in which the handler resides, and the stack pointer is left unchanged from the time at which ! the object was throwed. This is so that there is always someplace for the exception object, and nothing can overwrite it, once we start throwing. The only bad part, is that the stack remains large. ! Flaws in g++'s exception handling. The stack pointer is restored from ! stack, we want to match rs6000, and propagate the stack pointer from ! time of throw, down, to the catch place. ! ! Only exact type matching of throw types works (references work also), ! catch variables cannot be used. Only works on a Sun sparc running SunOS ! 4.1.x. Unwinding to outer catch clauses works. All temps and local ! variables are cleaned up in all unwinded scopes. Completed parts of ! partially constructed objects are not cleaned up. Don't expect ! exception handling to work right if you optimize, in fact the compiler ! will probably core dump. If two EH regions are the exact same size, the backend cannot tell which one is first. It punts by picking the last one, if they tie. This is usually right. We really should stick in a nop, if they are the same size. - If we fall off the end of a series of catch blocks, we return to the - flow of control in a normal fasion. But this is wrong, we should - rethrow. - When we invoke the copy constructor for an exception object because it is passed by value, and if we take a hit (exception) inside the copy --- 1191,1216 ---- adjusted back to the normal value for the frame in which the handler resides, and the stack pointer is left unchanged from the time at which ! the object was thrown. This is so that there is always someplace for the exception object, and nothing can overwrite it, once we start throwing. The only bad part, is that the stack remains large. ! The below points out some flaws in g++'s exception handling, as it now ! stands. ! ! Only exact type matching or reference matching of throw types works when ! -fno-rtti is used. Only works on a SPARC (like Suns), i386, arm and ! rs6000 machines. Partial support is also in for alpha, hppa, m68k and ! mips machines, but a stack unwinder called __unwind_function has to be ! written, and added to libgcc2 for them. See below for details on ! __unwind_function. All completely constructed temps and local variables ! are cleaned up in all unwinded scopes. Completed parts of partially ! constructed objects are cleaned up with the exception that partially ! built arrays are not cleaned up as required. Don't expect exception ! handling to work right if you optimize, in fact the compiler will ! probably core dump. If two EH regions are the exact same size, the backend cannot tell which one is first. It punts by picking the last one, if they tie. This is usually right. We really should stick in a nop, if they are the same size. When we invoke the copy constructor for an exception object because it is passed by value, and if we take a hit (exception) inside the copy *************** *** 1217,1230 **** protect the rest of the handler in some fashion. Maybe just changing the handler's handler to protect the whole series of handlers is the ! right way to go. ! The EH object is copied like it should be, if it is passed by value, ! otherwise we get a reference directly to it. ! EH objects make it through unwinding, but are subject to being ! overwritten as they are still past the top of stack. Don't throw ! automatic objects if this is a problem. ! Exceptions in catch handlers now go to outer block. @node Free Store, Concept Index, Exception Handling, Top --- 1221,1288 ---- protect the rest of the handler in some fashion. Maybe just changing the handler's handler to protect the whole series of handlers is the ! right way to go. This part is wrong. We should call terminate if an ! exception is thrown while doing things like trying to copy the exception ! object. ! ! Exception specifications are handled syntax wise, but not semantic wise. ! build_exception_variant should sort the incoming list, so that is ! implements set compares, not exact list equality. Type smashing should ! smash exception specifications using set union. ! ! Thrown objects are allocated on the heap, in the usual way, but they are ! never deleted. They should be deleted by the catch clauses. If one ! runs out of heap space, throwing an object will probably never work. ! This could be relaxed some by passing an __in_chrg parameter to track ! who has control over the exception object. ! ! When the backend returns a value, it can create new exception regions ! that need protecting. The new region should rethrow the object in ! context of the last associated cleanup that ran to completion. ! ! The __unwind_function takes a pointer to the throw handler, and is ! expected to pop the stack frame that was built to call it, as well as ! the frame underneath and then jump to the throw handler. It must not ! change the three registers allocated for the pointer to the exception ! object, the pointer to the type descriptor that identifies the type of ! the exception object, and the pointer to the code that threw. On hppa, ! these are %r5, %r6, %r7. On m68k these are a2, a3, a4. On mips they ! are s0, s1, s2. On Alpha these are $9, $10, $11. It takes about a day ! to write this routine, if someone wants to volunteer to write this ! routine for any architecture, exception support for that architecture ! will be added to g++. Please send in those code donations. ! ! ! The backend must be extended to fully support exceptions. Right now ! there are a few hooks into the alpha exception handling backend that ! resides in the C++ frontend from that backend that allows exception ! handling to work in g++. An exception region is a segment of generated ! code that has a handler associated with it. The exception regions are ! denoted in the generated code as address ranges denoted by a starting PC ! value and an ending PC value of the region. Some of the limitations ! with this scheme are: ! ! @itemize @bullet ! @item ! The backend replicates insns for such things as loop unrolling and ! function inlining. Right now, there are no hooks into the frontend's ! exception handling backend to handle the replication of insns. When ! replication happens, a new exception region descriptor needs to be ! generated for the new region. ! ! @item ! The backend expects to be able to rearrange code, for things like jump ! optimization. Any rearranging of the code needs have exception region ! descriptors updated appropriately. ! @item ! The backend can eliminate dead code. Any associated exception region ! descriptor that refers to fully contained code that has been eliminated ! should also be removed, although not doing this is harmless in terms of ! semantics. ! #end itemize ! The above is not meant to be exhaustive, but does include all things I ! have thought of so far. I am sure other limitations exist. @node Free Store, Concept Index, Exception Handling, Top *************** *** 1263,1266 **** --- 1321,1335 ---- @} @end example + + @section Linkage + The linkage code in g++ is horribly twisted in order to meet two design goals: + + 1) Avoid unnecessary emission of inlines and vtables. + + 2) Support pedantic assemblers like the one in AIX. + + To meet the first goal, we defer emission of inlines and vtables until + the end of the translation unit, where we can decide whether or not they + are needed, and how to emit them if they are. @node Concept Index, , Free Store, Top diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/hash.h gcc-2.7.0/cp/hash.h *** gcc-2.6.3/cp/hash.h Thu May 19 16:16:39 1994 --- gcc-2.7.0/cp/hash.h Mon Nov 28 19:54:35 1994 *************** *** 1,13 **** /* C code produced by gperf version 2.5 (GNU C++ version) */ ! /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ /deneb/blob/jason/g++/small/devo/gcc/cp/gxx.gperf */ /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ struct resword { char *name; short token; enum rid rid;}; ! #define TOTAL_KEYWORDS 86 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 16 #define MIN_HASH_VALUE 4 ! #define MAX_HASH_VALUE 171 ! /* maximum key range = 168, duplicates = 0 */ #ifdef __GNUC__ --- 1,13 ---- /* C code produced by gperf version 2.5 (GNU C++ version) */ ! /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ../../../devo/gcc/cp/gxx.gperf */ /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ struct resword { char *name; short token; enum rid rid;}; ! #define TOTAL_KEYWORDS 101 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 16 #define MIN_HASH_VALUE 4 ! #define MAX_HASH_VALUE 210 ! /* maximum key range = 207, duplicates = 0 */ #ifdef __GNUC__ *************** *** 21,37 **** static unsigned char asso_values[] = { ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, ! 172, 172, 172, 172, 172, 0, 172, 36, 1, 61, ! 0, 0, 30, 44, 44, 35, 172, 7, 12, 53, ! 40, 17, 6, 172, 28, 2, 4, 35, 31, 51, ! 5, 7, 172, 172, 172, 172, 172, 172, }; register int hval = len; --- 21,37 ---- static unsigned char asso_values[] = { ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, ! 211, 211, 211, 211, 211, 0, 211, 35, 1, 69, ! 61, 0, 19, 65, 20, 100, 211, 5, 11, 52, ! 3, 25, 6, 2, 31, 26, 4, 41, 24, 64, ! 10, 24, 211, 211, 211, 211, 211, 211, }; register int hval = len; *************** *** 66,183 **** {"",}, {"",}, {"",}, {"",}, {"else", ELSE, NORID,}, ! {"",}, ! {"delete", DELETE, NORID,}, ! {"double", TYPESPEC, RID_DOUBLE,}, {"true", CXX_TRUE, NORID,}, ! {"__asm__", GCC_ASM_KEYWORD, NORID}, ! {"typeid", TYPEID, NORID,}, ! {"",}, ! {"this", THIS, NORID,}, {"",}, ! {"try", TRY, NORID,}, ! {"",}, {"",}, {"",}, {"",}, ! {"do", DO, NORID,}, {"",}, ! {"static_cast", STATIC_CAST, NORID,}, {"template", TEMPLATE, RID_TEMPLATE,}, ! {"protected", VISSPEC, RID_PROTECTED,}, {"",}, ! {"__classof__", CLASSOF, NORID}, {"",}, {"__headof__", HEADOF, NORID}, {"",}, ! {"bool", TYPESPEC, RID_BOOL,}, {"__const__", TYPE_QUAL, RID_CONST}, {"__volatile", TYPE_QUAL, RID_VOLATILE}, {"__const", TYPE_QUAL, RID_CONST}, {"__volatile__", TYPE_QUAL, RID_VOLATILE}, ! {"__typeof__", TYPEOF, NORID}, ! {"void", TYPESPEC, RID_VOID,}, ! {"friend", SCSPEC, RID_FRIEND,}, {"false", CXX_FALSE, NORID,}, {"sizeof", SIZEOF, NORID,}, - {"short", TYPESPEC, RID_SHORT,}, - {"typeof", TYPEOF, NORID,}, - {"",}, - {"int", TYPESPEC, RID_INT,}, - {"__signed", TYPESPEC, RID_SIGNED}, - {"private", VISSPEC, RID_PRIVATE,}, - {"__signed__", TYPESPEC, RID_SIGNED}, - {"extern", SCSPEC, RID_EXTERN,}, - {"struct", AGGR, RID_RECORD,}, - {"signed", TYPESPEC, RID_SIGNED,}, - {"break", BREAK, NORID,}, - {"__attribute", ATTRIBUTE, NORID}, - {"default", DEFAULT, NORID,}, - {"__attribute__", ATTRIBUTE, NORID}, - {"__classof", CLASSOF, NORID}, - {"sigof", SIGOF, NORID /* Extension */,}, {"__headof", HEADOF, NORID}, - {"switch", SWITCH, NORID,}, - {"__label__", LABEL, NORID}, - {"__extension__", EXTENSION, NORID}, - {"",}, - {"__asm", GCC_ASM_KEYWORD, NORID}, {"for", FOR, NORID,}, - {"__typeof", TYPEOF, NORID}, - {"__alignof__", ALIGNOF, NORID}, {"",}, ! {"case", CASE, NORID,}, {"virtual", SCSPEC, RID_VIRTUAL,}, ! {"if", IF, NORID,}, ! {"while", WHILE, NORID,}, {"",}, ! {"class", AGGR, RID_CLASS,}, ! {"typedef", SCSPEC, RID_TYPEDEF,}, ! {"const", TYPE_QUAL, RID_CONST,}, ! {"static", SCSPEC, RID_STATIC,}, ! {"auto", SCSPEC, RID_AUTO,}, {"float", TYPESPEC, RID_FLOAT,}, ! {"inline", SCSPEC, RID_INLINE,}, ! {"throw", THROW, NORID,}, ! {"unsigned", TYPESPEC, RID_UNSIGNED,}, {"",}, ! {"headof", HEADOF, NORID,}, {"",}, ! {"goto", GOTO, NORID,}, ! {"",}, {"",}, ! {"public", VISSPEC, RID_PUBLIC,}, ! {"signature", AGGR, RID_SIGNATURE /* Extension */,}, {"volatile", TYPE_QUAL, RID_VOLATILE,}, ! {"__inline", SCSPEC, RID_INLINE}, ! {"overload", OVERLOAD, NORID,}, ! {"__inline__", SCSPEC, RID_INLINE}, ! {"__alignof", ALIGNOF, NORID}, ! {"asm", ASM_KEYWORD, NORID,}, {"",}, ! {"new", NEW, NORID,}, {"",}, {"mutable", SCSPEC, RID_MUTABLE,}, - {"union", AGGR, RID_UNION,}, - {"operator", OPERATOR, NORID,}, - {"register", SCSPEC, RID_REGISTER,}, - {"",}, {"",}, - {"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,}, {"",}, ! {"long", TYPESPEC, RID_LONG,}, {"",}, {"",}, {"",}, ! {"continue", CONTINUE, NORID,}, ! {"return", RETURN, NORID,}, {"enum", ENUM, NORID,}, ! {"",}, {"",}, ! {"dynamic_cast", DYNAMIC_CAST, NORID,}, {"",}, {"",}, ! {"reinterpret_cast", REINTERPRET_CAST, NORID,}, ! {"",}, {"",}, {"",}, {"",}, ! {"char", TYPESPEC, RID_CHAR,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"classof", CLASSOF, NORID,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"const_cast", CONST_CAST, NORID,}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, {"",}, {"",}, {"",}, ! {"catch", CATCH, NORID,}, }; --- 66,207 ---- {"",}, {"",}, {"",}, {"",}, {"else", ELSE, NORID,}, ! {"",}, {"",}, {"",}, {"true", CXX_TRUE, NORID,}, ! {"extern", SCSPEC, RID_EXTERN,}, ! {"not", '!', NORID,}, ! {"not_eq", EQCOMPARE, NORID,}, ! {"",}, {"",}, ! {"__inline", SCSPEC, RID_INLINE}, {"",}, ! {"__inline__", SCSPEC, RID_INLINE}, {"",}, ! {"xor_eq", ASSIGN, NORID,}, ! {"",}, {"",}, {"",}, {"template", TEMPLATE, RID_TEMPLATE,}, ! {"",}, {"",}, ! {"__alignof__", ALIGNOF, NORID}, ! {"__extension__", EXTENSION, NORID}, ! {"bool", TYPESPEC, RID_BOOL,}, {"",}, ! {"typeof", TYPEOF, NORID,}, ! {"",}, ! {"try", TRY, NORID,}, ! {"or_eq", ASSIGN, NORID,}, ! {"__asm__", GCC_ASM_KEYWORD, NORID}, {"",}, {"__headof__", HEADOF, NORID}, {"",}, ! {"private", VISSPEC, RID_PRIVATE,}, {"__const__", TYPE_QUAL, RID_CONST}, {"__volatile", TYPE_QUAL, RID_VOLATILE}, {"__const", TYPE_QUAL, RID_CONST}, {"__volatile__", TYPE_QUAL, RID_VOLATILE}, ! {"__alignof", ALIGNOF, NORID}, ! {"and_eq", ASSIGN, NORID,}, ! {"xor", '^', NORID,}, ! {"static_cast", STATIC_CAST, NORID,}, ! {"break", BREAK, NORID,}, ! {"namespace", NAMESPACE, NORID,}, ! {"__classof__", CLASSOF, NORID}, ! {"typedef", SCSPEC, RID_TYPEDEF,}, {"false", CXX_FALSE, NORID,}, {"sizeof", SIZEOF, NORID,}, {"__headof", HEADOF, NORID}, {"for", FOR, NORID,}, {"",}, ! {"__label__", LABEL, NORID}, ! {"switch", SWITCH, NORID,}, {"virtual", SCSPEC, RID_VIRTUAL,}, ! {"or", OROR, NORID,}, ! {"__typeof__", TYPEOF, NORID}, ! {"this", THIS, NORID,}, {"",}, ! {"bitor", '|', NORID,}, {"float", TYPESPEC, RID_FLOAT,}, ! {"typename", TYPENAME_KEYWORD, NORID,}, ! {"__classof", CLASSOF, NORID}, ! {"short", TYPESPEC, RID_SHORT,}, ! {"delete", DELETE, NORID,}, ! {"double", TYPESPEC, RID_DOUBLE,}, {"",}, ! {"new", NEW, NORID,}, ! {"typeid", TYPEID, NORID,}, {"",}, ! {"case", CASE, NORID,}, ! {"union", AGGR, RID_UNION,}, ! {"sigof", SIGOF, NORID /* Extension */,}, ! {"__typeof", TYPEOF, NORID}, ! {"struct", AGGR, RID_RECORD,}, {"volatile", TYPE_QUAL, RID_VOLATILE,}, ! {"signature", AGGR, RID_SIGNATURE /* Extension */,}, ! {"while", WHILE, NORID,}, ! {"return", RETURN, NORID,}, {"",}, ! {"__asm", GCC_ASM_KEYWORD, NORID}, ! {"protected", VISSPEC, RID_PROTECTED,}, ! {"reinterpret_cast", REINTERPRET_CAST, NORID,}, ! {"friend", SCSPEC, RID_FRIEND,}, ! {"",}, ! {"do", DO, NORID,}, ! {"auto", SCSPEC, RID_AUTO,}, ! {"asm", ASM_KEYWORD, NORID,}, ! {"compl", '~', NORID,}, ! {"public", VISSPEC, RID_PUBLIC,}, {"",}, {"mutable", SCSPEC, RID_MUTABLE,}, {"",}, ! {"signed", TYPESPEC, RID_SIGNED,}, ! {"",}, ! {"throw", THROW, NORID,}, ! {"and", ANDAND, NORID,}, {"",}, {"",}, {"",}, ! {"bitand", '&', NORID,}, ! {"const", TYPE_QUAL, RID_CONST,}, ! {"static", SCSPEC, RID_STATIC,}, ! {"headof", HEADOF, NORID,}, ! {"int", TYPESPEC, RID_INT,}, {"enum", ENUM, NORID,}, ! {"",}, ! {"__signed__", TYPESPEC, RID_SIGNED}, ! {"default", DEFAULT, NORID,}, ! {"",}, ! {"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,}, ! {"using", USING, NORID,}, ! {"__attribute", ATTRIBUTE, NORID}, ! {"",}, ! {"__attribute__", ATTRIBUTE, NORID}, ! {"",}, ! {"goto", GOTO, NORID,}, ! {"operator", OPERATOR, NORID,}, ! {"if", IF, NORID,}, ! {"continue", CONTINUE, NORID,}, ! {"explicit", SCSPEC, RID_EXPLICIT,}, {"",}, {"",}, ! {"class", AGGR, RID_CLASS,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, + {"char", TYPESPEC, RID_CHAR,}, + {"",}, {"",}, {"",}, {"",}, {"classof", CLASSOF, NORID,}, + {"",}, {"",}, {"",}, {"",}, + {"long", TYPESPEC, RID_LONG,}, + {"",}, {"",}, {"",}, {"",}, + {"void", TYPESPEC, RID_VOID,}, + {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, + {"overload", OVERLOAD, NORID,}, + {"",}, {"",}, + {"catch", CATCH, NORID,}, + {"",}, {"",}, {"",}, {"",}, {"",}, + {"__signed", TYPESPEC, RID_SIGNED}, + {"register", SCSPEC, RID_REGISTER,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"const_cast", CONST_CAST, NORID,}, ! {"",}, {"",}, ! {"dynamic_cast", DYNAMIC_CAST, NORID,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"inline", SCSPEC, RID_INLINE,}, ! {"",}, {"",}, {"",}, ! {"unsigned", TYPESPEC, RID_UNSIGNED,}, }; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/init.c gcc-2.7.0/cp/init.c *** gcc-2.6.3/cp/init.c Tue Oct 11 14:19:21 1994 --- gcc-2.7.0/cp/init.c Thu Jun 15 08:24:20 1995 *************** *** 1,4 **** /* Handle initialization things in C++. ! Copyright (C) 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Handle initialization things in C++. ! Copyright (C) 1987, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 27,30 **** --- 28,32 ---- #include "cp-tree.h" #include "flags.h" + #include "output.h" #undef NULL *************** *** 109,113 **** initialize for. This is the case when addr is a pointer to a sub object of a complete object, and we only want to do part of the ! complete object's initiailzation of vtable pointers. This is done for all virtual table pointers in virtual base classes. REAL_BINFO is used to find the BINFO_VTABLE that we initialize with. BINFO is --- 111,115 ---- initialize for. This is the case when addr is a pointer to a sub object of a complete object, and we only want to do part of the ! complete object's initialization of vtable pointers. This is done for all virtual table pointers in virtual base classes. REAL_BINFO is used to find the BINFO_VTABLE that we initialize with. BINFO is *************** *** 139,143 **** #if 0 /* Before turning this on, make sure it is correct. */ ! if (can_elide && ! BINFO_MODIFIED (binfo)) return; #endif --- 141,145 ---- #if 0 /* Before turning this on, make sure it is correct. */ ! if (can_elide && ! BINFO_MODIFIED (binfo)) return; #endif *************** *** 153,158 **** /* Subroutine of emit_base_init. */ static void ! perform_member_init (member, name, init, explicit) ! tree member, name, init; int explicit; { --- 155,160 ---- /* Subroutine of emit_base_init. */ static void ! perform_member_init (member, name, init, explicit, protect_list) ! tree member, name, init, *protect_list; int explicit; { *************** *** 181,185 **** } else ! expand_aggr_init (decl, init, 0); } else --- 183,187 ---- } else ! expand_aggr_init (decl, init, 0, 0); } else *************** *** 219,226 **** } expand_cleanups_to (NULL_TREE); ! if (flag_handle_exceptions && TYPE_NEEDS_DESTRUCTOR (type)) ! cp_warning ("caution, member `%D' may not be destroyed in the presense of an exception during construction", member); } /* Subroutine of emit_member_init. */ static tree --- 221,241 ---- } expand_cleanups_to (NULL_TREE); ! ! if (TYPE_NEEDS_DESTRUCTOR (type)) ! { ! tree expr = build_component_ref (C_C_D, name, 0, explicit); ! expr = build_delete (type, expr, integer_zero_node, ! LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR, 0); ! ! if (expr != error_mark_node) ! { ! start_protect (); ! *protect_list = tree_cons (NULL_TREE, expr, *protect_list); ! } ! } } + extern int warn_reorder; + /* Subroutine of emit_member_init. */ static tree *************** *** 228,236 **** tree t; { - extern int warn_reorder; tree x, member, name, field, init; tree init_list = NULL_TREE; tree fields_to_unmark = NULL_TREE; - int found; int last_pos = 0; tree last_field; --- 243,249 ---- *************** *** 239,243 **** { int pos; ! found = 0; for (x = current_member_init_list, pos = 0; x; x = TREE_CHAIN (x), ++pos) { --- 252,262 ---- { int pos; ! ! /* member could be, for example, a CONST_DECL for an enumerated ! tag; we don't want to try to initialize that, since it already ! has a value. */ ! if (TREE_CODE (member) != FIELD_DECL || !DECL_NAME (member)) ! continue; ! for (x = current_member_init_list, pos = 0; x; x = TREE_CHAIN (x), ++pos) { *************** *** 262,276 **** if (field == member) { ! /* See if we already found an initializer for this field. */ ! if (found) ! { ! if (DECL_NAME (field)) ! cp_error ("multiple initializations given for member `%D'", ! field); ! continue; ! } ! else { ! if (pos < last_pos && warn_reorder) { cp_warning_at ("member initializers for `%#D'", last_field); --- 281,287 ---- if (field == member) { ! if (warn_reorder) { ! if (pos < last_pos) { cp_warning_at ("member initializers for `%#D'", last_field); *************** *** 282,291 **** } - init_list = chainon (init_list, - build_tree_list (name, TREE_VALUE (x))); /* Make sure we won't try to work on this init again. */ TREE_PURPOSE (x) = NULL_TREE; ! found = 1; ! break; } } --- 293,300 ---- } /* Make sure we won't try to work on this init again. */ TREE_PURPOSE (x) = NULL_TREE; ! x = build_tree_list (name, TREE_VALUE (x)); ! goto got_it; } } *************** *** 294,357 **** so the two lists (INIT_LIST and the list of members) will be symmetrical. */ ! if (! found) ! init_list = chainon (init_list, build_tree_list (NULL_TREE, NULL_TREE)); } for (x = current_member_init_list ; x ; x = TREE_CHAIN (x)) { ! if (TREE_PURPOSE (x)) { ! name = TREE_PURPOSE (x); ! init = TREE_VALUE (x); ! /* XXX: this may need the COMPONENT_REF operand 0 check if ! it turns out we actually get them. */ ! field = IDENTIFIER_CLASS_VALUE (name); ! ! /* If one member shadows another, get the outermost one. */ ! if (TREE_CODE (field) == TREE_LIST) { ! field = TREE_VALUE (field); ! if (decl_type_context (field) != current_class_type) ! cp_error ("field `%D' not in immediate context", field); } ! #if 0 ! /* It turns out if you have an anonymous union in the ! class, a member from it can end up not being on the ! list of fields (rather, the type is), and therefore ! won't be seen by the for loop above. */ ! /* The code in this for loop is derived from a general loop ! which had this check in it. Theoretically, we've hit ! every initialization for the list of members in T, so ! we shouldn't have anything but these left in this list. */ ! my_friendly_assert (DECL_FIELD_CONTEXT (field) != t, 351); ! #endif ! if (TREE_HAS_CONSTRUCTOR (field)) { ! if (DECL_NAME (field)) ! error ("multiple initializations given for member `%s'", ! IDENTIFIER_POINTER (DECL_NAME (field))); ! continue; } ! TREE_HAS_CONSTRUCTOR (field) = 1; ! fields_to_unmark = tree_cons (NULL_TREE, field, fields_to_unmark); ! perform_member_init (field, name, init, 1); ! TREE_PURPOSE (x) = NULL_TREE; } } ! /* Unmark fields which are initialized for the base class. */ ! while (fields_to_unmark) { ! TREE_HAS_CONSTRUCTOR (TREE_VALUE (fields_to_unmark)) = 0; ! /* XXX is this a memory leak? */ ! fields_to_unmark = TREE_CHAIN (fields_to_unmark); } ! return init_list; } --- 303,483 ---- so the two lists (INIT_LIST and the list of members) will be symmetrical. */ ! x = build_tree_list (NULL_TREE, NULL_TREE); ! got_it: ! init_list = chainon (init_list, x); } + /* Initializers for base members go at the end. */ for (x = current_member_init_list ; x ; x = TREE_CHAIN (x)) { ! name = TREE_PURPOSE (x); ! if (name) { ! if (purpose_member (name, init_list)) { ! cp_error ("multiple initializations given for member `%D'", ! IDENTIFIER_CLASS_VALUE (name)); ! continue; } + + init_list = chainon (init_list, + build_tree_list (name, TREE_VALUE (x))); + TREE_PURPOSE (x) = NULL_TREE; + } + } ! return init_list; ! } ! static void ! sort_base_init (t, rbase_ptr, vbase_ptr) ! tree t, *rbase_ptr, *vbase_ptr; ! { ! tree binfos = BINFO_BASETYPES (TYPE_BINFO (t)); ! int n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0; ! ! int i; ! tree x; ! tree last; ! /* For warn_reorder. */ ! int last_pos = 0; ! tree last_base = NULL_TREE; ! ! tree rbases = NULL_TREE; ! tree vbases = NULL_TREE; ! ! /* First walk through and splice out vbase and invalid initializers. ! Also replace names with binfos. */ ! ! last = tree_cons (NULL_TREE, NULL_TREE, current_base_init_list); ! for (x = TREE_CHAIN (last); x; x = TREE_CHAIN (x)) ! { ! tree basename = TREE_PURPOSE (x); ! tree binfo; ! ! if (basename == NULL_TREE) ! { ! /* Initializer for single base class. Must not ! use multiple inheritance or this is ambiguous. */ ! switch (n_baseclasses) { ! case 0: ! cp_error ("`%T' does not have a base class to initialize", ! current_class_type); ! return; ! case 1: ! break; ! default: ! cp_error ("unnamed initializer ambiguous for `%T' which uses multiple inheritance", ! current_class_type); ! return; } + binfo = TREE_VEC_ELT (binfos, 0); + } + else if (is_aggr_typedef (basename, 1)) + { + binfo = binfo_or_else (IDENTIFIER_TYPE_VALUE (basename), t); + if (binfo == NULL_TREE) + continue; ! /* Virtual base classes are special cases. Their initializers ! are recorded with this constructor, and they are used when ! this constructor is the top-level constructor called. */ ! if (TREE_VIA_VIRTUAL (binfo)) ! { ! tree v = CLASSTYPE_VBASECLASSES (t); ! while (BINFO_TYPE (v) != BINFO_TYPE (binfo)) ! v = TREE_CHAIN (v); ! vbases = tree_cons (v, TREE_VALUE (x), vbases); ! continue; ! } ! else ! { ! /* Otherwise, if it is not an immediate base class, complain. */ ! for (i = n_baseclasses-1; i >= 0; i--) ! if (BINFO_TYPE (binfo) == BINFO_TYPE (TREE_VEC_ELT (binfos, i))) ! break; ! if (i < 0) ! { ! cp_error ("`%T' is not an immediate base class of `%T'", ! IDENTIFIER_TYPE_VALUE (basename), ! current_class_type); ! continue; ! } ! } } + else + my_friendly_abort (365); + + TREE_PURPOSE (x) = binfo; + TREE_CHAIN (last) = x; + last = x; } + TREE_CHAIN (last) = NULL_TREE; + + /* Now walk through our regular bases and make sure they're initialized. */ ! for (i = 0; i < n_baseclasses; ++i) { ! tree base_binfo = TREE_VEC_ELT (binfos, i); ! int pos; ! ! if (TREE_VIA_VIRTUAL (base_binfo)) ! continue; ! ! for (x = current_base_init_list, pos = 0; x; x = TREE_CHAIN (x), ++pos) ! { ! tree binfo = TREE_PURPOSE (x); ! ! if (binfo == NULL_TREE) ! continue; ! ! if (binfo == base_binfo) ! { ! if (warn_reorder) ! { ! if (pos < last_pos) ! { ! cp_warning_at ("base initializers for `%#T'", last_base); ! cp_warning_at (" and `%#T'", BINFO_TYPE (binfo)); ! warning (" will be re-ordered to match inheritance order"); ! } ! last_pos = pos; ! last_base = BINFO_TYPE (binfo); ! } ! ! /* Make sure we won't try to work on this init again. */ ! TREE_PURPOSE (x) = NULL_TREE; ! x = build_tree_list (binfo, TREE_VALUE (x)); ! goto got_it; ! } ! } ! ! /* If we didn't find BASE_BINFO in the list, create a dummy entry ! so the two lists (RBASES and the list of bases) will be ! symmetrical. */ ! x = build_tree_list (NULL_TREE, NULL_TREE); ! got_it: ! rbases = chainon (rbases, x); } ! *rbase_ptr = rbases; ! *vbase_ptr = vbases; ! } ! ! /* Perform partial cleanups for a base for exception handling. */ ! static tree ! build_partial_cleanup_for (binfo) ! tree binfo; ! { ! tree expr = convert_pointer_to_real (binfo, ! build_unary_op (ADDR_EXPR, C_C_D, 0)); ! ! return build_delete (TREE_TYPE (expr), ! expr, ! integer_zero_node, ! LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR, 0); } *************** *** 368,377 **** Argument IMMEDIATELY, if zero, forces a new sequence to be generated to contain these new insns, so it can be emitted later. ! This sequence is saved in the global variable BASE_INIT_INSNS. Otherwise, the insns are emitted into the current sequence. Note that emit_base_init does *not* initialize virtual base classes. That is done specially, elsewhere. */ ! void emit_base_init (t, immediately) --- 494,505 ---- Argument IMMEDIATELY, if zero, forces a new sequence to be generated to contain these new insns, so it can be emitted later. ! This sequence is saved in the global variable BASE_INIT_EXPR. Otherwise, the insns are emitted into the current sequence. Note that emit_base_init does *not* initialize virtual base classes. That is done specially, elsewhere. */ ! ! extern tree base_init_expr, rtl_expr_chain; ! void emit_base_init (t, immediately) *************** *** 381,396 **** extern tree in_charge_identifier; ! tree member, vbases; ! tree init_list; ! int pass, start; tree t_binfo = TYPE_BINFO (t); tree binfos = BINFO_BASETYPES (t_binfo); int i, n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0; ! int have_init_list = 0, from_init_list; if (! immediately) { do_pending_stack_adjust (); ! start_sequence (); } --- 509,532 ---- extern tree in_charge_identifier; ! tree member, x; ! tree mem_init_list; ! tree rbase_init_list, vbase_init_list; tree t_binfo = TYPE_BINFO (t); tree binfos = BINFO_BASETYPES (t_binfo); int i, n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0; ! tree expr = NULL_TREE; + my_friendly_assert (protect_list == NULL_TREE, 999); + if (! immediately) { + int momentary; do_pending_stack_adjust (); ! /* Make the RTL_EXPR node temporary, not momentary, ! so that rtl_expr_chain doesn't become garbage. */ ! momentary = suspend_momentary (); ! expr = make_node (RTL_EXPR); ! resume_momentary (momentary); ! start_sequence_for_rtl_expr (expr); } *************** *** 403,610 **** DECL_SOURCE_LINE (current_function_decl)); ! start = ! TYPE_USES_VIRTUAL_BASECLASSES (t); ! for (pass = start; pass < 2; pass++) ! { ! tree vbase_init_list = NULL_TREE; ! ! for (init_list = current_base_init_list; init_list; ! init_list = TREE_CHAIN (init_list)) ! { ! tree basename = TREE_PURPOSE (init_list); ! tree binfo; ! tree init = TREE_VALUE (init_list); ! ! if (basename == NULL_TREE) ! { ! /* Initializer for single base class. Must not ! use multiple inheritance or this is ambiguous. */ ! switch (n_baseclasses) ! { ! case 0: ! error ("type `%s' does not have a base class to initialize", ! IDENTIFIER_POINTER (current_class_name)); ! return; ! case 1: ! break; ! default: ! error ("unnamed initializer ambiguous for type `%s' which uses multiple inheritance", IDENTIFIER_POINTER (current_class_name)); ! return; ! } ! binfo = TREE_VEC_ELT (binfos, 0); ! } ! else if (is_aggr_typedef (basename, 1)) ! { ! binfo = binfo_or_else (IDENTIFIER_TYPE_VALUE (basename), t); ! if (binfo == NULL_TREE) ! continue; ! ! /* Virtual base classes are special cases. Their initializers ! are recorded with this constructor, and they are used when ! this constructor is the top-level constructor called. */ ! if (! TREE_VIA_VIRTUAL (binfo)) ! { ! /* Otherwise, if it is not an immediate base class, complain. */ ! for (i = n_baseclasses-1; i >= 0; i--) ! if (BINFO_TYPE (binfo) == BINFO_TYPE (TREE_VEC_ELT (binfos, i))) ! break; ! if (i < 0) ! { ! error ("type `%s' is not an immediate base class of type `%s'", ! IDENTIFIER_POINTER (basename), ! IDENTIFIER_POINTER (current_class_name)); ! continue; ! } ! } ! } ! else ! continue; ! /* The base initialization list goes up to the first ! base class which can actually use it. */ ! if (pass == start) ! { ! char *msgp = (! TYPE_HAS_CONSTRUCTOR (BINFO_TYPE (binfo))) ! ? "cannot pass initialization up to class `%s'" : 0; ! while (! TYPE_HAS_CONSTRUCTOR (BINFO_TYPE (binfo)) ! && BINFO_BASETYPES (binfo) != NULL_TREE ! && TREE_VEC_LENGTH (BINFO_BASETYPES (binfo)) == 1) ! { ! /* ?? This should be fixed in RENO by forcing ! default constructors to exist. */ ! SET_BINFO_BASEINIT_MARKED (binfo); ! binfo = BINFO_BASETYPE (binfo, 0); ! } ! /* We used to give an error if this wasn't true, saying that ! there's no constructor for the initialization of basename. ! This turned out to be incorrect---it should use the ! default constructor, since a user could try to initialize ! the class in a derived class's base initializer list. */ ! if (TYPE_HAS_CONSTRUCTOR (BINFO_TYPE (binfo))) ! { ! if (msgp) ! { ! if (pedantic) ! error_with_aggr_type (binfo, msgp); ! else ! msgp = NULL; ! } ! } ! if (BINFO_BASEINIT_MARKED (binfo)) ! { ! msgp = "class `%s' initializer already specified"; ! error (msgp, IDENTIFIER_POINTER (basename)); ! } ! if (msgp) ! continue; ! SET_BINFO_BASEINIT_MARKED (binfo); ! if (TREE_VIA_VIRTUAL (binfo)) ! { ! vbase_init_list = tree_cons (init, BINFO_TYPE (binfo), ! vbase_init_list); ! continue; ! } ! if (pass == 0) ! continue; ! } ! else if (TREE_VIA_VIRTUAL (binfo)) ! continue; ! member = convert_pointer_to (binfo, current_class_decl); ! expand_aggr_init_1 (binfo, 0, build_indirect_ref (member, NULL_PTR), init, ! BINFO_OFFSET_ZEROP (binfo), LOOKUP_NORMAL); expand_cleanups_to (NULL_TREE); } ! if (pass == 0) { ! tree first_arg = TREE_CHAIN (DECL_ARGUMENTS (current_function_decl)); ! tree vbases; ! ! if (DECL_NAME (current_function_decl) == NULL_TREE ! && TREE_CHAIN (first_arg) != NULL_TREE) ! { ! /* If there are virtual baseclasses without initialization ! specified, and this is a default X(X&) constructor, ! build the initialization list so that each virtual baseclass ! of the new object is initialized from the virtual baseclass ! of the incoming arg. */ ! tree init_arg = build_unary_op (ADDR_EXPR, TREE_CHAIN (first_arg), 0); ! for (vbases = CLASSTYPE_VBASECLASSES (t); ! vbases; vbases = TREE_CHAIN (vbases)) ! { ! if (BINFO_BASEINIT_MARKED (vbases) == 0) ! { ! member = convert_pointer_to (vbases, init_arg); ! if (member == init_arg) ! member = TREE_CHAIN (first_arg); ! else ! TREE_TYPE (member) = build_reference_type (BINFO_TYPE (vbases)); ! vbase_init_list = tree_cons (convert_from_reference (member), ! vbases, vbase_init_list); ! SET_BINFO_BASEINIT_MARKED (vbases); ! } ! } ! } ! expand_start_cond (first_arg, 0); ! expand_aggr_vbase_init (t_binfo, C_C_D, current_class_decl, ! vbase_init_list); ! expand_end_cond (); } - } - current_base_init_list = NULL_TREE; - - /* Now, perform default initialization of all base classes which - have not yet been initialized, and unmark baseclasses which - have been initialized. */ - for (i = 0; i < n_baseclasses; i++) - { - tree base = current_class_decl; - tree base_binfo = TREE_VEC_ELT (binfos, i); - - if (TYPE_NEEDS_CONSTRUCTING (BINFO_TYPE (base_binfo))) - { - if (! TREE_VIA_VIRTUAL (base_binfo) - && ! BINFO_BASEINIT_MARKED (base_binfo)) - { - tree ref; ! if (BINFO_OFFSET_ZEROP (base_binfo)) ! base = build1 (NOP_EXPR, ! TYPE_POINTER_TO (BINFO_TYPE (base_binfo)), ! current_class_decl); ! else ! base = build (PLUS_EXPR, ! TYPE_POINTER_TO (BINFO_TYPE (base_binfo)), ! current_class_decl, BINFO_OFFSET (base_binfo)); ! ! ref = build_indirect_ref (base, NULL_PTR); ! expand_aggr_init_1 (base_binfo, 0, ref, NULL_TREE, ! BINFO_OFFSET_ZEROP (base_binfo), ! LOOKUP_NORMAL); ! expand_cleanups_to (NULL_TREE); ! } ! } ! CLEAR_BINFO_BASEINIT_MARKED (base_binfo); ! ! if (! TYPE_USES_VIRTUAL_BASECLASSES (t)) ! { ! while (! TYPE_HAS_CONSTRUCTOR (BINFO_TYPE (base_binfo)) ! && BINFO_BASETYPES (base_binfo) != NULL_TREE ! && TREE_VEC_LENGTH (BINFO_BASETYPES (base_binfo)) == 1) ! { ! /* ?? This should be fixed in RENO by forcing ! default constructors to exist. It is needed for symmetry ! with code above. */ ! base_binfo = BINFO_BASETYPE (base_binfo, 0); ! CLEAR_BINFO_BASEINIT_MARKED (base_binfo); ! } ! } } --- 539,597 ---- DECL_SOURCE_LINE (current_function_decl)); ! mem_init_list = sort_member_init (t); ! current_member_init_list = NULL_TREE; ! sort_base_init (t, &rbase_init_list, &vbase_init_list); ! current_base_init_list = NULL_TREE; ! if (TYPE_USES_VIRTUAL_BASECLASSES (t)) ! { ! tree first_arg = TREE_CHAIN (DECL_ARGUMENTS (current_function_decl)); ! expand_start_cond (first_arg, 0); ! expand_aggr_vbase_init (t_binfo, C_C_D, current_class_decl, ! vbase_init_list); ! expand_end_cond (); ! } ! /* Now, perform initialization of non-virtual base classes. */ ! for (i = 0; i < n_baseclasses; i++) ! { ! tree base = current_class_decl; ! tree base_binfo = TREE_VEC_ELT (binfos, i); ! tree init = void_list_node; ! if (TREE_VIA_VIRTUAL (base_binfo)) ! continue; ! #if 0 /* Once unsharing happens soon enough. */ ! my_friendly_assert (BINFO_INHERITANCE_CHAIN (base_binfo) == t_binfo); ! #else ! BINFO_INHERITANCE_CHAIN (base_binfo) = t_binfo; ! #endif ! if (TREE_PURPOSE (rbase_init_list)) ! init = TREE_VALUE (rbase_init_list); ! else if (TYPE_NEEDS_CONSTRUCTING (BINFO_TYPE (base_binfo))) ! init = NULL_TREE; ! if (init != void_list_node) ! { ! member = convert_pointer_to_real (base_binfo, current_class_decl); ! expand_aggr_init_1 (base_binfo, 0, build_indirect_ref (member, NULL_PTR), init, ! BINFO_OFFSET_ZEROP (base_binfo), LOOKUP_NORMAL); expand_cleanups_to (NULL_TREE); } ! if (TYPE_NEEDS_DESTRUCTOR (BINFO_TYPE (base_binfo))) { ! start_protect (); ! protect_list = tree_cons (NULL_TREE, ! build_partial_cleanup_for (base_binfo), ! protect_list); } ! rbase_init_list = TREE_CHAIN (rbase_init_list); } *************** *** 613,618 **** if (TYPE_USES_VIRTUAL_BASECLASSES (t)) expand_indirect_vtbls_init (t_binfo, C_C_D, current_class_decl, 0); - for (vbases = CLASSTYPE_VBASECLASSES (t); vbases; vbases = TREE_CHAIN (vbases)) - CLEAR_BINFO_BASEINIT_MARKED (vbases); /* Initialize all the virtual function table fields that --- 600,603 ---- *************** *** 620,685 **** expand_direct_vtbls_init (t_binfo, t_binfo, 1, 1, current_class_decl); - if (current_member_init_list) - { - init_list = sort_member_init (t); - have_init_list = 1; - } - for (member = TYPE_FIELDS (t); member; member = TREE_CHAIN (member)) { tree init, name; ! from_init_list = 0; /* See if we had a user-specified member initialization. */ ! if (have_init_list) { ! if (TREE_PURPOSE (init_list)) ! { ! name = TREE_PURPOSE (init_list); ! init = TREE_VALUE (init_list); ! from_init_list = 1; ! ! if (TREE_STATIC (member)) ! { ! error_with_aggr_type (DECL_FIELD_CONTEXT (member), ! "field `%s::%s' is static; only point of initialization is its declaration", ! IDENTIFIER_POINTER (TREE_PURPOSE (init_list))); ! continue; ! } ! ! /* Also see if it's ever a COMPONENT_REF here. If it is, we ! need to do `expand_assignment (name, init, 0, 0);' and ! a continue. */ ! my_friendly_assert (TREE_CODE (name) != COMPONENT_REF, 349); ! } ! ! init_list = TREE_CHAIN (init_list); } ! ! if (! from_init_list) { - /* member could be, for example, a CONST_DECL for an enumerated - tag; we don't want to try to initialize that, since it already - has a value. */ - if (TREE_CODE (member) != FIELD_DECL || !DECL_NAME (member)) - continue; - name = DECL_NAME (member); init = DECL_INITIAL (member); } ! perform_member_init (member, name, init, from_init_list); } ! current_member_init_list = NULL_TREE; if (! immediately) { - extern rtx base_init_insns; - do_pending_stack_adjust (); ! my_friendly_assert (base_init_insns == 0, 207); ! base_init_insns = get_insns (); end_sequence (); } --- 605,693 ---- expand_direct_vtbls_init (t_binfo, t_binfo, 1, 1, current_class_decl); for (member = TYPE_FIELDS (t); member; member = TREE_CHAIN (member)) { tree init, name; ! int from_init_list; ! ! /* member could be, for example, a CONST_DECL for an enumerated ! tag; we don't want to try to initialize that, since it already ! has a value. */ ! if (TREE_CODE (member) != FIELD_DECL || !DECL_NAME (member)) ! continue; /* See if we had a user-specified member initialization. */ ! if (TREE_PURPOSE (mem_init_list)) { ! name = TREE_PURPOSE (mem_init_list); ! init = TREE_VALUE (mem_init_list); ! from_init_list = 1; ! ! /* Also see if it's ever a COMPONENT_REF here. If it is, we ! need to do `expand_assignment (name, init, 0, 0);' and ! a continue. */ ! my_friendly_assert (TREE_CODE (name) != COMPONENT_REF, 349); } ! else { name = DECL_NAME (member); init = DECL_INITIAL (member); + + from_init_list = 0; } ! perform_member_init (member, name, init, from_init_list, &protect_list); ! mem_init_list = TREE_CHAIN (mem_init_list); } ! /* Now initialize any members from our bases. */ ! while (mem_init_list) ! { ! tree name, init, field; ! ! if (TREE_PURPOSE (mem_init_list)) ! { ! name = TREE_PURPOSE (mem_init_list); ! init = TREE_VALUE (mem_init_list); ! /* XXX: this may need the COMPONENT_REF operand 0 check if ! it turns out we actually get them. */ ! field = IDENTIFIER_CLASS_VALUE (name); ! ! /* If one member shadows another, get the outermost one. */ ! if (TREE_CODE (field) == TREE_LIST) ! { ! field = TREE_VALUE (field); ! if (decl_type_context (field) != current_class_type) ! cp_error ("field `%D' not in immediate context", field); ! } ! ! #if 0 ! /* It turns out if you have an anonymous union in the ! class, a member from it can end up not being on the ! list of fields (rather, the type is), and therefore ! won't be seen by the for loop above. */ ! ! /* The code in this for loop is derived from a general loop ! which had this check in it. Theoretically, we've hit ! every initialization for the list of members in T, so ! we shouldn't have anything but these left in this list. */ ! my_friendly_assert (DECL_FIELD_CONTEXT (field) != t, 351); ! #endif ! ! perform_member_init (field, name, init, 1, &protect_list); ! } ! mem_init_list = TREE_CHAIN (mem_init_list); ! } if (! immediately) { do_pending_stack_adjust (); ! my_friendly_assert (base_init_expr == 0, 207); ! base_init_expr = expr; ! TREE_TYPE (expr) = void_type_node; ! RTL_EXPR_RTL (expr) = const0_rtx; ! RTL_EXPR_SEQUENCE (expr) = get_insns (); ! rtl_expr_chain = tree_cons (NULL_TREE, expr, rtl_expr_chain); end_sequence (); + TREE_SIDE_EFFECTS (expr) = 1; } *************** *** 720,725 **** vtype_binfo = get_binfo (vtype, TREE_TYPE (TREE_TYPE (decl)), 0); vtbl = BINFO_VTABLE (binfo_value (DECL_FIELD_CONTEXT (CLASSTYPE_VFIELD (type)), binfo)); ! if (!flag_vtable_thunks) ! assemble_external (vtbl); TREE_USED (vtbl) = 1; vtbl = build1 (ADDR_EXPR, TYPE_POINTER_TO (TREE_TYPE (vtbl)), vtbl); --- 728,732 ---- vtype_binfo = get_binfo (vtype, TREE_TYPE (TREE_TYPE (decl)), 0); vtbl = BINFO_VTABLE (binfo_value (DECL_FIELD_CONTEXT (CLASSTYPE_VFIELD (type)), binfo)); ! assemble_external (vtbl); TREE_USED (vtbl) = 1; vtbl = build1 (ADDR_EXPR, TYPE_POINTER_TO (TREE_TYPE (vtbl)), vtbl); *************** *** 730,734 **** /* Have to convert VTBL since array sizes may be different. */ ! vtbl = convert_force (TREE_TYPE (vtbl_ptr), vtbl); expand_expr_stmt (build_modify_expr (vtbl_ptr, NOP_EXPR, vtbl)); } --- 737,741 ---- /* Have to convert VTBL since array sizes may be different. */ ! vtbl = convert_force (TREE_TYPE (vtbl_ptr), vtbl, 0); expand_expr_stmt (build_modify_expr (vtbl_ptr, NOP_EXPR, vtbl)); } *************** *** 741,753 **** tree binfo, exp, addr, init_list; { ! tree init = value_member (BINFO_TYPE (binfo), init_list); tree ref = build_indirect_ref (addr, NULL_PTR); if (init) ! init = TREE_PURPOSE (init); /* Call constructors, but don't set up vtables. */ ! expand_aggr_init_1 (binfo, exp, ref, init, 0, ! LOOKUP_COMPLAIN|LOOKUP_SPECULATIVELY); expand_cleanups_to (NULL_TREE); - CLEAR_BINFO_VBASE_INIT_MARKED (binfo); } --- 748,758 ---- tree binfo, exp, addr, init_list; { ! tree init = purpose_member (binfo, init_list); tree ref = build_indirect_ref (addr, NULL_PTR); if (init) ! init = TREE_VALUE (init); /* Call constructors, but don't set up vtables. */ ! expand_aggr_init_1 (binfo, exp, ref, init, 0, LOOKUP_COMPLAIN); expand_cleanups_to (NULL_TREE); } *************** *** 773,808 **** expand_expr_stmt (build_compound_expr (result)); ! /* Mark everything as having an initializer ! (either explicit or default). */ ! for (vbases = CLASSTYPE_VBASECLASSES (type); ! vbases; vbases = TREE_CHAIN (vbases)) ! SET_BINFO_VBASE_INIT_MARKED (vbases); ! ! /* First, initialize baseclasses which could be baseclasses ! for other virtual baseclasses. */ ! for (vbases = CLASSTYPE_VBASECLASSES (type); ! vbases; vbases = TREE_CHAIN (vbases)) ! /* Don't initialize twice. */ ! if (BINFO_VBASE_INIT_MARKED (vbases)) ! { ! tree tmp = result; ! ! while (BINFO_TYPE (vbases) != BINFO_TYPE (TREE_PURPOSE (tmp))) ! tmp = TREE_CHAIN (tmp); ! expand_aggr_vbase_init_1 (vbases, exp, ! TREE_OPERAND (TREE_VALUE (tmp), 0), ! init_list); ! } ! ! /* Now initialize the baseclasses which don't have virtual baseclasses. */ ! for (; result; result = TREE_CHAIN (result)) ! /* Don't initialize twice. */ ! if (BINFO_VBASE_INIT_MARKED (TREE_PURPOSE (result))) ! { ! my_friendly_abort (47); ! expand_aggr_vbase_init_1 (TREE_PURPOSE (result), exp, ! TREE_OPERAND (TREE_VALUE (result), 0), ! init_list); ! } } } --- 778,789 ---- expand_expr_stmt (build_compound_expr (result)); ! for (vbases = CLASSTYPE_VBASECLASSES (type); vbases; ! vbases = TREE_CHAIN (vbases)) ! { ! tree tmp = purpose_member (vbases, result); ! expand_aggr_vbase_init_1 (vbases, exp, ! TREE_OPERAND (TREE_VALUE (tmp), 0), ! init_list); ! } } } *************** *** 854,858 **** { cp_error ("class `%T' does not have any field named `%s'", type, ! member_name); return 0; } --- 835,839 ---- { cp_error ("class `%T' does not have any field named `%s'", type, ! member_name); return 0; } *************** *** 864,867 **** --- 845,855 ---- return 0; } + if (TREE_STATIC (field)) + { + cp_error ("field `%#D' is static; only point of initialization is its declaration", + field); + return 0; + } + return 1; } *************** *** 1068,1072 **** { parm = build_component_ref (exp, name, 0, 0); ! expand_aggr_init (parm, NULL_TREE, 0); rval = error_mark_node; } --- 1056,1060 ---- { parm = build_component_ref (exp, name, 0, 0); ! expand_aggr_init (parm, NULL_TREE, 0, 0); rval = error_mark_node; } *************** *** 1084,1089 **** is to be stored in EXP, or it is a parameter list to go to a constructor, which will operate on EXP. If `init' is a CONSTRUCTOR, then we emit a warning message, ! explaining that such initializations are illegal. ALIAS_THIS is nonzero iff we are initializing something which is --- 1072,1079 ---- is to be stored in EXP, or it is a parameter list to go to a constructor, which will operate on EXP. + If FLAGS is LOOKUP_ONLYCONVERTING then it is the = init form of + the initializer, if FLAGS is 0, then it is the (init) form. If `init' is a CONSTRUCTOR, then we emit a warning message, ! explaining that such initializations are invalid. ALIAS_THIS is nonzero iff we are initializing something which is *************** *** 1113,1119 **** void ! expand_aggr_init (exp, init, alias_this) tree exp, init; int alias_this; { tree type = TREE_TYPE (exp); --- 1103,1110 ---- void ! expand_aggr_init (exp, init, alias_this, flags) tree exp, init; int alias_this; + int flags; { tree type = TREE_TYPE (exp); *************** *** 1176,1180 **** #endif expand_aggr_init_1 (TYPE_BINFO (type), exp, exp, ! init, alias_this, LOOKUP_NORMAL); TREE_READONLY (exp) = was_const; } --- 1167,1171 ---- #endif expand_aggr_init_1 (TYPE_BINFO (type), exp, exp, ! init, alias_this, LOOKUP_NORMAL|flags); TREE_READONLY (exp) = was_const; } *************** *** 1197,1208 **** tree rval; tree parms; - int xxref_init_possible; ! if (init == NULL_TREE || TREE_CODE (init) == TREE_LIST) { parms = init; ! if (parms) init = TREE_VALUE (parms); } ! else if (TREE_CODE (init) == INDIRECT_REF && TREE_HAS_CONSTRUCTOR (init)) { rval = convert_for_initialization (exp, type, init, 0, 0, 0, 0); --- 1188,1201 ---- tree rval; tree parms; ! if (init == NULL_TREE ! || (TREE_CODE (init) == TREE_LIST && ! TREE_TYPE (init))) { parms = init; ! if (parms) ! init = TREE_VALUE (parms); } ! else if (TREE_CODE (init) == INDIRECT_REF && TREE_HAS_CONSTRUCTOR (init) ! && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (init))) { rval = convert_for_initialization (exp, type, init, 0, 0, 0, 0); *************** *** 1214,1227 **** parms = build_tree_list (NULL_TREE, init); - if (TYPE_HAS_INIT_REF (type) - || init == NULL_TREE - || TREE_CHAIN (parms) != NULL_TREE) - xxref_init_possible = 0; - else - { - xxref_init_possible = LOOKUP_SPECULATIVELY; - flags &= ~LOOKUP_COMPLAIN; - } - if (TYPE_USES_VIRTUAL_BASECLASSES (type)) { --- 1207,1210 ---- *************** *** 1233,1344 **** } ! rval = build_method_call (exp, constructor_name_full (type), ! parms, binfo, flags|xxref_init_possible); ! if (rval == NULL_TREE && xxref_init_possible) ! { ! /* It is an error to implement a default copy constructor if ! (see ARM 12.8 for details) ... one case being if another ! copy constructor already exists. */ ! tree init_type = TREE_TYPE (init); ! if (TREE_CODE (init_type) == REFERENCE_TYPE) ! init_type = TREE_TYPE (init_type); ! if (TYPE_MAIN_VARIANT (init_type) == TYPE_MAIN_VARIANT (type) ! || (IS_AGGR_TYPE (init_type) ! && UNIQUELY_DERIVED_FROM_P (type, init_type))) ! { ! if (type == BINFO_TYPE (binfo) ! && TYPE_USES_VIRTUAL_BASECLASSES (type)) ! { ! tree addr = build_unary_op (ADDR_EXPR, exp, 0); ! expand_aggr_vbase_init (binfo, exp, addr, NULL_TREE); ! ! expand_indirect_vtbls_init (binfo, exp, addr, 1); ! } ! expand_expr_stmt (build_modify_expr (exp, INIT_EXPR, init)); ! return; ! } ! else ! rval = build_method_call (exp, constructor_name_full (type), parms, ! binfo, flags); ! } ! ! /* Private, protected, or otherwise unavailable. */ ! if (rval == error_mark_node && (flags&LOOKUP_COMPLAIN)) ! cp_error ("in base initialization for class `%T'", binfo); ! /* A valid initialization using constructor. */ ! else if (rval != error_mark_node && rval != NULL_TREE) { ! /* p. 222: if the base class assigns to `this', then that ! value is used in the derived class. */ ! if ((flag_this_is_variable & 1) && alias_this) ! { ! TREE_TYPE (rval) = TREE_TYPE (current_class_decl); ! expand_assignment (current_class_decl, rval, 0, 0); ! } ! else ! expand_expr_stmt (rval); } ! else if (parms && TREE_CHAIN (parms) == NULL_TREE) { ! /* If we are initializing one aggregate value ! from another, and though there are constructors, ! and none accept the initializer, just do a bitwise ! copy. ! ! The above sounds wrong, ``If a class has any copy ! constructor defined, the default copy constructor will ! not be generated.'' 12.8 Copying Class Objects (mrs) ! @@ This should reject initializer which a constructor ! @@ rejected on access gounds, but there is ! @@ no way right now to recognize that case with ! @@ just `error_mark_node'. */ ! tree itype; ! init = TREE_VALUE (parms); ! itype = TREE_TYPE (init); ! if (TREE_CODE (itype) == REFERENCE_TYPE) ! { ! init = convert_from_reference (init); ! itype = TREE_TYPE (init); ! } ! itype = TYPE_MAIN_VARIANT (itype); ! ! /* This is currently how the default X(X&) constructor ! is implemented. */ ! if (comptypes (TYPE_MAIN_VARIANT (type), itype, 0)) ! { ! #if 0 ! warning ("bitwise copy in initialization of type `%s'", ! TYPE_NAME_STRING (type)); ! #endif ! rval = build (INIT_EXPR, type, exp, init); ! expand_expr_stmt (rval); ! } ! else { ! cp_error ("in base initialization for class `%T',", binfo); ! cp_error ("invalid initializer to constructor for type `%T'", type); ! return; } ! } ! else ! { ! if (init == NULL_TREE) ! my_friendly_assert (parms == NULL_TREE, 210); ! if (parms == NULL_TREE && TREE_VIA_VIRTUAL (binfo)) ! cp_error ("virtual baseclass `%T' does not have default initializer", binfo); else { ! cp_error ("in base initialization for class `%T',", binfo); ! /* This will make an error message for us. */ ! build_method_call (exp, constructor_name_full (type), parms, binfo, ! (TYPE_USES_VIRTUAL_BASECLASSES (type) ! ? LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE ! : LOOKUP_NORMAL)); } - return; } - /* Constructor has been called, but vtables may be for TYPE - rather than for FOR_TYPE. */ } --- 1216,1255 ---- } ! if (init && TREE_CHAIN (parms) == NULL_TREE ! && TYPE_HAS_TRIVIAL_INIT_REF (type) ! && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (init))) { ! rval = build (INIT_EXPR, type, exp, init); ! TREE_SIDE_EFFECTS (rval) = 1; ! expand_expr_stmt (rval); } ! else { ! rval = build_method_call (exp, constructor_name_full (type), ! parms, binfo, flags); ! /* Private, protected, or otherwise unavailable. */ ! if (rval == error_mark_node) { ! if (flags & LOOKUP_COMPLAIN) ! cp_error ("in base initialization for %sclass `%T'", ! TREE_VIA_VIRTUAL (binfo) ? "virtual base " : "", ! binfo); } ! else if (rval == NULL_TREE) ! my_friendly_abort (361); else { ! /* p. 222: if the base class assigns to `this', then that ! value is used in the derived class. */ ! if ((flag_this_is_variable & 1) && alias_this) ! { ! TREE_TYPE (rval) = TREE_TYPE (current_class_decl); ! expand_assignment (current_class_decl, rval, 0, 0); ! } ! else ! expand_expr_stmt (rval); } } } *************** *** 1431,1437 **** TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), 0); TREE_SIDE_EFFECTS (init) = 1; - #if 0 - TREE_RAISES (init) = ?? - #endif if (init_list) TREE_VALUE (init_list) = init; --- 1342,1345 ---- *************** *** 1441,1445 **** if (init_type == type && TREE_CODE (init) == CALL_EXPR #if 0 ! /* It is legal to directly initialize from a CALL_EXPR without going through X(X&), apparently. */ && ! TYPE_GETS_INIT_REF (type) --- 1349,1353 ---- if (init_type == type && TREE_CODE (init) == CALL_EXPR #if 0 ! /* It is valid to directly initialize from a CALL_EXPR without going through X(X&), apparently. */ && ! TYPE_GETS_INIT_REF (type) *************** *** 1503,1509 **** TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), 0); TREE_SIDE_EFFECTS (init) = 1; - #if 0 - TREE_RAISES (init) = ?? - #endif TREE_VALUE (TREE_OPERAND (init, 1)) = convert_pointer_to (TREE_TYPE (TREE_TYPE (TREE_VALUE (tmp))), arg); --- 1411,1414 ---- *************** *** 1639,1643 **** tree member_base = build (COMPONENT_REF, TREE_TYPE (member), subexp, member); if (IS_AGGR_TYPE (TREE_TYPE (member))) ! expand_aggr_init (member_base, DECL_INITIAL (member), 0); else if (TREE_CODE (TREE_TYPE (member)) == ARRAY_TYPE && TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (member))) --- 1544,1548 ---- tree member_base = build (COMPONENT_REF, TREE_TYPE (member), subexp, member); if (IS_AGGR_TYPE (TREE_TYPE (member))) ! expand_aggr_init (member_base, DECL_INITIAL (member), 0, 0); else if (TREE_CODE (TREE_TYPE (member)) == ARRAY_TYPE && TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (member))) *************** *** 1837,1840 **** --- 1742,1757 ---- cname = resolve_scope_to_name (NULL_TREE, cname); + /* This shouldn't be here, and build_member_call shouldn't appear in + parse.y! (mrs) */ + if (cname && get_aggr_from_typedef (cname, 0) == 0 + && TREE_CODE (cname) == IDENTIFIER_NODE) + { + tree ns = lookup_name (cname, 0); + if (ns && TREE_CODE (ns) == NAMESPACE_DECL) + { + return build_x_function_call (build_offset_ref (cname, name), parmlist, current_class_decl); + } + } + if (cname == NULL_TREE || ! (type = get_aggr_from_typedef (cname, 1))) return error_mark_node; *************** *** 1881,1885 **** tree newtype = build_type_variant (type, TYPE_READONLY (oldtype), TYPE_VOLATILE (oldtype)); ! decl = convert_force (build_pointer_type (newtype), olddecl); } else --- 1798,1802 ---- tree newtype = build_type_variant (type, TYPE_READONLY (oldtype), TYPE_VOLATILE (oldtype)); ! decl = convert_force (build_pointer_type (newtype), olddecl, 0); } else *************** *** 1889,1892 **** --- 1806,1812 ---- decl = build_indirect_ref (decl, NULL_PTR); + if (method_name == constructor_name (type) + || method_name == constructor_name_full (type)) + return build_functional_cast (type, parmlist); if (t = lookup_fnfields (basetype_path, method_name, 0)) return build_method_call (decl, method_name, parmlist, basetype_path, *************** *** 1945,1948 **** --- 1865,1884 ---- cname = resolve_scope_to_name (NULL_TREE, cname); + /* Handle namespace names fully here. */ + if (TREE_CODE (cname) == IDENTIFIER_NODE + && get_aggr_from_typedef (cname, 0) == 0) + { + tree ns = lookup_name (cname, 0); + tree val; + if (ns && TREE_CODE (ns) == NAMESPACE_DECL) + { + val = lookup_namespace_name (ns, name); + if (val) + return val; + cp_error ("namespace `%D' has no member named `%D'", ns, name); + return error_mark_node; + } + } + if (cname == NULL_TREE || ! is_aggr_typedef (cname, 1)) return error_mark_node; *************** *** 2084,2087 **** --- 2020,2027 ---- || ! allocation_temporary_p ())) fnfields = copy_list (fnfields); + + for (t = TREE_VALUE (fnfields); t; t = DECL_CHAIN (t)) + assemble_external (t); + t = build_tree_list (error_mark_node, fnfields); TREE_TYPE (t) = build_offset_type (type, unknown_type_node); *************** *** 2119,2122 **** --- 2059,2068 ---- } + if (TREE_CODE (t) == FIELD_DECL && DECL_BIT_FIELD (t)) + { + cp_error ("illegal pointer to bit field `%D'", t); + return error_mark_node; + } + /* static class functions too. */ if (TREE_CODE (t) == FUNCTION_DECL && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) *************** *** 2160,2164 **** my_friendly_abort (54); ! e1 = build (GT_EXPR, integer_type_node, e0, integer_zero_node); e1 = build_compound_expr (tree_cons (NULL_TREE, exp_addr, build_tree_list (NULL_TREE, e1))); --- 2106,2110 ---- my_friendly_abort (54); ! e1 = build (GT_EXPR, boolean_type_node, e0, integer_zero_node); e1 = build_compound_expr (tree_cons (NULL_TREE, exp_addr, build_tree_list (NULL_TREE, e1))); *************** *** 2315,2319 **** else if (TYPE_PTRMEMFUNC_P (TREE_TYPE (member))) { ! return get_member_function_from_ptrfunc (&addr, base, member); } my_friendly_abort (56); --- 2261,2265 ---- else if (TYPE_PTRMEMFUNC_P (TREE_TYPE (member))) { ! return get_member_function_from_ptrfunc (&addr, member); } my_friendly_abort (56); *************** *** 2397,2401 **** tree list = DECL_FRIENDLIST (TYPE_NAME (type)); tree name = DECL_NAME (supplicant); ! tree ctype = DECL_CLASS_CONTEXT (supplicant); for (; list ; list = TREE_CHAIN (list)) { --- 2343,2353 ---- tree list = DECL_FRIENDLIST (TYPE_NAME (type)); tree name = DECL_NAME (supplicant); ! tree ctype; ! ! if (DECL_FUNCTION_MEMBER_P (supplicant)) ! ctype = DECL_CLASS_CONTEXT (supplicant); ! else ! ctype = NULL_TREE; ! for (; list ; list = TREE_CHAIN (list)) { *************** *** 2428,2433 **** { ! tree context = declp ? DECL_CLASS_CONTEXT (supplicant) ! : DECL_CONTEXT (TYPE_NAME (supplicant)); if (context) --- 2380,2391 ---- { ! tree context; ! ! if (! declp) ! context = DECL_CONTEXT (TYPE_NAME (supplicant)); ! else if (DECL_FUNCTION_MEMBER_P (supplicant)) ! context = DECL_CLASS_CONTEXT (supplicant); ! else ! context = NULL_TREE; if (context) *************** *** 2457,2463 **** if (decl == TREE_VALUE (friends)) { ! cp_pedwarn ("`%D' is already a friend of class `%T'", decl, type); ! cp_pedwarn_at ("previous friend declaration of `%D'", TREE_VALUE (friends)); return; --- 2415,2421 ---- if (decl == TREE_VALUE (friends)) { ! cp_warning ("`%D' is already a friend of class `%T'", decl, type); ! cp_warning_at ("previous friend declaration of `%D'", TREE_VALUE (friends)); return; *************** *** 2583,2587 **** if (type == friend_type) { ! warning ("class `%s' is implicitly friends with itself", TYPE_NAME_STRING (type)); return; --- 2541,2545 ---- if (type == friend_type) { ! pedwarn ("class `%s' is implicitly friends with itself", TYPE_NAME_STRING (type)); return; *************** *** 2708,2712 **** /* raw "main", and builtin functions never gets overloaded, but they can become friends. */ - TREE_PUBLIC (decl) = 1; add_friend (current_class_type, decl); DECL_FRIEND_P (decl) = 1; --- 2666,2669 ---- *************** *** 2869,2872 **** --- 2826,2831 ---- PLACEMENT is the `placement' list for user-defined operator new (). */ + extern int flag_check_new; + tree build_new (placement, decl, init, use_global_new) *************** *** 2877,2880 **** --- 2836,2840 ---- tree type, true_type, size, rval; tree nelts; + tree alloc_expr, alloc_temp; int has_array = 0; enum tree_code code = NEW_EXPR; *************** *** 3000,3003 **** --- 2960,2969 ---- } + if (TREE_CODE (type) == FUNCTION_TYPE) + { + error ("new cannot be applied to a function type"); + return error_mark_node; + } + /* When the object being created is an array, the new-expression yields a pointer to the initial element (if any) of the array. For example, *************** *** 3011,3019 **** if (TYPE_READONLY (type) || TYPE_VOLATILE (type)) ! { ! pedwarn ("const and volatile types cannot be created with operator new"); ! type = true_type = TYPE_MAIN_VARIANT (type); ! } ! /* If our base type is an array, then make sure we know how many elements it has. */ --- 2977,2982 ---- if (TYPE_READONLY (type) || TYPE_VOLATILE (type)) ! type = TYPE_MAIN_VARIANT (type); ! /* If our base type is an array, then make sure we know how many elements it has. */ *************** *** 3030,3039 **** size = size_in_bytes (type); if (TYPE_SIZE (true_type) == 0) { ! if (true_type == void_type_node) ! error ("invalid type for new: `void'"); ! else ! incomplete_type_error (0, true_type); return error_mark_node; } --- 2993,3005 ---- size = size_in_bytes (type); + if (true_type == void_type_node) + { + error ("invalid type `void' for new"); + return error_mark_node; + } + if (TYPE_SIZE (true_type) == 0) { ! incomplete_type_error (0, true_type); return error_mark_node; } *************** *** 3073,3080 **** rval = build_opfncall (code, LOOKUP_GLOBAL|LOOKUP_COMPLAIN, ptr_type_node, size, placement); ! rval = convert (TYPE_POINTER_TO (true_type), rval); } else if (! has_array && flag_this_is_variable > 0 ! && TYPE_HAS_CONSTRUCTOR (true_type) && init != void_type_node) { if (init == NULL_TREE || TREE_CODE (init) == TREE_LIST) --- 3039,3046 ---- rval = build_opfncall (code, LOOKUP_GLOBAL|LOOKUP_COMPLAIN, ptr_type_node, size, placement); ! rval = convert (build_pointer_type (true_type), rval); } else if (! has_array && flag_this_is_variable > 0 ! && TYPE_NEEDS_CONSTRUCTING (true_type) && init != void_type_node) { if (init == NULL_TREE || TREE_CODE (init) == TREE_LIST) *************** *** 3105,3108 **** --- 3071,3088 ---- } + if (flag_check_new && rval) + { + /* For array new, we need to make sure that the call to new is + not expanded as part of the RTL_EXPR for the initialization, + so we can't just use save_expr here. */ + + alloc_temp = get_temp_name (TREE_TYPE (rval), 0); + alloc_expr = build (MODIFY_EXPR, TREE_TYPE (rval), alloc_temp, rval); + TREE_SIDE_EFFECTS (alloc_expr) = 1; + rval = alloc_temp; + } + else + alloc_expr = NULL_TREE; + /* if rval is NULL_TREE I don't have to allocate it, but are we totally sure we have some extra bytes in that case for the BI_header_size *************** *** 3130,3184 **** } - /* We've figured out where the allocation is to go. - If we're not eliding constructors, then if a constructor - is defined, we must go through it. */ - if (!has_array && (rval == NULL_TREE || !flag_elide_constructors) - && TYPE_HAS_CONSTRUCTOR (true_type) && init != void_type_node) - { - tree newrval; - /* Constructors are never virtual. If it has an initialization, we - need to complain if we aren't allowed to use the ctor that took - that argument. */ - int flags = LOOKUP_NORMAL|LOOKUP_NONVIRTUAL|LOOKUP_COMPLAIN; - - /* If a copy constructor might work, set things up so that we can - try that after this. We deliberately don't clear LOOKUP_COMPLAIN - any more, since that would make it impossible to rationally use - the access of a constructor that matches perfectly. */ - #if 0 - if (rval != NULL_TREE) - flags |= LOOKUP_SPECULATIVELY; - #endif - - if (rval && TYPE_USES_VIRTUAL_BASECLASSES (true_type)) - { - init = tree_cons (NULL_TREE, integer_one_node, init); - flags |= LOOKUP_HAS_IN_CHARGE; - } - - { - tree tmp = rval; - - if (TREE_CODE (TREE_TYPE (tmp)) == POINTER_TYPE) - tmp = build_indirect_ref (tmp, NULL_PTR); - - newrval = build_method_call (tmp, constructor_name_full (true_type), - init, NULL_TREE, flags); - } - - if (newrval) - { - rval = newrval; - TREE_HAS_CONSTRUCTOR (rval) = 1; - } - else - rval = error_mark_node; - goto done; - } - if (rval == error_mark_node) return error_mark_node; - rval = save_expr (rval); - TREE_HAS_CONSTRUCTOR (rval) = 1; /* Don't call any constructors or do any initialization. */ --- 3110,3115 ---- *************** *** 3188,3204 **** if (TYPE_NEEDS_CONSTRUCTING (type) || init) { ! if (! TYPE_NEEDS_CONSTRUCTING (type) && ! IS_AGGR_TYPE (type)) { /* New 2.0 interpretation: `new int (10)' means allocate an int, and initialize it with 10. */ ! init = build_c_cast (type, init); rval = build (COMPOUND_EXPR, TREE_TYPE (rval), ! build_modify_expr (build_indirect_ref (rval, NULL_PTR), ! NOP_EXPR, init), rval); TREE_SIDE_EFFECTS (rval) = 1; TREE_CALLS_NEW (rval) = 1; } else if (current_function_decl == NULL_TREE) { --- 3119,3181 ---- if (TYPE_NEEDS_CONSTRUCTING (type) || init) { ! if (! TYPE_NEEDS_CONSTRUCTING (type) ! && ! IS_AGGR_TYPE (type) && ! has_array) { /* New 2.0 interpretation: `new int (10)' means allocate an int, and initialize it with 10. */ + tree deref; + + rval = save_expr (rval); + deref = build_indirect_ref (rval, NULL_PTR); + TREE_READONLY (deref) = 0; + + if (TREE_CHAIN (init) != NULL_TREE) + pedwarn ("initializer list being treated as compound expression"); + else if (TREE_CODE (init) == CONSTRUCTOR) + { + pedwarn ("initializer list appears where operand should be used"); + init = TREE_OPERAND (init, 1); + } + init = build_compound_expr (init); ! init = convert_for_initialization (deref, type, init, LOOKUP_NORMAL, ! "new", NULL_TREE, 0); rval = build (COMPOUND_EXPR, TREE_TYPE (rval), ! build_modify_expr (deref, NOP_EXPR, init), rval); + TREE_NO_UNUSED_WARNING (rval) = 1; TREE_SIDE_EFFECTS (rval) = 1; TREE_CALLS_NEW (rval) = 1; } + else if (! has_array) + { + tree newrval; + /* Constructors are never virtual. If it has an initialization, we + need to complain if we aren't allowed to use the ctor that took + that argument. */ + int flags = LOOKUP_NORMAL|LOOKUP_NONVIRTUAL|LOOKUP_COMPLAIN; + + if (rval && TYPE_USES_VIRTUAL_BASECLASSES (true_type)) + { + init = tree_cons (NULL_TREE, integer_one_node, init); + flags |= LOOKUP_HAS_IN_CHARGE; + } + + newrval = rval; + + if (newrval && TREE_CODE (TREE_TYPE (newrval)) == POINTER_TYPE) + newrval = build_indirect_ref (newrval, NULL_PTR); + + newrval = build_method_call (newrval, constructor_name_full (true_type), + init, NULL_TREE, flags); + + if (newrval) + { + rval = newrval; + TREE_HAS_CONSTRUCTOR (rval) = 1; + } + else + rval = error_mark_node; + } else if (current_function_decl == NULL_TREE) { *************** *** 3206,3209 **** --- 3183,3187 ---- /* In case of static initialization, SAVE_EXPR is good enough. */ + rval = save_expr (rval); init = copy_to_permanent (init); rval = copy_to_permanent (rval); *************** *** 3218,3221 **** --- 3196,3222 ---- tree xval = make_node (RTL_EXPR); + /* If we want to check the value of the allocation expression, + and the number of elements in the array is not a constant, we + *must* expand the SAVE_EXPR for nelts in alloc_expr before we + expand it in the actual initialization. So we need to build up + an RTL_EXPR for alloc_expr. Sigh. */ + if (alloc_expr && ! TREE_CONSTANT (nelts)) + { + tree xval = make_node (RTL_EXPR); + rtx rtxval; + TREE_TYPE (xval) = TREE_TYPE (alloc_expr); + do_pending_stack_adjust (); + start_sequence_for_rtl_expr (xval); + emit_note (0, -1); + rtxval = expand_expr (alloc_expr, NULL, VOIDmode, 0); + do_pending_stack_adjust (); + TREE_SIDE_EFFECTS (xval) = 1; + RTL_EXPR_SEQUENCE (xval) = get_insns (); + end_sequence (); + RTL_EXPR_RTL (xval) = rtxval; + TREE_TYPE (xval) = TREE_TYPE (alloc_expr); + alloc_expr = xval; + } + TREE_TYPE (xval) = TREE_TYPE (rval); do_pending_stack_adjust (); *************** *** 3225,3234 **** emit_note (0, -1); ! if (has_array) ! rval = expand_vec_init (decl, rval, ! build_binary_op (MINUS_EXPR, nelts, integer_one_node, 1), ! init, 0); ! else ! expand_aggr_init (build_indirect_ref (rval, NULL_PTR), init, 0); do_pending_stack_adjust (); --- 3226,3234 ---- emit_note (0, -1); ! rval = save_expr (rval); ! rval = expand_vec_init (decl, rval, ! build_binary_op (MINUS_EXPR, nelts, ! integer_one_node, 1), ! init, 0); do_pending_stack_adjust (); *************** *** 3254,3262 **** } } done: if (rval && TREE_TYPE (rval) != build_pointer_type (type)) { /* The type of new int [3][3] is not int *, but int [3] * */ ! rval = build_c_cast (build_pointer_type (type), rval); } --- 3254,3279 ---- } } + else if (TYPE_READONLY (true_type)) + cp_error ("uninitialized const in `new' of `%#T'", true_type); + done: + + if (alloc_expr) + { + /* Did we modify the storage? */ + if (rval != alloc_temp) + { + tree ifexp = build_binary_op (NE_EXPR, alloc_expr, + integer_zero_node, 1); + rval = build_conditional_expr (ifexp, rval, alloc_temp); + } + else + rval = alloc_expr; + } + if (rval && TREE_TYPE (rval) != build_pointer_type (type)) { /* The type of new int [3][3] is not int *, but int [3] * */ ! rval = build_c_cast (build_pointer_type (type), rval, 0); } *************** *** 3352,3356 **** { host_i -= 1; ! expand_aggr_init (baseref, TREE_VALUE (elts), 0); expand_assignment (base, baseinc, 0, 0); --- 3369,3373 ---- { host_i -= 1; ! expand_aggr_init (baseref, TREE_VALUE (elts), 0, 0); expand_assignment (base, baseinc, 0, 0); *************** *** 3419,3423 **** } ! expand_start_cond (build (GE_EXPR, integer_type_node, iterator, integer_zero_node), 0); expand_start_loop_continue_elsewhere (1); --- 3436,3440 ---- } ! expand_start_cond (build (GE_EXPR, boolean_type_node, iterator, integer_zero_node), 0); expand_start_loop_continue_elsewhere (1); *************** *** 3436,3440 **** expand_expr_stmt (build_modify_expr (to, NOP_EXPR, from)); else if (TYPE_NEEDS_CONSTRUCTING (type)) ! expand_aggr_init (to, from, 0); else if (from) expand_assignment (to, from, 0, 0); --- 3453,3457 ---- expand_expr_stmt (build_modify_expr (to, NOP_EXPR, from)); else if (TYPE_NEEDS_CONSTRUCTING (type)) ! expand_aggr_init (to, from, 0, 0); else if (from) expand_assignment (to, from, 0, 0); *************** *** 3450,3454 **** } else ! expand_aggr_init (build1 (INDIRECT_REF, type, base), init, 0); expand_assignment (base, --- 3467,3471 ---- } else ! expand_aggr_init (build1 (INDIRECT_REF, type, base), init, 0, 0); expand_assignment (base, *************** *** 3459,3463 **** build (PLUS_EXPR, TYPE_POINTER_TO (type), base2, size), 0, 0); expand_loop_continue_here (); ! expand_exit_loop_if_false (0, build (NE_EXPR, integer_type_node, build (PREDECREMENT_EXPR, integer_type_node, iterator, integer_one_node), minus_one)); --- 3476,3480 ---- build (PLUS_EXPR, TYPE_POINTER_TO (type), base2, size), 0, 0); expand_loop_continue_here (); ! expand_exit_loop_if_false (0, build (NE_EXPR, boolean_type_node, build (PREDECREMENT_EXPR, integer_type_node, iterator, integer_one_node), minus_one)); *************** *** 3567,3571 **** /* throw away const and volatile on target type of addr */ ! addr = convert_force (build_pointer_type (type), addr); ref = build_indirect_ref (addr, NULL_PTR); ptr = 1; --- 3584,3588 ---- /* throw away const and volatile on target type of addr */ ! addr = convert_force (build_pointer_type (type), addr, 0); ref = build_indirect_ref (addr, NULL_PTR); ptr = 1; *************** *** 3593,3597 **** addr = convert_pointer_to (type, addr); else ! addr = convert_force (build_pointer_type (type), addr); if (TREE_CODE (addr) == NOP_EXPR --- 3610,3614 ---- addr = convert_pointer_to (type, addr); else ! addr = convert_force (build_pointer_type (type), addr, 0); if (TREE_CODE (addr) == NOP_EXPR *************** *** 3882,3886 **** { tree this_addr = convert_force (TYPE_POINTER_TO (BINFO_TYPE (vbases)), ! addr); result = tree_cons (NULL_TREE, build_delete (TREE_TYPE (this_addr), this_addr, --- 3899,3903 ---- { tree this_addr = convert_force (TYPE_POINTER_TO (BINFO_TYPE (vbases)), ! addr, 0); result = tree_cons (NULL_TREE, build_delete (TREE_TYPE (this_addr), this_addr, *************** *** 4029,4033 **** body = tree_cons (NULL_TREE, build (EXIT_EXPR, void_type_node, ! build (EQ_EXPR, integer_type_node, base, tbase)), body); --- 4046,4050 ---- body = tree_cons (NULL_TREE, build (EXIT_EXPR, void_type_node, ! build (EQ_EXPR, boolean_type_node, base, tbase)), body); *************** *** 4085,4089 **** /* Outermost wrapper: If pointer is null, punt. */ body = build (COND_EXPR, void_type_node, ! build (NE_EXPR, integer_type_node, base, integer_zero_node), body, integer_zero_node); body = build1 (NOP_EXPR, void_type_node, body); --- 4102,4106 ---- /* Outermost wrapper: If pointer is null, punt. */ body = build (COND_EXPR, void_type_node, ! build (NE_EXPR, boolean_type_node, base, integer_zero_node), body, integer_zero_node); body = build1 (NOP_EXPR, void_type_node, body); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/input.c gcc-2.7.0/cp/input.c *** gcc-2.6.3/cp/input.c Wed Mar 23 18:25:10 1994 --- gcc-2.7.0/cp/input.c Thu Jun 15 08:23:55 1995 *************** *** 17,21 **** 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. */ /* G++ needs to do enough saving and re-parsing of text that it is --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* G++ needs to do enough saving and re-parsing of text that it is *************** *** 129,134 **** extern int end_of_file; ! int ! getch () { if (putback_char != -1) --- 130,135 ---- extern int end_of_file; ! static inline int ! sub_getch () { if (putback_char != -1) *************** *** 173,178 **** int ch; { ! my_friendly_assert (putback_char == -1, 224); ! putback_char = ch; } --- 174,196 ---- int ch; { ! if (ch != EOF) ! { ! my_friendly_assert (putback_char == -1, 224); ! putback_char = ch; ! } ! } ! ! extern int linemode; ! ! int ! getch () ! { ! int ch = sub_getch (); ! if (linemode && ch == '\n') ! { ! put_back (ch); ! ch = EOF; ! } ! return ch; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/lang-options.h gcc-2.7.0/cp/lang-options.h *** gcc-2.6.3/cp/lang-options.h --- gcc-2.7.0/cp/lang-options.h Thu Jun 15 08:24:53 1995 *************** *** 0 **** --- 1,107 ---- + /* Definitions for switches for C++. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is the contribution to the `lang_options' array in gcc.c for + g++. */ + + "-+e0", /* gcc.c tacks the `-' on the front. */ + "-+e1", + "-+e2", + "-faccess-control", + "-fno-access-control", + "-fall-virtual", + "-fno-all-virtual", + "-falt-external-templates", + "-fno-alt-external-templates", + "-fansi-overloading", + "-fno-ansi-overloading", + "-fcadillac", + "-fno-cadillac", + "-fcheck-new", + "-fno-check-new", + "-fconserve-space", + "-fno-conserve-space", + "-fdefault-inline", + "-fno-default-inline", + "-frtti", + "-fno-rtti", + "-felide-constructors", + "-fno-elide-constructors", + "-fenum-int-equiv", + "-fno-enum-int-equiv", + "-fexternal-templates", + "-fno-external-templates", + "-ffor-scope", + "-fno-for-scope", + "-fgc", + "-fno-gc", + "-fgnu-keywords", + "-fno-gnu-keywords", + "-fhandle-exceptions", + "-fno-handle-exceptions", + "-fhandle-signatures", + "-fno-handle-signatures", + "-fhuge-objects", + "-fno-huge-objects", + "-fimplement-inlines", + "-fno-implement-inlines", + "-fimplicit-templates", + "-fno-implicit-templates", + "-flabels-ok", + "-fno-labels-ok", + "-fmemoize-lookups", + "-fno-memoize-lookups", + "-fnonnull-objects", + "-fno-nonnull-objects", + "-foperator-names", + "-fno-operator-names", + "-frepo", + "-fno-repo", + "-fsave-memoized", + "-fno-save-memoized", + "-fshort-temps", + "-fno-short-temps", + "-fstats", + "-fno-stats", + "-fstrict-prototype", + "-fno-strict-prototype", + "-fthis-is-variable", + "-fno-this-is-variable", + "-fvtable-thunks", + "-fno-vtable-thunks", + "-fxref", + "-fno-xref", + + "-Wreturn-type", + "-Wno-return-type", + "-Woverloaded-virtual", + "-Wno-overloaded-virtual", + "-Wtemplate-debugging", + "-Wno-template-debugging", + "-Wctor-dtor-privacy", + "-Wno-ctor-dtor-privacy", + "-Wnon-virtual-dtor", + "-Wno-non-virtual-dtor", + "-Wextern-inline", + "-Wno-extern-inline", + "-Wreorder", + "-Wno-reorder", + "-Wsynth", + "-Wno-synth", diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/lang-specs.h gcc-2.7.0/cp/lang-specs.h *** gcc-2.6.3/cp/lang-specs.h --- gcc-2.7.0/cp/lang-specs.h Thu Jun 15 08:25:09 1995 *************** *** 0 **** --- 1,59 ---- + /* Definitions for specs for C++. + Copyright (C) 1995 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This is the contribution to the `default_compilers' array in gcc.c for + g++. */ + + {".cc", "@c++"}, + {".cxx", "@c++"}, + {".cpp", "@c++"}, + {".c++", "@c++"}, + {".C", "@c++"}, + {"@c++", + "cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ + %{C:%{!E:%eGNU C++ does not support -C without using -E}}\ + %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ + -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\ + %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\ + %c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\ + %{traditional-cpp:-traditional} %{trigraphs}\ + %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ + %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", + "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\ + %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\ + %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\ + %{traditional} %{v:-version} %{pg:-p} %{p}\ + %{f*} %{+e*} %{aux-info*}\ + %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ + %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\ + %{!S:as %a %Y\ + %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ + %{!pipe:%g.s} %A\n }}}}"}, + {".ii", "@c++-cpp-output"}, + {"@c++-cpp-output", + "%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\ + %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\ + %{traditional} %{v:-version} %{pg:-p} %{p}\ + %{f*} %{+e*} %{aux-info*}\ + %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ + %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ + %{!S:as %a %Y\ + %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ + %{!pipe:%g.s} %A\n }}}}"}, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/lex.c gcc-2.7.0/cp/lex.c *** gcc-2.6.3/cp/lex.c Fri Oct 14 20:31:17 1994 --- gcc-2.7.0/cp/lex.c Thu Jun 15 08:25:37 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 37,40 **** --- 38,42 ---- #include "flags.h" #include "obstack.h" + #include "c-pragma.h" #ifdef MULTIBYTE_CHARS *************** *** 363,366 **** --- 365,369 ---- cadillac_start (); if (flag_gnu_xref) GNU_xref_begin (input_filename); + init_repo (input_filename); } *************** *** 404,407 **** --- 407,412 ---- { extern char *(*decl_printable_name) (); + extern int flag_no_gnu_keywords; + extern int flag_operator_names; int i; *************** *** 661,664 **** --- 666,672 ---- SET_IDENTIFIER_AS_LIST (ridpointers[(int) RID_VIRTUAL], build_tree_list (NULL_TREE, ridpointers[(int) RID_VIRTUAL])); + ridpointers[(int) RID_EXPLICIT] = get_identifier ("explicit"); + SET_IDENTIFIER_AS_LIST (ridpointers[(int) RID_EXPLICIT], + build_tree_list (NULL_TREE, ridpointers[(int) RID_EXPLICIT])); ridpointers[(int) RID_FRIEND] = get_identifier ("friend"); SET_IDENTIFIER_AS_LIST (ridpointers[(int) RID_FRIEND], *************** *** 682,690 **** build_tree_list (NULL_TREE, ridpointers[(int) RID_MUTABLE])); - /* Exception handling extensions. */ - exception_type_node = build_int_2 (exception_type, 0); - TREE_TYPE (exception_type_node) = exception_type_node; - ridpointers[(int) RID_EXCEPTION] = exception_type_node; - /* Signature handling extensions. */ signature_type_node = build_int_2 (signature_type, 0); --- 690,693 ---- *************** *** 791,800 **** #endif ! if (! (flag_gc || flag_dossier)) { UNSET_RESERVED_WORD ("classof"); UNSET_RESERVED_WORD ("headof"); } ! if (! flag_handle_signatures) { /* Easiest way to not recognize signature --- 794,803 ---- #endif ! if (! (flag_gc || flag_rtti) || flag_no_gnu_keywords) { UNSET_RESERVED_WORD ("classof"); UNSET_RESERVED_WORD ("headof"); } ! if (! flag_handle_signatures || flag_no_gnu_keywords) { /* Easiest way to not recognize signature *************** *** 803,810 **** UNSET_RESERVED_WORD ("sigof"); } ! if (flag_no_asm) ! UNSET_RESERVED_WORD ("asm"); ! if (flag_no_asm || flag_traditional) UNSET_RESERVED_WORD ("typeof"); token_count = init_parse (); --- 806,828 ---- UNSET_RESERVED_WORD ("sigof"); } ! if (flag_no_asm || flag_no_gnu_keywords) UNSET_RESERVED_WORD ("typeof"); + if (! flag_operator_names) + { + /* These are new ANSI keywords that may break code. */ + UNSET_RESERVED_WORD ("and"); + UNSET_RESERVED_WORD ("and_eq"); + UNSET_RESERVED_WORD ("bitand"); + UNSET_RESERVED_WORD ("bitor"); + UNSET_RESERVED_WORD ("compl"); + UNSET_RESERVED_WORD ("not"); + UNSET_RESERVED_WORD ("not_eq"); + UNSET_RESERVED_WORD ("or"); + UNSET_RESERVED_WORD ("or_eq"); + UNSET_RESERVED_WORD ("xor"); + UNSET_RESERVED_WORD ("xor_eq"); + } + if (! flag_traditional) + UNSET_RESERVED_WORD ("overload"); token_count = init_parse (); *************** *** 1126,1142 **** interface_unknown = t->interface == 1; interface_only = t->interface == 0; ! switch (- t->lineno) ! { ! case 0: case 1: ! build_dtor (f); break; ! case 2: ! build_default_constructor (f); break; ! case 3: case 4: ! build_copy_constructor (f); break; ! case 5: case 6: ! build_assign_ref (f); break; ! default: ! ; ! } if (tail) tail->next = t->next; --- 1144,1148 ---- interface_unknown = t->interface == 1; interface_only = t->interface == 0; ! synthesize_method (f); if (tail) tail->next = t->next; *************** *** 1450,1454 **** and we know no overrides will exist. Otherwise, we delay until end-of-file, to see if the definition is really required. */ ! if (DECL_INLINE (decl)) /* delay_to_eof == 0 */; else if (current_class_type && !interface_unknown) --- 1456,1460 ---- and we know no overrides will exist. Otherwise, we delay until end-of-file, to see if the definition is really required. */ ! if (DECL_THIS_INLINE (decl)) /* delay_to_eof == 0 */; else if (current_class_type && !interface_unknown) *************** *** 1541,1545 **** t->deja_vu = 0; if (interface_unknown && processing_template_defn && flag_external_templates && ! DECL_IN_SYSTEM_HEADER (decl)) ! warn_if_unknown_interface (); t->interface = (interface_unknown ? 1 : (interface_only ? 0 : 2)); store_pending_inline (decl, t); --- 1547,1551 ---- t->deja_vu = 0; if (interface_unknown && processing_template_defn && flag_external_templates && ! DECL_IN_SYSTEM_HEADER (decl)) ! warn_if_unknown_interface (decl); t->interface = (interface_unknown ? 1 : (interface_only ? 0 : 2)); store_pending_inline (decl, t); *************** *** 1702,1707 **** tree ! cons_up_default_function (type, name, kind) ! tree type, name; int kind; { --- 1708,1713 ---- tree ! cons_up_default_function (type, full_name, kind) ! tree type, full_name; int kind; { *************** *** 1713,1718 **** tree argtype; int retref = 0; - name = constructor_name (name); switch (kind) { --- 1719,1725 ---- tree argtype; int retref = 0; + int complex = 0; + tree name = constructor_name (full_name); switch (kind) { *************** *** 1723,1730 **** case 0: name = build_parse_node (BIT_NOT_EXPR, name); ! /* Fall through... */ case 2: /* Default constructor. */ args = void_list_node; break; --- 1730,1740 ---- case 0: name = build_parse_node (BIT_NOT_EXPR, name); ! args = void_list_node; ! break; ! case 2: /* Default constructor. */ args = void_list_node; + complex = TYPE_NEEDS_CONSTRUCTING (type); break; *************** *** 1740,1743 **** --- 1750,1754 ---- get_identifier ("_ctor_arg")), void_list_node); + complex = TYPE_HAS_COMPLEX_INIT_REF (type); break; *************** *** 1747,1751 **** case 6: retref = 1; ! declspecs = build_decl_list (NULL_TREE, name); name = ansi_opname [(int) MODIFY_EXPR]; --- 1758,1762 ---- case 6: retref = 1; ! declspecs = build_decl_list (NULL_TREE, full_name); name = ansi_opname [(int) MODIFY_EXPR]; *************** *** 1756,1759 **** --- 1767,1771 ---- get_identifier ("_ctor_arg")), void_list_node); + complex = TYPE_HAS_COMPLEX_ASSIGN_REF (type); break; *************** *** 1778,1795 **** return fn; ! if (CLASSTYPE_TEMPLATE_INSTANTIATION (type)) ! SET_DECL_IMPLICIT_INSTANTIATION (fn); ! /* This kludge should go away when synthesized methods are handled ! properly, i.e. only when needed. */ ! { ! struct pending_inline *t; ! t = (struct pending_inline *) ! obstack_alloc (&synth_obstack, sizeof (struct pending_inline)); ! t->lineno = -kind; ! t->can_free = 0; ! t->interface = (interface_unknown ? 1 : (interface_only ? 0 : 2)); ! store_pending_inline (fn, t); ! } #ifdef DEBUG_DEFAULT_FUNCTIONS --- 1790,1829 ---- return fn; ! if (processing_template_defn) ! { ! SET_DECL_IMPLICIT_INSTANTIATION (fn); ! repo_template_used (fn); ! } ! if (CLASSTYPE_INTERFACE_KNOWN (type)) ! { ! DECL_INTERFACE_KNOWN (fn) = 1; ! DECL_NOT_REALLY_EXTERN (fn) = (!CLASSTYPE_INTERFACE_ONLY (type) ! && flag_implement_inlines); ! } ! else ! DECL_NOT_REALLY_EXTERN (fn) = 1; ! ! #if 0 ! /* When on-the-fly synthesis works properly, remove the second and third ! conditions here. */ ! if (flag_keep_inline_functions ! #if 0 ! || ! flag_no_inline ! || complex ! #endif ! || ! DECL_EXTERNAL (fn)) ! { ! struct pending_inline *t; ! t = (struct pending_inline *) ! obstack_alloc (&synth_obstack, sizeof (struct pending_inline)); ! t->lineno = -kind; ! t->can_free = 0; ! t->interface = (interface_unknown ? 1 : (interface_only ? 0 : 2)); ! store_pending_inline (fn, t); ! } ! else ! #endif ! mark_inline_for_output (fn); #ifdef DEBUG_DEFAULT_FUNCTIONS *************** *** 1820,2171 **** } - #if 0 - /* Used by default_copy_constructor_body. For the anonymous union - in TYPE, return the member that is at least as large as the rest - of the members, so we can copy it. */ - static tree - largest_union_member (type) - tree type; - { - tree f, type_size = TYPE_SIZE (type); - - for (f = TYPE_FIELDS (type); f; f = TREE_CHAIN (f)) - if (simple_cst_equal (DECL_SIZE (f), type_size)) - return f; - - /* We should always find one. */ - my_friendly_abort (323); - return NULL_TREE; - } - - /* Construct the body of a default assignment operator. - Mostly copied directly from default_copy_constructor_body. */ - static void - default_assign_ref_body (bufp, lenp, type, fields) - char **bufp; - int *lenp; - tree type, fields; - { - static struct obstack body; - static int inited = FALSE; - int n_bases = CLASSTYPE_N_BASECLASSES (type); - char *tbuf; - int tgot, tneed; - - if (!inited) - { - obstack_init (&body); - inited = TRUE; - } - body.next_free = body.object_base; - - obstack_1grow (&body, '{'); - - /* Small buffer for sprintf(). */ - - tgot = 100; - tbuf = (char *) alloca (tgot); - - /* If we don't need a real op=, just do a bitwise copy. */ - if (! TYPE_HAS_COMPLEX_ASSIGN_REF (type)) - { - tbuf = "{__builtin_memcpy(this,&_ctor_arg,sizeof(_ctor_arg));return *this;}"; - *lenp = strlen (tbuf); - *bufp = obstack_alloc (&inline_text_obstack, *lenp + 1); - strcpy (*bufp, tbuf); - return; - } - - if (TREE_CODE (type) == UNION_TYPE) - { - if (fields) - { - tree main = fields; - char * s; - tree f; - - for (f = TREE_CHAIN (fields); f; f = TREE_CHAIN (f)) - if (tree_int_cst_lt (TYPE_SIZE (TREE_TYPE (main)), - TYPE_SIZE (TREE_TYPE (f)))) - main = f; - - s = IDENTIFIER_POINTER (DECL_NAME (main)); - - tneed = (2 * strlen (s)) + 28; - if (tgot < tneed) - { - tgot = tneed; - tbuf = (char *) alloca (tgot); - } - - sprintf (tbuf, "{%s=_ctor_arg.%s;return *this;}", s, s); - } - else - tbuf = "{}"; - - *lenp = strlen (tbuf); - *bufp = obstack_alloc (&inline_text_obstack, *lenp + 1); - strcpy (*bufp, tbuf); - return; - } - - /* Construct base classes... - FIXME: Does not deal with multiple inheritance and virtual bases - correctly. See g++.old-deja/g++.jason/opeq5.C for a testcase. - We need to do wacky things if everything between us and the virtual - base (by all paths) has a "complex" op=. */ - - if (n_bases) - { - tree bases = TYPE_BINFO_BASETYPES (type); - int i = 0; - - for (i = 0; i < n_bases; i++) - { - tree binfo = TREE_VEC_ELT (bases, i); - tree btype, name; - char *s; - - btype = BINFO_TYPE (binfo); - name = TYPE_NESTED_NAME (btype); - s = IDENTIFIER_POINTER (name); - - tneed = (2 * strlen (s)) + 42; - if (tgot < tneed) - { - tgot = tneed; - tbuf = (char *) alloca (tgot); - } - - sprintf (tbuf, "%s::operator=((%s%s ::%s&)_ctor_arg);", s, - TYPE_READONLY (type) ? "const " : "", - CLASSTYPE_DECLARED_CLASS (btype) ? "class" : "struct", - s); - obstack_grow (&body, tbuf, strlen (tbuf)); - } - } - - /* Construct fields. */ - - if (fields) - { - tree f; - - for (f = fields; f; f = TREE_CHAIN (f)) - { - if (TREE_CODE (f) == FIELD_DECL && ! DECL_VIRTUAL_P (f)) - { - char *s; - tree x; - tree t = TREE_TYPE (f); - - if (DECL_NAME (f)) - x = f; - else if (t != NULL_TREE - && TREE_CODE (t) == UNION_TYPE - && ((TREE_CODE (TYPE_NAME (t)) == IDENTIFIER_NODE - && ANON_AGGRNAME_P (TYPE_NAME (t))) - || (TREE_CODE (TYPE_NAME (t)) == TYPE_DECL - && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))) - && TYPE_FIELDS (t) != NULL_TREE) - x = largest_union_member (t); - else - continue; - - s = IDENTIFIER_POINTER (DECL_NAME (x)); - tneed = (2 * strlen (s)) + 13; - if (tgot < tneed) - { - tgot = tneed; - tbuf = (char *) alloca (tgot); - } - - sprintf (tbuf, "%s=_ctor_arg.%s;", s, s); - obstack_grow (&body, tbuf, strlen (tbuf)); - } - } - } - - obstack_grow (&body, "return *this;}", 15); - - *lenp = obstack_object_size (&body) - 1; - *bufp = obstack_alloc (&inline_text_obstack, *lenp); - - strcpy (*bufp, body.object_base); - } - - /* Construct the body of a default copy constructor. */ - static void - default_copy_constructor_body (bufp, lenp, type, fields) - char **bufp; - int *lenp; - tree type, fields; - { - static struct obstack prologue; - static int inited = FALSE; - int n_bases = CLASSTYPE_N_BASECLASSES (type); - char sep = ':'; - char *tbuf; - int tgot, tneed; - - /* Create a buffer to call base class constructors and construct members - (fields). */ - - if (!inited) - { - obstack_init (&prologue); - inited = TRUE; - } - prologue.next_free = prologue.object_base; - - /* If we don't need a real copy ctor, just do a bitwise copy. */ - if (! TYPE_HAS_COMPLEX_INIT_REF (type)) - { - tbuf = "{__builtin_memcpy(this,&_ctor_arg,sizeof(_ctor_arg));}"; - *lenp = strlen (tbuf); - *bufp = obstack_alloc (&inline_text_obstack, *lenp + 1); - strcpy (*bufp, tbuf); - return; - } - - /* Small buffer for sprintf(). */ - - tgot = 100; - tbuf = (char *) alloca (tgot); - - if (TREE_CODE (type) == UNION_TYPE) - { - if (fields) - { - tree main = fields; - char * s; - tree f; - - for (f = TREE_CHAIN (fields); f; f = TREE_CHAIN (f)) - if (tree_int_cst_lt (TYPE_SIZE (TREE_TYPE (main)), - TYPE_SIZE (TREE_TYPE (f)))) - main = f; - - s = IDENTIFIER_POINTER (DECL_NAME (main)); - tneed = (2 * strlen (s)) + 16; - if (tgot < tneed) - { - tgot = tneed; - tbuf = (char *) alloca (tgot); - } - - sprintf (tbuf, ":%s(_ctor_arg.%s){}", s, s); - } - else - tbuf = "{}"; - - *lenp = strlen (tbuf); - *bufp = obstack_alloc (&inline_text_obstack, *lenp + 1); - strcpy (*bufp, tbuf); - return; - } - - /* Construct base classes... */ - - if (n_bases) - { - /* Note that CLASSTYPE_VBASECLASSES isn't set yet... */ - tree v = get_vbase_types (type); - tree bases = TYPE_BINFO_BASETYPES (type); - int i = 0; - - for (;;) - { - tree binfo, btype, name; - char *s; - - if (v) - { - binfo = v; - v = TREE_CHAIN (v); - } - else if (i < n_bases) - { - binfo = TREE_VEC_ELT (bases, i++); - if (TREE_VIA_VIRTUAL (binfo)) - continue; - } - else - break; - - btype = BINFO_TYPE (binfo); - name = TYPE_NESTED_NAME (btype); - s = IDENTIFIER_POINTER (name); - - tneed = (2 * strlen (s)) + 39; - if (tgot < tneed) - { - tgot = tneed; - tbuf = (char *) alloca (tgot); - } - - sprintf (tbuf, "%c%s((%s%s ::%s&)_ctor_arg)", sep, s, - TYPE_READONLY (type) ? "const " : "", - CLASSTYPE_DECLARED_CLASS (btype) ? "class" : "struct", - s); - sep = ','; - obstack_grow (&prologue, tbuf, strlen (tbuf)); - } - } - - /* Construct fields. */ - - if (fields) - { - tree f; - - for (f = fields; f; f = TREE_CHAIN (f)) - { - if (TREE_CODE (f) == FIELD_DECL && ! DECL_VIRTUAL_P (f)) - { - char *s; - tree x; - tree t = TREE_TYPE (f); - - if (DECL_NAME (f)) - x = f; - else if (t != NULL_TREE - && TREE_CODE (t) == UNION_TYPE - && ((TREE_CODE (TYPE_NAME (t)) == IDENTIFIER_NODE - && ANON_AGGRNAME_P (TYPE_NAME (t))) - || (TREE_CODE (TYPE_NAME (t)) == TYPE_DECL - && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))) - && TYPE_FIELDS (t) != NULL_TREE) - x = largest_union_member (t); - else - continue; - - s = IDENTIFIER_POINTER (DECL_NAME (x)); - tneed = (2 * strlen (s)) + 30; - if (tgot < tneed) - { - tgot = tneed; - tbuf = (char *) alloca (tgot); - } - - sprintf (tbuf, "%c%s(_ctor_arg.%s)", sep, s, s); - sep = ','; - obstack_grow (&prologue, tbuf, strlen (tbuf)); - } - } - } - - /* Concatenate constructor body to prologue. */ - - *lenp = obstack_object_size (&prologue) + 2; - *bufp = obstack_alloc (&inline_text_obstack, *lenp + 1); - - obstack_1grow (&prologue, '\0'); - - strcpy (*bufp, prologue.object_base); - strcat (*bufp, "{}"); - } - #endif - /* Heuristic to tell whether the user is missing a semicolon after a struct or enum declaration. Emit an error message --- 1854,1857 ---- *************** *** 2301,2304 **** --- 1987,1992 ---- Otherwise, return the line's first non-whitespace character. */ + int linemode; + int check_newline () *************** *** 2322,2325 **** --- 2010,2016 ---- } + /* Don't read beyond this line. */ + linemode = 1; + /* Read first nonwhite char after the `#'. */ *************** *** 2354,2358 **** && getch () == 'l' && getch () == 'e' ! && ((c = getch ()) == ' ' || c == '\t' || c == '\n')) { extern tree pending_vtables; --- 2045,2049 ---- && getch () == 'l' && getch () == 'e' ! && ((c = getch ()) == ' ' || c == '\t')) { extern tree pending_vtables; *************** *** 2374,2378 **** nextchar = getch (); c = nextchar; ! if (c != '\n') warning ("trailing characters ignored"); } --- 2065,2069 ---- nextchar = getch (); c = nextchar; ! if (c != EOF) warning ("trailing characters ignored"); } *************** *** 2381,2385 **** && getch () == 'i' && getch () == 't' ! && ((c = getch ()) == ' ' || c == '\t' || c == '\n')) { /* More follows: it must be a string constant (unit name). */ --- 2072,2076 ---- && getch () == 'i' && getch () == 't' ! && ((c = getch ()) == ' ' || c == '\t')) { /* More follows: it must be a string constant (unit name). */ *************** *** 2395,2399 **** nextchar = getch (); c = nextchar; ! if (c != '\n') warning ("trailing characters ignored"); } --- 2086,2090 ---- nextchar = getch (); c = nextchar; ! if (c != EOF) warning ("trailing characters ignored"); } *************** *** 2411,2415 **** && getch () == 'c' && getch () == 'e' ! && ((c = getch ()) == ' ' || c == '\t' || c == '\n')) { int warned_already = 0; --- 2102,2106 ---- && getch () == 'c' && getch () == 'e' ! && ((c = getch ()) == ' ' || c == '\t' || c == EOF)) { int warned_already = 0; *************** *** 2419,2423 **** while (c == ' ' || c == '\t') c = getch (); ! if (c != '\n') { put_back (c); --- 2110,2114 ---- while (c == ' ' || c == '\t') c = getch (); ! if (c != EOF) { put_back (c); *************** *** 2437,2444 **** c = getch (); ! while (c != '\n') { if (!warned_already && extra_warnings ! && c != ' ' && c != '\t' && c != '\n') { warning ("garbage after `#pragma interface' ignored"); --- 2128,2135 ---- c = getch (); ! while (c != EOF) { if (!warned_already && extra_warnings ! && c != ' ' && c != '\t') { warning ("garbage after `#pragma interface' ignored"); *************** *** 2488,2492 **** && getch () == 'o' && getch () == 'n' ! && ((c = getch ()) == ' ' || c == '\t' || c == '\n')) { int warned_already = 0; --- 2179,2183 ---- && getch () == 'o' && getch () == 'n' ! && ((c = getch ()) == ' ' || c == '\t' || c == EOF)) { int warned_already = 0; *************** *** 2496,2500 **** while (c == ' ' || c == '\t') c = getch (); ! if (c != '\n') { put_back (c); --- 2187,2191 ---- while (c == ' ' || c == '\t') c = getch (); ! if (c != EOF) { put_back (c); *************** *** 2514,2521 **** c = getch (); ! while (c != '\n') { if (!warned_already && extra_warnings ! && c != ' ' && c != '\t' && c != '\n') { warning ("garbage after `#pragma implementation' ignored"); --- 2205,2212 ---- c = getch (); ! while (c != EOF) { if (!warned_already && extra_warnings ! && c != ' ' && c != '\t') { warning ("garbage after `#pragma implementation' ignored"); *************** *** 2571,2574 **** --- 2262,2282 ---- } } + #ifdef HANDLE_SYSV_PRAGMA + else + { + put_back (c); + handle_sysv_pragma (); + } + #else + #ifdef HANDLE_PRAGMA + /* FIXME: This will break if we're doing any of the C++ input + tricks. */ + else + { + ungetc (c, finput); + HANDLE_PRAGMA (finput); + } + #endif + #endif } goto skipline; *************** *** 2581,2585 **** && getch () == 'n' && getch () == 'e' ! && ((c = getch ()) == ' ' || c == '\t' || c == '\n')) { #ifdef DWARF_DEBUGGING_INFO --- 2289,2293 ---- && getch () == 'n' && getch () == 'e' ! && ((c = getch ()) == ' ' || c == '\t')) { #ifdef DWARF_DEBUGGING_INFO *************** *** 2597,2601 **** && getch () == 'e' && getch () == 'f' ! && ((c = getch ()) == ' ' || c == '\t' || c == '\n')) { #ifdef DWARF_DEBUGGING_INFO --- 2305,2309 ---- && getch () == 'e' && getch () == 'f' ! && ((c = getch ()) == ' ' || c == '\t')) { #ifdef DWARF_DEBUGGING_INFO *************** *** 2635,2640 **** /* If no argument, ignore the line. */ ! if (c == '\n') ! return c; put_back (c); --- 2343,2348 ---- /* If no argument, ignore the line. */ ! if (c == EOF) ! goto skipline; put_back (c); *************** *** 2688,2693 **** /* If the # is the only nonwhite char on the line, just ignore it. Check the new newline. */ ! if (c == '\n') ! return c; /* Something follows the #; read a token. */ --- 2396,2401 ---- /* If the # is the only nonwhite char on the line, just ignore it. Check the new newline. */ ! if (c == EOF) ! goto skipline; /* Something follows the #; read a token. */ *************** *** 2709,2717 **** int l = TREE_INT_CST_LOW (yylval.ttype) - 1; c = get_last_nonwhite_on_line (); ! if (c == '\n') { /* No more: store the line number and check following line. */ lineno = l; ! return c; } put_back (c); --- 2417,2425 ---- int l = TREE_INT_CST_LOW (yylval.ttype) - 1; c = get_last_nonwhite_on_line (); ! if (c == EOF) { /* No more: store the line number and check following line. */ lineno = l; ! goto skipline; } put_back (c); *************** *** 2772,2776 **** c = get_last_nonwhite_on_line (); ! if (c != '\n') { put_back (c); --- 2480,2490 ---- c = get_last_nonwhite_on_line (); ! if (c == EOF) ! { ! /* Update the name in the top element of input_file_stack. */ ! if (input_file_stack) ! input_file_stack->name = input_filename; ! } ! else { put_back (c); *************** *** 2792,2796 **** { c = get_last_nonwhite_on_line (); ! if (c != '\n') { put_back (c); --- 2506,2510 ---- { c = get_last_nonwhite_on_line (); ! if (c != EOF) { put_back (c); *************** *** 2809,2813 **** c = get_last_nonwhite_on_line (); ! if (c != '\n') { put_back (c); --- 2523,2527 ---- c = get_last_nonwhite_on_line (); ! if (c != EOF) { put_back (c); *************** *** 2825,2829 **** c = get_last_nonwhite_on_line (); ! if (c != '\n') { put_back (c); --- 2539,2543 ---- c = get_last_nonwhite_on_line (); ! if (c != EOF) { put_back (c); *************** *** 2832,2836 **** } ! /* Do the actions implied by the preceeding numbers. */ if (action == act_push) --- 2546,2550 ---- } ! /* Do the actions implied by the preceding numbers. */ if (action == act_push) *************** *** 2900,2905 **** /* If NEXTCHAR is not end of line, we don't care what it is. */ ! if (nextchar == '\n') ! return '\n'; } else --- 2614,2619 ---- /* If NEXTCHAR is not end of line, we don't care what it is. */ ! if (nextchar == EOF) ! c = EOF; } else *************** *** 2908,2913 **** /* skip the rest of this line. */ skipline: ! if (c == '\n') ! return c; while ((c = getch ()) != EOF && c != '\n'); return c; --- 2622,2627 ---- /* skip the rest of this line. */ skipline: ! linemode = 0; ! end_of_file = 0; while ((c = getch ()) != EOF && c != '\n'); return c; *************** *** 3094,3097 **** --- 2808,2813 ---- && DECL_TEMPLATE_IS_CLASS (decl)) return PTYPENAME; + if (TREE_CODE (decl) == NAMESPACE_DECL) + return NSNAME; if (TREE_CODE (decl) != TYPE_DECL) return IDENTIFIER; *************** *** 3316,3319 **** --- 3032,3037 ---- if (input_redirected ()) value = END_OF_SAVED_INPUT; + else if (linemode) + value = END_OF_LINE; else if (do_pending_expansions ()) /* this will set yychar for us */ *************** *** 3475,3478 **** --- 3193,3242 ---- yylval.ttype = old_ttype; } + else if (ptr->token == EQCOMPARE) + { + yylval.code = NE_EXPR; + token_buffer[0] = '!'; + token_buffer[1] = '='; + token_buffer[2] = 0; + } + else if (ptr->token == ASSIGN) + { + if (strcmp ("and_eq", token_buffer) == 0) + { + yylval.code = BIT_AND_EXPR; + token_buffer[0] = '&'; + } + else if (strcmp ("or_eq", token_buffer) == 0) + { + yylval.code = BIT_IOR_EXPR; + token_buffer[0] = '|'; + } + else if (strcmp ("xor_eq", token_buffer) == 0) + { + yylval.code = BIT_XOR_EXPR; + token_buffer[0] = '^'; + } + token_buffer[1] = '='; + token_buffer[2] = 0; + } + else if (ptr->token == '&') + { + yylval.code = BIT_AND_EXPR; + token_buffer[0] = '&'; + token_buffer[1] = 0; + } + else if (ptr->token == '|') + { + yylval.code = BIT_IOR_EXPR; + token_buffer[0] = '|'; + token_buffer[1] = 0; + } + else if (ptr->token == '^') + { + yylval.code = BIT_XOR_EXPR; + token_buffer[0] = '^'; + token_buffer[1] = 0; + } + value = (int) ptr->token; } *************** *** 4140,4144 **** if (width < HOST_BITS_PER_INT && (unsigned) c >= (1 << width)) ! pedwarn ("escape sequence out of range for character"); #ifdef MAP_CHARACTER if (isprint (c)) --- 3904,3908 ---- if (width < HOST_BITS_PER_INT && (unsigned) c >= (1 << width)) ! warning ("escape sequence out of range for character"); #ifdef MAP_CHARACTER if (isprint (c)) *************** *** 4257,4261 **** && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT && c >= ((unsigned) 1 << TYPE_PRECISION (char_type_node))) ! pedwarn ("escape sequence out of range for character"); } else if (c == '\n') --- 4021,4025 ---- && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT && c >= ((unsigned) 1 << TYPE_PRECISION (char_type_node))) ! warning ("escape sequence out of range for character"); } else if (c == '\n') *************** *** 4412,4416 **** else if ((c == '-') && (c1 == '>')) { ! nextchar = skip_white_space (getch ()); if (nextchar == '*') { --- 4176,4180 ---- else if ((c == '-') && (c1 == '>')) { ! nextchar = getch (); if (nextchar == '*') { *************** *** 4439,4447 **** nextchar = c1; } ! if (flag_ansi) pedwarn ("use of `operator %s' is not standard C++", token_buffer); goto done; } nextchar = c1; --- 4203,4220 ---- nextchar = c1; } ! if (pedantic) pedwarn ("use of `operator %s' is not standard C++", token_buffer); goto done; } + /* digraphs */ + else if (c == '<' && c1 == '%') + { value = '{'; goto done; } + else if (c == '<' && c1 == ':') + { value = '['; goto done; } + else if (c == '%' && c1 == '>') + { value = '}'; goto done; } + else if (c == '%' && c1 == ':') + { value = '#'; goto done; } nextchar = c1; *************** *** 4461,4464 **** --- 4234,4242 ---- yylval.itype = 1; } + else if (c == '>') + { + value = ']'; + goto done; + } else { *************** *** 4812,4813 **** --- 4590,4635 ---- error (buf, token_buffer); } + + #ifdef HANDLE_SYSV_PRAGMA + + /* Handle a #pragma directive. INPUT is the current input stream, + and C is a character to reread. Processes the entire input line + and returns a character for the caller to reread: either \n or EOF. */ + + /* This function has to be in this file, in order to get at + the token types. */ + + handle_sysv_pragma () + { + for (;;) + { + switch (yylex ()) + { + case IDENTIFIER: + case TYPENAME: + case STRING: + case CONSTANT: + handle_pragma_token ("ignored", yylval.ttype); + break; + case '(': + handle_pragma_token ("(", NULL_TREE); + break; + case ')': + handle_pragma_token (")", NULL_TREE); + break; + case '=': + handle_pragma_token ("=", NULL_TREE); + break; + case LEFT_RIGHT: + handle_pragma_token ("(", NULL_TREE); + handle_pragma_token (")", NULL_TREE); + break; + case END_OF_LINE: + handle_pragma_token (NULL_PTR, NULL_TREE); + return; + default: + abort (); + } + } + } + #endif /* HANDLE_SYSV_PRAGMA */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/lex.h gcc-2.7.0/cp/lex.h *** gcc-2.6.3/cp/lex.h Thu Aug 18 16:48:44 1994 --- gcc-2.7.0/cp/lex.h Tue Jan 24 03:10:01 1995 *************** *** 59,62 **** --- 59,63 ---- RID_FRIEND, RID_VIRTUAL, + RID_EXPLICIT, RID_SIGNED, RID_AUTO, *************** *** 123,126 **** --- 124,128 ---- /* Tell the lexer where to look for names. */ extern tree got_scope; + extern tree got_object; /* Pending language change. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/method.c gcc-2.7.0/cp/method.c *** gcc-2.6.3/cp/method.c Mon Nov 14 23:30:57 1994 --- gcc-2.7.0/cp/method.c Thu Jun 15 08:26:02 1995 *************** *** 1,5 **** /* Handle the hair of processing (but not expanding) inline functions. Also manage function and variable name overloading. ! Copyright (C) 1987, 1989, 1992, 1993 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,5 ---- /* Handle the hair of processing (but not expanding) inline functions. Also manage function and variable name overloading. ! Copyright (C) 1987, 1989, 1992, 1993, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 60,63 **** --- 61,65 ---- # define OB_PUTCP(S) (obstack_grow (&scratch_obstack, (S), strlen (S))) # define OB_FINISH() (obstack_1grow (&scratch_obstack, '\0')) + # define OB_LAST() (obstack_next_free (&scratch_obstack)[-1]) #ifdef NO_AUTO_OVERLOAD *************** *** 314,334 **** } ! static int numeric_outputed_need_bar; static void build_overload_identifier (); static void ! build_overload_nested_name (context) ! tree context; { ! /* We use DECL_NAME here, because pushtag now sets the DECL_ASSEMBLER_NAME. */ ! tree name = DECL_NAME (context); ! if (DECL_CONTEXT (context)) { ! context = DECL_CONTEXT (context); if (TREE_CODE_CLASS (TREE_CODE (context)) == 't') ! context = TYPE_NAME (context); build_overload_nested_name (context); } ! build_overload_identifier (name); } --- 316,356 ---- } ! static int numeric_output_need_bar; static void build_overload_identifier (); static void ! build_overload_nested_name (decl) ! tree decl; { ! if (DECL_CONTEXT (decl)) { ! tree context = DECL_CONTEXT (decl); if (TREE_CODE_CLASS (TREE_CODE (context)) == 't') ! context = TYPE_MAIN_DECL (context); build_overload_nested_name (context); } ! ! if (TREE_CODE (decl) == FUNCTION_DECL) ! { ! tree name = DECL_ASSEMBLER_NAME (decl); ! char *label; ! extern int var_labelno; ! ! ASM_FORMAT_PRIVATE_NAME (label, IDENTIFIER_POINTER (name), var_labelno); ! var_labelno++; ! ! if (numeric_output_need_bar) ! { ! OB_PUTC ('_'); ! numeric_output_need_bar = 0; ! } ! icat (strlen (label)); ! OB_PUTCP (label); ! } ! else /* TYPE_DECL */ ! { ! tree name = DECL_NAME (decl); ! build_overload_identifier (name); ! } } *************** *** 342,345 **** --- 364,380 ---- my_friendly_assert (TREE_CODE (type) == PARM_DECL, 242); type = TREE_TYPE (type); + if (TREE_CODE (type) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (type)) == OFFSET_TYPE) + { + /* Handle a pointer to member as a template instantiation + parameter, boy, what fun! */ + type = integer_type_node; + if (TREE_CODE (value) != INTEGER_CST) + { + sorry ("unknown pointer to member constant"); + return; + } + } + switch (TREE_CODE (type)) { *************** *** 478,482 **** build_overload_name (TREE_TYPE (parm), 0, 0); build_overload_value (parm, arg); ! numeric_outputed_need_bar = 1; } } --- 513,517 ---- build_overload_name (TREE_TYPE (parm), 0, 0); build_overload_value (parm, arg); ! numeric_output_need_bar = 1; } } *************** *** 484,491 **** else { ! if (numeric_outputed_need_bar) { OB_PUTC ('_'); ! numeric_outputed_need_bar = 0; } icat (IDENTIFIER_LENGTH (name)); --- 519,526 ---- else { ! if (numeric_output_need_bar) { OB_PUTC ('_'); ! numeric_output_need_bar = 0; } icat (IDENTIFIER_LENGTH (name)); *************** *** 515,519 **** if (begin) OB_INIT (); ! numeric_outputed_need_bar = 0; if ((just_one = (TREE_CODE (parmtypes) != TREE_LIST))) --- 550,554 ---- if (begin) OB_INIT (); ! numeric_output_need_bar = 0; if ((just_one = (TREE_CODE (parmtypes) != TREE_LIST))) *************** *** 529,570 **** only_one: ! if (! nofold) { ! if (! just_one) ! /* Every argument gets counted. */ ! typevec[maxtype++] = parmtype; ! if (TREE_USED (parmtype)) { ! if (! just_one && parmtype == typevec[maxtype-2]) ! nrepeats++; ! else ! { ! if (nrepeats) ! flush_repeats (parmtype); ! if (! just_one && TREE_CHAIN (parmtypes) ! && parmtype == TREE_VALUE (TREE_CHAIN (parmtypes))) ! nrepeats++; ! else ! { ! int tindex = 0; ! ! while (typevec[tindex] != parmtype) ! tindex++; ! OB_PUTC ('T'); ! icat (tindex); ! if (tindex > 9) ! OB_PUTC ('_'); ! } ! } goto next; } if (nrepeats) flush_repeats (typevec[maxtype-2]); ! if (! just_one ! /* Only cache types which take more than one character. */ ! && (parmtype != TYPE_MAIN_VARIANT (parmtype) ! || (TREE_CODE (parmtype) != INTEGER_TYPE ! && TREE_CODE (parmtype) != REAL_TYPE))) TREE_USED (parmtype) = 1; } --- 564,591 ---- only_one: ! if (! nofold && ! just_one) { ! /* Every argument gets counted. */ ! typevec[maxtype++] = parmtype; ! if (TREE_USED (parmtype) && parmtype == typevec[maxtype-2]) { ! nrepeats++; goto next; } + if (nrepeats) flush_repeats (typevec[maxtype-2]); ! ! if (TREE_USED (parmtype)) ! { ! flush_repeats (parmtype); ! goto next; ! } ! ! /* Only cache types which take more than one character. */ ! if (parmtype != TYPE_MAIN_VARIANT (parmtype) ! || (TREE_CODE (parmtype) != INTEGER_TYPE ! && TREE_CODE (parmtype) != REAL_TYPE)) TREE_USED (parmtype) = 1; } *************** *** 763,766 **** --- 784,794 ---- { tree context = name; + + /* If DECL_ASSEMBLER_NAME has been set properly, use it. */ + if (DECL_ASSEMBLER_NAME (context) != DECL_NAME (context)) + { + OB_PUTID (DECL_ASSEMBLER_NAME (context)); + break; + } while (DECL_CONTEXT (context)) { *************** *** 781,786 **** if (i > 9) OB_PUTC ('_'); ! numeric_outputed_need_bar = 0; ! build_overload_nested_name (TYPE_NAME (parmtype)); } else --- 809,814 ---- if (i > 9) OB_PUTC ('_'); ! numeric_output_need_bar = 0; ! build_overload_nested_name (TYPE_MAIN_DECL (parmtype)); } else *************** *** 1180,1187 **** build_tree_list (NULL_TREE, xarg2)), NULL_TREE, flags); ! /* This happens when the user mis-declares `operator delete'. ! Should now be impossible. */ my_friendly_assert (rval != error_mark_node, 250); TREE_TYPE (rval) = void_type_node; return rval; } --- 1208,1216 ---- build_tree_list (NULL_TREE, xarg2)), NULL_TREE, flags); ! #if 0 ! /* This can happen when operator delete is protected. */ my_friendly_assert (rval != error_mark_node, 250); TREE_TYPE (rval) = void_type_node; + #endif return rval; } *************** *** 1455,1475 **** } TREE_USED (current_class_decl) = 1; ! if (yychar == '(') ! if (! ((TYPE_LANG_SPECIFIC (type) ! && TYPE_OVERLOADS_CALL_EXPR (type)) ! || (TREE_CODE (type) == REFERENCE_TYPE ! && TYPE_LANG_SPECIFIC (TREE_TYPE (type)) ! && TYPE_OVERLOADS_CALL_EXPR (TREE_TYPE (type)))) ! && TREE_CODE (type) != FUNCTION_TYPE ! && TREE_CODE (type) != METHOD_TYPE ! && !TYPE_PTRMEMFUNC_P (type) ! && (TREE_CODE (type) != POINTER_TYPE ! || (TREE_CODE (TREE_TYPE (type)) != FUNCTION_TYPE ! && TREE_CODE (TREE_TYPE (type)) != METHOD_TYPE))) ! { ! error ("component `%s' is not a method", ! IDENTIFIER_POINTER (name)); ! return error_mark_node; ! } /* Mark so that if we are in a constructor, and then find that this field was initialized by a base initializer, --- 1484,1488 ---- } TREE_USED (current_class_decl) = 1; ! /* Mark so that if we are in a constructor, and then find that this field was initialized by a base initializer, *************** *** 1556,1561 **** || TREE_CODE (value) == PARM_DECL || TREE_CODE (value) == RESULT_DECL, 252); ! if (DECL_REFERENCE_SLOT (value)) ! return DECL_REFERENCE_SLOT (value); } return value; --- 1569,1573 ---- || TREE_CODE (value) == PARM_DECL || TREE_CODE (value) == RESULT_DECL, 252); ! return convert_from_reference (value); } return value; *************** *** 1722,1726 **** abort (); func_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (func_decl)); ! sprintf (buffer, "__thunk_%d_%s", -delta, func_name); thunk_id = get_identifier (buffer); thunk = IDENTIFIER_GLOBAL_VALUE (thunk_id); --- 1734,1741 ---- abort (); func_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (func_decl)); ! if (delta<=0) ! sprintf (buffer, "__thunk_%d_%s", -delta, func_name); ! else ! sprintf (buffer, "__thunk_n%d_%s", delta, func_name); thunk_id = get_identifier (buffer); thunk = IDENTIFIER_GLOBAL_VALUE (thunk_id); *************** *** 1892,1896 **** expand_end_bindings (NULL, 1, 0); ! poplevel (0, 0, 0); /* From now on, allocate rtl in current_obstack, not in saveable_obstack. --- 1907,1911 ---- expand_end_bindings (NULL, 1, 0); ! poplevel (0, 0, 1); /* From now on, allocate rtl in current_obstack, not in saveable_obstack. *************** *** 1907,1910 **** --- 1922,1929 ---- unshare_all_rtl (insns); + /* Instantiate all virtual registers. */ + + instantiate_virtual_regs (current_function_decl, get_insns ()); + /* We are no longer anticipating cse in this function, at least. */ *************** *** 1972,1985 **** /* Code for synthesizing methods which have default semantics defined. */ - void - build_default_constructor (fndecl) - tree fndecl; - { - start_function (NULL_TREE, fndecl, NULL_TREE, 1); - store_parm_decls (); - setup_vtbl_ptr (); - finish_function (lineno, 0); - } - /* For the anonymous union in TYPE, return the member that is at least as large as the rest of the members, so we can copy it. */ --- 1991,1994 ---- *************** *** 1991,1995 **** for (f = TYPE_FIELDS (type); f; f = TREE_CHAIN (f)) ! if (simple_cst_equal (DECL_SIZE (f), type_size)) return f; --- 2000,2004 ---- for (f = TYPE_FIELDS (type); f; f = TREE_CHAIN (f)) ! if (simple_cst_equal (DECL_SIZE (f), type_size) == 1) return f; *************** *** 2001,2005 **** /* Generate code for default X(X&) constructor. */ void ! build_copy_constructor (fndecl) tree fndecl; { --- 2010,2014 ---- /* Generate code for default X(X&) constructor. */ void ! do_build_copy_constructor (fndecl) tree fndecl; { *************** *** 2007,2012 **** tree t; - start_function (NULL_TREE, fndecl, NULL_TREE, 1); - store_parm_decls (); clear_last_expr (); push_momentary (); --- 2016,2019 ---- *************** *** 2016,2020 **** parm = convert_from_reference (parm); ! if (! TYPE_HAS_COMPLEX_INIT_REF (current_class_type)) { t = build (INIT_EXPR, void_type_node, C_C_D, parm); --- 2023,2027 ---- parm = convert_from_reference (parm); ! if (TYPE_HAS_TRIVIAL_INIT_REF (current_class_type)) { t = build (INIT_EXPR, void_type_node, C_C_D, parm); *************** *** 2033,2037 **** { tree basetype = BINFO_TYPE (t); ! tree p = convert (build_reference_type (basetype), parm); p = convert_from_reference (p); current_base_init_list = tree_cons (TYPE_NESTED_NAME (basetype), --- 2040,2046 ---- { tree basetype = BINFO_TYPE (t); ! tree p = convert_to_reference ! (build_reference_type (basetype), parm, ! CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE); p = convert_from_reference (p); current_base_init_list = tree_cons (TYPE_NESTED_NAME (basetype), *************** *** 2043,2050 **** tree p, basetype = TREE_VEC_ELT (binfos, i); if (TREE_VIA_VIRTUAL (basetype)) ! continue; basetype = BINFO_TYPE (basetype); ! p = convert (build_reference_type (basetype), parm); p = convert_from_reference (p); current_base_init_list = tree_cons (TYPE_NESTED_NAME (basetype), --- 2052,2061 ---- tree p, basetype = TREE_VEC_ELT (binfos, i); if (TREE_VIA_VIRTUAL (basetype)) ! continue; basetype = BINFO_TYPE (basetype); ! p = convert_to_reference ! (build_reference_type (basetype), parm, ! CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE); p = convert_from_reference (p); current_base_init_list = tree_cons (TYPE_NESTED_NAME (basetype), *************** *** 2054,2105 **** { tree name, init, t; ! if (TREE_CODE (fields) != FIELD_DECL) continue; ! if (DECL_NAME (fields)) { ! if (VFIELD_NAME_P (DECL_NAME (fields))) continue; ! if (VBASE_NAME_P (DECL_NAME (fields))) continue; /* True for duplicate members. */ ! if (IDENTIFIER_CLASS_VALUE (DECL_NAME (fields)) != fields) continue; } ! else if ((t = TREE_TYPE (fields)) != NULL_TREE && TREE_CODE (t) == UNION_TYPE && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)) && TYPE_FIELDS (t) != NULL_TREE) ! fields = largest_union_member (t); else continue; ! init = build (COMPONENT_REF, TREE_TYPE (fields), parm, fields); init = build_tree_list (NULL_TREE, init); current_member_init_list ! = tree_cons (DECL_NAME (fields), init, current_member_init_list); } current_member_init_list = nreverse (current_member_init_list); setup_vtbl_ptr (); } pop_momentary (); - finish_function (lineno, 0); } void ! build_assign_ref (fndecl) tree fndecl; { tree parm = TREE_CHAIN (DECL_ARGUMENTS (fndecl)); ! start_function (NULL_TREE, fndecl, NULL_TREE, 1); ! store_parm_decls (); push_momentary (); parm = convert_from_reference (parm); ! if (! TYPE_HAS_COMPLEX_ASSIGN_REF (current_class_type)) { tree t = build (MODIFY_EXPR, void_type_node, C_C_D, parm); --- 2065,2117 ---- { tree name, init, t; ! tree field = fields; ! ! if (TREE_CODE (field) != FIELD_DECL) continue; ! if (DECL_NAME (field)) { ! if (VFIELD_NAME_P (DECL_NAME (field))) continue; ! if (VBASE_NAME_P (DECL_NAME (field))) continue; /* True for duplicate members. */ ! if (IDENTIFIER_CLASS_VALUE (DECL_NAME (field)) != field) continue; } ! else if ((t = TREE_TYPE (field)) != NULL_TREE && TREE_CODE (t) == UNION_TYPE && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)) && TYPE_FIELDS (t) != NULL_TREE) ! field = largest_union_member (t); else continue; ! init = build (COMPONENT_REF, TREE_TYPE (field), parm, field); init = build_tree_list (NULL_TREE, init); current_member_init_list ! = tree_cons (DECL_NAME (field), init, current_member_init_list); } current_member_init_list = nreverse (current_member_init_list); + current_base_init_list = nreverse (current_base_init_list); setup_vtbl_ptr (); } pop_momentary (); } void ! do_build_assign_ref (fndecl) tree fndecl; { tree parm = TREE_CHAIN (DECL_ARGUMENTS (fndecl)); ! clear_last_expr (); push_momentary (); parm = convert_from_reference (parm); ! if (TYPE_HAS_TRIVIAL_ASSIGN_REF (current_class_type)) { tree t = build (MODIFY_EXPR, void_type_node, C_C_D, parm); *************** *** 2119,2123 **** if (TYPE_HAS_ASSIGN_REF (basetype)) { ! tree p = convert (build_reference_type (basetype), parm); p = convert_from_reference (p); p = build_member_call (TYPE_NESTED_NAME (basetype), --- 2131,2137 ---- if (TYPE_HAS_ASSIGN_REF (basetype)) { ! tree p = convert_to_reference ! (build_reference_type (basetype), parm, ! CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE); p = convert_from_reference (p); p = build_member_call (TYPE_NESTED_NAME (basetype), *************** *** 2130,2156 **** { tree comp, init, t; ! if (TREE_CODE (fields) != FIELD_DECL) continue; ! if (DECL_NAME (fields)) { ! if (VFIELD_NAME_P (DECL_NAME (fields))) continue; ! if (VBASE_NAME_P (DECL_NAME (fields))) continue; /* True for duplicate members. */ ! if (IDENTIFIER_CLASS_VALUE (DECL_NAME (fields)) != fields) continue; } ! else if ((t = TREE_TYPE (fields)) != NULL_TREE && TREE_CODE (t) == UNION_TYPE && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)) && TYPE_FIELDS (t) != NULL_TREE) ! fields = largest_union_member (t); else continue; ! comp = build (COMPONENT_REF, TREE_TYPE (fields), C_C_D, fields); ! init = build (COMPONENT_REF, TREE_TYPE (fields), parm, fields); expand_expr_stmt (build_modify_expr (comp, NOP_EXPR, init)); --- 2144,2172 ---- { tree comp, init, t; ! tree field = fields; ! ! if (TREE_CODE (field) != FIELD_DECL) continue; ! if (DECL_NAME (field)) { ! if (VFIELD_NAME_P (DECL_NAME (field))) continue; ! if (VBASE_NAME_P (DECL_NAME (field))) continue; /* True for duplicate members. */ ! if (IDENTIFIER_CLASS_VALUE (DECL_NAME (field)) != field) continue; } ! else if ((t = TREE_TYPE (field)) != NULL_TREE && TREE_CODE (t) == UNION_TYPE && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)) && TYPE_FIELDS (t) != NULL_TREE) ! field = largest_union_member (t); else continue; ! comp = build (COMPONENT_REF, TREE_TYPE (field), C_C_D, field); ! init = build (COMPONENT_REF, TREE_TYPE (field), parm, field); expand_expr_stmt (build_modify_expr (comp, NOP_EXPR, init)); *************** *** 2159,2171 **** c_expand_return (C_C_D); pop_momentary (); - finish_function (lineno, 0); } void ! build_dtor (fndecl) tree fndecl; { start_function (NULL_TREE, fndecl, NULL_TREE, 1); store_parm_decls (); ! finish_function (lineno, 0); } --- 2175,2231 ---- c_expand_return (C_C_D); pop_momentary (); } + void push_cp_function_context (); + void pop_cp_function_context (); + void ! synthesize_method (fndecl) tree fndecl; { + int nested = (current_function_decl != NULL_TREE); + tree context = decl_function_context (fndecl); + char *f = input_filename; + tree base = DECL_CLASS_CONTEXT (fndecl); + + if (nested) + push_cp_function_context (context); + + input_filename = DECL_SOURCE_FILE (fndecl); + interface_unknown = CLASSTYPE_INTERFACE_UNKNOWN (base); + interface_only = CLASSTYPE_INTERFACE_ONLY (base); start_function (NULL_TREE, fndecl, NULL_TREE, 1); store_parm_decls (); ! ! if (DECL_NAME (fndecl) == ansi_opname[MODIFY_EXPR]) ! do_build_assign_ref (fndecl); ! else if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl))) ! ; ! else ! { ! tree arg_chain = FUNCTION_ARG_CHAIN (fndecl); ! if (DECL_CONSTRUCTOR_FOR_VBASE_P (fndecl)) ! arg_chain = TREE_CHAIN (arg_chain); ! if (arg_chain != void_list_node) ! do_build_copy_constructor (fndecl); ! else if (TYPE_NEEDS_CONSTRUCTING (current_class_type)) ! setup_vtbl_ptr (); ! } ! ! finish_function (lineno, 0, nested); ! ! /* Do we really *want* to inline this function? */ ! if (DECL_INLINE (fndecl)) ! { ! /* Turn off DECL_INLINE for the moment so function_cannot_inline_p ! will check our size. */ ! DECL_INLINE (fndecl) = 0; ! if (function_cannot_inline_p (fndecl) == 0) ! DECL_INLINE (fndecl) = 1; ! } ! ! input_filename = f; ! extract_interface_info (); ! if (nested) ! pop_cp_function_context (context); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/parse.c gcc-2.7.0/cp/parse.c *** gcc-2.6.3/cp/parse.c Fri Oct 14 14:51:23 1994 --- gcc-2.7.0/cp/parse.c Thu Jun 15 12:54:45 1995 *************** *** 46,89 **** #define CXX_TRUE 297 #define CXX_FALSE 298 ! #define LEFT_RIGHT 299 ! #define TEMPLATE 300 ! #define TYPEID 301 ! #define DYNAMIC_CAST 302 ! #define STATIC_CAST 303 ! #define REINTERPRET_CAST 304 ! #define CONST_CAST 305 ! #define SCOPE 306 ! #define EMPTY 307 ! #define PTYPENAME 308 ! #define ASSIGN 309 ! #define OROR 310 ! #define ANDAND 311 ! #define MIN_MAX 312 ! #define EQCOMPARE 313 ! #define ARITHCOMPARE 314 ! #define LSHIFT 315 ! #define RSHIFT 316 ! #define POINTSAT_STAR 317 ! #define DOT_STAR 318 ! #define UNARY 319 ! #define PLUSPLUS 320 ! #define MINUSMINUS 321 ! #define HYPERUNARY 322 ! #define PAREN_STAR_PAREN 323 ! #define POINTSAT 324 ! #define TRY 325 ! #define CATCH 326 ! #define THROW 327 ! #define TYPENAME_ELLIPSIS 328 ! #define PRE_PARSED_FUNCTION_DECL 329 ! #define EXTERN_LANG_STRING 330 ! #define ALL 331 ! #define PRE_PARSED_CLASS_DECL 332 ! #define TYPENAME_DEFN 333 ! #define IDENTIFIER_DEFN 334 ! #define PTYPENAME_DEFN 335 ! #define END_OF_SAVED_INPUT 336 ! #line 42 "parse.y" /* Cause the `yydebug' variable to be defined. */ --- 46,94 ---- #define CXX_TRUE 297 #define CXX_FALSE 298 ! #define NAMESPACE 299 ! #define TYPENAME_KEYWORD 300 ! #define USING 301 ! #define LEFT_RIGHT 302 ! #define TEMPLATE 303 ! #define TYPEID 304 ! #define DYNAMIC_CAST 305 ! #define STATIC_CAST 306 ! #define REINTERPRET_CAST 307 ! #define CONST_CAST 308 ! #define SCOPE 309 ! #define EMPTY 310 ! #define PTYPENAME 311 ! #define NSNAME 312 ! #define THROW 313 ! #define ASSIGN 314 ! #define OROR 315 ! #define ANDAND 316 ! #define MIN_MAX 317 ! #define EQCOMPARE 318 ! #define ARITHCOMPARE 319 ! #define LSHIFT 320 ! #define RSHIFT 321 ! #define POINTSAT_STAR 322 ! #define DOT_STAR 323 ! #define UNARY 324 ! #define PLUSPLUS 325 ! #define MINUSMINUS 326 ! #define HYPERUNARY 327 ! #define PAREN_STAR_PAREN 328 ! #define POINTSAT 329 ! #define TRY 330 ! #define CATCH 331 ! #define TYPENAME_ELLIPSIS 332 ! #define PRE_PARSED_FUNCTION_DECL 333 ! #define EXTERN_LANG_STRING 334 ! #define ALL 335 ! #define PRE_PARSED_CLASS_DECL 336 ! #define TYPENAME_DEFN 337 ! #define IDENTIFIER_DEFN 338 ! #define PTYPENAME_DEFN 339 ! #define END_OF_LINE 340 ! #define END_OF_SAVED_INPUT 341 ! #line 29 "parse.y" /* Cause the `yydebug' variable to be defined. */ *************** *** 100,103 **** --- 105,109 ---- #include "lex.h" #include "cp-tree.h" + #include "output.h" /* Since parsers are distinct for each language, put the language string *************** *** 114,117 **** --- 120,124 ---- extern int end_of_file; extern int current_class_depth; + extern int flag_new_for_scope; void yyerror (); *************** *** 149,158 **** } ! #line 108 "parse.y" typedef union {long itype; tree ttype; char *strtype; enum tree_code code; } YYSTYPE; ! #line 277 "parse.y" /* List of types and structure classes of the current declaration. */ static tree current_declspecs; /* When defining an aggregate, this is the most recent one being defined. */ --- 156,166 ---- } ! #line 97 "parse.y" typedef union {long itype; tree ttype; char *strtype; enum tree_code code; } YYSTYPE; ! #line 274 "parse.y" /* List of types and structure classes of the current declaration. */ static tree current_declspecs; + static tree prefix_attributes = NULL_TREE; /* When defining an aggregate, this is the most recent one being defined. */ *************** *** 191,199 **** ! #define YYFINAL 1356 #define YYFLAG -32768 ! #define YYNTBASE 106 ! #define YYTRANSLATE(x) ((unsigned)(x) <= 336 ? yytranslate[x] : 338) static const char yytranslate[] = { 0, --- 199,207 ---- ! #define YYFINAL 1383 #define YYFLAG -32768 ! #define YYNTBASE 111 ! #define YYTRANSLATE(x) ((unsigned)(x) <= 341 ? yytranslate[x] : 350) static const char yytranslate[] = { 0, *************** *** 201,214 **** 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 104, 2, 2, 2, 77, 65, 2, 88, ! 102, 75, 73, 55, 74, 87, 76, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 60, 56, 69, ! 58, 70, 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 89, 2, 105, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 54, 63, 103, 83, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --- 209,222 ---- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 109, 2, 2, 2, 82, 70, 2, 93, ! 107, 80, 78, 59, 79, 92, 81, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 62, 60, 74, ! 64, 75, 65, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 94, 2, 110, 69, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 58, 68, 108, 88, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, *************** *** 228,566 **** 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ! 46, 47, 48, 49, 50, 51, 52, 53, 57, 61, ! 62, 66, 67, 68, 71, 72, 78, 79, 80, 81, ! 82, 84, 85, 86, 90, 91, 92, 93, 94, 95, ! 96, 97, 98, 99, 100, 101 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, ! 0, 1, 3, 4, 7, 10, 11, 12, 14, 16, ! 17, 20, 22, 24, 26, 28, 34, 39, 43, 48, ! 53, 55, 56, 62, 64, 68, 70, 73, 75, 79, ! 81, 85, 87, 91, 92, 98, 99, 105, 106, 112, ! 113, 119, 123, 127, 134, 142, 147, 151, 155, 157, ! 159, 161, 163, 165, 168, 172, 176, 180, 184, 187, ! 190, 193, 196, 199, 201, 205, 210, 214, 220, 225, ! 229, 233, 236, 240, 244, 247, 249, 256, 261, 265, ! 269, 272, 275, 277, 281, 286, 289, 293, 294, 295, ! 297, 301, 304, 308, 310, 315, 318, 323, 326, 331, ! 334, 336, 338, 340, 342, 344, 346, 348, 350, 354, ! 358, 363, 368, 372, 377, 381, 386, 387, 389, 393, ! 395, 397, 398, 405, 406, 408, 409, 412, 414, 416, ! 418, 420, 422, 424, 426, 428, 432, 434, 438, 439, ! 441, 443, 444, 453, 455, 458, 463, 468, 470, 474, ! 478, 482, 486, 488, 490, 492, 493, 497, 500, 503, ! 506, 509, 512, 515, 520, 523, 528, 531, 535, 539, ! 544, 549, 555, 561, 568, 571, 576, 582, 586, 590, ! 594, 596, 600, 603, 607, 612, 614, 617, 623, 625, ! 630, 635, 640, 642, 646, 650, 654, 658, 662, 666, ! 670, 674, 678, 682, 686, 690, 694, 698, 702, 706, ! 710, 714, 718, 724, 728, 732, 734, 737, 741, 743, ! 745, 747, 749, 751, 753, 755, 758, 761, 765, 767, ! 769, 771, 775, 777, 779, 781, 783, 787, 791, 792, ! 797, 798, 805, 808, 813, 816, 819, 821, 826, 828, ! 836, 844, 852, 860, 865, 870, 873, 876, 878, 883, ! 886, 889, 892, 898, 902, 908, 912, 917, 924, 926, ! 929, 931, 934, 936, 938, 940, 943, 944, 947, 950, ! 954, 958, 962, 966, 970, 973, 976, 978, 980, 982, ! 985, 988, 991, 994, 996, 998, 1000, 1002, 1005, 1008, ! 1012, 1016, 1021, 1023, 1026, 1029, 1031, 1033, 1036, 1039, ! 1041, 1044, 1047, 1051, 1053, 1056, 1058, 1060, 1062, 1067, ! 1072, 1077, 1082, 1084, 1086, 1088, 1090, 1094, 1096, 1100, ! 1102, 1106, 1107, 1112, 1113, 1121, 1126, 1127, 1135, 1140, ! 1141, 1149, 1154, 1155, 1163, 1168, 1169, 1171, 1173, 1176, ! 1183, 1185, 1189, 1190, 1192, 1197, 1204, 1209, 1211, 1213, ! 1215, 1217, 1219, 1223, 1225, 1228, 1232, 1237, 1239, 1241, ! 1245, 1250, 1257, 1261, 1267, 1268, 1276, 1281, 1282, 1289, ! 1293, 1296, 1299, 1304, 1306, 1307, 1309, 1310, 1312, 1314, ! 1317, 1320, 1323, 1326, 1330, 1333, 1336, 1339, 1343, 1347, ! 1349, 1352, 1353, 1354, 1358, 1362, 1365, 1367, 1369, 1370, ! 1372, 1375, 1377, 1381, 1383, 1386, 1388, 1393, 1398, 1400, ! 1402, 1405, 1408, 1410, 1411, 1413, 1418, 1422, 1424, 1427, ! 1430, 1433, 1436, 1439, 1442, 1445, 1448, 1453, 1456, 1458, ! 1464, 1468, 1469, 1471, 1475, 1476, 1478, 1482, 1484, 1486, ! 1488, 1490, 1495, 1502, 1507, 1512, 1519, 1524, 1528, 1533, ! 1540, 1545, 1550, 1557, 1562, 1566, 1568, 1572, 1574, 1578, ! 1581, 1583, 1590, 1591, 1594, 1596, 1599, 1600, 1603, 1607, ! 1611, 1614, 1617, 1621, 1623, 1625, 1627, 1630, 1636, 1642, ! 1646, 1652, 1657, 1661, 1665, 1668, 1670, 1674, 1678, 1681, ! 1684, 1688, 1690, 1694, 1698, 1701, 1704, 1708, 1710, 1716, ! 1722, 1726, 1732, 1736, 1741, 1745, 1748, 1751, 1753, 1756, ! 1761, 1766, 1769, 1771, 1773, 1775, 1778, 1781, 1784, 1786, ! 1789, 1791, 1794, 1797, 1801, 1803, 1807, 1810, 1814, 1817, ! 1820, 1824, 1826, 1830, 1835, 1839, 1842, 1845, 1847, 1851, ! 1854, 1857, 1859, 1862, 1866, 1868, 1872, 1874, 1880, 1884, ! 1889, 1893, 1898, 1901, 1904, 1908, 1911, 1913, 1915, 1918, ! 1921, 1924, 1925, 1926, 1928, 1930, 1933, 1937, 1939, 1942, ! 1946, 1952, 1959, 1965, 1966, 1967, 1974, 1976, 1979, 1981, ! 1983, 1985, 1988, 1989, 1994, 1996, 1997, 1998, 2005, 2006, ! 2007, 2015, 2016, 2017, 2018, 2029, 2030, 2031, 2032, 2043, ! 2044, 2052, 2053, 2059, 2060, 2068, 2069, 2074, 2077, 2080, ! 2083, 2087, 2094, 2103, 2114, 2127, 2132, 2136, 2139, 2142, ! 2144, 2146, 2147, 2148, 2156, 2158, 2161, 2164, 2165, 2166, ! 2172, 2174, 2176, 2180, 2184, 2187, 2190, 2193, 2197, 2202, ! 2207, 2211, 2216, 2223, 2230, 2231, 2233, 2234, 2236, 2238, ! 2239, 2241, 2243, 2247, 2252, 2254, 2258, 2259, 2261, 2263, ! 2265, 2268, 2271, 2274, 2276, 2278, 2281, 2284, 2287, 2290, ! 2292, 2296, 2299, 2302, 2307, 2310, 2313, 2316, 2319, 2322, ! 2325, 2327, 2330, 2332, 2336, 2338, 2340, 2341, 2342, 2344, ! 2345, 2350, 2352, 2354, 2358, 2359, 2363, 2367, 2371, 2373, ! 2376, 2379, 2382, 2385, 2388, 2391, 2394, 2397, 2400, 2403, ! 2406, 2409, 2412, 2415, 2418, 2421, 2424, 2427, 2430, 2433, ! 2436, 2439, 2442, 2446, 2449, 2452, 2455, 2458, 2462, 2465, ! 2468, 2473, 2478, 2482 }; static const short yyrhs[] = { -1, ! 107, 0, 0, 108, 112, 0, 107, 112, 0, 0, ! 0, 25, 0, 26, 0, 0, 113, 114, 0, 130, ! 0, 129, 0, 123, 0, 121, 0, 111, 88, 180, ! 102, 56, 0, 115, 54, 107, 103, 0, 115, 54, ! 103, 0, 115, 109, 130, 110, 0, 115, 109, 129, ! 110, 0, 95, 0, 0, 45, 69, 117, 118, 70, ! 0, 120, 0, 118, 55, 120, 0, 221, 0, 221, ! 139, 0, 119, 0, 119, 58, 193, 0, 328, 0, ! 39, 122, 56, 0, 3, 0, 122, 55, 3, 0, ! 0, 116, 223, 54, 124, 56, 0, 0, 116, 224, ! 54, 125, 56, 0, 0, 116, 223, 60, 126, 56, ! 0, 0, 116, 224, 60, 127, 56, 0, 116, 223, ! 56, 0, 116, 224, 56, 0, 116, 259, 332, 198, ! 207, 128, 0, 116, 187, 184, 332, 198, 207, 128, ! 0, 116, 190, 259, 128, 0, 116, 1, 103, 0, ! 116, 1, 56, 0, 54, 0, 60, 0, 56, 0, ! 58, 0, 23, 0, 197, 56, 0, 190, 196, 56, ! 0, 190, 259, 56, 0, 187, 195, 56, 0, 187, ! 184, 56, 0, 190, 56, 0, 142, 56, 0, 187, ! 56, 0, 1, 56, 0, 1, 103, 0, 56, 0, ! 131, 135, 283, 0, 131, 134, 135, 283, 0, 131, ! 181, 283, 0, 131, 134, 56, 181, 283, 0, 131, ! 134, 181, 283, 0, 187, 184, 1, 0, 190, 259, ! 1, 0, 259, 1, 0, 187, 184, 332, 0, 190, ! 259, 332, 0, 259, 332, 0, 94, 0, 187, 88, ! 323, 102, 251, 332, 0, 187, 44, 251, 332, 0, ! 187, 184, 332, 0, 190, 259, 332, 0, 259, 332, ! 0, 23, 3, 0, 133, 0, 133, 58, 214, 0, ! 133, 88, 161, 102, 0, 133, 44, 0, 60, 136, ! 137, 0, 0, 0, 138, 0, 137, 55, 138, 0, ! 137, 1, 0, 88, 161, 102, 0, 44, 0, 140, ! 88, 161, 102, 0, 140, 44, 0, 269, 88, 161, ! 102, 0, 269, 44, 0, 263, 88, 161, 102, 0, ! 263, 44, 0, 3, 0, 4, 0, 53, 0, 3, ! 0, 53, 0, 99, 0, 98, 0, 100, 0, 45, ! 222, 150, 0, 45, 187, 184, 0, 5, 45, 222, ! 150, 0, 5, 45, 187, 184, 0, 144, 145, 150, ! 0, 53, 69, 146, 70, 0, 53, 69, 70, 0, ! 4, 69, 146, 70, 0, 0, 147, 0, 146, 55, ! 147, 0, 186, 0, 169, 0, 0, 97, 230, 149, ! 235, 236, 103, 0, 0, 148, 0, 0, 148, 151, ! 0, 74, 0, 73, 0, 81, 0, 82, 0, 104, ! 0, 160, 0, 169, 0, 44, 0, 88, 153, 102, ! 0, 44, 0, 88, 157, 102, 0, 0, 157, 0, ! 1, 0, 0, 312, 184, 332, 198, 207, 58, 158, ! 214, 0, 153, 0, 54, 103, 0, 54, 280, 277, ! 103, 0, 54, 280, 1, 103, 0, 290, 0, 169, ! 55, 169, 0, 169, 55, 1, 0, 160, 55, 169, ! 0, 160, 55, 1, 0, 169, 0, 160, 0, 174, ! 0, 0, 33, 163, 167, 0, 75, 167, 0, 65, ! 167, 0, 83, 167, 0, 152, 167, 0, 62, 139, ! 0, 11, 162, 0, 11, 88, 186, 102, 0, 28, ! 162, 0, 28, 88, 186, 102, 0, 177, 250, 0, ! 177, 250, 165, 0, 177, 164, 250, 0, 177, 164, ! 250, 165, 0, 177, 88, 186, 102, 0, 177, 88, ! 186, 102, 165, 0, 177, 164, 88, 186, 102, 0, ! 177, 164, 88, 186, 102, 165, 0, 178, 167, 0, ! 178, 89, 105, 167, 0, 178, 89, 153, 105, 167, ! 0, 88, 161, 102, 0, 54, 161, 103, 0, 88, ! 161, 102, 0, 44, 0, 88, 193, 102, 0, 58, ! 214, 0, 88, 186, 102, 0, 166, 88, 186, 102, ! 0, 168, 0, 166, 168, 0, 166, 54, 215, 219, ! 103, 0, 162, 0, 29, 88, 153, 102, 0, 30, ! 88, 153, 102, 0, 30, 88, 4, 102, 0, 167, ! 0, 169, 78, 169, 0, 169, 79, 169, 0, 169, ! 73, 169, 0, 169, 74, 169, 0, 169, 75, 169, ! 0, 169, 76, 169, 0, 169, 77, 169, 0, 169, ! 71, 169, 0, 169, 72, 169, 0, 169, 68, 169, ! 0, 169, 69, 169, 0, 169, 70, 169, 0, 169, ! 67, 169, 0, 169, 66, 169, 0, 169, 65, 169, ! 0, 169, 63, 169, 0, 169, 64, 169, 0, 169, ! 62, 169, 0, 169, 61, 169, 0, 169, 59, 318, ! 60, 169, 0, 169, 58, 169, 0, 169, 57, 169, ! 0, 92, 0, 92, 169, 0, 83, 330, 139, 0, ! 337, 0, 3, 0, 53, 0, 170, 0, 4, 0, ! 170, 0, 263, 0, 75, 172, 0, 65, 172, 0, ! 88, 172, 102, 0, 261, 0, 170, 0, 263, 0, ! 88, 172, 102, 0, 170, 0, 8, 0, 179, 0, ! 180, 0, 88, 153, 102, 0, 88, 1, 102, 0, ! 0, 88, 175, 284, 102, 0, 0, 174, 88, 161, ! 102, 176, 151, 0, 174, 44, 0, 174, 89, 153, ! 105, 0, 174, 81, 0, 174, 82, 0, 40, 0, ! 7, 88, 161, 102, 0, 265, 0, 47, 69, 186, ! 70, 88, 153, 102, 0, 48, 69, 186, 70, 88, ! 153, 102, 0, 49, 69, 186, 70, 88, 153, 102, ! 0, 50, 69, 186, 70, 88, 153, 102, 0, 46, ! 88, 153, 102, 0, 46, 88, 186, 102, 0, 272, ! 3, 0, 272, 337, 0, 264, 0, 264, 88, 161, ! 102, 0, 264, 44, 0, 182, 171, 0, 182, 262, ! 0, 182, 171, 88, 161, 102, 0, 182, 171, 44, ! 0, 182, 262, 88, 161, 102, 0, 182, 262, 44, ! 0, 182, 83, 6, 44, 0, 182, 6, 51, 83, ! 6, 44, 0, 38, 0, 272, 38, 0, 37, 0, ! 272, 178, 0, 42, 0, 43, 0, 9, 0, 180, ! 9, 0, 0, 174, 87, 0, 174, 86, 0, 193, ! 184, 56, 0, 187, 184, 56, 0, 193, 195, 56, ! 0, 187, 195, 56, 0, 190, 196, 56, 0, 187, ! 56, 0, 190, 56, 0, 255, 0, 259, 0, 44, ! 0, 185, 44, 0, 191, 275, 0, 252, 275, 0, ! 193, 275, 0, 191, 0, 252, 0, 191, 0, 188, ! 0, 190, 193, 0, 193, 189, 0, 190, 193, 189, ! 0, 190, 193, 192, 0, 190, 193, 192, 189, 0, ! 5, 0, 189, 194, 0, 189, 5, 0, 252, 0, ! 5, 0, 190, 7, 0, 190, 5, 0, 193, 0, ! 252, 193, 0, 193, 192, 0, 252, 193, 192, 0, ! 194, 0, 192, 194, 0, 216, 0, 6, 0, 269, ! 0, 27, 88, 153, 102, 0, 27, 88, 186, 102, ! 0, 31, 88, 153, 102, 0, 31, 88, 186, 102, ! 0, 6, 0, 7, 0, 216, 0, 199, 0, 195, ! 55, 201, 0, 203, 0, 196, 55, 201, 0, 205, ! 0, 197, 55, 201, 0, 0, 111, 88, 180, 102, ! 0, 0, 184, 332, 198, 207, 58, 200, 214, 0, ! 184, 332, 198, 207, 0, 0, 184, 332, 198, 207, ! 58, 202, 214, 0, 184, 332, 198, 207, 0, 0, ! 259, 332, 198, 207, 58, 204, 214, 0, 259, 332, ! 198, 207, 0, 0, 259, 332, 198, 207, 58, 206, ! 214, 0, 259, 332, 198, 207, 0, 0, 208, 0, ! 209, 0, 208, 209, 0, 32, 88, 88, 210, 102, ! 102, 0, 211, 0, 210, 55, 211, 0, 0, 212, ! 0, 212, 88, 3, 102, 0, 212, 88, 3, 55, ! 161, 102, 0, 212, 88, 161, 102, 0, 139, 0, ! 5, 0, 6, 0, 7, 0, 139, 0, 213, 55, ! 139, 0, 169, 0, 54, 103, 0, 54, 215, 103, ! 0, 54, 215, 55, 103, 0, 1, 0, 214, 0, ! 215, 55, 214, 0, 89, 169, 105, 214, 0, 215, ! 55, 19, 169, 60, 214, 0, 139, 60, 214, 0, ! 215, 55, 139, 60, 214, 0, 0, 12, 139, 54, ! 217, 248, 220, 103, 0, 12, 139, 54, 103, 0, ! 0, 12, 54, 218, 248, 220, 103, 0, 12, 54, ! 103, 0, 12, 139, 0, 12, 270, 0, 229, 235, ! 236, 103, 0, 229, 0, 0, 55, 0, 0, 55, ! 0, 35, 0, 221, 5, 0, 221, 6, 0, 221, ! 7, 0, 221, 35, 0, 221, 144, 56, 0, 221, ! 139, 0, 221, 270, 0, 221, 143, 0, 221, 144, ! 54, 0, 221, 144, 60, 0, 222, 0, 221, 141, ! 0, 0, 0, 223, 225, 230, 0, 224, 226, 230, ! 0, 221, 54, 0, 228, 0, 227, 0, 0, 60, ! 0, 60, 231, 0, 232, 0, 231, 55, 232, 0, ! 233, 0, 234, 233, 0, 269, 0, 31, 88, 153, ! 102, 0, 31, 88, 186, 102, 0, 36, 0, 5, ! 0, 234, 36, 0, 234, 5, 0, 54, 0, 0, ! 237, 0, 236, 36, 60, 237, 0, 236, 36, 60, ! 0, 238, 0, 237, 238, 0, 237, 56, 0, 239, ! 56, 0, 239, 103, 0, 132, 60, 0, 132, 54, ! 0, 187, 240, 0, 190, 241, 0, 259, 332, 198, ! 207, 0, 60, 169, 0, 1, 0, 187, 88, 323, ! 102, 251, 0, 187, 44, 251, 0, 0, 242, 0, ! 240, 55, 243, 0, 0, 245, 0, 241, 55, 247, ! 0, 244, 0, 245, 0, 246, 0, 247, 0, 255, ! 332, 198, 207, 0, 255, 332, 198, 207, 58, 214, ! 0, 4, 60, 169, 207, 0, 259, 332, 198, 207, ! 0, 259, 332, 198, 207, 58, 214, 0, 3, 60, ! 169, 207, 0, 60, 169, 207, 0, 255, 332, 198, ! 207, 0, 255, 332, 198, 207, 58, 214, 0, 4, ! 60, 169, 207, 0, 259, 332, 198, 207, 0, 259, ! 332, 198, 207, 58, 214, 0, 3, 60, 169, 207, ! 0, 60, 169, 207, 0, 249, 0, 248, 55, 249, ! 0, 139, 0, 139, 58, 169, 0, 312, 273, 0, ! 312, 0, 88, 186, 102, 89, 153, 105, 0, 0, ! 251, 7, 0, 7, 0, 252, 7, 0, 0, 254, ! 153, 0, 75, 252, 255, 0, 65, 252, 255, 0, ! 75, 255, 0, 65, 255, 0, 271, 251, 255, 0, ! 258, 0, 266, 0, 257, 0, 267, 266, 0, 258, ! 88, 161, 102, 251, 0, 258, 88, 323, 102, 251, ! 0, 258, 44, 251, 0, 258, 88, 1, 102, 251, ! 0, 258, 89, 253, 105, 0, 258, 89, 105, 0, ! 88, 255, 102, 0, 267, 266, 0, 266, 0, 75, ! 252, 259, 0, 65, 252, 259, 0, 75, 259, 0, ! 65, 259, 0, 271, 251, 259, 0, 173, 0, 75, ! 252, 259, 0, 65, 252, 259, 0, 75, 260, 0, ! 65, 260, 0, 271, 251, 259, 0, 261, 0, 173, ! 88, 161, 102, 251, 0, 173, 88, 323, 102, 251, ! 0, 173, 44, 251, 0, 173, 88, 1, 102, 251, ! 0, 88, 260, 102, 0, 173, 89, 253, 105, 0, ! 173, 89, 105, 0, 267, 171, 0, 267, 170, 0, ! 263, 0, 272, 263, 0, 193, 88, 161, 102, 0, ! 193, 88, 172, 102, 0, 193, 185, 0, 4, 0, ! 143, 0, 268, 0, 267, 268, 0, 4, 51, 0, ! 143, 51, 0, 256, 0, 272, 256, 0, 257, 0, ! 272, 256, 0, 267, 75, 0, 272, 267, 75, 0, ! 51, 0, 75, 251, 273, 0, 75, 251, 0, 65, ! 251, 273, 0, 65, 251, 0, 271, 251, 0, 271, ! 251, 273, 0, 274, 0, 89, 153, 105, 0, 274, ! 89, 253, 105, 0, 75, 252, 275, 0, 75, 275, ! 0, 75, 252, 0, 75, 0, 65, 252, 275, 0, ! 65, 275, 0, 65, 252, 0, 65, 0, 271, 251, ! 0, 271, 251, 275, 0, 276, 0, 88, 275, 102, ! 0, 85, 0, 276, 88, 323, 102, 251, 0, 276, ! 44, 251, 0, 276, 89, 253, 105, 0, 276, 89, ! 105, 0, 88, 324, 102, 251, 0, 166, 251, 0, ! 185, 251, 0, 89, 253, 105, 0, 89, 105, 0, ! 289, 0, 278, 0, 277, 289, 0, 277, 278, 0, ! 1, 56, 0, 0, 0, 281, 0, 282, 0, 281, ! 282, 0, 34, 213, 56, 0, 284, 0, 1, 284, ! 0, 54, 279, 103, 0, 54, 279, 280, 277, 103, ! 0, 54, 279, 280, 277, 1, 103, 0, 54, 279, ! 280, 1, 103, 0, 0, 0, 13, 286, 279, 155, ! 287, 288, 0, 284, 0, 279, 290, 0, 284, 0, ! 290, 0, 183, 0, 153, 56, 0, 0, 285, 14, ! 291, 288, 0, 285, 0, 0, 0, 15, 292, 279, ! 155, 293, 159, 0, 0, 0, 16, 294, 288, 15, ! 295, 154, 56, 0, 0, 0, 0, 315, 296, 279, ! 156, 56, 297, 318, 102, 298, 159, 0, 0, 0, ! 0, 316, 299, 279, 156, 56, 300, 318, 102, 301, ! 159, 0, 0, 18, 279, 88, 157, 102, 302, 288, ! 0, 0, 19, 169, 60, 303, 289, 0, 0, 19, ! 169, 10, 169, 60, 304, 289, 0, 0, 20, 60, ! 305, 289, 0, 21, 56, 0, 22, 56, 0, 23, ! 56, 0, 23, 153, 56, 0, 111, 317, 88, 180, ! 102, 56, 0, 111, 317, 88, 180, 60, 319, 102, ! 56, 0, 111, 317, 88, 180, 60, 319, 60, 319, ! 102, 56, 0, 111, 317, 88, 180, 60, 319, 60, ! 319, 60, 322, 102, 56, 0, 24, 75, 153, 56, ! 0, 24, 139, 56, 0, 314, 289, 0, 314, 103, ! 0, 56, 0, 306, 0, 0, 0, 90, 54, 279, ! 307, 309, 308, 310, 0, 103, 0, 277, 103, 0, ! 1, 103, 0, 0, 0, 310, 91, 311, 313, 284, ! 0, 191, 0, 252, 0, 88, 10, 102, 0, 88, ! 329, 102, 0, 3, 60, 0, 53, 60, 0, 4, ! 60, 0, 17, 88, 56, 0, 17, 88, 153, 56, ! 0, 17, 88, 54, 103, 0, 17, 88, 183, 0, ! 17, 88, 1, 56, 0, 17, 88, 54, 279, 277, ! 103, 0, 17, 88, 54, 279, 1, 103, 0, 0, ! 7, 0, 0, 153, 0, 1, 0, 0, 320, 0, ! 321, 0, 320, 55, 321, 0, 9, 88, 153, 102, ! 0, 9, 0, 322, 55, 9, 0, 0, 324, 0, ! 186, 0, 325, 0, 326, 10, 0, 325, 10, 0, ! 186, 10, 0, 10, 0, 93, 0, 325, 93, 0, ! 186, 93, 0, 325, 60, 0, 186, 60, 0, 327, ! 0, 329, 58, 214, 0, 326, 328, 0, 326, 331, ! 0, 326, 331, 58, 214, 0, 325, 55, 0, 186, ! 55, 0, 188, 184, 0, 191, 184, 0, 193, 184, ! 0, 188, 275, 0, 188, 0, 190, 259, 0, 329, ! 0, 329, 58, 214, 0, 327, 0, 186, 0, 0, ! 0, 259, 0, 0, 92, 88, 334, 102, 0, 186, ! 0, 333, 0, 334, 55, 333, 0, 0, 75, 251, ! 335, 0, 65, 251, 335, 0, 271, 251, 335, 0, ! 41, 0, 336, 75, 0, 336, 76, 0, 336, 77, ! 0, 336, 73, 0, 336, 74, 0, 336, 65, 0, ! 336, 63, 0, 336, 64, 0, 336, 83, 0, 336, ! 55, 0, 336, 68, 0, 336, 69, 0, 336, 70, ! 0, 336, 67, 0, 336, 57, 0, 336, 58, 0, ! 336, 71, 0, 336, 72, 0, 336, 81, 0, 336, ! 82, 0, 336, 62, 0, 336, 61, 0, 336, 104, ! 0, 336, 59, 60, 0, 336, 66, 0, 336, 86, ! 0, 336, 78, 0, 336, 44, 0, 336, 89, 105, ! 0, 336, 38, 0, 336, 37, 0, 336, 38, 89, ! 105, 0, 336, 37, 89, 105, 0, 336, 312, 335, ! 0, 336, 1, 0 }; --- 236,576 ---- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ! 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 61, 63, 66, 67, 71, 72, 73, 76, ! 77, 83, 84, 85, 86, 87, 89, 90, 91, 95, ! 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, ! 106 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, ! 0, 1, 3, 4, 7, 10, 12, 13, 14, 15, ! 17, 19, 20, 23, 25, 27, 29, 31, 37, 42, ! 47, 52, 53, 60, 61, 67, 73, 76, 81, 84, ! 88, 92, 94, 96, 99, 102, 104, 107, 108, 114, ! 116, 120, 122, 125, 127, 131, 133, 137, 139, 143, ! 144, 150, 151, 157, 158, 164, 165, 171, 175, 179, ! 186, 194, 199, 203, 207, 209, 211, 213, 215, 217, ! 220, 224, 228, 232, 236, 239, 242, 245, 248, 251, ! 253, 257, 262, 266, 272, 277, 281, 285, 288, 292, ! 296, 299, 301, 308, 313, 317, 321, 324, 327, 330, ! 335, 338, 342, 343, 344, 346, 350, 353, 357, 359, ! 364, 367, 372, 375, 380, 383, 385, 387, 389, 391, ! 393, 395, 397, 399, 401, 403, 407, 411, 416, 421, ! 425, 430, 434, 439, 440, 442, 446, 448, 450, 451, ! 458, 459, 461, 462, 465, 467, 469, 471, 473, 475, ! 477, 479, 481, 485, 487, 491, 492, 494, 496, 497, ! 506, 508, 510, 514, 519, 523, 526, 528, 532, 536, ! 540, 544, 546, 548, 550, 551, 555, 558, 561, 564, ! 567, 570, 573, 578, 581, 586, 589, 593, 597, 602, ! 607, 613, 619, 626, 629, 634, 640, 644, 648, 652, ! 654, 658, 661, 665, 670, 672, 675, 681, 683, 688, ! 693, 698, 700, 704, 708, 712, 716, 720, 724, 728, ! 732, 736, 740, 744, 748, 752, 756, 760, 764, 768, ! 772, 776, 782, 786, 790, 792, 795, 799, 801, 803, ! 805, 807, 809, 811, 813, 816, 819, 823, 825, 827, ! 831, 833, 835, 837, 839, 843, 847, 851, 852, 857, ! 858, 865, 868, 873, 876, 879, 881, 886, 888, 896, ! 904, 912, 920, 925, 930, 933, 936, 938, 943, 946, ! 949, 952, 958, 962, 968, 972, 977, 984, 987, 989, ! 992, 994, 997, 999, 1001, 1003, 1006, 1007, 1010, 1013, ! 1014, 1018, 1022, 1026, 1030, 1034, 1037, 1040, 1042, 1044, ! 1046, 1049, 1052, 1055, 1058, 1060, 1062, 1064, 1066, 1069, ! 1072, 1076, 1080, 1084, 1089, 1091, 1094, 1097, 1101, 1104, ! 1106, 1108, 1111, 1114, 1118, 1121, 1123, 1126, 1129, 1133, ! 1135, 1138, 1140, 1142, 1144, 1149, 1154, 1159, 1164, 1166, ! 1168, 1170, 1172, 1176, 1178, 1182, 1184, 1188, 1189, 1194, ! 1195, 1203, 1208, 1209, 1217, 1222, 1223, 1231, 1236, 1237, ! 1245, 1250, 1251, 1253, 1255, 1258, 1265, 1267, 1271, 1272, ! 1274, 1279, 1286, 1291, 1293, 1295, 1297, 1299, 1301, 1305, ! 1306, 1309, 1311, 1314, 1318, 1323, 1325, 1327, 1331, 1336, ! 1343, 1347, 1353, 1354, 1362, 1367, 1368, 1375, 1379, 1382, ! 1385, 1388, 1393, 1395, 1396, 1398, 1399, 1401, 1403, 1406, ! 1409, 1412, 1415, 1419, 1422, 1425, 1428, 1430, 1433, 1437, ! 1441, 1442, 1444, 1448, 1451, 1453, 1455, 1456, 1458, 1461, ! 1463, 1467, 1469, 1472, 1474, 1479, 1484, 1486, 1488, 1491, ! 1494, 1496, 1497, 1499, 1504, 1508, 1510, 1513, 1516, 1519, ! 1522, 1525, 1527, 1530, 1533, 1539, 1542, 1544, 1554, 1562, ! 1564, 1565, 1567, 1571, 1572, 1574, 1578, 1580, 1582, 1584, ! 1586, 1592, 1597, 1603, 1608, 1612, 1618, 1623, 1629, 1634, ! 1638, 1640, 1644, 1646, 1650, 1653, 1655, 1662, 1663, 1666, ! 1668, 1671, 1672, 1675, 1680, 1685, 1688, 1693, 1697, 1701, ! 1704, 1707, 1711, 1713, 1715, 1717, 1720, 1724, 1729, 1733, ! 1737, 1740, 1742, 1746, 1750, 1753, 1756, 1760, 1762, 1766, ! 1770, 1773, 1776, 1780, 1782, 1786, 1790, 1795, 1799, 1801, ! 1804, 1807, 1809, 1812, 1817, 1822, 1825, 1827, 1829, 1831, ! 1834, 1837, 1840, 1843, 1845, 1848, 1850, 1853, 1856, 1860, ! 1862, 1866, 1869, 1873, 1876, 1879, 1883, 1885, 1889, 1894, ! 1898, 1901, 1904, 1906, 1910, 1913, 1916, 1918, 1921, 1925, ! 1927, 1931, 1933, 1939, 1943, 1948, 1952, 1957, 1960, 1963, ! 1967, 1970, 1972, 1974, 1977, 1980, 1983, 1984, 1985, 1986, ! 1988, 1990, 1993, 1997, 1999, 2002, 2007, 2008, 2009, 2016, ! 2018, 2022, 2024, 2026, 2028, 2031, 2032, 2033, 2040, 2042, ! 2043, 2044, 2052, 2053, 2054, 2062, 2063, 2064, 2065, 2066, ! 2081, 2082, 2083, 2093, 2094, 2100, 2101, 2109, 2110, 2115, ! 2118, 2121, 2124, 2128, 2135, 2144, 2155, 2168, 2173, 2177, ! 2180, 2183, 2185, 2187, 2188, 2189, 2195, 2196, 2197, 2205, ! 2207, 2209, 2213, 2217, 2220, 2223, 2226, 2229, 2231, 2234, ! 2235, 2237, 2238, 2240, 2242, 2243, 2245, 2247, 2251, 2256, ! 2258, 2262, 2263, 2265, 2267, 2269, 2272, 2275, 2278, 2280, ! 2282, 2285, 2288, 2291, 2294, 2296, 2300, 2303, 2306, 2311, ! 2314, 2317, 2320, 2323, 2326, 2329, 2331, 2334, 2337, 2339, ! 2341, 2342, 2343, 2345, 2346, 2351, 2354, 2356, 2358, 2362, ! 2363, 2367, 2371, 2375, 2377, 2380, 2383, 2386, 2389, 2392, ! 2395, 2398, 2401, 2404, 2407, 2410, 2413, 2416, 2419, 2422, ! 2425, 2428, 2431, 2434, 2437, 2440, 2443, 2446, 2450, 2453, ! 2456, 2459, 2462, 2466, 2469, 2472, 2477, 2482, 2486 }; static const short yyrhs[] = { -1, ! 112, 0, 0, 113, 118, 0, 112, 118, 0, 112, ! 0, 0, 0, 0, 25, 0, 26, 0, 0, 119, ! 120, 0, 140, 0, 139, 0, 133, 0, 131, 0, ! 117, 93, 191, 107, 60, 0, 125, 58, 114, 108, ! 0, 125, 115, 140, 116, 0, 125, 115, 139, 116, ! 0, 0, 44, 149, 58, 121, 114, 108, 0, 0, ! 44, 58, 122, 114, 108, 0, 44, 149, 64, 124, ! 60, 0, 123, 60, 0, 46, 44, 124, 60, 0, ! 46, 275, 0, 46, 285, 275, 0, 46, 285, 182, ! 0, 182, 0, 275, 0, 285, 275, 0, 285, 182, ! 0, 99, 0, 125, 99, 0, 0, 48, 74, 127, ! 128, 75, 0, 130, 0, 128, 59, 130, 0, 234, ! 0, 234, 149, 0, 129, 0, 129, 64, 205, 0, ! 340, 0, 39, 132, 60, 0, 3, 0, 132, 59, ! 3, 0, 0, 126, 236, 58, 134, 60, 0, 0, ! 126, 237, 58, 135, 60, 0, 0, 126, 236, 62, ! 136, 60, 0, 0, 126, 237, 62, 137, 60, 0, ! 126, 236, 60, 0, 126, 237, 60, 0, 126, 272, ! 344, 210, 219, 138, 0, 126, 199, 196, 344, 210, ! 219, 138, 0, 126, 202, 272, 138, 0, 126, 1, ! 108, 0, 126, 1, 60, 0, 58, 0, 62, 0, ! 60, 0, 64, 0, 23, 0, 209, 60, 0, 202, ! 208, 60, 0, 202, 272, 60, 0, 199, 207, 60, ! 0, 199, 196, 60, 0, 202, 60, 0, 152, 60, ! 0, 199, 60, 0, 1, 60, 0, 1, 108, 0, ! 60, 0, 141, 145, 297, 0, 141, 144, 145, 297, ! 0, 141, 192, 297, 0, 141, 144, 60, 192, 297, ! 0, 141, 144, 192, 297, 0, 199, 196, 1, 0, ! 202, 272, 1, 0, 272, 1, 0, 199, 196, 344, ! 0, 202, 272, 344, 0, 272, 344, 0, 98, 0, ! 199, 93, 335, 107, 263, 344, 0, 199, 47, 263, ! 344, 0, 199, 196, 344, 0, 202, 272, 344, 0, ! 272, 344, 0, 23, 3, 0, 143, 226, 0, 143, ! 93, 172, 107, 0, 143, 47, 0, 62, 146, 147, ! 0, 0, 0, 148, 0, 147, 59, 148, 0, 147, ! 1, 0, 93, 172, 107, 0, 47, 0, 150, 93, ! 172, 107, 0, 150, 47, 0, 282, 93, 172, 107, ! 0, 282, 47, 0, 276, 93, 172, 107, 0, 276, ! 47, 0, 3, 0, 4, 0, 56, 0, 57, 0, ! 3, 0, 56, 0, 57, 0, 103, 0, 102, 0, ! 104, 0, 48, 235, 160, 0, 48, 199, 196, 0, ! 5, 48, 235, 160, 0, 5, 48, 199, 196, 0, ! 154, 155, 160, 0, 56, 74, 156, 75, 0, 56, ! 74, 75, 0, 4, 74, 156, 75, 0, 0, 157, ! 0, 156, 59, 157, 0, 198, 0, 180, 0, 0, ! 101, 242, 159, 247, 248, 108, 0, 0, 158, 0, ! 0, 158, 161, 0, 79, 0, 78, 0, 86, 0, ! 87, 0, 109, 0, 171, 0, 180, 0, 47, 0, ! 93, 163, 107, 0, 47, 0, 93, 167, 107, 0, ! 0, 167, 0, 1, 0, 0, 325, 196, 344, 210, ! 219, 64, 168, 227, 0, 163, 0, 108, 0, 294, ! 290, 108, 0, 294, 290, 1, 108, 0, 294, 1, ! 108, 0, 58, 169, 0, 304, 0, 180, 59, 180, ! 0, 180, 59, 1, 0, 171, 59, 180, 0, 171, ! 59, 1, 0, 180, 0, 171, 0, 185, 0, 0, ! 33, 174, 178, 0, 80, 178, 0, 70, 178, 0, ! 88, 178, 0, 162, 178, 0, 67, 149, 0, 11, ! 173, 0, 11, 93, 198, 107, 0, 28, 173, 0, ! 28, 93, 198, 107, 0, 188, 262, 0, 188, 262, ! 176, 0, 188, 175, 262, 0, 188, 175, 262, 176, ! 0, 188, 93, 198, 107, 0, 188, 93, 198, 107, ! 176, 0, 188, 175, 93, 198, 107, 0, 188, 175, ! 93, 198, 107, 176, 0, 189, 178, 0, 189, 94, ! 110, 178, 0, 189, 94, 163, 110, 178, 0, 93, ! 172, 107, 0, 58, 172, 108, 0, 93, 172, 107, ! 0, 47, 0, 93, 205, 107, 0, 64, 227, 0, ! 93, 198, 107, 0, 177, 93, 198, 107, 0, 179, ! 0, 177, 179, 0, 177, 58, 228, 232, 108, 0, ! 173, 0, 29, 93, 163, 107, 0, 30, 93, 163, ! 107, 0, 30, 93, 4, 107, 0, 178, 0, 180, ! 83, 180, 0, 180, 84, 180, 0, 180, 78, 180, ! 0, 180, 79, 180, 0, 180, 80, 180, 0, 180, ! 81, 180, 0, 180, 82, 180, 0, 180, 76, 180, ! 0, 180, 77, 180, 0, 180, 73, 180, 0, 180, ! 74, 180, 0, 180, 75, 180, 0, 180, 72, 180, ! 0, 180, 71, 180, 0, 180, 70, 180, 0, 180, ! 68, 180, 0, 180, 69, 180, 0, 180, 67, 180, ! 0, 180, 66, 180, 0, 180, 65, 330, 62, 180, ! 0, 180, 64, 180, 0, 180, 63, 180, 0, 61, ! 0, 61, 180, 0, 88, 342, 149, 0, 349, 0, ! 3, 0, 56, 0, 57, 0, 181, 0, 4, 0, ! 181, 0, 80, 183, 0, 70, 183, 0, 93, 183, ! 107, 0, 274, 0, 181, 0, 93, 183, 107, 0, ! 181, 0, 8, 0, 190, 0, 191, 0, 93, 163, ! 107, 0, 93, 183, 107, 0, 93, 1, 107, 0, ! 0, 93, 186, 298, 107, 0, 0, 185, 93, 172, ! 107, 187, 161, 0, 185, 47, 0, 185, 94, 163, ! 110, 0, 185, 86, 0, 185, 87, 0, 40, 0, ! 7, 93, 172, 107, 0, 278, 0, 50, 74, 198, ! 75, 93, 163, 107, 0, 51, 74, 198, 75, 93, ! 163, 107, 0, 52, 74, 198, 75, 93, 163, 107, ! 0, 53, 74, 198, 75, 93, 163, 107, 0, 49, ! 93, 163, 107, 0, 49, 93, 198, 107, 0, 285, ! 3, 0, 285, 349, 0, 277, 0, 277, 93, 172, ! 107, 0, 277, 47, 0, 193, 182, 0, 193, 277, ! 0, 193, 182, 93, 172, 107, 0, 193, 182, 47, ! 0, 193, 277, 93, 172, 107, 0, 193, 277, 47, ! 0, 193, 88, 6, 47, 0, 193, 6, 54, 88, ! 6, 47, 0, 193, 1, 0, 38, 0, 285, 38, ! 0, 37, 0, 285, 189, 0, 42, 0, 43, 0, ! 9, 0, 191, 9, 0, 0, 185, 92, 0, 185, ! 91, 0, 0, 205, 196, 60, 0, 199, 196, 60, ! 0, 205, 207, 60, 0, 199, 207, 60, 0, 202, ! 208, 60, 0, 199, 60, 0, 202, 60, 0, 268, ! 0, 272, 0, 47, 0, 197, 47, 0, 203, 288, ! 0, 264, 288, 0, 205, 288, 0, 203, 0, 264, ! 0, 203, 0, 200, 0, 202, 205, 0, 205, 201, ! 0, 205, 204, 201, 0, 202, 205, 201, 0, 202, ! 205, 204, 0, 202, 205, 204, 201, 0, 5, 0, ! 201, 206, 0, 201, 5, 0, 201, 220, 194, 0, ! 220, 194, 0, 264, 0, 5, 0, 202, 7, 0, ! 202, 5, 0, 202, 220, 194, 0, 220, 194, 0, ! 205, 0, 264, 205, 0, 205, 204, 0, 264, 205, ! 204, 0, 206, 0, 204, 206, 0, 229, 0, 6, ! 0, 282, 0, 27, 93, 163, 107, 0, 27, 93, ! 198, 107, 0, 31, 93, 163, 107, 0, 31, 93, ! 198, 107, 0, 6, 0, 7, 0, 229, 0, 211, ! 0, 207, 59, 213, 0, 215, 0, 208, 59, 213, ! 0, 217, 0, 209, 59, 213, 0, 0, 117, 93, ! 191, 107, 0, 0, 196, 344, 210, 219, 64, 212, ! 227, 0, 196, 344, 210, 219, 0, 0, 196, 344, ! 210, 219, 64, 214, 227, 0, 196, 344, 210, 219, ! 0, 0, 272, 344, 210, 219, 64, 216, 227, 0, ! 272, 344, 210, 219, 0, 0, 272, 344, 210, 219, ! 64, 218, 227, 0, 272, 344, 210, 219, 0, 0, ! 220, 0, 221, 0, 220, 221, 0, 32, 93, 93, ! 222, 107, 107, 0, 223, 0, 222, 59, 223, 0, ! 0, 224, 0, 224, 93, 3, 107, 0, 224, 93, ! 3, 59, 172, 107, 0, 224, 93, 172, 107, 0, ! 149, 0, 5, 0, 6, 0, 7, 0, 149, 0, ! 225, 59, 149, 0, 0, 64, 227, 0, 180, 0, ! 58, 108, 0, 58, 228, 108, 0, 58, 228, 59, ! 108, 0, 1, 0, 227, 0, 228, 59, 227, 0, ! 94, 180, 110, 227, 0, 228, 59, 19, 180, 62, ! 227, 0, 149, 62, 227, 0, 228, 59, 149, 62, ! 227, 0, 0, 12, 149, 58, 230, 260, 233, 108, ! 0, 12, 149, 58, 108, 0, 0, 12, 58, 231, ! 260, 233, 108, 0, 12, 58, 108, 0, 12, 149, ! 0, 12, 283, 0, 45, 283, 0, 241, 247, 248, ! 108, 0, 241, 0, 0, 59, 0, 0, 59, 0, ! 35, 0, 234, 5, 0, 234, 6, 0, 234, 7, ! 0, 234, 35, 0, 234, 154, 60, 0, 234, 149, ! 0, 234, 283, 0, 234, 153, 0, 235, 0, 234, ! 151, 0, 234, 154, 58, 0, 234, 154, 62, 0, ! 0, 236, 0, 237, 238, 242, 0, 234, 58, 0, ! 240, 0, 239, 0, 0, 62, 0, 62, 243, 0, ! 244, 0, 243, 59, 244, 0, 245, 0, 246, 245, ! 0, 282, 0, 31, 93, 163, 107, 0, 31, 93, ! 198, 107, 0, 36, 0, 5, 0, 246, 36, 0, ! 246, 5, 0, 58, 0, 0, 249, 0, 248, 36, ! 62, 249, 0, 248, 36, 62, 0, 250, 0, 249, ! 250, 0, 251, 60, 0, 251, 108, 0, 142, 62, ! 0, 142, 58, 0, 60, 0, 199, 252, 0, 202, ! 253, 0, 272, 344, 210, 219, 226, 0, 62, 180, ! 0, 1, 0, 199, 93, 335, 107, 263, 344, 210, ! 219, 226, 0, 199, 47, 263, 344, 210, 219, 226, ! 0, 123, 0, 0, 254, 0, 252, 59, 255, 0, ! 0, 257, 0, 253, 59, 259, 0, 256, 0, 257, ! 0, 258, 0, 259, 0, 268, 344, 210, 219, 226, ! 0, 4, 62, 180, 219, 0, 272, 344, 210, 219, ! 226, 0, 3, 62, 180, 219, 0, 62, 180, 219, ! 0, 268, 344, 210, 219, 226, 0, 4, 62, 180, ! 219, 0, 272, 344, 210, 219, 226, 0, 3, 62, ! 180, 219, 0, 62, 180, 219, 0, 261, 0, 260, ! 59, 261, 0, 149, 0, 149, 64, 180, 0, 325, ! 286, 0, 325, 0, 93, 198, 107, 94, 163, 110, ! 0, 0, 263, 7, 0, 7, 0, 264, 7, 0, ! 0, 265, 163, 0, 265, 93, 172, 107, 0, 265, ! 93, 335, 107, 0, 265, 47, 0, 265, 93, 1, ! 107, 0, 80, 264, 268, 0, 70, 264, 268, 0, ! 80, 268, 0, 70, 268, 0, 284, 263, 268, 0, ! 271, 0, 279, 0, 270, 0, 280, 279, 0, 271, ! 267, 263, 0, 271, 94, 266, 110, 0, 271, 94, ! 110, 0, 93, 268, 107, 0, 280, 279, 0, 279, ! 0, 80, 264, 272, 0, 70, 264, 272, 0, 80, ! 272, 0, 70, 272, 0, 284, 263, 272, 0, 184, ! 0, 80, 264, 272, 0, 70, 264, 272, 0, 80, ! 273, 0, 70, 273, 0, 284, 263, 272, 0, 274, ! 0, 184, 267, 263, 0, 93, 273, 107, 0, 184, ! 94, 266, 110, 0, 184, 94, 110, 0, 276, 0, ! 280, 182, 0, 280, 181, 0, 276, 0, 285, 276, ! 0, 205, 93, 172, 107, 0, 205, 93, 183, 107, ! 0, 205, 197, 0, 4, 0, 153, 0, 281, 0, ! 280, 281, 0, 4, 54, 0, 57, 54, 0, 153, ! 54, 0, 269, 0, 285, 269, 0, 270, 0, 285, ! 269, 0, 280, 80, 0, 285, 280, 80, 0, 54, ! 0, 80, 263, 286, 0, 80, 263, 0, 70, 263, ! 286, 0, 70, 263, 0, 284, 263, 0, 284, 263, ! 286, 0, 287, 0, 94, 163, 110, 0, 287, 94, ! 266, 110, 0, 80, 264, 288, 0, 80, 288, 0, ! 80, 264, 0, 80, 0, 70, 264, 288, 0, 70, ! 288, 0, 70, 264, 0, 70, 0, 284, 263, 0, ! 284, 263, 288, 0, 289, 0, 93, 288, 107, 0, ! 90, 0, 289, 93, 335, 107, 263, 0, 289, 47, ! 263, 0, 289, 94, 266, 110, 0, 289, 94, 110, ! 0, 93, 336, 107, 263, 0, 177, 263, 0, 197, ! 263, 0, 94, 266, 110, 0, 94, 110, 0, 303, ! 0, 291, 0, 290, 303, 0, 290, 291, 0, 1, ! 60, 0, 0, 0, 0, 295, 0, 296, 0, 295, ! 296, 0, 34, 225, 60, 0, 298, 0, 1, 298, ! 0, 58, 292, 169, 293, 0, 0, 0, 13, 300, ! 292, 165, 301, 302, 0, 298, 0, 292, 304, 293, ! 0, 298, 0, 304, 0, 195, 0, 163, 60, 0, ! 0, 0, 299, 14, 305, 302, 306, 293, 0, 299, ! 0, 0, 0, 15, 307, 292, 165, 308, 170, 293, ! 0, 0, 0, 16, 309, 302, 15, 310, 164, 60, ! 0, 0, 0, 0, 0, 17, 311, 93, 328, 312, ! 292, 166, 60, 313, 330, 107, 314, 170, 293, 0, ! 0, 0, 18, 292, 93, 167, 107, 315, 302, 316, ! 293, 0, 0, 19, 180, 62, 317, 303, 0, 0, ! 19, 180, 10, 180, 62, 318, 303, 0, 0, 20, ! 62, 319, 303, 0, 21, 60, 0, 22, 60, 0, ! 23, 60, 0, 23, 163, 60, 0, 117, 329, 93, ! 191, 107, 60, 0, 117, 329, 93, 191, 62, 331, ! 107, 60, 0, 117, 329, 93, 191, 62, 331, 62, ! 331, 107, 60, 0, 117, 329, 93, 191, 62, 331, ! 62, 331, 62, 334, 107, 60, 0, 24, 80, 163, ! 60, 0, 24, 149, 60, 0, 327, 303, 0, 327, ! 108, 0, 60, 0, 320, 0, 0, 0, 95, 321, ! 298, 322, 323, 0, 0, 0, 323, 96, 292, 326, ! 298, 324, 293, 0, 203, 0, 264, 0, 93, 10, ! 107, 0, 93, 341, 107, 0, 3, 62, 0, 56, ! 62, 0, 4, 62, 0, 330, 60, 0, 195, 0, ! 58, 169, 0, 0, 7, 0, 0, 163, 0, 1, ! 0, 0, 332, 0, 333, 0, 332, 59, 333, 0, ! 9, 93, 163, 107, 0, 9, 0, 334, 59, 9, ! 0, 0, 336, 0, 198, 0, 337, 0, 338, 10, ! 0, 337, 10, 0, 198, 10, 0, 10, 0, 97, ! 0, 337, 97, 0, 198, 97, 0, 337, 62, 0, ! 198, 62, 0, 339, 0, 341, 64, 227, 0, 338, ! 340, 0, 338, 343, 0, 338, 343, 64, 227, 0, ! 337, 59, 0, 198, 59, 0, 200, 196, 0, 203, ! 196, 0, 205, 196, 0, 200, 288, 0, 200, 0, ! 202, 272, 0, 341, 226, 0, 339, 0, 198, 0, ! 0, 0, 272, 0, 0, 61, 93, 346, 107, 0, ! 61, 47, 0, 198, 0, 345, 0, 346, 59, 345, ! 0, 0, 80, 263, 347, 0, 70, 263, 347, 0, ! 284, 263, 347, 0, 41, 0, 348, 80, 0, 348, ! 81, 0, 348, 82, 0, 348, 78, 0, 348, 79, ! 0, 348, 70, 0, 348, 68, 0, 348, 69, 0, ! 348, 88, 0, 348, 59, 0, 348, 73, 0, 348, ! 74, 0, 348, 75, 0, 348, 72, 0, 348, 63, ! 0, 348, 64, 0, 348, 76, 0, 348, 77, 0, ! 348, 86, 0, 348, 87, 0, 348, 67, 0, 348, ! 66, 0, 348, 109, 0, 348, 65, 62, 0, 348, ! 71, 0, 348, 91, 0, 348, 83, 0, 348, 47, ! 0, 348, 94, 110, 0, 348, 38, 0, 348, 37, ! 0, 348, 38, 94, 110, 0, 348, 37, 94, 110, ! 0, 348, 325, 347, 0, 348, 1, 0 }; *************** *** 569,647 **** #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 292, 293, 307, 309, 310, 314, 319, 323, 325, 328, ! 331, 335, 338, 340, 342, 343, 346, 348, 350, 353, ! 358, 363, 366, 370, 373, 377, 387, 391, 401, 403, ! 406, 411, 413, 417, 423, 423, 426, 426, 429, 429, ! 444, 444, 449, 454, 471, 494, 504, 505, 508, 509, ! 510, 511, 512, 515, 518, 521, 526, 531, 537, 539, ! 540, 559, 560, 561, 564, 578, 591, 594, 597, 600, ! 602, 604, 608, 614, 619, 624, 631, 642, 649, 651, ! 653, 657, 665, 667, 669, 671, 675, 688, 711, 714, ! 716, 717, 720, 726, 732, 734, 736, 738, 741, 745, ! 751, 753, 754, 757, 759, 762, 764, 765, 768, 771, ! 773, 775, 779, 784, 787, 789, 793, 798, 801, 805, ! 808, 811, 845, 861, 864, 868, 871, 875, 877, 879, ! 881, 883, 887, 889, 892, 897, 902, 907, 912, 915, ! 918, 922, 941, 948, 951, 954, 956, 958, 962, 966, ! 969, 971, 975, 978, 981, 990, 993, 996, 998, 1000, ! 1002, 1009, 1020, 1040, 1042, 1044, 1049, 1051, 1053, 1055, ! 1057, 1060, 1062, 1064, 1067, 1069, 1073, 1079, 1082, 1089, ! 1092, 1094, 1102, 1111, 1117, 1123, 1125, 1127, 1140, 1142, ! 1144, 1146, 1163, 1166, 1168, 1170, 1172, 1174, 1176, 1178, ! 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, ! 1200, 1202, 1204, 1206, 1208, 1215, 1217, 1234, 1237, 1238, ! 1239, 1242, 1244, 1247, 1249, 1250, 1252, 1254, 1258, 1260, ! 1261, 1264, 1268, 1288, 1289, 1290, 1292, 1294, 1296, 1304, ! 1325, 1330, 1337, 1344, 1346, 1355, 1360, 1383, 1427, 1428, ! 1431, 1434, 1437, 1440, 1442, 1445, 1484, 1491, 1493, 1495, ! 1497, 1499, 1501, 1516, 1531, 1542, 1554, 1561, 1610, 1612, ! 1616, 1618, 1622, 1625, 1630, 1632, 1636, 1649, 1650, 1656, ! 1667, 1675, 1681, 1686, 1688, 1693, 1700, 1702, 1706, 1710, ! 1716, 1719, 1721, 1723, 1725, 1733, 1735, 1737, 1740, 1742, ! 1744, 1746, 1751, 1757, 1759, 1770, 1773, 1775, 1778, 1793, ! 1796, 1798, 1800, 1804, 1807, 1815, 1816, 1817, 1818, 1822, ! 1826, 1840, 1858, 1859, 1860, 1863, 1865, 1868, 1870, 1873, ! 1875, 1878, 1881, 1885, 1902, 1904, 1922, 1928, 1929, 1935, ! 1943, 1945, 1954, 1962, 1964, 1975, 1978, 1982, 1985, 1989, ! 1994, 1997, 2001, 2004, 2006, 2008, 2010, 2017, 2019, 2020, ! 2021, 2025, 2028, 2032, 2034, 2037, 2040, 2043, 2049, 2052, ! 2055, 2057, 2059, 2061, 2065, 2069, 2073, 2076, 2079, 2083, ! 2086, 2088, 2092, 2143, 2158, 2160, 2163, 2165, 2169, 2170, ! 2172, 2174, 2176, 2180, 2189, 2192, 2194, 2196, 2202, 2204, ! 2207, 2212, 2215, 2218, 2227, 2238, 2243, 2243, 2245, 2248, ! 2250, 2254, 2256, 2260, 2288, 2319, 2321, 2343, 2367, 2369, ! 2373, 2399, 2408, 2470, 2473, 2480, 2491, 2500, 2504, 2517, ! 2520, 2522, 2527, 2529, 2533, 2541, 2545, 2548, 2550, 2561, ! 2566, 2574, 2577, 2578, 2589, 2592, 2593, 2604, 2606, 2609, ! 2611, 2614, 2619, 2623, 2629, 2634, 2638, 2642, 2648, 2652, ! 2655, 2660, 2664, 2667, 2670, 2679, 2681, 2685, 2688, 2693, ! 2696, 2700, 2709, 2712, 2716, 2719, 2727, 2729, 2734, 2737, ! 2739, 2741, 2743, 2747, 2750, 2764, 2767, 2772, 2775, 2777, ! 2779, 2781, 2783, 2785, 2787, 2791, 2797, 2800, 2802, 2804, ! 2806, 2810, 2813, 2816, 2818, 2820, 2822, 2826, 2829, 2832, ! 2834, 2836, 2838, 2840, 2842, 2846, 2852, 2858, 2860, 2864, ! 2867, 2869, 2873, 2875, 2878, 2880, 2886, 2889, 2903, 2905, ! 2909, 2911, 2915, 2918, 2924, 2930, 2933, 2935, 2937, 2939, ! 2943, 2947, 2951, 2954, 2959, 2962, 2964, 2966, 2968, 2970, ! 2972, 2974, 2976, 2980, 2984, 2988, 2992, 2993, 2995, 2997, ! 2999, 3001, 3003, 3005, 3007, 3009, 3017, 3019, 3020, 3021, ! 3024, 3031, 3041, 3043, 3048, 3050, 3053, 3067, 3070, 3073, ! 3077, 3081, 3085, 3091, 3094, 3098, 3100, 3103, 3109, 3112, ! 3115, 3118, 3131, 3134, 3139, 3145, 3150, 3153, 3158, 3162, ! 3165, 3171, 3176, 3179, 3184, 3193, 3197, 3200, 3206, 3216, ! 3223, 3229, 3254, 3254, 3286, 3286, 3302, 3302, 3306, 3310, ! 3313, 3318, 3325, 3334, 3343, 3352, 3355, 3361, 3363, 3367, ! 3369, 3372, 3376, 3379, 3382, 3390, 3394, 3400, 3402, 3404, ! 3408, 3410, 3413, 3426, 3431, 3439, 3441, 3445, 3448, 3450, ! 3454, 3457, 3459, 3461, 3467, 3471, 3475, 3478, 3479, 3485, ! 3487, 3490, 3492, 3496, 3501, 3504, 3514, 3521, 3522, 3529, ! 3535, 3540, 3544, 3549, 3556, 3560, 3564, 3569, 3580, 3594, ! 3597, 3599, 3601, 3603, 3607, 3609, 3617, 3634, 3636, 3638, ! 3640, 3642, 3646, 3649, 3653, 3655, 3658, 3680, 3686, 3693, ! 3696, 3700, 3705, 3707, 3714, 3717, 3719, 3721, 3727, 3731, ! 3734, 3736, 3738, 3740, 3742, 3744, 3746, 3748, 3750, 3752, ! 3754, 3756, 3758, 3760, 3762, 3764, 3766, 3768, 3770, 3772, ! 3774, 3776, 3778, 3780, 3782, 3784, 3786, 3788, 3790, 3792, ! 3794, 3796, 3799, 3801 }; --- 579,658 ---- #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 290, 291, 305, 307, 308, 312, 314, 317, 322, 326, ! 328, 331, 334, 339, 342, 344, 346, 347, 350, 352, ! 355, 358, 360, 362, 364, 366, 368, 370, 374, 377, ! 379, 383, 385, 386, 388, 392, 395, 401, 404, 408, ! 411, 415, 425, 429, 439, 441, 444, 449, 451, 455, ! 461, 461, 464, 464, 467, 467, 480, 480, 485, 490, ! 507, 530, 540, 541, 544, 545, 546, 547, 548, 551, ! 554, 557, 562, 567, 573, 575, 576, 595, 596, 597, ! 600, 614, 627, 630, 633, 636, 638, 640, 644, 650, ! 655, 660, 667, 678, 685, 687, 689, 693, 701, 703, ! 705, 709, 722, 742, 745, 747, 748, 751, 757, 763, ! 765, 767, 769, 772, 776, 782, 784, 785, 786, 789, ! 791, 792, 795, 797, 798, 801, 804, 806, 808, 812, ! 817, 820, 822, 826, 831, 834, 838, 841, 844, 878, ! 896, 899, 903, 906, 910, 912, 914, 916, 918, 922, ! 924, 927, 932, 936, 941, 945, 948, 950, 954, 973, ! 980, 983, 985, 986, 987, 990, 993, 997, 1001, 1004, ! 1006, 1010, 1013, 1016, 1025, 1028, 1031, 1033, 1035, 1037, ! 1044, 1055, 1077, 1079, 1081, 1086, 1088, 1090, 1092, 1094, ! 1097, 1099, 1101, 1104, 1106, 1110, 1116, 1119, 1126, 1129, ! 1131, 1139, 1148, 1154, 1160, 1162, 1164, 1177, 1179, 1181, ! 1183, 1200, 1203, 1205, 1207, 1209, 1211, 1213, 1215, 1217, ! 1219, 1221, 1223, 1225, 1227, 1229, 1231, 1233, 1235, 1237, ! 1239, 1241, 1243, 1246, 1253, 1255, 1272, 1275, 1276, 1277, ! 1278, 1281, 1283, 1286, 1288, 1290, 1292, 1296, 1298, 1299, ! 1303, 1323, 1324, 1325, 1327, 1335, 1343, 1345, 1353, 1374, ! 1379, 1386, 1393, 1395, 1404, 1409, 1432, 1476, 1477, 1480, ! 1483, 1486, 1489, 1491, 1494, 1533, 1540, 1542, 1544, 1546, ! 1549, 1552, 1568, 1584, 1596, 1609, 1618, 1628, 1673, 1675, ! 1679, 1681, 1685, 1688, 1693, 1695, 1699, 1712, 1714, 1721, ! 1725, 1736, 1744, 1750, 1755, 1757, 1762, 1769, 1771, 1775, ! 1779, 1785, 1788, 1790, 1792, 1794, 1802, 1804, 1807, 1810, ! 1812, 1814, 1816, 1818, 1823, 1829, 1831, 1836, 1838, 1846, ! 1849, 1851, 1854, 1860, 1862, 1873, 1876, 1878, 1880, 1884, ! 1887, 1895, 1896, 1897, 1898, 1902, 1906, 1920, 1938, 1939, ! 1940, 1943, 1945, 1948, 1950, 1953, 1955, 1958, 1961, 1965, ! 1982, 1984, 2002, 2008, 2009, 2015, 2023, 2025, 2034, 2042, ! 2044, 2055, 2058, 2062, 2065, 2069, 2074, 2077, 2081, 2084, ! 2086, 2088, 2090, 2097, 2099, 2100, 2101, 2105, 2108, 2112, ! 2115, 2118, 2120, 2123, 2126, 2129, 2135, 2138, 2141, 2143, ! 2145, 2147, 2151, 2155, 2159, 2162, 2165, 2169, 2172, 2174, ! 2176, 2179, 2227, 2237, 2239, 2242, 2244, 2248, 2249, 2251, ! 2253, 2255, 2259, 2268, 2271, 2273, 2275, 2278, 2281, 2287, ! 2291, 2295, 2298, 2307, 2312, 2312, 2314, 2317, 2319, 2323, ! 2325, 2329, 2357, 2388, 2390, 2412, 2436, 2438, 2442, 2468, ! 2477, 2543, 2546, 2553, 2564, 2573, 2577, 2592, 2594, 2599, ! 2601, 2603, 2607, 2615, 2619, 2622, 2624, 2635, 2640, 2645, ! 2650, 2653, 2654, 2665, 2668, 2669, 2680, 2682, 2685, 2687, ! 2690, 2695, 2701, 2706, 2710, 2716, 2720, 2725, 2729, 2732, ! 2741, 2743, 2747, 2750, 2755, 2758, 2762, 2771, 2774, 2778, ! 2781, 2788, 2792, 2798, 2801, 2803, 2805, 2811, 2814, 2816, ! 2818, 2820, 2824, 2827, 2841, 2844, 2849, 2852, 2854, 2856, ! 2858, 2862, 2868, 2871, 2873, 2875, 2877, 2881, 2884, 2887, ! 2889, 2891, 2893, 2897, 2900, 2903, 2905, 2907, 2909, 2914, ! 2920, 2926, 2928, 2932, 2935, 2937, 2941, 2943, 2946, 2948, ! 2954, 2957, 2959, 2973, 2975, 2979, 2981, 2985, 2988, 2994, ! 3000, 3003, 3005, 3007, 3009, 3013, 3017, 3021, 3024, 3029, ! 3032, 3034, 3036, 3038, 3040, 3042, 3044, 3046, 3050, 3054, ! 3058, 3062, 3063, 3065, 3067, 3069, 3071, 3073, 3075, 3077, ! 3079, 3087, 3089, 3090, 3091, 3094, 3101, 3109, 3117, 3119, ! 3124, 3126, 3129, 3143, 3146, 3149, 3153, 3156, 3160, 3162, ! 3165, 3169, 3172, 3175, 3179, 3192, 3195, 3197, 3198, 3204, ! 3209, 3211, 3214, 3218, 3221, 3227, 3238, 3242, 3245, 3249, ! 3262, 3270, 3274, 3275, 3300, 3300, 3332, 3332, 3348, 3348, ! 3352, 3356, 3359, 3364, 3371, 3380, 3389, 3398, 3401, 3407, ! 3409, 3413, 3415, 3418, 3422, 3425, 3428, 3430, 3433, 3435, ! 3437, 3440, 3453, 3458, 3466, 3468, 3472, 3475, 3476, 3481, ! 3485, 3489, 3492, 3493, 3499, 3501, 3504, 3506, 3510, 3515, ! 3518, 3528, 3535, 3536, 3543, 3549, 3554, 3558, 3563, 3570, ! 3574, 3578, 3583, 3594, 3608, 3611, 3613, 3615, 3617, 3621, ! 3623, 3631, 3648, 3650, 3652, 3654, 3656, 3660, 3665, 3667, ! 3670, 3692, 3698, 3705, 3708, 3710, 3714, 3719, 3721, 3728, ! 3731, 3733, 3735, 3741, 3745, 3748, 3750, 3752, 3754, 3756, ! 3758, 3760, 3762, 3764, 3766, 3768, 3770, 3772, 3774, 3776, ! 3778, 3780, 3782, 3784, 3786, 3788, 3790, 3792, 3794, 3796, ! 3798, 3800, 3802, 3804, 3806, 3808, 3810, 3813, 3815 }; *************** *** 651,3184 **** "RETURN","GOTO","ASM_KEYWORD","GCC_ASM_KEYWORD","TYPEOF","ALIGNOF","HEADOF", "CLASSOF","SIGOF","ATTRIBUTE","EXTENSION","LABEL","AGGR","VISSPEC","DELETE", ! "NEW","OVERLOAD","THIS","OPERATOR","CXX_TRUE","CXX_FALSE","LEFT_RIGHT","TEMPLATE", ! "TYPEID","DYNAMIC_CAST","STATIC_CAST","REINTERPRET_CAST","CONST_CAST","SCOPE", ! "EMPTY","PTYPENAME","'{'","','","';'","ASSIGN","'='","'?'","':'","OROR","ANDAND", ! "'|'","'^'","'&'","MIN_MAX","EQCOMPARE","ARITHCOMPARE","'<'","'>'","LSHIFT", ! "RSHIFT","'+'","'-'","'*'","'/'","'%'","POINTSAT_STAR","DOT_STAR","UNARY","PLUSPLUS", ! "MINUSMINUS","'~'","HYPERUNARY","PAREN_STAR_PAREN","POINTSAT","'.'","'('","'['", ! "TRY","CATCH","THROW","TYPENAME_ELLIPSIS","PRE_PARSED_FUNCTION_DECL","EXTERN_LANG_STRING", ! "ALL","PRE_PARSED_CLASS_DECL","TYPENAME_DEFN","IDENTIFIER_DEFN","PTYPENAME_DEFN", ! "END_OF_SAVED_INPUT","')'","'}'","'!'","']'","program","extdefs","@1",".hush_warning", ! ".warning_ok","asm_keyword","lang_extdef","@2","extdef","extern_lang_string", ! "template_header","@3","template_parm_list","template_type_parm","template_parm", ! "overloaddef","ov_identifiers","template_def","@4","@5","@6","@7","fn_tmpl_end", "datadef","fndef","fn.def1","fn.def2","return_id","return_init","base_init", ".set_base_init","member_init_list","member_init","identifier","notype_identifier", "identifier_defn","explicit_instantiation","template_type","template_type_name", ! "tmpl.2","template_arg_list","template_arg","template_instantiate_once","@8", "template_instantiation","template_instantiate_some","unop","expr","paren_expr_or_null", ! "paren_cond_or_null","xcond","condition","@9","already_scoped_stmt","nontrivial_exprlist", ! "nonnull_exprlist","unary_expr","@10","new_placement","new_initializer","regcast_or_absdcl", ! "cast_expr","sub_cast_expr","expr_no_commas","notype_unqualified_id","unqualified_id", ! "expr_or_declarator","direct_notype_declarator","primary","@11","@12","new", ! "delete","boolean.literal","string","nodecls","object","decl","declarator","fcast_or_absdcl", ! "type_id","typed_declspecs","typed_declspecs1","reserved_declspecs","declmods", ! "typed_typespecs","reserved_typespecquals","typespec","typespecqual_reserved", ! "initdecls","notype_initdecls","nomods_initdecls","maybeasm","initdcl0","@13", ! "initdcl","@14","notype_initdcl0","@15","nomods_initdcl0","@16","maybe_attribute", ! "attributes","attribute","attribute_list","attrib","any_word","identifiers_or_typenames", ! "init","initlist","structsp","@17","@18","maybecomma","maybecomma_warn","aggr", ! "specialization","named_class_head_sans_basetype","named_class_head_sans_basetype_defn", ! "do_xref","do_xref_defn","named_class_head","unnamed_class_head","class_head", ! "maybe_base_class_list","base_class_list","base_class","base_class.1","base_class_access_list", ! "left_curly","opt.component_decl_list","component_decl_list","component_decl", ! "component_decl_1","components","notype_components","component_declarator0", "component_declarator","after_type_component_declarator0","notype_component_declarator0", "after_type_component_declarator","notype_component_declarator","enumlist","enumerator", ! "new_type_id","type_quals","nonempty_type_quals","nonmomentary_expr","@19","after_type_declarator", ! "qualified_type_name","nested_type","direct_after_type_declarator","notype_declarator", ! "complex_notype_declarator","complex_direct_notype_declarator","qualified_id", ! "notype_qualified_id","overqualified_id","functional_cast","type_name","nested_name_specifier", ! "nested_name_specifier_1","complete_type_name","complex_type_name","ptr_to_mem", ! "global_scope","new_declarator","direct_new_declarator","absdcl","direct_abstract_declarator", ! "stmts","errstmt",".pushlevel","maybe_label_decls","label_decls","label_decl", ! "compstmt_or_error","compstmt","simple_if","@20","@21","implicitly_scoped_stmt", ! "stmt","simple_stmt","@22","@23","@24","@25","@26","@27","@28","@29","@30","@31", ! "@32","@33","@34","@35","@36","try_block","@37","@38","ansi_try_stmts","handler_seq", ! "@39","type_specifier_seq","handler_args","label_colon","forhead.1","forhead.2", ! "maybe_type_qual","xexpr","asm_operands","nonnull_asm_operands","asm_operand", ! "asm_clobbers","parmlist","complex_parmlist","parms","parms_comma","named_parm", ! "full_parm","parm","see_typename","bad_parm","maybe_raises","ansi_raise_identifier", ! "ansi_raise_identifiers","conversion_declarator","operator","operator_name", ! "" }; #endif static const short yyr1[] = { 0, ! 106, 106, 108, 107, 107, 109, 110, 111, 111, 113, ! 112, 114, 114, 114, 114, 114, 114, 114, 114, 114, ! 115, 117, 116, 118, 118, 119, 119, 120, 120, 120, ! 121, 122, 122, 124, 123, 125, 123, 126, 123, 127, ! 123, 123, 123, 123, 123, 123, 123, 123, 128, 128, ! 128, 128, 128, 129, 129, 129, 129, 129, 129, 129, ! 129, 129, 129, 129, 130, 130, 130, 130, 130, 130, ! 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, ! 132, 133, 134, 134, 134, 134, 135, 136, 137, 137, ! 137, 137, 138, 138, 138, 138, 138, 138, 138, 138, ! 139, 139, 139, 140, 140, 141, 141, 141, 142, 142, ! 142, 142, 143, 144, 144, 144, 145, 146, 146, 147, ! 147, 149, 148, 150, 150, 151, 151, 152, 152, 152, ! 152, 152, 153, 153, 154, 154, 155, 155, 156, 156, ! 156, 158, 157, 157, 159, 159, 159, 159, 160, 160, ! 160, 160, 161, 161, 162, 163, 162, 162, 162, 162, ! 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, ! 162, 162, 162, 162, 162, 162, 162, 164, 164, 165, ! 165, 165, 165, 166, 166, 167, 167, 167, 168, 168, ! 168, 168, 169, 169, 169, 169, 169, 169, 169, 169, ! 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, ! 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, ! 170, 171, 171, 172, 172, 172, 172, 172, 173, 173, ! 173, 173, 174, 174, 174, 174, 174, 174, 175, 174, ! 176, 174, 174, 174, 174, 174, 174, 174, 174, 174, ! 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, ! 174, 174, 174, 174, 174, 174, 174, 174, 177, 177, ! 178, 178, 179, 179, 180, 180, 181, 182, 182, 183, ! 183, 183, 183, 183, 183, 183, 184, 184, 185, 185, ! 186, 186, 186, 186, 186, 187, 187, 188, 188, 188, ! 188, 188, 189, 189, 189, 190, 190, 190, 190, 191, ! 191, 191, 191, 192, 192, 193, 193, 193, 193, 193, ! 193, 193, 194, 194, 194, 195, 195, 196, 196, 197, ! 197, 198, 198, 200, 199, 199, 202, 201, 201, 204, ! 203, 203, 206, 205, 205, 207, 207, 208, 208, 209, ! 210, 210, 211, 211, 211, 211, 211, 212, 212, 212, ! 212, 213, 213, 214, 214, 214, 214, 214, 215, 215, ! 215, 215, 215, 215, 217, 216, 216, 218, 216, 216, ! 216, 216, 216, 216, 219, 219, 220, 220, 221, 221, ! 221, 221, 221, 222, 223, 223, 223, 223, 223, 223, ! 224, 225, 226, 227, 227, 228, 229, 229, 230, 230, ! 230, 231, 231, 232, 232, 233, 233, 233, 234, 234, 234, 234, 235, 236, 236, 236, 236, 237, 237, 237, ! 238, 238, 238, 238, 239, 239, 239, 239, 239, 239, ! 239, 240, 240, 240, 241, 241, 241, 242, 242, 243, ! 243, 244, 244, 244, 245, 245, 245, 245, 246, 246, ! 246, 247, 247, 247, 247, 248, 248, 249, 249, 250, ! 250, 250, 251, 251, 252, 252, 254, 253, 255, 255, ! 255, 255, 255, 255, 256, 256, 257, 258, 258, 258, ! 258, 258, 258, 258, 258, 258, 259, 259, 259, 259, ! 259, 259, 260, 260, 260, 260, 260, 260, 261, 261, ! 261, 261, 261, 261, 261, 262, 263, 264, 264, 265, ! 265, 265, 266, 266, 267, 267, 268, 268, 269, 269, ! 270, 270, 271, 271, 272, 273, 273, 273, 273, 273, ! 273, 273, 274, 274, 275, 275, 275, 275, 275, 275, ! 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, ! 276, 276, 276, 276, 276, 276, 277, 277, 277, 277, ! 278, 279, 280, 280, 281, 281, 282, 283, 283, 284, ! 284, 284, 284, 286, 287, 285, 288, 288, 289, 289, ! 290, 290, 291, 290, 290, 292, 293, 290, 294, 295, ! 290, 296, 297, 298, 290, 299, 300, 301, 290, 302, ! 290, 303, 290, 304, 290, 305, 290, 290, 290, 290, ! 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, ! 290, 307, 308, 306, 309, 309, 309, 310, 311, 310, ! 312, 312, 313, 313, 314, 314, 314, 315, 315, 315, ! 316, 316, 316, 316, 317, 317, 318, 318, 318, 319, ! 319, 320, 320, 321, 322, 322, 323, 323, 323, 324, ! 324, 324, 324, 324, 324, 324, 324, 324, 324, 325, ! 325, 325, 325, 325, 326, 326, 327, 327, 327, 327, ! 327, 327, 328, 328, 329, 329, 330, 331, 331, 332, ! 332, 333, 334, 334, 335, 335, 335, 335, 336, 337, ! 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, ! 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, ! 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, ! 337, 337, 337, 337 }; static const short yyr2[] = { 0, ! 0, 1, 0, 2, 2, 0, 0, 1, 1, 0, ! 2, 1, 1, 1, 1, 5, 4, 3, 4, 4, ! 1, 0, 5, 1, 3, 1, 2, 1, 3, 1, ! 3, 1, 3, 0, 5, 0, 5, 0, 5, 0, ! 5, 3, 3, 6, 7, 4, 3, 3, 1, 1, ! 1, 1, 1, 2, 3, 3, 3, 3, 2, 2, ! 2, 2, 2, 1, 3, 4, 3, 5, 4, 3, ! 3, 2, 3, 3, 2, 1, 6, 4, 3, 3, ! 2, 2, 1, 3, 4, 2, 3, 0, 0, 1, ! 3, 2, 3, 1, 4, 2, 4, 2, 4, 2, ! 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, ! 4, 4, 3, 4, 3, 4, 0, 1, 3, 1, ! 1, 0, 6, 0, 1, 0, 2, 1, 1, 1, ! 1, 1, 1, 1, 1, 3, 1, 3, 0, 1, ! 1, 0, 8, 1, 2, 4, 4, 1, 3, 3, ! 3, 3, 1, 1, 1, 0, 3, 2, 2, 2, ! 2, 2, 2, 4, 2, 4, 2, 3, 3, 4, ! 4, 5, 5, 6, 2, 4, 5, 3, 3, 3, ! 1, 3, 2, 3, 4, 1, 2, 5, 1, 4, ! 4, 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ! 3, 3, 5, 3, 3, 1, 2, 3, 1, 1, ! 1, 1, 1, 1, 1, 2, 2, 3, 1, 1, ! 1, 3, 1, 1, 1, 1, 3, 3, 0, 4, ! 0, 6, 2, 4, 2, 2, 1, 4, 1, 7, ! 7, 7, 7, 4, 4, 2, 2, 1, 4, 2, ! 2, 2, 5, 3, 5, 3, 4, 6, 1, 2, ! 1, 2, 1, 1, 1, 2, 0, 2, 2, 3, ! 3, 3, 3, 3, 2, 2, 1, 1, 1, 2, ! 2, 2, 2, 1, 1, 1, 1, 2, 2, 3, ! 3, 4, 1, 2, 2, 1, 1, 2, 2, 1, ! 2, 2, 3, 1, 2, 1, 1, 1, 4, 4, ! 4, 4, 1, 1, 1, 1, 3, 1, 3, 1, ! 3, 0, 4, 0, 7, 4, 0, 7, 4, 0, ! 7, 4, 0, 7, 4, 0, 1, 1, 2, 6, ! 1, 3, 0, 1, 4, 6, 4, 1, 1, 1, ! 1, 1, 3, 1, 2, 3, 4, 1, 1, 3, ! 4, 6, 3, 5, 0, 7, 4, 0, 6, 3, ! 2, 2, 4, 1, 0, 1, 0, 1, 1, 2, ! 2, 2, 2, 3, 2, 2, 2, 3, 3, 1, ! 2, 0, 0, 3, 3, 2, 1, 1, 0, 1, ! 2, 1, 3, 1, 2, 1, 4, 4, 1, 1, ! 2, 2, 1, 0, 1, 4, 3, 1, 2, 2, ! 2, 2, 2, 2, 2, 2, 4, 2, 1, 5, ! 3, 0, 1, 3, 0, 1, 3, 1, 1, 1, ! 1, 4, 6, 4, 4, 6, 4, 3, 4, 6, ! 4, 4, 6, 4, 3, 1, 3, 1, 3, 2, ! 1, 6, 0, 2, 1, 2, 0, 2, 3, 3, ! 2, 2, 3, 1, 1, 1, 2, 5, 5, 3, ! 5, 4, 3, 3, 2, 1, 3, 3, 2, 2, ! 3, 1, 3, 3, 2, 2, 3, 1, 5, 5, ! 3, 5, 3, 4, 3, 2, 2, 1, 2, 4, ! 4, 2, 1, 1, 1, 2, 2, 2, 1, 2, ! 1, 2, 2, 3, 1, 3, 2, 3, 2, 2, ! 3, 1, 3, 4, 3, 2, 2, 1, 3, 2, ! 2, 1, 2, 3, 1, 3, 1, 5, 3, 4, ! 3, 4, 2, 2, 3, 2, 1, 1, 2, 2, ! 2, 0, 0, 1, 1, 2, 3, 1, 2, 3, ! 5, 6, 5, 0, 0, 6, 1, 2, 1, 1, ! 1, 2, 0, 4, 1, 0, 0, 6, 0, 0, ! 7, 0, 0, 0, 10, 0, 0, 0, 10, 0, ! 7, 0, 5, 0, 7, 0, 4, 2, 2, 2, ! 3, 6, 8, 10, 12, 4, 3, 2, 2, 1, ! 1, 0, 0, 7, 1, 2, 2, 0, 0, 5, ! 1, 1, 3, 3, 2, 2, 2, 3, 4, 4, ! 3, 4, 6, 6, 0, 1, 0, 1, 1, 0, ! 1, 1, 3, 4, 1, 3, 0, 1, 1, 1, ! 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, ! 3, 2, 2, 4, 2, 2, 2, 2, 2, 2, ! 1, 2, 1, 3, 1, 1, 0, 0, 1, 0, ! 4, 1, 1, 3, 0, 3, 3, 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, ! 4, 4, 3, 2 }; static const short yydefact[] = { 3, ! 10, 10, 5, 0, 4, 0, 220, 523, 307, 317, ! 475, 0, 8, 9, 0, 0, 389, 0, 709, 0, ! 535, 221, 64, 0, 0, 697, 0, 76, 21, 0, ! 11, 6, 0, 15, 14, 13, 12, 277, 0, 524, ! 117, 230, 502, 0, 297, 0, 296, 310, 0, 330, ! 316, 0, 400, 402, 403, 408, 407, 384, 306, 529, ! 486, 0, 229, 231, 485, 0, 525, 318, 473, 0, ! 0, 219, 62, 63, 527, 0, 0, 101, 102, 103, ! 378, 381, 0, 531, 0, 382, 0, 0, 0, 32, ! 0, 307, 0, 22, 0, 0, 400, 0, 0, 0, ! 0, 500, 0, 0, 0, 499, 0, 0, 0, 0, ! 230, 0, 0, 0, 229, 231, 473, 0, 3, 0, ! 0, 0, 0, 402, 403, 700, 0, 88, 83, 277, ! 0, 0, 60, 528, 124, 473, 0, 477, 61, 0, ! 0, 0, 0, 0, 326, 287, 484, 288, 496, 0, ! 473, 309, 308, 59, 298, 0, 328, 0, 303, 323, ! 324, 299, 312, 314, 325, 0, 54, 390, 391, 392, ! 393, 406, 107, 106, 108, 395, 401, 397, 117, 396, ! 409, 409, 423, 0, 476, 311, 72, 0, 75, 533, ! 517, 487, 526, 0, 530, 0, 744, 740, 739, 737, ! 719, 724, 725, 0, 731, 730, 716, 717, 715, 734, ! 723, 720, 721, 722, 726, 727, 713, 714, 710, 711, ! 712, 736, 728, 729, 718, 735, 0, 732, 641, 310, ! 642, 705, 475, 234, 275, 0, 0, 0, 0, 156, ! 271, 269, 247, 273, 274, 0, 0, 0, 0, 0, ! 0, 0, 129, 128, 0, 130, 131, 0, 0, 216, ! 132, 0, 118, 0, 189, 0, 193, 186, 121, 233, ! 155, 0, 0, 235, 236, 0, 120, 294, 310, 295, ! 518, 258, 249, 0, 0, 0, 400, 380, 0, 375, ! 532, 0, 133, 134, 0, 0, 0, 0, 31, 0, ! 110, 409, 125, 109, 115, 0, 498, 0, 497, 102, ! 103, 218, 227, 0, 506, 226, 0, 505, 0, 232, ! 513, 0, 0, 18, 10, 0, 7, 7, 48, 47, ! 700, 0, 34, 42, 38, 36, 43, 40, 332, 82, ! 89, 86, 0, 0, 277, 0, 0, 0, 572, 65, ! 578, 67, 113, 511, 0, 674, 675, 154, 0, 153, ! 669, 691, 0, 294, 310, 295, 0, 668, 670, 698, ! 680, 0, 515, 0, 0, 0, 482, 0, 481, 0, ! 0, 0, 0, 473, 70, 58, 73, 0, 57, 473, ! 0, 477, 495, 0, 300, 301, 0, 55, 71, 56, ! 74, 305, 304, 315, 700, 331, 398, 394, 399, 410, ! 404, 405, 439, 0, 0, 442, 445, 0, 0, 428, ! 0, 700, 313, 0, 0, 346, 474, 501, 534, 0, ! 0, 733, 738, 473, 473, 0, 473, 743, 0, 0, ! 0, 163, 0, 0, 165, 0, 0, 0, 0, 0, ! 0, 0, 0, 162, 159, 158, 160, 0, 0, 0, ! 0, 217, 0, 116, 161, 0, 0, 187, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 243, 245, 246, 279, 278, 0, 0, 0, 0, 0, ! 167, 471, 0, 175, 276, 223, 0, 697, 222, 261, ! 262, 0, 289, 552, 548, 557, 0, 477, 473, 473, ! 473, 291, 555, 0, 522, 293, 0, 292, 260, 0, ! 256, 270, 272, 519, 0, 257, 112, 111, 468, 387, ! 466, 377, 0, 319, 0, 0, 320, 321, 322, 33, ! 0, 28, 24, 696, 310, 26, 695, 30, 693, 122, ! 114, 504, 503, 232, 507, 0, 17, 20, 19, 332, ! 53, 49, 51, 52, 50, 46, 0, 0, 0, 0, ! 346, 104, 94, 105, 0, 87, 90, 0, 0, 0, ! 368, 0, 364, 84, 0, 0, 66, 69, 579, 573, ! 473, 473, 673, 686, 679, 677, 552, 548, 0, 687, ! 473, 690, 692, 688, 0, 689, 473, 672, 685, 678, ! 676, 671, 699, 682, 683, 0, 514, 478, 480, 479, ! 0, 0, 494, 0, 346, 327, 490, 0, 0, 0, ! 493, 0, 483, 302, 329, 346, 332, 420, 0, 419, ! 411, 412, 414, 0, 416, 438, 434, 433, 220, 523, ! 473, 0, 667, 700, 435, 443, 448, 449, 700, 700, ! 436, 446, 700, 0, 383, 430, 429, 431, 432, 332, ! 702, 310, 703, 0, 0, 0, 345, 347, 348, 742, ! 741, 705, 705, 705, 0, 0, 0, 522, 0, 0, ! 523, 0, 157, 0, 0, 0, 0, 0, 0, 238, ! 237, 0, 184, 119, 220, 523, 221, 0, 0, 369, ! 385, 0, 215, 214, 659, 658, 0, 212, 211, 209, ! 210, 208, 207, 206, 203, 204, 205, 201, 202, 196, ! 197, 198, 199, 200, 194, 195, 0, 0, 0, 0, ! 0, 0, 169, 181, 0, 0, 168, 473, 473, 0, ! 473, 470, 542, 0, 0, 0, 0, 264, 0, 266, ! 0, 516, 551, 550, 547, 546, 696, 0, 0, 566, ! 0, 0, 563, 290, 564, 553, 473, 667, 477, 552, ! 548, 0, 0, 473, 233, 0, 518, 0, 0, 0, ! 388, 0, 387, 152, 151, 150, 149, 0, 23, 0, ! 395, 0, 0, 16, 346, 35, 39, 37, 41, 0, ! 0, 92, 0, 96, 0, 100, 0, 98, 0, 365, ! 0, 85, 68, 0, 580, 0, 574, 575, 512, 509, ! 551, 547, 552, 548, 0, 485, 0, 473, 553, 552, ! 548, 0, 233, 0, 518, 510, 0, 681, 336, 473, ! 473, 473, 492, 342, 346, 0, 0, 422, 421, 415, ! 0, 0, 441, 346, 0, 79, 0, 332, 332, 0, ! 332, 0, 346, 0, 701, 0, 0, 343, 349, 707, ! 706, 708, 248, 164, 0, 0, 0, 166, 190, 192, ! 191, 254, 255, 0, 0, 0, 0, 240, 0, 0, ! 0, 0, 185, 0, 241, 244, 179, 178, 171, 0, ! 170, 183, 0, 0, 539, 537, 0, 540, 477, 176, ! 0, 0, 267, 0, 0, 549, 545, 556, 473, 565, ! 554, 559, 0, 561, 0, 0, 520, 521, 0, 259, ! 469, 467, 379, 0, 25, 29, 694, 0, 0, 44, ! 93, 91, 0, 0, 0, 0, 366, 362, 0, 0, ! 220, 523, 584, 596, 599, 0, 572, 0, 0, 0, ! 0, 0, 0, 221, 630, 0, 655, 0, 591, 0, ! 0, 310, 0, 568, 589, 595, 567, 590, 631, 0, ! 602, 606, 576, 551, 547, 487, 553, 521, 684, 334, ! 491, 488, 489, 340, 339, 0, 0, 413, 346, 346, ! 78, 458, 473, 220, 523, 0, 444, 450, 451, 700, ! 700, 346, 346, 447, 0, 437, 704, 333, 353, 0, ! 0, 0, 0, 0, 0, 373, 0, 0, 370, 188, ! 213, 126, 0, 172, 173, 180, 182, 538, 536, 543, ! 541, 0, 177, 0, 263, 265, 562, 473, 560, 228, ! 376, 0, 45, 95, 99, 97, 367, 0, 577, 571, ! 583, 645, 647, 572, 572, 572, 0, 0, 0, 616, ! 618, 619, 620, 0, 0, 0, 646, 572, 656, 0, ! 592, 285, 700, 0, 286, 0, 700, 0, 700, 0, ! 0, 581, 570, 569, 593, 629, 628, 572, 572, 0, ! 0, 337, 417, 418, 457, 454, 440, 0, 0, 346, ! 332, 332, 452, 455, 359, 360, 361, 358, 0, 351, ! 354, 344, 0, 0, 0, 0, 371, 0, 0, 126, ! 242, 0, 174, 544, 268, 558, 123, 363, 0, 0, ! 0, 587, 0, 0, 572, 648, 0, 651, 0, 0, ! 612, 0, 621, 0, 627, 632, 0, 281, 332, 283, ! 284, 332, 0, 0, 0, 280, 282, 582, 572, 0, ! 0, 335, 341, 0, 77, 346, 346, 465, 346, 346, ! 0, 0, 353, 0, 0, 250, 251, 252, 253, 0, ! 374, 127, 472, 137, 0, 585, 597, 588, 600, 652, ! 650, 0, 649, 144, 0, 310, 0, 0, 0, 617, ! 626, 0, 0, 594, 141, 0, 140, 0, 338, 464, ! 461, 459, 462, 453, 456, 352, 350, 220, 0, 372, ! 0, 572, 0, 0, 0, 0, 610, 700, 614, 613, ! 0, 635, 0, 633, 660, 0, 603, 607, 0, 0, ! 0, 355, 357, 138, 586, 573, 598, 148, 135, 0, ! 0, 654, 0, 653, 572, 332, 0, 637, 636, 638, ! 0, 0, 661, 662, 622, 0, 0, 460, 463, 0, ! 145, 0, 0, 601, 611, 346, 615, 634, 0, 660, ! 0, 0, 0, 0, 356, 0, 0, 136, 0, 639, ! 0, 0, 623, 663, 604, 608, 147, 146, 142, 0, ! 664, 0, 0, 0, 0, 0, 0, 0, 665, 0, ! 624, 605, 609, 143, 0, 0, 640, 0, 0, 643, ! 644, 666, 625, 0, 0, 0 }; ! static const short yydefgoto[] = { 1354, ! 1, 2, 120, 568, 987, 3, 4, 31, 32, 33, ! 300, 551, 552, 553, 34, 91, 35, 577, 579, 578, ! 580, 576, 36, 37, 38, 415, 129, 130, 131, 341, ! 586, 587, 539, 588, 177, 39, 40, 41, 135, 262, ! 263, 303, 813, 304, 1151, 264, 988, 1281, 1216, 1236, ! 1237, 1336, 1277, 293, 793, 265, 448, 500, 757, 266, ! 267, 268, 294, 270, 510, 313, 43, 271, 460, 1052, ! 272, 273, 274, 275, 132, 276, 989, 405, 520, 777, ! 990, 45, 162, 991, 47, 163, 443, 164, 144, 156, ! 49, 635, 145, 1120, 406, 1194, 157, 1121, 50, 1040, ! 687, 688, 689, 1139, 1140, 1141, 969, 720, 721, 51, ! 543, 289, 912, 802, 52, 53, 54, 55, 181, 182, ! 56, 57, 58, 411, 651, 652, 653, 654, 184, 418, ! 419, 420, 421, 665, 671, 666, 1027, 667, 668, 1028, ! 1029, 540, 541, 501, 783, 59, 374, 375, 146, 60, ! 61, 147, 148, 114, 63, 511, 281, 282, 283, 65, ! 284, 67, 68, 180, 69, 285, 762, 763, 778, 523, ! 993, 994, 1161, 836, 837, 838, 350, 995, 996, 1084, ! 1252, 1163, 997, 998, 1189, 1085, 1253, 1086, 1254, 1118, ! 1296, 1334, 1119, 1297, 1335, 1285, 1229, 1287, 1172, 999, ! 1232, 1290, 1264, 1308, 1330, 1227, 1338, 1000, 1001, 1002, ! 1100, 727, 1292, 1293, 1294, 1340, 367, 779, 369, 370, ! 371, 558, 372, 107, 625, 1179, 683, 684, 438, 71, ! 72 }; ! static const short yypact[] = { 64, ! 80,-32768,-32768, 2131,-32768, 130,-32768, 283, 48,-32768, ! -32768, 556,-32768,-32768, 66, 87,-32768, 206,-32768, 2650, ! -32768, 210,-32768, 1299, 1299,-32768, 1901,-32768,-32768, 292, ! -32768, 333, 3137,-32768,-32768,-32768,-32768, 573, 353, 368, ! -32768,-32768, 166, 1701,-32768, 2829,-32768, 1033, 294,-32768, ! -32768, 540,-32768,-32768,-32768,-32768,-32768, 396, 1486,-32768, ! -32768, 591,-32768,-32768,-32768, 82,-32768,-32768,-32768, 214, ! 6712,-32768,-32768,-32768,-32768, 8620, 2499,-32768, 283, 210, ! 355, 414, 368,-32768, 214,-32768, 214, 8620, 8620,-32768, ! 512,-32768, 210,-32768, 4042, 3298, 1, 214, 8446, 283, ! 2225,-32768, 361, 267, 2225,-32768, 262, 2706, 2706, 1901, ! 383, 435, 166, 453, 495, 498,-32768, 571, 446, 2532, ! 224, 4042, 3192, 680, 723, 521, 617,-32768, 55, 16, ! 143, 143,-32768,-32768, 546,-32768, 6059, 532,-32768, 3255, ! 3255, 4407, 641, 569,-32768,-32768, 255,-32768,-32768, 82, ! -32768,-32768,-32768,-32768, 1033, 669,-32768, 998,-32768,-32768, ! -32768, 1070, 673,-32768,-32768, 4042,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 368, 775,-32768, ! 609, 609,-32768, 2064,-32768, 673,-32768, 604, 970,-32768, ! -32768,-32768,-32768, 3851,-32768, 50,-32768, 605, 633,-32768, ! -32768,-32768,-32768, 640,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 601,-32768,-32768, 673, ! 1486, 654, 627,-32768,-32768, 9561, 9644, 659, 664,-32768, ! -32768,-32768,-32768,-32768,-32768, 675, 689, 696, 698, 701, ! 262, 9312,-32768,-32768, 9312,-32768,-32768, 9312, 6796, 3961, ! -32768, 422,-32768, 9312,-32768, 8707,-32768,-32768, 9780,-32768, ! 845, 1829, 8790,-32768, 781, 434,-32768, 126, 1601, 4144, ! -32768, 160,-32768, 475, 813, 4042, 1,-32768, 262, 690, ! -32768, 721, 743, 9688, 726, 728, 734, 800,-32768, 2499, ! -32768, 609,-32768,-32768,-32768, 478,-32768, 125,-32768,-32768, ! -32768,-32768,-32768, 2225,-32768,-32768, 2225,-32768, 758,-32768, ! -32768, 3851, 47,-32768, 729, 2499,-32768,-32768,-32768,-32768, ! 521, 708,-32768,-32768,-32768,-32768,-32768,-32768, 712,-32768, ! 249,-32768, 6886, 8877,-32768, 143, 143, 803,-32768,-32768, ! -32768,-32768,-32768, 855, 765,-32768,-32768, 743, 767, 9688, ! 296, 2466, 3192, 2466, 3043, 3464, 772,-32768, 100, 3351, ! 807, 819,-32768, 776, 8877, 3862,-32768, 3862,-32768, 4280, ! 4280, 4407, 785,-32768,-32768,-32768, 970, 4042,-32768,-32768, ! 6161, 792,-32768, 4311, 1070, 1033, 4042,-32768,-32768,-32768, ! 970,-32768,-32768,-32768, 521,-32768,-32768,-32768,-32768, 905, ! -32768,-32768,-32768, 8877, 447, 1155, 3724, 60, 1544,-32768, ! 252, 521, 673, 2142, 802, 867,-32768,-32768,-32768, 796, ! 798,-32768,-32768,-32768,-32768, 164,-32768,-32768, 8877, 627, ! 6796,-32768, 229, 6796,-32768, 8877, 8964, 9312, 8620, 2142, ! 2142, 2142, 2142,-32768,-32768,-32768,-32768, 805, 809, 803, ! 810,-32768, 8620,-32768,-32768, 6623, 6796,-32768, 8877, 8877, ! 6976, 8877, 8877, 8877, 8877, 8877, 8877, 8877, 8877, 8877, ! 8877, 8877, 8877, 8877, 8877, 8877, 8877, 8877, 8877, 8877, ! -32768,-32768,-32768,-32768,-32768, 8877, 8877, 8877, 8620, 1393, ! 564, 670, 7615,-32768,-32768, 283, 865, 912,-32768, 237, ! 244, 615,-32768, 1080, 1080,-32768, 3796, 814, 837, 884, ! -32768,-32768, 490, 8090, 114,-32768, 188,-32768,-32768, 8877, ! -32768,-32768,-32768,-32768, 626,-32768,-32768,-32768, 877, 874, ! -32768,-32768, 262,-32768, 7438, 7528,-32768,-32768,-32768,-32768, ! 606, 879,-32768,-32768, 3594, 540,-32768,-32768, 887,-32768, ! -32768,-32768,-32768, 844,-32768, 891,-32768,-32768,-32768, 712, ! -32768,-32768,-32768,-32768,-32768,-32768, 893, 896, 897, 903, ! 867,-32768,-32768, 210, 8877, 906,-32768, 280, 420, 436, ! -32768, 6263, 9757,-32768, 849, 143,-32768,-32768,-32768, 24, ! -32768,-32768,-32768,-32768,-32768,-32768, 817, 817, 4802,-32768, ! -32768,-32768,-32768,-32768, 8181,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 902, 6886,-32768,-32768,-32768,-32768, ! 3862, 3862,-32768, 4311, 867,-32768, 855, 861, 863, 866, ! -32768, 872,-32768, 1070,-32768, 867, 712,-32768, 883,-32768, ! 923,-32768,-32768, 939,-32768, 9757,-32768,-32768, 922, 18, ! -32768, 8877, 2818, 521, 930,-32768,-32768,-32768, 510, 611, ! 934,-32768, 521, 937,-32768,-32768,-32768,-32768,-32768, 748, ! -32768, 3086,-32768, 281, 571, 916, 947, 867,-32768,-32768, ! -32768, 282, 282, 282, 904, 908, 9051, 884, 913, 915, ! 192, 917,-32768, 918, 920, 938, 944, 948, 957,-32768, ! -32768, 932,-32768,-32768, 975, 421, 338, 8877, 976,-32768, ! 987, 941, 9757, 9757,-32768,-32768, 988, 4588, 9818, 4862, ! 4703, 4168, 4535, 3669, 1937, 1937, 1937, 1334, 1334, 1050, ! 1050, 713, 713, 713,-32768,-32768, 955, 954, 959, 958, ! 961, 2142, 564,-32768, 6886, 8877,-32768,-32768,-32768, 8877, ! -32768,-32768, 980, 9312, 967, 981, 1030,-32768, 8877,-32768, ! 8877,-32768, 1350,-32768, 1350,-32768, 71, 977, 978,-32768, ! 973, 2142, 855,-32768, 855, 1728,-32768, 1109, 983, 8272, ! 8272, 5855, 979, 8707, 383, 984, 498, 813, 989, 8877, ! 262, 982, 874,-32768, 9757,-32768, 9757, 2499,-32768, 2761, ! 662, 6886, 396,-32768, 867,-32768,-32768,-32768,-32768, 708, ! 994,-32768, 249,-32768, 8877,-32768, 8877,-32768, 8877,-32768, ! 116,-32768,-32768, 262,-32768, 5585, 1049,-32768, 855, 855, ! 1260, 1260, 1918, 1918, 4802,-32768, 82,-32768, 2412, 8359, ! 8359, 5957, 240, 1005, 341, 855, 6886,-32768, 1031,-32768, ! -32768,-32768,-32768, 1051, 867, 8620, 905,-32768,-32768,-32768, ! 8877, 8877, 152, 4929, 1006,-32768, 401, 712, 712, 3568, ! 755, 2290, 867, 2142,-32768, 54, 1023,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 9395, 9395, 7066,-32768,-32768,-32768, ! -32768,-32768,-32768, 1024, 1029, 1032, 1034,-32768, 4688, 6886, ! 6353, 1020,-32768, 8877,-32768,-32768,-32768,-32768, 474, 1035, ! -32768,-32768, 1039, 44, 181, 181, 1027, 181,-32768,-32768, ! 9312, 1128,-32768, 1044, 1046,-32768,-32768,-32768,-32768,-32768, ! -32768, 855, 1059,-32768, 1047, 1062,-32768,-32768, 452,-32768, ! 9757,-32768,-32768, 1063,-32768,-32768,-32768, 2064, 708,-32768, ! -32768,-32768, 1068, 1071, 1073, 6443,-32768,-32768, 745, 289, ! 1075, 575,-32768,-32768,-32768, 1065,-32768, 8877, 1116, 1121, ! 1122, 8533, 67, 572,-32768, 1129, 1175, 1131,-32768, 2565, ! 4428, 2918, 5022,-32768,-32768, 1170,-32768,-32768,-32768, 7718, ! -32768,-32768,-32768, 1260, 1260,-32768, 2412, 1408,-32768,-32768, ! 855, 855, 855,-32768, 1132, 1089, 1093,-32768, 4929, 4929, ! -32768,-32768,-32768, 1138, 624, 8877,-32768,-32768,-32768, 521, ! 521, 867, 867,-32768, 2406,-32768,-32768,-32768, 583, 6886, ! 8877, 8877, 8877, 8877, 6886,-32768, 8877, 1140,-32768,-32768, ! 9801, 546, 8877,-32768, 474,-32768,-32768,-32768,-32768,-32768, ! -32768, 1100,-32768, 1163,-32768,-32768, 855,-32768,-32768,-32768, ! -32768, 73,-32768,-32768,-32768,-32768,-32768, 262,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 803, 6533, 1123, 4518,-32768, ! -32768,-32768,-32768, 1153, 8877, 1158,-32768,-32768,-32768, 1130, ! -32768,-32768, 191, 763,-32768, 788, 521, 9138, 427, 797, ! 307,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 6886, ! 6886,-32768,-32768,-32768,-32768,-32768, 152, 8877, 8877, 4929, ! 712, 712, 1159, 1161,-32768,-32768,-32768,-32768, 315,-32768, ! 1133,-32768, 1120, 1126, 1127, 1137,-32768, 9711, 6886, 546, ! -32768, 1119,-32768,-32768,-32768, 855,-32768,-32768, 462, 462, ! 8000,-32768, 1210, 1184, 1139,-32768, 1189,-32768, 8620, 8877, ! -32768, 7820,-32768, 1190,-32768,-32768, 571,-32768, 712,-32768, ! -32768, 712, 9478, 9478, 7156,-32768,-32768,-32768, 803, 7246, ! 7246,-32768,-32768, 6886,-32768, 4929, 4929,-32768, 867, 867, ! 6886, 6886, 583, 1146, 9225,-32768,-32768,-32768,-32768, 6886, ! -32768,-32768,-32768,-32768, 8620,-32768,-32768,-32768,-32768,-32768, ! -32768, 5675,-32768,-32768, 1148, 416, 4042, 9734, 7820,-32768, ! -32768, 5141, 51,-32768,-32768, 1198,-32768, 1199,-32768,-32768, ! -32768, 1174, 1200,-32768,-32768,-32768,-32768, 369, 1154,-32768, ! 1160, 803, 7910, 527, 370, 5273,-32768, 521,-32768,-32768, ! 379,-32768, 5377,-32768, 1248, 1204,-32768,-32768, 6886, 6886, ! 8877,-32768,-32768,-32768,-32768, 25,-32768,-32768,-32768, 8877, ! 1205,-32768, 1213,-32768, 803, 712, 7820,-32768,-32768,-32768, ! 1178, 271, 1216,-32768,-32768, 7336, 7336,-32768,-32768, 1171, ! -32768, 5765, 1172,-32768,-32768, 867,-32768, 1181, 8877, 1248, ! 1222, 1248, 1177, 1187,-32768, 397, 5481,-32768, 1233,-32768, ! 1192, 365,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1208, ! -32768, 1271, 1236, 7910, 7910, 6886, 3413, 803,-32768, 410, ! -32768,-32768,-32768,-32768, 1195, 1197,-32768, 1296, 1251,-32768, ! -32768,-32768,-32768, 1308, 1309,-32768 }; static const short yypgoto[] = {-32768, ! 1191,-32768,-32768, 986, 7, 1310,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 507,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, -770, 1196, 1207,-32768,-32768,-32768,-32768, 1201,-32768, ! -32768, 496, 135,-32768,-32768,-32768, 2838, -25,-32768, 1221, ! 888, -999,-32768, -88, 178,-32768, 895,-32768, 169, 139, ! -1101,-32768, -524, 1474, -99, 619,-32768,-32768, -714, 3947, ! 43, -240, 2252, 2872, 825, 1176, 432,-32768,-32768,-32768, ! -32768, -273,-32768, -116, -94,-32768, 266, 17, -276, 132, ! 75, -106, -109, -3, 1594, 27, 1371, -118, -752, 364, ! -32768, -82,-32768,-32768, 265,-32768,-32768,-32768,-32768,-32768, ! 327,-32768, 677,-32768, 155,-32768,-32768, 730, 769, 74, ! -32768,-32768,-32768, 560, -272, 13, 1335, 1336,-32768,-32768, ! -32768,-32768,-32768, -141,-32768, 500, 716,-32768, 559, 418, ! 497, -414,-32768,-32768,-32768,-32768,-32768,-32768, 960,-32768, ! 501, 835, 582, 889, 2241, 1820, -368,-32768, 3695, -55, ! 10,-32768, 4252, -90, 717,-32768, 3290,-32768,-32768, 3834, ! -4, 245, -328, 1372, 3416, 871, -214,-32768, 4134,-32768, ! -1157, -942, -343, 117,-32768, 553, -97, -122,-32768,-32768, ! -32768, -1137, -860, -1112,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, -37,-32768,-32768,-32768,-32768, ! -32768, -425, 86,-32768, 90,-32768, -354, -133,-32768,-32768, ! -293, 1052, -286,-32768,-32768, 40, 530,-32768, 57,-32768, ! -260 }; ! #define YYLAST 9897 ! static const short yytable[] = { 66, ! 46, 323, 525, 368, 677, 600, 557, 85, 351, 351, ! 30, 533, 590, 559, 195, 85, 96, 315, 318, 103, ! 103, 84, 103, 642, 536, 468, 179, 556, 66, 123, ! 362, 291, 97, 232, 352, 347, 640, 359, 921, 150, ! 412, 66, 195, 403, 404, 395, 353, 85, 1218, 960, ! 1113, 1234, 1150, 8, 85, 505, -124, 834, 834, 505, ! 143, 84, 505, -1, 1256, 196, 85, 1225, 75, 78, ! 310, 345, 85, 96, 1263, 128, 557, 872, 44, -2, ! 603, 655, 85, 559, 7, 8, 76, 513, 525, 287, ! 150, 85, 77, 85, 95, 674, 103, 302, 342, 308, ! 103, 189, 93, 103, 103, 103, 426, 122, 674, 618, ! 1265, 301, 343, 1251, 1275, 66, 46, 150, 66, 311, ! -473, 165, 19, -473, 429, 604, 835, 1301, 100, 100, ! 605, 697, 1114, 363, 22, 150, 150, 150, 331, 1117, ! 1278, 1095, 344, 348, 1317, 1057, 82, 1305, 566, 781, ! 1150, 286, 1266, 88, 619, 1038, 190, 784, 427, 620, ! 560, 150, 675, 606, 26, 339, 698, 100, -473, 513, ! 966, -473, 713, -473, 89, 1157, 21, 93, 93, 66, ! 417, 396, 387, -473, 100, 73, 176, 427, 1073, 103, ! 514, 8, 621, 362, 44, 425, 349, 401, 538, 429, ! 515, -473, -473, 529, 1054, -700, -473, 277, 90, 136, ! 516, -700, 423, 517, 518, -473, 93, 8, 967, 295, ! 297, 1278, 1278, 351, 351, 599, 85, 436, 165, 195, ! 277, 21, 74, 93, 502, 165, 165, 1104, 190, 1110, ! 93, 312, 75, 188, 595, 758, 1178, 530, 597, 598, ! 596, 582, 8, 137, 138, 759, 581, 368, 416, 165, ! 76, 533, 190, 362, 78, 310, 93, 85, 361, 760, ! 100, 512, 513, 436, 436, 527, 403, 404, 99, 329, ! 768, 150, 188, -230, 362, 100, 644, 770, 427, 315, ! 318, 639, 583, 900, 455, 85, 363, 456, 390, 21, ! 457, 584, 537, 165, 404, 603, 465, 678, 875, 103, ! 193, 1230, 103, 1113, 311, 504, 697, 103, 646, 93, ! 1113, 85, 96, 824, 769, 655, 330, -230, -230, 193, ! 1310, 771, 21, 75, 93, 884, 585, 712, 97, 695, ! 1153, -224, 391, 392, 1080, 425, 434, 193, 166, 167, ! 604, 76, 165, -696, 679, 605, 435, 150, 66, 150, ! 150, 527, 1080, 7, 100, 66, 363, 825, 1260, 1203, ! 570, 150, 1311, 150, 1113, 150, 150, 150, 610, 118, ! 614, 616, 885, 150, -231, 454, 119, 363, 606, 150, ! 461, 1081, 150, 425, 193, 1114, 747, -103, 749, 750, ! 95, 19, 1114, 1024, 1025, 85, 99, 425, 133, 1188, ! 362, 150, 66, 22, 66, 417, 1204, 362, 134, 85, ! 945, 160, 161, 1271, 1332, 1080, 1307, 12, -231, -231, ! 799, 554, 664, 943, 1080, 190, 7, 506, 165, 507, ! 193, 19, -225, 26, 647, 85, 85, 85, 85, 183, ! 17, 21, 1080, 22, 7, 8, 1114, 288, 113, 513, ! 1026, 680, 502, 826, 1348, 140, 1333, 290, 165, 165, ! 1272, 75, 1282, 351, 19, 141, 463, 7, 8, 828, ! -102, 1288, 1186, 26, -224, 821, 22, 815, 142, 76, ! 703, 464, 19, 416, 590, 85, 165, 436, 833, 1327, ! 657, 554, 362, 697, 22, 1214, 658, 827, 362, 436, ! 436, 1349, 527, 363, 557, 19, 508, 754, 188, 66, ! 363, 559, 361, 829, 533, 403, 429, 22, 193, 368, ! 179, 755, 463, 787, 26, 556, 320, 536, 655, 113, ! 113, 113, 78, 79, 168, 169, 170, 561, 324, 1215, ! 150, 85, 193, 468, 321, 681, 362, 26, 78, 79, ! 1062, 756, 1053, -287, 865, 84, 298, 299, 886, -287, ! 1279, 616, 696, 113, 171, 699, 425, 788, 789, 235, ! 705, 706, 707, 708, 709, 78, 310, 1135, 1136, 1137, ! 21, 187, 80, 172, 277, 127, -508, 883, 722, -225, ! 719, 188, 150, 150, 847, 363, 21, 754, 80, 81, ! 847, 363, 188, -700, 1280, -700, -700, 7, 506, 340, ! 677, 755, -700, 388, 389, 75, 150, 150, 165, 150, ! 751, 1097, 128, 1088, 1083, 311, 373, 173, 174, 175, ! 99, 385, 302, 76, -700, -700, -700, 698, -700, 85, ! -700, 756, 636, 425, 368, 19, 923, 100, 847, 363, ! 808, 645, 241, -700, -288, -700, -700, 22, 410, 934, ! -288, 935, -700, 100, 75, 809, 21, 436, 160, 161, ! 193, 362, 188, 1129, 12, 362, 425, 436, 436, 436, ! 811, 424, 76, 430, -700, -700, 386, 26, -700, 432, ! -700, 362, 188, 876, 21, 433, 93, 17, 878, 879, ! 1058, 1059, 881, 1061, 439, 698, -27, 165, 434, -27, ! 21, 431, 93, 397, 398, 963, 719, 964, 435, 965, ! 571, -27, 188, 333, 758, 334, 13, 14, 362, 335, ! 1159, 1160, 195, 115, 759, 362, 446, 85, 890, 891, ! 892, 447, 315, 318, 1176, 165, 193, 450, 760, 315, ! 318, 572, 449, 573, 451, 574, 452, 575, 436, 453, ! 436, 193, 13, 14, 1190, 1191, 336, 85, 337, 13, ! 14, 436, 338, 85, 363, 66, 66, 66, 363, 505, ! 489, 490, 542, 949, 361, 1032, 1033, 545, 1033, 1078, ! 1079, -81, 550, 85, 363, 85, 930, -81, -80, 1342, ! 1343, 113, 113, 113, -80, 531, 8, 388, 1180, 7, ! 8, 1222, 544, 11, 115, 115, 115, 547, 407, 548, ! 408, 567, 455, 456, 409, 549, 150, 150, 150, 150, ! 847, 363, 397, 1181, 150, 847, 847, 847, 363, 241, ! 532, 388, 1187, 19, 442, 445, 349, 19, 115, 564, ! 513, 427, 85, 21, -695, 93, 601, 21, 602, 22, ! 1313, 1314, 150, 617, 70, 103, 626, 66, 417, 85, ! 627, 607, 87, 920, 425, 425, 633, 425, 491, 685, ! 98, 608, 455, 456, 104, 104, 641, 104, 686, 26, ! 690, 516, 691, 70, 609, 518, 710, 820, 8, 648, ! 711, 713, 1021, 722, 104, 766, 70, 767, 780, 361, ! 436, 436, 87, 436, 782, 492, 493, 784, 801, 98, ! 494, 495, 496, 497, 800, 649, 810, 455, 456, 554, ! 650, 98, 8, 868, 812, -228, 814, 98, 816, 698, ! 832, 817, 818, 66, 417, 21, 416, 93, 819, 857, ! 823, 859, 860, 1162, 861, 104, 98, 862, 968, 649, ! 866, 104, 864, 1063, 869, 104, 863, 867, 104, 104, ! 104, 871, 292, 296, 877, 150, 66, 150, 880, 21, ! 70, 93, 104, 70, 13, 14, 882, 1017, 399, 150, ! 150, -332, 150, 887, 888, 893, 1103, 904, 1109, 894, ! 104, 104, 104, 905, 898, 681, 899, 906, 901, 902, ! -700, 903, -700, -700, -332, -332, 907, -332, 461, -700, ! 66, 417, 416, 908, -101, 910, 104, 159, 160, 161, ! 113, 911, 913, 557, 12, 1048, 113, 914, 1199, 1200, ! 1346, -700, -700, 400, 70, -700, 915, -700, 916, 918, ! 1233, 917, 919, 932, 104, 165, 1162, 17, 929, 1131, ! 1132, 931, 594, 933, 402, 160, 161, 940, 938, 939, ! 947, 12, 834, 100, 953, 948, 11, 944, 1010, 188, ! 950, 193, 315, 318, 113, 961, 115, 115, 115, 646, ! 1048, 98, 104, 847, 17, 1249, 1008, 1023, 1014, 416, ! 1039, 1041, 8, 92, 10, 11, 1042, 1096, 356, 1043, ! 12, 1044, 1050, 513, 486, 487, 488, 489, 490, 1162, ! 21, 1060, 93, 1064, 1082, 15, 1055, 425, 425, 16, ! 1056, 959, 98, 17, 514, 1065, 1182, 1066, 104, 104, ! 70, 1069, 1087, 459, 515, 535, 104, 659, 660, 21, ! 1068, 93, 1162, 1070, 516, 1071, 1195, 517, 518, 1074, ! 98, 1300, 1075, 1138, 1076, 1090, 1091, 1092, 847, 847, ! 847, 1099, 1098, 1115, 104, 425, 1101, 104, 425, 1122, ! 1123, 1015, 104, 193, 1124, 19, 98, 1128, 661, 1149, ! 1022, 357, 112, 1306, 1154, 21, 1155, 22, 1173, 1036, ! 1169, 98, 1158, 1175, 662, 1347, 1201, 1177, 1202, 140, ! 1205, 1206, 150, 1213, 1219, 455, 456, 1207, 1208, 141, ! 362, 1269, 104, 70, 104, 104, 70, 26, 1209, 1220, ! 70, 1221, 663, 1258, 1223, 1231, 104, 1247, 104, 1257, ! 104, 104, 104, 1267, 1268, 1273, 1291, 1270, 104, 1295, ! 1304, 1274, 7, 8, 104, 1309, 185, 104, 1080, 628, ! 1312, 1320, 1315, 1318, 113, 113, 113, 1323, 1325, 1339, ! 98, 113, 113, 113, 316, 319, 104, 70, 1326, 70, ! 1329, 1341, 425, 1331, 98, 1337, 1350, 1286, 1351, 165, ! 19, 7, 100, 513, 1352, 11, 1353, 1355, 1356, 325, ! 21, 5, 22, 569, 955, 327, 461, 112, 962, 306, ! 98, 98, 98, 98, 607, 115, 328, 1212, 1217, 1238, ! 346, 115, 85, 363, 608, 459, 772, 1138, 459, 19, ! 700, 702, 26, 704, 516, 1125, 1126, 609, 518, 21, ! 714, 22, 1168, 100, 1106, 858, 185, 1246, 1133, 1134, ! 831, 459, 954, 24, 889, 726, 1018, 124, 125, 870, ! 98, 958, 104, 25, 48, 1072, 672, 803, 1035, 115, ! 1034, 26, 952, 86, 104, 104, 27, 70, 753, 1003, ! 48, 748, 1302, 513, 798, 1322, 8, 765, 10, 11, ! 21, 1324, 93, 48, 12, 535, 484, 485, 486, 487, ! 488, 489, 490, 1037, 514, 0, 155, -232, 0, 15, ! 0, 624, 0, 16, 515, 104, 87, 17, 0, 186, ! 0, 0, -232, -232, 516, 0, 0, 517, 518, -232, ! 0, 230, 0, 21, 0, 93, 279, 48, 0, 0, ! 0, -232, 0, 0, 0, 0, 1198, 0, 279, 279, ! 0, 0, -232, -232, 0, -232, 155, -232, 554, 279, ! 0, 0, 0, 0, 0, 0, 0, 104, 104, 70, ! 752, 0, 0, 0, 922, 798, 0, 0, 0, 8, ! 48, 10, 185, 155, 0, -232, -232, 12, 0, -232, ! -232, 104, 104, 0, 104, 0, 0, 365, 0, -232, ! 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, ! 17, 0, 1240, 1241, 98, 1242, 1243, 0, 0, 0, ! 0, 0, 0, 70, 0, 0, 21, 0, 93, 113, ! 0, 957, 0, 0, 413, 0, 7, 8, 92, 10, ! 11, 0, 104, 0, 48, 12, 316, 319, 0, 115, ! 115, 115, 104, 104, 104, 0, 115, 115, 115, 0, ! 15, 0, 0, 0, 16, 0, 0, 0, 17, -425, ! 0, 0, 0, 0, 19, 0, 1009, 0, 0, 0, ! 0, 0, 0, 0, 21, 0, 22, 0, 0, 676, ! 0, 186, 0, 414, 100, 0, 160, 161, 24, 0, ! 358, 0, 12, 0, 113, 113, 113, 0, 25, 0, ! 0, 0, 98, 0, 0, 0, 26, 0, 0, 279, ! 0, 27, 1319, 0, 0, 17, 0, 0, 0, 1046, ! 1049, 0, 230, 104, 513, 104, -425, 0, 0, 0, ! 186, 21, 98, 93, 927, 0, 104, 0, 98, 0, ! 798, 798, 798, 0, 229, 514, 0, 0, 535, 278, ! 555, 0, 0, 0, 0, 515, 0, 0, 98, 0, ! 98, 278, 278, 0, 0, 516, 459, 0, 524, 518, ! 0, 0, 278, 98, 0, 1049, 48, 0, 0, 796, ! 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, ! 0, 104, 104, 104, 104, 70, 0, 0, 0, 104, ! 798, 798, 798, 0, 0, 0, 0, 0, 0, 0, ! 364, 100, 0, 155, 427, 0, 186, 98, 0, 0, ! 555, 19, 0, 0, 0, 0, 459, 104, 0, 0, ! 104, 21, 70, 22, 98, 0, 139, 0, 0, 0, ! 1016, 365, 0, 0, 0, 140, 0, 0, 0, 1142, ! 0, 513, 0, 0, 1147, 141, 0, 0, 21, 0, ! 93, 0, 0, 26, 112, 0, 0, 155, 142, 48, ! 854, 459, 514, 0, 682, 104, 104, 0, 104, 0, ! 0, 0, 515, 0, 0, 0, 0, 0, 0, 0, ! 0, 279, 516, 0, 279, 517, 518, 358, 0, 279, ! 682, 682, 682, 682, 115, 0, 0, 0, 70, 0, ! 0, 0, 8, 279, 10, 11, 0, 279, 112, 0, ! 12, 0, 0, 101, 105, 0, 0, 0, 0, 1192, ! 1193, 0, 278, 0, 0, 15, 0, 0, 0, 16, ! 104, 70, 104, 17, 358, 229, 0, 0, 0, 279, ! 230, 0, 796, 0, 104, 104, 1094, 104, 1211, 21, ! 0, 93, 498, 0, 0, 0, 0, 555, 0, 0, ! 231, 0, 0, 364, 365, 280, 0, 0, 0, 115, ! 115, 115, 0, 7, 100, 70, 0, 280, 280, 0, ! 0, 0, 358, 0, 0, 0, 499, 0, 280, 0, ! 7, 8, 0, 1239, 11, 0, 0, 314, 317, 0, ! 1244, 1245, 0, 0, 0, 1143, 1144, 1145, 1146, 1250, ! 0, 19, 0, 0, 0, 0, 0, 1152, 0, 0, ! 0, 21, 0, 22, 0, 0, 366, 0, 19, 376, ! 378, 513, 0, 364, 0, 108, 316, 946, 21, 358, ! 22, 358, 358, 0, 0, 109, 0, 0, 798, 555, ! 0, 1167, 843, 26, 364, 365, 0, 0, 110, 1174, ! 0, 0, 844, 0, 0, 0, 0, 358, 1298, 1299, ! 26, 0, 516, 358, 0, 845, 518, 482, 483, 484, ! 485, 486, 487, 488, 489, 490, 0, 278, 0, 316, ! 319, 0, 0, 0, 0, 0, 316, 319, 0, 0, ! 0, 0, 0, 555, 278, 0, 0, 278, 0, 0, ! 0, 0, 278, 278, 278, 278, 278, 0, 0, 0, ! 0, 0, 0, 798, 798, 798, 278, 0, 358, 0, ! 278, 0, 0, 1224, 413, 1344, 7, 8, 92, 10, ! 11, 316, 946, 0, 0, 12, 0, 0, 280, 459, ! 0, 0, 0, 0, 1224, 1224, 0, 0, 358, 0, ! 15, 231, 278, 229, 16, 0, 0, 104, 17, -424, ! 0, 0, 0, 0, 19, 0, 0, 0, 0, 1224, ! 364, 0, 0, 0, 21, 0, 22, 364, 0, 366, ! 0, 0, 682, 414, 0, 0, 924, 0, 24, 0, ! 0, 6, 0, 7, 8, 9, 10, 11, 25, 0, ! 0, 0, 12, 0, 0, 8, 26, 10, 11, 0, ! 0, 27, 682, 12, 0, 13, 14, 15, 555, 0, ! 0, 16, 365, 0, 0, 17, -424, 0, 15, 18, ! 358, 19, 16, 0, 1303, 20, 17, 0, 555, 0, ! 956, 21, 0, 22, 0, 0, 23, 0, 0, 366, ! 726, 726, 21, 0, 93, 24, 0, 0, 0, 631, ! 632, 0, 364, 1321, 0, 25, 992, 98, 364, 0, ! 366, 0, 0, 26, 0, 555, 0, 0, 27, 0, ! 0, 0, 365, 0, 28, 29, 0, 7, 100, 358, ! 0, 185, 0, 0, 0, 0, 279, 0, 0, 0, ! 0, 0, 358, 280, 358, 0, 0, 0, 0, 0, ! 0, 0, 48, 0, 682, 0, 364, 0, 0, 0, ! 280, 0, 0, 280, 0, 19, 0, 279, 280, 280, ! 280, 280, 280, 0, 0, 21, 0, 22, 0, 0, ! 0, 0, 280, 854, 0, 0, 280, 0, 0, 24, ! 413, 0, 7, 8, 92, 10, 11, 0, 358, 25, ! 358, 12, 358, 0, 0, 0, 0, 26, 0, 194, ! 0, 0, 27, 0, 0, 0, 15, 0, 280, 231, ! 16, 0, 0, 0, 17, -427, 0, 269, 48, 0, ! 19, 0, 0, 773, 775, 0, 366, 0, 0, 0, ! 21, 0, 22, 366, 0, 278, 0, 0, 0, 414, ! 269, 0, 0, 0, 24, 0, 0, 322, 0, 316, ! 319, 155, 0, 992, 25, 0, 0, 0, 0, 0, ! 992, 0, 26, 0, 0, 278, 354, 27, 0, 0, ! 0, 364, 0, 0, 0, 364, 0, 0, 360, 0, ! 0, 394, -427, 0, 0, 0, 0, 0, 0, 0, ! 0, 364, 0, 0, 0, 48, 413, 0, 7, 8, ! 92, 10, 11, 0, 7, 8, 0, 12, 427, 0, ! 0, 0, 0, 0, 0, 0, 841, 842, 366, 0, ! 0, 0, 15, 0, 366, 0, 16, 0, 364, 0, ! 17, -426, 0, 0, 0, 364, 19, 0, 0, 0, ! 0, 0, 19, 0, 0, 513, 21, 992, 22, 278, ! 0, 676, 21, 0, 22, 414, 0, 0, 7, 8, ! 24, 0, 0, 0, 0, 0, 607, 278, 0, 0, ! 25, 0, 366, 0, 0, 0, 608, 0, 26, 0, ! 278, 0, 0, 27, 26, 0, 516, 0, 0, 609, ! 518, 0, 8, 92, 10, 11, 19, 0, -426, 513, ! 12, 462, 0, 0, 0, 0, 21, 0, 22, 0, ! 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, ! 607, 992, 6, 17, 7, 8, 9, 10, 11, 1226, ! 608, 0, 992, 12, 0, 0, 0, 0, 26, 21, ! 516, 93, 0, 609, 518, 279, 0, 0, 15, 0, ! 1226, 1226, 16, 0, 0, 0, 17, 7, 8, 0, ! 0, 280, 19, 0, 0, 0, 326, 0, 0, 0, ! 0, 358, 21, 0, 22, 1226, 0, 23, 0, 0, ! 0, 0, 992, 0, 593, 360, 24, 0, 0, 992, ! 0, 280, 992, 0, 0, 19, 25, 366, 0, 773, ! 775, 366, 0, 0, 26, 21, 0, 22, 0, 27, ! 1102, 0, 0, 992, 634, 28, 992, 366, 0, 140, ! 637, 0, 0, 992, 0, 0, 0, 0, 0, 141, ! 0, 0, 360, 0, 0, 0, 0, 26, 0, 0, ! 0, 0, 142, 8, 92, 10, 11, 992, 0, 0, ! 0, 12, 1004, 1005, 366, 656, 0, 0, 0, 1004, ! 1005, 366, 992, 0, 692, 693, 15, 694, 358, 0, ! 16, 0, 0, 0, 17, 280, 0, 992, 0, 0, ! 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 21, 0, 93, 280, 992, 992, 0, 555, 7, 100, ! 0, 0, 11, 0, 269, 0, 280, 593, 94, 0, ! 723, 724, 0, 728, 729, 730, 731, 732, 733, 734, ! 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, ! 745, 746, 0, 0, 358, 0, 19, 360, 0, 360, ! 360, 0, 0, 0, 0, 0, 21, 0, 22, 0, ! 785, 786, 229, 0, 8, 785, 10, 0, 0, 0, ! 108, 0, 12, 0, 0, 360, 0, 0, 278, 0, ! 109, 360, 0, 229, 229, 0, 0, 15, 26, 0, ! 0, 16, 0, 110, 0, 17, 805, 807, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 229, 0, ! 0, 21, 0, 93, 0, 0, 0, 0, 0, 0, ! 7, 8, 92, 10, 11, 0, 0, 356, 0, 12, ! 0, 7, 8, 152, 10, 153, 360, 0, 0, 0, ! 12, 839, 840, 593, 15, 0, 0, 0, 16, 83, ! 0, 849, 17, 0, 0, 15, 0, 856, 19, 16, ! 0, 83, 83, 17, 83, 0, 360, 0, 21, 19, ! 22, 0, 0, 0, 0, 42, 0, 593, 0, 21, ! 0, 22, 380, 0, 154, 0, 0, 0, 0, 178, ! 0, 0, 381, 24, 0, 42, 42, 0, 111, 0, ! 26, 873, 0, 25, 42, 382, 0, 0, 0, 0, ! 357, 26, 0, 874, 0, 42, 27, 42, 0, 0, ! 7, 8, 159, 160, 161, 0, 0, 0, 0, 12, ! 364, 0, 0, 0, 0, 0, 0, 191, 83, 0, ! 83, 83, 83, 0, 0, 83, 83, 83, 360, 0, ! 0, 0, 17, 0, 0, 0, 0, 0, 19, 0, ! 0, 513, 0, 0, 0, 0, 42, 0, 21, 909, ! 22, 0, 42, 0, 191, 0, 42, 0, 0, 111, ! 111, 111, 140, 0, 0, 0, 0, 0, 231, 0, ! 0, 42, 141, 42, 42, 0, 0, 0, 925, 926, ! 26, 928, 631, 632, 280, 1108, 593, 360, 0, 231, ! 231, 42, 42, 111, 0, 0, 0, 0, 0, 0, ! 360, 191, 360, 0, 0, 0, 0, 942, 0, 0, ! 0, 83, 0, 0, 231, 0, 0, 42, 0, 0, ! 0, 0, 0, 0, 0, 7, 8, 159, 160, 161, ! 0, 951, 0, 0, 12, 42, 0, 0, 0, 0, ! 0, 0, 0, 593, 0, 42, 0, 0, 0, 83, ! 0, 0, 0, 0, 0, 0, 360, 17, 360, 0, ! 360, 0, 0, 19, 0, 0, 513, 0, 1007, 100, ! 0, 160, 161, 21, 0, 22, 0, 12, 0, 0, ! 1011, 1012, 1013, 0, 0, 0, 0, 607, 593, 0, ! 0, 0, 0, 83, 0, 83, 83, 608, 0, 0, ! 17, 0, 1019, 1020, 0, 26, 0, 516, 0, 513, ! 615, 518, 0, 0, 0, 0, 21, 121, 93, 7, ! 8, 92, 10, 11, 0, 83, 0, 509, 12, 0, ! 514, 83, 0, 0, 83, 191, 366, 42, 0, 83, ! 515, 593, 593, 15, 0, 1051, 0, 16, 0, 0, ! 516, 17, 0, 517, 518, 0, 0, 19, 0, 1067, ! 0, 0, 0, 0, 0, 42, 0, 21, 42, 22, ! 0, 0, 0, 42, 7, 8, 152, 10, 153, 0, ! 0, 24, 0, 12, 0, 0, 0, 0, 0, 0, ! 0, 25, 0, 0, 0, 0, 0, 593, 15, 26, ! 0, 0, 16, 0, 27, 0, 17, 0, 0, 1089, ! 0, 0, 19, 42, 42, 42, 42, 0, 0, 0, ! 0, 42, 21, 0, 22, 0, 0, 42, 0, 42, ! 0, 111, 111, 111, 0, 0, 24, 7, 8, 42, ! 0, 11, 0, 1127, 0, 42, 25, 0, 42, 0, ! 0, 0, 0, 83, 26, 0, 0, 1130, 0, 27, ! 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, ! 42, 593, 0, 64, 0, 19, 593, 0, 1148, 0, ! 0, 8, 152, 10, 153, 21, 0, 22, 1156, 12, ! 0, 0, 0, 64, 64, 0, 116, 0, 0, 140, ! 0, 0, 64, 0, 15, 0, 0, 0, 16, 141, ! 0, 0, 17, 64, 0, 64, 0, 26, 0, 83, ! 0, 0, 142, 0, 0, 0, 0, 0, 21, 83, ! 93, 83, 83, 7, 8, 92, 10, 11, 0, 360, ! 622, 0, 12, 0, 0, 0, 0, 0, 0, 0, ! 0, 593, 593, 0, 0, 0, 0, 15, 0, 1196, ! 1197, 16, 0, 509, 64, 17, 0, 0, 0, 0, ! 64, 19, 0, 178, 64, 795, 0, 116, 116, 116, ! 593, 21, 0, 22, 0, 0, 0, 0, 0, 64, ! 0, 64, 64, 0, 0, 24, 8, 92, 10, 11, ! 0, 1228, 1345, 0, 12, 25, 42, 0, 0, 64, ! 64, 116, 0, 26, 0, 0, 0, 0, 27, 15, ! 0, 0, 117, 16, 0, 593, 0, 17, 0, 0, ! 0, 0, 593, 593, 0, 64, 360, 0, 0, 151, ! 0, 593, 0, 21, 0, 93, -306, 8, -306, 10, ! 185, 0, 0, 64, 0, 12, 0, 0, 42, 42, ! 111, 0, 0, 64, 0, 0, 853, 0, 0, 0, ! 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, ! 0, 0, 42, 42, -306, 42, 0, 513, 0, 0, ! 151, 0, 0, 0, 21, 0, 93, 0, 0, 83, ! 593, 593, 360, 117, 117, 117, 0, 0, 514, 83, ! 83, 83, 0, 0, 111, 0, 0, 151, 515, 0, ! 0, 0, 0, 0, 0, 0, -306, 0, 516, 0, ! 0, 517, 518, 0, 0, 151, 151, 384, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 795, 0, ! 1024, 100, 0, 0, 534, 64, 0, 0, 0, 0, ! 0, 151, 0, 0, 0, 0, 0, 593, 0, 0, ! 0, 0, 0, 0, 0, 0, 7, 8, 159, 160, ! 161, 0, 0, 64, 0, 12, 64, 0, 19, 0, ! 83, 64, 83, 0, 0, 0, 0, 0, 21, 0, ! 22, 0, 0, 83, 0, 0, 0, 1026, 17, 0, ! 589, 0, 24, 0, 19, 0, 0, 513, 0, 0, ! 0, 0, 25, 0, 21, 0, 22, 437, 0, 0, ! 26, 64, 64, 64, 64, 27, 0, 0, 607, 64, ! 0, 795, 795, 795, 0, 64, 0, 64, 608, 116, ! 116, 116, 0, 0, 0, 0, 26, 64, 516, 0, ! 0, 609, 518, 64, 0, 0, 64, 0, 0, 0, ! 0, 0, 0, 521, 521, 521, 0, 0, 0, 0, ! 0, 151, 0, 0, 0, 64, 64, 0, 64, 0, ! 0, 0, 42, 42, 111, 111, 111, 83, 191, 0, ! 42, 853, 853, 853, 0, 0, 659, 8, 152, 10, ! 153, 0, 0, 0, 0, 12, 479, 480, 481, 482, ! 483, 484, 485, 486, 487, 488, 489, 490, 42, 0, ! 15, 42, 0, 42, 16, 0, 0, 0, 17, 0, ! 0, 0, 83, 83, 19, 83, 795, 795, 795, 0, ! 0, 0, 0, 0, 21, 0, 22, 611, 0, 611, ! 611, 521, 0, 662, 0, 0, 0, 0, 24, 0, ! 0, 151, 0, 151, 0, 384, 384, 384, 25, 8, ! 92, 10, 11, 151, 0, 356, 26, 12, 0, 151, ! 0, 27, 151, 797, 0, 0, 0, 0, 0, 0, ! 191, 0, 15, 0, 0, 0, 16, 0, 0, 42, ! 17, 151, 0, 0, 377, 379, 383, 0, 0, 513, ! 0, 0, 0, 0, 64, 0, 21, 0, 93, 0, ! 0, 0, 0, 7, 100, 0, 0, 427, 0, 0, ! 514, 42, 42, 42, 7, 8, 0, 0, 185, 0, ! 515, 0, 0, 0, 0, 42, 42, 149, 42, 0, ! 516, 0, 0, 517, 518, 0, 0, 0, 357, 0, ! 0, 19, 0, 0, 0, 0, 64, 64, 116, 192, ! 0, 21, 19, 22, 855, 0, 42, 0, 0, 0, ! 0, 0, 21, 0, 22, 24, 0, 761, 192, 0, ! 64, 64, 0, 64, 0, 25, 140, 0, 149, 521, ! 521, 0, 521, 26, 0, 0, 141, 0, 27, 521, ! 0, 0, 0, 0, 26, 0, 0, 0, 0, 142, ! 0, 0, 116, 0, 0, 149, 0, 0, 0, 0, ! 0, 0, 0, 7, 8, 0, 10, 440, 234, 235, ! 611, 236, 12, 149, 149, 149, 0, 0, 0, 853, ! 0, 0, 0, 393, 0, 0, 797, 15, 237, 238, ! 239, 16, 0, 240, 0, 17, 0, 241, 242, 149, ! 243, 19, 244, 245, 0, 0, 246, 247, 248, 249, ! 250, 21, 0, 22, 0, 0, 0, 0, 0, 0, ! 0, 0, 611, 611, 848, 0, 0, 0, 0, 192, ! 848, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 256, 257, 258, 7, 8, 151, 151, 259, 151, ! 0, 0, 260, 0, 853, 853, 853, 0, 0, 0, ! 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, ! 629, 0, 630, 0, 377, 379, 383, 0, 384, 797, ! 797, 797, 19, 0, 0, 0, 0, 534, 643, 0, ! 0, 0, 21, 0, 22, 0, 0, 521, 42, 0, ! 0, 0, 0, 0, 0, 0, 140, 437, 437, 437, ! 669, 0, 589, 0, 0, 0, 141, 192, 0, 149, ! 0, 0, 0, 0, 26, 0, 0, 0, 0, 142, ! 64, 64, 116, 116, 116, 0, 0, 0, 64, 855, ! 855, 855, 0, 0, 0, 0, 0, 8, 0, 10, ! 185, 0, 0, 0, 0, 12, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 64, 0, 0, 64, ! 15, 64, 0, 0, 16, 0, 0, 0, 17, 0, ! 0, 0, 0, 0, 797, 797, 797, 513, 521, 0, ! 521, 0, 0, 0, 21, 149, 93, 149, 149, 0, ! 0, 521, 0, 0, 0, 521, 521, 521, 514, 149, ! 0, 149, 0, 149, 149, 149, 0, 0, 515, 0, ! 0, 149, 0, 0, 519, 519, 519, 149, 516, 0, ! 149, 517, 518, 477, 478, 479, 480, 481, 482, 483, ! 484, 485, 486, 487, 488, 489, 490, 64, 0, 149, ! 0, 0, 0, 0, 0, 62, 611, 611, 848, 848, ! 848, 0, 0, 0, 611, 848, 848, 848, 0, 0, ! 0, 0, 0, 0, 0, 102, 106, 0, 0, 64, ! 64, 64, 7, 8, 126, 0, 11, 0, 0, 0, ! 0, 0, 151, 64, 64, 0, 64, 158, 0, 0, ! 0, 377, 379, 383, 0, 0, 0, 0, 519, 383, ! 519, 519, 519, 7, 8, 0, 0, 427, 0, 0, ! 19, 0, 0, 0, 64, 629, 630, 0, 643, 0, ! 21, 0, 22, 0, 0, 0, 0, 0, 0, 0, ! 761, 761, 0, 761, 380, 0, 0, 0, 0, 0, ! 0, 19, 307, 0, 381, 0, 309, 383, 0, 0, ! 192, 21, 26, 22, 0, 0, 0, 382, 0, 0, ! 0, 62, 0, 0, 332, 140, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 141, 0, 0, 149, 0, ! 0, 102, 106, 26, 0, 0, 0, 855, 142, 0, ! 0, 0, 0, 0, 0, 151, 0, 151, 0, 7, ! 8, 522, 526, 528, 0, 0, 0, 0, 0, 611, ! 611, 0, 611, 0, 0, 0, 0, 0, 0, 0, ! 7, 8, 152, 10, 153, 422, 0, 0, 0, 12, ! 149, 149, 846, 0, 0, 428, 0, 19, 846, 0, ! 0, 0, 0, 0, 15, 0, 0, 21, 16, 22, ! 519, 519, 17, 519, 149, 149, 0, 149, 19, 0, ! 794, 380, 855, 855, 855, 0, 0, 0, 21, 0, ! 22, 381, 0, 1105, 0, 0, 0, 0, 0, 26, ! 0, 0, 24, 0, 382, 612, 846, 522, 526, 528, ! 0, 519, 25, 0, 0, 0, 0, 0, 0, 0, ! 26, 0, 0, 0, 0, 27, 64, 0, 0, 0, ! 0, 0, 0, 384, 0, 0, 0, 1170, 0, 0, ! 0, 0, 0, 0, 0, 629, 630, 377, 379, 383, ! 0, 0, 0, 643, 377, 379, 383, 0, 0, 0, ! 0, 0, 0, 519, 519, 519, 0, 0, 0, 0, ! 0, 794, 0, 0, 0, 562, 0, 0, 563, 0, ! 0, 1030, 0, 565, 469, 470, 471, 1171, 472, 473, ! 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, ! 484, 485, 486, 487, 488, 489, 490, 0, 384, 384, ! 384, 478, 479, 480, 481, 482, 483, 484, 485, 486, ! 487, 488, 489, 490, 613, 0, 0, 0, 0, 0, ! 0, 623, 0, 0, 0, 0, 0, 307, 519, 309, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 151, 0, 0, 428, 0, 774, 776, 473, ! 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, ! 484, 485, 486, 487, 488, 489, 490, 670, 673, 0, ! 422, 0, 0, 0, 149, 149, 149, 149, 846, 0, ! 1006, 0, 149, 846, 846, 846, 0, 0, 526, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 629, 630, ! 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, ! 149, 0, 0, 0, 0, 0, 0, 0, 0, 519, ! 0, 519, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 519, 0, 0, 0, 794, 794, 794, 0, ! 774, 776, 0, 0, 469, 470, 471, 0, 472, 473, ! 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, ! 484, 485, 486, 487, 488, 489, 490, 476, 477, 478, ! 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, ! 489, 490, 192, 0, 0, 0, 0, 519, 519, 519, ! 519, 519, 1045, 0, 0, 519, 794, 794, 794, 0, ! 0, 0, 383, 0, 7, 8, 92, 10, 11, 0, ! 0, 356, 0, 12, 0, 526, 0, 0, 0, 0, ! 0, 0, 0, 149, 0, 149, 0, 0, 15, 0, ! 0, 0, 16, 0, 0, 0, 17, 149, 149, 0, ! 149, 0, 19, 0, 0, 513, 0, 0, 0, 0, ! 0, 0, 21, 0, 22, 0, 0, 0, 102, 106, ! 0, 0, 0, 0, 0, 0, 843, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 844, 377, 379, 383, ! 0, 0, 562, 563, 26, 565, 516, 0, 0, 845, ! 518, 0, 0, 0, 357, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 936, 0, 937, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 941, ! 0, 0, 0, 774, 776, 475, 476, 477, 478, 479, ! 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, ! 490, 846, 0, 0, 0, 0, 0, 0, 0, 0, ! 519, 519, 0, 519, 0, 0, 0, 0, 0, 0, ! 686, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 936, 937, 774, 776, 0, 0, ! 0, 0, 941, 774, 776, 469, 470, 471, 0, 472, ! 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, ! 483, 484, 485, 486, 487, 488, 489, 490, 0, 0, ! 0, 0, 0, 0, 0, 0, 846, 846, 846, 0, ! 0, 0, 1111, 0, 971, 972, 92, 10, 233, 234, ! 235, 0, 236, 12, 973, 0, 974, 975, 976, 977, ! 978, 979, 980, 981, 982, 983, 13, 14, 15, 237, ! 238, 239, 16, 0, 240, 0, 17, 0, 241, 242, ! 149, 243, 19, 244, 245, 0, 0, 246, 247, 248, ! 249, 250, 21, 0, 984, 349, 0, 985, 0, 0, ! 0, 0, 0, 251, 0, 0, 252, 0, 0, 0, ! 0, 0, 307, 309, 253, 254, 255, 0, 0, 0, ! 428, 0, 256, 257, 258, 0, 0, 0, 0, 259, ! 0, 986, 0, 260, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 1112, 261, 0, 0, 1031, 0, ! 0, 1031, 0, 422, 0, 0, 0, 936, 937, 0, ! 941, 1261, 0, 971, 972, 92, 10, 233, 234, 235, ! 0, 236, 12, 973, 0, 974, 975, 976, 977, 978, ! 979, 980, 981, 982, 983, 13, 14, 15, 237, 238, ! 239, 16, 0, 240, 0, 17, 0, 241, 242, 0, ! 243, 19, 244, 245, 0, 0, 246, 247, 248, 249, ! 250, 21, 0, 984, 349, 0, 985, 0, 0, 0, ! 0, 0, 251, 0, 0, 252, 0, 0, 0, 422, ! 0, 0, 0, 253, 254, 255, 0, 0, 0, 0, ! 0, 256, 257, 258, 0, 0, 0, 0, 259, 0, ! 986, 0, 260, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 1107, 1262, 261, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 562, 563, 0, 565, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 1283, 0, 971, 972, 92, 10, 233, ! 234, 235, 0, 236, 12, 973, 422, 974, 975, 976, ! 977, 978, 979, 980, 981, 982, 983, 13, 14, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 984, 349, 0, 985, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 0, 986, 0, 260, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 1284, 261, 1283, 0, 971, ! 972, 92, 10, 233, 234, 235, 0, 236, 12, 973, ! 0, 974, 975, 976, 977, 978, 979, 980, 981, 982, ! 983, 13, 14, 15, 237, 238, 239, 16, 0, 240, ! 0, 17, 0, 241, 242, 0, 243, 19, 244, 245, ! 0, 0, 246, 247, 248, 249, 250, 21, 0, 984, ! 349, 0, 985, 0, 0, 0, 0, 0, 251, 0, ! 0, 252, 0, 0, 0, 0, 0, 0, 0, 253, ! 254, 255, 0, 0, 0, 0, 0, 256, 257, 258, ! 0, 0, 0, 0, 259, 0, 986, 0, 260, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 1289, ! 261, 1283, 0, 971, 972, 92, 10, 233, 234, 235, ! 0, 236, 12, 973, 0, 974, 975, 976, 977, 978, ! 979, 980, 981, 982, 983, 13, 14, 15, 237, 238, ! 239, 16, 0, 240, 0, 17, 0, 241, 242, 0, ! 243, 19, 244, 245, 0, 0, 246, 247, 248, 249, ! 250, 21, 0, 984, 349, 0, 985, 0, 0, 0, ! 0, 0, 251, 0, 0, 252, 0, 0, 0, 0, ! 0, 0, 0, 253, 254, 255, 0, 0, 0, 0, ! 0, 256, 257, 258, 0, 0, 0, 0, 259, 0, ! 986, 0, 260, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 1328, 261, 970, 0, 971, 972, 92, ! 10, 233, 234, 235, 0, 236, 12, 973, 0, 974, ! 975, 976, 977, 978, 979, 980, 981, 982, 983, 13, ! 14, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 0, 0, ! 246, 247, 248, 249, 250, 21, 0, 984, 349, 0, ! 985, 0, 0, 0, 0, 0, 251, 0, 0, 252, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 255, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 0, ! 0, 0, 259, 0, 986, 1255, 260, 971, 972, 92, ! 10, 233, 234, 235, 0, 236, 12, 973, 261, 974, ! 975, 976, 977, 978, 979, 980, 981, 982, 983, 13, ! 14, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 0, 0, ! 246, 247, 248, 249, 250, 21, 0, 984, 349, 0, ! 985, 0, 0, 0, 0, 0, 251, 0, 0, 252, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 255, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 0, ! 0, 0, 259, 0, 986, 1316, 260, 971, 972, 92, ! 10, 233, 234, 235, 0, 236, 12, 973, 261, 974, ! 975, 976, 977, 978, 979, 980, 981, 982, 983, 13, ! 14, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 0, 0, ! 246, 247, 248, 249, 250, 21, 0, 984, 349, 0, ! 985, 0, 0, 0, 0, 0, 251, 0, 0, 252, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 255, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 0, ! 0, 0, 259, 0, 986, 458, 260, 7, 8, 92, ! 10, 233, 234, 235, 356, 236, 12, 0, 261, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 513, 0, ! 246, 247, 248, 249, 250, 21, 0, 22, -239, 0, ! 0, 0, 0, 0, 0, 0, 251, 0, 0, 790, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 791, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 516, ! 0, 0, 792, 518, 0, 0, 260, 357, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 458, 261, 7, ! 8, 92, 10, 233, 234, 235, 356, 236, 12, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 15, 237, 238, 239, 16, 0, 240, ! 0, 17, 0, 241, 242, 0, 243, 19, 244, 245, ! 513, 0, 246, 247, 248, 249, 250, 21, 0, 22, ! -239, 0, 0, 0, 0, 0, 0, 0, 251, 0, ! 0, 850, 0, 0, 0, 0, 0, 0, 0, 253, ! 254, 851, 0, 0, 0, 0, 0, 256, 257, 258, ! 0, 516, 0, 0, 852, 518, 0, 0, 260, 357, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 355, ! 261, 7, 8, 92, 10, 233, 234, 235, 356, 236, ! 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 15, 237, 238, 239, 16, ! 0, 240, 0, 17, 0, 241, 242, 0, 243, 19, ! 244, 245, 0, 0, 246, 247, 248, 249, 250, 21, ! 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, ! 251, 0, 0, 252, 0, 0, 0, 0, 0, 0, ! 0, 253, 254, 255, 0, 0, 0, 0, 0, 256, ! 257, 258, 0, 0, 0, 0, 259, 0, 0, 0, ! 260, 357, 0, 0, 0, 0, 0, 0, 0, 0, ! -667, 638, 261, 7, 8, 92, 10, 233, 234, 235, ! 356, 236, 12, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 15, 237, 238, ! 239, 16, 0, 240, 0, 17, 0, 241, 242, 0, ! 243, 19, 244, 245, 0, 0, 246, 247, 248, 249, ! 250, 21, 0, 22, 0, 0, 0, 0, 0, 0, ! 0, 0, 251, 0, 0, 252, 0, 0, 0, 0, ! 0, 0, 0, 253, 254, 255, 0, 0, 0, 0, ! 0, 256, 257, 258, 0, 0, 0, 0, 259, 0, ! 0, 0, 260, 357, 0, 0, 0, 0, 0, 0, ! 0, 0, -667, 591, 261, 715, 716, 0, 10, 440, ! 234, 235, 0, 236, 12, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 717, 592, 0, 0, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 718, 0, 591, 260, 715, 716, 0, 10, 440, ! 234, 235, 0, 236, 12, 830, 261, 0, 0, 0, ! 0, 1047, 0, 0, 0, 0, 0, 0, 0, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 717, 592, 0, 0, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 0, 0, 591, 260, 715, 716, 0, 10, 440, ! 234, 235, 0, 236, 12, -386, 261, 0, 0, 0, ! 0, 1047, 0, 0, 0, 0, 0, 0, 0, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 717, 592, 0, 0, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 0, 0, 1164, 260, 7, 8, 92, 10, 233, ! 234, 235, 0, 236, 12, 1077, 261, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 22, 1165, 0, 1166, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 0, 0, 591, 260, 715, 716, 0, 10, 440, ! 234, 235, 0, 236, 12, 0, 261, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 717, 592, 0, 0, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 718, 197, 0, 260, 8, 0, 10, 11, 0, ! 0, 0, 0, 12, 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, ! 0, 0, 16, 0, 0, 0, 17, 0, 198, 199, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 0, 21, 0, 93, 0, 201, 0, 202, 203, ! 204, 0, 205, 206, 207, 208, 209, 210, 211, 212, ! 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, ! 0, 0, 223, 224, 225, 0, 458, 226, 7, 8, ! 227, 10, 233, 234, 235, 0, 236, 12, 0, 0, ! 0, 0, 0, 0, 0, 228, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, -239, ! 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, ! 252, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 255, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 259, 0, 0, 591, 260, 7, 8, ! 0, 10, 440, 234, 235, 0, 236, 12, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, 592, ! 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, ! 252, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 255, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 259, 0, 0, 725, 260, 7, 8, ! 0, 10, 440, 234, 235, 0, 236, 12, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, 0, ! 0, 0, 0, 0, 0, -657, 0, 251, 0, 0, ! 252, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 255, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 259, 0, 0, 458, 260, 7, 8, ! 0, 10, 233, 234, 235, 0, 236, 12, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, -239, ! 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, ! 895, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 896, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 897, 0, 0, 458, 260, 7, 8, ! 0, 10, 233, 234, 235, 0, 236, 12, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, -239, ! 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, ! 1183, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 1184, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 1185, 0, 0, 1235, 260, 7, 8, ! 0, 10, 233, 234, 235, 0, 236, 12, 0, 261, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, 0, ! 0, -139, 0, 0, 0, 0, 0, 251, 0, 0, ! 252, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 255, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 259, 0, 0, 725, 260, 7, 8, ! 0, 10, 440, 234, 235, 0, 236, 12, 0, 261, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, 0, ! 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, ! 252, 0, 0, 0, 0, 0, 0, 0, 253, 254, ! 255, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 259, 0, 0, 0, 260, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, -657, 804, 261, ! 7, 8, 0, 10, 440, 234, 235, 0, 236, 12, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 237, 238, 239, 16, 0, ! 240, 0, 17, 0, 241, 242, 0, 243, 19, 244, ! 245, 0, 0, 246, 247, 248, 249, 250, 21, 0, ! 22, 0, 0, 0, 0, 0, 0, 0, 0, 251, ! 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, ! 253, 254, 255, 0, 0, 0, 0, 0, 256, 257, ! 258, 0, 0, 0, 0, 259, 0, 0, 806, 260, ! 7, 8, 0, 10, 440, 234, 235, 0, 236, 12, ! 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 237, 238, 239, 16, 0, ! 240, 0, 17, 0, 241, 242, 0, 243, 19, 244, ! 245, 0, 0, 246, 247, 248, 249, 250, 21, 0, ! 22, 0, 0, 0, 0, 0, 0, 0, 0, 251, ! 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, ! 253, 254, 255, 0, 0, 0, 0, 0, 256, 257, ! 258, 0, 0, 0, 0, 259, 0, 7, 8, 260, ! 10, 440, 234, 235, 0, 236, 12, 0, 0, 0, ! 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 0, 0, ! 246, 247, 248, 249, 250, 21, 0, 22, 0, 0, ! 0, 0, 0, 0, 0, 0, 251, 0, 0, 252, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 255, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 0, ! 0, 0, 259, 0, 0, 0, 260, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 261, 764, ! 971, 972, 92, 10, 233, 234, 235, 0, 236, 12, ! 973, 0, 974, 975, 976, 977, 978, 979, 980, 981, ! 982, 983, 13, 14, 15, 237, 238, 239, 16, 0, ! 240, 0, 17, 0, 241, 242, 0, 243, 19, 244, ! 245, 0, 0, 246, 247, 248, 249, 250, 21, 0, ! 984, 349, 0, 985, 0, 0, 0, 0, 0, 251, ! 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, ! 253, 254, 255, 0, 0, 0, 0, 0, 256, 257, ! 258, 0, 0, 0, 0, 259, 0, 986, 0, 260, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 1116, 261, 971, 972, 92, 10, 233, 234, 235, 0, ! 236, 12, 973, 0, 974, 975, 976, 977, 978, 979, ! 980, 981, 982, 983, 13, 14, 15, 237, 238, 239, ! 16, 0, 240, 0, 17, 0, 241, 242, 0, 243, ! 19, 244, 245, 0, 0, 246, 247, 248, 249, 250, ! 21, 0, 984, 349, 0, 985, 0, 0, 0, 0, ! 0, 251, 0, 0, 252, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 255, 0, 0, 0, 0, 0, ! 256, 257, 258, 0, 0, 0, 0, 259, 0, 986, ! 0, 260, 971, 972, 92, 10, 233, 234, 235, 0, ! 236, 12, 973, 261, 974, 975, 976, 977, 978, 979, ! 980, 981, 982, 983, 13, 14, 15, 237, 238, 239, ! 16, 0, 240, 0, 17, 0, 241, 242, 0, 243, ! 19, 244, 245, 0, 0, 246, 247, 248, 249, 250, ! 21, 0, 984, 1276, 0, 985, 0, 0, 0, 0, ! 0, 251, 0, 0, 252, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 255, 0, 0, 0, 0, 0, ! 256, 257, 258, 0, 0, 0, 0, 259, 0, 986, ! 0, 260, 971, 972, 92, 10, 233, 234, 235, 0, ! 236, 12, 973, 261, 974, 975, 976, 977, 978, 979, ! 980, 981, 982, 983, 13, 14, 15, 237, 238, 239, ! 16, 0, 240, 0, 17, 0, 241, 242, 0, 243, ! 19, 244, 245, 0, 0, 246, 247, 248, 249, 250, ! 21, 0, 984, 0, 0, 985, 0, 0, 0, 0, ! 0, 251, 0, 0, 252, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 255, 0, 0, 0, 0, 0, ! 256, 257, 258, 0, 0, 0, 0, 259, 0, 986, ! 0, 260, 7, 8, 92, 10, 233, 234, 235, 356, ! 236, 12, 0, 261, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 15, 237, 238, 239, ! 16, 0, 240, 0, 17, 0, 241, 242, 0, 243, ! 19, 244, 245, 513, 0, 246, 247, 248, 249, 250, ! 21, 0, 22, 0, 0, 0, 0, 0, 0, 0, ! 0, 251, 0, 0, 790, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 791, 0, 0, 0, 0, 0, ! 256, 257, 258, 0, 516, 0, 0, 792, 518, 0, ! 0, 260, 357, 7, 8, 92, 10, 233, 234, 235, ! 356, 236, 12, 261, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 15, 237, 238, ! 239, 16, 0, 240, 0, 17, 0, 241, 242, 0, ! 243, 19, 244, 245, 513, 0, 246, 247, 248, 249, ! 250, 21, 0, 22, 0, 0, 0, 0, 0, 0, ! 0, 0, 251, 0, 0, 850, 0, 0, 0, 0, ! 0, 0, 0, 253, 254, 851, 0, 0, 0, 0, ! 0, 256, 257, 258, 0, 516, 0, 0, 852, 518, ! 0, 0, 260, 357, 7, 8, 0, 10, 233, 234, ! 235, 0, 236, 12, 261, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 15, 237, ! 238, 239, 16, 0, 240, 0, 17, 0, 241, 242, ! 0, 243, 19, 244, 245, 513, 0, 246, 247, 248, ! 249, 250, 21, 0, 22, 0, 0, 0, 0, 0, ! 0, 0, 0, 251, 0, 0, 790, 0, 0, 0, ! 0, 0, 0, 0, 253, 254, 791, 0, 0, 0, ! 0, 0, 256, 257, 258, 0, 516, 0, 0, 792, ! 518, 7, 8, 0, 10, 233, 234, 235, 0, 236, ! 12, 0, 0, 0, 0, 261, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 15, 237, 238, 239, 16, ! 0, 240, 0, 17, 0, 241, 242, 0, 243, 19, ! 244, 245, 513, 0, 246, 247, 248, 249, 250, 21, ! 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, ! 251, 0, 0, 850, 0, 0, 0, 0, 0, 0, ! 0, 253, 254, 851, 0, 0, 0, 0, 0, 256, ! 257, 258, 0, 516, 0, 0, 852, 518, 7, 8, ! 0, 10, 233, 234, 235, 0, 236, 12, 0, 0, ! 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 237, 238, 239, 16, 0, 240, 0, ! 17, 0, 241, 242, 0, 243, 19, 244, 245, 0, ! 0, 246, 247, 248, 249, 250, 21, 0, 22, 0, ! 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, ! 252, 0, 0, 0, 0, 305, 0, 0, 253, 254, ! 255, 0, 0, 0, 0, 0, 256, 257, 258, 0, ! 0, 0, 0, 259, 0, 7, 8, 260, 10, 440, ! 234, 235, 0, 236, 12, 0, 0, 0, 0, 261, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, ! 237, 238, 239, 16, 0, 240, 0, 17, 0, 241, ! 242, 0, 243, 19, 244, 245, 0, 0, 246, 247, ! 248, 249, 250, 21, 0, 22, 0, 0, 1093, 0, ! 0, 0, 0, 0, 251, 0, 0, 252, 0, 0, ! 0, 0, 0, 0, 0, 253, 254, 255, 0, 0, ! 0, 0, 0, 256, 257, 258, 0, 0, 0, 0, ! 259, 0, 7, 8, 260, 10, 233, 234, 235, 0, ! 236, 12, 0, 0, 0, 0, 261, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 15, 237, 238, 239, ! 16, 0, 240, 0, 17, 0, 241, 242, 0, 243, ! 19, 244, 245, 0, 0, 246, 247, 248, 249, 250, ! 21, 0, 22, 0, 0, 0, 0, 0, 0, 0, ! 0, 251, 0, 0, 252, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 255, 0, 0, 0, 0, 0, ! 256, 257, 258, 0, 0, 0, 0, 259, 0, 7, ! 8, 260, 10, 440, 234, 235, 0, 236, 12, 0, ! 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 15, 237, 238, 239, 16, 0, 240, ! 0, 17, 0, 241, 242, 0, 243, 19, 244, 245, ! 0, 0, 246, 247, 248, 249, 250, 21, 0, 22, ! 466, 0, 0, 0, 0, 0, 0, 0, 251, 0, ! 0, 252, 0, 0, 0, 0, 0, 0, 0, 253, ! 254, 255, 0, 0, 0, 0, 0, 256, 257, 258, ! 0, 0, 7, 8, 467, 10, 440, 234, 235, 0, ! 236, 12, 0, 0, 0, 0, 0, 0, 0, 0, ! 261, 0, 0, 0, 0, 0, 15, 237, 238, 239, ! 16, 0, 240, 0, 17, 0, 241, 242, 0, 243, ! 19, 244, 245, 0, 0, 246, 247, 248, 249, 250, ! 21, 0, 22, 0, 0, 0, 0, 0, 0, 0, ! 0, 251, 0, 0, 252, 0, 0, 0, 0, 0, ! 0, 0, 253, 254, 255, 0, 0, 0, 0, 0, ! 256, 257, 258, 0, 0, 0, 0, 259, 503, 7, ! 8, 0, 10, 440, 234, 235, 0, 236, 12, 0, ! 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 15, 237, 238, 239, 16, 0, 240, ! 0, 17, 0, 241, 242, 0, 243, 19, 244, 245, ! 0, 0, 246, 247, 248, 249, 250, 21, 0, 22, ! 0, 0, 0, 0, 0, 0, 0, 0, 251, 0, ! 0, 252, 0, 0, 0, 0, 0, 0, 0, 253, ! 254, 255, 0, 0, 0, 0, 0, 256, 257, 258, ! 0, 0, 0, 0, 259, 0, 7, 701, 260, 10, ! 440, 234, 235, 0, 236, 12, 0, 0, 0, 0, ! 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 15, 237, 238, 239, 16, 0, 240, 0, 17, 0, ! 241, 242, 0, 243, 19, 244, 245, 0, 0, 246, ! 247, 248, 249, 250, 21, 0, 22, 0, 0, 0, ! 0, 0, 0, 0, 0, 251, 0, 0, 252, 0, ! 0, 0, 0, 0, 0, 0, 253, 254, 255, 0, ! 0, 0, 0, 0, 256, 257, 258, 0, 0, 0, ! 0, 259, 0, 7, 8, 260, 10, 440, 234, 235, ! 0, 236, 12, 0, 0, 0, 0, 261, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 15, 237, 238, ! 239, 16, 0, 240, 0, 17, 0, 241, 242, 0, ! 243, 19, 244, 245, 0, 0, 246, 247, 248, 249, ! 250, 21, 0, 22, 0, 0, 0, 0, 0, 0, ! 0, 0, 251, 0, 0, 895, 0, 0, 0, 0, ! 0, 0, 0, 253, 254, 896, 0, 0, 0, 0, ! 0, 256, 257, 258, 0, 0, 0, 0, 897, 0, ! 7, 8, 260, 10, 440, 234, 235, 0, 236, 12, ! 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 237, 238, 239, 16, 0, ! 240, 0, 17, 0, 241, 242, 0, 243, 19, 244, ! 245, 0, 0, 246, 247, 248, 249, 250, 21, 0, ! 22, 0, 0, 0, 0, 0, 0, 0, 0, 251, ! 0, 0, 1183, 0, 0, 0, 0, 0, 0, 0, ! 253, 254, 1184, 0, 0, 0, 0, 0, 256, 257, ! 258, 0, 0, 0, 0, 1185, 0, 1248, 8, 260, ! 10, 440, 234, 235, 0, 236, 12, 0, 0, 0, ! 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 0, 0, ! 246, 247, 248, 249, 250, 21, 0, 22, 0, 0, ! 0, 0, 0, 0, 0, 0, 251, 0, 0, 252, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 255, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 0, ! 0, 0, 259, 0, 7, 8, 260, 10, 440, 234, ! 235, 0, 236, 12, 0, 0, 0, 0, 261, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 15, 237, ! 238, 239, 16, 0, 240, 0, 17, 0, 241, 242, ! 0, 243, 19, 244, 245, 0, 0, 246, 247, 248, ! 249, 250, 21, 0, 22, 0, 0, 0, 0, 0, ! 0, 0, 0, 251, 0, 0, 252, 0, 0, 0, ! 0, 0, 0, 0, 253, 254, 255, 0, 0, 0, ! 0, 0, 256, 257, 258, 0, 0, 7, 8, 259, ! 10, 440, 234, 235, 0, 236, 12, 0, 0, 0, ! 0, 0, 0, 0, 0, 261, 0, 0, 0, 0, ! 0, 15, 237, 238, 239, 16, 0, 240, 0, 17, ! 0, 241, 242, 0, 243, 19, 244, 245, 0, 0, ! 246, 247, 248, 249, 250, 21, 0, 22, 0, 0, ! 0, 0, 0, 0, 0, 0, 251, 0, 0, 895, ! 0, 0, 0, 0, 0, 0, 0, 253, 254, 896, ! 0, 0, 0, 0, 0, 256, 257, 258, 0, 0, ! 7, 8, 897, 10, 233, 234, 235, 0, 236, 12, ! 0, 0, 0, 0, 0, 0, 0, 0, 261, 0, ! 0, 0, 0, 0, 15, 237, 238, 239, 16, 0, ! 240, 0, 17, 0, 241, 242, 0, 243, 19, 244, ! 245, 0, 0, 246, 247, 248, 249, 250, 21, 0, ! 22, 0, 0, 0, 0, 0, 0, 0, 0, 251, ! 0, 0, 1183, 0, 0, 0, 0, 0, 0, 0, ! 253, 254, 1184, 0, 0, 0, 0, 0, 256, 257, ! 258, 0, 0, 7, 8, 1185, 10, 440, 234, 235, ! 0, 236, 12, 0, 0, 0, 0, 0, 0, 0, ! 0, 261, 0, 0, 0, 0, 0, 15, 237, 0, ! 0, 16, 0, 240, 0, 17, 0, 241, 242, 0, ! 243, 19, 244, 245, 0, 0, 246, 247, 248, 249, ! 250, 21, 0, 22, 0, 0, 0, 0, 0, 0, ! 0, 0, 251, 0, 0, 252, 0, 0, 0, 0, ! 0, 0, 0, 253, 254, 255, 0, 0, 0, 0, ! 0, 256, 257, 258, 0, 0, 7, 8, 441, 10, ! 440, 234, 235, 0, 236, 12, 0, 0, 0, 0, ! 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, ! 15, 237, 0, 0, 16, 0, 240, 0, 17, 0, ! 241, 242, 0, 243, 19, 244, 245, 0, 0, 246, ! 247, 248, 249, 250, 21, 0, 22, 0, 0, 0, ! 0, 0, 0, 0, 0, 251, 0, 0, 252, 0, ! 0, 0, 0, 0, 0, 0, 253, 254, 255, 0, ! 0, 0, 0, 0, 256, 257, 258, 0, 0, 0, ! 0, 444, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 546, 0, 469, 470, 471, 261, 472, 473, ! 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, ! 484, 485, 486, 487, 488, 489, 490, 469, 470, 471, ! 1210, 472, 473, 474, 475, 476, 477, 478, 479, 480, ! 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, ! 469, 470, 471, 1259, 472, 473, 474, 475, 476, 477, ! 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, ! 488, 489, 490, 469, 470, 471, 0, 472, 473, 474, ! 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, ! 485, 486, 487, 488, 489, 490, 469, 470, 471, 0, ! 472, 473, 474, 475, 476, 477, 478, 479, 480, 0, ! 482, 483, 484, 485, 486, 487, 488, 489, 490, 471, ! 0, 472, 473, 474, 475, 476, 477, 478, 479, 480, ! 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, ! 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, ! 484, 485, 486, 487, 488, 489, 490 }; static const short yycheck[] = { 4, ! 4, 118, 279, 137, 419, 349, 300, 12, 131, 132, ! 4, 285, 341, 300, 70, 20, 20, 108, 109, 24, ! 25, 12, 27, 392, 285, 266, 52, 300, 33, 33, ! 137, 87, 20, 71, 132, 130, 391, 137, 753, 44, ! 182, 46, 98, 162, 163, 155, 135, 52, 1161, 820, ! 993, 1189, 1052, 4, 59, 9, 56, 34, 34, 9, ! 44, 52, 9, 0, 1222, 70, 71, 1169, 51, 3, ! 4, 56, 77, 77, 1232, 60, 370, 60, 4, 0, ! 10, 410, 87, 370, 3, 4, 69, 44, 365, 77, ! 95, 96, 45, 98, 20, 36, 101, 97, 44, 104, ! 105, 62, 53, 108, 109, 110, 189, 33, 36, 10, ! 60, 95, 58, 1215, 1252, 120, 120, 122, 123, 53, ! 7, 48, 41, 10, 75, 55, 103, 103, 4, 4, ! 60, 88, 993, 137, 53, 140, 141, 142, 122, 1000, ! 1253, 75, 88, 1, 1302, 102, 12, 1285, 102, 518, ! 1150, 77, 102, 88, 55, 102, 75, 44, 7, 60, ! 302, 166, 103, 93, 83, 126, 443, 4, 55, 44, ! 55, 58, 102, 60, 88, 103, 51, 53, 53, 184, ! 184, 155, 143, 70, 4, 56, 52, 7, 959, 194, ! 65, 4, 93, 300, 120, 189, 54, 158, 287, 75, ! 75, 88, 89, 44, 919, 54, 93, 76, 3, 44, ! 85, 60, 186, 88, 89, 102, 53, 4, 103, 88, ! 89, 1334, 1335, 346, 347, 348, 231, 232, 155, 285, ! 99, 51, 103, 53, 272, 162, 163, 990, 75, 992, ! 53, 107, 51, 92, 344, 65, 56, 88, 346, 347, ! 345, 3, 4, 88, 89, 75, 339, 391, 184, 186, ! 69, 535, 75, 370, 3, 4, 53, 272, 137, 89, ! 4, 276, 44, 278, 279, 280, 395, 396, 69, 56, ! 44, 286, 92, 44, 391, 4, 396, 44, 7, 380, ! 381, 391, 44, 102, 252, 300, 300, 255, 44, 51, ! 258, 53, 286, 230, 423, 10, 264, 56, 663, 314, ! 66, 1172, 317, 1256, 53, 273, 88, 322, 401, 53, ! 1263, 326, 326, 44, 88, 654, 103, 88, 89, 85, ! 60, 88, 51, 51, 53, 55, 88, 460, 326, 439, ! 1055, 102, 88, 89, 56, 339, 65, 103, 55, 56, ! 55, 69, 279, 58, 103, 60, 75, 362, 363, 364, ! 365, 366, 56, 3, 4, 370, 370, 88, 1229, 55, ! 331, 376, 102, 378, 1317, 380, 381, 382, 362, 88, ! 364, 365, 102, 388, 44, 251, 54, 391, 93, 394, ! 259, 103, 397, 387, 150, 1256, 496, 60, 498, 499, ! 326, 41, 1263, 3, 4, 410, 69, 401, 56, 103, ! 517, 416, 417, 53, 419, 419, 102, 524, 51, 424, ! 789, 6, 7, 55, 60, 56, 1287, 12, 88, 89, ! 530, 300, 416, 788, 56, 75, 3, 4, 365, 6, ! 196, 41, 102, 83, 405, 450, 451, 452, 453, 54, ! 35, 51, 56, 53, 3, 4, 1317, 103, 27, 44, ! 60, 422, 500, 44, 55, 65, 102, 54, 395, 396, ! 102, 51, 103, 596, 41, 75, 55, 3, 4, 44, ! 60, 103, 56, 83, 102, 585, 53, 570, 88, 69, ! 448, 70, 41, 419, 823, 500, 423, 502, 596, 103, ! 54, 370, 609, 88, 53, 44, 60, 88, 615, 514, ! 515, 102, 517, 517, 808, 41, 83, 44, 92, 524, ! 524, 808, 391, 88, 798, 644, 75, 53, 284, 663, ! 556, 58, 55, 44, 83, 808, 102, 798, 867, 108, ! 109, 110, 3, 4, 5, 6, 7, 70, 103, 88, ! 555, 556, 308, 794, 102, 424, 663, 83, 3, 4, ! 929, 88, 89, 54, 647, 556, 55, 56, 685, 60, ! 44, 555, 441, 142, 35, 444, 570, 88, 89, 9, ! 449, 450, 451, 452, 453, 3, 4, 5, 6, 7, ! 51, 1, 53, 54, 463, 23, 102, 680, 467, 102, ! 466, 92, 607, 608, 609, 609, 51, 44, 53, 54, ! 615, 615, 92, 23, 88, 25, 26, 3, 4, 3, ! 1035, 58, 32, 55, 56, 51, 631, 632, 555, 634, ! 499, 60, 60, 977, 60, 53, 105, 98, 99, 100, ! 69, 1, 97, 69, 54, 55, 56, 924, 58, 654, ! 60, 88, 388, 647, 788, 41, 756, 4, 663, 663, ! 55, 397, 37, 23, 54, 25, 26, 53, 60, 769, ! 60, 771, 32, 4, 51, 70, 51, 682, 6, 7, ! 436, 788, 92, 60, 12, 792, 680, 692, 693, 694, ! 556, 88, 69, 89, 54, 55, 56, 83, 58, 60, ! 60, 808, 92, 664, 51, 105, 53, 35, 669, 670, ! 925, 926, 673, 928, 88, 992, 55, 644, 65, 58, ! 51, 89, 53, 55, 56, 825, 592, 827, 75, 829, ! 23, 70, 92, 54, 65, 56, 25, 26, 845, 60, ! 1084, 1085, 798, 27, 75, 852, 88, 752, 692, 693, ! 694, 88, 843, 844, 1098, 682, 512, 69, 89, 850, ! 851, 54, 88, 56, 69, 58, 69, 60, 773, 69, ! 775, 527, 25, 26, 1118, 1119, 54, 782, 56, 25, ! 26, 786, 60, 788, 788, 790, 791, 792, 792, 9, ! 78, 79, 103, 798, 663, 878, 879, 55, 881, 55, ! 56, 54, 3, 808, 808, 810, 764, 60, 54, 1334, ! 1335, 380, 381, 382, 60, 3, 4, 55, 56, 3, ! 4, 1165, 102, 7, 108, 109, 110, 102, 54, 102, ! 56, 103, 790, 791, 60, 102, 841, 842, 843, 844, ! 845, 845, 55, 56, 849, 850, 851, 852, 852, 37, ! 38, 55, 56, 41, 236, 237, 54, 41, 142, 102, ! 44, 7, 867, 51, 58, 53, 102, 51, 102, 53, ! 1296, 1297, 877, 102, 4, 880, 58, 882, 882, 884, ! 105, 65, 12, 752, 878, 879, 102, 881, 44, 88, ! 20, 75, 850, 851, 24, 25, 105, 27, 32, 83, ! 105, 85, 105, 33, 88, 89, 102, 581, 4, 5, ! 102, 102, 873, 782, 44, 51, 46, 6, 105, 788, ! 925, 926, 52, 928, 88, 81, 82, 44, 55, 59, ! 86, 87, 88, 89, 58, 31, 58, 895, 896, 808, ! 36, 71, 4, 5, 58, 102, 56, 77, 56, 1226, ! 102, 56, 56, 958, 958, 51, 882, 53, 56, 58, ! 55, 635, 102, 1086, 102, 95, 96, 102, 834, 31, ! 88, 101, 646, 931, 36, 105, 105, 55, 108, 109, ! 110, 60, 88, 89, 55, 990, 991, 992, 55, 51, ! 120, 53, 122, 123, 25, 26, 60, 866, 1, 1004, ! 1005, 32, 1007, 88, 58, 102, 990, 70, 992, 102, ! 140, 141, 142, 70, 102, 884, 102, 70, 102, 102, ! 23, 102, 25, 26, 55, 56, 70, 58, 897, 32, ! 1035, 1035, 958, 102, 60, 60, 166, 5, 6, 7, ! 609, 55, 102, 1337, 12, 911, 615, 60, 1131, 1132, ! 1337, 54, 55, 56, 184, 58, 102, 60, 105, 102, ! 1177, 103, 102, 83, 194, 992, 1189, 35, 89, 1030, ! 1031, 105, 343, 44, 5, 6, 7, 105, 102, 102, ! 102, 12, 34, 4, 103, 102, 7, 105, 58, 92, ! 102, 847, 1183, 1184, 663, 102, 380, 381, 382, 1182, ! 966, 231, 232, 1108, 35, 1205, 102, 102, 58, 1035, ! 88, 88, 4, 5, 6, 7, 88, 983, 10, 88, ! 12, 88, 103, 44, 75, 76, 77, 78, 79, 1252, ! 51, 105, 53, 6, 60, 27, 102, 1131, 1132, 31, ! 102, 815, 272, 35, 65, 102, 1107, 102, 278, 279, ! 280, 105, 88, 259, 75, 285, 286, 3, 4, 51, ! 102, 53, 1285, 102, 85, 103, 1127, 88, 89, 102, ! 300, 1271, 102, 1039, 102, 60, 56, 56, 1183, 1184, ! 1185, 7, 54, 14, 314, 1179, 56, 317, 1182, 58, ! 102, 865, 322, 949, 102, 41, 326, 60, 44, 60, ! 874, 93, 27, 1286, 105, 51, 44, 53, 56, 883, ! 88, 341, 1078, 56, 60, 1338, 58, 88, 58, 65, ! 88, 102, 1227, 105, 15, 1183, 1184, 102, 102, 75, ! 1337, 58, 362, 363, 364, 365, 366, 83, 102, 56, ! 370, 103, 88, 1227, 56, 56, 376, 102, 378, 102, ! 380, 381, 382, 56, 56, 102, 9, 58, 388, 56, ! 56, 102, 3, 4, 394, 88, 7, 397, 56, 375, ! 55, 91, 102, 102, 843, 844, 845, 56, 102, 9, ! 410, 850, 851, 852, 109, 110, 416, 417, 102, 419, ! 58, 56, 1286, 102, 424, 88, 102, 1258, 102, 1226, ! 41, 3, 4, 44, 9, 7, 56, 0, 0, 119, ! 51, 2, 53, 328, 808, 120, 1185, 142, 823, 99, ! 450, 451, 452, 453, 65, 609, 120, 1150, 1160, 1191, ! 130, 615, 1337, 1337, 75, 441, 512, 1203, 444, 41, ! 446, 447, 83, 449, 85, 1019, 1020, 88, 89, 51, ! 463, 53, 1087, 4, 991, 626, 7, 1203, 1032, 1033, ! 592, 467, 803, 65, 688, 471, 867, 33, 33, 654, ! 500, 813, 502, 75, 4, 958, 417, 543, 882, 663, ! 880, 83, 801, 12, 514, 515, 88, 517, 500, 837, ! 20, 497, 1276, 44, 524, 1310, 4, 503, 6, 7, ! 51, 1312, 53, 33, 12, 535, 73, 74, 75, 76, ! 77, 78, 79, 884, 65, -1, 46, 10, -1, 27, ! -1, 370, -1, 31, 75, 555, 556, 35, -1, 59, ! -1, -1, 25, 26, 85, -1, -1, 88, 89, 32, ! -1, 71, -1, 51, -1, 53, 76, 77, -1, -1, ! -1, 44, -1, -1, -1, -1, 1130, -1, 88, 89, ! -1, -1, 55, 56, -1, 58, 96, 60, 1337, 99, ! -1, -1, -1, -1, -1, -1, -1, 607, 608, 609, ! 88, -1, -1, -1, 755, 615, -1, -1, -1, 4, ! 120, 6, 7, 123, -1, 88, 89, 12, -1, 92, ! 93, 631, 632, -1, 634, -1, -1, 137, -1, 102, ! -1, -1, 27, -1, -1, -1, 31, -1, -1, -1, ! 35, -1, 1196, 1197, 654, 1199, 1200, -1, -1, -1, ! -1, -1, -1, 663, -1, -1, 51, -1, 53, 1108, ! -1, 812, -1, -1, 1, -1, 3, 4, 5, 6, ! 7, -1, 682, -1, 184, 12, 381, 382, -1, 843, ! 844, 845, 692, 693, 694, -1, 850, 851, 852, -1, ! 27, -1, -1, -1, 31, -1, -1, -1, 35, 36, ! -1, -1, -1, -1, 41, -1, 857, -1, -1, -1, ! -1, -1, -1, -1, 51, -1, 53, -1, -1, 56, ! -1, 231, -1, 60, 4, -1, 6, 7, 65, -1, ! 137, -1, 12, -1, 1183, 1184, 1185, -1, 75, -1, ! -1, -1, 752, -1, -1, -1, 83, -1, -1, 259, ! -1, 88, 1306, -1, -1, 35, -1, -1, -1, 910, ! 911, -1, 272, 773, 44, 775, 103, -1, -1, -1, ! 280, 51, 782, 53, 760, -1, 786, -1, 788, -1, ! 790, 791, 792, -1, 71, 65, -1, -1, 798, 76, ! 300, -1, -1, -1, -1, 75, -1, -1, 808, -1, ! 810, 88, 89, -1, -1, 85, 792, -1, 88, 89, ! -1, -1, 99, 823, -1, 966, 326, -1, -1, 524, ! -1, -1, -1, 3, 4, -1, -1, -1, -1, -1, ! -1, 841, 842, 843, 844, 845, -1, -1, -1, 849, ! 850, 851, 852, -1, -1, -1, -1, -1, -1, -1, ! 137, 4, -1, 363, 7, -1, 366, 867, -1, -1, ! 370, 41, -1, -1, -1, -1, 852, 877, -1, -1, ! 880, 51, 882, 53, 884, -1, 56, -1, -1, -1, ! 866, 391, -1, -1, -1, 65, -1, -1, -1, 1040, ! -1, 44, -1, -1, 1045, 75, -1, -1, 51, -1, ! 53, -1, -1, 83, 609, -1, -1, 417, 88, 419, ! 615, 897, 65, -1, 424, 925, 926, -1, 928, -1, ! -1, -1, 75, -1, -1, -1, -1, -1, -1, -1, ! -1, 441, 85, -1, 444, 88, 89, 344, -1, 449, ! 450, 451, 452, 453, 1108, -1, -1, -1, 958, -1, ! -1, -1, 4, 463, 6, 7, -1, 467, 663, -1, ! 12, -1, -1, 24, 25, -1, -1, -1, -1, 1120, ! 1121, -1, 259, -1, -1, 27, -1, -1, -1, 31, ! 990, 991, 992, 35, 391, 272, -1, -1, -1, 499, ! 500, -1, 697, -1, 1004, 1005, 982, 1007, 1149, 51, ! -1, 53, 54, -1, -1, -1, -1, 517, -1, -1, ! 71, -1, -1, 300, 524, 76, -1, -1, -1, 1183, ! 1184, 1185, -1, 3, 4, 1035, -1, 88, 89, -1, ! -1, -1, 439, -1, -1, -1, 88, -1, 99, -1, ! 3, 4, -1, 1194, 7, -1, -1, 108, 109, -1, ! 1201, 1202, -1, -1, -1, 1041, 1042, 1043, 1044, 1210, ! -1, 41, -1, -1, -1, -1, -1, 1053, -1, -1, ! -1, 51, -1, 53, -1, -1, 137, -1, 41, 140, ! 141, 44, -1, 370, -1, 65, 791, 792, 51, 496, ! 53, 498, 499, -1, -1, 75, -1, -1, 1108, 609, ! -1, 1087, 65, 83, 391, 615, -1, -1, 88, 1095, ! -1, -1, 75, -1, -1, -1, -1, 524, 1269, 1270, ! 83, -1, 85, 530, -1, 88, 89, 71, 72, 73, ! 74, 75, 76, 77, 78, 79, -1, 424, -1, 844, ! 845, -1, -1, -1, -1, -1, 851, 852, -1, -1, ! -1, -1, -1, 663, 441, -1, -1, 444, -1, -1, ! -1, -1, 449, 450, 451, 452, 453, -1, -1, -1, ! -1, -1, -1, 1183, 1184, 1185, 463, -1, 585, -1, ! 467, -1, -1, 1169, 1, 1336, 3, 4, 5, 6, ! 7, 896, 897, -1, -1, 12, -1, -1, 259, 1185, ! -1, -1, -1, -1, 1190, 1191, -1, -1, 615, -1, ! 27, 272, 499, 500, 31, -1, -1, 1227, 35, 36, ! -1, -1, -1, -1, 41, -1, -1, -1, -1, 1215, ! 517, -1, -1, -1, 51, -1, 53, 524, -1, 300, ! -1, -1, 752, 60, -1, -1, 756, -1, 65, -1, ! -1, 1, -1, 3, 4, 5, 6, 7, 75, -1, ! -1, -1, 12, -1, -1, 4, 83, 6, 7, -1, ! -1, 88, 782, 12, -1, 25, 26, 27, 788, -1, ! -1, 31, 792, -1, -1, 35, 103, -1, 27, 39, ! 697, 41, 31, -1, 1280, 45, 35, -1, 808, -1, ! 810, 51, -1, 53, -1, -1, 56, -1, -1, 370, ! 1296, 1297, 51, -1, 53, 65, -1, -1, -1, 380, ! 381, -1, 609, 1309, -1, 75, 836, 1337, 615, -1, ! 391, -1, -1, 83, -1, 845, -1, -1, 88, -1, ! -1, -1, 852, -1, 94, 95, -1, 3, 4, 756, ! -1, 7, -1, -1, -1, -1, 866, -1, -1, -1, ! -1, -1, 769, 424, 771, -1, -1, -1, -1, -1, ! -1, -1, 882, -1, 884, -1, 663, -1, -1, -1, ! 441, -1, -1, 444, -1, 41, -1, 897, 449, 450, ! 451, 452, 453, -1, -1, 51, -1, 53, -1, -1, ! -1, -1, 463, 1108, -1, -1, 467, -1, -1, 65, ! 1, -1, 3, 4, 5, 6, 7, -1, 825, 75, ! 827, 12, 829, -1, -1, -1, -1, 83, -1, 69, ! -1, -1, 88, -1, -1, -1, 27, -1, 499, 500, ! 31, -1, -1, -1, 35, 36, -1, 76, 958, -1, ! 41, -1, -1, 514, 515, -1, 517, -1, -1, -1, ! 51, -1, 53, 524, -1, 752, -1, -1, -1, 60, ! 99, -1, -1, -1, 65, -1, -1, 117, -1, 1184, ! 1185, 991, -1, 993, 75, -1, -1, -1, -1, -1, ! 1000, -1, 83, -1, -1, 782, 136, 88, -1, -1, ! -1, 788, -1, -1, -1, 792, -1, -1, 137, -1, ! -1, 151, 103, -1, -1, -1, -1, -1, -1, -1, ! -1, 808, -1, -1, -1, 1035, 1, -1, 3, 4, ! 5, 6, 7, -1, 3, 4, -1, 12, 7, -1, ! -1, -1, -1, -1, -1, -1, 607, 608, 609, -1, ! -1, -1, 27, -1, 615, -1, 31, -1, 845, -1, ! 35, 36, -1, -1, -1, 852, 41, -1, -1, -1, ! -1, -1, 41, -1, -1, 44, 51, 1087, 53, 866, ! -1, 56, 51, -1, 53, 60, -1, -1, 3, 4, ! 65, -1, -1, -1, -1, -1, 65, 884, -1, -1, ! 75, -1, 663, -1, -1, -1, 75, -1, 83, -1, ! 897, -1, -1, 88, 83, -1, 85, -1, -1, 88, ! 89, -1, 4, 5, 6, 7, 41, -1, 103, 44, ! 12, 260, -1, -1, -1, -1, 51, -1, 53, -1, ! -1, -1, -1, -1, -1, 27, -1, -1, -1, 31, ! 65, 1161, 1, 35, 3, 4, 5, 6, 7, 1169, ! 75, -1, 1172, 12, -1, -1, -1, -1, 83, 51, ! 85, 53, -1, 88, 89, 1185, -1, -1, 27, -1, ! 1190, 1191, 31, -1, -1, -1, 35, 3, 4, -1, ! -1, 752, 41, -1, -1, -1, 45, -1, -1, -1, ! -1, 1108, 51, -1, 53, 1215, -1, 56, -1, -1, ! -1, -1, 1222, -1, 343, 344, 65, -1, -1, 1229, ! -1, 782, 1232, -1, -1, 41, 75, 788, -1, 790, ! 791, 792, -1, -1, 83, 51, -1, 53, -1, 88, ! 56, -1, -1, 1253, 384, 94, 1256, 808, -1, 65, ! 390, -1, -1, 1263, -1, -1, -1, -1, -1, 75, ! -1, -1, 391, -1, -1, -1, -1, 83, -1, -1, ! -1, -1, 88, 4, 5, 6, 7, 1287, -1, -1, ! -1, 12, 843, 844, 845, 414, -1, -1, -1, 850, ! 851, 852, 1302, -1, 434, 435, 27, 437, 1205, -1, ! 31, -1, -1, -1, 35, 866, -1, 1317, -1, -1, ! 439, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 51, -1, 53, 884, 1334, 1335, -1, 1337, 3, 4, ! -1, -1, 7, -1, 463, -1, 897, 466, 69, -1, ! 469, 470, -1, 472, 473, 474, 475, 476, 477, 478, ! 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, ! 489, 490, -1, -1, 1271, -1, 41, 496, -1, 498, ! 499, -1, -1, -1, -1, -1, 51, -1, 53, -1, ! 520, 521, 1169, -1, 4, 525, 6, -1, -1, -1, ! 65, -1, 12, -1, -1, 524, -1, -1, 1185, -1, ! 75, 530, -1, 1190, 1191, -1, -1, 27, 83, -1, ! -1, 31, -1, 88, -1, 35, 545, 546, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 1215, -1, ! -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, ! 3, 4, 5, 6, 7, -1, -1, 10, -1, 12, ! -1, 3, 4, 5, 6, 7, 585, -1, -1, -1, ! 12, 601, 602, 592, 27, -1, -1, -1, 31, 12, ! -1, 611, 35, -1, -1, 27, -1, 617, 41, 31, ! -1, 24, 25, 35, 27, -1, 615, -1, 51, 41, ! 53, -1, -1, -1, -1, 4, -1, 626, -1, 51, ! -1, 53, 65, -1, 56, -1, -1, -1, -1, 52, ! -1, -1, 75, 65, -1, 24, 25, -1, 27, -1, ! 83, 661, -1, 75, 33, 88, -1, -1, -1, -1, ! 93, 83, -1, 662, -1, 44, 88, 46, -1, -1, ! 3, 4, 5, 6, 7, -1, -1, -1, -1, 12, ! 1337, -1, -1, -1, -1, -1, -1, 66, 101, -1, ! 103, 104, 105, -1, -1, 108, 109, 110, 697, -1, ! -1, -1, 35, -1, -1, -1, -1, -1, 41, -1, ! -1, 44, -1, -1, -1, -1, 95, -1, 51, 718, ! 53, -1, 101, -1, 103, -1, 105, -1, -1, 108, ! 109, 110, 65, -1, -1, -1, -1, -1, 1169, -1, ! -1, 120, 75, 122, 123, -1, -1, -1, 758, 759, ! 83, 761, 1183, 1184, 1185, 88, 755, 756, -1, 1190, ! 1191, 140, 141, 142, -1, -1, -1, -1, -1, -1, ! 769, 150, 771, -1, -1, -1, -1, 787, -1, -1, ! -1, 194, -1, -1, 1215, -1, -1, 166, -1, -1, ! -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, ! -1, 800, -1, -1, 12, 184, -1, -1, -1, -1, ! -1, -1, -1, 812, -1, 194, -1, -1, -1, 232, ! -1, -1, -1, -1, -1, -1, 825, 35, 827, -1, ! 829, -1, -1, 41, -1, -1, 44, -1, 848, 4, ! -1, 6, 7, 51, -1, 53, -1, 12, -1, -1, ! 860, 861, 862, -1, -1, -1, -1, 65, 857, -1, ! -1, -1, -1, 276, -1, 278, 279, 75, -1, -1, ! 35, -1, 871, 872, -1, 83, -1, 85, -1, 44, ! 88, 89, -1, -1, -1, -1, 51, 1, 53, 3, ! 4, 5, 6, 7, -1, 308, -1, 276, 12, -1, ! 65, 314, -1, -1, 317, 284, 1337, 286, -1, 322, ! 75, 910, 911, 27, -1, 914, -1, 31, -1, -1, ! 85, 35, -1, 88, 89, -1, -1, 41, -1, 939, ! -1, -1, -1, -1, -1, 314, -1, 51, 317, 53, ! -1, -1, -1, 322, 3, 4, 5, 6, 7, -1, ! -1, 65, -1, 12, -1, -1, -1, -1, -1, -1, ! -1, 75, -1, -1, -1, -1, -1, 966, 27, 83, ! -1, -1, 31, -1, 88, -1, 35, -1, -1, 978, ! -1, -1, 41, 362, 363, 364, 365, -1, -1, -1, ! -1, 370, 51, -1, 53, -1, -1, 376, -1, 378, ! -1, 380, 381, 382, -1, -1, 65, 3, 4, 388, ! -1, 7, -1, 1023, -1, 394, 75, -1, 397, -1, ! -1, -1, -1, 436, 83, -1, -1, 1026, -1, 88, ! -1, -1, -1, -1, -1, -1, -1, 416, 417, -1, ! 419, 1040, -1, 4, -1, 41, 1045, -1, 1047, -1, ! -1, 4, 5, 6, 7, 51, -1, 53, 1068, 12, ! -1, -1, -1, 24, 25, -1, 27, -1, -1, 65, ! -1, -1, 33, -1, 27, -1, -1, -1, 31, 75, ! -1, -1, 35, 44, -1, 46, -1, 83, -1, 502, ! -1, -1, 88, -1, -1, -1, -1, -1, 51, 512, ! 53, 514, 515, 3, 4, 5, 6, 7, -1, 1108, ! 10, -1, 12, -1, -1, -1, -1, -1, -1, -1, ! -1, 1120, 1121, -1, -1, -1, -1, 27, -1, 1128, ! 1129, 31, -1, 512, 95, 35, -1, -1, -1, -1, ! 101, 41, -1, 556, 105, 524, -1, 108, 109, 110, ! 1149, 51, -1, 53, -1, -1, -1, -1, -1, 120, ! -1, 122, 123, -1, -1, 65, 4, 5, 6, 7, ! -1, 1170, 10, -1, 12, 75, 555, -1, -1, 140, ! 141, 142, -1, 83, -1, -1, -1, -1, 88, 27, ! -1, -1, 27, 31, -1, 1194, -1, 35, -1, -1, ! -1, -1, 1201, 1202, -1, 166, 1205, -1, -1, 44, ! -1, 1210, -1, 51, -1, 53, 3, 4, 5, 6, ! 7, -1, -1, 184, -1, 12, -1, -1, 607, 608, ! 609, -1, -1, 194, -1, -1, 615, -1, -1, -1, ! 27, -1, -1, -1, 31, -1, -1, -1, 35, -1, ! -1, -1, 631, 632, 41, 634, -1, 44, -1, -1, ! 95, -1, -1, -1, 51, -1, 53, -1, -1, 682, ! 1269, 1270, 1271, 108, 109, 110, -1, -1, 65, 692, ! 693, 694, -1, -1, 663, -1, -1, 122, 75, -1, ! -1, -1, -1, -1, -1, -1, 83, -1, 85, -1, ! -1, 88, 89, -1, -1, 140, 141, 142, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 697, -1, ! 3, 4, -1, -1, 285, 286, -1, -1, -1, -1, ! -1, 166, -1, -1, -1, -1, -1, 1336, -1, -1, ! -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, ! 7, -1, -1, 314, -1, 12, 317, -1, 41, -1, ! 773, 322, 775, -1, -1, -1, -1, -1, 51, -1, ! 53, -1, -1, 786, -1, -1, -1, 60, 35, -1, ! 341, -1, 65, -1, 41, -1, -1, 44, -1, -1, ! -1, -1, 75, -1, 51, -1, 53, 232, -1, -1, ! 83, 362, 363, 364, 365, 88, -1, -1, 65, 370, ! -1, 790, 791, 792, -1, 376, -1, 378, 75, 380, ! 381, 382, -1, -1, -1, -1, 83, 388, 85, -1, ! -1, 88, 89, 394, -1, -1, 397, -1, -1, -1, ! -1, -1, -1, 278, 279, 280, -1, -1, -1, -1, ! -1, 286, -1, -1, -1, 416, 417, -1, 419, -1, ! -1, -1, 841, 842, 843, 844, 845, 880, 847, -1, ! 849, 850, 851, 852, -1, -1, 3, 4, 5, 6, ! 7, -1, -1, -1, -1, 12, 68, 69, 70, 71, ! 72, 73, 74, 75, 76, 77, 78, 79, 877, -1, ! 27, 880, -1, 882, 31, -1, -1, -1, 35, -1, ! -1, -1, 925, 926, 41, 928, 895, 896, 897, -1, ! -1, -1, -1, -1, 51, -1, 53, 362, -1, 364, ! 365, 366, -1, 60, -1, -1, -1, -1, 65, -1, ! -1, 376, -1, 378, -1, 380, 381, 382, 75, 4, ! 5, 6, 7, 388, -1, 10, 83, 12, -1, 394, ! -1, 88, 397, 524, -1, -1, -1, -1, -1, -1, ! 949, -1, 27, -1, -1, -1, 31, -1, -1, 958, ! 35, 416, -1, -1, 140, 141, 142, -1, -1, 44, ! -1, -1, -1, -1, 555, -1, 51, -1, 53, -1, ! -1, -1, -1, 3, 4, -1, -1, 7, -1, -1, ! 65, 990, 991, 992, 3, 4, -1, -1, 7, -1, ! 75, -1, -1, -1, -1, 1004, 1005, 44, 1007, -1, ! 85, -1, -1, 88, 89, -1, -1, -1, 93, -1, ! -1, 41, -1, -1, -1, -1, 607, 608, 609, 66, ! -1, 51, 41, 53, 615, -1, 1035, -1, -1, -1, ! -1, -1, 51, -1, 53, 65, -1, 502, 85, -1, ! 631, 632, -1, 634, -1, 75, 65, -1, 95, 514, ! 515, -1, 517, 83, -1, -1, 75, -1, 88, 524, ! -1, -1, -1, -1, 83, -1, -1, -1, -1, 88, ! -1, -1, 663, -1, -1, 122, -1, -1, -1, -1, ! -1, -1, -1, 3, 4, -1, 6, 7, 8, 9, ! 555, 11, 12, 140, 141, 142, -1, -1, -1, 1108, ! -1, -1, -1, 150, -1, -1, 697, 27, 28, 29, ! 30, 31, -1, 33, -1, 35, -1, 37, 38, 166, ! 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, ! -1, -1, 607, 608, 609, -1, -1, -1, -1, 196, ! 615, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 81, 82, 83, 3, 4, 631, 632, 88, 634, ! -1, -1, 92, -1, 1183, 1184, 1185, -1, -1, -1, ! -1, -1, -1, -1, 104, -1, -1, -1, -1, -1, ! 376, -1, 378, -1, 380, 381, 382, -1, 663, 790, ! 791, 792, 41, -1, -1, -1, -1, 798, 394, -1, ! -1, -1, 51, -1, 53, -1, -1, 682, 1227, -1, ! -1, -1, -1, -1, -1, -1, 65, 692, 693, 694, ! 416, -1, 823, -1, -1, -1, 75, 284, -1, 286, ! -1, -1, -1, -1, 83, -1, -1, -1, -1, 88, ! 841, 842, 843, 844, 845, -1, -1, -1, 849, 850, ! 851, 852, -1, -1, -1, -1, -1, 4, -1, 6, ! 7, -1, -1, -1, -1, 12, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 877, -1, -1, 880, ! 27, 882, -1, -1, 31, -1, -1, -1, 35, -1, ! -1, -1, -1, -1, 895, 896, 897, 44, 773, -1, ! 775, -1, -1, -1, 51, 362, 53, 364, 365, -1, ! -1, 786, -1, -1, -1, 790, 791, 792, 65, 376, ! -1, 378, -1, 380, 381, 382, -1, -1, 75, -1, ! -1, 388, -1, -1, 278, 279, 280, 394, 85, -1, ! 397, 88, 89, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79, 958, -1, 416, ! -1, -1, -1, -1, -1, 4, 841, 842, 843, 844, ! 845, -1, -1, -1, 849, 850, 851, 852, -1, -1, ! -1, -1, -1, -1, -1, 24, 25, -1, -1, 990, ! 991, 992, 3, 4, 33, -1, 7, -1, -1, -1, ! -1, -1, 877, 1004, 1005, -1, 1007, 46, -1, -1, ! -1, 607, 608, 609, -1, -1, -1, -1, 362, 615, ! 364, 365, 366, 3, 4, -1, -1, 7, -1, -1, ! 41, -1, -1, -1, 1035, 631, 632, -1, 634, -1, ! 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, ! 925, 926, -1, 928, 65, -1, -1, -1, -1, -1, ! -1, 41, 101, -1, 75, -1, 105, 663, -1, -1, ! 527, 51, 83, 53, -1, -1, -1, 88, -1, -1, ! -1, 120, -1, -1, 123, 65, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 75, -1, -1, 555, -1, ! -1, 140, 141, 83, -1, -1, -1, 1108, 88, -1, ! -1, -1, -1, -1, -1, 990, -1, 992, -1, 3, ! 4, 278, 279, 280, -1, -1, -1, -1, -1, 1004, ! 1005, -1, 1007, -1, -1, -1, -1, -1, -1, -1, ! 3, 4, 5, 6, 7, 184, -1, -1, -1, 12, ! 607, 608, 609, -1, -1, 194, -1, 41, 615, -1, ! -1, -1, -1, -1, 27, -1, -1, 51, 31, 53, ! 514, 515, 35, 517, 631, 632, -1, 634, 41, -1, ! 524, 65, 1183, 1184, 1185, -1, -1, -1, 51, -1, ! 53, 75, -1, 56, -1, -1, -1, -1, -1, 83, ! -1, -1, 65, -1, 88, 362, 663, 364, 365, 366, ! -1, 555, 75, -1, -1, -1, -1, -1, -1, -1, ! 83, -1, -1, -1, -1, 88, 1227, -1, -1, -1, ! -1, -1, -1, 1108, -1, -1, -1, 10, -1, -1, ! -1, -1, -1, -1, -1, 841, 842, 843, 844, 845, ! -1, -1, -1, 849, 850, 851, 852, -1, -1, -1, ! -1, -1, -1, 607, 608, 609, -1, -1, -1, -1, ! -1, 615, -1, -1, -1, 314, -1, -1, 317, -1, ! -1, 877, -1, 322, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79, -1, 1183, 1184, ! 1185, 67, 68, 69, 70, 71, 72, 73, 74, 75, ! 76, 77, 78, 79, 363, -1, -1, -1, -1, -1, ! -1, 370, -1, -1, -1, -1, -1, 376, 682, 378, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 1227, -1, -1, 394, -1, 514, 515, 62, ! 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79, 416, 417, -1, ! 419, -1, -1, -1, 841, 842, 843, 844, 845, -1, ! 847, -1, 849, 850, 851, 852, -1, -1, 555, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 1004, 1005, ! -1, 1007, -1, -1, -1, -1, -1, -1, -1, -1, ! 877, -1, -1, -1, -1, -1, -1, -1, -1, 773, ! -1, 775, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 786, -1, -1, -1, 790, 791, 792, -1, ! 607, 608, -1, -1, 57, 58, 59, -1, 61, 62, ! 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79, 65, 66, 67, ! 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ! 78, 79, 949, -1, -1, -1, -1, 841, 842, 843, ! 844, 845, 105, -1, -1, 849, 850, 851, 852, -1, ! -1, -1, 1108, -1, 3, 4, 5, 6, 7, -1, ! -1, 10, -1, 12, -1, 682, -1, -1, -1, -1, ! -1, -1, -1, 990, -1, 992, -1, -1, 27, -1, ! -1, -1, 31, -1, -1, -1, 35, 1004, 1005, -1, ! 1007, -1, 41, -1, -1, 44, -1, -1, -1, -1, ! -1, -1, 51, -1, 53, -1, -1, -1, 607, 608, ! -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 75, 1183, 1184, 1185, ! -1, -1, 631, 632, 83, 634, 85, -1, -1, 88, ! 89, -1, -1, -1, 93, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 773, -1, 775, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 786, ! -1, -1, -1, 790, 791, 64, 65, 66, 67, 68, ! 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ! 79, 1108, -1, -1, -1, -1, -1, -1, -1, -1, ! 1004, 1005, -1, 1007, -1, -1, -1, -1, -1, -1, ! 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 841, 842, 843, 844, -1, -1, ! -1, -1, 849, 850, 851, 57, 58, 59, -1, 61, ! 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, ! 72, 73, 74, 75, 76, 77, 78, 79, -1, -1, ! -1, -1, -1, -1, -1, -1, 1183, 1184, 1185, -1, ! -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, ! 9, -1, 11, 12, 13, -1, 15, 16, 17, 18, ! 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ! 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! 1227, 40, 41, 42, 43, -1, -1, 46, 47, 48, ! 49, 50, 51, -1, 53, 54, -1, 56, -1, -1, ! -1, -1, -1, 62, -1, -1, 65, -1, -1, -1, ! -1, -1, 841, 842, 73, 74, 75, -1, -1, -1, ! 849, -1, 81, 82, 83, -1, -1, -1, -1, 88, ! -1, 90, -1, 92, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 103, 104, -1, -1, 877, -1, ! -1, 880, -1, 882, -1, -1, -1, 1004, 1005, -1, ! 1007, 1, -1, 3, 4, 5, 6, 7, 8, 9, ! -1, 11, 12, 13, -1, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, 54, -1, 56, -1, -1, -1, ! -1, -1, 62, -1, -1, 65, -1, -1, -1, 958, ! -1, -1, -1, 73, 74, 75, -1, -1, -1, -1, ! -1, 81, 82, 83, -1, -1, -1, -1, 88, -1, ! 90, -1, 92, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 991, 103, 104, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 1004, 1005, -1, 1007, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, ! 8, 9, -1, 11, 12, 13, 1035, 15, 16, 17, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, 54, -1, 56, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, -1, 90, -1, 92, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 1, -1, 3, ! 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, ! -1, 15, 16, 17, 18, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, ! -1, 35, -1, 37, 38, -1, 40, 41, 42, 43, ! -1, -1, 46, 47, 48, 49, 50, 51, -1, 53, ! 54, -1, 56, -1, -1, -1, -1, -1, 62, -1, ! -1, 65, -1, -1, -1, -1, -1, -1, -1, 73, ! 74, 75, -1, -1, -1, -1, -1, 81, 82, 83, ! -1, -1, -1, -1, 88, -1, 90, -1, 92, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 103, ! 104, 1, -1, 3, 4, 5, 6, 7, 8, 9, ! -1, 11, 12, 13, -1, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, 54, -1, 56, -1, -1, -1, ! -1, -1, 62, -1, -1, 65, -1, -1, -1, -1, ! -1, -1, -1, 73, 74, 75, -1, -1, -1, -1, ! -1, 81, 82, 83, -1, -1, -1, -1, 88, -1, ! 90, -1, 92, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 1, -1, 3, 4, 5, ! 6, 7, 8, 9, -1, 11, 12, 13, -1, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, 54, -1, ! 56, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, ! -1, -1, 88, -1, 90, 1, 92, 3, 4, 5, ! 6, 7, 8, 9, -1, 11, 12, 13, 104, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, 54, -1, ! 56, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, ! -1, -1, 88, -1, 90, 1, 92, 3, 4, 5, ! 6, 7, 8, 9, -1, 11, 12, 13, 104, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, 54, -1, ! 56, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, ! -1, -1, 88, -1, 90, 1, 92, 3, 4, 5, ! 6, 7, 8, 9, 10, 11, 12, -1, 104, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, 54, -1, ! -1, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, 85, ! -1, -1, 88, 89, -1, -1, 92, 93, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 1, 104, 3, ! 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, ! -1, 35, -1, 37, 38, -1, 40, 41, 42, 43, ! 44, -1, 46, 47, 48, 49, 50, 51, -1, 53, ! 54, -1, -1, -1, -1, -1, -1, -1, 62, -1, ! -1, 65, -1, -1, -1, -1, -1, -1, -1, 73, ! 74, 75, -1, -1, -1, -1, -1, 81, 82, 83, ! -1, 85, -1, -1, 88, 89, -1, -1, 92, 93, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, ! 104, 3, 4, 5, 6, 7, 8, 9, 10, 11, ! 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, ! 42, 43, -1, -1, 46, 47, 48, 49, 50, 51, ! -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, ! 62, -1, -1, 65, -1, -1, -1, -1, -1, -1, ! -1, 73, 74, 75, -1, -1, -1, -1, -1, 81, ! 82, 83, -1, -1, -1, -1, 88, -1, -1, -1, ! 92, 93, -1, -1, -1, -1, -1, -1, -1, -1, ! 102, 1, 104, 3, 4, 5, 6, 7, 8, 9, ! 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, ! -1, -1, 62, -1, -1, 65, -1, -1, -1, -1, ! -1, -1, -1, 73, 74, 75, -1, -1, -1, -1, ! -1, 81, 82, 83, -1, -1, -1, -1, 88, -1, ! -1, -1, 92, 93, -1, -1, -1, -1, -1, -1, ! -1, -1, 102, 1, 104, 3, 4, -1, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, 54, -1, -1, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, 89, -1, 1, 92, 3, 4, -1, 6, 7, ! 8, 9, -1, 11, 12, 103, 104, -1, -1, -1, ! -1, 19, -1, -1, -1, -1, -1, -1, -1, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, 54, -1, -1, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, -1, -1, 1, 92, 3, 4, -1, 6, 7, ! 8, 9, -1, 11, 12, 103, 104, -1, -1, -1, ! -1, 19, -1, -1, -1, -1, -1, -1, -1, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, 54, -1, -1, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, -1, -1, 1, 92, 3, 4, 5, 6, 7, ! 8, 9, -1, 11, 12, 103, 104, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, 54, -1, 56, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, -1, -1, 1, 92, 3, 4, -1, 6, 7, ! 8, 9, -1, 11, 12, -1, 104, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, 54, -1, -1, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, 89, 1, -1, 92, 4, -1, 6, 7, -1, ! -1, -1, -1, 12, -1, -1, 104, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, ! -1, -1, 31, -1, -1, -1, 35, -1, 37, 38, ! -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, ! -1, -1, 51, -1, 53, -1, 55, -1, 57, 58, ! 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, ! 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ! -1, -1, 81, 82, 83, -1, 1, 86, 3, 4, ! 89, 6, 7, 8, 9, -1, 11, 12, -1, -1, ! -1, -1, -1, -1, -1, 104, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, 54, ! -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, 1, 92, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, 54, ! -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, 1, 92, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, -1, ! -1, -1, -1, -1, -1, 60, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, 1, 92, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, 54, ! -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, 1, 92, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, 54, ! -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, 1, 92, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, -1, ! -1, 56, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, 1, 92, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, -1, ! -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, -1, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, -1, -1, 92, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 102, 1, 104, ! 3, 4, -1, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, ! 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, -1, 46, 47, 48, 49, 50, 51, -1, ! 53, -1, -1, -1, -1, -1, -1, -1, -1, 62, ! -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, ! 73, 74, 75, -1, -1, -1, -1, -1, 81, 82, ! 83, -1, -1, -1, -1, 88, -1, -1, 1, 92, ! 3, 4, -1, 6, 7, 8, 9, -1, 11, 12, ! -1, 104, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, ! 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, -1, 46, 47, 48, 49, 50, 51, -1, ! 53, -1, -1, -1, -1, -1, -1, -1, -1, 62, ! -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, ! 73, 74, 75, -1, -1, -1, -1, -1, 81, 82, ! 83, -1, -1, -1, -1, 88, -1, 3, 4, 92, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, ! -1, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, -1, -1, ! -1, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, ! -1, -1, 88, -1, -1, -1, 92, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, -1, 15, 16, 17, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, -1, 46, 47, 48, 49, 50, 51, -1, ! 53, 54, -1, 56, -1, -1, -1, -1, -1, 62, ! -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, ! 73, 74, 75, -1, -1, -1, -1, -1, 81, 82, ! 83, -1, -1, -1, -1, 88, -1, 90, -1, 92, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 103, 104, 3, 4, 5, 6, 7, 8, 9, -1, ! 11, 12, 13, -1, 15, 16, 17, 18, 19, 20, ! 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, ! 51, -1, 53, 54, -1, 56, -1, -1, -1, -1, ! -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, ! -1, -1, 73, 74, 75, -1, -1, -1, -1, -1, ! 81, 82, 83, -1, -1, -1, -1, 88, -1, 90, ! -1, 92, 3, 4, 5, 6, 7, 8, 9, -1, ! 11, 12, 13, 104, 15, 16, 17, 18, 19, 20, ! 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, ! 51, -1, 53, 54, -1, 56, -1, -1, -1, -1, ! -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, ! -1, -1, 73, 74, 75, -1, -1, -1, -1, -1, ! 81, 82, 83, -1, -1, -1, -1, 88, -1, 90, ! -1, 92, 3, 4, 5, 6, 7, 8, 9, -1, ! 11, 12, 13, 104, 15, 16, 17, 18, 19, 20, ! 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, ! 51, -1, 53, -1, -1, 56, -1, -1, -1, -1, ! -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, ! -1, -1, 73, 74, 75, -1, -1, -1, -1, -1, ! 81, 82, 83, -1, -1, -1, -1, 88, -1, 90, ! -1, 92, 3, 4, 5, 6, 7, 8, 9, 10, ! 11, 12, -1, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, 44, -1, 46, 47, 48, 49, 50, ! 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, ! -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, ! -1, -1, 73, 74, 75, -1, -1, -1, -1, -1, ! 81, 82, 83, -1, 85, -1, -1, 88, 89, -1, ! -1, 92, 93, 3, 4, 5, 6, 7, 8, 9, ! 10, 11, 12, 104, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, 44, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, ! -1, -1, 62, -1, -1, 65, -1, -1, -1, -1, ! -1, -1, -1, 73, 74, 75, -1, -1, -1, -1, ! -1, 81, 82, 83, -1, 85, -1, -1, 88, 89, ! -1, -1, 92, 93, 3, 4, -1, 6, 7, 8, ! 9, -1, 11, 12, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! -1, 40, 41, 42, 43, 44, -1, 46, 47, 48, ! 49, 50, 51, -1, 53, -1, -1, -1, -1, -1, ! -1, -1, -1, 62, -1, -1, 65, -1, -1, -1, ! -1, -1, -1, -1, 73, 74, 75, -1, -1, -1, ! -1, -1, 81, 82, 83, -1, 85, -1, -1, 88, ! 89, 3, 4, -1, 6, 7, 8, 9, -1, 11, ! 12, -1, -1, -1, -1, 104, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, ! -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, ! 42, 43, 44, -1, 46, 47, 48, 49, 50, 51, ! -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, ! 62, -1, -1, 65, -1, -1, -1, -1, -1, -1, ! -1, 73, 74, 75, -1, -1, -1, -1, -1, 81, ! 82, 83, -1, 85, -1, -1, 88, 89, 3, 4, ! -1, 6, 7, 8, 9, -1, 11, 12, -1, -1, ! -1, -1, 104, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! -1, 46, 47, 48, 49, 50, 51, -1, 53, -1, ! -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, ! 65, -1, -1, -1, -1, 70, -1, -1, 73, 74, ! 75, -1, -1, -1, -1, -1, 81, 82, 83, -1, ! -1, -1, -1, 88, -1, 3, 4, 92, 6, 7, ! 8, 9, -1, 11, 12, -1, -1, -1, -1, 104, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, ! 48, 49, 50, 51, -1, 53, -1, -1, 56, -1, ! -1, -1, -1, -1, 62, -1, -1, 65, -1, -1, ! -1, -1, -1, -1, -1, 73, 74, 75, -1, -1, ! -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, ! 88, -1, 3, 4, 92, 6, 7, 8, 9, -1, ! 11, 12, -1, -1, -1, -1, 104, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, ! 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, ! 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, ! -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, ! -1, -1, 73, 74, 75, -1, -1, -1, -1, -1, ! 81, 82, 83, -1, -1, -1, -1, 88, -1, 3, ! 4, 92, 6, 7, 8, 9, -1, 11, 12, -1, ! -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, ! -1, 35, -1, 37, 38, -1, 40, 41, 42, 43, ! -1, -1, 46, 47, 48, 49, 50, 51, -1, 53, ! 54, -1, -1, -1, -1, -1, -1, -1, 62, -1, ! -1, 65, -1, -1, -1, -1, -1, -1, -1, 73, ! 74, 75, -1, -1, -1, -1, -1, 81, 82, 83, ! -1, -1, 3, 4, 88, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, ! 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, ! -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, ! -1, -1, 73, 74, 75, -1, -1, -1, -1, -1, ! 81, 82, 83, -1, -1, -1, -1, 88, 89, 3, ! 4, -1, 6, 7, 8, 9, -1, 11, 12, -1, ! -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, ! -1, 35, -1, 37, 38, -1, 40, 41, 42, 43, ! -1, -1, 46, 47, 48, 49, 50, 51, -1, 53, ! -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, ! -1, 65, -1, -1, -1, -1, -1, -1, -1, 73, ! 74, 75, -1, -1, -1, -1, -1, 81, 82, 83, ! -1, -1, -1, -1, 88, -1, 3, 4, 92, 6, ! 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, ! 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, ! 37, 38, -1, 40, 41, 42, 43, -1, -1, 46, ! 47, 48, 49, 50, 51, -1, 53, -1, -1, -1, ! -1, -1, -1, -1, -1, 62, -1, -1, 65, -1, ! -1, -1, -1, -1, -1, -1, 73, 74, 75, -1, ! -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, ! -1, 88, -1, 3, 4, 92, 6, 7, 8, 9, ! -1, 11, 12, -1, -1, -1, -1, 104, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, ! -1, -1, 62, -1, -1, 65, -1, -1, -1, -1, ! -1, -1, -1, 73, 74, 75, -1, -1, -1, -1, ! -1, 81, 82, 83, -1, -1, -1, -1, 88, -1, ! 3, 4, 92, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, -1, 46, 47, 48, 49, 50, 51, -1, ! 53, -1, -1, -1, -1, -1, -1, -1, -1, 62, ! -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, ! 73, 74, 75, -1, -1, -1, -1, -1, 81, 82, ! 83, -1, -1, -1, -1, 88, -1, 3, 4, 92, ! 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, ! -1, 104, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, -1, -1, ! -1, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, ! -1, -1, 88, -1, 3, 4, 92, 6, 7, 8, ! 9, -1, 11, 12, -1, -1, -1, -1, 104, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, ! 49, 50, 51, -1, 53, -1, -1, -1, -1, -1, ! -1, -1, -1, 62, -1, -1, 65, -1, -1, -1, ! -1, -1, -1, -1, 73, 74, 75, -1, -1, -1, ! -1, -1, 81, 82, 83, -1, -1, 3, 4, 88, ! 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, ! -1, -1, -1, -1, -1, 104, -1, -1, -1, -1, ! -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, -1, ! 46, 47, 48, 49, 50, 51, -1, 53, -1, -1, ! -1, -1, -1, -1, -1, -1, 62, -1, -1, 65, ! -1, -1, -1, -1, -1, -1, -1, 73, 74, 75, ! -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, ! 3, 4, 88, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, -1, 46, 47, 48, 49, 50, 51, -1, ! 53, -1, -1, -1, -1, -1, -1, -1, -1, 62, ! -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, ! 73, 74, 75, -1, -1, -1, -1, -1, 81, 82, ! 83, -1, -1, 3, 4, 88, 6, 7, 8, 9, ! -1, 11, 12, -1, -1, -1, -1, -1, -1, -1, ! -1, 104, -1, -1, -1, -1, -1, 27, 28, -1, ! -1, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, ! 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, ! -1, -1, 62, -1, -1, 65, -1, -1, -1, -1, ! -1, -1, -1, 73, 74, 75, -1, -1, -1, -1, ! -1, 81, 82, 83, -1, -1, 3, 4, 88, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, -1, -1, -1, -1, -1, ! 27, 28, -1, -1, 31, -1, 33, -1, 35, -1, ! 37, 38, -1, 40, 41, 42, 43, -1, -1, 46, ! 47, 48, 49, 50, 51, -1, 53, -1, -1, -1, ! -1, -1, -1, -1, -1, 62, -1, -1, 65, -1, ! -1, -1, -1, -1, -1, -1, 73, 74, 75, -1, ! -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, ! -1, 88, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 55, -1, 57, 58, 59, 104, 61, 62, ! 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79, 57, 58, 59, ! 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, ! 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, ! 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, ! 77, 78, 79, 57, 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ! 74, 75, 76, 77, 78, 79, 57, 58, 59, -1, ! 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, ! 71, 72, 73, 74, 75, 76, 77, 78, 79, 59, ! -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ --- 662,3116 ---- "RETURN","GOTO","ASM_KEYWORD","GCC_ASM_KEYWORD","TYPEOF","ALIGNOF","HEADOF", "CLASSOF","SIGOF","ATTRIBUTE","EXTENSION","LABEL","AGGR","VISSPEC","DELETE", ! "NEW","OVERLOAD","THIS","OPERATOR","CXX_TRUE","CXX_FALSE","NAMESPACE","TYPENAME_KEYWORD", ! "USING","LEFT_RIGHT","TEMPLATE","TYPEID","DYNAMIC_CAST","STATIC_CAST","REINTERPRET_CAST", ! "CONST_CAST","SCOPE","EMPTY","PTYPENAME","NSNAME","'{'","','","';'","THROW", ! "':'","ASSIGN","'='","'?'","OROR","ANDAND","'|'","'^'","'&'","MIN_MAX","EQCOMPARE", ! "ARITHCOMPARE","'<'","'>'","LSHIFT","RSHIFT","'+'","'-'","'*'","'/'","'%'","POINTSAT_STAR", ! "DOT_STAR","UNARY","PLUSPLUS","MINUSMINUS","'~'","HYPERUNARY","PAREN_STAR_PAREN", ! "POINTSAT","'.'","'('","'['","TRY","CATCH","TYPENAME_ELLIPSIS","PRE_PARSED_FUNCTION_DECL", ! "EXTERN_LANG_STRING","ALL","PRE_PARSED_CLASS_DECL","TYPENAME_DEFN","IDENTIFIER_DEFN", ! "PTYPENAME_DEFN","END_OF_LINE","END_OF_SAVED_INPUT","')'","'}'","'!'","']'", ! "program","extdefs","@1","extdefs_opt",".hush_warning",".warning_ok","asm_keyword", ! "lang_extdef","@2","extdef","@3","@4","using_decl","any_id","extern_lang_string", ! "template_header","@5","template_parm_list","template_type_parm","template_parm", ! "overloaddef","ov_identifiers","template_def","@6","@7","@8","@9","fn_tmpl_end", "datadef","fndef","fn.def1","fn.def2","return_id","return_init","base_init", ".set_base_init","member_init_list","member_init","identifier","notype_identifier", "identifier_defn","explicit_instantiation","template_type","template_type_name", ! "tmpl.2","template_arg_list","template_arg","template_instantiate_once","@10", "template_instantiation","template_instantiate_some","unop","expr","paren_expr_or_null", ! "paren_cond_or_null","xcond","condition","@11","compstmtend","already_scoped_stmt", ! "nontrivial_exprlist","nonnull_exprlist","unary_expr","@12","new_placement", ! "new_initializer","regcast_or_absdcl","cast_expr","sub_cast_expr","expr_no_commas", ! "notype_unqualified_id","unqualified_id","expr_or_declarator","direct_notype_declarator", ! "primary","@13","@14","new","delete","boolean.literal","string","nodecls","object", ! "setattrs","decl","declarator","fcast_or_absdcl","type_id","typed_declspecs", ! "typed_declspecs1","reserved_declspecs","declmods","typed_typespecs","reserved_typespecquals", ! "typespec","typespecqual_reserved","initdecls","notype_initdecls","nomods_initdecls", ! "maybeasm","initdcl0","@15","initdcl","@16","notype_initdcl0","@17","nomods_initdcl0", ! "@18","maybe_attribute","attributes","attribute","attribute_list","attrib","any_word", ! "identifiers_or_typenames","maybe_init","init","initlist","structsp","@19","@20", ! "maybecomma","maybecomma_warn","aggr","specialization","named_class_head_sans_basetype", ! "named_class_head_sans_basetype_defn","do_xref_defn","named_class_head","unnamed_class_head", ! "class_head","maybe_base_class_list","base_class_list","base_class","base_class.1", ! "base_class_access_list","left_curly","opt.component_decl_list","component_decl_list", ! "component_decl","component_decl_1","components","notype_components","component_declarator0", "component_declarator","after_type_component_declarator0","notype_component_declarator0", "after_type_component_declarator","notype_component_declarator","enumlist","enumerator", ! "new_type_id","type_quals","nonempty_type_quals","suspend_mom","nonmomentary_expr", ! "maybe_parmlist","after_type_declarator","qualified_type_name","nested_type", ! "direct_after_type_declarator","notype_declarator","complex_notype_declarator", ! "complex_direct_notype_declarator","qualified_id","notype_qualified_id","overqualified_id", ! "functional_cast","type_name","nested_name_specifier","nested_name_specifier_1", ! "complete_type_name","complex_type_name","ptr_to_mem","global_scope","new_declarator", ! "direct_new_declarator","absdcl","direct_abstract_declarator","stmts","errstmt", ! ".pushlevel",".poplevel","maybe_label_decls","label_decls","label_decl","compstmt_or_error", ! "compstmt","simple_if","@21","@22","implicitly_scoped_stmt","stmt","simple_stmt", ! "@23","@24","@25","@26","@27","@28","@29","@30","@31","@32","@33","@34","@35", ! "@36","@37","try_block","@38","@39","handler_seq","@40","type_specifier_seq", ! "handler_args","label_colon","for.init.statement","maybe_type_qual","xexpr", ! "asm_operands","nonnull_asm_operands","asm_operand","asm_clobbers","parmlist", ! "complex_parmlist","parms","parms_comma","named_parm","full_parm","parm","see_typename", ! "bad_parm","exception_specification_opt","ansi_raise_identifier","ansi_raise_identifiers", ! "conversion_declarator","operator","operator_name","" }; #endif static const short yyr1[] = { 0, ! 111, 111, 113, 112, 112, 114, 114, 115, 116, 117, ! 117, 119, 118, 120, 120, 120, 120, 120, 120, 120, ! 120, 121, 120, 122, 120, 120, 120, 120, 123, 123, ! 123, 124, 124, 124, 124, 125, 125, 127, 126, 128, ! 128, 129, 129, 130, 130, 130, 131, 132, 132, 134, ! 133, 135, 133, 136, 133, 137, 133, 133, 133, 133, ! 133, 133, 133, 133, 138, 138, 138, 138, 138, 139, ! 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, ! 140, 140, 140, 140, 140, 140, 140, 140, 141, 141, ! 141, 141, 142, 142, 142, 142, 142, 143, 144, 144, ! 144, 145, 146, 147, 147, 147, 147, 148, 148, 148, ! 148, 148, 148, 148, 148, 149, 149, 149, 149, 150, ! 150, 150, 151, 151, 151, 152, 152, 152, 152, 153, ! 154, 154, 154, 155, 156, 156, 157, 157, 159, 158, ! 160, 160, 161, 161, 162, 162, 162, 162, 162, 163, ! 163, 164, 164, 165, 165, 166, 166, 166, 168, 167, ! 167, 169, 169, 169, 169, 170, 170, 171, 171, 171, ! 171, 172, 172, 173, 174, 173, 173, 173, 173, 173, ! 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, ! 173, 173, 173, 173, 173, 173, 175, 175, 176, 176, ! 176, 176, 177, 177, 178, 178, 178, 179, 179, 179, ! 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, ! 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, ! 180, 180, 180, 180, 180, 180, 181, 181, 181, 181, ! 181, 182, 182, 183, 183, 183, 183, 184, 184, 184, ! 185, 185, 185, 185, 185, 185, 185, 186, 185, 187, ! 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, ! 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, ! 185, 185, 185, 185, 185, 185, 185, 185, 188, 188, ! 189, 189, 190, 190, 191, 191, 192, 193, 193, 194, ! 195, 195, 195, 195, 195, 195, 195, 196, 196, 197, ! 197, 198, 198, 198, 198, 198, 199, 199, 200, 200, ! 200, 200, 200, 200, 201, 201, 201, 201, 201, 202, ! 202, 202, 202, 202, 202, 203, 203, 203, 203, 204, ! 204, 205, 205, 205, 205, 205, 205, 205, 206, 206, ! 206, 207, 207, 208, 208, 209, 209, 210, 210, 212, ! 211, 211, 214, 213, 213, 216, 215, 215, 218, 217, ! 217, 219, 219, 220, 220, 221, 222, 222, 223, 223, ! 223, 223, 223, 224, 224, 224, 224, 225, 225, 226, ! 226, 227, 227, 227, 227, 227, 228, 228, 228, 228, ! 228, 228, 230, 229, 229, 231, 229, 229, 229, 229, ! 229, 229, 229, 232, 232, 233, 233, 234, 234, 234, 234, 234, 235, 236, 236, 236, 236, 237, 237, 237, ! 238, 239, 239, 240, 241, 241, 242, 242, 242, 243, ! 243, 244, 244, 245, 245, 245, 246, 246, 246, 246, ! 247, 248, 248, 248, 248, 249, 249, 250, 250, 250, ! 250, 250, 251, 251, 251, 251, 251, 251, 251, 251, ! 252, 252, 252, 253, 253, 253, 254, 254, 255, 255, ! 256, 256, 257, 257, 257, 258, 258, 259, 259, 259, ! 260, 260, 261, 261, 262, 262, 262, 263, 263, 264, ! 264, 265, 266, 267, 267, 267, 267, 268, 268, 268, ! 268, 268, 268, 269, 269, 270, 271, 271, 271, 271, ! 271, 271, 272, 272, 272, 272, 272, 272, 273, 273, ! 273, 273, 273, 273, 274, 274, 274, 274, 274, 275, ! 276, 277, 277, 278, 278, 278, 279, 279, 280, 280, ! 281, 281, 281, 282, 282, 283, 283, 284, 284, 285, ! 286, 286, 286, 286, 286, 286, 286, 287, 287, 288, ! 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, ! 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, ! 289, 290, 290, 290, 290, 291, 292, 293, 294, 294, ! 295, 295, 296, 297, 297, 298, 300, 301, 299, 302, ! 302, 303, 303, 304, 304, 305, 306, 304, 304, 307, ! 308, 304, 309, 310, 304, 311, 312, 313, 314, 304, ! 315, 316, 304, 317, 304, 318, 304, 319, 304, 304, ! 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, ! 304, 304, 304, 321, 322, 320, 323, 324, 323, 325, ! 325, 326, 326, 327, 327, 327, 328, 328, 328, 329, ! 329, 330, 330, 330, 331, 331, 332, 332, 333, 334, ! 334, 335, 335, 335, 336, 336, 336, 336, 336, 336, ! 336, 336, 336, 336, 337, 337, 337, 337, 337, 338, ! 338, 339, 339, 339, 339, 339, 339, 340, 341, 341, ! 342, 343, 343, 344, 344, 344, 345, 346, 346, 347, ! 347, 347, 347, 348, 349, 349, 349, 349, 349, 349, ! 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, ! 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, ! 349, 349, 349, 349, 349, 349, 349, 349, 349 }; static const short yyr2[] = { 0, ! 0, 1, 0, 2, 2, 1, 0, 0, 0, 1, ! 1, 0, 2, 1, 1, 1, 1, 5, 4, 4, ! 4, 0, 6, 0, 5, 5, 2, 4, 2, 3, ! 3, 1, 1, 2, 2, 1, 2, 0, 5, 1, ! 3, 1, 2, 1, 3, 1, 3, 1, 3, 0, ! 5, 0, 5, 0, 5, 0, 5, 3, 3, 6, ! 7, 4, 3, 3, 1, 1, 1, 1, 1, 2, ! 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, ! 3, 4, 3, 5, 4, 3, 3, 2, 3, 3, ! 2, 1, 6, 4, 3, 3, 2, 2, 2, 4, ! 2, 3, 0, 0, 1, 3, 2, 3, 1, 4, ! 2, 4, 2, 4, 2, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 3, 3, 4, 4, 3, ! 4, 3, 4, 0, 1, 3, 1, 1, 0, 6, ! 0, 1, 0, 2, 1, 1, 1, 1, 1, 1, ! 1, 1, 3, 1, 3, 0, 1, 1, 0, 8, ! 1, 1, 3, 4, 3, 2, 1, 3, 3, 3, ! 3, 1, 1, 1, 0, 3, 2, 2, 2, 2, ! 2, 2, 4, 2, 4, 2, 3, 3, 4, 4, ! 5, 5, 6, 2, 4, 5, 3, 3, 3, 1, ! 3, 2, 3, 4, 1, 2, 5, 1, 4, 4, ! 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ! 3, 5, 3, 3, 1, 2, 3, 1, 1, 1, ! 1, 1, 1, 1, 2, 2, 3, 1, 1, 3, ! 1, 1, 1, 1, 3, 3, 3, 0, 4, 0, ! 6, 2, 4, 2, 2, 1, 4, 1, 7, 7, ! 7, 7, 4, 4, 2, 2, 1, 4, 2, 2, ! 2, 5, 3, 5, 3, 4, 6, 2, 1, 2, ! 1, 2, 1, 1, 1, 2, 0, 2, 2, 0, ! 3, 3, 3, 3, 3, 2, 2, 1, 1, 1, ! 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, ! 3, 3, 3, 4, 1, 2, 2, 3, 2, 1, ! 1, 2, 2, 3, 2, 1, 2, 2, 3, 1, ! 2, 1, 1, 1, 4, 4, 4, 4, 1, 1, ! 1, 1, 3, 1, 3, 1, 3, 0, 4, 0, ! 7, 4, 0, 7, 4, 0, 7, 4, 0, 7, ! 4, 0, 1, 1, 2, 6, 1, 3, 0, 1, ! 4, 6, 4, 1, 1, 1, 1, 1, 3, 0, ! 2, 1, 2, 3, 4, 1, 1, 3, 4, 6, ! 3, 5, 0, 7, 4, 0, 6, 3, 2, 2, ! 2, 4, 1, 0, 1, 0, 1, 1, 2, 2, ! 2, 2, 3, 2, 2, 2, 1, 2, 3, 3, ! 0, 1, 3, 2, 1, 1, 0, 1, 2, 1, ! 3, 1, 2, 1, 4, 4, 1, 1, 2, 2, ! 1, 0, 1, 4, 3, 1, 2, 2, 2, 2, ! 2, 1, 2, 2, 5, 2, 1, 9, 7, 1, ! 0, 1, 3, 0, 1, 3, 1, 1, 1, 1, ! 5, 4, 5, 4, 3, 5, 4, 5, 4, 3, ! 1, 3, 1, 3, 2, 1, 6, 0, 2, 1, ! 2, 0, 2, 4, 4, 2, 4, 3, 3, 2, ! 2, 3, 1, 1, 1, 2, 3, 4, 3, 3, ! 2, 1, 3, 3, 2, 2, 3, 1, 3, 3, ! 2, 2, 3, 1, 3, 3, 4, 3, 1, 2, ! 2, 1, 2, 4, 4, 2, 1, 1, 1, 2, ! 2, 2, 2, 1, 2, 1, 2, 2, 3, 1, ! 3, 2, 3, 2, 2, 3, 1, 3, 4, 3, ! 2, 2, 1, 3, 2, 2, 1, 2, 3, 1, ! 3, 1, 5, 3, 4, 3, 4, 2, 2, 3, ! 2, 1, 1, 2, 2, 2, 0, 0, 0, 1, ! 1, 2, 3, 1, 2, 4, 0, 0, 6, 1, ! 3, 1, 1, 1, 2, 0, 0, 6, 1, 0, ! 0, 7, 0, 0, 7, 0, 0, 0, 0, 14, ! 0, 0, 9, 0, 5, 0, 7, 0, 4, 2, ! 2, 2, 3, 6, 8, 10, 12, 4, 3, 2, ! 2, 1, 1, 0, 0, 5, 0, 0, 7, 1, ! 1, 3, 3, 2, 2, 2, 2, 1, 2, 0, ! 1, 0, 1, 1, 0, 1, 1, 3, 4, 1, ! 3, 0, 1, 1, 1, 2, 2, 2, 1, 1, ! 2, 2, 2, 2, 1, 3, 2, 2, 4, 2, ! 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, ! 0, 0, 1, 0, 4, 2, 1, 1, 3, 0, ! 3, 3, 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, ! 2, 2, 3, 2, 2, 4, 4, 3, 2 }; static const short yydefact[] = { 3, ! 12, 12, 5, 0, 4, 0, 239, 547, 331, 343, ! 500, 0, 10, 11, 0, 0, 0, 418, 0, 724, ! 0, 0, 0, 0, 560, 240, 241, 80, 0, 0, ! 711, 0, 92, 36, 0, 13, 0, 8, 0, 17, ! 16, 15, 14, 297, 0, 548, 134, 249, 528, 0, ! 318, 0, 317, 336, 0, 356, 300, 374, 342, 0, ! 427, 432, 431, 436, 435, 413, 330, 554, 515, 0, ! 248, 539, 514, 0, 549, 344, 498, 0, 0, 238, ! 78, 79, 551, 0, 0, 116, 117, 118, 119, 406, ! 409, 0, 556, 0, 410, 0, 0, 0, 0, 48, ! 0, 117, 118, 119, 24, 0, 0, 0, 0, 411, ! 0, 29, 0, 0, 331, 38, 0, 0, 427, 0, ! 0, 552, 0, 526, 0, 0, 0, 525, 0, 0, ! 0, 0, 249, 0, 502, 0, 248, 498, 0, 27, ! 3, 37, 0, 0, 0, 0, 432, 431, 714, 0, ! 103, 390, 297, 0, 0, 76, 553, 141, 502, 0, ! 498, 77, 0, 0, 0, 0, 0, 352, 308, 513, ! 309, 522, 0, 498, 333, 332, 75, 319, 0, 354, ! 300, 0, 325, 349, 350, 320, 338, 340, 300, 351, ! 0, 70, 335, 375, 419, 420, 421, 422, 434, 124, ! 123, 125, 424, 428, 426, 134, 425, 437, 451, 0, ! 501, 337, 88, 0, 91, 558, 541, 516, 550, 0, ! 555, 0, 759, 755, 754, 752, 734, 739, 740, 0, ! 746, 745, 731, 732, 730, 749, 738, 735, 736, 737, ! 741, 742, 728, 729, 725, 726, 727, 751, 743, 744, ! 733, 750, 0, 747, 660, 336, 661, 720, 500, 252, ! 295, 0, 0, 0, 0, 175, 291, 289, 266, 293, ! 294, 0, 0, 0, 0, 0, 235, 0, 0, 146, ! 145, 0, 147, 148, 0, 0, 149, 0, 135, 0, ! 208, 0, 212, 205, 138, 251, 174, 0, 0, 253, ! 254, 0, 137, 315, 336, 316, 542, 277, 268, 0, ! 0, 0, 427, 408, 0, 403, 557, 0, 150, 151, ! 0, 0, 0, 379, 0, 47, 3, 22, 0, 243, ! 0, 242, 32, 33, 0, 540, 31, 30, 0, 127, ! 437, 142, 126, 132, 0, 524, 0, 523, 237, 246, ! 0, 532, 245, 0, 531, 0, 250, 536, 0, 0, ! 12, 0, 0, 9, 9, 64, 63, 714, 0, 50, ! 58, 54, 52, 59, 56, 358, 98, 104, 101, 0, ! 0, 99, 297, 0, 0, 0, 597, 81, 604, 83, ! 130, 538, 0, 0, 506, 0, 535, 0, 511, 0, ! 510, 0, 0, 0, 0, 498, 86, 74, 89, 0, ! 73, 502, 498, 521, 0, 322, 323, 0, 71, 334, ! 87, 72, 90, 327, 326, 300, 321, 341, 329, 714, ! 357, 429, 423, 430, 438, 433, 467, 0, 462, 0, ! 470, 0, 471, 474, 0, 0, 456, 0, 714, 339, ! 716, 0, 0, 372, 499, 527, 559, 0, 0, 748, ! 753, 338, 498, 498, 0, 498, 758, 0, 0, 0, ! 182, 0, 0, 184, 0, 0, 0, 0, 0, 0, ! 0, 0, 236, 181, 178, 177, 179, 0, 0, 0, ! 0, 0, 251, 0, 0, 0, 0, 133, 180, 0, ! 0, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 262, 264, 265, 299, 298, 0, ! 0, 0, 0, 0, 186, 496, 0, 194, 296, 288, ! 0, 711, 280, 281, 0, 0, 310, 577, 573, 582, ! 0, 502, 498, 498, 498, 312, 580, 0, 546, 314, ! 0, 313, 279, 0, 275, 290, 292, 543, 0, 276, ! 129, 128, 493, 416, 491, 405, 0, 345, 0, 0, ! 346, 347, 348, 385, 386, 387, 384, 0, 377, 380, ! 49, 0, 3, 0, 28, 35, 34, 0, 44, 40, ! 710, 706, 0, 315, 336, 42, 316, 709, 46, 390, ! 139, 131, 530, 529, 250, 533, 0, 19, 21, 20, ! 358, 69, 65, 67, 66, 68, 62, 0, 0, 0, ! 0, 372, 120, 109, 121, 122, 0, 102, 105, 0, ! 0, 0, 396, 0, 392, 391, 173, 0, 172, 0, ! 82, 85, 605, 599, 503, 537, 0, 689, 690, 0, ! 684, 336, 0, 683, 685, 712, 695, 0, 509, 508, ! 0, 0, 520, 0, 372, 353, 519, 0, 517, 512, ! 324, 355, 372, 328, 358, 448, 0, 447, 439, 440, ! 442, 0, 444, 466, 461, 460, 239, 547, 498, 0, ! 682, 714, 463, 472, 477, 478, 714, 714, 464, 475, ! 714, 0, 412, 457, 458, 459, 358, 717, 336, 718, ! 0, 0, 371, 373, 757, 756, 720, 720, 720, 0, ! 0, 0, 546, 0, 0, 547, 0, 176, 0, 0, ! 0, 0, 0, 0, 257, 0, 255, 256, 0, 203, ! 136, 239, 547, 240, 241, 0, 0, 397, 414, 0, ! 234, 233, 674, 673, 0, 231, 230, 228, 229, 227, ! 226, 225, 222, 223, 224, 220, 221, 215, 216, 217, ! 218, 219, 213, 214, 0, 0, 0, 0, 0, 0, ! 188, 200, 0, 0, 187, 498, 498, 0, 498, 495, ! 567, 0, 0, 0, 0, 283, 0, 285, 0, 576, ! 575, 572, 571, 710, 0, 0, 591, 0, 0, 588, ! 311, 589, 578, 498, 682, 502, 577, 573, 0, 0, ! 498, 0, 0, 0, 0, 417, 0, 416, 171, 170, ! 169, 168, 379, 0, 0, 25, 0, 26, 0, 39, ! 0, 577, 573, 0, 702, 498, 705, 707, 703, 704, ! 424, 708, 0, 18, 372, 51, 55, 53, 57, 0, ! 0, 107, 0, 111, 0, 115, 0, 113, 0, 393, ! 0, 100, 84, 0, 162, 598, 0, 600, 601, 507, ! 504, 688, 701, 694, 692, 0, 505, 687, 700, 693, ! 691, 686, 713, 697, 698, 0, 362, 518, 368, 372, ! 0, 0, 450, 449, 443, 0, 0, 714, 372, 514, ! 0, 0, 95, 0, 358, 358, 0, 358, 0, 372, ! 0, 715, 0, 369, 722, 721, 723, 267, 183, 185, ! 209, 211, 210, 273, 274, 0, 0, 0, 0, 256, ! 259, 0, 0, 0, 0, 204, 0, 260, 263, 198, ! 197, 190, 0, 189, 202, 0, 0, 564, 562, 0, ! 565, 502, 195, 0, 0, 286, 0, 0, 574, 570, ! 581, 498, 590, 579, 584, 0, 586, 0, 544, 545, ! 0, 278, 494, 492, 407, 0, 378, 376, 239, 0, ! 23, 41, 45, 576, 572, 577, 573, 0, 498, 578, ! 0, 0, 60, 108, 106, 0, 0, 0, 0, 394, ! 388, 0, 606, 0, 239, 547, 607, 620, 623, 626, ! 597, 0, 0, 0, 0, 0, 0, 240, 652, 654, ! 670, 0, 614, 0, 0, 336, 0, 593, 612, 619, ! 592, 613, 653, 0, 602, 577, 573, 0, 251, 0, ! 542, 0, 696, 360, 366, 365, 0, 0, 441, 372, ! 372, 358, 485, 516, 498, 239, 547, 0, 473, 479, ! 480, 714, 714, 372, 372, 476, 0, 390, 719, 359, ! 0, 0, 0, 0, 0, 0, 401, 0, 0, 398, ! 207, 232, 143, 0, 191, 192, 199, 201, 563, 561, ! 568, 566, 0, 196, 0, 282, 284, 587, 498, 585, ! 404, 0, 381, 383, 576, 572, 578, 0, 61, 110, ! 114, 112, 395, 0, 603, 596, 165, 664, 666, 597, ! 597, 597, 0, 0, 0, 638, 640, 641, 642, 0, ! 0, 0, 665, 0, 671, 0, 615, 306, 714, 0, ! 307, 0, 714, 0, 714, 0, 0, 163, 595, 594, ! 616, 651, 650, 0, 545, 699, 0, 0, 363, 445, ! 446, 484, 482, 372, 714, 0, 0, 372, 358, 358, ! 390, 390, 465, 370, 0, 0, 0, 0, 399, 0, ! 0, 143, 261, 0, 193, 569, 287, 583, 0, 140, ! 389, 0, 0, 0, 610, 0, 0, 0, 0, 634, ! 0, 643, 0, 649, 655, 0, 302, 358, 304, 305, ! 358, 0, 0, 0, 301, 303, 164, 597, 256, 361, ! 367, 0, 390, 358, 372, 372, 490, 372, 372, 481, ! 483, 269, 270, 271, 272, 0, 402, 144, 497, 382, ! 154, 0, 608, 621, 598, 624, 599, 668, 627, 0, ! 161, 0, 336, 0, 0, 0, 639, 648, 657, 0, ! 617, 364, 469, 372, 489, 487, 390, 390, 400, 0, ! 597, 0, 611, 0, 669, 597, 667, 631, 714, 636, ! 635, 656, 675, 0, 598, 390, 486, 488, 155, 609, ! 599, 598, 167, 152, 0, 0, 0, 597, 358, 0, ! 597, 0, 0, 676, 677, 644, 618, 468, 166, 622, ! 0, 625, 158, 0, 157, 632, 372, 637, 0, 0, ! 675, 0, 0, 153, 628, 598, 0, 0, 0, 0, ! 0, 645, 678, 0, 633, 159, 0, 0, 658, 679, ! 0, 0, 0, 0, 662, 663, 598, 680, 0, 646, ! 629, 160, 659, 0, 0, 0, 681, 647, 598, 630, ! 0, 0, 0 }; ! static const short yydefgoto[] = { 1381, ! 361, 2, 362, 143, 619, 453, 3, 4, 36, 593, ! 327, 441, 331, 38, 39, 339, 598, 599, 600, 40, ! 101, 41, 628, 630, 629, 631, 627, 42, 43, 44, ! 442, 152, 153, 154, 378, 638, 639, 573, 640, 204, ! 45, 46, 47, 158, 288, 289, 342, 863, 343, 1203, ! 290, 1042, 1316, 1263, 1334, 1272, 1364, 886, 1312, 319, ! 830, 291, 477, 534, 795, 292, 293, 294, 320, 296, ! 333, 350, 49, 297, 495, 1103, 298, 299, 300, 301, ! 155, 302, 193, 1043, 430, 554, 814, 1044, 51, 186, ! 603, 304, 187, 472, 188, 167, 179, 55, 675, 168, ! 1177, 431, 1242, 180, 1178, 56, 1091, 723, 57, 58, ! 588, 589, 590, 1022, 382, 758, 759, 59, 577, 315, ! 955, 837, 60, 61, 62, 63, 208, 64, 65, 66, ! 436, 689, 690, 691, 692, 210, 445, 446, 447, 448, ! 703, 709, 704, 1079, 705, 706, 1080, 1081, 574, 575, ! 535, 820, 306, 393, 394, 161, 169, 68, 69, 170, ! 171, 136, 71, 112, 307, 308, 309, 73, 310, 75, ! 76, 207, 77, 311, 800, 801, 815, 557, 1047, 1048, ! 1214, 1023, 887, 888, 889, 388, 1049, 1050, 1140, 1291, ! 1216, 1051, 1052, 1238, 1305, 1141, 1292, 1142, 1294, 1143, ! 1296, 1354, 1376, 1318, 1346, 1276, 1320, 1221, 1053, 1154, ! 1279, 1302, 1367, 1274, 1349, 1054, 1269, 1156, 765, 1323, ! 1324, 1325, 1369, 663, 816, 665, 666, 667, 609, 668, ! 129, 905, 1228, 720, 721, 467, 79, 80 }; ! static const short yypact[] = { 116, ! 140,-32768,-32768, 8889,-32768, 43,-32768, 55, 175,-32768, ! -32768, 690,-32768,-32768, 154, 164, 191,-32768, 286,-32768, ! 708, 379, 492, 3617,-32768, 238, 312,-32768, 117, 117, ! -32768, 3654,-32768,-32768, 315,-32768, 359, 198, 8935,-32768, ! -32768,-32768,-32768, 480, 365, 428,-32768,-32768, 307, 739, ! -32768, 9007,-32768, 1394, 339,-32768, 488,-32768,-32768, 1356, ! -32768,-32768,-32768,-32768,-32768, 485, 2570,-32768,-32768, 3137, ! -32768,-32768,-32768, 561,-32768,-32768,-32768, 229, 5784,-32768, ! -32768,-32768,-32768, 7738, 3961,-32768, 55, 238, 312, 429, ! 494, 428,-32768, 229,-32768, 229, 7738, 7738, 478,-32768, ! 586,-32768,-32768,-32768,-32768, 516, 55, 238, 312,-32768, ! 578,-32768, 722, 722,-32768,-32768, 3894, 4184, 221, 229, ! 7562,-32768, 931,-32768, 573, 452, 931,-32768, 316, 2015, ! 2015, 3654, 471, 498, 491, 506, 529,-32768, 601,-32768, ! 547,-32768, 5135, 78, 3894, 9246, 727, 934, 606, 677, ! -32768, 264, 676, 118, 118,-32768,-32768, 623, 603, 53, ! -32768,-32768, 2771, 2771, 4009, 3310, 612,-32768,-32768, 554, ! -32768,-32768, 561,-32768,-32768,-32768,-32768, 1394, 648,-32768, ! 488, 3744,-32768,-32768,-32768, 1441, 1394,-32768, 488,-32768, ! 3894,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 428, 948,-32768, 665,-32768, 2817, ! -32768, 799,-32768, 109, 1145,-32768,-32768,-32768,-32768, 3000, ! -32768, 284,-32768, 639, 655,-32768,-32768,-32768,-32768, 696, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 652,-32768,-32768, 799, 2570, 373, 659,-32768, ! -32768, 8710, 8798, 674, 680,-32768,-32768,-32768,-32768,-32768, ! -32768, 701, 702, 729, 733, 738, 7826, 316, 8446,-32768, ! -32768, 8446,-32768,-32768, 8446, 5873,-32768, 482,-32768, 8446, ! -32768, 7914,-32768,-32768, 4074,-32768, 737, 1489, 8002,-32768, ! 792, 349,-32768, 1923, 2129, 2624,-32768, 168,-32768, 907, ! 1124, 3894, 221,-32768, 316, 706,-32768, 715, 778, 9277, ! 741, 748, 751, 858, 857,-32768, 547,-32768, 578, 55, ! 810,-32768,-32768,-32768, 722,-32768,-32768,-32768, 3961,-32768, ! 665,-32768,-32768,-32768, 520,-32768, 304,-32768,-32768,-32768, ! 931,-32768,-32768, 931,-32768, 768,-32768,-32768, 3000, 75, ! 774, 780, 3961,-32768,-32768,-32768,-32768, 606, 1137,-32768, ! -32768,-32768,-32768,-32768,-32768, 826,-32768, 108,-32768, 5961, ! 7826,-32768,-32768, 118, 118, 836,-32768,-32768,-32768,-32768, ! -32768,-32768, 7826, 795,-32768, 3806, 901, 3182,-32768, 3182, ! -32768, 3217, 3217, 4009, 805,-32768,-32768,-32768, 1145, 3894, ! -32768, 812,-32768,-32768, 3309, 1441, 1394, 3894,-32768,-32768, ! -32768,-32768, 1145,-32768,-32768, 488, 1441,-32768,-32768, 606, ! -32768,-32768,-32768,-32768, 660,-32768,-32768, 379,-32768, 7826, ! -32768, 582, 2244, 9085, 62, 4626,-32768, 85, 606, 799, ! -32768, 4244, 838, 488,-32768,-32768,-32768, 814, 827,-32768, ! -32768, 799,-32768,-32768, 322,-32768,-32768, 7826, 659, 5873, ! -32768, 407, 5873,-32768, 7826, 8094, 8446, 7738, 4244, 4244, ! 4244, 4244, 9345,-32768,-32768,-32768,-32768, 833, 8534, 8534, ! 5873, 835, 471, 840, 836, 844, 7738,-32768,-32768, 5719, ! 5873,-32768, 7826, 7826, 6049, 7826, 7826, 7826, 7826, 7826, ! 7826, 7826, 7826, 7826, 7826, 7826, 7826, 7826, 7826, 7826, ! 7826, 7826, 7826, 7826,-32768,-32768,-32768,-32768,-32768, 7826, ! 7826, 7826, 7738, 2439, 564, 288, 6577,-32768,-32768,-32768, ! 906, 956, 417, 460, 914, 452,-32768, 1552, 1552,-32768, ! 4389, 855, 881, 950,-32768,-32768, 635, 7191, 424,-32768, ! 361,-32768,-32768, 7826,-32768,-32768,-32768,-32768, 89,-32768, ! -32768,-32768, 945, 961,-32768,-32768, 316,-32768, 6401, 6489, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 76,-32768, 929, ! -32768, 915, 547, 973,-32768,-32768,-32768, 647, 970,-32768, ! -32768, 779, 9246, 779, 2209, 1356, 8990,-32768,-32768, 972, ! -32768,-32768,-32768,-32768, 930,-32768, 982,-32768,-32768,-32768, ! 826,-32768,-32768,-32768,-32768,-32768,-32768, 986, 1003, 1005, ! 1006, 488,-32768,-32768, 238, 312, 7826, 1008,-32768, 503, ! 513, 544,-32768, 4911, 9345,-32768, 778, 962, 9277, 118, ! -32768,-32768,-32768, 67,-32768,-32768, 963,-32768,-32768, 965, ! 179, 3071, 967,-32768, 212, 9154, 1013, 1014,-32768,-32768, ! 3182, 3182,-32768, 3309, 488,-32768,-32768, 969, 901,-32768, ! 1441,-32768, 488,-32768, 826,-32768, 988,-32768, 1025,-32768, ! -32768, 1118,-32768, 9345,-32768,-32768, 1023, 333,-32768, 7826, ! 2482, 606, 1027,-32768,-32768,-32768, 637, 730, 1028,-32768, ! 606, 1030,-32768,-32768,-32768,-32768, 828,-32768, 3548,-32768, ! 137, 601, 1026, 488,-32768,-32768, 919, 919, 919, 987, ! 991, 8182, 950, 994, 995, 372, 1001,-32768, 1002, 1004, ! 1020, 1035, 1038, 1039,-32768, 1009,-32768,-32768, 1012,-32768, ! -32768, 1062, 411, 418, 167, 7826, 1068,-32768, 1072, 1031, ! 9345, 9345,-32768,-32768, 1070, 4504, 4285, 9361, 9376, 4475, ! 4541, 3682, 1761, 1761, 1761, 1603, 1603, 1217, 1217, 796, ! 796, 796,-32768,-32768, 1032, 1024, 1036, 1048, 1049, 4244, ! 564,-32768, 5961, 7826,-32768,-32768,-32768, 7826,-32768,-32768, ! 1051, 8446, 1053, 1058, 1117,-32768, 7826,-32768, 7826, 1756, ! -32768, 1756,-32768, 157, 1075, 1076,-32768, 1057, 4244, 901, ! -32768, 901, 1868,-32768, 1876, 1077, 7378, 7378, 5441, 1078, ! 7914, 1079, 1124, 1081, 7826, 316, 1082, 961,-32768, 9345, ! -32768, 9345, 858, 1084, 8270,-32768, 1088,-32768, 3961,-32768, ! 2035, 1501, 1501, 1721,-32768,-32768,-32768,-32768,-32768,-32768, ! 66,-32768, 485,-32768, 488,-32768,-32768,-32768,-32768, 1137, ! 1091,-32768, 108,-32768, 7826,-32768, 7826,-32768, 7826,-32768, ! 51,-32768,-32768, 316,-32768,-32768, 5348, 1172,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 7286,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 1143, 5961, 1144,-32768, 1147, 488, ! 7738, 660,-32768,-32768,-32768, 7826, 7826, 100, 4808,-32768, ! 561, 1108,-32768, 1096, 826, 826, 3382, 831, 6647, 488, ! 4244,-32768, 81,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 1123, 1127, 1129, 1130, 930, ! -32768, 4960, 5961, 5065, 1116,-32768, 7826,-32768,-32768,-32768, ! -32768, 595, 1119,-32768,-32768, 1120, 59, 244, 244, 1122, ! 244,-32768,-32768, 8446, 1227,-32768, 1132, 1133,-32768,-32768, ! -32768,-32768,-32768,-32768, 901, 1134,-32768, 1126,-32768,-32768, ! 622,-32768, 9345,-32768,-32768, 1138,-32768,-32768, 158, 1146, ! -32768,-32768,-32768, 1600, 1600, 2877, 2877, 1721,-32768, 2955, ! 2817, 1137,-32768,-32768,-32768, 1152, 1153, 1154, 5631,-32768, ! -32768, 837,-32768, 185, 1183, 683,-32768,-32768,-32768,-32768, ! -32768, 7826, 1188, 1191, 1192, 7650, 329, 461,-32768,-32768, ! 1255, 1208,-32768, 3647, 9200, 2367, 5239,-32768,-32768, 1257, ! -32768,-32768,-32768, 6801,-32768, 7470, 7470, 5536, 397, 1162, ! 421, 5961,-32768,-32768,-32768, 1209, 1169, 1171,-32768, 4808, ! 4808, 894,-32768,-32768,-32768, 1221, 697, 7826,-32768,-32768, ! -32768, 606, 606, 488, 488,-32768, 6707, 972,-32768,-32768, ! 5961, 7826, 7826, 7826, 7826, 5961,-32768, 7826, 1222,-32768, ! -32768, 9345, 623, 7826,-32768, 595,-32768,-32768,-32768,-32768, ! -32768,-32768, 1176,-32768, 1240,-32768,-32768, 901,-32768,-32768, ! -32768, 7826,-32768,-32768, 1600, 1600, 2955, 77,-32768,-32768, ! -32768,-32768,-32768, 316,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 836, 1196, 1198, 4434,-32768,-32768,-32768,-32768, 1234, ! 7826, 1242,-32768, 836,-32768, 1212,-32768,-32768, 869, 909, ! -32768, 921, 606, 8358, 923, 954, 202,-32768,-32768,-32768, ! -32768,-32768,-32768, 1199, 1405,-32768, 5961, 5961,-32768,-32768, ! -32768,-32768,-32768, 488, 100, 7826, 7826, 4808, 826, 826, ! 972, 972,-32768,-32768, 1200, 1201, 1205, 1207,-32768, 9300, ! 5961, 623,-32768, 1210,-32768,-32768,-32768, 901, 1215,-32768, ! -32768, 557, 557, 7098,-32768, 1300, 4759, 7738, 7826,-32768, ! 6908,-32768, 1259,-32768,-32768, 601,-32768, 826,-32768,-32768, ! 826, 8622, 8622, 6137,-32768,-32768,-32768, 836, 479,-32768, ! -32768, 5961, 972, 928, 4808, 4808,-32768, 488, 488,-32768, ! -32768,-32768,-32768,-32768,-32768, 5961,-32768,-32768,-32768,-32768, ! -32768, 7738,-32768,-32768,-32768,-32768, 67,-32768,-32768, 1263, ! -32768, 1219, 369, 3894, 9323, 6908,-32768,-32768,-32768, 65, ! -32768,-32768,-32768, 488,-32768,-32768, 972, 972,-32768, 1220, ! 836, 7003,-32768, 607,-32768,-32768,-32768,-32768, 606,-32768, ! -32768, 1232, 1308, 1269,-32768, 972,-32768,-32768,-32768,-32768, ! 67,-32768,-32768,-32768, 7826, 1271, 6225, 836, 826, 6908, ! -32768, 1239, 166, 1274,-32768,-32768,-32768,-32768,-32768,-32768, ! 1228,-32768,-32768, 1278,-32768,-32768, 488,-32768, 1247, 7826, ! 1308, 1286, 1308,-32768,-32768,-32768, 1283, 3478, 836, 1246, ! 360,-32768,-32768, 6313,-32768,-32768, 1251, 1260,-32768,-32768, ! 1340, 1294, 1266, 5961,-32768,-32768,-32768,-32768, 303,-32768, ! -32768,-32768,-32768, 1355, 1317, 7003,-32768,-32768,-32768,-32768, ! 1378, 1379,-32768 }; static const short yypgoto[] = {-32768, ! 1381,-32768, -288,-32768, 1017, -2, 1383,-32768,-32768,-32768, ! -32768, 1382, 1054,-32768,-32768,-32768,-32768,-32768, 538,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, -828, 1249, 1253,-32768, ! -32768,-32768,-32768, 1241,-32768,-32768, 525, 25,-32768,-32768, ! -32768, 3567, -45,-32768, 1281, 908, -1033,-32768, -118, 201, ! -32768, 642,-32768, 194,-32768, -1140,-32768, -1069, 28, 1060, ! -75, 754,-32768,-32768, -758, 3716, -30, -276, 2223, 3118, ! -52, 1858, 186,-32768,-32768,-32768,-32768, -294,-32768, -138, ! -106,-32768, -122, 200, -46, -291, 142, 48, -327, -110, ! 4, 17, -152, -4, -137, -655, 363,-32768, -151,-32768, ! -32768, -119,-32768,-32768,-32768,-32768,-32768, 465, 1715, -32, ! -32768, 568,-32768,-32768, -583, -361, 777, 22,-32768,-32768, ! -32768, 584, -317, 6, 1384, 1385,-32768,-32768,-32768,-32768, ! 1086,-32768, 521, 736,-32768, 569, 423, 507, -435,-32768, ! -32768,-32768,-32768,-32768,-32768, 998,-32768, 511, 866, 608, ! 916, -43, 49, 33, -402, 1279, 2900, -65, 32,-32768, ! 2539, -107, 555, -6, 3328, 1155,-32768, 4004, 1225, 596, ! -349, 208, 3927, 1982, -130,-32768, 1515,-32768,-32768, 408, ! -380, -1168,-32768,-32768, 566, -117, -149,-32768,-32768,-32768, ! -1155, -989, -1169,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, -28,-32768,-32768,-32768,-32768, -1160, 120, ! -32768, 119,-32768, -635, -364,-32768,-32768, -336, 797, -330, ! -32768,-32768, -34, 537,-32768, 302,-32768, -293 }; ! #define YYLAST 9460 ! static const short yytable[] = { 54, ! 360, 35, 608, 166, 389, 389, 654, 52, 610, 678, ! 714, 602, 221, 559, 206, 502, 567, 570, 646, 54, ! 53, 606, 352, 355, 194, 417, 862, 118, 642, 119, ! 317, 664, 964, 220, 54, 215, 91, 390, 592, 391, ! 53, 1013, 146, 93, 1265, 106, 385, 178, 425, 428, ! 258, 50, 67, 93, 221, 53, 1270, 1170, 420, 450, ! 336, 337, 212, 454, 1173, 922, 429, 416, 602, 1202, ! 340, 117, 67, 539, 256, 190, 427, 123, 127, 305, ! 54, 160, 1281, 539, 203, 693, 145, 67, 118, 539, ! 313, 93, 305, 305, 359, 255, 1293, 712, 368, 395, ! 884, 53, 81, 462, 334, 547, 455, 338, 83, 1019, ! 633, 8, 712, 178, 376, -1, 305, 397, 386, 7, ! 107, 1290, 1313, 11, -43, 267, 1303, 257, 84, -43, ! 415, 409, 312, 67, 843, 1310, 1327, 366, 54, -2, ! -43, 178, 25, 1330, 715, 396, 52, 423, 194, 818, ! 82, 732, 462, 349, 634, 451, 194, 20, 1020, 53, ! 214, 25, 1336, 635, 636, 1108, 892, 160, 1202, 713, ! 25, 1304, 26, 27, 885, 387, 1335, 1355, 351, 354, ! 733, 617, 844, 1129, 1210, 367, 29, 1090, 892, 986, ! 50, 67, 716, 1363, 572, 931, 30, 1295, 1373, 190, ! 637, 452, 160, 1105, 31, 54, 1313, 190, 190, 32, ! 1380, 398, 400, 444, 563, 893, 1122, 135, 894, 95, ! 122, 898, 85, 602, 632, 303, 53, 1341, -119, 110, ! 602, 1277, 8, 190, 389, 389, 653, 893, 321, 323, ! 894, 1329, -710, 932, 1136, 221, 97, 107, 485, 543, ! 455, 486, 212, 895, 487, 141, 98, 443, 67, 499, ! 564, 1136, 303, 750, 1123, 571, 651, 652, 538, 536, ! 899, 683, 1342, 900, 567, 895, 650, 190, 425, 428, ! -141, 305, 596, 99, 108, 109, 1301, 8, 100, 425, ! 676, 107, 1137, 256, 352, 355, 142, 25, 682, 108, ! 109, 212, 484, 684, 847, 648, 681, 107, 901, 1237, ! 379, 121, 428, 796, 255, 135, 135, 135, 86, 102, ! 660, 341, 334, 797, 428, 107, 190, 380, 597, 608, ! 1338, 86, 102, 621, 605, 610, 664, 798, 602, 108, ! 109, 25, 693, 108, 109, 749, 257, 1205, 587, 540, ! 135, 7, 330, -502, 541, 604, 381, 796, 54, 108, ! 109, 1374, 674, 457, 8, 122, 118, 797, 119, 679, ! 559, 103, 104, 602, 184, 185, 107, 108, 109, 53, ! 12, 798, 107, 457, 103, 104, 83, 607, 1160, 20, ! 1166, 662, 730, 194, 917, 685, 702, 191, 192, -502, ! 159, 216, 25, 18, 26, 27, 84, 139, 1151, 1375, ! 117, 67, 604, 22, 717, 547, 108, 109, 140, 727, ! 728, 1361, 729, 988, 156, 83, 25, 496, 108, 109, ! -498, 965, 25, -498, 108, 109, 542, 190, 190, 178, ! 216, 54, 463, -249, 607, 84, 738, 719, 190, 444, ! 671, 672, 464, 547, 785, 107, 787, 788, 485, 486, ! 664, 732, 53, 806, 83, 305, 1362, -539, 305, 865, ! 821, 190, -117, 305, 719, 719, 719, 719, 942, -118, ! 601, 157, -498, 190, 84, -498, 305, -498, 834, -249, ! -249, 121, 305, 443, 67, 107, 305, 602, -498, 732, ! 389, 602, 150, -244, 1193, 536, 808, 108, 109, 807, ! 822, 823, 608, -539, -539, 822, -498, -498, 610, 17, ! -498, 602, 1153, 642, 757, -250, 602, -539, 305, 256, ! -498, 606, 883, 910, 121, 111, 314, 661, 567, 570, ! 497, 151, 209, 425, 1063, 25, 605, 108, 109, 874, ! 255, 316, 809, 662, 502, 855, 498, 859, 860, 876, ! 206, 871, 693, 7, 8, 930, 462, 604, 602, 1113, ! 324, -250, -250, 328, 604, 7, 107, -244, 497, 329, ! 7, 330, 257, 933, 159, -247, 137, 135, 135, 135, ! 878, 1097, 1100, 718, 612, 875, 810, 812, 178, 607, ! -502, 20, 212, 1261, 357, 877, 607, 1250, 1251, 261, ! 792, 731, 358, 20, 734, 860, 26, 27, 20, 740, ! 741, 742, 743, 744, 7, 8, 190, 793, 26, 27, ! 861, 25, 496, 26, 27, -534, 879, 93, 303, 695, ! 216, 792, 760, 696, 325, 326, -502, 412, 31, 1262, ! 1144, 714, 216, 1314, -7, 918, 794, 1100, 793, 1283, ! 31, 605, 20, 8, 686, 31, 214, 923, 757, 219, ! 410, 411, 925, 926, 789, 733, 928, 26, 27, 377, ! 602, 824, 604, 190, 137, 137, 137, 794, 1104, 219, ! 687, 194, 86, 87, -308, 688, 605, 214, -308, 1315, ! 1176, 457, 190, 1307, 1308, 849, 418, 419, 219, 31, ! 86, 102, 392, 25, 607, 108, 109, 604, 966, 137, ! 219, 850, 1328, 341, 7, 330, 435, 825, 826, 1194, ! 602, 977, 458, 978, 1199, 383, 83, 151, 318, 322, ! 190, 7, 8, 25, 1139, 88, 89, 90, 459, 607, ! 83, 468, 968, 969, 733, 971, 84, 460, 1187, 1212, ! 1213, 461, 20, 103, 104, 105, 475, 221, 219, 1000, ! 84, 973, 476, 1084, 1085, 479, 1085, 26, 27, 20, ! 985, 7, 8, 525, 370, 719, 371, -309, 372, 967, ! 214, -309, 25, 478, 26, 27, 485, 486, 162, 1016, ! 539, 1017, 480, 1018, 184, 185, 481, 601, 163, 31, ! 12, 482, 1010, 576, 719, 1240, 1241, 219, 164, 20, ! 605, 578, 526, 527, 662, 547, 31, 528, 529, 530, ! 531, 165, 25, 18, 26, 27, 579, 1109, 1110, 1257, ! 1112, 604, 661, 22, 605, 604, 1003, 581, 852, 605, ! 13, 14, 13, 14, 582, 13, 14, 583, 853, 591, ! 86, 102, 584, 585, 586, 604, 31, 587, 550, 595, ! 604, 854, 552, 607, 615, 810, 812, 607, 523, 524, ! 1282, -6, 1046, 1072, 1041, -97, 135, 618, -96, -97, ! 1045, 662, -96, 387, 1289, 1134, 1135, 607, 352, 355, ! 1004, 1005, 607, 53, 656, 219, 305, 455, 1021, 7, ! 8, 673, 604, 103, 104, 1317, 7, 107, 13, 14, ! 1184, 677, 107, 725, 54, 455, 719, 492, 1227, 214, ! 722, 963, 444, 7, 107, 67, 726, 211, 1118, 745, ! 1339, 747, 219, 1114, 607, 53, 748, 20, 352, 355, ! 750, -94, 13, 14, 20, -94, 137, 137, 137, 804, ! 760, 805, 26, 27, 817, 1127, 661, 410, 1229, 26, ! 27, 20, 25, 819, 108, 109, 443, 67, 1099, 418, ! 1230, 733, 1235, 214, 25, -93, 26, 27, 463, -93, ! 601, 373, 1215, 374, 31, 375, 821, 1159, 464, 1165, ! 29, 31, 1372, 605, 1225, 432, 54, 433, 835, 434, ! 30, 608, 410, 1236, 444, 471, 474, 1358, 31, 836, ! 602, 845, 846, 32, 604, 485, 486, 53, 935, 936, ! 937, 1185, 848, 851, 655, 380, -247, 1248, 1249, 135, ! 178, 864, 1046, 1099, 1041, 866, 1209, 1189, 1190, 1046, ! 1045, 1041, 1068, 662, 1125, 1126, 607, 1045, 443, 67, ! 219, 1152, 867, 53, 868, 869, 873, 190, 882, 890, ! 53, 891, 718, 897, 604, 1208, -709, 906, 908, 683, ! 911, 135, 54, 912, 916, 924, 927, 1280, 1215, 934, ! 444, 929, 1284, 938, 946, 67, 870, 939, 1076, 1077, ! 940, 941, 67, 53, 1125, 1126, 607, 943, 944, 947, ! 945, 492, 948, 949, 492, 950, 735, 737, 951, 739, ! 462, 8, 913, -116, 352, 355, 565, 8, 1231, 953, ! 954, 957, 492, 959, 443, 67, 20, 956, 958, 907, ! 219, 1215, 492, 960, 972, 975, 764, 909, 687, 25, ! 1244, 26, 27, 914, 961, 962, 219, 1078, 1211, 622, ! 267, 566, 974, 976, 20, 163, 983, 1337, 1215, 13, ! 14, 25, 786, 108, 109, 164, -358, 25, 803, 108, ! 109, 981, 982, 31, 989, 990, 987, 992, 165, 995, ! 998, 135, 135, 135, 623, 1001, 624, 1014, 625, 1359, ! 626, 485, 486, -358, -358, 884, 1062, 1064, -358, 1046, ! 1065, 1041, 1046, 1273, 1075, 1092, 1046, 1045, 1041, 1093, ! 1045, 1094, 1095, 1101, 1045, 1106, 1107, 1299, 74, 305, ! 53, 1111, 1115, 53, 255, 1120, 94, 53, 1116, 1117, ! 1119, 135, 135, 135, 1138, 1121, 94, 113, 94, 1146, ! 1147, 1148, 1124, 125, 125, 137, 125, 1273, 1130, 1131, ! 1132, 1155, 67, 74, 1319, 67, 257, 1157, 1175, 67, ! 1171, 1046, 1179, 1041, 173, 1180, 74, 1181, 255, 1045, ! 671, 672, 1186, 1201, 94, 1206, 1207, 1046, 1217, 1041, ! 1218, 94, 53, 1222, 190, 1045, 520, 521, 522, 523, ! 524, 1224, 222, 94, 1226, 1239, 1252, 1253, 53, 94, ! 257, 1254, 1273, 1255, 1266, 1046, 1322, 1041, 1278, 1259, ! 94, 1260, 1297, 1045, 67, 1298, 1309, 1321, 1326, 1012, ! 1332, 1340, 1343, 255, 1344, 113, 53, 1345, 113, 1348, ! 67, 173, 94, 605, 94, 1352, 1356, 125, 1368, 135, ! 347, 125, 1360, 1370, 125, 125, 125, 1365, 86, 87, ! 195, 196, 197, 1377, 604, 257, 1366, 74, 67, 173, ! 74, 1046, 1371, 1041, 1066, 496, 1378, 1382, 1383, 1045, ! 1, 620, 594, 1073, 5, 37, 1002, 173, 173, 173, ! 198, 364, 53, 384, 1088, 365, 607, 1015, 183, 184, ! 185, 345, 1258, 1379, 751, 12, 1264, 1162, 137, 25, ! 997, 88, 89, 199, -250, 173, 1268, 135, 135, 135, ! 881, 996, 147, 148, 67, 17, 611, 915, 18, -250, ! -250, 1011, 1069, 1128, 74, 1087, -250, 1086, 22, 970, ! 647, 710, 838, 994, 125, 424, 184, 185, 413, 791, ! 137, -250, 12, 1055, 1169, 647, 544, 200, 201, 202, ! 1351, 1353, 904, -250, -250, -250, -250, 1089, -250, 0, ! 492, 0, 17, 0, 0, 18, 0, 0, 0, 0, ! 0, 94, 465, 0, 0, 22, 0, 0, 0, 601, ! 0, 0, 8, 0, 10, 11, 0, -250, -250, 0, ! 12, -250, 0, 7, 8, 0, 0, 11, 0, 0, ! 0, -250, 0, 0, 0, 15, 219, 0, 0, 16, ! 0, 0, 94, 18, 0, 0, 545, 647, 465, 465, ! 561, 0, 0, 22, 1182, 1183, 173, 0, 0, 0, ! 0, 20, 25, 0, 108, 109, 532, 547, 1191, 1192, ! 0, 0, 1067, 113, 25, 107, 26, 27, 11, 113, ! 137, 137, 137, 94, 0, 0, 0, 0, 0, 0, ! 852, 0, 0, 0, 0, 125, 0, 0, 125, 0, ! 853, 533, 0, 125, 0, 0, 219, 94, 31, 647, ! 550, 647, 647, 854, 552, 0, 0, 0, 547, 0, ! 0, 0, 7, 8, 0, 25, 211, 108, 109, 0, ! 137, 137, 137, 0, 0, 0, 0, 647, 0, 0, ! 0, 548, 173, 647, 173, 0, 173, 173, 173, 0, ! 0, 549, 0, 0, 173, 0, 0, 0, 0, 173, ! 20, 550, 173, 0, 551, 552, 547, 0, 1243, 0, ! 0, 0, 1247, 25, 0, 26, 27, 0, 0, 94, ! 0, 0, 113, 0, 0, 0, 0, 173, 74, 852, ! 74, 0, 0, 0, 0, 0, 94, 1150, 0, 853, ! 518, 519, 520, 521, 522, 523, 524, 31, 0, 550, ! 0, 0, 854, 552, 0, 0, 647, 0, 0, 492, ! 0, 0, 0, 94, 94, 94, 94, 0, 0, 1285, ! 1286, 0, 1287, 1288, 0, 0, 0, 0, 137, 0, ! 0, 0, 0, 7, 8, 115, 10, 11, 0, 0, ! 658, 0, 12, 1195, 1196, 1197, 1198, 0, 0, 0, ! 0, 0, 0, 0, 0, 1204, 0, 15, 1306, 0, ! 0, 16, 17, 0, 0, 18, 0, 0, 94, 107, ! 465, 20, 211, 0, 0, 22, 181, 547, 189, 0, ! 545, 0, 465, 465, 25, 561, 26, 27, 0, 0, ! 0, 0, 74, 0, 0, 0, 137, 137, 137, 0, ! 1006, 647, 1223, 0, 0, 0, 0, 0, 0, 0, ! 1007, 1347, 547, 0, 0, 0, 0, 0, 31, 25, ! 550, 108, 109, 1008, 552, 0, 0, 659, 556, 560, ! 562, 0, 0, 0, 0, 548, 173, 74, 173, 173, ! 94, 561, 181, 0, 0, 549, 516, 517, 518, 519, ! 520, 521, 522, 523, 524, 550, 0, 0, 551, 552, ! 0, 0, 0, 647, 0, 0, 0, 0, 764, 1271, ! 181, 0, 0, 0, 0, 0, 647, 0, 647, 0, ! 0, 107, 0, 0, 455, 492, 0, 0, 0, 8, ! 115, 10, 11, 0, 0, 658, 173, 12, 0, 134, ! 74, 0, 189, 0, 0, 173, 173, 0, 173, 0, ! 426, 189, 15, 1271, 647, 0, 16, 17, 0, 0, ! 18, 0, 0, 0, 547, 0, 94, 0, 0, 0, ! 22, 25, 0, 108, 109, 921, 107, 0, 0, 25, ! 0, 108, 109, 0, 647, 0, 647, 548, 647, 0, ! 0, 0, 0, 465, 0, 0, 0, 549, 0, 0, ! 0, 465, 465, 465, 0, 647, 1331, 550, 1271, 0, ! 551, 552, 0, 0, 0, 0, 0, 0, 0, 547, ! 0, 0, 659, 0, 0, 0, 25, 0, 108, 109, ! 0, 1350, 0, 0, 0, 78, 0, 0, 353, 356, ! 0, 0, 548, 96, 0, 764, 0, 0, 0, 0, ! 0, 0, 549, 96, 114, 120, 0, 0, 0, 0, ! 126, 126, 550, 126, 94, 551, 552, 7, 107, 0, ! 78, 11, 134, 0, 0, 0, 0, 0, 0, 0, ! 0, 126, 0, 78, 465, 0, 465, 0, 8, 0, ! 10, 96, 0, 94, 0, 0, 12, 465, 120, 94, ! 0, 74, 74, 74, 0, 20, 0, 991, 0, 0, ! 120, 15, 811, 813, 0, 16, 120, 0, 25, 18, ! 26, 27, 0, 94, 0, 94, 173, 173, 921, 22, ! 0, 0, 0, 0, 130, 0, 0, 0, 25, 0, ! 108, 109, 335, 0, 131, 0, 0, 0, 126, 120, ! 0, 0, 31, 0, 126, 0, 0, 132, 126, 0, ! 0, 126, 126, 126, 0, 0, 857, 0, 556, 560, ! 921, 562, 0, 0, 78, 0, 126, 78, 0, 0, ! 426, 189, 107, 0, 184, 185, 94, 0, 0, 0, ! 12, 426, 0, 494, 126, 126, 126, 0, 173, 0, ! 0, 125, 0, 74, 0, 94, 0, 0, 181, 0, ! 0, 0, 0, 18, 0, 0, 0, 0, 724, 0, ! 0, 0, 126, 22, 0, 547, 560, 0, 0, 0, ! 0, 647, 25, 0, 108, 109, 0, 0, 0, 0, ! 0, 78, 465, 465, 0, 465, 0, 0, 548, 0, ! 0, 126, 0, 0, 0, 0, 0, 0, 549, 0, ! 0, 7, 8, 183, 184, 185, 0, 0, 550, 0, ! 12, 558, 552, 647, 0, 0, 0, 0, 173, 173, ! 173, 173, 921, 560, 173, 74, 0, 0, 120, 126, ! 17, 0, 0, 18, 0, 0, 697, 698, 0, 20, ! 0, 0, 0, 22, 0, 547, 0, 0, 0, 0, ! 353, 356, 25, 0, 26, 27, 0, 0, 173, 74, ! 173, 0, 0, 0, 0, 0, 0, 0, 852, 120, ! 921, 921, 921, 546, 20, 126, 126, 78, 853, 0, ! 699, 0, 569, 126, 0, 0, 31, 25, 550, 26, ! 27, 854, 552, 0, 0, 700, 295, 0, 0, 0, ! 335, 74, 0, 163, 0, 0, 0, 181, 0, 189, ! 120, 0, 0, 164, 979, 0, 980, 494, 0, 0, ! 494, 31, 126, 0, 0, 126, 701, 984, 0, 0, ! 126, 811, 813, 295, 120, 0, 724, 353, 746, 173, ! 173, 173, 0, 0, 0, 0, 0, 0, 494, 120, ! 0, 0, 0, 0, 0, 0, 811, 813, 0, 7, ! 8, 183, 184, 185, 0, 0, 189, 0, 12, 126, ! 0, 126, 0, 126, 126, 126, 0, 0, 921, 724, ! 0, 126, 0, 0, 0, 426, 126, 724, 17, 126, ! 0, 18, 0, 0, 0, 0, 0, 20, 0, 0, ! 0, 22, 0, 547, 0, 832, 120, 0, 0, 114, ! 25, 0, 26, 27, 126, 78, 0, 78, 0, 0, ! 0, 0, 0, 120, 0, 0, 163, 0, 0, 0, ! 0, 0, 8, 0, 10, 11, 164, 0, 0, 0, ! 12, 0, 0, 0, 31, 0, 921, 921, 921, 1164, ! 120, 120, 120, 120, 0, 15, 0, 0, 0, 16, ! 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 22, 7, 8, 115, 10, 11, 0, ! 0, 658, 25, 12, 108, 109, 0, 0, 173, 483, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, ! 0, 0, 16, 17, 0, 120, 18, 126, 979, 980, ! 811, 813, 20, 0, 984, 0, 22, 0, 0, 126, ! 126, 790, 78, 0, 0, 25, 0, 26, 27, 833, ! 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, ! 569, 402, 0, 0, 0, 0, 0, 0, 134, 0, ! 0, 403, 0, 0, 0, 0, 0, 124, 128, 31, ! 811, 813, 94, 8, 404, 10, 211, 149, 659, 724, ! 0, 12, 0, 126, 78, 126, 126, 96, 78, 832, ! 182, 0, 0, 0, 0, 0, 15, 0, 0, 0, ! 16, 0, 645, 649, 18, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 22, 0, 0, 0, 649, 0, ! 0, 0, 0, 25, 724, 108, 109, 8, 0, 10, ! 211, 0, 0, 724, 0, 12, 0, 0, 0, 979, ! 980, 984, 0, 126, 724, 0, 0, 78, 0, 0, ! 15, 0, 126, 126, 16, 126, 0, 0, 18, 0, ! 0, 346, 694, 0, 0, 348, 0, 0, 22, 0, ! 547, 0, 0, 120, 0, 0, 0, 25, 0, 108, ! 109, 70, 78, 0, 369, 353, 746, 0, 0, 0, ! 649, 0, 0, 548, 0, 0, 0, 0, 0, 0, ! 126, 124, 128, 549, 0, 0, 0, 0, 126, 126, ! 126, 134, 0, 550, 0, 0, 551, 552, 0, 295, ! 0, 0, 645, 0, 0, 761, 762, 0, 766, 767, ! 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, ! 778, 779, 780, 781, 782, 783, 784, 0, 449, 0, ! 0, 0, 649, 1060, 649, 649, 0, 0, 456, 181, ! 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 120, 0, 7, 8, 0, 0, 11, 0, 0, ! 649, 0, 0, 0, 724, 724, 649, 0, 0, 0, ! 0, 126, 0, 126, 0, 0, 0, 0, 724, 724, ! 120, 840, 842, 0, 126, 0, 120, 0, 833, 833, ! 833, 20, 0, 0, 569, 0, 0, 437, 0, 7, ! 8, 115, 10, 11, 25, 0, 26, 27, 12, 0, ! 120, 0, 120, 126, 126, 78, 0, 0, 0, 0, ! 163, 0, 0, 15, 0, 0, 0, 16, 17, 0, ! 164, 18, -452, 0, 120, 0, 0, 20, 31, 649, ! 0, 22, 438, 165, 353, 356, 645, 0, 0, 0, ! 25, 0, 26, 27, 0, 0, 439, 833, 440, 7, ! 8, 0, 0, 11, 0, 0, 29, 0, 0, 613, ! 0, 0, 614, 120, 0, 0, 30, 616, 724, 0, ! 0, 0, 724, 0, 31, 126, 0, 0, 126, 32, ! 78, 0, 120, 0, 353, 1174, 0, 20, 0, 0, ! 0, 0, 919, 547, -452, 0, 0, 0, 0, 0, ! 25, 0, 26, 27, 0, 0, 346, 0, 348, 0, ! 0, 0, 0, 0, 0, 0, 1006, 0, 0, 126, ! 126, 0, 126, 456, 649, 0, 1007, 7, 8, 724, ! 724, 455, 724, 724, 31, 0, 550, 0, 0, 1008, ! 552, 0, 0, 0, 0, 0, 0, 0, 952, 0, ! 0, 708, 711, 0, 449, 126, 126, 126, 126, 78, ! 0, 126, 78, 0, 0, 20, 0, 0, 724, 0, ! 0, 547, 7, 107, 0, 0, 455, 0, 25, 0, ! 26, 27, 0, 0, 0, 645, 649, 0, 0, 0, ! 0, 1060, 0, 0, 852, 126, 78, 126, 0, 649, ! 0, 649, 0, 0, 853, 0, 0, 833, 833, 833, ! 20, 0, 31, 0, 550, 0, 0, 854, 552, 0, ! 0, 724, 0, 25, 0, 26, 27, 993, 0, 0, ! 0, 0, 399, 401, 405, 0, 0, 649, 78, 29, ! 0, 0, 0, 7, 8, 183, 184, 185, 0, 30, ! 0, 0, 12, 0, 0, 0, 0, 31, 0, 0, ! 353, 1174, 32, 0, 0, 0, 0, 649, 0, 649, ! 0, 649, 17, 0, 0, 18, 126, 126, 126, 0, ! 0, 20, 0, 0, 0, 22, 0, 547, 649, 0, ! 0, 48, 0, 0, 25, 0, 26, 27, 645, 0, ! 0, 0, 0, 0, 0, 0, 0, 213, 1070, 1071, ! 852, 858, 0, 0, 0, 833, 48, 48, 0, 133, ! 853, 0, 0, 0, 0, 0, 48, 0, 31, -714, ! 550, -714, -714, 896, 552, 0, 0, 48, -714, 48, ! 0, 0, 0, 0, 0, 645, 645, 0, 0, 1102, ! 0, 0, 0, 0, 7, 8, 0, 0, 211, 0, ! 0, 217, 0, 0, -714, -714, -714, 214, -714, 0, ! -714, 0, 0, 0, 903, 0, 0, 0, 0, 613, ! 614, 0, 616, 833, 833, 833, 0, 0, 0, 7, ! 8, 0, 20, 11, 0, 0, 0, 0, 332, 0, ! 332, 332, 0, 0, 48, 25, 0, 26, 27, 0, ! 48, 645, 217, 0, 48, 0, 0, 133, 133, 133, ! 0, 163, 0, 0, 1145, 126, 0, 20, 0, 0, ! 48, 164, 48, 48, 0, 0, 0, 0, 0, 31, ! 25, 0, 26, 27, 165, 0, 0, 0, 0, 0, ! 48, 48, 133, 0, 645, 0, 402, 0, 0, 0, ! 217, 0, 0, 0, 0, 0, 403, 669, 0, 670, ! 1188, 399, 401, 405, 31, 0, 0, 0, 48, 404, ! 407, 7, 8, 645, 680, 455, 0, 0, 645, 0, ! 1200, 0, 0, 0, 0, 0, 0, 48, 0, 120, ! 0, 72, -714, 0, -714, -714, 0, 48, 0, 0, ! 0, -714, 707, 0, 649, 0, 0, 0, 0, 20, ! 0, 0, 0, 0, 0, 0, 72, 72, 0, 72, ! 0, 0, 25, 0, 26, 27, 72, -714, -714, 408, ! 214, -714, 0, -714, 0, 0, 0, 72, 163, 72, ! 0, 0, 0, 0, 1076, 107, 649, 0, 164, 0, ! 124, 128, 0, 0, 0, 0, 31, 0, 0, 645, ! 645, 165, 0, 493, 0, 0, 0, 0, 1245, 1246, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, ! 0, 0, 20, 645, 0, 0, 0, 217, 0, 48, ! 0, 0, 0, 0, 0, 25, 0, 26, 27, 0, ! 0, 1275, 0, 1078, 72, 0, 332, 0, 0, 0, ! 72, 29, 332, 0, 72, 0, 0, 72, 72, 72, ! 0, 30, 1083, 0, 645, 1083, 0, 449, 48, 31, ! 72, 48, 72, 72, 32, 0, 48, 0, 645, 0, ! 0, 8, 115, 10, 11, 0, 0, 1357, 0, 12, ! 72, 72, 72, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 0, 0, 0, 16, 17, ! 0, 0, 18, 0, 0, 48, 0, 48, 72, 133, ! 133, 133, 22, 0, 0, 0, 0, 48, 0, 0, ! 0, 25, 48, 108, 109, 48, 0, 72, 0, 0, ! 0, 0, 346, 348, 0, 0, 0, 72, 456, 449, ! 0, 107, 0, 184, 185, 0, 0, 0, 0, 12, ! 48, 48, 0, 48, 0, 0, 0, 0, 0, 0, ! 669, 670, 0, 680, 0, 0, 0, 0, 92, 0, ! 0, 0, 18, 1163, 0, 0, 645, 493, 92, 92, ! 493, 0, 22, 0, 547, 92, 92, 0, 92, 0, ! 405, 25, 0, 108, 109, 0, 493, 493, 493, 0, ! 0, 0, 0, 0, 0, 0, 0, 548, 493, 0, ! 8, 115, 10, 11, 0, 449, 205, 549, 12, 0, ! 0, 0, 0, 0, 0, 0, 0, 550, 568, 72, ! 551, 552, 0, 15, 0, 0, 0, 16, 17, 7, ! 8, 18, 0, 0, 0, 0, 7, 107, 0, 0, ! 0, 22, 217, 613, 614, 616, 0, 0, 0, 0, ! 25, 0, 108, 109, 0, 493, 0, 92, 72, 92, ! 92, 72, 0, 0, 0, 0, 72, 20, 0, 92, ! 116, 92, 92, 92, 20, 0, 92, 92, 92, 0, ! 25, 0, 26, 27, 0, 641, 1158, 25, 0, 26, ! 27, 0, 0, 0, 0, 0, 163, 0, 0, 48, ! 48, 48, 48, 130, 0, 72, 164, 72, 0, 72, ! 72, 72, 0, 131, 31, 0, 0, 72, 0, 165, ! 0, 31, 72, 0, 421, 72, 132, 0, 0, 0, ! 0, 399, 401, 405, 513, 514, 515, 516, 517, 518, ! 519, 520, 521, 522, 523, 524, -714, 0, -714, -714, ! 72, 72, 0, 72, 0, -714, 0, 0, 0, 48, ! 0, 0, 0, 48, 0, 0, 92, 0, 48, 48, ! 0, 48, 0, 0, 0, 405, 0, 0, 0, 0, ! 0, -714, -714, 422, 214, -714, 657, -714, 7, 8, ! 115, 10, 259, 260, 261, 658, 262, 12, 133, 0, ! 0, 0, 0, 1082, 92, 0, 0, 0, 0, 0, ! 0, 0, 15, 263, 264, 265, 16, 17, 266, 0, ! 18, 0, 267, 268, 0, 269, 20, 270, 271, 493, ! 22, 0, 0, 0, 272, 273, 274, 275, 276, 25, ! 0, 26, 27, 0, 0, 0, 277, 0, 92, 0, ! 92, 92, 278, 568, 0, 279, 0, 0, 0, 0, ! 0, 0, 0, 280, 281, 282, 0, 0, 0, 0, ! 0, 283, 284, 285, 0, 92, 7, 8, 286, 0, ! 0, 92, 659, 669, 670, 399, 401, 405, 0, 680, ! 0, 0, -682, 92, 287, 0, 0, 92, 0, 0, ! 92, 0, 0, 0, 0, 92, 0, 0, 0, 72, ! 72, 72, 72, 0, 20, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 493, 493, 493, 25, 0, 26, ! 27, 0, 0, 0, 0, 399, 401, 405, 138, 0, ! 0, 0, 0, 163, 8, 115, 10, 11, 0, 48, ! 48, 133, 12, 164, 0, 0, 174, 0, 0, 0, ! 0, 31, 0, 0, 0, 0, 165, 15, 0, 72, ! 0, 16, 17, 72, 0, 18, 0, 0, 72, 72, ! 0, 72, 0, 0, 92, 22, 0, 0, 0, 0, ! 0, 7, 8, 1059, 25, 0, 108, 109, 0, 553, ! 553, 553, 0, 0, 669, 670, 680, 0, 72, 0, ! 0, 92, 0, 0, 0, 0, 0, 0, 217, 0, ! 0, 48, 0, 174, 48, 0, 48, 0, 0, 20, ! 0, 0, 0, 172, 0, 0, 138, 138, 138, 0, ! 0, 0, 25, 405, 26, 27, 0, 0, 0, 0, ! 0, 174, 0, 0, 0, 0, 0, 218, 402, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 403, 174, ! 174, 406, 0, 0, 0, 0, 31, 218, 0, 0, ! 0, 404, 92, 0, 0, 0, 0, 0, 217, 0, ! 0, 92, 92, 0, 92, 92, 0, 174, 0, 0, ! 172, 48, 48, 133, 133, 133, 0, 48, 48, 0, ! 0, 399, 401, 405, 0, 0, 503, 504, 505, 506, ! 507, 508, 509, 510, 511, 512, 513, 514, 172, 516, ! 517, 518, 519, 520, 521, 522, 523, 524, 0, 0, ! 568, 48, 48, 48, 0, 0, 172, 172, 172, 0, ! 0, 0, 205, 1059, 1059, 1059, 414, 0, 0, 72, ! 72, 72, 0, 0, 466, 0, 0, 8, 175, 10, ! 176, 0, 0, 0, 172, 12, 0, 0, 0, 0, ! 641, 0, 0, 0, 48, 0, 0, 0, 0, 0, ! 15, 0, 0, 0, 16, 17, 0, 0, 18, 0, ! 0, 0, 0, 1061, 0, 218, 0, 0, 22, 0, ! 555, 555, 555, 0, 0, 0, 0, 25, 174, 108, ! 109, 0, 48, 48, 48, 0, 0, 8, 0, 10, ! 11, 72, 0, 0, 72, 12, 72, 0, 0, 0, ! 0, 0, 0, 553, 553, 0, 553, 0, 0, 0, ! 15, 0, 0, 831, 16, 0, 0, 0, 18, 0, ! 0, 1059, 0, 0, 0, 92, 0, 0, 22, 0, ! 0, 0, 0, 92, 92, 92, 0, 25, 0, 108, ! 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 218, 0, 172, 0, 553, 0, 553, ! 553, 0, 553, 0, 174, 0, 174, 0, 406, 406, ! 406, 72, 72, 72, 72, 72, 174, 72, 72, 0, ! 0, 174, 0, 0, 174, 0, 0, 0, 0, 1059, ! 1059, 1059, 508, 509, 510, 511, 512, 513, 514, 515, ! 516, 517, 518, 519, 520, 521, 522, 523, 524, 174, ! 0, 72, 72, 72, 0, 0, 92, 553, 92, 0, ! 0, 0, 0, 1061, 1061, 1061, 0, 0, 0, 92, ! 0, 48, 8, 115, 10, 11, 0, 0, 658, 0, ! 12, 172, 0, 172, 0, 172, 172, 172, 0, 0, ! 0, 0, 0, 172, 72, 15, 0, 0, 172, 16, ! 17, 172, 0, 18, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 22, 553, 547, 0, 0, 0, 0, ! 0, 0, 25, 1219, 108, 109, 172, 0, 0, 0, ! 0, 0, 72, 72, 72, 0, 0, 0, 548, 0, ! 0, 0, 799, 0, 0, 0, 0, 0, 549, 0, ! 0, 0, 0, 0, 555, 555, 0, 555, 550, 0, ! 0, 551, 552, 0, 555, 659, 0, 0, 0, 0, ! 0, 1061, 0, 92, 0, 1220, 503, 504, 505, 506, ! 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, ! 517, 518, 519, 520, 521, 522, 523, 524, 0, 0, ! 0, 0, 0, 0, 0, 553, 0, 553, 856, 0, ! 856, 856, 0, 555, 92, 92, 0, 92, 553, 0, ! 0, 0, 831, 831, 831, 511, 512, 513, 514, 515, ! 516, 517, 518, 519, 520, 521, 522, 523, 524, 1061, ! 1061, 1061, 0, 0, 218, 0, 0, 553, 553, 553, ! 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, ! 517, 518, 519, 520, 521, 522, 523, 524, 856, 0, ! 0, 0, 0, 0, 0, 0, 0, 174, 174, 0, ! 174, 72, 0, 0, 0, 172, 0, 172, 172, 0, ! 0, 831, 512, 513, 514, 515, 516, 517, 518, 519, ! 520, 521, 522, 523, 524, 0, 437, 406, 7, 8, ! 115, 10, 11, 0, 0, 0, 0, 12, 0, 0, ! 0, 0, 0, 0, 0, 555, 0, 0, 0, 0, ! 0, 0, 15, 466, 466, 466, 16, 17, 0, 0, ! 18, -453, 0, 0, 0, 172, 20, 0, 0, 0, ! 22, 438, 0, 0, 172, 172, 0, 172, 0, 25, ! 0, 26, 27, 0, 0, 439, 0, 440, 0, 0, ! 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, ! 0, 0, 0, 0, 920, 30, 0, 0, 0, 0, ! 0, 0, 0, 31, 0, 0, 0, 0, 32, 553, ! 553, 553, 553, 553, 0, 553, 0, 0, 0, 0, ! 0, 0, 0, -453, 0, 0, 555, 0, 555, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 555, ! 0, 0, 0, 555, 555, 555, 0, 0, 0, 763, ! 0, 7, 8, 115, 10, 259, 260, 261, 0, 262, ! 12, 831, 831, 831, 0, 0, 0, 0, 856, 856, ! 1009, 0, 0, 0, 0, 15, 263, 264, 265, 16, ! 17, 266, 0, 18, 0, 267, 268, 0, 269, 20, ! 270, 271, 0, 22, 0, 0, 0, 272, 273, 274, ! 275, 276, 25, 0, 26, 27, 1267, 0, -672, 277, ! 0, 0, 1009, 0, 0, 278, 0, 0, 279, 0, ! 0, 0, 0, 0, 0, 0, 280, 281, 282, 17, ! 553, 553, 553, 0, 283, 284, 285, 0, 0, 0, ! 174, 286, 0, 0, 0, 172, 172, 920, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, ! 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, ! 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, ! 523, 524, 0, 0, 799, 799, 0, 799, 0, 920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 643, 0, 752, 753, 0, 10, 469, 260, 261, ! 0, 262, 12, 0, 1074, 0, 0, 172, 0, 0, ! 856, 856, 1009, 1009, 1009, 0, 856, 15, 263, 264, ! 265, 16, 0, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 0, 0, 272, ! 273, 274, 275, 276, 25, 0, 754, 755, 644, 0, ! 174, 277, 174, 0, 0, 0, 0, 278, 0, 0, ! 279, 0, 1009, 1009, 1009, 0, 0, 0, 280, 281, ! 282, 0, 0, 0, 218, 0, 283, 284, 285, 0, ! 0, 0, 0, 286, 756, 0, 0, 172, 172, 172, ! 172, 920, 0, 172, 0, 0, 0, 0, 880, 287, ! 0, 0, 503, 504, 505, 506, 507, 508, 509, 510, ! 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, ! 521, 522, 523, 524, 0, 0, 0, 172, 0, 172, ! 0, 856, 856, 856, 0, 0, 0, 0, 0, 920, ! 920, 920, 0, 0, 0, 643, 0, 752, 753, 1096, ! 10, 469, 260, 261, 0, 262, 12, 0, 0, 0, ! 0, 0, 0, 1098, 0, 0, 0, 0, 0, 0, ! 406, 15, 263, 264, 265, 16, 0, 266, 0, 18, ! 0, 267, 268, 0, 269, 20, 270, 271, 0, 22, ! 0, 0, 0, 272, 273, 274, 275, 276, 25, 0, ! 754, 755, 644, 0, 0, 277, 0, 0, 172, 172, ! 172, 278, 0, 0, 279, 6, 0, 7, 8, 9, ! 10, 11, 280, 281, 282, 0, 12, 0, 0, 0, ! 283, 284, 285, 0, 0, 0, 0, 286, 406, 406, ! 406, 15, 0, 0, 0, 16, 17, 920, 0, 18, ! 0, 0, -415, 287, 0, 20, 0, 0, 0, 22, ! 0, 0, 363, 0, 0, 0, 0, 0, 25, 0, ! 26, 27, 0, 0, 28, 0, 0, 0, 0, 0, ! 174, 0, 0, 0, 29, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, ! 0, 0, 31, 0, 0, 0, 0, 32, 0, 0, ! 0, 0, 33, 0, 0, 920, 920, 920, 0, 1167, ! 0, 1025, 1026, 115, 10, 259, 260, 261, 0, 262, ! 12, 1027, 0, 1028, 1029, 1030, 1031, 1032, 1033, 1034, ! 1035, 1036, 1037, 13, 14, 15, 263, 264, 265, 16, ! 17, 266, 0, 18, 0, 267, 268, 172, 269, 20, ! 270, 271, 0, 22, 0, 0, 0, 272, 273, 274, ! 275, 276, 25, 0, 1038, 27, 387, 0, 1039, 277, ! 0, 0, 0, 0, 0, 278, 0, 0, 279, 0, ! 0, 0, 0, 0, 0, 0, 280, 281, 282, 0, ! 0, 0, 0, 0, 283, 284, 285, 0, 0, 0, ! 0, 286, 0, 1040, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1168, 287, 1024, 0, ! 1025, 1026, 115, 10, 259, 260, 261, 0, 262, 12, ! 1027, 0, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, ! 1036, 1037, 13, 14, 15, 263, 264, 265, 16, 17, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 0, 0, 272, 273, 274, 275, ! 276, 25, 0, 1038, 27, 387, 0, 1039, 277, 0, ! 0, 0, 0, 0, 278, 0, 0, 279, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 282, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 0, 0, 0, ! 286, 488, 1040, 7, 8, 115, 10, 259, 260, 261, ! 658, 262, 12, 0, 0, 0, 287, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 15, 263, 264, ! 265, 16, 17, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 547, 0, 272, ! 273, 274, 275, 276, 25, 0, 26, 27, -258, 0, ! 0, 277, 0, 0, 0, 0, 0, 278, 0, 0, ! 827, 0, 0, 0, 0, 0, 0, 0, 280, 281, ! 828, 0, 0, 0, 0, 0, 283, 284, 285, 0, ! 550, 0, 0, 829, 552, 0, 488, 659, 7, 8, ! 115, 10, 259, 260, 261, 658, 262, 12, 0, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 263, 264, 265, 16, 17, 266, 0, ! 18, 0, 267, 268, 0, 269, 20, 270, 271, 0, ! 22, 0, 547, 0, 272, 273, 274, 275, 276, 25, ! 0, 26, 27, -258, 0, 0, 277, 0, 0, 0, ! 0, 0, 278, 0, 0, 1056, 0, 0, 0, 0, ! 0, 0, 0, 280, 281, 1057, 0, 0, 0, 0, ! 0, 283, 284, 285, 0, 550, 0, 0, 1058, 552, ! 0, 643, 659, 752, 753, 0, 10, 469, 260, 261, ! 0, 262, 12, 0, 287, 0, 0, 0, 0, 1098, ! 0, 0, 0, 0, 0, 0, 0, 15, 263, 264, ! 265, 16, 0, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 0, 0, 272, ! 273, 274, 275, 276, 25, 0, 754, 755, 644, 0, ! 0, 277, 0, 0, 0, 0, 0, 278, 0, 0, ! 279, 0, 0, 0, 0, 0, 0, 0, 280, 281, ! 282, 0, 0, 0, 0, 0, 283, 284, 285, 643, ! 0, 752, 753, 286, 10, 469, 260, 261, 0, 262, ! 12, 0, 0, 0, 0, 0, 0, 0, 1133, 287, ! 0, 0, 0, 0, 0, 15, 263, 264, 265, 16, ! 0, 266, 0, 18, 0, 267, 268, 0, 269, 20, ! 270, 271, 0, 22, 0, 0, 0, 272, 273, 274, ! 275, 276, 25, 0, 754, 755, 644, 0, 0, 277, ! 0, 0, 0, 0, 223, 278, 0, 8, 279, 10, ! 11, 0, 0, 0, 0, 12, 280, 281, 282, 0, ! 0, 0, 0, 0, 283, 284, 285, 0, 0, 0, ! 15, 286, 756, 0, 16, 0, 0, 0, 18, 0, ! 224, 225, 0, 0, 0, 0, 0, 287, 22, 0, ! 226, 0, 0, 0, 0, 0, 0, 25, 0, 108, ! 109, 0, 227, 0, 0, 0, 228, 229, 230, 231, ! 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, ! 242, 243, 244, 245, 246, 247, 248, 0, 0, 249, ! 250, 251, 0, 488, 252, 7, 8, 253, 10, 259, ! 260, 261, 0, 262, 12, 0, 0, 0, 0, 0, ! 0, 0, 254, 0, 0, 0, 0, 0, 0, 15, ! 263, 264, 265, 16, 0, 266, 0, 18, 0, 267, ! 268, 0, 269, 20, 270, 271, 0, 22, 0, 0, ! 0, 272, 273, 274, 275, 276, 25, 0, 26, 27, ! -258, 0, 0, 277, 0, 0, 0, 0, 0, 278, ! 0, 0, 489, 0, 0, 0, 0, 0, 0, 0, ! 280, 281, 490, 0, 0, 0, 0, 0, 283, 284, ! 285, 643, 0, 7, 8, 491, 10, 469, 260, 261, ! 0, 262, 12, 0, 0, 0, 0, 0, 0, 0, ! 0, 287, 0, 0, 0, 0, 0, 15, 263, 264, ! 265, 16, 0, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 0, 0, 272, ! 273, 274, 275, 276, 25, 0, 26, 27, 644, 0, ! 0, 277, 0, 0, 0, 0, 0, 278, 0, 0, ! 279, 0, 0, 0, 0, 0, 0, 0, 280, 281, ! 282, 0, 0, 0, 0, 0, 283, 284, 285, 763, ! 0, 7, 8, 286, 10, 469, 260, 261, 0, 262, ! 12, 0, 0, 0, 0, 0, 0, 0, 0, 287, ! 0, 0, 0, 0, 0, 15, 263, 264, 265, 16, ! 0, 266, 0, 18, 0, 267, 268, 0, 269, 20, ! 270, 271, 0, 22, 0, 0, 0, 272, 273, 274, ! 275, 276, 25, 0, 26, 27, 0, 0, 0, 277, ! -672, 0, 0, 0, 0, 278, 0, 0, 279, 0, ! 0, 0, 0, 0, 0, 0, 280, 281, 282, 0, ! 0, 0, 0, 0, 283, 284, 285, 488, 0, 7, ! 8, 286, 10, 259, 260, 261, 0, 262, 12, 0, ! 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, ! 0, 0, 0, 15, 263, 264, 265, 16, 0, 266, ! 0, 18, 0, 267, 268, 0, 269, 20, 270, 271, ! 0, 22, 0, 0, 0, 272, 273, 274, 275, 276, ! 25, 0, 26, 27, -258, 0, 0, 277, 0, 0, ! 0, 0, 0, 278, 0, 0, 1232, 0, 0, 0, ! 0, 0, 0, 0, 280, 281, 1233, 0, 0, 0, ! 0, 0, 283, 284, 285, 1333, 0, 7, 8, 1234, ! 10, 259, 260, 261, 0, 262, 12, 0, 0, 0, ! 0, 0, 0, 0, 0, 287, 0, 0, 0, 0, ! 0, 15, 263, 264, 265, 16, 0, 266, 0, 18, ! 0, 267, 268, 0, 269, 20, 270, 271, 0, 22, ! 0, 0, 0, 272, 273, 274, 275, 276, 25, 0, ! 26, 27, 0, 0, -156, 277, 0, 0, 0, 0, ! 0, 278, 0, 0, 279, 0, 0, 0, 0, 0, ! 0, 0, 280, 281, 282, 0, 0, 0, 0, 0, ! 283, 284, 285, 763, 0, 7, 8, 286, 10, 469, ! 260, 261, 0, 262, 12, 0, 0, 0, 0, 0, ! 0, 0, 0, 287, 0, 0, 0, 0, 0, 15, ! 263, 264, 265, 16, 0, 266, 0, 18, 0, 267, ! 268, 0, 269, 20, 270, 271, 0, 22, 0, 0, ! 0, 272, 273, 274, 275, 276, 25, 0, 26, 27, ! 0, 0, 0, 277, 0, 0, 0, 0, 0, 278, ! 0, 0, 279, 0, 0, 0, 0, 0, 0, 0, ! 280, 281, 282, 0, 0, 0, 0, 0, 283, 284, ! 285, 839, 0, 7, 8, 286, 10, 469, 260, 261, ! 0, 262, 12, 0, 0, 0, 0, 0, 0, -672, ! 0, 287, 0, 0, 0, 0, 0, 15, 263, 264, ! 265, 16, 0, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 0, 0, 272, ! 273, 274, 275, 276, 25, 0, 26, 27, 0, 0, ! 0, 277, 0, 0, 0, 0, 0, 278, 0, 0, ! 279, 0, 0, 0, 0, 0, 0, 0, 280, 281, ! 282, 0, 0, 0, 0, 0, 283, 284, 285, 841, ! 0, 7, 8, 286, 10, 469, 260, 261, 0, 262, ! 12, 0, 0, 0, 0, 0, 0, 0, 0, 287, ! 0, 0, 0, 0, 0, 15, 263, 264, 265, 16, ! 0, 266, 0, 18, 0, 267, 268, 0, 269, 20, ! 270, 271, 0, 22, 0, 0, 0, 272, 273, 274, ! 275, 276, 25, 0, 26, 27, 0, 0, 0, 277, ! 0, 0, 0, 0, 0, 278, 0, 0, 279, 0, ! 0, 0, 0, 0, 0, 0, 280, 281, 282, 0, ! 0, 0, 0, 0, 283, 284, 285, 0, 0, 7, ! 8, 286, 10, 469, 260, 261, 0, 262, 12, 0, ! 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, ! 0, 0, 0, 15, 263, 264, 265, 16, 0, 266, ! 0, 18, 0, 267, 268, 0, 269, 20, 270, 271, ! 0, 22, 0, 0, 0, 272, 273, 274, 275, 276, ! 25, 0, 26, 27, 0, 0, 0, 277, 0, 0, ! 0, 0, 0, 278, 0, 0, 279, 437, 0, 7, ! 8, 115, 10, 11, 280, 281, 282, 0, 12, 0, ! 0, 0, 283, 284, 285, 0, 0, 0, 0, 286, ! 0, 0, 0, 15, 0, 0, 0, 16, 17, 0, ! 0, 18, -455, 0, 0, 287, 802, 20, 0, 0, ! 0, 22, 438, 0, 0, 0, 0, 0, 0, 0, ! 25, 0, 26, 27, 0, 0, 439, 437, 440, 7, ! 8, 115, 10, 11, 0, 0, 29, 0, 12, 0, ! 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, ! 0, 0, 0, 15, 31, 0, 0, 16, 17, 32, ! 0, 18, -454, 0, 0, 0, 0, 20, 0, 0, ! 0, 22, 438, 0, -455, 0, 0, 0, 0, 0, ! 25, 0, 26, 27, 0, 0, 439, 0, 440, 0, ! 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, ! 0, 0, 0, 0, 31, 0, 0, 0, 0, 32, ! 0, 0, 0, 1025, 1026, 115, 10, 259, 260, 261, ! 0, 262, 12, 1027, -454, 1028, 1029, 1030, 1031, 1032, ! 1033, 1034, 1035, 1036, 1037, 13, 14, 15, 263, 264, ! 265, 16, 17, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 0, 0, 272, ! 273, 274, 275, 276, 25, 0, 1038, 27, 387, 0, ! 1039, 277, 0, 0, 0, 0, 0, 278, 0, 0, ! 279, 0, 0, 0, 0, 0, 0, 0, 280, 281, ! 282, 0, 0, 0, 0, 0, 283, 284, 285, 0, ! 0, 0, 0, 286, 0, 1040, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 1172, 287, ! 1025, 1026, 115, 10, 259, 260, 261, 0, 262, 12, ! 1027, 0, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, ! 1036, 1037, 13, 14, 15, 263, 264, 265, 16, 17, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 0, 0, 272, 273, 274, 275, ! 276, 25, 0, 1038, 27, 387, 0, 1039, 277, 0, ! 0, 0, 0, 0, 278, 0, 0, 279, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 282, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 0, 0, 0, ! 286, 0, 1040, 0, 0, 1025, 1026, 115, 10, 259, ! 260, 261, 0, 262, 12, 1027, 287, 1028, 1029, 1030, ! 1031, 1032, 1033, 1034, 1035, 1036, 1037, 13, 14, 15, ! 263, 264, 265, 16, 17, 266, 0, 18, 0, 267, ! 268, 0, 269, 20, 270, 271, 0, 22, 0, 0, ! 0, 272, 273, 274, 275, 276, 25, 0, 1038, 27, ! 1311, 0, 1039, 277, 0, 0, 0, 0, 0, 278, ! 0, 0, 279, 0, 0, 0, 0, 0, 0, 0, ! 280, 281, 282, 0, 0, 0, 0, 0, 283, 284, ! 285, 0, 0, 0, 0, 286, 0, 1040, 0, 0, ! 1025, 1026, 115, 10, 259, 260, 261, 0, 262, 12, ! 1027, 287, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, ! 1036, 1037, 13, 14, 15, 263, 264, 265, 16, 17, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 0, 0, 272, 273, 274, 275, ! 276, 25, 0, 1038, 27, 0, 0, 1039, 277, 0, ! 0, 0, 0, 0, 278, 0, 0, 279, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 282, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 0, 0, 0, ! 286, 0, 1040, 7, 8, 115, 10, 259, 260, 261, ! 658, 262, 12, 0, 0, 0, 287, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 15, 263, 264, ! 265, 16, 17, 266, 0, 18, 0, 267, 268, 0, ! 269, 20, 270, 271, 0, 22, 0, 547, 0, 272, ! 273, 274, 275, 276, 25, 0, 26, 27, 0, 0, ! 0, 277, 0, 0, 0, 0, 0, 278, 0, 0, ! 827, 0, 0, 0, 0, 0, 0, 0, 280, 281, ! 828, 0, 0, 0, 0, 0, 283, 284, 285, 0, ! 550, 0, 0, 829, 552, 0, 0, 659, 7, 8, ! 115, 10, 259, 260, 261, 658, 262, 12, 0, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 263, 264, 265, 16, 17, 266, 0, ! 18, 0, 267, 268, 0, 269, 20, 270, 271, 0, ! 22, 0, 547, 0, 272, 273, 274, 275, 276, 25, ! 0, 26, 27, 0, 0, 0, 277, 0, 0, 0, ! 0, 0, 278, 0, 0, 1056, 0, 0, 0, 0, ! 0, 0, 0, 280, 281, 1057, 0, 0, 0, 0, ! 0, 283, 284, 285, 0, 550, 0, 0, 1058, 552, ! 7, 8, 659, 10, 259, 260, 261, 0, 262, 12, ! 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 263, 264, 265, 16, 0, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 547, 0, 272, 273, 274, 275, ! 276, 25, 0, 26, 27, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 278, 0, 0, 827, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 828, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 550, 0, 0, ! 829, 552, 7, 8, 0, 10, 259, 260, 261, 0, ! 262, 12, 0, 0, 0, 0, 287, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 15, 263, 264, 265, ! 16, 0, 266, 0, 18, 0, 267, 268, 0, 269, ! 20, 270, 271, 0, 22, 0, 547, 0, 272, 273, ! 274, 275, 276, 25, 0, 26, 27, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 278, 0, 0, 1056, ! 0, 0, 0, 0, 0, 0, 0, 280, 281, 1057, ! 0, 0, 0, 0, 0, 283, 284, 285, 0, 550, ! 0, 0, 1058, 552, 7, 8, 0, 10, 259, 260, ! 261, 0, 262, 12, 0, 0, 0, 0, 287, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 15, 263, ! 264, 265, 16, 0, 266, 0, 18, 0, 267, 268, ! 0, 269, 20, 270, 271, 0, 22, 0, 0, 0, ! 272, 273, 274, 275, 276, 25, 0, 26, 27, 0, ! 0, 0, 277, 0, 0, 0, 0, 0, 278, 0, ! 0, 279, 0, 0, 0, 0, 344, 0, 0, 280, ! 281, 282, 0, 0, 0, 0, 0, 283, 284, 285, ! 0, 0, 7, 8, 286, 10, 469, 260, 261, 0, ! 262, 12, 0, 0, 0, 0, 0, 0, 0, 0, ! 287, 0, 0, 0, 0, 0, 15, 263, 264, 265, ! 16, 0, 266, 0, 18, 0, 267, 268, 0, 269, ! 20, 270, 271, 0, 22, 0, 0, 0, 272, 273, ! 274, 275, 276, 25, 0, 26, 27, 0, 0, 1149, ! 277, 0, 0, 0, 0, 0, 278, 0, 0, 279, ! 0, 0, 0, 0, 0, 0, 0, 280, 281, 282, ! 0, 0, 0, 0, 0, 283, 284, 285, 0, 0, ! 7, 8, 286, 10, 259, 260, 261, 0, 262, 12, ! 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, ! 0, 0, 0, 0, 15, 263, 264, 265, 16, 0, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 0, 0, 272, 273, 274, 275, ! 276, 25, 0, 26, 27, 0, 0, 0, 277, 0, ! 0, 0, 0, 0, 278, 0, 0, 279, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 282, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 0, 7, 8, ! 286, 10, 469, 260, 261, 0, 262, 12, 0, 0, ! 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, ! 0, 0, 15, 263, 264, 265, 16, 0, 266, 0, ! 18, 0, 267, 268, 0, 269, 20, 270, 271, 0, ! 22, 0, 0, 0, 272, 273, 274, 275, 276, 25, ! 0, 26, 27, 0, 0, 0, 277, 0, 0, 0, ! 0, 0, 278, 0, 0, 279, 0, 0, 0, 0, ! 0, 0, 0, 280, 281, 282, 0, 0, 0, 0, ! 0, 283, 284, 285, 0, 0, 7, 8, 286, 10, ! 469, 260, 261, 0, 262, 12, 0, 0, 0, 0, ! 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, ! 15, 263, 264, 265, 16, 0, 266, 0, 18, 0, ! 267, 268, 0, 269, 20, 270, 271, 0, 22, 0, ! 0, 0, 272, 273, 274, 275, 276, 25, 0, 26, ! 27, 500, 0, 0, 0, 0, 0, 0, 0, 0, ! 278, 0, 0, 279, 0, 0, 0, 0, 0, 0, ! 0, 280, 281, 282, 0, 0, 0, 0, 0, 283, ! 284, 285, 0, 0, 7, 8, 501, 10, 469, 260, ! 261, 0, 262, 12, 0, 0, 0, 0, 0, 0, ! 0, 0, 287, 0, 0, 0, 0, 0, 15, 263, ! 264, 265, 16, 0, 266, 0, 18, 0, 267, 268, ! 0, 269, 20, 270, 271, 0, 22, 0, 0, 0, ! 272, 273, 274, 275, 276, 25, 0, 26, 27, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 278, 0, ! 0, 279, 0, 0, 0, 0, 0, 0, 0, 280, ! 281, 282, 0, 0, 0, 0, 0, 283, 284, 285, ! 0, 0, 0, 0, 286, 537, 7, 736, 0, 10, ! 469, 260, 261, 0, 262, 12, 0, 0, 0, 0, ! 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 15, 263, 264, 265, 16, 0, 266, 0, 18, 0, ! 267, 268, 0, 269, 20, 270, 271, 0, 22, 0, ! 0, 0, 272, 273, 274, 275, 276, 25, 0, 26, ! 27, 0, 0, 0, 277, 0, 0, 0, 0, 0, ! 278, 0, 0, 279, 0, 0, 0, 0, 0, 0, ! 0, 280, 281, 282, 0, 0, 0, 0, 0, 283, ! 284, 285, 0, 0, 7, 8, 286, 10, 469, 260, ! 261, 0, 262, 12, 0, 0, 0, 0, 0, 0, ! 0, 0, 287, 0, 0, 0, 0, 0, 15, 263, ! 264, 265, 16, 0, 266, 0, 18, 0, 267, 268, ! 0, 269, 20, 270, 271, 0, 22, 0, 0, 0, ! 272, 273, 274, 275, 276, 25, 0, 26, 27, 0, ! 0, 0, 277, 0, 0, 0, 0, 0, 278, 0, ! 0, 489, 0, 0, 0, 0, 0, 0, 0, 280, ! 281, 490, 0, 0, 0, 0, 0, 283, 284, 285, ! 0, 0, 999, 8, 491, 10, 469, 260, 261, 0, ! 262, 12, 0, 0, 0, 0, 0, 0, 0, 0, ! 287, 0, 0, 0, 0, 0, 15, 263, 264, 265, ! 16, 0, 266, 0, 18, 0, 267, 268, 0, 269, ! 20, 270, 271, 0, 22, 0, 0, 0, 272, 273, ! 274, 275, 276, 25, 0, 26, 27, 0, 0, 0, ! 277, 0, 0, 0, 0, 0, 278, 0, 0, 279, ! 0, 0, 0, 0, 0, 0, 0, 280, 281, 282, ! 0, 0, 0, 0, 0, 283, 284, 285, 0, 0, ! 7, 8, 286, 10, 469, 260, 261, 0, 262, 12, ! 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, ! 0, 0, 0, 0, 15, 263, 264, 265, 16, 0, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 0, 0, 272, 273, 274, 275, ! 276, 25, 0, 26, 27, 0, 0, 0, 277, 0, ! 0, 0, 0, 0, 278, 0, 0, 1232, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 1233, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 0, 7, 8, ! 1234, 10, 469, 260, 261, 0, 262, 12, 0, 0, ! 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, ! 0, 0, 15, 263, 264, 265, 16, 0, 266, 0, ! 18, 0, 267, 268, 0, 269, 20, 270, 271, 0, ! 22, 0, 0, 0, 272, 273, 274, 275, 276, 25, ! 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 278, 0, 0, 279, 0, 0, 0, 0, ! 0, 0, 0, 280, 281, 282, 0, 0, 0, 0, ! 0, 283, 284, 285, 0, 0, 7, 8, 286, 10, ! 469, 260, 261, 0, 262, 12, 0, 0, 0, 0, ! 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, ! 15, 263, 264, 265, 16, 0, 266, 0, 18, 0, ! 267, 268, 0, 269, 20, 270, 271, 0, 22, 0, ! 0, 0, 272, 273, 274, 275, 276, 25, 0, 26, ! 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 278, 0, 0, 489, 0, 0, 0, 0, 0, 0, ! 0, 280, 281, 490, 0, 0, 0, 0, 0, 283, ! 284, 285, 0, 0, 7, 8, 491, 10, 259, 260, ! 261, 0, 262, 12, 0, 0, 0, 0, 0, 0, ! 0, 0, 287, 0, 0, 0, 0, 0, 15, 263, ! 264, 265, 16, 0, 266, 0, 18, 0, 267, 268, ! 0, 269, 20, 270, 271, 0, 22, 0, 0, 0, ! 272, 273, 274, 275, 276, 25, 0, 26, 27, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 278, 0, ! 0, 1232, 0, 0, 0, 0, 0, 0, 0, 280, ! 281, 1233, 0, 0, 0, 0, 0, 283, 284, 285, ! 0, 0, 7, 8, 1234, 10, 469, 260, 261, 0, ! 262, 12, 0, 0, 0, 0, 0, 0, 0, 0, ! 287, 0, 0, 0, 0, 0, 15, 263, 0, 0, ! 16, 0, 266, 0, 18, 0, 267, 268, 0, 269, ! 20, 270, 271, 0, 22, 0, 0, 0, 272, 273, ! 274, 275, 276, 25, 0, 26, 27, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 278, 0, 0, 279, ! 0, 0, 0, 0, 0, 0, 0, 280, 281, 282, ! 0, 0, 0, 0, 0, 283, 284, 285, 0, 0, ! 7, 8, 470, 10, 469, 260, 261, 0, 262, 12, ! 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, ! 0, 0, 0, 0, 15, 263, 0, 0, 16, 0, ! 266, 0, 18, 0, 267, 268, 0, 269, 20, 270, ! 271, 0, 22, 0, 0, 0, 272, 273, 274, 275, ! 276, 25, 0, 26, 27, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 278, 0, 0, 279, 0, 0, ! 0, 0, 0, 0, 0, 280, 281, 282, 0, 0, ! 0, 0, 0, 283, 284, 285, 0, 0, 0, 6, ! 473, 7, 8, 9, 10, 11, 0, 0, 0, 0, ! 12, 0, 0, 0, 0, 0, 287, 0, 0, 0, ! 0, 0, 0, 13, 14, 15, 0, 0, 0, 16, ! 17, 0, 0, 18, 0, 0, 0, 19, 0, 20, ! 0, 0, 21, 22, 23, 144, 24, 7, 8, 115, ! 10, 11, 25, 0, 26, 27, 12, 0, 28, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, ! 0, 15, 0, 0, 0, 16, 17, 0, 30, 18, ! 0, 0, 0, 0, 0, 20, 31, 0, 0, 22, ! 0, 32, 0, 0, 0, 0, 33, 34, 25, 0, ! 26, 27, -330, 8, -330, 10, 211, 0, 0, 0, ! 0, 12, 0, 0, 29, 0, 0, 0, 0, 7, ! 8, 175, 10, 176, 30, 0, 15, 0, 12, 0, ! 16, -330, 31, 0, 18, 0, 0, 32, 0, 0, ! -330, 0, 0, 15, 22, 0, 547, 16, 17, 0, ! 0, 18, 0, 25, 0, 108, 109, 20, 0, 0, ! 0, 22, 0, 0, 0, 0, 0, 0, 0, 548, ! 25, 0, 26, 27, 0, 0, 177, 0, 0, 549, ! 0, 0, 0, 0, 0, 0, 29, -330, 0, 550, ! 0, 0, 551, 552, 0, 0, 30, 697, 8, 175, ! 10, 176, 0, 0, 31, 0, 12, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 15, 0, 0, 0, 16, 17, 0, 0, 18, ! 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, ! 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, ! 26, 27, 0, 0, 0, 0, 700, 0, 0, 0, ! 0, 0, 0, 0, 29, 0, 7, 8, 115, 10, ! 11, 0, 0, 902, 30, 12, 0, 0, 0, 0, ! 0, 0, 31, 0, 0, 0, 0, 32, 0, 0, ! 15, 0, 0, 0, 16, 17, 0, 0, 18, 0, ! 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, ! 0, 0, 7, 8, 175, 10, 176, 25, 0, 26, ! 27, 12, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 29, 0, 0, 15, 0, 0, 0, ! 16, 17, 0, 30, 18, 0, 0, 0, 0, 0, ! 20, 31, 0, 0, 22, 0, 32, 0, 7, 8, ! 175, 10, 176, 25, 0, 26, 27, 12, 0, 1161, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, ! 0, 0, 15, 0, 0, 0, 16, 17, 0, 30, ! 18, 0, 0, 0, 0, 0, 20, 31, 0, 0, ! 22, 0, 32, 0, 0, 0, 0, 0, 0, 25, ! 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, ! 0, 0, 0, 31, 0, 580, 0, 0, 32, 503, ! 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, ! 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, ! 524, 1256, 503, 504, 505, 506, 507, 508, 509, 510, ! 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, ! 521, 522, 523, 524, 1300, 503, 504, 505, 506, 507, ! 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, ! 518, 519, 520, 521, 522, 523, 524, 503, 504, 505, ! 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, ! 516, 517, 518, 519, 520, 521, 522, 523, 524, 509, ! 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, ! 520, 521, 522, 523, 524, 510, 511, 512, 513, 514, ! 515, 516, 517, 518, 519, 520, 521, 522, 523, 524 }; static const short yycheck[] = { 4, ! 139, 4, 339, 50, 154, 155, 387, 4, 339, 412, ! 446, 339, 78, 305, 60, 292, 311, 311, 380, 24, ! 4, 339, 130, 131, 57, 178, 610, 24, 378, 24, ! 96, 396, 791, 77, 39, 70, 12, 155, 327, 158, ! 24, 870, 39, 12, 1214, 21, 153, 52, 186, 187, ! 79, 4, 4, 22, 120, 39, 1217, 1047, 181, 212, ! 113, 114, 67, 215, 1054, 701, 189, 178, 396, 1103, ! 117, 24, 24, 9, 79, 54, 187, 29, 30, 84, ! 85, 49, 1238, 9, 60, 435, 39, 39, 85, 9, ! 85, 60, 97, 98, 138, 79, 1265, 36, 145, 47, ! 34, 85, 60, 256, 111, 47, 7, 114, 54, 59, ! 3, 4, 36, 118, 149, 0, 121, 161, 1, 3, ! 4, 1262, 1292, 7, 59, 37, 62, 79, 74, 64, ! 174, 166, 85, 85, 59, 1291, 1305, 60, 143, 0, ! 75, 146, 54, 1312, 60, 93, 143, 182, 181, 552, ! 108, 93, 305, 129, 47, 47, 189, 41, 108, 143, ! 61, 54, 1318, 56, 57, 107, 10, 135, 1202, 108, ! 54, 107, 56, 57, 108, 58, 1317, 1346, 130, 131, ! 472, 107, 107, 1012, 108, 108, 70, 107, 10, 825, ! 143, 143, 108, 1354, 313, 59, 80, 1267, 1367, 178, ! 93, 93, 170, 962, 88, 210, 1376, 186, 187, 93, ! 1379, 163, 164, 210, 47, 59, 59, 32, 62, 12, ! 54, 10, 48, 551, 376, 84, 210, 62, 62, 22, ! 558, 1221, 4, 212, 384, 385, 386, 59, 97, 98, ! 62, 1311, 64, 107, 60, 311, 93, 4, 279, 302, ! 7, 282, 257, 97, 285, 58, 93, 210, 210, 290, ! 93, 60, 121, 107, 107, 312, 384, 385, 299, 298, ! 59, 423, 107, 62, 569, 97, 383, 256, 416, 417, ! 60, 286, 335, 93, 56, 57, 1276, 4, 3, 427, ! 410, 4, 108, 298, 402, 403, 99, 54, 418, 56, ! 57, 306, 278, 426, 593, 381, 417, 4, 97, 108, ! 47, 74, 450, 70, 298, 130, 131, 132, 3, 4, ! 396, 101, 329, 80, 462, 4, 305, 64, 335, 666, ! 1320, 3, 4, 368, 339, 666, 701, 94, 666, 56, ! 57, 54, 692, 56, 57, 495, 298, 1106, 324, 1, ! 165, 3, 4, 47, 6, 339, 93, 70, 363, 56, ! 57, 59, 406, 80, 4, 54, 363, 80, 363, 413, ! 662, 56, 57, 701, 6, 7, 4, 56, 57, 363, ! 12, 94, 4, 80, 56, 57, 54, 339, 1044, 41, ! 1046, 396, 468, 426, 62, 430, 443, 59, 60, 93, ! 94, 80, 54, 35, 56, 57, 74, 93, 80, 107, ! 363, 363, 396, 45, 449, 47, 56, 57, 60, 463, ! 464, 62, 466, 826, 60, 54, 54, 286, 56, 57, ! 7, 793, 54, 10, 56, 57, 88, 416, 417, 444, ! 80, 446, 70, 47, 396, 74, 477, 452, 427, 446, ! 402, 403, 80, 47, 530, 4, 532, 533, 489, 490, ! 825, 93, 446, 47, 54, 470, 107, 47, 473, 621, ! 47, 450, 62, 478, 479, 480, 481, 482, 107, 62, ! 339, 54, 59, 462, 74, 62, 491, 64, 564, 93, ! 94, 74, 497, 446, 446, 4, 501, 825, 75, 93, ! 650, 829, 23, 107, 1088, 534, 47, 56, 57, 93, ! 554, 555, 849, 93, 94, 559, 93, 94, 849, 32, ! 97, 849, 62, 873, 500, 47, 854, 107, 533, 534, ! 107, 849, 650, 685, 74, 44, 108, 396, 833, 833, ! 59, 62, 58, 681, 906, 54, 551, 56, 57, 47, ! 534, 58, 93, 558, 831, 602, 75, 604, 605, 47, ! 606, 637, 912, 3, 4, 717, 719, 551, 896, 972, ! 93, 93, 94, 58, 558, 3, 4, 107, 59, 64, ! 3, 4, 534, 722, 94, 107, 32, 402, 403, 404, ! 47, 953, 954, 452, 75, 93, 548, 549, 603, 551, ! 47, 41, 607, 47, 107, 93, 558, 1191, 1192, 9, ! 47, 470, 107, 41, 473, 662, 56, 57, 41, 478, ! 479, 480, 481, 482, 3, 4, 605, 64, 56, 57, ! 606, 54, 491, 56, 57, 107, 93, 606, 497, 58, ! 80, 47, 501, 62, 59, 60, 93, 94, 88, 93, ! 1031, 1087, 80, 47, 108, 699, 93, 1019, 64, 1243, ! 88, 666, 41, 4, 5, 88, 61, 702, 644, 74, ! 59, 60, 707, 708, 533, 967, 711, 56, 57, 3, ! 1008, 47, 666, 662, 130, 131, 132, 93, 94, 94, ! 31, 724, 3, 4, 58, 36, 701, 61, 62, 93, ! 1062, 80, 681, 1287, 1288, 59, 59, 60, 113, 88, ! 3, 4, 110, 54, 666, 56, 57, 701, 794, 165, ! 125, 75, 1306, 101, 3, 4, 62, 93, 94, 1091, ! 1058, 807, 94, 809, 1096, 60, 54, 62, 97, 98, ! 719, 3, 4, 54, 62, 56, 57, 58, 94, 701, ! 54, 93, 796, 797, 1046, 799, 74, 62, 62, 1140, ! 1141, 110, 41, 56, 57, 58, 93, 833, 173, 845, ! 74, 802, 93, 925, 926, 74, 928, 56, 57, 41, ! 824, 3, 4, 47, 58, 790, 60, 58, 62, 794, ! 61, 62, 54, 93, 56, 57, 827, 828, 60, 875, ! 9, 877, 74, 879, 6, 7, 74, 666, 70, 88, ! 12, 74, 856, 108, 819, 1177, 1178, 222, 80, 41, ! 825, 107, 86, 87, 829, 47, 88, 91, 92, 93, ! 94, 93, 54, 35, 56, 57, 59, 968, 969, 1201, ! 971, 825, 701, 45, 849, 829, 851, 107, 70, 854, ! 25, 26, 25, 26, 107, 25, 26, 107, 80, 3, ! 3, 4, 5, 6, 7, 849, 88, 843, 90, 60, ! 854, 93, 94, 825, 107, 827, 828, 829, 83, 84, ! 1242, 108, 887, 918, 887, 58, 701, 108, 58, 62, ! 887, 896, 62, 58, 1256, 59, 60, 849, 1006, 1007, ! 852, 853, 854, 887, 110, 310, 911, 7, 884, 3, ! 4, 107, 896, 56, 57, 1296, 3, 4, 25, 26, ! 1072, 110, 4, 110, 929, 7, 931, 286, 60, 61, ! 93, 790, 929, 3, 4, 887, 110, 7, 982, 107, ! 1321, 107, 347, 974, 896, 929, 107, 41, 1056, 1057, ! 107, 58, 25, 26, 41, 62, 402, 403, 404, 54, ! 819, 6, 56, 57, 110, 1009, 825, 59, 60, 56, ! 57, 41, 54, 93, 56, 57, 929, 929, 954, 59, ! 60, 1273, 60, 61, 54, 58, 56, 57, 70, 62, ! 849, 58, 1142, 60, 88, 62, 47, 1044, 80, 1046, ! 70, 88, 1364, 1008, 1154, 58, 1011, 60, 64, 62, ! 80, 1348, 59, 60, 1011, 262, 263, 1348, 88, 59, ! 1348, 93, 108, 93, 1008, 1056, 1057, 1011, 727, 728, ! 729, 1075, 60, 64, 393, 64, 107, 1189, 1190, 854, ! 1045, 60, 1047, 1019, 1047, 60, 1122, 1082, 1083, 1054, ! 1047, 1054, 911, 1058, 1006, 1007, 1008, 1054, 1011, 1011, ! 465, 1037, 60, 1047, 60, 60, 59, 1046, 107, 107, ! 1054, 107, 931, 107, 1058, 1119, 64, 64, 110, 1231, ! 93, 896, 1087, 59, 62, 59, 59, 1226, 1238, 64, ! 1087, 62, 1244, 107, 75, 1047, 632, 107, 3, 4, ! 107, 107, 1054, 1087, 1056, 1057, 1058, 107, 107, 75, ! 107, 470, 75, 75, 473, 107, 475, 476, 107, 478, ! 1273, 4, 5, 62, 1232, 1233, 3, 4, 1163, 62, ! 59, 62, 491, 110, 1087, 1087, 41, 107, 107, 675, ! 545, 1291, 501, 108, 94, 88, 505, 683, 31, 54, ! 1185, 56, 57, 36, 107, 107, 561, 62, 1134, 23, ! 37, 38, 110, 47, 41, 70, 110, 1319, 1318, 25, ! 26, 54, 531, 56, 57, 80, 32, 54, 537, 56, ! 57, 107, 107, 88, 107, 107, 110, 107, 93, 108, ! 107, 1006, 1007, 1008, 58, 108, 60, 107, 62, 1349, ! 64, 1232, 1233, 59, 60, 34, 64, 64, 64, 1214, ! 64, 1214, 1217, 1218, 107, 93, 1221, 1214, 1221, 93, ! 1217, 93, 93, 108, 1221, 107, 107, 1274, 4, 1234, ! 1214, 110, 6, 1217, 1218, 110, 12, 1221, 107, 107, ! 107, 1056, 1057, 1058, 62, 108, 22, 23, 24, 62, ! 60, 60, 107, 29, 30, 701, 32, 1262, 107, 107, ! 107, 7, 1214, 39, 1299, 1217, 1218, 60, 107, 1221, ! 14, 1276, 64, 1276, 50, 107, 52, 107, 1262, 1276, ! 1232, 1233, 62, 62, 60, 110, 47, 1292, 93, 1292, ! 93, 67, 1276, 60, 1273, 1292, 80, 81, 82, 83, ! 84, 60, 78, 79, 93, 107, 107, 107, 1292, 85, ! 1262, 107, 1317, 107, 15, 1320, 9, 1320, 60, 110, ! 96, 107, 60, 1320, 1276, 107, 107, 96, 60, 865, ! 60, 93, 59, 1317, 107, 111, 1320, 60, 114, 93, ! 1292, 117, 118, 1348, 120, 60, 64, 123, 9, 1164, ! 126, 127, 107, 60, 130, 131, 132, 107, 3, 4, ! 5, 6, 7, 9, 1348, 1317, 107, 143, 1320, 145, ! 146, 1376, 107, 1376, 910, 1234, 60, 0, 0, 1376, ! 0, 365, 329, 919, 2, 4, 849, 163, 164, 165, ! 35, 143, 1376, 153, 930, 143, 1348, 873, 5, 6, ! 7, 121, 1202, 1376, 497, 12, 1213, 1045, 854, 54, ! 843, 56, 57, 58, 10, 191, 1217, 1232, 1233, 1234, ! 644, 838, 39, 39, 1376, 32, 341, 692, 35, 25, ! 26, 863, 912, 1011, 210, 929, 32, 927, 45, 798, ! 381, 444, 577, 836, 220, 5, 6, 7, 170, 534, ! 896, 47, 12, 888, 1047, 396, 302, 102, 103, 104, ! 1341, 1343, 666, 59, 60, 61, 62, 931, 64, -1, ! 829, -1, 32, -1, -1, 35, -1, -1, -1, -1, ! -1, 257, 258, -1, -1, 45, -1, -1, -1, 1348, ! -1, -1, 4, -1, 6, 7, -1, 93, 94, -1, ! 12, 97, -1, 3, 4, -1, -1, 7, -1, -1, ! -1, 107, -1, -1, -1, 27, 921, -1, -1, 31, ! -1, -1, 298, 35, -1, -1, 302, 468, 304, 305, ! 306, -1, -1, 45, 1070, 1071, 312, -1, -1, -1, ! -1, 41, 54, -1, 56, 57, 58, 47, 1084, 1085, ! -1, -1, 911, 329, 54, 4, 56, 57, 7, 335, ! 1006, 1007, 1008, 339, -1, -1, -1, -1, -1, -1, ! 70, -1, -1, -1, -1, 351, -1, -1, 354, -1, ! 80, 93, -1, 359, -1, -1, 991, 363, 88, 530, ! 90, 532, 533, 93, 94, -1, -1, -1, 47, -1, ! -1, -1, 3, 4, -1, 54, 7, 56, 57, -1, ! 1056, 1057, 1058, -1, -1, -1, -1, 558, -1, -1, ! -1, 70, 398, 564, 400, -1, 402, 403, 404, -1, ! -1, 80, -1, -1, 410, -1, -1, -1, -1, 415, ! 41, 90, 418, -1, 93, 94, 47, -1, 1184, -1, ! -1, -1, 1188, 54, -1, 56, 57, -1, -1, 435, ! -1, -1, 438, -1, -1, -1, -1, 443, 444, 70, ! 446, -1, -1, -1, -1, -1, 452, 1036, -1, 80, ! 78, 79, 80, 81, 82, 83, 84, 88, -1, 90, ! -1, -1, 93, 94, -1, -1, 637, -1, -1, 1058, ! -1, -1, -1, 479, 480, 481, 482, -1, -1, 1245, ! 1246, -1, 1248, 1249, -1, -1, -1, -1, 1164, -1, ! -1, -1, -1, 3, 4, 5, 6, 7, -1, -1, ! 10, -1, 12, 1092, 1093, 1094, 1095, -1, -1, -1, ! -1, -1, -1, -1, -1, 1104, -1, 27, 1284, -1, ! -1, 31, 32, -1, -1, 35, -1, -1, 534, 4, ! 536, 41, 7, -1, -1, 45, 52, 47, 54, -1, ! 546, -1, 548, 549, 54, 551, 56, 57, -1, -1, ! -1, -1, 558, -1, -1, -1, 1232, 1233, 1234, -1, ! 70, 732, 1151, -1, -1, -1, -1, -1, -1, -1, ! 80, 1337, 47, -1, -1, -1, -1, -1, 88, 54, ! 90, 56, 57, 93, 94, -1, -1, 97, 304, 305, ! 306, -1, -1, -1, -1, 70, 602, 603, 604, 605, ! 606, 607, 118, -1, -1, 80, 76, 77, 78, 79, ! 80, 81, 82, 83, 84, 90, -1, -1, 93, 94, ! -1, -1, -1, 794, -1, -1, -1, -1, 1217, 1218, ! 146, -1, -1, -1, -1, -1, 807, -1, 809, -1, ! -1, 4, -1, -1, 7, 1234, -1, -1, -1, 4, ! 5, 6, 7, -1, -1, 10, 662, 12, -1, 32, ! 666, -1, 178, -1, -1, 671, 672, -1, 674, -1, ! 186, 187, 27, 1262, 845, -1, 31, 32, -1, -1, ! 35, -1, -1, -1, 47, -1, 692, -1, -1, -1, ! 45, 54, -1, 56, 57, 701, 4, -1, -1, 54, ! -1, 56, 57, -1, 875, -1, 877, 70, 879, -1, ! -1, -1, -1, 719, -1, -1, -1, 80, -1, -1, ! -1, 727, 728, 729, -1, 896, 1315, 90, 1317, -1, ! 93, 94, -1, -1, -1, -1, -1, -1, -1, 47, ! -1, -1, 97, -1, -1, -1, 54, -1, 56, 57, ! -1, 1340, -1, -1, -1, 4, -1, -1, 131, 132, ! -1, -1, 70, 12, -1, 1354, -1, -1, -1, -1, ! -1, -1, 80, 22, 23, 24, -1, -1, -1, -1, ! 29, 30, 90, 32, 790, 93, 94, 3, 4, -1, ! 39, 7, 165, -1, -1, -1, -1, -1, -1, -1, ! -1, 50, -1, 52, 810, -1, 812, -1, 4, -1, ! 6, 60, -1, 819, -1, -1, 12, 823, 67, 825, ! -1, 827, 828, 829, -1, 41, -1, 833, -1, -1, ! 79, 27, 548, 549, -1, 31, 85, -1, 54, 35, ! 56, 57, -1, 849, -1, 851, 852, 853, 854, 45, ! -1, -1, -1, -1, 70, -1, -1, -1, 54, -1, ! 56, 57, 111, -1, 80, -1, -1, -1, 117, 118, ! -1, -1, 88, -1, 123, -1, -1, 93, 127, -1, ! -1, 130, 131, 132, -1, -1, 602, -1, 604, 605, ! 896, 607, -1, -1, 143, -1, 145, 146, -1, -1, ! 416, 417, 4, -1, 6, 7, 912, -1, -1, -1, ! 12, 427, -1, 286, 163, 164, 165, -1, 924, -1, ! -1, 927, -1, 929, -1, 931, -1, -1, 444, -1, ! -1, -1, -1, 35, -1, -1, -1, -1, 454, -1, ! -1, -1, 191, 45, -1, 47, 662, -1, -1, -1, ! -1, 1122, 54, -1, 56, 57, -1, -1, -1, -1, ! -1, 210, 968, 969, -1, 971, -1, -1, 70, -1, ! -1, 220, -1, -1, -1, -1, -1, -1, 80, -1, ! -1, 3, 4, 5, 6, 7, -1, -1, 90, -1, ! 12, 93, 94, 1164, -1, -1, -1, -1, 1004, 1005, ! 1006, 1007, 1008, 719, 1010, 1011, -1, -1, 257, 258, ! 32, -1, -1, 35, -1, -1, 3, 4, -1, 41, ! -1, -1, -1, 45, -1, 47, -1, -1, -1, -1, ! 403, 404, 54, -1, 56, 57, -1, -1, 1044, 1045, ! 1046, -1, -1, -1, -1, -1, -1, -1, 70, 298, ! 1056, 1057, 1058, 302, 41, 304, 305, 306, 80, -1, ! 47, -1, 311, 312, -1, -1, 88, 54, 90, 56, ! 57, 93, 94, -1, -1, 62, 84, -1, -1, -1, ! 329, 1087, -1, 70, -1, -1, -1, 603, -1, 605, ! 339, -1, -1, 80, 810, -1, 812, 470, -1, -1, ! 473, 88, 351, -1, -1, 354, 93, 823, -1, -1, ! 359, 827, 828, 121, 363, -1, 632, 490, 491, 1125, ! 1126, 1127, -1, -1, -1, -1, -1, -1, 501, 378, ! -1, -1, -1, -1, -1, -1, 852, 853, -1, 3, ! 4, 5, 6, 7, -1, -1, 662, -1, 12, 398, ! -1, 400, -1, 402, 403, 404, -1, -1, 1164, 675, ! -1, 410, -1, -1, -1, 681, 415, 683, 32, 418, ! -1, 35, -1, -1, -1, -1, -1, 41, -1, -1, ! -1, 45, -1, 47, -1, 558, 435, -1, -1, 438, ! 54, -1, 56, 57, 443, 444, -1, 446, -1, -1, ! -1, -1, -1, 452, -1, -1, 70, -1, -1, -1, ! -1, -1, 4, -1, 6, 7, 80, -1, -1, -1, ! 12, -1, -1, -1, 88, -1, 1232, 1233, 1234, 93, ! 479, 480, 481, 482, -1, 27, -1, -1, -1, 31, ! -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 45, 3, 4, 5, 6, 7, -1, ! -1, 10, 54, 12, 56, 57, -1, -1, 1274, 277, ! -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, ! -1, -1, 31, 32, -1, 534, 35, 536, 1004, 1005, ! 1006, 1007, 41, -1, 1010, -1, 45, -1, -1, 548, ! 549, 93, 551, -1, -1, 54, -1, 56, 57, 558, ! -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, ! 569, 70, -1, -1, -1, -1, -1, -1, 701, -1, ! -1, 80, -1, -1, -1, -1, -1, 29, 30, 88, ! 1056, 1057, 1348, 4, 93, 6, 7, 39, 97, 865, ! -1, 12, -1, 602, 603, 604, 605, 606, 607, 732, ! 52, -1, -1, -1, -1, -1, 27, -1, -1, -1, ! 31, -1, 380, 381, 35, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 45, -1, -1, -1, 396, -1, ! -1, -1, -1, 54, 910, 56, 57, 4, -1, 6, ! 7, -1, -1, 919, -1, 12, -1, -1, -1, 1125, ! 1126, 1127, -1, 662, 930, -1, -1, 666, -1, -1, ! 27, -1, 671, 672, 31, 674, -1, -1, 35, -1, ! -1, 123, 440, -1, -1, 127, -1, -1, 45, -1, ! 47, -1, -1, 692, -1, -1, -1, 54, -1, 56, ! 57, 143, 701, -1, 146, 828, 829, -1, -1, -1, ! 468, -1, -1, 70, -1, -1, -1, -1, -1, -1, ! 719, 163, 164, 80, -1, -1, -1, -1, 727, 728, ! 729, 854, -1, 90, -1, -1, 93, 94, -1, 497, ! -1, -1, 500, -1, -1, 503, 504, -1, 506, 507, ! 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, ! 518, 519, 520, 521, 522, 523, 524, -1, 210, -1, ! -1, -1, 530, 896, 532, 533, -1, -1, 220, 1045, ! 1046, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 790, -1, 3, 4, -1, -1, 7, -1, -1, ! 558, -1, -1, -1, 1070, 1071, 564, -1, -1, -1, ! -1, 810, -1, 812, -1, -1, -1, -1, 1084, 1085, ! 819, 579, 580, -1, 823, -1, 825, -1, 827, 828, ! 829, 41, -1, -1, 833, -1, -1, 1, -1, 3, ! 4, 5, 6, 7, 54, -1, 56, 57, 12, -1, ! 849, -1, 851, 852, 853, 854, -1, -1, -1, -1, ! 70, -1, -1, 27, -1, -1, -1, 31, 32, -1, ! 80, 35, 36, -1, 873, -1, -1, 41, 88, 637, ! -1, 45, 46, 93, 1007, 1008, 644, -1, -1, -1, ! 54, -1, 56, 57, -1, -1, 60, 896, 62, 3, ! 4, -1, -1, 7, -1, -1, 70, -1, -1, 351, ! -1, -1, 354, 912, -1, -1, 80, 359, 1184, -1, ! -1, -1, 1188, -1, 88, 924, -1, -1, 927, 93, ! 929, -1, 931, -1, 1057, 1058, -1, 41, -1, -1, ! -1, -1, 700, 47, 108, -1, -1, -1, -1, -1, ! 54, -1, 56, 57, -1, -1, 398, -1, 400, -1, ! -1, -1, -1, -1, -1, -1, 70, -1, -1, 968, ! 969, -1, 971, 415, 732, -1, 80, 3, 4, 1245, ! 1246, 7, 1248, 1249, 88, -1, 90, -1, -1, 93, ! 94, -1, -1, -1, -1, -1, -1, -1, 756, -1, ! -1, 443, 444, -1, 446, 1004, 1005, 1006, 1007, 1008, ! -1, 1010, 1011, -1, -1, 41, -1, -1, 1284, -1, ! -1, 47, 3, 4, -1, -1, 7, -1, 54, -1, ! 56, 57, -1, -1, -1, 793, 794, -1, -1, -1, ! -1, 1164, -1, -1, 70, 1044, 1045, 1046, -1, 807, ! -1, 809, -1, -1, 80, -1, -1, 1056, 1057, 1058, ! 41, -1, 88, -1, 90, -1, -1, 93, 94, -1, ! -1, 1337, -1, 54, -1, 56, 57, 835, -1, -1, ! -1, -1, 163, 164, 165, -1, -1, 845, 1087, 70, ! -1, -1, -1, 3, 4, 5, 6, 7, -1, 80, ! -1, -1, 12, -1, -1, -1, -1, 88, -1, -1, ! 1233, 1234, 93, -1, -1, -1, -1, 875, -1, 877, ! -1, 879, 32, -1, -1, 35, 1125, 1126, 1127, -1, ! -1, 41, -1, -1, -1, 45, -1, 47, 896, -1, ! -1, 4, -1, -1, 54, -1, 56, 57, 906, -1, ! -1, -1, -1, -1, -1, -1, -1, 1, 916, 917, ! 70, 603, -1, -1, -1, 1164, 29, 30, -1, 32, ! 80, -1, -1, -1, -1, -1, 39, -1, 88, 23, ! 90, 25, 26, 93, 94, -1, -1, 50, 32, 52, ! -1, -1, -1, -1, -1, 953, 954, -1, -1, 957, ! -1, -1, -1, -1, 3, 4, -1, -1, 7, -1, ! -1, 74, -1, -1, 58, 59, 60, 61, 62, -1, ! 64, -1, -1, -1, 666, -1, -1, -1, -1, 671, ! 672, -1, 674, 1232, 1233, 1234, -1, -1, -1, 3, ! 4, -1, 41, 7, -1, -1, -1, -1, 111, -1, ! 113, 114, -1, -1, 117, 54, -1, 56, 57, -1, ! 123, 1019, 125, -1, 127, -1, -1, 130, 131, 132, ! -1, 70, -1, -1, 1032, 1274, -1, 41, -1, -1, ! 143, 80, 145, 146, -1, -1, -1, -1, -1, 88, ! 54, -1, 56, 57, 93, -1, -1, -1, -1, -1, ! 163, 164, 165, -1, 1062, -1, 70, -1, -1, -1, ! 173, -1, -1, -1, -1, -1, 80, 398, -1, 400, ! 1078, 402, 403, 404, 88, -1, -1, -1, 191, 93, ! 1, 3, 4, 1091, 415, 7, -1, -1, 1096, -1, ! 1098, -1, -1, -1, -1, -1, -1, 210, -1, 1348, ! -1, 4, 23, -1, 25, 26, -1, 220, -1, -1, ! -1, 32, 443, -1, 1122, -1, -1, -1, -1, 41, ! -1, -1, -1, -1, -1, -1, 29, 30, -1, 32, ! -1, -1, 54, -1, 56, 57, 39, 58, 59, 60, ! 61, 62, -1, 64, -1, -1, -1, 50, 70, 52, ! -1, -1, -1, -1, 3, 4, 1164, -1, 80, -1, ! 852, 853, -1, -1, -1, -1, 88, -1, -1, 1177, ! 1178, 93, -1, 286, -1, -1, -1, -1, 1186, 1187, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 302, ! -1, -1, 41, 1201, -1, -1, -1, 310, -1, 312, ! -1, -1, -1, -1, -1, 54, -1, 56, 57, -1, ! -1, 1219, -1, 62, 117, -1, 329, -1, -1, -1, ! 123, 70, 335, -1, 127, -1, -1, 130, 131, 132, ! -1, 80, 924, -1, 1242, 927, -1, 929, 351, 88, ! 143, 354, 145, 146, 93, -1, 359, -1, 1256, -1, ! -1, 4, 5, 6, 7, -1, -1, 10, -1, 12, ! 163, 164, 165, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 27, -1, -1, -1, 31, 32, ! -1, -1, 35, -1, -1, 398, -1, 400, 191, 402, ! 403, 404, 45, -1, -1, -1, -1, 410, -1, -1, ! -1, 54, 415, 56, 57, 418, -1, 210, -1, -1, ! -1, -1, 1004, 1005, -1, -1, -1, 220, 1010, 1011, ! -1, 4, -1, 6, 7, -1, -1, -1, -1, 12, ! 443, 444, -1, 446, -1, -1, -1, -1, -1, -1, ! 671, 672, -1, 674, -1, -1, -1, -1, 12, -1, ! -1, -1, 35, 1045, -1, -1, 1364, 470, 22, 23, ! 473, -1, 45, -1, 47, 29, 30, -1, 32, -1, ! 701, 54, -1, 56, 57, -1, 489, 490, 491, -1, ! -1, -1, -1, -1, -1, -1, -1, 70, 501, -1, ! 4, 5, 6, 7, -1, 1087, 60, 80, 12, -1, ! -1, -1, -1, -1, -1, -1, -1, 90, 311, 312, ! 93, 94, -1, 27, -1, -1, -1, 31, 32, 3, ! 4, 35, -1, -1, -1, -1, 3, 4, -1, -1, ! -1, 45, 545, 1125, 1126, 1127, -1, -1, -1, -1, ! 54, -1, 56, 57, -1, 558, -1, 111, 351, 113, ! 114, 354, -1, -1, -1, -1, 359, 41, -1, 123, ! 74, 125, 126, 127, 41, -1, 130, 131, 132, -1, ! 54, -1, 56, 57, -1, 378, 60, 54, -1, 56, ! 57, -1, -1, -1, -1, -1, 70, -1, -1, 602, ! 603, 604, 605, 70, -1, 398, 80, 400, -1, 402, ! 403, 404, -1, 80, 88, -1, -1, 410, -1, 93, ! -1, 88, 415, -1, 1, 418, 93, -1, -1, -1, ! -1, 852, 853, 854, 73, 74, 75, 76, 77, 78, ! 79, 80, 81, 82, 83, 84, 23, -1, 25, 26, ! 443, 444, -1, 446, -1, 32, -1, -1, -1, 662, ! -1, -1, -1, 666, -1, -1, 220, -1, 671, 672, ! -1, 674, -1, -1, -1, 896, -1, -1, -1, -1, ! -1, 58, 59, 60, 61, 62, 1, 64, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, 701, -1, ! -1, -1, -1, 924, 258, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, 32, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, 732, ! 45, -1, -1, -1, 49, 50, 51, 52, 53, 54, ! -1, 56, 57, -1, -1, -1, 61, -1, 302, -1, ! 304, 305, 67, 546, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, ! -1, 86, 87, 88, -1, 329, 3, 4, 93, -1, ! -1, 335, 97, 1004, 1005, 1006, 1007, 1008, -1, 1010, ! -1, -1, 107, 347, 109, -1, -1, 351, -1, -1, ! 354, -1, -1, -1, -1, 359, -1, -1, -1, 602, ! 603, 604, 605, -1, 41, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 827, 828, 829, 54, -1, 56, ! 57, -1, -1, -1, -1, 1056, 1057, 1058, 32, -1, ! -1, -1, -1, 70, 4, 5, 6, 7, -1, 852, ! 853, 854, 12, 80, -1, -1, 50, -1, -1, -1, ! -1, 88, -1, -1, -1, -1, 93, 27, -1, 662, ! -1, 31, 32, 666, -1, 35, -1, -1, 671, 672, ! -1, 674, -1, -1, 438, 45, -1, -1, -1, -1, ! -1, 3, 4, 896, 54, -1, 56, 57, -1, 304, ! 305, 306, -1, -1, 1125, 1126, 1127, -1, 701, -1, ! -1, 465, -1, -1, -1, -1, -1, -1, 921, -1, ! -1, 924, -1, 117, 927, -1, 929, -1, -1, 41, ! -1, -1, -1, 50, -1, -1, 130, 131, 132, -1, ! -1, -1, 54, 1164, 56, 57, -1, -1, -1, -1, ! -1, 145, -1, -1, -1, -1, -1, 74, 70, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 80, 163, ! 164, 165, -1, -1, -1, -1, 88, 94, -1, -1, ! -1, 93, 536, -1, -1, -1, -1, -1, 991, -1, ! -1, 545, 546, -1, 548, 549, -1, 191, -1, -1, ! 117, 1004, 1005, 1006, 1007, 1008, -1, 1010, 1011, -1, ! -1, 1232, 1233, 1234, -1, -1, 63, 64, 65, 66, ! 67, 68, 69, 70, 71, 72, 73, 74, 145, 76, ! 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, ! 833, 1044, 1045, 1046, -1, -1, 163, 164, 165, -1, ! -1, -1, 606, 1056, 1057, 1058, 173, -1, -1, 852, ! 853, 854, -1, -1, 258, -1, -1, 4, 5, 6, ! 7, -1, -1, -1, 191, 12, -1, -1, -1, -1, ! 873, -1, -1, -1, 1087, -1, -1, -1, -1, -1, ! 27, -1, -1, -1, 31, 32, -1, -1, 35, -1, ! -1, -1, -1, 896, -1, 222, -1, -1, 45, -1, ! 304, 305, 306, -1, -1, -1, -1, 54, 312, 56, ! 57, -1, 1125, 1126, 1127, -1, -1, 4, -1, 6, ! 7, 924, -1, -1, 927, 12, 929, -1, -1, -1, ! -1, -1, -1, 548, 549, -1, 551, -1, -1, -1, ! 27, -1, -1, 558, 31, -1, -1, -1, 35, -1, ! -1, 1164, -1, -1, -1, 719, -1, -1, 45, -1, ! -1, -1, -1, 727, 728, 729, -1, 54, -1, 56, ! 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 310, -1, 312, -1, 602, -1, 604, ! 605, -1, 607, -1, 398, -1, 400, -1, 402, 403, ! 404, 1004, 1005, 1006, 1007, 1008, 410, 1010, 1011, -1, ! -1, 415, -1, -1, 418, -1, -1, -1, -1, 1232, ! 1233, 1234, 68, 69, 70, 71, 72, 73, 74, 75, ! 76, 77, 78, 79, 80, 81, 82, 83, 84, 443, ! -1, 1044, 1045, 1046, -1, -1, 810, 662, 812, -1, ! -1, -1, -1, 1056, 1057, 1058, -1, -1, -1, 823, ! -1, 1274, 4, 5, 6, 7, -1, -1, 10, -1, ! 12, 398, -1, 400, -1, 402, 403, 404, -1, -1, ! -1, -1, -1, 410, 1087, 27, -1, -1, 415, 31, ! 32, 418, -1, 35, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 45, 719, 47, -1, -1, -1, -1, ! -1, -1, 54, 10, 56, 57, 443, -1, -1, -1, ! -1, -1, 1125, 1126, 1127, -1, -1, -1, 70, -1, ! -1, -1, 536, -1, -1, -1, -1, -1, 80, -1, ! -1, -1, -1, -1, 548, 549, -1, 551, 90, -1, ! -1, 93, 94, -1, 558, 97, -1, -1, -1, -1, ! -1, 1164, -1, 927, -1, 62, 63, 64, 65, 66, ! 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, ! 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, ! -1, -1, -1, -1, -1, 810, -1, 812, 602, -1, ! 604, 605, -1, 607, 968, 969, -1, 971, 823, -1, ! -1, -1, 827, 828, 829, 71, 72, 73, 74, 75, ! 76, 77, 78, 79, 80, 81, 82, 83, 84, 1232, ! 1233, 1234, -1, -1, 561, -1, -1, 852, 853, 854, ! 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, ! 77, 78, 79, 80, 81, 82, 83, 84, 662, -1, ! -1, -1, -1, -1, -1, -1, -1, 671, 672, -1, ! 674, 1274, -1, -1, -1, 602, -1, 604, 605, -1, ! -1, 896, 72, 73, 74, 75, 76, 77, 78, 79, ! 80, 81, 82, 83, 84, -1, 1, 701, 3, 4, ! 5, 6, 7, -1, -1, -1, -1, 12, -1, -1, ! -1, -1, -1, -1, -1, 719, -1, -1, -1, -1, ! -1, -1, 27, 727, 728, 729, 31, 32, -1, -1, ! 35, 36, -1, -1, -1, 662, 41, -1, -1, -1, ! 45, 46, -1, -1, 671, 672, -1, 674, -1, 54, ! -1, 56, 57, -1, -1, 60, -1, 62, -1, -1, ! -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, -1, 701, 80, -1, -1, -1, -1, ! -1, -1, -1, 88, -1, -1, -1, -1, 93, 1004, ! 1005, 1006, 1007, 1008, -1, 1010, -1, -1, -1, -1, ! -1, -1, -1, 108, -1, -1, 810, -1, 812, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 823, ! -1, -1, -1, 827, 828, 829, -1, -1, -1, 1, ! -1, 3, 4, 5, 6, 7, 8, 9, -1, 11, ! 12, 1056, 1057, 1058, -1, -1, -1, -1, 852, 853, ! 854, -1, -1, -1, -1, 27, 28, 29, 30, 31, ! 32, 33, -1, 35, -1, 37, 38, -1, 40, 41, ! 42, 43, -1, 45, -1, -1, -1, 49, 50, 51, ! 52, 53, 54, -1, 56, 57, 58, -1, 60, 61, ! -1, -1, 896, -1, -1, 67, -1, -1, 70, -1, ! -1, -1, -1, -1, -1, -1, 78, 79, 80, 32, ! 1125, 1126, 1127, -1, 86, 87, 88, -1, -1, -1, ! 924, 93, -1, -1, -1, 852, 853, 854, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, ! 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, ! 83, 84, -1, -1, 968, 969, -1, 971, -1, 896, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 1, -1, 3, 4, -1, 6, 7, 8, 9, ! -1, 11, 12, -1, 921, -1, -1, 924, -1, -1, ! 1004, 1005, 1006, 1007, 1008, -1, 1010, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, -1, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, 58, -1, ! 1044, 61, 1046, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, 1056, 1057, 1058, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, 991, -1, 86, 87, 88, -1, ! -1, -1, -1, 93, 94, -1, -1, 1004, 1005, 1006, ! 1007, 1008, -1, 1010, -1, -1, -1, -1, 108, 109, ! -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, ! 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, ! 81, 82, 83, 84, -1, -1, -1, 1044, -1, 1046, ! -1, 1125, 1126, 1127, -1, -1, -1, -1, -1, 1056, ! 1057, 1058, -1, -1, -1, 1, -1, 3, 4, 110, ! 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, ! -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, ! 1164, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, 45, ! -1, -1, -1, 49, 50, 51, 52, 53, 54, -1, ! 56, 57, 58, -1, -1, 61, -1, -1, 1125, 1126, ! 1127, 67, -1, -1, 70, 1, -1, 3, 4, 5, ! 6, 7, 78, 79, 80, -1, 12, -1, -1, -1, ! 86, 87, 88, -1, -1, -1, -1, 93, 1232, 1233, ! 1234, 27, -1, -1, -1, 31, 32, 1164, -1, 35, ! -1, -1, 108, 109, -1, 41, -1, -1, -1, 45, ! -1, -1, 48, -1, -1, -1, -1, -1, 54, -1, ! 56, 57, -1, -1, 60, -1, -1, -1, -1, -1, ! 1274, -1, -1, -1, 70, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, ! -1, -1, 88, -1, -1, -1, -1, 93, -1, -1, ! -1, -1, 98, -1, -1, 1232, 1233, 1234, -1, 1, ! -1, 3, 4, 5, 6, 7, 8, 9, -1, 11, ! 12, 13, -1, 15, 16, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, ! 32, 33, -1, 35, -1, 37, 38, 1274, 40, 41, ! 42, 43, -1, 45, -1, -1, -1, 49, 50, 51, ! 52, 53, 54, -1, 56, 57, 58, -1, 60, 61, ! -1, -1, -1, -1, -1, 67, -1, -1, 70, -1, ! -1, -1, -1, -1, -1, -1, 78, 79, 80, -1, ! -1, -1, -1, -1, 86, 87, 88, -1, -1, -1, ! -1, 93, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 108, 109, 1, -1, ! 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, ! 13, -1, 15, 16, 17, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ! 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, -1, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, 58, -1, 60, 61, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, -1, -1, -1, ! 93, 1, 95, 3, 4, 5, 6, 7, 8, 9, ! 10, 11, 12, -1, -1, -1, 109, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, 32, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, 47, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, 58, -1, ! -1, 61, -1, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, -1, -1, -1, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, 88, -1, ! 90, -1, -1, 93, 94, -1, 1, 97, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, 32, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! 45, -1, 47, -1, 49, 50, 51, 52, 53, 54, ! -1, 56, 57, 58, -1, -1, 61, -1, -1, -1, ! -1, -1, 67, -1, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, ! -1, 86, 87, 88, -1, 90, -1, -1, 93, 94, ! -1, 1, 97, 3, 4, -1, 6, 7, 8, 9, ! -1, 11, 12, -1, 109, -1, -1, -1, -1, 19, ! -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, -1, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, 58, -1, ! -1, 61, -1, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, -1, -1, -1, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, 88, 1, ! -1, 3, 4, 93, 6, 7, 8, 9, -1, 11, ! 12, -1, -1, -1, -1, -1, -1, -1, 108, 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, ! 42, 43, -1, 45, -1, -1, -1, 49, 50, 51, ! 52, 53, 54, -1, 56, 57, 58, -1, -1, 61, ! -1, -1, -1, -1, 1, 67, -1, 4, 70, 6, ! 7, -1, -1, -1, -1, 12, 78, 79, 80, -1, ! -1, -1, -1, -1, 86, 87, 88, -1, -1, -1, ! 27, 93, 94, -1, 31, -1, -1, -1, 35, -1, ! 37, 38, -1, -1, -1, -1, -1, 109, 45, -1, ! 47, -1, -1, -1, -1, -1, -1, 54, -1, 56, ! 57, -1, 59, -1, -1, -1, 63, 64, 65, 66, ! 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, ! 77, 78, 79, 80, 81, 82, 83, -1, -1, 86, ! 87, 88, -1, 1, 91, 3, 4, 94, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, -1, ! -1, -1, 109, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, 45, -1, -1, ! -1, 49, 50, 51, 52, 53, 54, -1, 56, 57, ! 58, -1, -1, 61, -1, -1, -1, -1, -1, 67, ! -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, ! 78, 79, 80, -1, -1, -1, -1, -1, 86, 87, ! 88, 1, -1, 3, 4, 93, 6, 7, 8, 9, ! -1, 11, 12, -1, -1, -1, -1, -1, -1, -1, ! -1, 109, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, -1, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, 58, -1, ! -1, 61, -1, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, -1, -1, -1, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, 88, 1, ! -1, 3, 4, 93, 6, 7, 8, 9, -1, 11, ! 12, -1, -1, -1, -1, -1, -1, -1, -1, 109, ! -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, ! -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, ! 42, 43, -1, 45, -1, -1, -1, 49, 50, 51, ! 52, 53, 54, -1, 56, 57, -1, -1, -1, 61, ! 62, -1, -1, -1, -1, 67, -1, -1, 70, -1, ! -1, -1, -1, -1, -1, -1, 78, 79, 80, -1, ! -1, -1, -1, -1, 86, 87, 88, 1, -1, 3, ! 4, 93, 6, 7, 8, 9, -1, 11, 12, -1, ! -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, ! -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, ! -1, 35, -1, 37, 38, -1, 40, 41, 42, 43, ! -1, 45, -1, -1, -1, 49, 50, 51, 52, 53, ! 54, -1, 56, 57, 58, -1, -1, 61, -1, -1, ! -1, -1, -1, 67, -1, -1, 70, -1, -1, -1, ! -1, -1, -1, -1, 78, 79, 80, -1, -1, -1, ! -1, -1, 86, 87, 88, 1, -1, 3, 4, 93, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, ! -1, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, ! -1, 37, 38, -1, 40, 41, 42, 43, -1, 45, ! -1, -1, -1, 49, 50, 51, 52, 53, 54, -1, ! 56, 57, -1, -1, 60, 61, -1, -1, -1, -1, ! -1, 67, -1, -1, 70, -1, -1, -1, -1, -1, ! -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, ! 86, 87, 88, 1, -1, 3, 4, 93, 6, 7, ! 8, 9, -1, 11, 12, -1, -1, -1, -1, -1, ! -1, -1, -1, 109, -1, -1, -1, -1, -1, 27, ! 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, 45, -1, -1, ! -1, 49, 50, 51, 52, 53, 54, -1, 56, 57, ! -1, -1, -1, 61, -1, -1, -1, -1, -1, 67, ! -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, ! 78, 79, 80, -1, -1, -1, -1, -1, 86, 87, ! 88, 1, -1, 3, 4, 93, 6, 7, 8, 9, ! -1, 11, 12, -1, -1, -1, -1, -1, -1, 107, ! -1, 109, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, -1, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, -1, -1, ! -1, 61, -1, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, -1, -1, -1, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, 88, 1, ! -1, 3, 4, 93, 6, 7, 8, 9, -1, 11, ! 12, -1, -1, -1, -1, -1, -1, -1, -1, 109, ! -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, ! -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, ! 42, 43, -1, 45, -1, -1, -1, 49, 50, 51, ! 52, 53, 54, -1, 56, 57, -1, -1, -1, 61, ! -1, -1, -1, -1, -1, 67, -1, -1, 70, -1, ! -1, -1, -1, -1, -1, -1, 78, 79, 80, -1, ! -1, -1, -1, -1, 86, 87, 88, -1, -1, 3, ! 4, 93, 6, 7, 8, 9, -1, 11, 12, -1, ! -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, ! -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, ! -1, 35, -1, 37, 38, -1, 40, 41, 42, 43, ! -1, 45, -1, -1, -1, 49, 50, 51, 52, 53, ! 54, -1, 56, 57, -1, -1, -1, 61, -1, -1, ! -1, -1, -1, 67, -1, -1, 70, 1, -1, 3, ! 4, 5, 6, 7, 78, 79, 80, -1, 12, -1, ! -1, -1, 86, 87, 88, -1, -1, -1, -1, 93, ! -1, -1, -1, 27, -1, -1, -1, 31, 32, -1, ! -1, 35, 36, -1, -1, 109, 110, 41, -1, -1, ! -1, 45, 46, -1, -1, -1, -1, -1, -1, -1, ! 54, -1, 56, 57, -1, -1, 60, 1, 62, 3, ! 4, 5, 6, 7, -1, -1, 70, -1, 12, -1, ! -1, -1, -1, -1, -1, -1, 80, -1, -1, -1, ! -1, -1, -1, 27, 88, -1, -1, 31, 32, 93, ! -1, 35, 36, -1, -1, -1, -1, 41, -1, -1, ! -1, 45, 46, -1, 108, -1, -1, -1, -1, -1, ! 54, -1, 56, 57, -1, -1, 60, -1, 62, -1, ! -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 80, -1, -1, -1, ! -1, -1, -1, -1, 88, -1, -1, -1, -1, 93, ! -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, ! -1, 11, 12, 13, 108, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ! 30, 31, 32, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, -1, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, 58, -1, ! 60, 61, -1, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, -1, -1, -1, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, 88, -1, ! -1, -1, -1, 93, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 108, 109, 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, -1, 15, 16, 17, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ! 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, -1, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, 58, -1, 60, 61, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, -1, -1, -1, ! 93, -1, 95, -1, -1, 3, 4, 5, 6, 7, ! 8, 9, -1, 11, 12, 13, 109, 15, 16, 17, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, 30, 31, 32, 33, -1, 35, -1, 37, ! 38, -1, 40, 41, 42, 43, -1, 45, -1, -1, ! -1, 49, 50, 51, 52, 53, 54, -1, 56, 57, ! 58, -1, 60, 61, -1, -1, -1, -1, -1, 67, ! -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, ! 78, 79, 80, -1, -1, -1, -1, -1, 86, 87, ! 88, -1, -1, -1, -1, 93, -1, 95, -1, -1, ! 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, ! 13, 109, 15, 16, 17, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, -1, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, -1, -1, 60, 61, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, -1, -1, -1, ! 93, -1, 95, 3, 4, 5, 6, 7, 8, 9, ! 10, 11, 12, -1, -1, -1, 109, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, ! 30, 31, 32, 33, -1, 35, -1, 37, 38, -1, ! 40, 41, 42, 43, -1, 45, -1, 47, -1, 49, ! 50, 51, 52, 53, 54, -1, 56, 57, -1, -1, ! -1, 61, -1, -1, -1, -1, -1, 67, -1, -1, ! 70, -1, -1, -1, -1, -1, -1, -1, 78, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, 88, -1, ! 90, -1, -1, 93, 94, -1, -1, 97, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, 32, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! 45, -1, 47, -1, 49, 50, 51, 52, 53, 54, ! -1, 56, 57, -1, -1, -1, 61, -1, -1, -1, ! -1, -1, 67, -1, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, ! -1, 86, 87, 88, -1, 90, -1, -1, 93, 94, ! 3, 4, 97, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, ! 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, 47, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, 90, -1, -1, ! 93, 94, 3, 4, -1, 6, 7, 8, 9, -1, ! 11, 12, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, 45, -1, 47, -1, 49, 50, ! 51, 52, 53, 54, -1, 56, 57, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 67, -1, -1, 70, ! -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, ! -1, -1, -1, -1, -1, 86, 87, 88, -1, 90, ! -1, -1, 93, 94, 3, 4, -1, 6, 7, 8, ! 9, -1, 11, 12, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, ! 49, 50, 51, 52, 53, 54, -1, 56, 57, -1, ! -1, -1, 61, -1, -1, -1, -1, -1, 67, -1, ! -1, 70, -1, -1, -1, -1, 75, -1, -1, 78, ! 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, ! -1, -1, 3, 4, 93, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, ! 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, 45, -1, -1, -1, 49, 50, ! 51, 52, 53, 54, -1, 56, 57, -1, -1, 60, ! 61, -1, -1, -1, -1, -1, 67, -1, -1, 70, ! -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, ! -1, -1, -1, -1, -1, 86, 87, 88, -1, -1, ! 3, 4, 93, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, -1, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, -1, -1, -1, 61, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, -1, 3, 4, ! 93, 6, 7, 8, 9, -1, 11, 12, -1, -1, ! -1, -1, -1, -1, -1, -1, 109, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! 45, -1, -1, -1, 49, 50, 51, 52, 53, 54, ! -1, 56, 57, -1, -1, -1, 61, -1, -1, -1, ! -1, -1, 67, -1, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, ! -1, 86, 87, 88, -1, -1, 3, 4, 93, 6, ! 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, ! -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, ! 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, ! 37, 38, -1, 40, 41, 42, 43, -1, 45, -1, ! -1, -1, 49, 50, 51, 52, 53, 54, -1, 56, ! 57, 58, -1, -1, -1, -1, -1, -1, -1, -1, ! 67, -1, -1, 70, -1, -1, -1, -1, -1, -1, ! -1, 78, 79, 80, -1, -1, -1, -1, -1, 86, ! 87, 88, -1, -1, 3, 4, 93, 6, 7, 8, ! 9, -1, 11, 12, -1, -1, -1, -1, -1, -1, ! -1, -1, 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, ! 49, 50, 51, 52, 53, 54, -1, 56, 57, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, ! -1, 70, -1, -1, -1, -1, -1, -1, -1, 78, ! 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, ! -1, -1, -1, -1, 93, 94, 3, 4, -1, 6, ! 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, ! 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, ! 37, 38, -1, 40, 41, 42, 43, -1, 45, -1, ! -1, -1, 49, 50, 51, 52, 53, 54, -1, 56, ! 57, -1, -1, -1, 61, -1, -1, -1, -1, -1, ! 67, -1, -1, 70, -1, -1, -1, -1, -1, -1, ! -1, 78, 79, 80, -1, -1, -1, -1, -1, 86, ! 87, 88, -1, -1, 3, 4, 93, 6, 7, 8, ! 9, -1, 11, 12, -1, -1, -1, -1, -1, -1, ! -1, -1, 109, -1, -1, -1, -1, -1, 27, 28, ! 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, ! 49, 50, 51, 52, 53, 54, -1, 56, 57, -1, ! -1, -1, 61, -1, -1, -1, -1, -1, 67, -1, ! -1, 70, -1, -1, -1, -1, -1, -1, -1, 78, ! 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, ! -1, -1, 3, 4, 93, 6, 7, 8, 9, -1, ! 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, ! 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, ! 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, 45, -1, -1, -1, 49, 50, ! 51, 52, 53, 54, -1, 56, 57, -1, -1, -1, ! 61, -1, -1, -1, -1, -1, 67, -1, -1, 70, ! -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, ! -1, -1, -1, -1, -1, 86, 87, 88, -1, -1, ! 3, 4, 93, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, -1, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, -1, -1, -1, 61, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, -1, 3, 4, ! 93, 6, 7, 8, 9, -1, 11, 12, -1, -1, ! -1, -1, -1, -1, -1, -1, 109, -1, -1, -1, ! -1, -1, 27, 28, 29, 30, 31, -1, 33, -1, ! 35, -1, 37, 38, -1, 40, 41, 42, 43, -1, ! 45, -1, -1, -1, 49, 50, 51, 52, 53, 54, ! -1, 56, 57, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 67, -1, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, ! -1, 86, 87, 88, -1, -1, 3, 4, 93, 6, 7, 8, 9, -1, 11, 12, -1, -1, -1, -1, ! -1, -1, -1, -1, 109, -1, -1, -1, -1, -1, ! 27, 28, 29, 30, 31, -1, 33, -1, 35, -1, ! 37, 38, -1, 40, 41, 42, 43, -1, 45, -1, ! -1, -1, 49, 50, 51, 52, 53, 54, -1, 56, ! 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 67, -1, -1, 70, -1, -1, -1, -1, -1, -1, ! -1, 78, 79, 80, -1, -1, -1, -1, -1, 86, ! 87, 88, -1, -1, 3, 4, 93, 6, 7, 8, ! 9, -1, 11, 12, -1, -1, -1, -1, -1, -1, ! -1, -1, 109, -1, -1, -1, -1, -1, 27, 28, ! 29, 30, 31, -1, 33, -1, 35, -1, 37, 38, ! -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, ! 49, 50, 51, 52, 53, 54, -1, 56, 57, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 67, -1, ! -1, 70, -1, -1, -1, -1, -1, -1, -1, 78, ! 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, ! -1, -1, 3, 4, 93, 6, 7, 8, 9, -1, ! 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, ! 109, -1, -1, -1, -1, -1, 27, 28, -1, -1, ! 31, -1, 33, -1, 35, -1, 37, 38, -1, 40, ! 41, 42, 43, -1, 45, -1, -1, -1, 49, 50, ! 51, 52, 53, 54, -1, 56, 57, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 67, -1, -1, 70, ! -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, ! -1, -1, -1, -1, -1, 86, 87, 88, -1, -1, ! 3, 4, 93, 6, 7, 8, 9, -1, 11, 12, ! -1, -1, -1, -1, -1, -1, -1, -1, 109, -1, ! -1, -1, -1, -1, 27, 28, -1, -1, 31, -1, ! 33, -1, 35, -1, 37, 38, -1, 40, 41, 42, ! 43, -1, 45, -1, -1, -1, 49, 50, 51, 52, ! 53, 54, -1, 56, 57, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 67, -1, -1, 70, -1, -1, ! -1, -1, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, -1, -1, 86, 87, 88, -1, -1, -1, 1, ! 93, 3, 4, 5, 6, 7, -1, -1, -1, -1, ! 12, -1, -1, -1, -1, -1, 109, -1, -1, -1, ! -1, -1, -1, 25, 26, 27, -1, -1, -1, 31, ! 32, -1, -1, 35, -1, -1, -1, 39, -1, 41, ! -1, -1, 44, 45, 46, 1, 48, 3, 4, 5, ! 6, 7, 54, -1, 56, 57, 12, -1, 60, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, ! -1, 27, -1, -1, -1, 31, 32, -1, 80, 35, ! -1, -1, -1, -1, -1, 41, 88, -1, -1, 45, ! -1, 93, -1, -1, -1, -1, 98, 99, 54, -1, ! 56, 57, 3, 4, 5, 6, 7, -1, -1, -1, ! -1, 12, -1, -1, 70, -1, -1, -1, -1, 3, ! 4, 5, 6, 7, 80, -1, 27, -1, 12, -1, ! 31, 32, 88, -1, 35, -1, -1, 93, -1, -1, ! 41, -1, -1, 27, 45, -1, 47, 31, 32, -1, ! -1, 35, -1, 54, -1, 56, 57, 41, -1, -1, ! -1, 45, -1, -1, -1, -1, -1, -1, -1, 70, ! 54, -1, 56, 57, -1, -1, 60, -1, -1, 80, ! -1, -1, -1, -1, -1, -1, 70, 88, -1, 90, ! -1, -1, 93, 94, -1, -1, 80, 3, 4, 5, ! 6, 7, -1, -1, 88, -1, 12, -1, -1, 93, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 27, -1, -1, -1, 31, 32, -1, -1, 35, ! -1, -1, -1, -1, -1, 41, -1, -1, -1, 45, ! -1, -1, -1, -1, -1, -1, -1, -1, 54, -1, ! 56, 57, -1, -1, -1, -1, 62, -1, -1, -1, ! -1, -1, -1, -1, 70, -1, 3, 4, 5, 6, ! 7, -1, -1, 10, 80, 12, -1, -1, -1, -1, ! -1, -1, 88, -1, -1, -1, -1, 93, -1, -1, ! 27, -1, -1, -1, 31, 32, -1, -1, 35, -1, ! -1, -1, -1, -1, 41, -1, -1, -1, 45, -1, ! -1, -1, 3, 4, 5, 6, 7, 54, -1, 56, ! 57, 12, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 70, -1, -1, 27, -1, -1, -1, ! 31, 32, -1, 80, 35, -1, -1, -1, -1, -1, ! 41, 88, -1, -1, 45, -1, 93, -1, 3, 4, ! 5, 6, 7, 54, -1, 56, 57, 12, -1, 60, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, ! -1, -1, 27, -1, -1, -1, 31, 32, -1, 80, ! 35, -1, -1, -1, -1, -1, 41, 88, -1, -1, ! 45, -1, 93, -1, -1, -1, -1, -1, -1, 54, ! -1, 56, 57, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 80, -1, -1, -1, -1, ! -1, -1, -1, 88, -1, 59, -1, -1, 93, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ! 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, ! 84, 62, 63, 64, 65, 66, 67, 68, 69, 70, ! 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, ! 81, 82, 83, 84, 62, 63, 64, 65, 66, 67, ! 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ! 78, 79, 80, 81, 82, 83, 84, 63, 64, 65, ! 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, ! 76, 77, 78, 79, 80, 81, 82, 83, 84, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 80, 81, 82, 83, 84, 70, 71, 72, 73, 74, ! 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ *************** *** 3663,3667 **** case 2: ! #line 294 "parse.y" { /* In case there were missing closebraces, --- 3595,3599 ---- case 2: ! #line 292 "parse.y" { /* In case there were missing closebraces, *************** *** 3673,3713 **** break;} case 3: ! #line 308 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 4: ! #line 309 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 5: ! #line 311 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 6: ! #line 315 "parse.y" { have_extern_spec = 1; used_extern_spec = 0; yyval.ttype = NULL_TREE; ; break;} ! case 7: ! #line 320 "parse.y" { have_extern_spec = 0; ; break;} - case 10: - #line 329 "parse.y" - { if (pending_lang_change) do_pending_lang_change(); ; - break;} - case 11: - #line 331 "parse.y" - { if (! global_bindings_p () && ! pseudo_global_level_p()) - pop_everything (); ; - break;} case 12: ! #line 337 "parse.y" ! { if (pending_inlines) do_pending_inlines (); ; break;} case 13: ! #line 339 "parse.y" ! { if (pending_inlines) do_pending_inlines (); ; break;} case 14: --- 3605,3638 ---- break;} case 3: ! #line 306 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 4: ! #line 307 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 5: ! #line 309 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 8: ! #line 318 "parse.y" { have_extern_spec = 1; used_extern_spec = 0; yyval.ttype = NULL_TREE; ; break;} ! case 9: ! #line 323 "parse.y" { have_extern_spec = 0; ; break;} case 12: ! #line 332 "parse.y" ! { if (pending_lang_change) do_pending_lang_change(); ; break;} case 13: ! #line 334 "parse.y" ! { if (! toplevel_bindings_p () && ! pseudo_global_level_p()) ! pop_everything (); ! prefix_attributes = NULL_TREE; ; break;} case 14: *************** *** 3715,3763 **** { if (pending_inlines) do_pending_inlines (); ; break;} ! case 16: ! #line 344 "parse.y" ! { if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); ! assemble_asm (yyvsp[-2].ttype); ; break;} ! case 17: ! #line 347 "parse.y" ! { pop_lang_context (); ; break;} case 18: ! #line 349 "parse.y" ! { pop_lang_context (); ; break;} case 19: #line 351 "parse.y" ! { if (pending_inlines) do_pending_inlines (); ! pop_lang_context (); ; break;} case 20: ! #line 354 "parse.y" { if (pending_inlines) do_pending_inlines (); pop_lang_context (); ; break;} case 21: ! #line 360 "parse.y" ! { push_lang_context (yyvsp[0].ttype); ; break;} case 22: ! #line 365 "parse.y" ! { begin_template_parm_list (); ; break;} case 23: #line 367 "parse.y" { yyval.ttype = end_template_parm_list (yyvsp[-1].ttype); ; break;} ! case 24: ! #line 372 "parse.y" { yyval.ttype = process_template_parm (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 25: ! #line 374 "parse.y" { yyval.ttype = process_template_parm (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 26: ! #line 379 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); --- 3640,3746 ---- { if (pending_inlines) do_pending_inlines (); ; break;} ! case 15: ! #line 343 "parse.y" ! { if (pending_inlines) do_pending_inlines (); ; break;} ! case 16: ! #line 345 "parse.y" ! { if (pending_inlines) do_pending_inlines (); ; break;} case 18: ! #line 348 "parse.y" ! { if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); ! assemble_asm (yyvsp[-2].ttype); ; break;} case 19: #line 351 "parse.y" ! { pop_lang_context (); ; break;} case 20: ! #line 353 "parse.y" { if (pending_inlines) do_pending_inlines (); pop_lang_context (); ; break;} case 21: ! #line 356 "parse.y" ! { if (pending_inlines) do_pending_inlines (); ! pop_lang_context (); ; break;} case 22: ! #line 359 "parse.y" ! { push_namespace (yyvsp[-1].ttype); ; break;} case 23: + #line 361 "parse.y" + { pop_namespace (); ; + break;} + case 24: + #line 363 "parse.y" + { push_namespace (NULL_TREE); ; + break;} + case 25: + #line 365 "parse.y" + { pop_namespace (); ; + break;} + case 26: #line 367 "parse.y" + { do_namespace_alias (yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} + case 27: + #line 369 "parse.y" + { do_toplevel_using_decl (yyvsp[-1].ttype); ; + break;} + case 28: + #line 371 "parse.y" + { do_using_directive (yyvsp[-1].ttype); ; + break;} + case 29: + #line 376 "parse.y" + { yyval.ttype = yyvsp[0].ttype; ; + break;} + case 30: + #line 378 "parse.y" + { yyval.ttype = yyvsp[0].ttype; ; + break;} + case 31: + #line 380 "parse.y" + { yyval.ttype = yyvsp[0].ttype; ; + break;} + case 34: + #line 387 "parse.y" + { yyval.ttype = yyvsp[0].ttype; ; + break;} + case 35: + #line 389 "parse.y" + { yyval.ttype = yyvsp[0].ttype; ; + break;} + case 36: + #line 394 "parse.y" + { push_lang_context (yyvsp[0].ttype); ; + break;} + case 37: + #line 396 "parse.y" + { if (current_lang_name != yyvsp[0].ttype) + cp_error ("use of linkage spec `%D' is different from previous spec `%D'", yyvsp[0].ttype, current_lang_name); + pop_lang_context (); push_lang_context (yyvsp[0].ttype); ; + break;} + case 38: + #line 403 "parse.y" + { begin_template_parm_list (); ; + break;} + case 39: + #line 405 "parse.y" { yyval.ttype = end_template_parm_list (yyvsp[-1].ttype); ; break;} ! case 40: ! #line 410 "parse.y" { yyval.ttype = process_template_parm (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 41: ! #line 412 "parse.y" { yyval.ttype = process_template_parm (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 42: ! #line 417 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); *************** *** 3769,3816 **** ; break;} ! case 27: ! #line 388 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); goto ttpa; ; break;} ! case 28: ! #line 400 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 29: ! #line 402 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyval.ttype); ; break;} ! case 31: ! #line 408 "parse.y" { warning ("use of `overload' is an anachronism"); ; break;} ! case 32: ! #line 412 "parse.y" { declare_overloaded (yyvsp[0].ttype); ; break;} ! case 33: ! #line 414 "parse.y" { declare_overloaded (yyvsp[0].ttype); ; break;} ! case 34: ! #line 421 "parse.y" { yychar = '{'; goto template1; ; break;} ! case 36: ! #line 424 "parse.y" { yychar = '{'; goto template1; ; break;} ! case 38: ! #line 427 "parse.y" { yychar = ':'; goto template1; ; break;} ! case 40: ! #line 430 "parse.y" { yychar = ':'; template1: ! if (current_aggr == exception_type_node) ! error ("template type must define an aggregate or union"); ! else if (current_aggr == signature_type_node) sorry ("template type defining a signature"); /* Maybe pedantic warning for union? --- 3752,3797 ---- ; break;} ! case 43: ! #line 426 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); goto ttpa; ; break;} ! case 44: ! #line 438 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 45: ! #line 440 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyval.ttype); ; break;} ! case 47: ! #line 446 "parse.y" { warning ("use of `overload' is an anachronism"); ; break;} ! case 48: ! #line 450 "parse.y" { declare_overloaded (yyvsp[0].ttype); ; break;} ! case 49: ! #line 452 "parse.y" { declare_overloaded (yyvsp[0].ttype); ; break;} ! case 50: ! #line 459 "parse.y" { yychar = '{'; goto template1; ; break;} ! case 52: ! #line 462 "parse.y" { yychar = '{'; goto template1; ; break;} ! case 54: ! #line 465 "parse.y" { yychar = ':'; goto template1; ; break;} ! case 56: ! #line 468 "parse.y" { yychar = ':'; template1: ! if (current_aggr == signature_type_node) sorry ("template type defining a signature"); /* Maybe pedantic warning for union? *************** *** 3821,3826 **** ; break;} ! case 42: ! #line 445 "parse.y" { end_template_decl (yyvsp[-2].ttype, yyvsp[-1].ttype, current_aggr, 0); --- 3802,3807 ---- ; break;} ! case 58: ! #line 481 "parse.y" { end_template_decl (yyvsp[-2].ttype, yyvsp[-1].ttype, current_aggr, 0); *************** *** 3828,3833 **** ; break;} ! case 43: ! #line 450 "parse.y" { end_template_decl (yyvsp[-2].ttype, yyvsp[-1].ttype, current_aggr, 0); --- 3809,3814 ---- ; break;} ! case 59: ! #line 486 "parse.y" { end_template_decl (yyvsp[-2].ttype, yyvsp[-1].ttype, current_aggr, 0); *************** *** 3835,3840 **** ; break;} ! case 44: ! #line 457 "parse.y" { tree d; --- 3816,3821 ---- ; break;} ! case 60: ! #line 493 "parse.y" { tree d; *************** *** 3844,3849 **** d = start_decl (yyvsp[-4].ttype, /*current_declspecs*/NULL_TREE, 0, yyvsp[-3].ttype); ! cplus_decl_attributes (d, yyvsp[-1].ttype); ! finish_decl (d, NULL_TREE, yyvsp[-2].ttype, 0); end_template_decl (yyvsp[-5].ttype, d, 0, def); if (def) --- 3825,3830 ---- d = start_decl (yyvsp[-4].ttype, /*current_declspecs*/NULL_TREE, 0, yyvsp[-3].ttype); ! cplus_decl_attributes (d, yyvsp[-1].ttype, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, yyvsp[-2].ttype, 0, 0); end_template_decl (yyvsp[-5].ttype, d, 0, def); if (def) *************** *** 3852,3857 **** ; break;} ! case 45: ! #line 474 "parse.y" { tree d; --- 3833,3838 ---- ; break;} ! case 61: ! #line 510 "parse.y" { tree d; *************** *** 3863,3868 **** d = start_decl (yyvsp[-4].ttype, current_declspecs, 0, yyvsp[-3].ttype); ! cplus_decl_attributes (d, yyvsp[-1].ttype); ! finish_decl (d, NULL_TREE, yyvsp[-2].ttype, 0); end_template_decl (yyvsp[-6].ttype, d, 0, def); if (def) --- 3844,3849 ---- d = start_decl (yyvsp[-4].ttype, current_declspecs, 0, yyvsp[-3].ttype); ! cplus_decl_attributes (d, yyvsp[-1].ttype, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, yyvsp[-2].ttype, 0, 0); end_template_decl (yyvsp[-6].ttype, d, 0, def); if (def) *************** *** 3875,3884 **** ; break;} ! case 46: ! #line 495 "parse.y" { int def = (yyvsp[0].itype != ';'); tree d = start_decl (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); end_template_decl (yyvsp[-3].ttype, d, 0, def); if (def) --- 3856,3865 ---- ; break;} ! case 62: ! #line 531 "parse.y" { int def = (yyvsp[0].itype != ';'); tree d = start_decl (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); end_template_decl (yyvsp[-3].ttype, d, 0, def); if (def) *************** *** 3886,3952 **** ; break;} ! case 47: ! #line 504 "parse.y" { end_template_decl (yyvsp[-2].ttype, 0, 0, 0); ; break;} ! case 48: ! #line 505 "parse.y" { end_template_decl (yyvsp[-2].ttype, 0, 0, 0); ; break;} ! case 49: ! #line 508 "parse.y" { yyval.itype = '{'; ; break;} ! case 50: ! #line 509 "parse.y" { yyval.itype = ':'; ; break;} ! case 51: ! #line 510 "parse.y" { yyval.itype = ';'; ; break;} ! case 52: ! #line 511 "parse.y" { yyval.itype = '='; ; break;} ! case 53: ! #line 512 "parse.y" { yyval.itype = RETURN; ; break;} ! case 54: ! #line 517 "parse.y" {; break;} ! case 55: ! #line 519 "parse.y" {; break;} ! case 56: ! #line 522 "parse.y" { tree d; d = start_decl (yyvsp[-1].ttype, yyval.ttype, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); ; break;} ! case 57: ! #line 527 "parse.y" { note_list_got_semicolon (yyval.ttype); ; break;} ! case 58: ! #line 532 "parse.y" { tree d; d = start_decl (yyvsp[-1].ttype, yyval.ttype, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); note_list_got_semicolon (yyval.ttype); ; break;} ! case 59: ! #line 538 "parse.y" { pedwarn ("empty declaration"); ; break;} ! case 61: ! #line 541 "parse.y" { tree t = yyval.ttype; --- 3867,3933 ---- ; break;} ! case 63: ! #line 540 "parse.y" { end_template_decl (yyvsp[-2].ttype, 0, 0, 0); ; break;} ! case 64: ! #line 541 "parse.y" { end_template_decl (yyvsp[-2].ttype, 0, 0, 0); ; break;} ! case 65: ! #line 544 "parse.y" { yyval.itype = '{'; ; break;} ! case 66: ! #line 545 "parse.y" { yyval.itype = ':'; ; break;} ! case 67: ! #line 546 "parse.y" { yyval.itype = ';'; ; break;} ! case 68: ! #line 547 "parse.y" { yyval.itype = '='; ; break;} ! case 69: ! #line 548 "parse.y" { yyval.itype = RETURN; ; break;} ! case 70: ! #line 553 "parse.y" {; break;} ! case 71: ! #line 555 "parse.y" {; break;} ! case 72: ! #line 558 "parse.y" { tree d; d = start_decl (yyvsp[-1].ttype, yyval.ttype, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); ; break;} ! case 73: ! #line 563 "parse.y" { note_list_got_semicolon (yyval.ttype); ; break;} ! case 74: ! #line 568 "parse.y" { tree d; d = start_decl (yyvsp[-1].ttype, yyval.ttype, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); note_list_got_semicolon (yyval.ttype); ; break;} ! case 75: ! #line 574 "parse.y" { pedwarn ("empty declaration"); ; break;} ! case 77: ! #line 577 "parse.y" { tree t = yyval.ttype; *************** *** 3968,3975 **** ; break;} ! case 65: ! #line 566 "parse.y" { ! finish_function (lineno, 1); /* finish_function performs these three statements: --- 3949,3956 ---- ; break;} ! case 81: ! #line 602 "parse.y" { ! finish_function (lineno, 1, 0); /* finish_function performs these three statements: *************** *** 3983,3990 **** ; break;} ! case 66: ! #line 579 "parse.y" { ! finish_function (lineno, 1); /* finish_function performs these three statements: --- 3964,3971 ---- ; break;} ! case 82: ! #line 615 "parse.y" { ! finish_function (lineno, 1, 0); /* finish_function performs these three statements: *************** *** 3998,4030 **** ; break;} ! case 67: ! #line 592 "parse.y" ! { finish_function (lineno, 0); if (yyval.ttype) process_next_inline (yyval.ttype); ; break;} ! case 68: ! #line 595 "parse.y" ! { finish_function (lineno, 0); if (yyval.ttype) process_next_inline (yyval.ttype); ; break;} ! case 69: ! #line 598 "parse.y" ! { finish_function (lineno, 0); if (yyval.ttype) process_next_inline (yyval.ttype); ; break;} ! case 70: ! #line 601 "parse.y" {; break;} ! case 71: ! #line 603 "parse.y" {; break;} ! case 72: ! #line 605 "parse.y" {; break;} ! case 73: ! #line 610 "parse.y" { if (! start_function (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype, 0)) YYERROR1; --- 3979,4011 ---- ; break;} ! case 83: ! #line 628 "parse.y" ! { finish_function (lineno, 0, 0); if (yyval.ttype) process_next_inline (yyval.ttype); ; break;} ! case 84: ! #line 631 "parse.y" ! { finish_function (lineno, 0, 0); if (yyval.ttype) process_next_inline (yyval.ttype); ; break;} ! case 85: ! #line 634 "parse.y" ! { finish_function (lineno, 0, 0); if (yyval.ttype) process_next_inline (yyval.ttype); ; break;} ! case 86: ! #line 637 "parse.y" {; break;} ! case 87: ! #line 639 "parse.y" {; break;} ! case 88: ! #line 641 "parse.y" {; break;} ! case 89: ! #line 646 "parse.y" { if (! start_function (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype, 0)) YYERROR1; *************** *** 4032,4037 **** yyval.ttype = NULL_TREE; ; break;} ! case 74: ! #line 615 "parse.y" { if (! start_function (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype, 0)) YYERROR1; --- 4013,4018 ---- yyval.ttype = NULL_TREE; ; break;} ! case 90: ! #line 651 "parse.y" { if (! start_function (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype, 0)) YYERROR1; *************** *** 4039,4044 **** yyval.ttype = NULL_TREE; ; break;} ! case 75: ! #line 620 "parse.y" { if (! start_function (NULL_TREE, yyval.ttype, yyvsp[0].ttype, 0)) YYERROR1; --- 4020,4025 ---- yyval.ttype = NULL_TREE; ; break;} ! case 91: ! #line 656 "parse.y" { if (! start_function (NULL_TREE, yyval.ttype, yyvsp[0].ttype, 0)) YYERROR1; *************** *** 4046,4056 **** yyval.ttype = NULL_TREE; ; break;} ! case 76: ! #line 625 "parse.y" { start_function (NULL_TREE, TREE_VALUE (yyval.ttype), NULL_TREE, 1); reinit_parse_for_function (); ; break;} ! case 77: ! #line 633 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-5].ttype), yyvsp[-3].ttype, yyvsp[-1].ttype); --- 4027,4037 ---- yyval.ttype = NULL_TREE; ; break;} ! case 92: ! #line 661 "parse.y" { start_function (NULL_TREE, TREE_VALUE (yyval.ttype), NULL_TREE, 1); reinit_parse_for_function (); ; break;} ! case 93: ! #line 669 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-5].ttype), yyvsp[-3].ttype, yyvsp[-1].ttype); *************** *** 4063,4068 **** reinit_parse_for_method (yychar, yyval.ttype); ; break;} ! case 78: ! #line 643 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-3].ttype), --- 4044,4049 ---- reinit_parse_for_method (yychar, yyval.ttype); ; break;} ! case 94: ! #line 679 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-3].ttype), *************** *** 4072,4089 **** ; break;} ! case 79: ! #line 650 "parse.y" { yyval.ttype = start_method (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); goto rest_of_mdef; ; break;} ! case 80: ! #line 652 "parse.y" { yyval.ttype = start_method (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); goto rest_of_mdef; ; break;} ! case 81: ! #line 654 "parse.y" { yyval.ttype = start_method (NULL_TREE, yyval.ttype, yyvsp[0].ttype); goto rest_of_mdef; ; break;} ! case 82: ! #line 658 "parse.y" { if (! current_function_parms_stored) --- 4053,4070 ---- ; break;} ! case 95: ! #line 686 "parse.y" { yyval.ttype = start_method (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); goto rest_of_mdef; ; break;} ! case 96: ! #line 688 "parse.y" { yyval.ttype = start_method (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); goto rest_of_mdef; ; break;} ! case 97: ! #line 690 "parse.y" { yyval.ttype = start_method (NULL_TREE, yyval.ttype, yyvsp[0].ttype); goto rest_of_mdef; ; break;} ! case 98: ! #line 694 "parse.y" { if (! current_function_parms_stored) *************** *** 4092,4113 **** ; break;} ! case 83: ! #line 666 "parse.y" ! { store_return_init (yyval.ttype, NULL_TREE); ; ! break;} ! case 84: ! #line 668 "parse.y" { store_return_init (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 85: ! #line 670 "parse.y" { store_return_init (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 86: ! #line 672 "parse.y" { store_return_init (yyval.ttype, NULL_TREE); ; break;} ! case 87: ! #line 677 "parse.y" { if (yyvsp[0].itype == 0) --- 4073,4090 ---- ; break;} ! case 99: ! #line 702 "parse.y" { store_return_init (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 100: ! #line 704 "parse.y" { store_return_init (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 101: ! #line 706 "parse.y" { store_return_init (yyval.ttype, NULL_TREE); ; break;} ! case 102: ! #line 711 "parse.y" { if (yyvsp[0].itype == 0) *************** *** 4120,4132 **** ; break;} ! case 88: ! #line 690 "parse.y" { if (! current_function_parms_stored) store_parm_decls (); - /* Flag that we are processing base and member initializers. */ - current_vtable_decl = error_mark_node; - if (DECL_CONSTRUCTOR_P (current_function_decl)) { --- 4097,4106 ---- ; break;} ! case 103: ! #line 724 "parse.y" { if (! current_function_parms_stored) store_parm_decls (); if (DECL_CONSTRUCTOR_P (current_function_decl)) { *************** *** 4142,4155 **** ; break;} ! case 89: ! #line 713 "parse.y" { yyval.itype = 0; ; break;} ! case 90: ! #line 715 "parse.y" { yyval.itype = 1; ; break;} ! case 93: ! #line 721 "parse.y" { if (current_class_name && !flag_traditional) --- 4116,4129 ---- ; break;} ! case 104: ! #line 744 "parse.y" { yyval.itype = 0; ; break;} ! case 105: ! #line 746 "parse.y" { yyval.itype = 1; ; break;} ! case 108: ! #line 752 "parse.y" { if (current_class_name && !flag_traditional) *************** *** 4158,4163 **** ; break;} ! case 94: ! #line 727 "parse.y" { if (current_class_name && !flag_traditional) --- 4132,4137 ---- ; break;} ! case 109: ! #line 758 "parse.y" { if (current_class_name && !flag_traditional) *************** *** 4166,4247 **** ; break;} ! case 95: ! #line 733 "parse.y" { expand_member_init (C_C_D, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 96: ! #line 735 "parse.y" { expand_member_init (C_C_D, yyval.ttype, void_type_node); ; break;} ! case 97: ! #line 737 "parse.y" { expand_member_init (C_C_D, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 98: ! #line 739 "parse.y" { expand_member_init (C_C_D, yyval.ttype, void_type_node); ; break;} ! case 99: ! #line 742 "parse.y" { do_member_init (OP0 (yyvsp[-3].ttype), OP1 (yyvsp[-3].ttype), yyvsp[-1].ttype); ; break;} ! case 100: ! #line 746 "parse.y" { do_member_init (OP0 (yyvsp[-1].ttype), OP1 (yyvsp[-1].ttype), void_type_node); ; break;} ! case 109: ! #line 770 "parse.y" { do_type_instantiation (yyvsp[0].ttype ? yyvsp[0].ttype : yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 110: ! #line 772 "parse.y" { do_function_instantiation (yyvsp[-1].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 111: ! #line 774 "parse.y" { do_type_instantiation (yyvsp[0].ttype ? yyvsp[0].ttype : yyvsp[-1].ttype, yyvsp[-3].ttype); ; break;} ! case 112: ! #line 776 "parse.y" { do_function_instantiation (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ; break;} ! case 113: ! #line 781 "parse.y" { if (yyvsp[0].ttype) yyval.ttype = yyvsp[0].ttype; ; break;} ! case 114: ! #line 786 "parse.y" { yyval.ttype = lookup_template_class (yyval.ttype, yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 115: ! #line 788 "parse.y" { yyval.ttype = lookup_template_class (yyval.ttype, NULL_TREE, NULL_TREE); ; break;} ! case 116: ! #line 790 "parse.y" { yyval.ttype = lookup_template_class (yyval.ttype, yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 117: ! #line 795 "parse.y" { yyval.ttype = instantiate_class_template (yyvsp[0].ttype, 1); ; break;} ! case 118: ! #line 800 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 119: ! #line 802 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 120: ! #line 807 "parse.y" { yyval.ttype = groktypename (yyval.ttype); ; break;} ! case 122: ! #line 813 "parse.y" { tree t, decl, tmpl; --- 4140,4221 ---- ; break;} ! case 110: ! #line 764 "parse.y" { expand_member_init (C_C_D, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 111: ! #line 766 "parse.y" { expand_member_init (C_C_D, yyval.ttype, void_type_node); ; break;} ! case 112: ! #line 768 "parse.y" { expand_member_init (C_C_D, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 113: ! #line 770 "parse.y" { expand_member_init (C_C_D, yyval.ttype, void_type_node); ; break;} ! case 114: ! #line 773 "parse.y" { do_member_init (OP0 (yyvsp[-3].ttype), OP1 (yyvsp[-3].ttype), yyvsp[-1].ttype); ; break;} ! case 115: ! #line 777 "parse.y" { do_member_init (OP0 (yyvsp[-1].ttype), OP1 (yyvsp[-1].ttype), void_type_node); ; break;} ! case 126: ! #line 803 "parse.y" { do_type_instantiation (yyvsp[0].ttype ? yyvsp[0].ttype : yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 127: ! #line 805 "parse.y" { do_function_instantiation (yyvsp[-1].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 128: ! #line 807 "parse.y" { do_type_instantiation (yyvsp[0].ttype ? yyvsp[0].ttype : yyvsp[-1].ttype, yyvsp[-3].ttype); ; break;} ! case 129: ! #line 809 "parse.y" { do_function_instantiation (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ; break;} ! case 130: ! #line 814 "parse.y" { if (yyvsp[0].ttype) yyval.ttype = yyvsp[0].ttype; ; break;} ! case 131: ! #line 819 "parse.y" { yyval.ttype = lookup_template_class (yyval.ttype, yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 132: ! #line 821 "parse.y" { yyval.ttype = lookup_template_class (yyval.ttype, NULL_TREE, NULL_TREE); ; break;} ! case 133: ! #line 823 "parse.y" { yyval.ttype = lookup_template_class (yyval.ttype, yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 134: ! #line 828 "parse.y" { yyval.ttype = instantiate_class_template (yyvsp[0].ttype, 1); ; break;} ! case 135: ! #line 833 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 136: ! #line 835 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 137: ! #line 840 "parse.y" { yyval.ttype = groktypename (yyval.ttype); ; break;} ! case 139: ! #line 846 "parse.y" { tree t, decl, tmpl; *************** *** 4277,4282 **** ; break;} ! case 123: ! #line 846 "parse.y" { tree t = finish_struct (yyvsp[-3].ttype, yyvsp[-1].ttype, 0); --- 4251,4256 ---- ; break;} ! case 140: ! #line 879 "parse.y" { tree t = finish_struct (yyvsp[-3].ttype, yyvsp[-1].ttype, 0); *************** *** 4285,4288 **** --- 4259,4264 ---- end_template_instantiation (yyvsp[-5].ttype); + repo_template_used (t); + /* Now go after the methods & class data. */ instantiate_member_templates (yyvsp[-5].ttype); *************** *** 4293,4373 **** ; break;} ! case 124: ! #line 863 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 125: ! #line 865 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 126: ! #line 870 "parse.y" { yyval.ttype = NULL_TREE; /* never used from here... */; break;} ! case 127: ! #line 872 "parse.y" { yyval.ttype = yyvsp[-1].ttype; /*???*/ ; break;} ! case 128: ! #line 876 "parse.y" { yyval.code = NEGATE_EXPR; ; break;} ! case 129: ! #line 878 "parse.y" { yyval.code = CONVERT_EXPR; ; break;} ! case 130: ! #line 880 "parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} ! case 131: ! #line 882 "parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} ! case 132: ! #line 884 "parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} ! case 133: ! #line 888 "parse.y" { yyval.ttype = build_x_compound_expr (yyval.ttype); ; break;} ! case 135: ! #line 894 "parse.y" { error ("ANSI C++ forbids an empty condition for `%s'", cond_stmt_keyword); yyval.ttype = integer_zero_node; ; break;} ! case 136: ! #line 898 "parse.y" ! { yyval.ttype = build1 (CLEANUP_POINT_EXPR, bool_type_node, ! bool_truthvalue_conversion (yyvsp[-1].ttype)); ; break;} ! case 137: ! #line 904 "parse.y" { error ("ANSI C++ forbids an empty condition for `%s'", cond_stmt_keyword); yyval.ttype = integer_zero_node; ; break;} ! case 138: ! #line 908 "parse.y" ! { yyval.ttype = build1 (CLEANUP_POINT_EXPR, bool_type_node, ! bool_truthvalue_conversion (yyvsp[-1].ttype)); ; break;} ! case 139: ! #line 914 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 140: ! #line 916 "parse.y" ! { yyval.ttype = build1 (CLEANUP_POINT_EXPR, bool_type_node, ! bool_truthvalue_conversion (yyval.ttype)); ; break;} ! case 141: ! #line 919 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 142: ! #line 924 "parse.y" { { tree d; --- 4269,4346 ---- ; break;} ! case 141: ! #line 898 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 142: ! #line 900 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 143: ! #line 905 "parse.y" { yyval.ttype = NULL_TREE; /* never used from here... */; break;} ! case 144: ! #line 907 "parse.y" { yyval.ttype = yyvsp[-1].ttype; /*???*/ ; break;} ! case 145: ! #line 911 "parse.y" { yyval.code = NEGATE_EXPR; ; break;} ! case 146: ! #line 913 "parse.y" { yyval.code = CONVERT_EXPR; ; break;} ! case 147: ! #line 915 "parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} ! case 148: ! #line 917 "parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} ! case 149: ! #line 919 "parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} ! case 150: ! #line 923 "parse.y" { yyval.ttype = build_x_compound_expr (yyval.ttype); ; break;} ! case 152: ! #line 929 "parse.y" { error ("ANSI C++ forbids an empty condition for `%s'", cond_stmt_keyword); yyval.ttype = integer_zero_node; ; break;} ! case 153: ! #line 933 "parse.y" ! { yyval.ttype = condition_conversion (yyvsp[-1].ttype); ; break;} ! case 154: ! #line 938 "parse.y" { error ("ANSI C++ forbids an empty condition for `%s'", cond_stmt_keyword); yyval.ttype = integer_zero_node; ; break;} ! case 155: ! #line 942 "parse.y" ! { yyval.ttype = condition_conversion (yyvsp[-1].ttype); ; break;} ! case 156: ! #line 947 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 157: ! #line 949 "parse.y" ! { yyval.ttype = condition_conversion (yyval.ttype); ; break;} ! case 158: ! #line 951 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 159: ! #line 956 "parse.y" { { tree d; *************** *** 4384,4394 **** yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 143: ! #line 941 "parse.y" { ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype, 0); resume_momentary (yyvsp[-2].itype); yyval.ttype = yyvsp[-1].ttype; --- 4357,4367 ---- yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 160: ! #line 973 "parse.y" { ! cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype, 0, LOOKUP_ONLYCONVERTING); resume_momentary (yyvsp[-2].itype); yyval.ttype = yyvsp[-1].ttype; *************** *** 4397,4436 **** ; break;} ! case 145: ! #line 953 "parse.y" ! { finish_stmt (); ; ! break;} ! case 146: ! #line 955 "parse.y" ! { finish_stmt (); ; ! break;} ! case 147: ! #line 957 "parse.y" { finish_stmt (); ; break;} ! case 149: ! #line 964 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 150: ! #line 967 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, build_tree_list (NULL_TREE, error_mark_node)); ; break;} ! case 151: ! #line 970 "parse.y" { chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 152: ! #line 972 "parse.y" { chainon (yyval.ttype, build_tree_list (NULL_TREE, error_mark_node)); ; break;} ! case 153: ! #line 977 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 155: ! #line 983 "parse.y" { #if 0 --- 4370,4401 ---- ; break;} ! case 166: ! #line 992 "parse.y" { finish_stmt (); ; break;} ! case 168: ! #line 999 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 169: ! #line 1002 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, build_tree_list (NULL_TREE, error_mark_node)); ; break;} ! case 170: ! #line 1005 "parse.y" { chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 171: ! #line 1007 "parse.y" { chainon (yyval.ttype, build_tree_list (NULL_TREE, error_mark_node)); ; break;} ! case 172: ! #line 1012 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 174: ! #line 1018 "parse.y" { #if 0 *************** *** 4440,4467 **** ; break;} ! case 156: ! #line 991 "parse.y" { yyvsp[0].itype = pedantic; pedantic = 0; ; break;} ! case 157: ! #line 994 "parse.y" { yyval.ttype = yyvsp[0].ttype; pedantic = yyvsp[-2].itype; ; break;} ! case 158: ! #line 997 "parse.y" { yyval.ttype = build_x_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} ! case 159: ! #line 999 "parse.y" { yyval.ttype = build_x_unary_op (ADDR_EXPR, yyvsp[0].ttype); ; break;} ! case 160: ! #line 1001 "parse.y" { yyval.ttype = build_x_unary_op (BIT_NOT_EXPR, yyvsp[0].ttype); ; break;} ! case 161: ! #line 1003 "parse.y" { yyval.ttype = build_x_unary_op (yyvsp[-1].code, yyvsp[0].ttype); if (yyvsp[-1].code == NEGATE_EXPR && TREE_CODE (yyvsp[0].ttype) == INTEGER_CST) --- 4405,4432 ---- ; break;} ! case 175: ! #line 1026 "parse.y" { yyvsp[0].itype = pedantic; pedantic = 0; ; break;} ! case 176: ! #line 1029 "parse.y" { yyval.ttype = yyvsp[0].ttype; pedantic = yyvsp[-2].itype; ; break;} ! case 177: ! #line 1032 "parse.y" { yyval.ttype = build_x_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} ! case 178: ! #line 1034 "parse.y" { yyval.ttype = build_x_unary_op (ADDR_EXPR, yyvsp[0].ttype); ; break;} ! case 179: ! #line 1036 "parse.y" { yyval.ttype = build_x_unary_op (BIT_NOT_EXPR, yyvsp[0].ttype); ; break;} ! case 180: ! #line 1038 "parse.y" { yyval.ttype = build_x_unary_op (yyvsp[-1].code, yyvsp[0].ttype); if (yyvsp[-1].code == NEGATE_EXPR && TREE_CODE (yyvsp[0].ttype) == INTEGER_CST) *************** *** 4470,4475 **** ; break;} ! case 162: ! #line 1010 "parse.y" { tree label = lookup_label (yyvsp[0].ttype); if (label == NULL_TREE) --- 4435,4440 ---- ; break;} ! case 181: ! #line 1045 "parse.y" { tree label = lookup_label (yyvsp[0].ttype); if (label == NULL_TREE) *************** *** 4483,4488 **** ; break;} ! case 163: ! #line 1021 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) --- 4448,4453 ---- ; break;} ! case 182: ! #line 1056 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) *************** *** 4500,4575 **** tree t = TREE_VALUE (yyvsp[0].ttype); if (t != NULL_TREE ! && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) ! pedwarn ("ANSI C++ forbids using sizeof() on a function"); } yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; break;} ! case 164: ! #line 1041 "parse.y" { yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 165: ! #line 1043 "parse.y" { yyval.ttype = grok_alignof (yyvsp[0].ttype); ; break;} ! case 166: ! #line 1045 "parse.y" { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 167: ! #line 1050 "parse.y" { yyval.ttype = build_new (NULL_TREE, yyvsp[0].ttype, NULL_TREE, yyvsp[-1].itype); ; break;} ! case 168: ! #line 1052 "parse.y" { yyval.ttype = build_new (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-2].itype); ; break;} ! case 169: ! #line 1054 "parse.y" { yyval.ttype = build_new (yyvsp[-1].ttype, yyvsp[0].ttype, NULL_TREE, yyvsp[-2].itype); ; break;} ! case 170: ! #line 1056 "parse.y" { yyval.ttype = build_new (yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].itype); ; break;} ! case 171: ! #line 1058 "parse.y" { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-1].ttype), NULL_TREE, yyvsp[-3].itype); ; break;} ! case 172: ! #line 1061 "parse.y" { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-2].ttype), yyvsp[0].ttype, yyvsp[-4].itype); ; break;} ! case 173: ! #line 1063 "parse.y" { yyval.ttype = build_new (yyvsp[-3].ttype, groktypename(yyvsp[-1].ttype), NULL_TREE, yyvsp[-4].itype); ; break;} ! case 174: ! #line 1065 "parse.y" { yyval.ttype = build_new (yyvsp[-4].ttype, groktypename(yyvsp[-2].ttype), yyvsp[0].ttype, yyvsp[-5].itype); ; break;} ! case 175: ! #line 1068 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 0, yyvsp[-1].itype); ; break;} ! case 176: ! #line 1070 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 1, yyvsp[-3].itype); if (yychar == YYEMPTY) yychar = YYLEX; ; break;} ! case 177: ! #line 1074 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, yyvsp[-2].ttype, 2, yyvsp[-4].itype); if (yychar == YYEMPTY) yychar = YYLEX; ; break;} ! case 178: ! #line 1081 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 179: ! #line 1083 "parse.y" { yyval.ttype = yyvsp[-1].ttype; --- 4465,4542 ---- tree t = TREE_VALUE (yyvsp[0].ttype); if (t != NULL_TREE ! && ((TREE_TYPE (t) ! && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) ! || is_overloaded_fn (t))) ! pedwarn ("ANSI C++ forbids taking the sizeof a function type"); } yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; break;} ! case 183: ! #line 1078 "parse.y" { yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 184: ! #line 1080 "parse.y" { yyval.ttype = grok_alignof (yyvsp[0].ttype); ; break;} ! case 185: ! #line 1082 "parse.y" { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 186: ! #line 1087 "parse.y" { yyval.ttype = build_new (NULL_TREE, yyvsp[0].ttype, NULL_TREE, yyvsp[-1].itype); ; break;} ! case 187: ! #line 1089 "parse.y" { yyval.ttype = build_new (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-2].itype); ; break;} ! case 188: ! #line 1091 "parse.y" { yyval.ttype = build_new (yyvsp[-1].ttype, yyvsp[0].ttype, NULL_TREE, yyvsp[-2].itype); ; break;} ! case 189: ! #line 1093 "parse.y" { yyval.ttype = build_new (yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].itype); ; break;} ! case 190: ! #line 1095 "parse.y" { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-1].ttype), NULL_TREE, yyvsp[-3].itype); ; break;} ! case 191: ! #line 1098 "parse.y" { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-2].ttype), yyvsp[0].ttype, yyvsp[-4].itype); ; break;} ! case 192: ! #line 1100 "parse.y" { yyval.ttype = build_new (yyvsp[-3].ttype, groktypename(yyvsp[-1].ttype), NULL_TREE, yyvsp[-4].itype); ; break;} ! case 193: ! #line 1102 "parse.y" { yyval.ttype = build_new (yyvsp[-4].ttype, groktypename(yyvsp[-2].ttype), yyvsp[0].ttype, yyvsp[-5].itype); ; break;} ! case 194: ! #line 1105 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 0, yyvsp[-1].itype); ; break;} ! case 195: ! #line 1107 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 1, yyvsp[-3].itype); if (yychar == YYEMPTY) yychar = YYLEX; ; break;} ! case 196: ! #line 1111 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, yyvsp[-2].ttype, 2, yyvsp[-4].itype); if (yychar == YYEMPTY) yychar = YYLEX; ; break;} ! case 197: ! #line 1118 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 198: ! #line 1120 "parse.y" { yyval.ttype = yyvsp[-1].ttype; *************** *** 4577,4590 **** ; break;} ! case 180: ! #line 1091 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 181: ! #line 1093 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 182: ! #line 1095 "parse.y" { cp_error ("`%T' is not a valid expression", yyvsp[-1].ttype); --- 4544,4557 ---- ; break;} ! case 199: ! #line 1128 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 200: ! #line 1130 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 201: ! #line 1132 "parse.y" { cp_error ("`%T' is not a valid expression", yyvsp[-1].ttype); *************** *** 4592,4605 **** ; break;} ! case 183: ! #line 1103 "parse.y" { ! if (flag_ansi) pedwarn ("ANSI C++ forbids initialization of new expression with `='"); yyval.ttype = yyvsp[0].ttype; ; break;} ! case 184: ! #line 1113 "parse.y" { yyvsp[-1].ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, void_list_node); TREE_PARMLIST (yyvsp[-1].ttype) = 1; --- 4559,4572 ---- ; break;} ! case 202: ! #line 1140 "parse.y" { ! if (pedantic) pedwarn ("ANSI C++ forbids initialization of new expression with `='"); yyval.ttype = yyvsp[0].ttype; ; break;} ! case 203: ! #line 1150 "parse.y" { yyvsp[-1].ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, void_list_node); TREE_PARMLIST (yyvsp[-1].ttype) = 1; *************** *** 4607,4626 **** NULL_TREE); ; break;} ! case 185: ! #line 1118 "parse.y" { yyvsp[-1].ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, void_list_node); TREE_PARMLIST (yyvsp[-1].ttype) = 1; yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 187: ! #line 1126 "parse.y" { yyval.ttype = reparse_absdcl_as_casts (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 188: ! #line 1128 "parse.y" { tree init = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); ! if (flag_ansi) pedwarn ("ANSI C++ forbids constructor-expressions"); /* Indicate that this was a GNU C constructor expression. */ --- 4574,4593 ---- NULL_TREE); ; break;} ! case 204: ! #line 1155 "parse.y" { yyvsp[-1].ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, void_list_node); TREE_PARMLIST (yyvsp[-1].ttype) = 1; yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 206: ! #line 1163 "parse.y" { yyval.ttype = reparse_absdcl_as_casts (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 207: ! #line 1165 "parse.y" { tree init = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); ! if (pedantic) pedwarn ("ANSI C++ forbids constructor-expressions"); /* Indicate that this was a GNU C constructor expression. */ *************** *** 4630,4648 **** ; break;} ! case 190: ! #line 1143 "parse.y" { yyval.ttype = build_headof (yyvsp[-1].ttype); ; break;} ! case 191: ! #line 1145 "parse.y" { yyval.ttype = build_classof (yyvsp[-1].ttype); ; break;} ! case 192: ! #line 1147 "parse.y" { if (is_aggr_typedef (yyvsp[-1].ttype, 1)) { tree type = IDENTIFIER_TYPE_VALUE (yyvsp[-1].ttype); if (! IS_SIGNATURE(type)) ! yyval.ttype = CLASSTYPE_DOSSIER (type); else { --- 4597,4615 ---- ; break;} ! case 209: ! #line 1180 "parse.y" { yyval.ttype = build_headof (yyvsp[-1].ttype); ; break;} ! case 210: ! #line 1182 "parse.y" { yyval.ttype = build_classof (yyvsp[-1].ttype); ; break;} ! case 211: ! #line 1184 "parse.y" { if (is_aggr_typedef (yyvsp[-1].ttype, 1)) { tree type = IDENTIFIER_TYPE_VALUE (yyvsp[-1].ttype); if (! IS_SIGNATURE(type)) ! yyval.ttype = CLASSTYPE_RTTI (type); else { *************** *** 4655,4744 **** ; break;} ! case 194: ! #line 1167 "parse.y" { yyval.ttype = build_x_binary_op (MEMBER_REF, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 195: ! #line 1169 "parse.y" { yyval.ttype = build_m_component_ref (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 196: ! #line 1171 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 197: ! #line 1173 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 198: ! #line 1175 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 199: ! #line 1177 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 200: ! #line 1179 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 201: ! #line 1181 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 202: ! #line 1183 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 203: ! #line 1185 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 204: ! #line 1187 "parse.y" { yyval.ttype = build_x_binary_op (LT_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 205: ! #line 1189 "parse.y" { yyval.ttype = build_x_binary_op (GT_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 206: ! #line 1191 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 207: ! #line 1193 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 208: ! #line 1195 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 209: ! #line 1197 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 210: ! #line 1199 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 211: ! #line 1201 "parse.y" { yyval.ttype = build_x_binary_op (TRUTH_ANDIF_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 212: ! #line 1203 "parse.y" { yyval.ttype = build_x_binary_op (TRUTH_ORIF_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 213: ! #line 1205 "parse.y" { yyval.ttype = build_x_conditional_expr (yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 214: ! #line 1207 "parse.y" ! { yyval.ttype = build_modify_expr (yyval.ttype, NOP_EXPR, yyvsp[0].ttype); ; break;} ! case 215: ! #line 1209 "parse.y" { register tree rval; if ((rval = build_opfncall (MODIFY_EXPR, LOOKUP_NORMAL, yyval.ttype, yyvsp[0].ttype, --- 4622,4712 ---- ; break;} ! case 213: ! #line 1204 "parse.y" { yyval.ttype = build_x_binary_op (MEMBER_REF, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 214: ! #line 1206 "parse.y" { yyval.ttype = build_m_component_ref (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 215: ! #line 1208 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 216: ! #line 1210 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 217: ! #line 1212 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 218: ! #line 1214 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 219: ! #line 1216 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 220: ! #line 1218 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 221: ! #line 1220 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 222: ! #line 1222 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 223: ! #line 1224 "parse.y" { yyval.ttype = build_x_binary_op (LT_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 224: ! #line 1226 "parse.y" { yyval.ttype = build_x_binary_op (GT_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 225: ! #line 1228 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 226: ! #line 1230 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 227: ! #line 1232 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 228: ! #line 1234 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 229: ! #line 1236 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 230: ! #line 1238 "parse.y" { yyval.ttype = build_x_binary_op (TRUTH_ANDIF_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 231: ! #line 1240 "parse.y" { yyval.ttype = build_x_binary_op (TRUTH_ORIF_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 232: ! #line 1242 "parse.y" { yyval.ttype = build_x_conditional_expr (yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 233: ! #line 1244 "parse.y" ! { yyval.ttype = build_modify_expr (yyval.ttype, NOP_EXPR, yyvsp[0].ttype); ! C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ; break;} ! case 234: ! #line 1247 "parse.y" { register tree rval; if ((rval = build_opfncall (MODIFY_EXPR, LOOKUP_NORMAL, yyval.ttype, yyvsp[0].ttype, *************** *** 4748,4786 **** yyval.ttype = build_modify_expr (yyval.ttype, yyvsp[-1].code, yyvsp[0].ttype); ; break;} ! case 216: ! #line 1216 "parse.y" { yyval.ttype = build_throw (NULL_TREE); ; break;} ! case 217: ! #line 1218 "parse.y" { yyval.ttype = build_throw (yyvsp[0].ttype); ; break;} ! case 218: ! #line 1236 "parse.y" { yyval.ttype = build_parse_node (BIT_NOT_EXPR, yyvsp[0].ttype); ; break;} ! case 226: ! #line 1251 "parse.y" { yyval.ttype = build_parse_node (INDIRECT_REF, yyvsp[0].ttype); ; break;} ! case 227: ! #line 1253 "parse.y" { yyval.ttype = build_parse_node (ADDR_EXPR, yyvsp[0].ttype); ; break;} ! case 228: ! #line 1255 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 231: ! #line 1262 "parse.y" ! { push_nested_class (TREE_TYPE (OP0 (yyval.ttype)), 3); ! TREE_COMPLEXITY (yyval.ttype) = current_class_depth; ; ! break;} ! case 232: ! #line 1265 "parse.y" { yyval.ttype = finish_decl_parsing (yyvsp[-1].ttype); ; break;} ! case 233: ! #line 1270 "parse.y" { if (TREE_CODE (yyval.ttype) == BIT_NOT_EXPR) --- 4716,4749 ---- yyval.ttype = build_modify_expr (yyval.ttype, yyvsp[-1].code, yyvsp[0].ttype); ; break;} ! case 235: ! #line 1254 "parse.y" { yyval.ttype = build_throw (NULL_TREE); ; break;} ! case 236: ! #line 1256 "parse.y" { yyval.ttype = build_throw (yyvsp[0].ttype); ; break;} ! case 237: ! #line 1274 "parse.y" { yyval.ttype = build_parse_node (BIT_NOT_EXPR, yyvsp[0].ttype); ; break;} ! case 245: ! #line 1289 "parse.y" { yyval.ttype = build_parse_node (INDIRECT_REF, yyvsp[0].ttype); ; break;} ! case 246: ! #line 1291 "parse.y" { yyval.ttype = build_parse_node (ADDR_EXPR, yyvsp[0].ttype); ; break;} ! case 247: ! #line 1293 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 250: ! #line 1300 "parse.y" { yyval.ttype = finish_decl_parsing (yyvsp[-1].ttype); ; break;} ! case 251: ! #line 1305 "parse.y" { if (TREE_CODE (yyval.ttype) == BIT_NOT_EXPR) *************** *** 4802,4819 **** ; break;} ! case 236: ! #line 1291 "parse.y" { yyval.ttype = combine_strings (yyval.ttype); ; break;} ! case 237: ! #line 1293 "parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 238: ! #line 1295 "parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 239: ! #line 1297 "parse.y" { if (current_function_decl == 0) { --- 4765,4798 ---- ; break;} ! case 254: ! #line 1326 "parse.y" { yyval.ttype = combine_strings (yyval.ttype); ; break;} ! case 255: ! #line 1328 "parse.y" ! { char class; ! yyval.ttype = yyvsp[-1].ttype; ! class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') ! /* This inhibits warnings in truthvalue_conversion. */ ! C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ; break;} ! case 256: ! #line 1336 "parse.y" ! { char class; ! yyval.ttype = reparse_decl_as_expr (NULL_TREE, yyvsp[-1].ttype); ! class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') ! /* This inhibits warnings in truthvalue_conversion. */ ! C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ; ! break;} ! case 257: ! #line 1344 "parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 258: ! #line 1346 "parse.y" { if (current_function_decl == 0) { *************** *** 4824,4831 **** yyval.ttype = expand_start_stmt_expr (); ; break;} ! case 240: ! #line 1305 "parse.y" { tree rtl_exp; ! if (flag_ansi) pedwarn ("ANSI C++ forbids braced-groups within expressions"); rtl_exp = expand_end_stmt_expr (yyvsp[-2].ttype); --- 4803,4810 ---- yyval.ttype = expand_start_stmt_expr (); ; break;} ! case 259: ! #line 1354 "parse.y" { tree rtl_exp; ! if (pedantic) pedwarn ("ANSI C++ forbids braced-groups within expressions"); rtl_exp = expand_end_stmt_expr (yyvsp[-2].ttype); *************** *** 4847,4852 **** ; break;} ! case 241: ! #line 1326 "parse.y" { /* [eichin:19911016.1902EST] */ yyval.ttype = build_x_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype, current_class_decl); --- 4826,4831 ---- ; break;} ! case 260: ! #line 1375 "parse.y" { /* [eichin:19911016.1902EST] */ yyval.ttype = build_x_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype, current_class_decl); *************** *** 4855,4860 **** ; break;} ! case 242: ! #line 1330 "parse.y" { if (TREE_CODE (yyvsp[-1].ttype) == CALL_EXPR --- 4834,4839 ---- ; break;} ! case 261: ! #line 1379 "parse.y" { if (TREE_CODE (yyvsp[-1].ttype) == CALL_EXPR *************** *** 4865,4870 **** ; break;} ! case 243: ! #line 1338 "parse.y" { yyval.ttype = build_x_function_call (yyval.ttype, NULL_TREE, current_class_decl); --- 4844,4849 ---- ; break;} ! case 262: ! #line 1387 "parse.y" { yyval.ttype = build_x_function_call (yyval.ttype, NULL_TREE, current_class_decl); *************** *** 4874,4883 **** ; break;} ! case 244: ! #line 1345 "parse.y" { yyval.ttype = grok_array_decl (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 245: ! #line 1347 "parse.y" { /* If we get an OFFSET_REF, turn it into what it really means (e.g., a COMPONENT_REF). This way if we've got, --- 4853,4862 ---- ; break;} ! case 263: ! #line 1394 "parse.y" { yyval.ttype = grok_array_decl (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 264: ! #line 1396 "parse.y" { /* If we get an OFFSET_REF, turn it into what it really means (e.g., a COMPONENT_REF). This way if we've got, *************** *** 4889,4900 **** yyval.ttype = build_x_unary_op (POSTINCREMENT_EXPR, yyval.ttype); ; break;} ! case 246: ! #line 1356 "parse.y" { if (TREE_CODE (yyval.ttype) == OFFSET_REF) yyval.ttype = resolve_offset_ref (yyval.ttype); yyval.ttype = build_x_unary_op (POSTDECREMENT_EXPR, yyval.ttype); ; break;} ! case 247: ! #line 1361 "parse.y" { if (current_class_decl) { --- 4868,4879 ---- yyval.ttype = build_x_unary_op (POSTINCREMENT_EXPR, yyval.ttype); ; break;} ! case 265: ! #line 1405 "parse.y" { if (TREE_CODE (yyval.ttype) == OFFSET_REF) yyval.ttype = resolve_offset_ref (yyval.ttype); yyval.ttype = build_x_unary_op (POSTDECREMENT_EXPR, yyval.ttype); ; break;} ! case 266: ! #line 1410 "parse.y" { if (current_class_decl) { *************** *** 4920,4925 **** ; break;} ! case 248: ! #line 1384 "parse.y" { tree type; --- 4899,4904 ---- ; break;} ! case 267: ! #line 1433 "parse.y" { tree type; *************** *** 4962,5000 **** #endif else my_friendly_abort (79); ! yyval.ttype = build_c_cast (type, build_compound_expr (yyvsp[-1].ttype)); } ; break;} ! case 250: ! #line 1429 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_dynamic_cast (type, yyvsp[-1].ttype); ; break;} ! case 251: ! #line 1432 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_static_cast (type, yyvsp[-1].ttype); ; break;} ! case 252: ! #line 1435 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_reinterpret_cast (type, yyvsp[-1].ttype); ; break;} ! case 253: ! #line 1438 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_const_cast (type, yyvsp[-1].ttype); ; break;} ! case 254: ! #line 1441 "parse.y" { yyval.ttype = build_typeid (yyvsp[-1].ttype); ; break;} ! case 255: ! #line 1443 "parse.y" { tree type = groktypename (yyvsp[-1].ttype); ! yyval.ttype = get_typeid (type); ; break;} ! case 256: ! #line 1446 "parse.y" { do_scoped_id: --- 4941,4979 ---- #endif else my_friendly_abort (79); ! yyval.ttype = build_c_cast (type, build_compound_expr (yyvsp[-1].ttype), 1); } ; break;} ! case 269: ! #line 1478 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_dynamic_cast (type, yyvsp[-1].ttype); ; break;} ! case 270: ! #line 1481 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_static_cast (type, yyvsp[-1].ttype); ; break;} ! case 271: ! #line 1484 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_reinterpret_cast (type, yyvsp[-1].ttype); ; break;} ! case 272: ! #line 1487 "parse.y" { tree type = groktypename (yyvsp[-4].ttype); yyval.ttype = build_const_cast (type, yyvsp[-1].ttype); ; break;} ! case 273: ! #line 1490 "parse.y" { yyval.ttype = build_typeid (yyvsp[-1].ttype); ; break;} ! case 274: ! #line 1492 "parse.y" { tree type = groktypename (yyvsp[-1].ttype); ! yyval.ttype = get_typeid (TYPE_MAIN_VARIANT (type)); ; break;} ! case 275: ! #line 1495 "parse.y" { do_scoped_id: *************** *** 5036,5041 **** ; break;} ! case 257: ! #line 1485 "parse.y" { got_scope = NULL_TREE; --- 5015,5020 ---- ; break;} ! case 276: ! #line 1534 "parse.y" { got_scope = NULL_TREE; *************** *** 5045,5071 **** ; break;} ! case 258: ! #line 1492 "parse.y" { yyval.ttype = build_offset_ref (OP0 (yyval.ttype), OP1 (yyval.ttype)); ; break;} ! case 259: ! #line 1494 "parse.y" { yyval.ttype = build_member_call (OP0 (yyval.ttype), OP1 (yyval.ttype), yyvsp[-1].ttype); ; break;} ! case 260: ! #line 1496 "parse.y" { yyval.ttype = build_member_call (OP0 (yyval.ttype), OP1 (yyval.ttype), NULL_TREE); ; break;} ! case 261: ! #line 1498 "parse.y" ! { yyval.ttype = build_component_ref (yyval.ttype, yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 262: ! #line 1500 "parse.y" ! { yyval.ttype = build_object_ref (yyval.ttype, OP0 (yyvsp[0].ttype), OP1 (yyvsp[0].ttype)); ; break;} ! case 263: ! #line 1502 "parse.y" { #if 0 /* This is a future direction of this code, but because --- 5024,5053 ---- ; break;} ! case 277: ! #line 1541 "parse.y" { yyval.ttype = build_offset_ref (OP0 (yyval.ttype), OP1 (yyval.ttype)); ; break;} ! case 278: ! #line 1543 "parse.y" { yyval.ttype = build_member_call (OP0 (yyval.ttype), OP1 (yyval.ttype), yyvsp[-1].ttype); ; break;} ! case 279: ! #line 1545 "parse.y" { yyval.ttype = build_member_call (OP0 (yyval.ttype), OP1 (yyval.ttype), NULL_TREE); ; break;} ! case 280: ! #line 1547 "parse.y" ! { got_object = NULL_TREE; ! yyval.ttype = build_component_ref (yyval.ttype, yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 281: ! #line 1550 "parse.y" ! { got_object = NULL_TREE; ! yyval.ttype = build_object_ref (yyval.ttype, OP0 (yyvsp[0].ttype), OP1 (yyvsp[0].ttype)); ; break;} ! case 282: ! #line 1553 "parse.y" { + got_object = NULL_TREE; #if 0 /* This is a future direction of this code, but because *************** *** 5082,5088 **** ; break;} ! case 264: ! #line 1517 "parse.y" { #if 0 /* This is a future direction of this code, but because --- 5064,5071 ---- ; break;} ! case 283: ! #line 1569 "parse.y" { + got_object = NULL_TREE; #if 0 /* This is a future direction of this code, but because *************** *** 5099,5105 **** ; break;} ! case 265: ! #line 1532 "parse.y" { if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 (yyvsp[-3].ttype)))) { --- 5082,5089 ---- ; break;} ! case 284: ! #line 1585 "parse.y" { + got_object = NULL_TREE; if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 (yyvsp[-3].ttype)))) { *************** *** 5112,5118 **** ; break;} ! case 266: ! #line 1543 "parse.y" { if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 (yyvsp[-1].ttype)))) { --- 5096,5103 ---- ; break;} ! case 285: ! #line 1597 "parse.y" { + got_object = NULL_TREE; if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 (yyvsp[-1].ttype)))) { *************** *** 5125,5140 **** ; break;} ! case 267: ! #line 1555 "parse.y" ! { ! if (TREE_CODE (TREE_TYPE (yyvsp[-3].ttype)) ! != TREE_CODE (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (yyvsp[-1].ttype)))) cp_error ("`%E' is not of type `%T'", yyvsp[-3].ttype, yyvsp[-1].ttype); yyval.ttype = convert (void_type_node, yyvsp[-3].ttype); ; break;} ! case 268: ! #line 1562 "parse.y" ! { if (yyvsp[-4].ttype != yyvsp[-1].ttype) cp_error ("destructor specifier `%T::~%T()' must have matching names", yyvsp[-4].ttype, yyvsp[-1].ttype); --- 5110,5128 ---- ; break;} ! case 286: ! #line 1610 "parse.y" ! { ! got_object = NULL_TREE; ! if (IDENTIFIER_GLOBAL_VALUE (yyvsp[-1].ttype) ! && (TREE_CODE (TREE_TYPE (yyvsp[-3].ttype)) ! != TREE_CODE (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (yyvsp[-1].ttype))))) cp_error ("`%E' is not of type `%T'", yyvsp[-3].ttype, yyvsp[-1].ttype); yyval.ttype = convert (void_type_node, yyvsp[-3].ttype); ; break;} ! case 287: ! #line 1619 "parse.y" ! { ! got_object = NULL_TREE; if (yyvsp[-4].ttype != yyvsp[-1].ttype) cp_error ("destructor specifier `%T::~%T()' must have matching names", yyvsp[-4].ttype, yyvsp[-1].ttype); *************** *** 5145,5178 **** ; break;} ! case 269: ! #line 1611 "parse.y" { yyval.itype = 0; ; break;} ! case 270: ! #line 1613 "parse.y" { got_scope = NULL_TREE; yyval.itype = 1; ; break;} ! case 271: ! #line 1617 "parse.y" { yyval.itype = 0; ; break;} ! case 272: ! #line 1619 "parse.y" { got_scope = NULL_TREE; yyval.itype = 1; ; break;} ! case 273: ! #line 1624 "parse.y" ! { yyval.ttype = true_node; ; break;} ! case 274: ! #line 1626 "parse.y" ! { yyval.ttype = false_node; ; break;} ! case 276: ! #line 1633 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 277: ! #line 1638 "parse.y" { if (! current_function_parms_stored) --- 5133,5173 ---- ; break;} ! case 288: ! #line 1629 "parse.y" ! { ! got_object = NULL_TREE; ! yyval.ttype = error_mark_node; ! ; ! break;} ! case 289: ! #line 1674 "parse.y" { yyval.itype = 0; ; break;} ! case 290: ! #line 1676 "parse.y" { got_scope = NULL_TREE; yyval.itype = 1; ; break;} ! case 291: ! #line 1680 "parse.y" { yyval.itype = 0; ; break;} ! case 292: ! #line 1682 "parse.y" { got_scope = NULL_TREE; yyval.itype = 1; ; break;} ! case 293: ! #line 1687 "parse.y" ! { yyval.ttype = boolean_true_node; ; break;} ! case 294: ! #line 1689 "parse.y" ! { yyval.ttype = boolean_false_node; ; break;} ! case 296: ! #line 1696 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 297: ! #line 1701 "parse.y" { if (! current_function_parms_stored) *************** *** 5185,5200 **** ; break;} ! case 279: ! #line 1651 "parse.y" { ! yyval.ttype = build_x_arrow (yyval.ttype); ; break;} ! case 280: ! #line 1659 "parse.y" { tree d = get_decl_list (yyvsp[-2].ttype); int yes = suspend_momentary (); d = start_decl (yyvsp[-1].ttype, d, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); resume_momentary (yes); if (IS_AGGR_TYPE_CODE (TREE_CODE (yyvsp[-2].ttype))) --- 5180,5204 ---- ; break;} ! case 298: ! #line 1713 "parse.y" ! { got_object = TREE_TYPE (yyval.ttype); ; ! break;} ! case 299: ! #line 1715 "parse.y" { ! yyval.ttype = build_x_arrow (yyval.ttype); ! got_object = TREE_TYPE (yyval.ttype); ; break;} ! case 300: ! #line 1722 "parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; ! break;} ! case 301: ! #line 1728 "parse.y" { tree d = get_decl_list (yyvsp[-2].ttype); int yes = suspend_momentary (); d = start_decl (yyvsp[-1].ttype, d, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); resume_momentary (yes); if (IS_AGGR_TYPE_CODE (TREE_CODE (yyvsp[-2].ttype))) *************** *** 5202,5217 **** ; break;} ! case 281: ! #line 1668 "parse.y" { tree d = yyvsp[-2].ttype; int yes = suspend_momentary (); d = start_decl (yyvsp[-1].ttype, d, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); resume_momentary (yes); note_list_got_semicolon (yyvsp[-2].ttype); ; break;} ! case 282: ! #line 1676 "parse.y" { resume_momentary (yyvsp[-1].itype); --- 5206,5221 ---- ; break;} ! case 302: ! #line 1737 "parse.y" { tree d = yyvsp[-2].ttype; int yes = suspend_momentary (); d = start_decl (yyvsp[-1].ttype, d, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); resume_momentary (yes); note_list_got_semicolon (yyvsp[-2].ttype); ; break;} ! case 303: ! #line 1745 "parse.y" { resume_momentary (yyvsp[-1].itype); *************** *** 5220,5225 **** ; break;} ! case 283: ! #line 1682 "parse.y" { resume_momentary (yyvsp[-1].itype); --- 5224,5229 ---- ; break;} ! case 304: ! #line 1751 "parse.y" { resume_momentary (yyvsp[-1].itype); *************** *** 5227,5236 **** ; break;} ! case 284: ! #line 1687 "parse.y" { resume_momentary (yyvsp[-1].itype); ; break;} ! case 285: ! #line 1689 "parse.y" { shadow_tag (yyvsp[-1].ttype); --- 5231,5240 ---- ; break;} ! case 305: ! #line 1756 "parse.y" { resume_momentary (yyvsp[-1].itype); ; break;} ! case 306: ! #line 1758 "parse.y" { shadow_tag (yyvsp[-1].ttype); *************** *** 5238,5298 **** ; break;} ! case 286: ! #line 1694 "parse.y" { warning ("empty declaration"); ; break;} ! case 289: ! #line 1708 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, NULL_TREE, empty_parms (), NULL_TREE); ; break;} ! case 290: ! #line 1711 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, empty_parms (), NULL_TREE); ; break;} ! case 291: ! #line 1718 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 292: ! #line 1720 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 293: ! #line 1722 "parse.y" { yyval.ttype = build_decl_list (get_decl_list (yyval.ttype), yyvsp[0].ttype); ; break;} ! case 294: ! #line 1724 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, NULL_TREE); ; break;} ! case 295: ! #line 1726 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, NULL_TREE); ; break;} ! case 298: ! #line 1739 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 299: ! #line 1741 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 300: ! #line 1743 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype)); ; break;} ! case 301: ! #line 1745 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype)); ; break;} ! case 302: ! #line 1747 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-2].ttype, chainon (yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype))); ; break;} ! case 303: ! #line 1753 "parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", --- 5242,5306 ---- ; break;} ! case 307: ! #line 1763 "parse.y" { warning ("empty declaration"); ; break;} ! case 310: ! #line 1777 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, NULL_TREE, empty_parms (), NULL_TREE); ; break;} ! case 311: ! #line 1780 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, empty_parms (), NULL_TREE); ; break;} ! case 312: ! #line 1787 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 313: ! #line 1789 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 314: ! #line 1791 "parse.y" { yyval.ttype = build_decl_list (get_decl_list (yyval.ttype), yyvsp[0].ttype); ; break;} ! case 315: ! #line 1793 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, NULL_TREE); ; break;} ! case 316: ! #line 1795 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, NULL_TREE); ; break;} ! case 319: ! #line 1809 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 320: ! #line 1811 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 321: ! #line 1813 "parse.y" ! { yyval.ttype = decl_tree_cons (NULL_TREE, yyval.ttype, chainon (yyvsp[-1].ttype, yyvsp[0].ttype)); ; ! break;} ! case 322: ! #line 1815 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype)); ; break;} ! case 323: ! #line 1817 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype)); ; break;} ! case 324: ! #line 1819 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-2].ttype, chainon (yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype))); ; break;} ! case 325: ! #line 1825 "parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", *************** *** 5300,5309 **** yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ; break;} ! case 304: ! #line 1758 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 305: ! #line 1760 "parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", --- 5308,5317 ---- yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ; break;} ! case 326: ! #line 1830 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 327: ! #line 1832 "parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", *************** *** 5311,5329 **** yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 306: ! #line 1772 "parse.y" { TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 307: ! #line 1774 "parse.y" { yyval.ttype = IDENTIFIER_AS_LIST (yyval.ttype); ; break;} ! case 308: ! #line 1776 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 309: ! #line 1779 "parse.y" { if (extra_warnings && TREE_STATIC (yyval.ttype)) warning ("`%s' is not at beginning of declaration", --- 5319,5345 ---- yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 328: ! #line 1837 "parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ; ! break;} ! case 329: ! #line 1839 "parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 330: ! #line 1848 "parse.y" { TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 331: ! #line 1850 "parse.y" { yyval.ttype = IDENTIFIER_AS_LIST (yyval.ttype); ; break;} ! case 332: ! #line 1852 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 333: ! #line 1855 "parse.y" { if (extra_warnings && TREE_STATIC (yyval.ttype)) warning ("`%s' is not at beginning of declaration", *************** *** 5332,5373 **** TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} ! case 310: ! #line 1795 "parse.y" { yyval.ttype = get_decl_list (yyval.ttype); ; break;} ! case 311: ! #line 1797 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 312: ! #line 1799 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 313: ! #line 1801 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype)); ; break;} ! case 314: ! #line 1806 "parse.y" { yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ; break;} ! case 315: ! #line 1808 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 319: ! #line 1819 "parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ! if (flag_ansi) pedwarn ("ANSI C++ forbids `typeof'"); ; break;} ! case 320: ! #line 1823 "parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ! if (flag_ansi) pedwarn ("ANSI C++ forbids `typeof'"); ; break;} ! case 321: ! #line 1827 "parse.y" { tree type = TREE_TYPE (yyvsp[-1].ttype); --- 5348,5397 ---- TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} ! case 334: ! #line 1861 "parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ; ! break;} ! case 335: ! #line 1863 "parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 336: ! #line 1875 "parse.y" { yyval.ttype = get_decl_list (yyval.ttype); ; break;} ! case 337: ! #line 1877 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 338: ! #line 1879 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 339: ! #line 1881 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyval.ttype)); ; break;} ! case 340: ! #line 1886 "parse.y" { yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ; break;} ! case 341: ! #line 1888 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 345: ! #line 1899 "parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ! if (pedantic) pedwarn ("ANSI C++ forbids `typeof'"); ; break;} ! case 346: ! #line 1903 "parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ! if (pedantic) pedwarn ("ANSI C++ forbids `typeof'"); ; break;} ! case 347: ! #line 1907 "parse.y" { tree type = TREE_TYPE (yyvsp[-1].ttype); *************** *** 5384,5389 **** ; break;} ! case 322: ! #line 1841 "parse.y" { tree type = groktypename (yyvsp[-1].ttype); --- 5408,5413 ---- ; break;} ! case 348: ! #line 1921 "parse.y" { tree type = groktypename (yyvsp[-1].ttype); *************** *** 5400,5413 **** ; break;} ! case 332: ! #line 1880 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 333: ! #line 1882 "parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 334: ! #line 1887 "parse.y" { current_declspecs = yyvsp[-5].ttype; if (TREE_CODE (current_declspecs) != TREE_LIST) --- 5424,5437 ---- ; break;} ! case 358: ! #line 1960 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 359: ! #line 1962 "parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 360: ! #line 1967 "parse.y" { current_declspecs = yyvsp[-5].ttype; if (TREE_CODE (current_declspecs) != TREE_LIST) *************** *** 5422,5434 **** yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 335: ! #line 1902 "parse.y" ! { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0); yyval.itype = yyvsp[-2].itype; ; break;} ! case 336: ! #line 1905 "parse.y" { tree d; current_declspecs = yyvsp[-4].ttype; --- 5446,5458 ---- yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 361: ! #line 1982 "parse.y" ! { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0, LOOKUP_ONLYCONVERTING); yyval.itype = yyvsp[-2].itype; ; break;} ! case 362: ! #line 1985 "parse.y" { tree d; current_declspecs = yyvsp[-4].ttype; *************** *** 5444,5648 **** yyval.itype = suspend_momentary (); d = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (d, yyvsp[0].ttype); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 0); ; break;} ! case 337: ! #line 1924 "parse.y" { yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 338: ! #line 1928 "parse.y" ! { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0); ; break;} ! case 339: ! #line 1930 "parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ! finish_decl (yyval.ttype, NULL_TREE, yyvsp[-1].ttype, 0); ; break;} ! case 340: ! #line 1937 "parse.y" { current_declspecs = yyvsp[-5].ttype; yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 341: ! #line 1943 "parse.y" ! { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0); yyval.itype = yyvsp[-2].itype; ; break;} ! case 342: ! #line 1946 "parse.y" { tree d; current_declspecs = yyvsp[-4].ttype; yyval.itype = suspend_momentary (); d = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (d, yyvsp[0].ttype); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 0); ; break;} ! case 343: ! #line 1956 "parse.y" { current_declspecs = NULL_TREE; yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 344: ! #line 1962 "parse.y" ! { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0); yyval.itype = yyvsp[-2].itype; ; break;} ! case 345: ! #line 1965 "parse.y" { tree d; current_declspecs = NULL_TREE; yyval.itype = suspend_momentary (); d = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (d, yyvsp[0].ttype); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 0); ; break;} ! case 346: ! #line 1977 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 347: ! #line 1979 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 348: ! #line 1984 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 349: ! #line 1986 "parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 350: ! #line 1991 "parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} ! case 351: ! #line 1996 "parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 352: ! #line 1998 "parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 353: ! #line 2003 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 354: ! #line 2005 "parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 355: ! #line 2007 "parse.y" ! { yyval.ttype = tree_cons (yyvsp[-3].ttype, NULL_TREE, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; ! break;} ! case 356: ! #line 2009 "parse.y" ! { yyval.ttype = tree_cons (yyvsp[-5].ttype, NULL_TREE, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; ! break;} ! case 357: ! #line 2011 "parse.y" ! { yyval.ttype = tree_cons (yyvsp[-3].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 362: ! #line 2027 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 363: ! #line 2029 "parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 365: ! #line 2035 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, NULL_TREE); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} ! case 366: ! #line 2038 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype)); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} ! case 367: ! #line 2041 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} ! case 368: ! #line 2044 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 369: ! #line 2051 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 370: ! #line 2053 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 371: ! #line 2056 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 372: ! #line 2058 "parse.y" { yyval.ttype = tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 373: ! #line 2060 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 374: ! #line 2062 "parse.y" { yyval.ttype = tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 375: ! #line 2067 "parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} ! case 376: ! #line 2070 "parse.y" { yyval.ttype = finish_enum (yyvsp[-3].ttype, yyvsp[-2].ttype); resume_momentary ((int) yyvsp[-4].itype); check_for_missing_semicolon (yyvsp[-3].ttype); ; break;} ! case 377: ! #line 2074 "parse.y" { yyval.ttype = finish_enum (start_enum (yyvsp[-2].ttype), NULL_TREE); check_for_missing_semicolon (yyval.ttype); ; break;} ! case 378: ! #line 2077 "parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (make_anon_name ()); ; break;} ! case 379: ! #line 2080 "parse.y" { yyval.ttype = finish_enum (yyvsp[-3].ttype, yyvsp[-2].ttype); resume_momentary ((int) yyvsp[-5].itype); check_for_missing_semicolon (yyvsp[-3].ttype); ; break;} ! case 380: ! #line 2084 "parse.y" { yyval.ttype = finish_enum (start_enum (make_anon_name()), NULL_TREE); check_for_missing_semicolon (yyval.ttype); ; break;} ! case 381: ! #line 2087 "parse.y" ! { yyval.ttype = xref_tag (enum_type_node, yyvsp[0].ttype, NULL_TREE, 0); ; break;} ! case 382: ! #line 2089 "parse.y" ! { yyval.ttype = xref_tag (enum_type_node, yyvsp[0].ttype, NULL_TREE, 0); ; break;} ! case 383: ! #line 2093 "parse.y" { int semi; --- 5468,5684 ---- yyval.itype = suspend_momentary (); d = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (d, yyvsp[0].ttype, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 0, 0); ; break;} ! case 363: ! #line 2004 "parse.y" { yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 364: ! #line 2008 "parse.y" ! { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0, LOOKUP_ONLYCONVERTING); ; break;} ! case 365: ! #line 2010 "parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ! cp_finish_decl (yyval.ttype, NULL_TREE, yyvsp[-1].ttype, 0, 0); ; break;} ! case 366: ! #line 2017 "parse.y" { current_declspecs = yyvsp[-5].ttype; yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 367: ! #line 2023 "parse.y" ! { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0, LOOKUP_ONLYCONVERTING); yyval.itype = yyvsp[-2].itype; ; break;} ! case 368: ! #line 2026 "parse.y" { tree d; current_declspecs = yyvsp[-4].ttype; yyval.itype = suspend_momentary (); d = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (d, yyvsp[0].ttype, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 0, 0); ; break;} ! case 369: ! #line 2036 "parse.y" { current_declspecs = NULL_TREE; yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_decl (yyvsp[-4].ttype, current_declspecs, 1, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 370: ! #line 2042 "parse.y" ! { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 0, LOOKUP_ONLYCONVERTING); yyval.itype = yyvsp[-2].itype; ; break;} ! case 371: ! #line 2045 "parse.y" { tree d; current_declspecs = NULL_TREE; yyval.itype = suspend_momentary (); d = start_decl (yyvsp[-3].ttype, current_declspecs, 0, yyvsp[-2].ttype); ! cplus_decl_attributes (d, yyvsp[0].ttype, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 0, 0); ; break;} ! case 372: ! #line 2057 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 373: ! #line 2059 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 374: ! #line 2064 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 375: ! #line 2066 "parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 376: ! #line 2071 "parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} ! case 377: ! #line 2076 "parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 378: ! #line 2078 "parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 379: ! #line 2083 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 380: ! #line 2085 "parse.y" ! { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 381: ! #line 2087 "parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} ! case 382: ! #line 2089 "parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; ! break;} ! case 383: ! #line 2091 "parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 388: ! #line 2107 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 389: ! #line 2109 "parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 390: ! #line 2114 "parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 391: ! #line 2116 "parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 393: ! #line 2121 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, NULL_TREE); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} ! case 394: ! #line 2124 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype)); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} ! case 395: ! #line 2127 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} ! case 396: ! #line 2130 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 397: ! #line 2137 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 398: ! #line 2139 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 399: ! #line 2142 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 400: ! #line 2144 "parse.y" { yyval.ttype = tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 401: ! #line 2146 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 402: ! #line 2148 "parse.y" { yyval.ttype = tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 403: ! #line 2153 "parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} ! case 404: ! #line 2156 "parse.y" { yyval.ttype = finish_enum (yyvsp[-3].ttype, yyvsp[-2].ttype); resume_momentary ((int) yyvsp[-4].itype); check_for_missing_semicolon (yyvsp[-3].ttype); ; break;} ! case 405: ! #line 2160 "parse.y" { yyval.ttype = finish_enum (start_enum (yyvsp[-2].ttype), NULL_TREE); check_for_missing_semicolon (yyval.ttype); ; break;} ! case 406: ! #line 2163 "parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (make_anon_name ()); ; break;} ! case 407: ! #line 2166 "parse.y" { yyval.ttype = finish_enum (yyvsp[-3].ttype, yyvsp[-2].ttype); resume_momentary ((int) yyvsp[-5].itype); check_for_missing_semicolon (yyvsp[-3].ttype); ; break;} ! case 408: ! #line 2170 "parse.y" { yyval.ttype = finish_enum (start_enum (make_anon_name()), NULL_TREE); check_for_missing_semicolon (yyval.ttype); ; break;} ! case 409: ! #line 2173 "parse.y" ! { yyval.ttype = xref_tag (enum_type_node, yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 410: ! #line 2175 "parse.y" ! { yyval.ttype = xref_tag (enum_type_node, yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 411: ! #line 2177 "parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 412: ! #line 2180 "parse.y" { int semi; *************** *** 5664,5670 **** if (TREE_CODE (yyval.ttype) == ENUMERAL_TYPE) /* $$ = $1 from default rule. */; - else if (CLASSTYPE_DECLARED_EXCEPTION (yyval.ttype)) - { - } else { --- 5700,5703 ---- *************** *** 5696,5736 **** check_for_missing_semicolon (yyval.ttype); ; break;} ! case 384: ! #line 2144 "parse.y" { ! #if 0 ! /* It's no longer clear what the following error is supposed to ! accomplish. If it turns out to be needed, add a comment why. */ ! if (TYPE_BINFO_BASETYPES (yyval.ttype) && !TYPE_SIZE (yyval.ttype)) ! { ! error ("incomplete definition of type `%s'", ! TYPE_NAME_STRING (yyval.ttype)); ! yyval.ttype = error_mark_node; ! } ! #endif ; break;} ! case 388: ! #line 2166 "parse.y" { if (pedantic) pedwarn ("comma at end of enumerator list"); ; break;} ! case 390: ! #line 2171 "parse.y" { error ("storage class specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} ! case 391: ! #line 2173 "parse.y" { error ("type specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} ! case 392: ! #line 2175 "parse.y" { error ("type qualifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} ! case 393: ! #line 2177 "parse.y" { error ("no body nor ';' separates two class, struct or union declarations"); ; break;} ! case 394: ! #line 2182 "parse.y" { yyungetc (';', 1); current_aggr = yyval.ttype; yyval.ttype = yyvsp[-1].ttype; --- 5729,5764 ---- check_for_missing_semicolon (yyval.ttype); ; break;} ! case 413: ! #line 2228 "parse.y" { ! /* struct B: public A; is not accepted by the WP grammar. */ ! if (TYPE_BINFO_BASETYPES (yyval.ttype) && !TYPE_SIZE (yyval.ttype) ! && ! TYPE_BEING_DEFINED (yyval.ttype)) ! cp_error ("base clause without member specification for `%#T'", ! yyval.ttype); ; break;} ! case 417: ! #line 2245 "parse.y" { if (pedantic) pedwarn ("comma at end of enumerator list"); ; break;} ! case 419: ! #line 2250 "parse.y" { error ("storage class specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} ! case 420: ! #line 2252 "parse.y" { error ("type specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} ! case 421: ! #line 2254 "parse.y" { error ("type qualifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} ! case 422: ! #line 2256 "parse.y" { error ("no body nor ';' separates two class, struct or union declarations"); ; break;} ! case 423: ! #line 2261 "parse.y" { yyungetc (';', 1); current_aggr = yyval.ttype; yyval.ttype = yyvsp[-1].ttype; *************** *** 5739,5756 **** ; break;} ! case 395: ! #line 2191 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 396: ! #line 2193 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 397: ! #line 2195 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 398: ! #line 2197 "parse.y" { yyungetc ('{', 1); aggr2: --- 5767,5788 ---- ; break;} ! case 424: ! #line 2270 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 425: ! #line 2272 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 426: ! #line 2274 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 428: ! #line 2280 "parse.y" ! { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 429: ! #line 2282 "parse.y" { yyungetc ('{', 1); aggr2: *************** *** 5759,5819 **** overload_template_name (yyval.ttype, 0); ; break;} ! case 399: ! #line 2203 "parse.y" { yyungetc (':', 1); goto aggr2; ; break;} ! case 401: ! #line 2209 "parse.y" ! { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 402: ! #line 2213 "parse.y" { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 403: ! #line 2216 "parse.y" ! { yyval.ttype = xref_defn_tag (current_aggr, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 404: ! #line 2221 "parse.y" ! { ! if (yyvsp[0].ttype) ! yyval.ttype = xref_tag (current_aggr, yyvsp[-2].ttype, yyvsp[0].ttype, 1); ! else ! yyval.ttype = yyvsp[-1].ttype; ! ; ! break;} ! case 405: ! #line 2230 "parse.y" ! { if (yyvsp[0].ttype) ! yyval.ttype = xref_defn_tag (current_aggr, yyvsp[-2].ttype, yyvsp[0].ttype); ! else ! yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 406: ! #line 2239 "parse.y" { yyval.ttype = xref_tag (yyval.ttype, make_anon_name (), NULL_TREE, 0); yyungetc ('{', 1); ; break;} ! case 409: ! #line 2247 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 410: ! #line 2249 "parse.y" { yyungetc(':', 1); yyval.ttype = NULL_TREE; ; break;} ! case 411: ! #line 2251 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 413: ! #line 2257 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 414: ! #line 2262 "parse.y" { tree type; --- 5791,5837 ---- overload_template_name (yyval.ttype, 0); ; break;} ! case 430: ! #line 2288 "parse.y" { yyungetc (':', 1); goto aggr2; ; break;} ! case 431: ! #line 2292 "parse.y" ! { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, NULL_TREE, 0); ; break;} ! case 432: ! #line 2297 "parse.y" { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 433: ! #line 2300 "parse.y" ! { ! yyval.ttype = yyvsp[-1].ttype; if (yyvsp[0].ttype) ! xref_basetypes (current_aggr, yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 434: ! #line 2308 "parse.y" { yyval.ttype = xref_tag (yyval.ttype, make_anon_name (), NULL_TREE, 0); yyungetc ('{', 1); ; break;} ! case 437: ! #line 2316 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 438: ! #line 2318 "parse.y" { yyungetc(':', 1); yyval.ttype = NULL_TREE; ; break;} ! case 439: ! #line 2320 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 441: ! #line 2326 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 442: ! #line 2331 "parse.y" { tree type; *************** *** 5843,5848 **** ; break;} ! case 415: ! #line 2289 "parse.y" { tree type; --- 5861,5866 ---- ; break;} ! case 443: ! #line 2358 "parse.y" { tree type; *************** *** 5874,5879 **** ; break;} ! case 417: ! #line 2322 "parse.y" { if (current_aggr == signature_type_node) --- 5892,5897 ---- ; break;} ! case 445: ! #line 2391 "parse.y" { if (current_aggr == signature_type_node) *************** *** 5898,5903 **** ; break;} ! case 418: ! #line 2344 "parse.y" { if (current_aggr == signature_type_node) --- 5916,5921 ---- ; break;} ! case 446: ! #line 2413 "parse.y" { if (current_aggr == signature_type_node) *************** *** 5922,5933 **** ; break;} ! case 420: ! #line 2370 "parse.y" { if (yyval.ttype != ridpointers[(int)RID_VIRTUAL]) sorry ("non-virtual access"); yyval.itype = access_default_virtual; ; break;} ! case 421: ! #line 2374 "parse.y" { int err = 0; if (yyvsp[0].itype == access_protected) --- 5940,5951 ---- ; break;} ! case 448: ! #line 2439 "parse.y" { if (yyval.ttype != ridpointers[(int)RID_VIRTUAL]) sorry ("non-virtual access"); yyval.itype = access_default_virtual; ; break;} ! case 449: ! #line 2443 "parse.y" { int err = 0; if (yyvsp[0].itype == access_protected) *************** *** 5956,5961 **** ; break;} ! case 422: ! #line 2400 "parse.y" { if (yyvsp[0].ttype != ridpointers[(int)RID_VIRTUAL]) sorry ("non-virtual access"); --- 5974,5979 ---- ; break;} ! case 450: ! #line 2469 "parse.y" { if (yyvsp[0].ttype != ridpointers[(int)RID_VIRTUAL]) sorry ("non-virtual access"); *************** *** 5965,5970 **** yyval.itype = access_private_virtual; ; break;} ! case 423: ! #line 2409 "parse.y" { tree t = yyvsp[-1].ttype; push_obstacks_nochange (); --- 5983,5988 ---- yyval.itype = access_private_virtual; ; break;} ! case 451: ! #line 2478 "parse.y" { tree t = yyvsp[-1].ttype; push_obstacks_nochange (); *************** *** 5996,6001 **** tree name = TYPE_IDENTIFIER (t); ! CLASSTYPE_INTERFACE_ONLY (t) = interface_only; ! SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown); /* Record how to set the access of this class's --- 6014,6023 ---- tree name = TYPE_IDENTIFIER (t); ! if (! ANON_AGGRNAME_P (name)) ! { ! CLASSTYPE_INTERFACE_ONLY (t) = interface_only; ! SET_CLASSTYPE_INTERFACE_UNKNOWN_X ! (t, interface_unknown); ! } /* Record how to set the access of this class's *************** *** 6027,6036 **** ; break;} ! case 424: ! #line 2472 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 425: ! #line 2474 "parse.y" { if (current_aggr == signature_type_node) --- 6049,6058 ---- ; break;} ! case 452: ! #line 2545 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 453: ! #line 2547 "parse.y" { if (current_aggr == signature_type_node) *************** *** 6040,6045 **** ; break;} ! case 426: ! #line 2481 "parse.y" { tree visspec = (tree) yyvsp[-2].itype; --- 6062,6067 ---- ; break;} ! case 454: ! #line 2554 "parse.y" { tree visspec = (tree) yyvsp[-2].itype; *************** *** 6053,6058 **** ; break;} ! case 427: ! #line 2492 "parse.y" { if (current_aggr == signature_type_node) --- 6075,6080 ---- ; break;} ! case 455: ! #line 2565 "parse.y" { if (current_aggr == signature_type_node) *************** *** 6060,6070 **** ; break;} ! case 428: ! #line 2502 "parse.y" { if (yyval.ttype == void_type_node) yyval.ttype = NULL_TREE; ; break;} ! case 429: ! #line 2505 "parse.y" { /* In pushdecl, we created a reverse list of names in this binding level. Make sure that the chain --- 6082,6092 ---- ; break;} ! case 456: ! #line 2575 "parse.y" { if (yyval.ttype == void_type_node) yyval.ttype = NULL_TREE; ; break;} ! case 457: ! #line 2578 "parse.y" { /* In pushdecl, we created a reverse list of names in this binding level. Make sure that the chain *************** *** 6080,6141 **** ; break;} ! case 432: ! #line 2523 "parse.y" { error ("missing ';' before right brace"); yyungetc ('}', 0); ; break;} ! case 433: ! #line 2528 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} ! case 434: ! #line 2530 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} ! case 435: ! #line 2538 "parse.y" { yyval.ttype = grok_x_components (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 436: ! #line 2542 "parse.y" { yyval.ttype = grok_x_components (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 437: ! #line 2546 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 438: ! #line 2549 "parse.y" { yyval.ttype = grokbitfield (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 439: ! #line 2551 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 440: ! #line 2562 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-4].ttype), ! yyvsp[-2].ttype, yyvsp[0].ttype); ! yyval.ttype = grokfield (yyval.ttype, TREE_CHAIN (yyvsp[-4].ttype), NULL_TREE, NULL_TREE, ! NULL_TREE); ; break;} ! case 441: ! #line 2567 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-2].ttype), ! empty_parms (), yyvsp[0].ttype); ! yyval.ttype = grokfield (yyval.ttype, TREE_CHAIN (yyvsp[-2].ttype), NULL_TREE, NULL_TREE, ! NULL_TREE); ; break;} ! case 442: ! #line 2576 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 444: ! #line 2579 "parse.y" { /* In this context, void_type_node encodes --- 6102,6171 ---- ; break;} ! case 459: ! #line 2595 "parse.y" { error ("missing ';' before right brace"); yyungetc ('}', 0); ; break;} ! case 460: ! #line 2600 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} ! case 461: ! #line 2602 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} ! case 462: ! #line 2604 "parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 463: ! #line 2612 "parse.y" { yyval.ttype = grok_x_components (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 464: ! #line 2616 "parse.y" { yyval.ttype = grok_x_components (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 465: ! #line 2620 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 466: ! #line 2623 "parse.y" { yyval.ttype = grokbitfield (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 467: ! #line 2625 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 468: ! #line 2636 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-8].ttype), ! yyvsp[-6].ttype, yyvsp[-4].ttype); ! yyval.ttype = grokfield (yyval.ttype, TREE_CHAIN (yyvsp[-8].ttype), yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 469: ! #line 2641 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, TREE_VALUE (yyvsp[-6].ttype), ! empty_parms (), yyvsp[-4].ttype); ! yyval.ttype = grokfield (yyval.ttype, TREE_CHAIN (yyvsp[-6].ttype), yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 470: ! #line 2646 "parse.y" ! { yyval.ttype = do_class_using_decl (yyvsp[0].ttype); ; ! break;} ! case 471: ! #line 2652 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 473: ! #line 2655 "parse.y" { /* In this context, void_type_node encodes *************** *** 6147,6156 **** ; break;} ! case 445: ! #line 2591 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 447: ! #line 2594 "parse.y" { /* In this context, void_type_node encodes --- 6177,6186 ---- ; break;} ! case 474: ! #line 2667 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 476: ! #line 2670 "parse.y" { /* In this context, void_type_node encodes *************** *** 6162,6266 **** ; break;} ! case 452: ! #line 2616 "parse.y" ! { current_declspecs = yyvsp[-4].ttype; ! yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; ! break;} ! case 453: ! #line 2620 "parse.y" ! { current_declspecs = yyvsp[-6].ttype; ! yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-4].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-2].ttype); ; break;} ! case 454: ! #line 2624 "parse.y" { current_declspecs = yyvsp[-4].ttype; yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; ! break;} ! case 455: ! #line 2631 "parse.y" ! { current_declspecs = yyvsp[-4].ttype; ! yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 456: ! #line 2635 "parse.y" ! { current_declspecs = yyvsp[-6].ttype; ! yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-4].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-2].ttype); ; break;} ! case 457: ! #line 2639 "parse.y" { current_declspecs = yyvsp[-4].ttype; yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 458: ! #line 2643 "parse.y" { current_declspecs = yyvsp[-3].ttype; yyval.ttype = grokbitfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; ! break;} ! case 459: ! #line 2650 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 460: ! #line 2653 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-4].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-2].ttype); ; break;} ! case 461: ! #line 2656 "parse.y" { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; ! break;} ! case 462: ! #line 2662 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 463: ! #line 2665 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-4].ttype, yyvsp[0].ttype, yyvsp[-3].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-2].ttype); ; break;} ! case 464: ! #line 2668 "parse.y" { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 465: ! #line 2671 "parse.y" { yyval.ttype = grokbitfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 467: ! #line 2682 "parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 468: ! #line 2687 "parse.y" { yyval.ttype = build_enumerator (yyval.ttype, NULL_TREE); ; break;} ! case 469: ! #line 2689 "parse.y" { yyval.ttype = build_enumerator (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 470: ! #line 2695 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 471: ! #line 2697 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, NULL_TREE); ; break;} ! case 472: ! #line 2701 "parse.y" { ! if (flag_ansi) pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new"); yyval.ttype = build_parse_node (ARRAY_REF, TREE_VALUE (yyvsp[-4].ttype), yyvsp[-1].ttype); --- 6192,6274 ---- ; break;} ! case 481: ! #line 2692 "parse.y" ! { current_declspecs = yyvsp[-5].ttype; ! yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 482: ! #line 2696 "parse.y" { current_declspecs = yyvsp[-4].ttype; yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 483: ! #line 2703 "parse.y" ! { current_declspecs = yyvsp[-5].ttype; ! yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 484: ! #line 2707 "parse.y" { current_declspecs = yyvsp[-4].ttype; yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 485: ! #line 2711 "parse.y" { current_declspecs = yyvsp[-3].ttype; yyval.ttype = grokbitfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 486: ! #line 2718 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 487: ! #line 2721 "parse.y" { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 488: ! #line 2727 "parse.y" ! { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[-3].ttype, yyvsp[0].ttype, yyvsp[-2].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[-1].ttype, prefix_attributes); ; break;} ! case 489: ! #line 2730 "parse.y" { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 490: ! #line 2733 "parse.y" { yyval.ttype = grokbitfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 492: ! #line 2744 "parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 493: ! #line 2749 "parse.y" { yyval.ttype = build_enumerator (yyval.ttype, NULL_TREE); ; break;} ! case 494: ! #line 2751 "parse.y" { yyval.ttype = build_enumerator (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 495: ! #line 2757 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 496: ! #line 2759 "parse.y" { yyval.ttype = build_decl_list (yyval.ttype, NULL_TREE); ; break;} ! case 497: ! #line 2763 "parse.y" { ! if (pedantic) pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new"); yyval.ttype = build_parse_node (ARRAY_REF, TREE_VALUE (yyvsp[-4].ttype), yyvsp[-1].ttype); *************** *** 6268,6319 **** ; break;} ! case 473: ! #line 2711 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 474: ! #line 2713 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 475: ! #line 2718 "parse.y" { yyval.ttype = IDENTIFIER_AS_LIST (yyval.ttype); ; break;} ! case 476: ! #line 2720 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 477: ! #line 2728 "parse.y" { yyval.itype = suspend_momentary (); ; break;} ! case 478: ! #line 2729 "parse.y" { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = yyvsp[0].ttype; ; break;} ! case 479: ! #line 2736 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 480: ! #line 2738 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 481: ! #line 2740 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 482: ! #line 2742 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 483: ! #line 2744 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 485: ! #line 2752 "parse.y" { /* Remember that this name has been used in the class --- 6276,6343 ---- ; break;} ! case 498: ! #line 2773 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 499: ! #line 2775 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 500: ! #line 2780 "parse.y" { yyval.ttype = IDENTIFIER_AS_LIST (yyval.ttype); ; break;} ! case 501: ! #line 2782 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 502: ! #line 2789 "parse.y" { yyval.itype = suspend_momentary (); ; break;} ! case 503: ! #line 2794 "parse.y" { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = yyvsp[0].ttype; ; break;} ! case 504: ! #line 2800 "parse.y" ! { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 505: ! #line 2802 "parse.y" ! { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 506: ! #line 2804 "parse.y" ! { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = empty_parms (); ; ! break;} ! case 507: ! #line 2806 "parse.y" ! { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = NULL_TREE; ; ! break;} ! case 508: ! #line 2813 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 509: ! #line 2815 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 510: ! #line 2817 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 511: ! #line 2819 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 512: ! #line 2821 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 514: ! #line 2829 "parse.y" { /* Remember that this name has been used in the class *************** *** 6329,6622 **** ; break;} ! case 487: ! #line 2769 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 488: ! #line 2774 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 489: ! #line 2776 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 490: ! #line 2778 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, empty_parms (), yyvsp[0].ttype); ; ! break;} ! case 491: ! #line 2780 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, NULL_TREE, NULL_TREE); ; break;} ! case 492: ! #line 2782 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 493: ! #line 2784 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} ! case 494: ! #line 2786 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 495: ! #line 2788 "parse.y" { push_nested_class (TREE_TYPE (yyval.ttype), 3); yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); TREE_COMPLEXITY (yyval.ttype) = current_class_depth; ; break;} ! case 497: ! #line 2799 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 498: ! #line 2801 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 499: ! #line 2803 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 500: ! #line 2805 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 501: ! #line 2807 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 503: ! #line 2815 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 504: ! #line 2817 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 505: ! #line 2819 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 506: ! #line 2821 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 507: ! #line 2823 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 509: ! #line 2831 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 510: ! #line 2833 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 511: ! #line 2835 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, empty_parms (), yyvsp[0].ttype); ; ! break;} ! case 512: ! #line 2837 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, NULL_TREE, NULL_TREE); ; break;} ! case 513: ! #line 2839 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 514: ! #line 2841 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 515: ! #line 2843 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} ! case 516: ! #line 2848 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 517: ! #line 2854 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 519: ! #line 2861 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 520: ! #line 2866 "parse.y" { yyval.ttype = build_functional_cast (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 521: ! #line 2868 "parse.y" { yyval.ttype = reparse_decl_as_expr (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 522: ! #line 2870 "parse.y" { yyval.ttype = reparse_absdcl_as_expr (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 526: ! #line 2881 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 527: ! #line 2888 "parse.y" { got_scope = TREE_TYPE (yyval.ttype); ; break;} ! case 528: ! #line 2890 "parse.y" { got_scope = TREE_TYPE (yyval.ttype); ; break;} ! case 530: ! #line 2906 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 532: ! #line 2912 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 533: ! #line 2917 "parse.y" { got_scope = NULL_TREE; ; break;} ! case 534: ! #line 2919 "parse.y" { yyval.ttype = yyvsp[-1].ttype; got_scope = NULL_TREE; ; break;} ! case 535: ! #line 2926 "parse.y" { got_scope = void_type_node; ; break;} ! case 536: ! #line 2932 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 537: ! #line 2934 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 538: ! #line 2936 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 539: ! #line 2938 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 540: ! #line 2940 "parse.y" { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); ; break;} ! case 541: ! #line 2944 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 543: ! #line 2953 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 544: ! #line 2955 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 545: ! #line 2961 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 546: ! #line 2963 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 547: ! #line 2965 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 548: ! #line 2967 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, NULL_TREE); ; break;} ! case 549: ! #line 2969 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 550: ! #line 2971 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 551: ! #line 2973 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 552: ! #line 2975 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, NULL_TREE); ; break;} ! case 553: ! #line 2977 "parse.y" { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); ; break;} ! case 554: ! #line 2981 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 556: ! #line 2990 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 558: ! #line 2994 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 559: ! #line 2996 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, empty_parms (), yyvsp[0].ttype); ; break;} ! case 560: ! #line 2998 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 561: ! #line 3000 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} ! case 562: ! #line 3002 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 563: ! #line 3004 "parse.y" { TREE_OPERAND (yyval.ttype, 2) = yyvsp[0].ttype; ; break;} ! case 564: ! #line 3006 "parse.y" { TREE_OPERAND (yyval.ttype, 2) = yyvsp[0].ttype; ; break;} ! case 565: ! #line 3008 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 566: ! #line 3010 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} ! case 572: ! #line 3032 "parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); --- 6353,6631 ---- ; break;} ! case 516: ! #line 2846 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 517: ! #line 2851 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 518: ! #line 2853 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 519: ! #line 2855 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} ! case 520: ! #line 2857 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 521: ! #line 2859 "parse.y" { push_nested_class (TREE_TYPE (yyval.ttype), 3); yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); TREE_COMPLEXITY (yyval.ttype) = current_class_depth; ; break;} ! case 523: ! #line 2870 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 524: ! #line 2872 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 525: ! #line 2874 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 526: ! #line 2876 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 527: ! #line 2878 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 529: ! #line 2886 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 530: ! #line 2888 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 531: ! #line 2890 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 532: ! #line 2892 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 533: ! #line 2894 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 535: ! #line 2902 "parse.y" ! { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 536: ! #line 2904 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 537: ! #line 2906 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 538: ! #line 2908 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} ! case 539: ! #line 2910 "parse.y" ! { push_nested_class (TREE_TYPE (OP0 (yyval.ttype)), 3); ! TREE_COMPLEXITY (yyval.ttype) = current_class_depth; ; ! break;} ! case 540: ! #line 2916 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 541: ! #line 2922 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; break;} ! case 543: ! #line 2929 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 544: ! #line 2934 "parse.y" { yyval.ttype = build_functional_cast (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 545: ! #line 2936 "parse.y" { yyval.ttype = reparse_decl_as_expr (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 546: ! #line 2938 "parse.y" { yyval.ttype = reparse_absdcl_as_expr (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 550: ! #line 2949 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 551: ! #line 2956 "parse.y" { got_scope = TREE_TYPE (yyval.ttype); ; break;} ! case 552: ! #line 2958 "parse.y" ! { got_scope = yyval.ttype; ; ! break;} ! case 553: ! #line 2960 "parse.y" { got_scope = TREE_TYPE (yyval.ttype); ; break;} ! case 555: ! #line 2976 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 557: ! #line 2982 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 558: ! #line 2987 "parse.y" { got_scope = NULL_TREE; ; break;} ! case 559: ! #line 2989 "parse.y" { yyval.ttype = yyvsp[-1].ttype; got_scope = NULL_TREE; ; break;} ! case 560: ! #line 2996 "parse.y" { got_scope = void_type_node; ; break;} ! case 561: ! #line 3002 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 562: ! #line 3004 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 563: ! #line 3006 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 564: ! #line 3008 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 565: ! #line 3010 "parse.y" { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); ; break;} ! case 566: ! #line 3014 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 568: ! #line 3023 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 569: ! #line 3025 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 570: ! #line 3031 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 571: ! #line 3033 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 572: ! #line 3035 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 573: ! #line 3037 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, NULL_TREE); ; break;} ! case 574: ! #line 3039 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 575: ! #line 3041 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 576: ! #line 3043 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 577: ! #line 3045 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, NULL_TREE); ; break;} ! case 578: ! #line 3047 "parse.y" { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); ; break;} ! case 579: ! #line 3051 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 581: ! #line 3060 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 583: ! #line 3064 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 584: ! #line 3066 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, yyval.ttype, empty_parms (), yyvsp[0].ttype); ; break;} ! case 585: ! #line 3068 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 586: ! #line 3070 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} ! case 587: ! #line 3072 "parse.y" { yyval.ttype = build_parse_node (CALL_EXPR, NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 588: ! #line 3074 "parse.y" { TREE_OPERAND (yyval.ttype, 2) = yyvsp[0].ttype; ; break;} ! case 589: ! #line 3076 "parse.y" { TREE_OPERAND (yyval.ttype, 2) = yyvsp[0].ttype; ; break;} ! case 590: ! #line 3078 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 591: ! #line 3080 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} ! case 597: ! #line 3102 "parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); *************** *** 6625,6635 **** expand_start_bindings (0); ; break;} ! case 574: ! #line 3044 "parse.y" ! { if (flag_ansi) pedwarn ("ANSI C++ forbids label declarations"); ; break;} ! case 577: ! #line 3055 "parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) --- 6634,6650 ---- expand_start_bindings (0); ; break;} ! case 598: ! #line 3110 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p (), 1); ! yyval.ttype = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ; ! break;} ! case 600: ! #line 3120 "parse.y" ! { if (pedantic) pedwarn ("ANSI C++ forbids label declarations"); ; break;} ! case 603: ! #line 3131 "parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) *************** *** 6641,6701 **** ; break;} ! case 578: ! #line 3069 "parse.y" {; break;} ! case 580: ! #line 3074 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! yyval.ttype = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ; ! break;} ! case 581: ! #line 3078 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! yyval.ttype = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ; ! break;} ! case 582: ! #line 3082 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! yyval.ttype = poplevel (kept_level_p (), 0, 0); ! pop_momentary (); ; ! break;} ! case 583: ! #line 3086 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! yyval.ttype = poplevel (kept_level_p (), 0, 0); ! pop_momentary (); ; break;} ! case 584: ! #line 3093 "parse.y" { cond_stmt_keyword = "if"; ; break;} ! case 585: ! #line 3095 "parse.y" { emit_line_note (input_filename, lineno); expand_start_cond (yyvsp[0].ttype, 0); ; break;} ! case 587: ! #line 3102 "parse.y" { finish_stmt (); ; break;} ! case 588: ! #line 3104 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p (), 1); ! yyval.ttype = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ; break;} ! case 589: ! #line 3111 "parse.y" { finish_stmt (); ; break;} ! case 591: ! #line 3117 "parse.y" ! { finish_stmt (); ; break;} ! case 592: ! #line 3119 "parse.y" { tree expr = yyvsp[-1].ttype; --- 6656,6695 ---- ; break;} ! case 604: ! #line 3145 "parse.y" {; break;} ! case 606: ! #line 3150 "parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 607: ! #line 3155 "parse.y" { cond_stmt_keyword = "if"; ; break;} ! case 608: ! #line 3157 "parse.y" { emit_line_note (input_filename, lineno); expand_start_cond (yyvsp[0].ttype, 0); ; break;} ! case 610: ! #line 3164 "parse.y" { finish_stmt (); ; break;} ! case 611: ! #line 3166 "parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 612: ! #line 3171 "parse.y" { finish_stmt (); ; break;} ! case 614: ! #line 3177 "parse.y" ! { finish_stmt (); ! prefix_attributes = NULL_TREE; ; break;} ! case 615: ! #line 3180 "parse.y" { tree expr = yyvsp[-1].ttype; *************** *** 6711,6728 **** finish_stmt (); ; break;} ! case 593: ! #line 3132 "parse.y" { expand_start_else (); ; break;} ! case 594: ! #line 3134 "parse.y" ! { expand_end_cond (); ! expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! finish_stmt (); ; break;} ! case 595: ! #line 3140 "parse.y" { expand_end_cond (); expand_end_bindings (getdecls (), kept_level_p (), 1); --- 6705,6722 ---- finish_stmt (); ; break;} ! case 616: ! #line 3193 "parse.y" { expand_start_else (); ; break;} ! case 617: ! #line 3195 "parse.y" ! { expand_end_cond (); ; ! break;} ! case 618: ! #line 3197 "parse.y" ! { finish_stmt (); ; break;} ! case 619: ! #line 3199 "parse.y" { expand_end_cond (); expand_end_bindings (getdecls (), kept_level_p (), 1); *************** *** 6731,6736 **** finish_stmt (); ; break;} ! case 596: ! #line 3146 "parse.y" { emit_nop (); emit_line_note (input_filename, lineno); --- 6725,6730 ---- finish_stmt (); ; break;} ! case 620: ! #line 3205 "parse.y" { emit_nop (); emit_line_note (input_filename, lineno); *************** *** 6738,6766 **** cond_stmt_keyword = "while"; ; break;} ! case 597: ! #line 3151 "parse.y" { expand_exit_loop_if_false (0, yyvsp[0].ttype); ; break;} ! case 598: ! #line 3153 "parse.y" ! { expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! expand_end_loop (); finish_stmt (); ; break;} ! case 599: ! #line 3159 "parse.y" { emit_nop (); emit_line_note (input_filename, lineno); expand_start_loop_continue_elsewhere (1); ; break;} ! case 600: ! #line 3163 "parse.y" { expand_loop_continue_here (); cond_stmt_keyword = "do"; ; break;} ! case 601: ! #line 3166 "parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (0, yyvsp[-1].ttype); --- 6732,6757 ---- cond_stmt_keyword = "while"; ; break;} ! case 621: ! #line 3210 "parse.y" { expand_exit_loop_if_false (0, yyvsp[0].ttype); ; break;} ! case 622: ! #line 3212 "parse.y" ! { expand_end_loop (); finish_stmt (); ; break;} ! case 623: ! #line 3215 "parse.y" { emit_nop (); emit_line_note (input_filename, lineno); expand_start_loop_continue_elsewhere (1); ; break;} ! case 624: ! #line 3219 "parse.y" { expand_loop_continue_here (); cond_stmt_keyword = "do"; ; break;} ! case 625: ! #line 3222 "parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (0, yyvsp[-1].ttype); *************** *** 6769,6848 **** finish_stmt (); ; break;} ! case 602: ! #line 3172 "parse.y" { emit_nop (); emit_line_note (input_filename, lineno); - if (yyvsp[0].ttype) cplus_expand_expr_stmt (yyvsp[0].ttype); expand_start_loop_continue_elsewhere (1); ; break;} ! case 603: ! #line 3177 "parse.y" { emit_line_note (input_filename, lineno); if (yyvsp[-1].ttype) expand_exit_loop_if_false (0, yyvsp[-1].ttype); ; break;} ! case 604: ! #line 3182 "parse.y" { push_momentary (); ; break;} ! case 605: ! #line 3184 "parse.y" { emit_line_note (input_filename, lineno); - expand_end_bindings (getdecls (), kept_level_p (), 1); - poplevel (kept_level_p (), 1, 0); - pop_momentary (); expand_loop_continue_here (); ! if (yyvsp[-3].ttype) cplus_expand_expr_stmt (yyvsp[-3].ttype); pop_momentary (); expand_end_loop (); finish_stmt (); ; break;} ! case 606: ! #line 3194 "parse.y" ! { emit_nop (); ! emit_line_note (input_filename, lineno); ! expand_start_loop_continue_elsewhere (1); ; ! break;} ! case 607: ! #line 3198 "parse.y" ! { emit_line_note (input_filename, lineno); ! if (yyvsp[-1].ttype) expand_exit_loop_if_false (0, yyvsp[-1].ttype); ; ! break;} ! case 608: ! #line 3203 "parse.y" ! { push_momentary (); ! yyvsp[0].itype = lineno; ; ! break;} ! case 609: ! #line 3206 "parse.y" ! { emit_line_note (input_filename, (int) yyvsp[-2].itype); ! expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! expand_loop_continue_here (); ! if (yyvsp[-3].ttype) cplus_expand_expr_stmt (yyvsp[-3].ttype); ! pop_momentary (); ! expand_end_loop (); ! finish_stmt (); ! ; ! break;} ! case 610: ! #line 3217 "parse.y" { emit_line_note (input_filename, lineno); c_expand_start_case (yyvsp[-1].ttype); /* Don't let the tree nodes for $4 be discarded by clear_momentary during the parsing of the next stmt. */ push_momentary (); ; break;} ! case 611: ! #line 3223 "parse.y" { expand_end_case (yyvsp[-3].ttype); pop_momentary (); ! expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! finish_stmt (); ; break;} ! case 612: ! #line 3230 "parse.y" { register tree value = check_cp_case_value (yyvsp[-1].ttype); register tree label --- 6760,6827 ---- finish_stmt (); ; break;} ! case 626: ! #line 3228 "parse.y" ! { emit_line_note (input_filename, lineno); ! if (flag_new_for_scope) ! { ! /* Conditionalize .pushlevel */ ! pushlevel (0); ! clear_last_expr (); ! push_momentary (); ! expand_start_bindings (0); ! } ! ; ! break;} ! case 627: ! #line 3239 "parse.y" { emit_nop (); emit_line_note (input_filename, lineno); expand_start_loop_continue_elsewhere (1); ; break;} ! case 628: ! #line 3243 "parse.y" { emit_line_note (input_filename, lineno); if (yyvsp[-1].ttype) expand_exit_loop_if_false (0, yyvsp[-1].ttype); ; break;} ! case 629: ! #line 3248 "parse.y" { push_momentary (); ; break;} ! case 630: ! #line 3250 "parse.y" { emit_line_note (input_filename, lineno); expand_loop_continue_here (); ! if (yyvsp[-4].ttype) cplus_expand_expr_stmt (yyvsp[-4].ttype); pop_momentary (); expand_end_loop (); + if (flag_new_for_scope) + { + expand_end_bindings (getdecls (), kept_level_p (), 1); + poplevel (kept_level_p (), 1, 0); + pop_momentary (); + } finish_stmt (); ; break;} ! case 631: ! #line 3263 "parse.y" { emit_line_note (input_filename, lineno); c_expand_start_case (yyvsp[-1].ttype); + push_switch (); /* Don't let the tree nodes for $4 be discarded by clear_momentary during the parsing of the next stmt. */ push_momentary (); ; break;} ! case 632: ! #line 3270 "parse.y" { expand_end_case (yyvsp[-3].ttype); pop_momentary (); ! pop_switch (); ; break;} ! case 633: ! #line 3274 "parse.y" ! { finish_stmt (); ; ! break;} ! case 634: ! #line 3276 "parse.y" { register tree value = check_cp_case_value (yyvsp[-1].ttype); register tree label *************** *** 6859,6863 **** { cp_error ("duplicate case value `%E'", yyvsp[-1].ttype); ! cp_error_at ("`%E' previously used here", duplicate); } else if (success == 3) --- 6838,6842 ---- { cp_error ("duplicate case value `%E'", yyvsp[-1].ttype); ! cp_error_at ("previously used here", duplicate); } else if (success == 3) *************** *** 6869,6874 **** ; break;} ! case 614: ! #line 3255 "parse.y" { register tree value1 = check_cp_case_value (yyvsp[-3].ttype); register tree value2 = check_cp_case_value (yyvsp[-1].ttype); --- 6848,6853 ---- ; break;} ! case 636: ! #line 3301 "parse.y" { register tree value1 = check_cp_case_value (yyvsp[-3].ttype); register tree value2 = check_cp_case_value (yyvsp[-1].ttype); *************** *** 6876,6880 **** = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); ! if (flag_ansi) pedwarn ("ANSI C++ forbids range expressions in switch statement"); if (value1 != error_mark_node --- 6855,6859 ---- = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); ! if (pedantic) pedwarn ("ANSI C++ forbids range expressions in switch statement"); if (value1 != error_mark_node *************** *** 6902,6907 **** ; break;} ! case 616: ! #line 3287 "parse.y" { tree duplicate; --- 6881,6886 ---- ; break;} ! case 638: ! #line 3333 "parse.y" { tree duplicate; *************** *** 6919,6941 **** ; break;} ! case 618: ! #line 3303 "parse.y" { emit_line_note (input_filename, lineno); if ( ! expand_exit_something ()) error ("break statement not within loop or switch"); ; break;} ! case 619: ! #line 3307 "parse.y" { emit_line_note (input_filename, lineno); if (! expand_continue_loop (0)) error ("continue statement not within a loop"); ; break;} ! case 620: ! #line 3311 "parse.y" { emit_line_note (input_filename, lineno); c_expand_return (NULL_TREE); ; break;} ! case 621: ! #line 3314 "parse.y" { emit_line_note (input_filename, lineno); c_expand_return (yyvsp[-1].ttype); --- 6898,6920 ---- ; break;} ! case 640: ! #line 3349 "parse.y" { emit_line_note (input_filename, lineno); if ( ! expand_exit_something ()) error ("break statement not within loop or switch"); ; break;} ! case 641: ! #line 3353 "parse.y" { emit_line_note (input_filename, lineno); if (! expand_continue_loop (0)) error ("continue statement not within a loop"); ; break;} ! case 642: ! #line 3357 "parse.y" { emit_line_note (input_filename, lineno); c_expand_return (NULL_TREE); ; break;} ! case 643: ! #line 3360 "parse.y" { emit_line_note (input_filename, lineno); c_expand_return (yyvsp[-1].ttype); *************** *** 6943,6948 **** ; break;} ! case 622: ! #line 3319 "parse.y" { if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); emit_line_note (input_filename, lineno); --- 6922,6927 ---- ; break;} ! case 644: ! #line 3365 "parse.y" { if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); emit_line_note (input_filename, lineno); *************** *** 6951,6956 **** ; break;} ! case 623: ! #line 3326 "parse.y" { if (TREE_CHAIN (yyvsp[-4].ttype)) yyvsp[-4].ttype = combine_strings (yyvsp[-4].ttype); emit_line_note (input_filename, lineno); --- 6930,6935 ---- ; break;} ! case 645: ! #line 3372 "parse.y" { if (TREE_CHAIN (yyvsp[-4].ttype)) yyvsp[-4].ttype = combine_strings (yyvsp[-4].ttype); emit_line_note (input_filename, lineno); *************** *** 6961,6966 **** ; break;} ! case 624: ! #line 3335 "parse.y" { if (TREE_CHAIN (yyvsp[-6].ttype)) yyvsp[-6].ttype = combine_strings (yyvsp[-6].ttype); emit_line_note (input_filename, lineno); --- 6940,6945 ---- ; break;} ! case 646: ! #line 3381 "parse.y" { if (TREE_CHAIN (yyvsp[-6].ttype)) yyvsp[-6].ttype = combine_strings (yyvsp[-6].ttype); emit_line_note (input_filename, lineno); *************** *** 6971,6976 **** ; break;} ! case 625: ! #line 3345 "parse.y" { if (TREE_CHAIN (yyvsp[-8].ttype)) yyvsp[-8].ttype = combine_strings (yyvsp[-8].ttype); emit_line_note (input_filename, lineno); --- 6950,6955 ---- ; break;} ! case 647: ! #line 3391 "parse.y" { if (TREE_CHAIN (yyvsp[-8].ttype)) yyvsp[-8].ttype = combine_strings (yyvsp[-8].ttype); emit_line_note (input_filename, lineno); *************** *** 6981,6991 **** ; break;} ! case 626: ! #line 3353 "parse.y" { emit_line_note (input_filename, lineno); expand_computed_goto (yyvsp[-1].ttype); ; break;} ! case 627: ! #line 3356 "parse.y" { tree decl; emit_line_note (input_filename, lineno); --- 6960,6970 ---- ; break;} ! case 648: ! #line 3399 "parse.y" { emit_line_note (input_filename, lineno); expand_computed_goto (yyvsp[-1].ttype); ; break;} ! case 649: ! #line 3402 "parse.y" { tree decl; emit_line_note (input_filename, lineno); *************** *** 6994,7061 **** expand_goto (decl); ; break;} ! case 628: ! #line 3362 "parse.y" { finish_stmt (); ; break;} ! case 629: ! #line 3364 "parse.y" { error ("label must be followed by statement"); yyungetc ('}', 0); finish_stmt (); ; break;} ! case 630: ! #line 3368 "parse.y" { finish_stmt (); ; break;} ! case 632: ! #line 3374 "parse.y" { expand_start_try_stmts (); ; break;} ! case 633: ! #line 3376 "parse.y" { expand_end_try_stmts (); expand_start_all_catch (); ; break;} ! case 634: ! #line 3379 "parse.y" { expand_end_all_catch (); ; break;} ! case 635: ! #line 3387 "parse.y" ! { expand_end_bindings (0,1,1); ! poplevel (2,0,0); ! ; ! break;} ! case 636: ! #line 3391 "parse.y" ! { expand_end_bindings (0,1,1); ! poplevel (2,0,0); ! ; ! break;} ! case 637: ! #line 3395 "parse.y" ! { expand_end_bindings (0,1,1); ! poplevel (2,0,0); ! ; ! break;} ! case 639: ! #line 3403 "parse.y" ! { emit_line_note (input_filename, lineno); ; ! break;} ! case 640: ! #line 3405 "parse.y" { expand_end_catch_block (); ; break;} ! case 643: ! #line 3415 "parse.y" { expand_start_catch_block (NULL_TREE, NULL_TREE); ; break;} ! case 644: ! #line 3427 "parse.y" { expand_start_catch_block (TREE_PURPOSE (yyvsp[-1].ttype), TREE_VALUE (yyvsp[-1].ttype)); ; break;} ! case 645: ! #line 3433 "parse.y" { tree label; do_label: --- 6973,7018 ---- expand_goto (decl); ; break;} ! case 650: ! #line 3408 "parse.y" { finish_stmt (); ; break;} ! case 651: ! #line 3410 "parse.y" { error ("label must be followed by statement"); yyungetc ('}', 0); finish_stmt (); ; break;} ! case 652: ! #line 3414 "parse.y" { finish_stmt (); ; break;} ! case 654: ! #line 3420 "parse.y" { expand_start_try_stmts (); ; break;} ! case 655: ! #line 3422 "parse.y" { expand_end_try_stmts (); expand_start_all_catch (); ; break;} ! case 656: ! #line 3425 "parse.y" { expand_end_all_catch (); ; break;} ! case 658: ! #line 3431 "parse.y" { expand_end_catch_block (); ; break;} ! case 662: ! #line 3442 "parse.y" { expand_start_catch_block (NULL_TREE, NULL_TREE); ; break;} ! case 663: ! #line 3454 "parse.y" { expand_start_catch_block (TREE_PURPOSE (yyvsp[-1].ttype), TREE_VALUE (yyvsp[-1].ttype)); ; break;} ! case 664: ! #line 3460 "parse.y" { tree label; do_label: *************** *** 7065,7143 **** ; break;} ! case 646: ! #line 3440 "parse.y" { goto do_label; ; break;} ! case 647: ! #line 3442 "parse.y" { goto do_label; ; break;} ! case 648: ! #line 3447 "parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 649: ! #line 3449 "parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 650: ! #line 3451 "parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 651: ! #line 3456 "parse.y" ! { yyval.itype = 0; ; ! break;} ! case 652: ! #line 3458 "parse.y" ! { yyval.itype = 0; ; ! break;} ! case 653: ! #line 3460 "parse.y" ! { yyval.itype = 1; ; ! break;} ! case 654: ! #line 3462 "parse.y" ! { yyval.itype = -1; ; break;} ! case 655: ! #line 3469 "parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} ! case 656: ! #line 3472 "parse.y" { emit_line_note (input_filename, lineno); ; break;} ! case 657: ! #line 3477 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 659: ! #line 3480 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 660: ! #line 3486 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 663: ! #line 3493 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 664: ! #line 3498 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 665: ! #line 3503 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, NULL_TREE); ; break;} ! case 666: ! #line 3505 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 667: ! #line 3515 "parse.y" { if (strict_prototype) --- 7022,7076 ---- ; break;} ! case 665: ! #line 3467 "parse.y" { goto do_label; ; break;} ! case 666: ! #line 3469 "parse.y" { goto do_label; ; break;} ! case 667: ! #line 3474 "parse.y" ! { if (yyvsp[-1].ttype) cplus_expand_expr_stmt (yyvsp[-1].ttype); ; break;} ! case 670: ! #line 3483 "parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} ! case 671: ! #line 3486 "parse.y" { emit_line_note (input_filename, lineno); ; break;} ! case 672: ! #line 3491 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 674: ! #line 3494 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 675: ! #line 3500 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 678: ! #line 3507 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 679: ! #line 3512 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[-1].ttype); ; break;} ! case 680: ! #line 3517 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, NULL_TREE); ; break;} ! case 681: ! #line 3519 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} ! case 682: ! #line 3529 "parse.y" { if (strict_prototype) *************** *** 7147,7157 **** ; break;} ! case 669: ! #line 3523 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, void_list_node); TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 670: ! #line 3531 "parse.y" { yyval.ttype = chainon (yyval.ttype, void_list_node); --- 7080,7090 ---- ; break;} ! case 684: ! #line 3537 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, void_list_node); TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 685: ! #line 3545 "parse.y" { yyval.ttype = chainon (yyval.ttype, void_list_node); *************** *** 7159,7176 **** ; break;} ! case 671: ! #line 3536 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 672: ! #line 3541 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 673: ! #line 3545 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); --- 7092,7109 ---- ; break;} ! case 686: ! #line 3550 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 687: ! #line 3555 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 688: ! #line 3559 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); *************** *** 7178,7183 **** ; break;} ! case 674: ! #line 3550 "parse.y" { /* ARM $8.2.5 has this as a boxed-off comment. */ --- 7111,7116 ---- ; break;} ! case 689: ! #line 3564 "parse.y" { /* ARM $8.2.5 has this as a boxed-off comment. */ *************** *** 7187,7204 **** ; break;} ! case 675: ! #line 3557 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 676: ! #line 3561 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 677: ! #line 3565 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); --- 7120,7137 ---- ; break;} ! case 690: ! #line 3571 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 691: ! #line 3575 "parse.y" { TREE_PARMLIST (yyval.ttype) = 1; ; break;} ! case 692: ! #line 3579 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); *************** *** 7206,7211 **** ; break;} ! case 678: ! #line 3570 "parse.y" { /* This helps us recover from really nasty --- 7139,7144 ---- ; break;} ! case 693: ! #line 3584 "parse.y" { /* This helps us recover from really nasty *************** *** 7219,7224 **** ; break;} ! case 679: ! #line 3581 "parse.y" { /* This helps us recover from really nasty --- 7152,7157 ---- ; break;} ! case 694: ! #line 3595 "parse.y" { /* This helps us recover from really nasty *************** *** 7232,7323 **** ; break;} ! case 680: ! #line 3596 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 681: ! #line 3598 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyval.ttype); ; break;} ! case 682: ! #line 3600 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 683: ! #line 3602 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 684: ! #line 3604 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype)); ; break;} ! case 686: ! #line 3610 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 687: ! #line 3633 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 688: ! #line 3635 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 689: ! #line 3637 "parse.y" { yyval.ttype = build_tree_list (get_decl_list (yyval.ttype), yyvsp[0].ttype); ; break;} ! case 690: ! #line 3639 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 691: ! #line 3641 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, NULL_TREE); ; break;} ! case 692: ! #line 3643 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 693: ! #line 3648 "parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; ! break;} ! case 694: ! #line 3650 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyval.ttype); ; break;} ! case 697: ! #line 3659 "parse.y" { see_typename (); ; break;} ! case 698: ! #line 3682 "parse.y" { ! warning ("type specifier omitted for parameter"); ! yyval.ttype = build_tree_list (TREE_PURPOSE (TREE_VALUE (yyvsp[-1].ttype)), NULL_TREE); ; break;} ! case 699: ! #line 3687 "parse.y" { ! warning ("type specifier omitted for parameter"); ! yyval.ttype = build_tree_list (TREE_PURPOSE (TREE_VALUE (yyvsp[-2].ttype)), yyval.ttype); ; break;} ! case 700: ! #line 3695 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 701: ! #line 3697 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 702: ! #line 3702 "parse.y" ! { yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ; break;} ! case 704: ! #line 3708 "parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; --- 7165,7256 ---- ; break;} ! case 695: ! #line 3610 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 696: ! #line 3612 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyval.ttype); ; break;} ! case 697: ! #line 3614 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 698: ! #line 3616 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 699: ! #line 3618 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype)); ; break;} ! case 701: ! #line 3624 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} ! case 702: ! #line 3647 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 703: ! #line 3649 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 704: ! #line 3651 "parse.y" { yyval.ttype = build_tree_list (get_decl_list (yyval.ttype), yyvsp[0].ttype); ; break;} ! case 705: ! #line 3653 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 706: ! #line 3655 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, NULL_TREE); ; break;} ! case 707: ! #line 3657 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[0].ttype); ; break;} ! case 708: ! #line 3662 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyval.ttype); ; break;} ! case 711: ! #line 3671 "parse.y" { see_typename (); ; break;} ! case 712: ! #line 3694 "parse.y" { ! error ("type specifier omitted for parameter"); ! yyval.ttype = build_tree_list (integer_type_node, NULL_TREE); ; break;} ! case 713: ! #line 3699 "parse.y" { ! error ("type specifier omitted for parameter"); ! yyval.ttype = build_tree_list (integer_type_node, yyval.ttype); ; break;} ! case 714: ! #line 3707 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 715: ! #line 3709 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 716: ! #line 3711 "parse.y" ! { yyval.ttype = build_decl_list (NULL_TREE, NULL_TREE); ; break;} ! case 717: ! #line 3716 "parse.y" ! { yyval.ttype = build_decl_list (NULL_TREE, groktypename(yyval.ttype)); ; ! break;} ! case 719: ! #line 3722 "parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; *************** *** 7325,7488 **** ; break;} ! case 705: ! #line 3716 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 706: ! #line 3718 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 707: ! #line 3720 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 708: ! #line 3722 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 709: ! #line 3728 "parse.y" { got_scope = NULL_TREE; ; break;} ! case 710: ! #line 3733 "parse.y" { yyval.ttype = ansi_opname[MULT_EXPR]; ; break;} ! case 711: ! #line 3735 "parse.y" { yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ; break;} ! case 712: ! #line 3737 "parse.y" { yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ; break;} ! case 713: ! #line 3739 "parse.y" { yyval.ttype = ansi_opname[PLUS_EXPR]; ; break;} ! case 714: ! #line 3741 "parse.y" { yyval.ttype = ansi_opname[MINUS_EXPR]; ; break;} ! case 715: ! #line 3743 "parse.y" { yyval.ttype = ansi_opname[BIT_AND_EXPR]; ; break;} ! case 716: ! #line 3745 "parse.y" { yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ; break;} ! case 717: ! #line 3747 "parse.y" { yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ; break;} ! case 718: ! #line 3749 "parse.y" { yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ; break;} ! case 719: ! #line 3751 "parse.y" { yyval.ttype = ansi_opname[COMPOUND_EXPR]; ; break;} ! case 720: ! #line 3753 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 721: ! #line 3755 "parse.y" { yyval.ttype = ansi_opname[LT_EXPR]; ; break;} ! case 722: ! #line 3757 "parse.y" { yyval.ttype = ansi_opname[GT_EXPR]; ; break;} ! case 723: ! #line 3759 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 724: ! #line 3761 "parse.y" { yyval.ttype = ansi_assopname[yyvsp[0].code]; ; break;} ! case 725: ! #line 3763 "parse.y" { yyval.ttype = ansi_opname [MODIFY_EXPR]; ; break;} ! case 726: ! #line 3765 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 727: ! #line 3767 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 728: ! #line 3769 "parse.y" { yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ; break;} ! case 729: ! #line 3771 "parse.y" { yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ; break;} ! case 730: ! #line 3773 "parse.y" { yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ; break;} ! case 731: ! #line 3775 "parse.y" { yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ; break;} ! case 732: ! #line 3777 "parse.y" { yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ; break;} ! case 733: ! #line 3779 "parse.y" { yyval.ttype = ansi_opname[COND_EXPR]; ; break;} ! case 734: ! #line 3781 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 735: ! #line 3783 "parse.y" { yyval.ttype = ansi_opname[COMPONENT_REF]; ; break;} ! case 736: ! #line 3785 "parse.y" { yyval.ttype = ansi_opname[MEMBER_REF]; ; break;} ! case 737: ! #line 3787 "parse.y" { yyval.ttype = ansi_opname[CALL_EXPR]; ; break;} ! case 738: ! #line 3789 "parse.y" { yyval.ttype = ansi_opname[ARRAY_REF]; ; break;} ! case 739: ! #line 3791 "parse.y" { yyval.ttype = ansi_opname[NEW_EXPR]; ; break;} ! case 740: ! #line 3793 "parse.y" { yyval.ttype = ansi_opname[DELETE_EXPR]; ; break;} ! case 741: ! #line 3795 "parse.y" { yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ; break;} ! case 742: ! #line 3797 "parse.y" { yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ; break;} ! case 743: ! #line 3800 "parse.y" { yyval.ttype = grokoptypename (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 744: ! #line 3802 "parse.y" { yyval.ttype = ansi_opname[ERROR_MARK]; ; break;} --- 7258,7421 ---- ; break;} ! case 720: ! #line 3730 "parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 721: ! #line 3732 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 722: ! #line 3734 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 723: ! #line 3736 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} ! case 724: ! #line 3742 "parse.y" { got_scope = NULL_TREE; ; break;} ! case 725: ! #line 3747 "parse.y" { yyval.ttype = ansi_opname[MULT_EXPR]; ; break;} ! case 726: ! #line 3749 "parse.y" { yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ; break;} ! case 727: ! #line 3751 "parse.y" { yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ; break;} ! case 728: ! #line 3753 "parse.y" { yyval.ttype = ansi_opname[PLUS_EXPR]; ; break;} ! case 729: ! #line 3755 "parse.y" { yyval.ttype = ansi_opname[MINUS_EXPR]; ; break;} ! case 730: ! #line 3757 "parse.y" { yyval.ttype = ansi_opname[BIT_AND_EXPR]; ; break;} ! case 731: ! #line 3759 "parse.y" { yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ; break;} ! case 732: ! #line 3761 "parse.y" { yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ; break;} ! case 733: ! #line 3763 "parse.y" { yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ; break;} ! case 734: ! #line 3765 "parse.y" { yyval.ttype = ansi_opname[COMPOUND_EXPR]; ; break;} ! case 735: ! #line 3767 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 736: ! #line 3769 "parse.y" { yyval.ttype = ansi_opname[LT_EXPR]; ; break;} ! case 737: ! #line 3771 "parse.y" { yyval.ttype = ansi_opname[GT_EXPR]; ; break;} ! case 738: ! #line 3773 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 739: ! #line 3775 "parse.y" { yyval.ttype = ansi_assopname[yyvsp[0].code]; ; break;} ! case 740: ! #line 3777 "parse.y" { yyval.ttype = ansi_opname [MODIFY_EXPR]; ; break;} ! case 741: ! #line 3779 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 742: ! #line 3781 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 743: ! #line 3783 "parse.y" { yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ; break;} ! case 744: ! #line 3785 "parse.y" { yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ; break;} ! case 745: ! #line 3787 "parse.y" { yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ; break;} ! case 746: ! #line 3789 "parse.y" { yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ; break;} ! case 747: ! #line 3791 "parse.y" { yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ; break;} ! case 748: ! #line 3793 "parse.y" { yyval.ttype = ansi_opname[COND_EXPR]; ; break;} ! case 749: ! #line 3795 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} ! case 750: ! #line 3797 "parse.y" { yyval.ttype = ansi_opname[COMPONENT_REF]; ; break;} ! case 751: ! #line 3799 "parse.y" { yyval.ttype = ansi_opname[MEMBER_REF]; ; break;} ! case 752: ! #line 3801 "parse.y" { yyval.ttype = ansi_opname[CALL_EXPR]; ; break;} ! case 753: ! #line 3803 "parse.y" { yyval.ttype = ansi_opname[ARRAY_REF]; ; break;} ! case 754: ! #line 3805 "parse.y" { yyval.ttype = ansi_opname[NEW_EXPR]; ; break;} ! case 755: ! #line 3807 "parse.y" { yyval.ttype = ansi_opname[DELETE_EXPR]; ; break;} ! case 756: ! #line 3809 "parse.y" { yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ; break;} ! case 757: ! #line 3811 "parse.y" { yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ; break;} ! case 758: ! #line 3814 "parse.y" { yyval.ttype = grokoptypename (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 759: ! #line 3816 "parse.y" { yyval.ttype = ansi_opname[ERROR_MARK]; ; break;} *************** *** 7685,7689 **** goto yynewstate; } ! #line 3805 "parse.y" --- 7618,7622 ---- goto yynewstate; } ! #line 3819 "parse.y" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/parse.h gcc-2.7.0/cp/parse.h *** gcc-2.6.3/cp/parse.h Fri Oct 14 14:51:25 1994 --- gcc-2.7.0/cp/parse.h Thu Jun 15 12:54:48 1995 *************** *** 41,82 **** #define CXX_TRUE 297 #define CXX_FALSE 298 ! #define LEFT_RIGHT 299 ! #define TEMPLATE 300 ! #define TYPEID 301 ! #define DYNAMIC_CAST 302 ! #define STATIC_CAST 303 ! #define REINTERPRET_CAST 304 ! #define CONST_CAST 305 ! #define SCOPE 306 ! #define EMPTY 307 ! #define PTYPENAME 308 ! #define ASSIGN 309 ! #define OROR 310 ! #define ANDAND 311 ! #define MIN_MAX 312 ! #define EQCOMPARE 313 ! #define ARITHCOMPARE 314 ! #define LSHIFT 315 ! #define RSHIFT 316 ! #define POINTSAT_STAR 317 ! #define DOT_STAR 318 ! #define UNARY 319 ! #define PLUSPLUS 320 ! #define MINUSMINUS 321 ! #define HYPERUNARY 322 ! #define PAREN_STAR_PAREN 323 ! #define POINTSAT 324 ! #define TRY 325 ! #define CATCH 326 ! #define THROW 327 ! #define TYPENAME_ELLIPSIS 328 ! #define PRE_PARSED_FUNCTION_DECL 329 ! #define EXTERN_LANG_STRING 330 ! #define ALL 331 ! #define PRE_PARSED_CLASS_DECL 332 ! #define TYPENAME_DEFN 333 ! #define IDENTIFIER_DEFN 334 ! #define PTYPENAME_DEFN 335 ! #define END_OF_SAVED_INPUT 336 --- 41,87 ---- #define CXX_TRUE 297 #define CXX_FALSE 298 ! #define NAMESPACE 299 ! #define TYPENAME_KEYWORD 300 ! #define USING 301 ! #define LEFT_RIGHT 302 ! #define TEMPLATE 303 ! #define TYPEID 304 ! #define DYNAMIC_CAST 305 ! #define STATIC_CAST 306 ! #define REINTERPRET_CAST 307 ! #define CONST_CAST 308 ! #define SCOPE 309 ! #define EMPTY 310 ! #define PTYPENAME 311 ! #define NSNAME 312 ! #define THROW 313 ! #define ASSIGN 314 ! #define OROR 315 ! #define ANDAND 316 ! #define MIN_MAX 317 ! #define EQCOMPARE 318 ! #define ARITHCOMPARE 319 ! #define LSHIFT 320 ! #define RSHIFT 321 ! #define POINTSAT_STAR 322 ! #define DOT_STAR 323 ! #define UNARY 324 ! #define PLUSPLUS 325 ! #define MINUSMINUS 326 ! #define HYPERUNARY 327 ! #define PAREN_STAR_PAREN 328 ! #define POINTSAT 329 ! #define TRY 330 ! #define CATCH 331 ! #define TYPENAME_ELLIPSIS 332 ! #define PRE_PARSED_FUNCTION_DECL 333 ! #define EXTERN_LANG_STRING 334 ! #define ALL 335 ! #define PRE_PARSED_CLASS_DECL 336 ! #define TYPENAME_DEFN 337 ! #define IDENTIFIER_DEFN 338 ! #define PTYPENAME_DEFN 339 ! #define END_OF_LINE 340 ! #define END_OF_SAVED_INPUT 341 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/parse.y gcc-2.7.0/cp/parse.y *** gcc-2.6.3/cp/parse.y Fri Nov 18 16:43:39 1994 --- gcc-2.7.0/cp/parse.y Thu Jun 15 08:26:35 1995 *************** *** 1,4 **** /* YACC parser for C++ syntax. ! Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* YACC parser for C++ syntax. ! Copyright (C) 1988, 1989, 1993, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 26,43 **** is given. Keep this in mind when reading the actions. */ - /* Also note: this version contains experimental exception - handling features. They could break, change, disappear, - or otherwise exhibit volatile behavior. Don't depend on - me (Michael Tiemann) to protect you from any negative impact - this may have on your professional, personal, or spiritual life. - - NEWS FLASH: This version now supports the exception handling - syntax of Stroustrup's 2nd edition, if -fansi-exceptions is given. - THIS IS WORK IN PROGRESS!!! The type of the 'throw' and the - 'catch' much match EXACTLY (no inheritance support or coercions). - Also, throw-specifications of functions don't work. - Destructors aren't called correctly. Etc, etc. --Per Bothner. - */ - %{ /* Cause the `yydebug' variable to be defined. */ --- 27,30 ---- *************** *** 54,57 **** --- 41,45 ---- #include "lex.h" #include "cp-tree.h" + #include "output.h" /* Since parsers are distinct for each language, put the language string *************** *** 68,71 **** --- 56,60 ---- extern int end_of_file; extern int current_class_depth; + extern int flag_new_for_scope; void yyerror (); *************** *** 151,154 **** --- 140,144 ---- %token VISSPEC %token DELETE NEW OVERLOAD THIS OPERATOR CXX_TRUE CXX_FALSE + %token NAMESPACE TYPENAME_KEYWORD USING %token LEFT_RIGHT TEMPLATE %token TYPEID DYNAMIC_CAST STATIC_CAST REINTERPRET_CAST CONST_CAST *************** *** 167,176 **** %nonassoc ELSE ! %left IDENTIFIER TYPENAME PTYPENAME SCSPEC TYPESPEC TYPE_QUAL ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR %left '{' ',' ';' %right ASSIGN '=' ! %right '?' ':' %left OROR %left ANDAND --- 157,168 ---- %nonassoc ELSE ! %left IDENTIFIER TYPENAME PTYPENAME SCSPEC TYPESPEC TYPE_QUAL ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD %left '{' ',' ';' + %nonassoc THROW + %right ':' %right ASSIGN '=' ! %right '?' %left OROR %left ANDAND *************** *** 191,195 **** %right SCOPE /* C++ extension */ ! %nonassoc NEW DELETE TRY CATCH THROW %type unop --- 183,187 ---- %right SCOPE /* C++ extension */ ! %nonassoc NEW DELETE TRY CATCH %type unop *************** *** 203,207 **** %type SCSPEC TYPESPEC TYPE_QUAL nonempty_type_quals maybe_type_qual %type initdecls notype_initdecls initdcl /* C++ modification */ ! %type init initlist maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers %type maybe_attribute attributes attribute attribute_list attrib --- 195,199 ---- %type SCSPEC TYPESPEC TYPE_QUAL nonempty_type_quals maybe_type_qual %type initdecls notype_initdecls initdcl /* C++ modification */ ! %type init initlist maybeasm maybe_init %type asm_operands nonnull_asm_operands asm_operand asm_clobbers %type maybe_attribute attributes attribute attribute_list attrib *************** *** 227,231 **** %type expr_or_declarator complex_notype_declarator %type notype_unqualified_id unqualified_id qualified_id ! %type overqualified_id notype_qualified_id %type complex_direct_notype_declarator functional_cast %type named_parm complex_parmlist typed_declspecs1 parms_comma --- 219,223 ---- %type expr_or_declarator complex_notype_declarator %type notype_unqualified_id unqualified_id qualified_id ! %type overqualified_id notype_qualified_id any_id %type complex_direct_notype_declarator functional_cast %type named_parm complex_parmlist typed_declspecs1 parms_comma *************** *** 242,253 **** %type base_class_access_list %type base_class maybe_base_class_list base_class.1 ! %type maybe_raises ansi_raise_identifier ansi_raise_identifiers %type component_declarator0 ! %type forhead.1 operator_name %type object aggr %type new delete /* %type primary_no_id */ ! %type nonmomentary_expr ! %type forhead.2 initdcl0 notype_initdcl0 member_init_list %type template_header template_parm_list template_parm %type template_type_parm --- 234,245 ---- %type base_class_access_list %type base_class maybe_base_class_list base_class.1 ! %type exception_specification_opt ansi_raise_identifier ansi_raise_identifiers %type component_declarator0 ! %type operator_name %type object aggr %type new delete /* %type primary_no_id */ ! %type nonmomentary_expr maybe_parmlist ! %type initdcl0 notype_initdcl0 member_init_list %type template_header template_parm_list template_parm %type template_type_parm *************** *** 263,266 **** --- 255,259 ---- %type nomods_initdecls nomods_initdcl0 %type new_initializer new_placement specialization type_specifier_seq + %type using_decl .poplevel /* in order to recognize aggr tags as defining and thus shadowing. */ *************** *** 269,275 **** %type identifier_defn IDENTIFIER_DEFN TYPENAME_DEFN PTYPENAME_DEFN ! %type .pushlevel ! /* spew.c depends on this being the last token. Define any new tokens before this one! */ %token END_OF_SAVED_INPUT --- 262,272 ---- %type identifier_defn IDENTIFIER_DEFN TYPENAME_DEFN PTYPENAME_DEFN ! %token NSNAME ! %type NSNAME ! ! /* Used in lex.c for parsing pragmas. */ ! %token END_OF_LINE ! /* lex.c and pt.c depends on this being the last token. Define any new tokens before this one! */ %token END_OF_SAVED_INPUT *************** *** 278,281 **** --- 275,279 ---- /* List of types and structure classes of the current declaration. */ static tree current_declspecs; + static tree prefix_attributes = NULL_TREE; /* When defining an aggregate, this is the most recent one being defined. */ *************** *** 312,315 **** --- 310,318 ---- ; + extdefs_opt: + extdefs + | /* empty */ + ; + .hush_warning: { have_extern_spec = 1; *************** *** 329,334 **** { if (pending_lang_change) do_pending_lang_change(); } extdef ! { if (! global_bindings_p () && ! pseudo_global_level_p()) ! pop_everything (); } ; --- 332,338 ---- { if (pending_lang_change) do_pending_lang_change(); } extdef ! { if (! toplevel_bindings_p () && ! pseudo_global_level_p()) ! pop_everything (); ! prefix_attributes = NULL_TREE; } ; *************** *** 344,351 **** { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); assemble_asm ($3); } ! | extern_lang_string '{' extdefs '}' { pop_lang_context (); } - | extern_lang_string '{' '}' - { pop_lang_context (); } | extern_lang_string .hush_warning fndef .warning_ok { if (pending_inlines) do_pending_inlines (); --- 348,353 ---- { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); assemble_asm ($3); } ! | extern_lang_string '{' extdefs_opt '}' { pop_lang_context (); } | extern_lang_string .hush_warning fndef .warning_ok { if (pending_inlines) do_pending_inlines (); *************** *** 354,362 **** { if (pending_inlines) do_pending_inlines (); pop_lang_context (); } ; extern_lang_string: ! EXTERN_LANG_STRING { push_lang_context ($1); } ; --- 356,400 ---- { if (pending_inlines) do_pending_inlines (); pop_lang_context (); } + | NAMESPACE identifier '{' + { push_namespace ($2); } + extdefs_opt '}' + { pop_namespace (); } + | NAMESPACE '{' + { push_namespace (NULL_TREE); } + extdefs_opt '}' + { pop_namespace (); } + | NAMESPACE identifier '=' any_id ';' + { do_namespace_alias ($2, $4); } + | using_decl ';' + { do_toplevel_using_decl ($1); } + | USING NAMESPACE any_id ';' + { do_using_directive ($3); } + ; + + using_decl: + USING qualified_id + { $$ = $2; } + | USING global_scope qualified_id + { $$ = $3; } + | USING global_scope unqualified_id + { $$ = $3; } + ; + + any_id: + unqualified_id + | qualified_id + | global_scope qualified_id + { $$ = $2; } + | global_scope unqualified_id + { $$ = $2; } ; extern_lang_string: ! EXTERN_LANG_STRING { push_lang_context ($1); } + | extern_lang_string EXTERN_LANG_STRING + { if (current_lang_name != $2) + cp_error ("use of linkage spec `%D' is different from previous spec `%D'", $2, current_lang_name); + pop_lang_context (); push_lang_context ($2); } ; *************** *** 431,437 **** yychar = ':'; template1: ! if (current_aggr == exception_type_node) ! error ("template type must define an aggregate or union"); ! else if (current_aggr == signature_type_node) sorry ("template type defining a signature"); /* Maybe pedantic warning for union? --- 469,473 ---- yychar = ':'; template1: ! if (current_aggr == signature_type_node) sorry ("template type defining a signature"); /* Maybe pedantic warning for union? *************** *** 453,457 **** } | template_header /* notype_initdcl0 ';' */ ! notype_declarator maybe_raises maybeasm maybe_attribute fn_tmpl_end { --- 489,493 ---- } | template_header /* notype_initdcl0 ';' */ ! notype_declarator exception_specification_opt maybeasm maybe_attribute fn_tmpl_end { *************** *** 462,467 **** d = start_decl ($2, /*current_declspecs*/NULL_TREE, 0, $3); ! cplus_decl_attributes (d, $5); ! finish_decl (d, NULL_TREE, $4, 0); end_template_decl ($1, d, 0, def); if (def) --- 498,503 ---- d = start_decl ($2, /*current_declspecs*/NULL_TREE, 0, $3); ! cplus_decl_attributes (d, $5, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, $4, 0, 0); end_template_decl ($1, d, 0, def); if (def) *************** *** 470,474 **** } | template_header typed_declspecs /*initdcl0*/ ! declarator maybe_raises maybeasm maybe_attribute fn_tmpl_end { --- 506,510 ---- } | template_header typed_declspecs /*initdcl0*/ ! declarator exception_specification_opt maybeasm maybe_attribute fn_tmpl_end { *************** *** 481,486 **** d = start_decl ($3, current_declspecs, 0, $4); ! cplus_decl_attributes (d, $6); ! finish_decl (d, NULL_TREE, $5, 0); end_template_decl ($1, d, 0, def); if (def) --- 517,522 ---- d = start_decl ($3, current_declspecs, 0, $4); ! cplus_decl_attributes (d, $6, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, $5, 0, 0); end_template_decl ($1, d, 0, def); if (def) *************** *** 496,500 **** int def = ($4 != ';'); tree d = start_decl ($3, $2, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); end_template_decl ($1, d, 0, def); if (def) --- 532,536 ---- int def = ($4 != ';'); tree d = start_decl ($3, $2, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); end_template_decl ($1, d, 0, def); if (def) *************** *** 522,526 **** { tree d; d = start_decl ($2, $$, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); } | typed_declspecs initdecls ';' --- 558,562 ---- { tree d; d = start_decl ($2, $$, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); } | typed_declspecs initdecls ';' *************** *** 532,536 **** { tree d; d = start_decl ($2, $$, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); note_list_got_semicolon ($$); } --- 568,572 ---- { tree d; d = start_decl ($2, $$, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); note_list_got_semicolon ($$); } *************** *** 565,569 **** fn.def1 base_init compstmt_or_error { ! finish_function (lineno, 1); /* finish_function performs these three statements: --- 601,605 ---- fn.def1 base_init compstmt_or_error { ! finish_function (lineno, 1, 0); /* finish_function performs these three statements: *************** *** 578,582 **** | fn.def1 return_init base_init compstmt_or_error { ! finish_function (lineno, 1); /* finish_function performs these three statements: --- 614,618 ---- | fn.def1 return_init base_init compstmt_or_error { ! finish_function (lineno, 1, 0); /* finish_function performs these three statements: *************** *** 590,600 **** } | fn.def1 nodecls compstmt_or_error ! { finish_function (lineno, 0); if ($$) process_next_inline ($$); } | fn.def1 return_init ';' nodecls compstmt_or_error ! { finish_function (lineno, 0); if ($$) process_next_inline ($$); } | fn.def1 return_init nodecls compstmt_or_error ! { finish_function (lineno, 0); if ($$) process_next_inline ($$); } | typed_declspecs declarator error --- 626,636 ---- } | fn.def1 nodecls compstmt_or_error ! { finish_function (lineno, 0, 0); if ($$) process_next_inline ($$); } | fn.def1 return_init ';' nodecls compstmt_or_error ! { finish_function (lineno, 0, 0); if ($$) process_next_inline ($$); } | fn.def1 return_init nodecls compstmt_or_error ! { finish_function (lineno, 0, 0); if ($$) process_next_inline ($$); } | typed_declspecs declarator error *************** *** 607,621 **** fn.def1: ! typed_declspecs declarator maybe_raises { if (! start_function ($$, $2, $3, 0)) YYERROR1; reinit_parse_for_function (); $$ = NULL_TREE; } ! | declmods notype_declarator maybe_raises { if (! start_function ($$, $2, $3, 0)) YYERROR1; reinit_parse_for_function (); $$ = NULL_TREE; } ! | notype_declarator maybe_raises { if (! start_function (NULL_TREE, $$, $2, 0)) YYERROR1; --- 643,657 ---- fn.def1: ! typed_declspecs declarator exception_specification_opt { if (! start_function ($$, $2, $3, 0)) YYERROR1; reinit_parse_for_function (); $$ = NULL_TREE; } ! | declmods notype_declarator exception_specification_opt { if (! start_function ($$, $2, $3, 0)) YYERROR1; reinit_parse_for_function (); $$ = NULL_TREE; } ! | notype_declarator exception_specification_opt { if (! start_function (NULL_TREE, $$, $2, 0)) YYERROR1; *************** *** 630,634 **** reduce/reduce conflict introduced by these rules. */ fn.def2: ! typed_declspecs '(' parmlist ')' type_quals maybe_raises { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), $3, $5); --- 666,670 ---- reduce/reduce conflict introduced by these rules. */ fn.def2: ! typed_declspecs '(' parmlist ')' type_quals exception_specification_opt { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), $3, $5); *************** *** 640,644 **** yychar = YYLEX; reinit_parse_for_method (yychar, $$); } ! | typed_declspecs LEFT_RIGHT type_quals maybe_raises { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), --- 676,680 ---- yychar = YYLEX; reinit_parse_for_method (yychar, $$); } ! | typed_declspecs LEFT_RIGHT type_quals exception_specification_opt { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), *************** *** 647,655 **** goto rest_of_mdef; } ! | typed_declspecs declarator maybe_raises { $$ = start_method ($$, $2, $3); goto rest_of_mdef; } ! | declmods notype_declarator maybe_raises { $$ = start_method ($$, $2, $3); goto rest_of_mdef; } ! | notype_declarator maybe_raises { $$ = start_method (NULL_TREE, $$, $2); goto rest_of_mdef; } ; --- 683,691 ---- goto rest_of_mdef; } ! | typed_declspecs declarator exception_specification_opt { $$ = start_method ($$, $2, $3); goto rest_of_mdef; } ! | declmods notype_declarator exception_specification_opt { $$ = start_method ($$, $2, $3); goto rest_of_mdef; } ! | notype_declarator exception_specification_opt { $$ = start_method (NULL_TREE, $$, $2); goto rest_of_mdef; } ; *************** *** 663,670 **** ; ! return_init: return_id ! { store_return_init ($$, NULL_TREE); } ! | return_id '=' init ! { store_return_init ($$, $3); } | return_id '(' nonnull_exprlist ')' { store_return_init ($$, $3); } --- 699,704 ---- ; ! return_init: return_id maybe_init ! { store_return_init ($$, $2); } | return_id '(' nonnull_exprlist ')' { store_return_init ($$, $3); } *************** *** 692,698 **** store_parm_decls (); - /* Flag that we are processing base and member initializers. */ - current_vtable_decl = error_mark_node; - if (DECL_CONSTRUCTOR_P (current_function_decl)) { --- 726,729 ---- *************** *** 753,761 **** | TYPENAME | PTYPENAME ; notype_identifier: IDENTIFIER ! | PTYPENAME %prec EMPTY ; --- 784,794 ---- | TYPENAME | PTYPENAME + | NSNAME ; notype_identifier: IDENTIFIER ! | PTYPENAME ! | NSNAME %prec EMPTY ; *************** *** 850,853 **** --- 883,888 ---- end_template_instantiation ($1); + repo_template_used (t); + /* Now go after the methods & class data. */ instantiate_member_templates ($1); *************** *** 896,901 **** $$ = integer_zero_node; } | '(' expr ')' ! { $$ = build1 (CLEANUP_POINT_EXPR, bool_type_node, ! bool_truthvalue_conversion ($2)); } ; --- 931,935 ---- $$ = integer_zero_node; } | '(' expr ')' ! { $$ = condition_conversion ($2); } ; *************** *** 906,911 **** $$ = integer_zero_node; } | '(' condition ')' ! { $$ = build1 (CLEANUP_POINT_EXPR, bool_type_node, ! bool_truthvalue_conversion ($2)); } ; --- 940,944 ---- $$ = integer_zero_node; } | '(' condition ')' ! { $$ = condition_conversion ($2); } ; *************** *** 914,919 **** { $$ = NULL_TREE; } | condition ! { $$ = build1 (CLEANUP_POINT_EXPR, bool_type_node, ! bool_truthvalue_conversion ($$)); } | error { $$ = NULL_TREE; } --- 947,951 ---- { $$ = NULL_TREE; } | condition ! { $$ = condition_conversion ($$); } | error { $$ = NULL_TREE; } *************** *** 921,925 **** condition: ! type_specifier_seq declarator maybe_raises maybeasm maybe_attribute '=' { { tree d; --- 953,957 ---- condition: ! type_specifier_seq declarator exception_specification_opt maybeasm maybe_attribute '=' { { tree d; *************** *** 936,944 **** $6 = suspend_momentary (); $$ = start_decl ($2, current_declspecs, 1, $3); ! cplus_decl_attributes ($$, $5); } init { ! finish_decl ($7, $8, $5, 0); resume_momentary ($6); $$ = $7; --- 968,976 ---- $6 = suspend_momentary (); $$ = start_decl ($2, current_declspecs, 1, $3); ! cplus_decl_attributes ($$, $5, prefix_attributes); } init { ! cp_finish_decl ($7, $8, $5, 0, LOOKUP_ONLYCONVERTING); resume_momentary ($6); $$ = $7; *************** *** 949,958 **** ; already_scoped_stmt: ! '{' '}' ! { finish_stmt (); } ! | '{' maybe_label_decls stmts '}' ! { finish_stmt (); } ! | '{' maybe_label_decls error '}' { finish_stmt (); } | simple_stmt --- 981,993 ---- ; + compstmtend: + '}' + | maybe_label_decls stmts '}' + | maybe_label_decls stmts error '}' + | maybe_label_decls error '}' + ; + already_scoped_stmt: ! '{' compstmtend { finish_stmt (); } | simple_stmt *************** *** 1034,1039 **** tree t = TREE_VALUE ($2); if (t != NULL_TREE ! && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) ! pedwarn ("ANSI C++ forbids using sizeof() on a function"); } $$ = c_sizeof (TREE_TYPE ($2)); } --- 1069,1076 ---- tree t = TREE_VALUE ($2); if (t != NULL_TREE ! && ((TREE_TYPE (t) ! && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) ! || is_overloaded_fn (t))) ! pedwarn ("ANSI C++ forbids taking the sizeof a function type"); } $$ = c_sizeof (TREE_TYPE ($2)); } *************** *** 1102,1106 **** | '=' init { ! if (flag_ansi) pedwarn ("ANSI C++ forbids initialization of new expression with `='"); $$ = $2; --- 1139,1143 ---- | '=' init { ! if (pedantic) pedwarn ("ANSI C++ forbids initialization of new expression with `='"); $$ = $2; *************** *** 1129,1133 **** tree init = build_nt (CONSTRUCTOR, NULL_TREE, nreverse ($3)); ! if (flag_ansi) pedwarn ("ANSI C++ forbids constructor-expressions"); /* Indicate that this was a GNU C constructor expression. */ --- 1166,1170 ---- tree init = build_nt (CONSTRUCTOR, NULL_TREE, nreverse ($3)); ! if (pedantic) pedwarn ("ANSI C++ forbids constructor-expressions"); /* Indicate that this was a GNU C constructor expression. */ *************** *** 1149,1153 **** tree type = IDENTIFIER_TYPE_VALUE ($3); if (! IS_SIGNATURE(type)) ! $$ = CLASSTYPE_DOSSIER (type); else { --- 1186,1190 ---- tree type = IDENTIFIER_TYPE_VALUE ($3); if (! IS_SIGNATURE(type)) ! $$ = CLASSTYPE_RTTI (type); else { *************** *** 1205,1209 **** { $$ = build_x_conditional_expr ($$, $3, $5); } | expr_no_commas '=' expr_no_commas ! { $$ = build_modify_expr ($$, NOP_EXPR, $3); } | expr_no_commas ASSIGN expr_no_commas { register tree rval; --- 1242,1247 ---- { $$ = build_x_conditional_expr ($$, $3, $5); } | expr_no_commas '=' expr_no_commas ! { $$ = build_modify_expr ($$, NOP_EXPR, $3); ! C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); } | expr_no_commas ASSIGN expr_no_commas { register tree rval; *************** *** 1226,1230 **** | object '(' type_id ')' expr_no_commas %prec UNARY { tree type = groktypename ($3); ! $$ = build_m_component_ref ($$, build_c_cast (type, $5)); } | object primary_no_id %prec UNARY { $$ = build_m_component_ref ($$, $2); } --- 1264,1268 ---- | object '(' type_id ')' expr_no_commas %prec UNARY { tree type = groktypename ($3); ! $$ = build_m_component_ref ($$, build_c_cast (type, $5, 0)); } | object primary_no_id %prec UNARY { $$ = build_m_component_ref ($$, $2); } *************** *** 1237,1241 **** | operator_name | IDENTIFIER ! | PTYPENAME %prec EMPTY ; --- 1275,1280 ---- | operator_name | IDENTIFIER ! | PTYPENAME ! | NSNAME %prec EMPTY ; *************** *** 1247,1255 **** expr_or_declarator: notype_unqualified_id - | notype_qualified_id | '*' expr_or_declarator %prec UNARY { $$ = build_parse_node (INDIRECT_REF, $2); } | '&' expr_or_declarator %prec UNARY { $$ = build_parse_node (ADDR_EXPR, $2); } ; --- 1286,1295 ---- expr_or_declarator: notype_unqualified_id | '*' expr_or_declarator %prec UNARY { $$ = build_parse_node (INDIRECT_REF, $2); } | '&' expr_or_declarator %prec UNARY { $$ = build_parse_node (ADDR_EXPR, $2); } + | '(' expr_or_declarator ')' + { $$ = $2; } ; *************** *** 1257,1263 **** complex_direct_notype_declarator | notype_unqualified_id ! | notype_qualified_id ! { push_nested_class (TREE_TYPE (OP0 ($$)), 3); ! TREE_COMPLEXITY ($$) = current_class_depth; } ; --- 1297,1302 ---- complex_direct_notype_declarator | notype_unqualified_id ! | '(' expr_or_declarator ')' ! { $$ = finish_decl_parsing ($2); } ; *************** *** 1287,1291 **** { $$ = combine_strings ($$); } | '(' expr ')' ! { $$ = $2; } | '(' error ')' { $$ = error_mark_node; } --- 1326,1344 ---- { $$ = combine_strings ($$); } | '(' expr ')' ! { char class; ! $$ = $2; ! class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') ! /* This inhibits warnings in truthvalue_conversion. */ ! C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } ! | '(' expr_or_declarator ')' ! { char class; ! $$ = reparse_decl_as_expr (NULL_TREE, $2); ! class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') ! /* This inhibits warnings in truthvalue_conversion. */ ! C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } | '(' error ')' { $$ = error_mark_node; } *************** *** 1300,1304 **** compstmt ')' { tree rtl_exp; ! if (flag_ansi) pedwarn ("ANSI C++ forbids braced-groups within expressions"); rtl_exp = expand_end_stmt_expr ($2); --- 1353,1357 ---- compstmt ')' { tree rtl_exp; ! if (pedantic) pedwarn ("ANSI C++ forbids braced-groups within expressions"); rtl_exp = expand_end_stmt_expr ($2); *************** *** 1418,1422 **** #endif else my_friendly_abort (79); ! $$ = build_c_cast (type, build_compound_expr ($3)); } } --- 1471,1475 ---- #endif else my_friendly_abort (79); ! $$ = build_c_cast (type, build_compound_expr ($3), 1); } } *************** *** 1438,1442 **** | TYPEID '(' type_id ')' { tree type = groktypename ($3); ! $$ = get_typeid (type); } | global_scope IDENTIFIER { --- 1491,1495 ---- | TYPEID '(' type_id ')' { tree type = groktypename ($3); ! $$ = get_typeid (TYPE_MAIN_VARIANT (type)); } | global_scope IDENTIFIER { *************** *** 1492,1500 **** { $$ = build_member_call (OP0 ($$), OP1 ($$), NULL_TREE); } | object unqualified_id %prec UNARY ! { $$ = build_component_ref ($$, $2, NULL_TREE, 1); } ! | object qualified_id %prec UNARY ! { $$ = build_object_ref ($$, OP0 ($2), OP1 ($2)); } | object unqualified_id '(' nonnull_exprlist ')' { #if 0 /* This is a future direction of this code, but because --- 1545,1556 ---- { $$ = build_member_call (OP0 ($$), OP1 ($$), NULL_TREE); } | object unqualified_id %prec UNARY ! { got_object = NULL_TREE; ! $$ = build_component_ref ($$, $2, NULL_TREE, 1); } ! | object overqualified_id %prec UNARY ! { got_object = NULL_TREE; ! $$ = build_object_ref ($$, OP0 ($2), OP1 ($2)); } | object unqualified_id '(' nonnull_exprlist ')' { + got_object = NULL_TREE; #if 0 /* This is a future direction of this code, but because *************** *** 1512,1515 **** --- 1568,1572 ---- | object unqualified_id LEFT_RIGHT { + got_object = NULL_TREE; #if 0 /* This is a future direction of this code, but because *************** *** 1525,1530 **** #endif } ! | object qualified_id '(' nonnull_exprlist ')' { if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 ($2)))) { --- 1582,1588 ---- #endif } ! | object overqualified_id '(' nonnull_exprlist ')' { + got_object = NULL_TREE; if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 ($2)))) { *************** *** 1536,1541 **** $$ = build_scoped_method_call ($$, OP0 ($2), OP1 ($2), $4); } ! | object qualified_id LEFT_RIGHT { if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 ($2)))) { --- 1594,1600 ---- $$ = build_scoped_method_call ($$, OP0 ($2), OP1 ($2), $4); } ! | object overqualified_id LEFT_RIGHT { + got_object = NULL_TREE; if (IS_SIGNATURE (IDENTIFIER_TYPE_VALUE (OP0 ($2)))) { *************** *** 1549,1560 **** /* p->int::~int() is valid -- 12.4 */ | object '~' TYPESPEC LEFT_RIGHT ! { ! if (TREE_CODE (TREE_TYPE ($1)) ! != TREE_CODE (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE ($3)))) cp_error ("`%E' is not of type `%T'", $1, $3); $$ = convert (void_type_node, $1); } | object TYPESPEC SCOPE '~' TYPESPEC LEFT_RIGHT ! { if ($2 != $5) cp_error ("destructor specifier `%T::~%T()' must have matching names", $2, $5); --- 1608,1622 ---- /* p->int::~int() is valid -- 12.4 */ | object '~' TYPESPEC LEFT_RIGHT ! { ! got_object = NULL_TREE; ! if (IDENTIFIER_GLOBAL_VALUE ($3) ! && (TREE_CODE (TREE_TYPE ($1)) ! != TREE_CODE (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE ($3))))) cp_error ("`%E' is not of type `%T'", $1, $3); $$ = convert (void_type_node, $1); } | object TYPESPEC SCOPE '~' TYPESPEC LEFT_RIGHT ! { ! got_object = NULL_TREE; if ($2 != $5) cp_error ("destructor specifier `%T::~%T()' must have matching names", $2, $5); *************** *** 1564,1567 **** --- 1626,1634 ---- $$ = convert (void_type_node, $1); } + | object error + { + got_object = NULL_TREE; + $$ = error_mark_node; + } ; *************** *** 1581,1585 **** $$ = expand_start_stmt_expr (); } compstmt ')' ! { if (flag_ansi) pedwarn ("ANSI C++ forbids braced-groups within expressions"); $$ = expand_end_stmt_expr ($2); } --- 1648,1652 ---- $$ = expand_start_stmt_expr (); } compstmt ')' ! { if (pedantic) pedwarn ("ANSI C++ forbids braced-groups within expressions"); $$ = expand_end_stmt_expr ($2); } *************** *** 1618,1624 **** boolean.literal: CXX_TRUE ! { $$ = true_node; } | CXX_FALSE ! { $$ = false_node; } ; --- 1685,1691 ---- boolean.literal: CXX_TRUE ! { $$ = boolean_true_node; } | CXX_FALSE ! { $$ = boolean_false_node; } ; *************** *** 1644,1653 **** object: primary '.' | primary POINTSAT { ! $$ = build_x_arrow ($$); } ; decl: /* Normal case: make this fast. */ --- 1711,1726 ---- object: primary '.' + { got_object = TREE_TYPE ($$); } | primary POINTSAT { ! $$ = build_x_arrow ($$); ! got_object = TREE_TYPE ($$); } ; + setattrs: /* empty */ + { prefix_attributes = chainon (prefix_attributes, $0); } + ; + decl: /* Normal case: make this fast. */ *************** *** 1656,1660 **** int yes = suspend_momentary (); d = start_decl ($2, d, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); resume_momentary (yes); if (IS_AGGR_TYPE_CODE (TREE_CODE ($1))) --- 1729,1733 ---- int yes = suspend_momentary (); d = start_decl ($2, d, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); resume_momentary (yes); if (IS_AGGR_TYPE_CODE (TREE_CODE ($1))) *************** *** 1665,1669 **** int yes = suspend_momentary (); d = start_decl ($2, d, 0, NULL_TREE); ! finish_decl (d, NULL_TREE, NULL_TREE, 0); resume_momentary (yes); note_list_got_semicolon ($1); --- 1738,1742 ---- int yes = suspend_momentary (); d = start_decl ($2, d, 0, NULL_TREE); ! cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0); resume_momentary (yes); note_list_got_semicolon ($1); *************** *** 1730,1733 **** --- 1803,1807 ---- typed_typespecs %prec EMPTY | typed_declspecs1 + ; typed_declspecs1: *************** *** 1736,1739 **** --- 1810,1815 ---- | typespec reserved_declspecs %prec HYPERUNARY { $$ = decl_tree_cons (NULL_TREE, $$, $2); } + | typespec reserved_typespecquals reserved_declspecs + { $$ = decl_tree_cons (NULL_TREE, $$, chainon ($2, $3)); } | declmods typespec reserved_declspecs { $$ = decl_tree_cons (NULL_TREE, $2, chainon ($3, $$)); } *************** *** 1758,1761 **** --- 1834,1841 ---- IDENTIFIER_POINTER ($2)); $$ = decl_tree_cons (NULL_TREE, $2, $$); } + | reserved_declspecs attributes setattrs + { $$ = $1; } + | attributes setattrs + { $$ = NULL_TREE; } ; *************** *** 1778,1781 **** --- 1858,1865 ---- $$ = decl_tree_cons (NULL_TREE, $2, $$); TREE_STATIC ($$) = TREE_STATIC ($1); } + | declmods attributes setattrs + { $$ = $1; } + | attributes setattrs + { $$ = NULL_TREE; } ; *************** *** 1814,1822 **** | TYPEOF '(' expr ')' { $$ = TREE_TYPE ($3); ! if (flag_ansi) pedwarn ("ANSI C++ forbids `typeof'"); } | TYPEOF '(' type_id ')' { $$ = groktypename ($3); ! if (flag_ansi) pedwarn ("ANSI C++ forbids `typeof'"); } | SIGOF '(' expr ')' --- 1898,1906 ---- | TYPEOF '(' expr ')' { $$ = TREE_TYPE ($3); ! if (pedantic) pedwarn ("ANSI C++ forbids `typeof'"); } | TYPEOF '(' type_id ')' { $$ = groktypename ($3); ! if (pedantic) pedwarn ("ANSI C++ forbids `typeof'"); } | SIGOF '(' expr ')' *************** *** 1880,1884 **** initdcl0: ! declarator maybe_raises maybeasm maybe_attribute '=' { current_declspecs = $0; if (TREE_CODE (current_declspecs) != TREE_LIST) --- 1964,1968 ---- initdcl0: ! declarator exception_specification_opt maybeasm maybe_attribute '=' { current_declspecs = $0; if (TREE_CODE (current_declspecs) != TREE_LIST) *************** *** 1893,1902 **** $5 = suspend_momentary (); $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { finish_decl ($6, $7, $3, 0); $$ = $5; } ! | declarator maybe_raises maybeasm maybe_attribute { tree d; current_declspecs = $0; --- 1977,1986 ---- $5 = suspend_momentary (); $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4, prefix_attributes); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { cp_finish_decl ($6, $7, $3, 0, LOOKUP_ONLYCONVERTING); $$ = $5; } ! | declarator exception_specification_opt maybeasm maybe_attribute { tree d; current_declspecs = $0; *************** *** 1912,1968 **** $$ = suspend_momentary (); d = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes (d, $4); ! finish_decl (d, NULL_TREE, $3, 0); } ; initdcl: ! declarator maybe_raises maybeasm maybe_attribute '=' { $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { finish_decl ($6, $7, $3, 0); } ! | declarator maybe_raises maybeasm maybe_attribute { $$ = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes ($$, $4); ! finish_decl ($$, NULL_TREE, $3, 0); } ; notype_initdcl0: ! notype_declarator maybe_raises maybeasm maybe_attribute '=' { current_declspecs = $0; $5 = suspend_momentary (); $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { finish_decl ($6, $7, $3, 0); $$ = $5; } ! | notype_declarator maybe_raises maybeasm maybe_attribute { tree d; current_declspecs = $0; $$ = suspend_momentary (); d = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes (d, $4); ! finish_decl (d, NULL_TREE, $3, 0); } ; nomods_initdcl0: ! notype_declarator maybe_raises maybeasm maybe_attribute '=' { current_declspecs = NULL_TREE; $5 = suspend_momentary (); $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { finish_decl ($6, $7, $3, 0); $$ = $5; } ! | notype_declarator maybe_raises maybeasm maybe_attribute { tree d; current_declspecs = NULL_TREE; $$ = suspend_momentary (); d = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes (d, $4); ! finish_decl (d, NULL_TREE, $3, 0); } ; --- 1996,2052 ---- $$ = suspend_momentary (); d = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes (d, $4, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, $3, 0, 0); } ; initdcl: ! declarator exception_specification_opt maybeasm maybe_attribute '=' { $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4, prefix_attributes); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { cp_finish_decl ($6, $7, $3, 0, LOOKUP_ONLYCONVERTING); } ! | declarator exception_specification_opt maybeasm maybe_attribute { $$ = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes ($$, $4, prefix_attributes); ! cp_finish_decl ($$, NULL_TREE, $3, 0, 0); } ; notype_initdcl0: ! notype_declarator exception_specification_opt maybeasm maybe_attribute '=' { current_declspecs = $0; $5 = suspend_momentary (); $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4, prefix_attributes); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { cp_finish_decl ($6, $7, $3, 0, LOOKUP_ONLYCONVERTING); $$ = $5; } ! | notype_declarator exception_specification_opt maybeasm maybe_attribute { tree d; current_declspecs = $0; $$ = suspend_momentary (); d = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes (d, $4, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, $3, 0, 0); } ; nomods_initdcl0: ! notype_declarator exception_specification_opt maybeasm maybe_attribute '=' { current_declspecs = NULL_TREE; $5 = suspend_momentary (); $$ = start_decl ($1, current_declspecs, 1, $2); ! cplus_decl_attributes ($$, $4, prefix_attributes); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ ! { cp_finish_decl ($6, $7, $3, 0, LOOKUP_ONLYCONVERTING); $$ = $5; } ! | notype_declarator exception_specification_opt maybeasm maybe_attribute { tree d; current_declspecs = NULL_TREE; $$ = suspend_momentary (); d = start_decl ($1, current_declspecs, 0, $2); ! cplus_decl_attributes (d, $4, prefix_attributes); ! cp_finish_decl (d, NULL_TREE, $3, 0, 0); } ; *************** *** 1990,1996 **** attribute_list: attrib ! { $$ = build_tree_list (NULL_TREE, $1); } | attribute_list ',' attrib ! { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } ; --- 2074,2080 ---- attribute_list: attrib ! { $$ = $1; } | attribute_list ',' attrib ! { $$ = chainon ($1, $3); } ; *************** *** 1999,2009 **** { $$ = NULL_TREE; } | any_word ! { $$ = $1; } | any_word '(' IDENTIFIER ')' ! { $$ = tree_cons ($1, NULL_TREE, build_tree_list (NULL_TREE, $3)); } | any_word '(' IDENTIFIER ',' nonnull_exprlist ')' ! { $$ = tree_cons ($1, NULL_TREE, tree_cons (NULL_TREE, $3, $5)); } | any_word '(' nonnull_exprlist ')' ! { $$ = tree_cons ($1, NULL_TREE, $3); } ; --- 2083,2093 ---- { $$ = NULL_TREE; } | any_word ! { $$ = build_tree_list ($1, NULL_TREE); } | any_word '(' IDENTIFIER ')' ! { $$ = build_tree_list ($1, build_tree_list (NULL_TREE, $3)); } | any_word '(' IDENTIFIER ',' nonnull_exprlist ')' ! { $$ = build_tree_list ($1, tree_cons (NULL_TREE, $3, $5)); } | any_word '(' nonnull_exprlist ')' ! { $$ = build_tree_list ($1, $3); } ; *************** *** 2026,2029 **** --- 2110,2119 ---- ; + maybe_init: + %prec EMPTY /* empty */ + { $$ = NULL_TREE; } + | '=' init + { $$ = $2; } + init: expr_no_commas %prec '=' *************** *** 2081,2088 **** check_for_missing_semicolon ($$); } | ENUM identifier ! { $$ = xref_tag (enum_type_node, $2, NULL_TREE, 0); } | ENUM complex_type_name ! { $$ = xref_tag (enum_type_node, $2, NULL_TREE, 0); } ! /* C++ extensions, merged with C to avoid shift/reduce conflicts */ | class_head left_curly opt.component_decl_list '}' --- 2171,2179 ---- check_for_missing_semicolon ($$); } | ENUM identifier ! { $$ = xref_tag (enum_type_node, $2, NULL_TREE, 1); } | ENUM complex_type_name ! { $$ = xref_tag (enum_type_node, $2, NULL_TREE, 1); } ! | TYPENAME_KEYWORD complex_type_name ! { $$ = $2; } /* C++ extensions, merged with C to avoid shift/reduce conflicts */ | class_head left_curly opt.component_decl_list '}' *************** *** 2106,2112 **** if (TREE_CODE ($$) == ENUMERAL_TYPE) /* $$ = $1 from default rule. */; - else if (CLASSTYPE_DECLARED_EXCEPTION ($$)) - { - } else { --- 2197,2200 ---- *************** *** 2139,2152 **** | class_head %prec EMPTY { ! #if 0 ! /* It's no longer clear what the following error is supposed to ! accomplish. If it turns out to be needed, add a comment why. */ ! if (TYPE_BINFO_BASETYPES ($$) && !TYPE_SIZE ($$)) ! { ! error ("incomplete definition of type `%s'", ! TYPE_NAME_STRING ($$)); ! $$ = error_mark_node; ! } ! #endif } ; --- 2227,2235 ---- | class_head %prec EMPTY { ! /* struct B: public A; is not accepted by the WP grammar. */ ! if (TYPE_BINFO_BASETYPES ($$) && !TYPE_SIZE ($$) ! && ! TYPE_BEING_DEFINED ($$)) ! cp_error ("base clause without member specification for `%#T'", ! $$); } ; *************** *** 2190,2193 **** --- 2273,2282 ---- | aggr template_type %prec EMPTY { current_aggr = $$; $$ = $2; } + | specialization + ; + + named_class_head_sans_basetype_defn: + aggr identifier_defn %prec EMPTY + { current_aggr = $$; $$ = $2; } | aggr template_type_name '{' { yyungetc ('{', 1); *************** *** 2198,2232 **** | aggr template_type_name ':' { yyungetc (':', 1); goto aggr2; } - | specialization ; - named_class_head_sans_basetype_defn: - aggr identifier_defn %prec EMPTY - { current_aggr = $$; $$ = $2; } - ; - - do_xref: /* empty */ %prec EMPTY - { $$ = xref_tag (current_aggr, $0, NULL_TREE, 1); } - do_xref_defn: /* empty */ %prec EMPTY ! { $$ = xref_defn_tag (current_aggr, $0, NULL_TREE); } named_class_head: ! named_class_head_sans_basetype do_xref ! maybe_base_class_list %prec EMPTY ! { ! if ($3) ! $$ = xref_tag (current_aggr, $1, $3, 1); ! else ! $$ = $2; ! } ! | ! named_class_head_sans_basetype_defn do_xref_defn ! maybe_base_class_list %prec EMPTY ! { if ($3) ! $$ = xref_defn_tag (current_aggr, $1, $3); ! else ! $$ = $2; } ; --- 2287,2305 ---- | aggr template_type_name ':' { yyungetc (':', 1); goto aggr2; } ; do_xref_defn: /* empty */ %prec EMPTY ! { $$ = xref_tag (current_aggr, $0, NULL_TREE, 0); } ! ; named_class_head: ! named_class_head_sans_basetype %prec EMPTY ! { $$ = xref_tag (current_aggr, $1, NULL_TREE, 1); } ! | named_class_head_sans_basetype_defn do_xref_defn ! maybe_base_class_list %prec EMPTY ! { ! $$ = $2; if ($3) ! xref_basetypes (current_aggr, $1, $2, $3); } ; *************** *** 2432,2437 **** tree name = TYPE_IDENTIFIER (t); ! CLASSTYPE_INTERFACE_ONLY (t) = interface_only; ! SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown); /* Record how to set the access of this class's --- 2505,2514 ---- tree name = TYPE_IDENTIFIER (t); ! if (! ANON_AGGRNAME_P (name)) ! { ! CLASSTYPE_INTERFACE_ONLY (t) = interface_only; ! SET_CLASSTYPE_INTERFACE_UNKNOWN_X ! (t, interface_unknown); ! } /* Record how to set the access of this class's *************** *** 2511,2515 **** } } - | component_decl_list ';' ; --- 2588,2591 ---- *************** *** 2525,2528 **** --- 2601,2606 ---- | fn.def2 '{' /* nodecls compstmt */ { $$ = finish_method ($$); } + | ';' + { $$ = NULL_TREE; } ; *************** *** 2539,2545 **** $$ = grok_x_components ($$, $2); } ! | notype_declarator maybe_raises maybeasm maybe_attribute ! { $$ = grokfield ($$, NULL_TREE, $2, NULL_TREE, $3); ! cplus_decl_attributes ($$, $4); } | ':' expr_no_commas { $$ = grokbitfield (NULL_TREE, NULL_TREE, $2); } --- 2617,2623 ---- $$ = grok_x_components ($$, $2); } ! | notype_declarator exception_specification_opt maybeasm maybe_attribute maybe_init ! { $$ = grokfield ($$, NULL_TREE, $2, $5, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | ':' expr_no_commas { $$ = grokbitfield (NULL_TREE, NULL_TREE, $2); } *************** *** 2555,2568 **** member? In other words, is "bar" an after_type_declarator or a parmlist? */ ! | typed_declspecs '(' parmlist ')' type_quals { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), $3, $5); ! $$ = grokfield ($$, TREE_CHAIN ($1), NULL_TREE, NULL_TREE, ! NULL_TREE); } ! | typed_declspecs LEFT_RIGHT type_quals { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), empty_parms (), $3); ! $$ = grokfield ($$, TREE_CHAIN ($1), NULL_TREE, NULL_TREE, ! NULL_TREE); } ; --- 2633,2648 ---- member? In other words, is "bar" an after_type_declarator or a parmlist? */ ! | typed_declspecs '(' parmlist ')' type_quals exception_specification_opt maybeasm maybe_attribute maybe_init { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), $3, $5); ! $$ = grokfield ($$, TREE_CHAIN ($1), $6, $9, $7); ! cplus_decl_attributes ($$, $8, prefix_attributes); } ! | typed_declspecs LEFT_RIGHT type_quals exception_specification_opt maybeasm maybe_attribute maybe_init { $$ = build_parse_node (CALL_EXPR, TREE_VALUE ($1), empty_parms (), $3); ! $$ = grokfield ($$, TREE_CHAIN ($1), $4, $7, $5); ! cplus_decl_attributes ($$, $6, prefix_attributes); } ! | using_decl ! { $$ = do_class_using_decl ($1); } ; *************** *** 2609,2670 **** after_type_component_declarator0: ! after_type_declarator maybe_raises maybeasm maybe_attribute { current_declspecs = $0; ! $$ = grokfield ($$, current_declspecs, $2, NULL_TREE, $3); ! cplus_decl_attributes ($$, $4); } ! | after_type_declarator maybe_raises maybeasm maybe_attribute '=' init ! { current_declspecs = $0; ! $$ = grokfield ($$, current_declspecs, $2, $6, $3); ! cplus_decl_attributes ($$, $4); } | TYPENAME ':' expr_no_commas maybe_attribute { current_declspecs = $0; $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4); } ; notype_component_declarator0: ! notype_declarator maybe_raises maybeasm maybe_attribute ! { current_declspecs = $0; ! $$ = grokfield ($$, current_declspecs, $2, NULL_TREE, $3); ! cplus_decl_attributes ($$, $4); } ! | notype_declarator maybe_raises maybeasm maybe_attribute '=' init { current_declspecs = $0; ! $$ = grokfield ($$, current_declspecs, $2, $6, $3); ! cplus_decl_attributes ($$, $4); } | IDENTIFIER ':' expr_no_commas maybe_attribute { current_declspecs = $0; $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4); } | ':' expr_no_commas maybe_attribute { current_declspecs = $0; $$ = grokbitfield (NULL_TREE, current_declspecs, $2); ! cplus_decl_attributes ($$, $3); } ; after_type_component_declarator: ! after_type_declarator maybe_raises maybeasm maybe_attribute ! { $$ = grokfield ($$, current_declspecs, $2, NULL_TREE, $3); ! cplus_decl_attributes ($$, $4); } ! | after_type_declarator maybe_raises maybeasm maybe_attribute '=' init ! { $$ = grokfield ($$, current_declspecs, $2, $6, $3); ! cplus_decl_attributes ($$, $4); } | TYPENAME ':' expr_no_commas maybe_attribute { $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4); } ; notype_component_declarator: ! notype_declarator maybe_raises maybeasm maybe_attribute ! { $$ = grokfield ($$, current_declspecs, $2, NULL_TREE, $3); ! cplus_decl_attributes ($$, $4); } ! | notype_declarator maybe_raises maybeasm maybe_attribute '=' init ! { $$ = grokfield ($$, current_declspecs, $2, $6, $3); ! cplus_decl_attributes ($$, $4); } | IDENTIFIER ':' expr_no_commas maybe_attribute { $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4); } | ':' expr_no_commas maybe_attribute { $$ = grokbitfield (NULL_TREE, current_declspecs, $2); ! cplus_decl_attributes ($$, $3); } ; --- 2689,2736 ---- after_type_component_declarator0: ! after_type_declarator exception_specification_opt maybeasm maybe_attribute maybe_init { current_declspecs = $0; ! $$ = grokfield ($$, current_declspecs, $2, $5, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | TYPENAME ':' expr_no_commas maybe_attribute { current_declspecs = $0; $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } ; notype_component_declarator0: ! notype_declarator exception_specification_opt maybeasm maybe_attribute maybe_init { current_declspecs = $0; ! $$ = grokfield ($$, current_declspecs, $2, $5, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | IDENTIFIER ':' expr_no_commas maybe_attribute { current_declspecs = $0; $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | ':' expr_no_commas maybe_attribute { current_declspecs = $0; $$ = grokbitfield (NULL_TREE, current_declspecs, $2); ! cplus_decl_attributes ($$, $3, prefix_attributes); } ; after_type_component_declarator: ! after_type_declarator exception_specification_opt maybeasm maybe_attribute maybe_init ! { $$ = grokfield ($$, current_declspecs, $2, $5, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | TYPENAME ':' expr_no_commas maybe_attribute { $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } ; notype_component_declarator: ! notype_declarator exception_specification_opt maybeasm maybe_attribute maybe_init ! { $$ = grokfield ($$, current_declspecs, $2, $5, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | IDENTIFIER ':' expr_no_commas maybe_attribute { $$ = grokbitfield ($$, current_declspecs, $3); ! cplus_decl_attributes ($$, $4, prefix_attributes); } | ':' expr_no_commas maybe_attribute { $$ = grokbitfield (NULL_TREE, current_declspecs, $2); ! cplus_decl_attributes ($$, $3, prefix_attributes); } ; *************** *** 2696,2700 **** | '(' type_id ')' '[' expr ']' { ! if (flag_ansi) pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new"); $$ = build_parse_node (ARRAY_REF, TREE_VALUE ($2), $5); --- 2762,2766 ---- | '(' type_id ')' '[' expr ']' { ! if (pedantic) pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new"); $$ = build_parse_node (ARRAY_REF, TREE_VALUE ($2), $5); *************** *** 2720,2729 **** and component declarations. That way, longer rules are preferred. */ /* An expression which will not live on the momentary obstack. */ nonmomentary_expr: ! { $$ = suspend_momentary (); } expr { resume_momentary ((int) $1); $$ = $2; } ; /* A declarator that is allowed only after an explicit typespec. */ /* may all be followed by prec '.' */ --- 2786,2810 ---- and component declarations. That way, longer rules are preferred. */ + suspend_mom: + { $$ = suspend_momentary (); } + /* An expression which will not live on the momentary obstack. */ nonmomentary_expr: ! suspend_mom expr { resume_momentary ((int) $1); $$ = $2; } ; + /* An expression which will not live on the momentary obstack. */ + maybe_parmlist: + suspend_mom '(' nonnull_exprlist ')' + { resume_momentary ((int) $1); $$ = $3; } + | suspend_mom '(' parmlist ')' + { resume_momentary ((int) $1); $$ = $3; } + | suspend_mom LEFT_RIGHT + { resume_momentary ((int) $1); $$ = empty_parms (); } + | suspend_mom '(' error ')' + { resume_momentary ((int) $1); $$ = NULL_TREE; } + ; + /* A declarator that is allowed only after an explicit typespec. */ /* may all be followed by prec '.' */ *************** *** 2767,2778 **** direct_after_type_declarator: ! direct_after_type_declarator '(' nonnull_exprlist ')' type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, $3, $5); } ! | direct_after_type_declarator '(' parmlist ')' type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, $3, $5); } ! | direct_after_type_declarator LEFT_RIGHT type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, empty_parms (), $3); } ! | direct_after_type_declarator '(' error ')' type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, NULL_TREE, NULL_TREE); } | direct_after_type_declarator '[' nonmomentary_expr ']' { $$ = build_parse_node (ARRAY_REF, $$, $3); } --- 2848,2853 ---- direct_after_type_declarator: ! direct_after_type_declarator maybe_parmlist type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, $2, $3); } | direct_after_type_declarator '[' nonmomentary_expr ']' { $$ = build_parse_node (ARRAY_REF, $$, $3); } *************** *** 2824,2837 **** complex_direct_notype_declarator: ! direct_notype_declarator '(' nonnull_exprlist ')' type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, $3, $5); } ! | direct_notype_declarator '(' parmlist ')' type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, $3, $5); } ! | direct_notype_declarator LEFT_RIGHT type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, empty_parms (), $3); } ! | direct_notype_declarator '(' error ')' type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, NULL_TREE, NULL_TREE); } ! | '(' expr_or_declarator ')' ! { $$ = finish_decl_parsing ($2); } | '(' complex_notype_declarator ')' { $$ = $2; } --- 2899,2904 ---- complex_direct_notype_declarator: ! direct_notype_declarator maybe_parmlist type_quals %prec '.' ! { $$ = build_parse_node (CALL_EXPR, $$, $2, $3); } | '(' complex_notype_declarator ')' { $$ = $2; } *************** *** 2840,2843 **** --- 2907,2913 ---- | direct_notype_declarator '[' ']' { $$ = build_parse_node (ARRAY_REF, $$, NULL_TREE); } + | notype_qualified_id + { push_nested_class (TREE_TYPE (OP0 ($$)), 3); + TREE_COMPLEXITY ($$) = current_class_depth; } ; *************** *** 2885,2888 **** --- 2955,2960 ---- TYPENAME SCOPE { got_scope = TREE_TYPE ($$); } + | NSNAME SCOPE + { got_scope = $$; } | template_type SCOPE { got_scope = TREE_TYPE ($$); } *************** *** 3035,3038 **** --- 3107,3116 ---- ; + .poplevel: /* empty */ + { expand_end_bindings (getdecls (), kept_level_p (), 1); + $$ = poplevel (kept_level_p (), 1, 0); + pop_momentary (); } + ; + /* Read zero or more forward-declarations for labels that nested functions can jump to. */ *************** *** 3040,3044 **** /* empty */ | label_decls ! { if (flag_ansi) pedwarn ("ANSI C++ forbids label declarations"); } ; --- 3118,3122 ---- /* empty */ | label_decls ! { if (pedantic) pedwarn ("ANSI C++ forbids label declarations"); } ; *************** *** 3069,3088 **** ; ! compstmt: '{' .pushlevel '}' ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! $$ = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); } ! | '{' .pushlevel maybe_label_decls stmts '}' ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! $$ = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); } ! | '{' .pushlevel maybe_label_decls stmts error '}' ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! $$ = poplevel (kept_level_p (), 0, 0); ! pop_momentary (); } ! | '{' .pushlevel maybe_label_decls error '}' ! { expand_end_bindings (getdecls (), kept_level_p(), 1); ! $$ = poplevel (kept_level_p (), 0, 0); ! pop_momentary (); } ; --- 3147,3152 ---- ; ! compstmt: '{' .pushlevel compstmtend .poplevel ! { $$ = $4; } ; *************** *** 3099,3106 **** compstmt { finish_stmt (); } ! | .pushlevel simple_stmt ! { expand_end_bindings (getdecls (), kept_level_p (), 1); ! $$ = poplevel (kept_level_p (), 1, 0); ! pop_momentary (); } ; --- 3163,3168 ---- compstmt { finish_stmt (); } ! | .pushlevel simple_stmt .poplevel ! { $$ = $3; } ; *************** *** 3113,3117 **** simple_stmt: decl ! { finish_stmt (); } | expr ';' { --- 3175,3180 ---- simple_stmt: decl ! { finish_stmt (); ! prefix_attributes = NULL_TREE; } | expr ';' { *************** *** 3130,3138 **** { expand_start_else (); } implicitly_scoped_stmt ! { expand_end_cond (); ! expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! finish_stmt (); } | simple_if %prec IF { expand_end_cond (); --- 3193,3199 ---- { expand_start_else (); } implicitly_scoped_stmt ! { expand_end_cond (); } ! .poplevel ! { finish_stmt (); } | simple_if %prec IF { expand_end_cond (); *************** *** 3148,3156 **** .pushlevel paren_cond_or_null { expand_exit_loop_if_false (0, $4); } ! already_scoped_stmt ! { expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! expand_end_loop (); finish_stmt (); } | DO --- 3209,3214 ---- .pushlevel paren_cond_or_null { expand_exit_loop_if_false (0, $4); } ! already_scoped_stmt .poplevel ! { expand_end_loop (); finish_stmt (); } | DO *************** *** 3167,3218 **** clear_momentary (); finish_stmt (); } ! | forhead.1 { emit_nop (); emit_line_note (input_filename, lineno); - if ($1) cplus_expand_expr_stmt ($1); expand_start_loop_continue_elsewhere (1); } .pushlevel xcond ';' { emit_line_note (input_filename, lineno); ! if ($4) expand_exit_loop_if_false (0, $4); } xexpr ')' ! /* Don't let the tree nodes for $7 be discarded by clear_momentary during the parsing of the next stmt. */ { push_momentary (); } ! already_scoped_stmt { emit_line_note (input_filename, lineno); - expand_end_bindings (getdecls (), kept_level_p (), 1); - poplevel (kept_level_p (), 1, 0); - pop_momentary (); expand_loop_continue_here (); ! if ($7) cplus_expand_expr_stmt ($7); pop_momentary (); expand_end_loop (); finish_stmt (); } - | forhead.2 - { emit_nop (); - emit_line_note (input_filename, lineno); - expand_start_loop_continue_elsewhere (1); } - .pushlevel xcond ';' - { emit_line_note (input_filename, lineno); - if ($4) expand_exit_loop_if_false (0, $4); } - xexpr ')' - /* Don't let the tree nodes for $7 be discarded - by clear_momentary during the parsing of the next stmt. */ - { push_momentary (); - $8 = lineno; } - already_scoped_stmt - { emit_line_note (input_filename, (int) $8); - expand_end_bindings (getdecls (), kept_level_p (), 1); - poplevel (kept_level_p (), 1, 0); - pop_momentary (); - expand_loop_continue_here (); - if ($7) cplus_expand_expr_stmt ($7); - pop_momentary (); - expand_end_loop (); - finish_stmt (); - } | SWITCH .pushlevel '(' condition ')' { emit_line_note (input_filename, lineno); c_expand_start_case ($4); /* Don't let the tree nodes for $4 be discarded by clear_momentary during the parsing of the next stmt. */ --- 3225,3267 ---- clear_momentary (); finish_stmt (); } ! | FOR ! { emit_line_note (input_filename, lineno); ! if (flag_new_for_scope) ! { ! /* Conditionalize .pushlevel */ ! pushlevel (0); ! clear_last_expr (); ! push_momentary (); ! expand_start_bindings (0); ! } ! } ! '(' for.init.statement { emit_nop (); emit_line_note (input_filename, lineno); expand_start_loop_continue_elsewhere (1); } .pushlevel xcond ';' { emit_line_note (input_filename, lineno); ! if ($7) expand_exit_loop_if_false (0, $7); } xexpr ')' ! /* Don't let the tree nodes for $10 be discarded by clear_momentary during the parsing of the next stmt. */ { push_momentary (); } ! already_scoped_stmt .poplevel { emit_line_note (input_filename, lineno); expand_loop_continue_here (); ! if ($10) cplus_expand_expr_stmt ($10); pop_momentary (); expand_end_loop (); + if (flag_new_for_scope) + { + expand_end_bindings (getdecls (), kept_level_p (), 1); + poplevel (kept_level_p (), 1, 0); + pop_momentary (); + } finish_stmt (); } | SWITCH .pushlevel '(' condition ')' { emit_line_note (input_filename, lineno); c_expand_start_case ($4); + push_switch (); /* Don't let the tree nodes for $4 be discarded by clear_momentary during the parsing of the next stmt. */ *************** *** 3221,3228 **** { expand_end_case ($4); pop_momentary (); ! expand_end_bindings (getdecls (), kept_level_p (), 1); ! poplevel (kept_level_p (), 1, 0); ! pop_momentary (); ! finish_stmt (); } | CASE expr_no_commas ':' { register tree value = check_cp_case_value ($2); --- 3270,3276 ---- { expand_end_case ($4); pop_momentary (); ! pop_switch (); } ! .poplevel ! { finish_stmt (); } | CASE expr_no_commas ':' { register tree value = check_cp_case_value ($2); *************** *** 3240,3244 **** { cp_error ("duplicate case value `%E'", $2); ! cp_error_at ("`%E' previously used here", duplicate); } else if (success == 3) --- 3288,3292 ---- { cp_error ("duplicate case value `%E'", $2); ! cp_error_at ("previously used here", duplicate); } else if (success == 3) *************** *** 3256,3260 **** = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); ! if (flag_ansi) pedwarn ("ANSI C++ forbids range expressions in switch statement"); if (value1 != error_mark_node --- 3304,3308 ---- = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); ! if (pedantic) pedwarn ("ANSI C++ forbids range expressions in switch statement"); if (value1 != error_mark_node *************** *** 3369,3375 **** try_block: ! TRY '{' .pushlevel { expand_start_try_stmts (); } ! ansi_try_stmts { expand_end_try_stmts (); expand_start_all_catch (); } --- 3417,3423 ---- try_block: ! TRY { expand_start_try_stmts (); } ! compstmt { expand_end_try_stmts (); expand_start_all_catch (); } *************** *** 3378,3405 **** ; - ansi_try_stmts: - '}' - /* An empty try block is degenerate, but it's better to - do extra work here than to do all the special-case work - everywhere else. */ - { expand_end_bindings (0,1,1); - poplevel (2,0,0); - } - | stmts '}' - { expand_end_bindings (0,1,1); - poplevel (2,0,0); - } - | error '}' - { expand_end_bindings (0,1,1); - poplevel (2,0,0); - } - ; - handler_seq: /* empty */ ! | handler_seq CATCH ! { emit_line_note (input_filename, lineno); } ! handler_args compstmt { expand_end_catch_block (); } ; --- 3426,3434 ---- ; handler_seq: /* empty */ ! | handler_seq CATCH .pushlevel handler_args compstmt { expand_end_catch_block (); } + .poplevel ; *************** *** 3421,3425 **** | '(' typed_typespecs after_type_declarator ')' { expand_start_catch_block ($2, $3); } ! */ | '(' parm ')' { expand_start_catch_block (TREE_PURPOSE ($2), --- 3450,3454 ---- | '(' typed_typespecs after_type_declarator ')' { expand_start_catch_block ($2, $3); } ! This allows reference parameters... */ | '(' parm ')' { expand_start_catch_block (TREE_PURPOSE ($2), *************** *** 3441,3462 **** ; ! forhead.1: ! FOR '(' ';' ! { $$ = NULL_TREE; } ! | FOR '(' expr ';' ! { $$ = $3; } ! | FOR '(' '{' '}' ! { $$ = NULL_TREE; } ! ; ! ! forhead.2: ! FOR '(' decl ! { $$ = 0; } ! | FOR '(' error ';' ! { $$ = 0; } ! | FOR '(' '{' .pushlevel stmts '}' ! { $$ = 1; } ! | FOR '(' '{' .pushlevel error '}' ! { $$ = -1; } ; --- 3470,3478 ---- ; ! for.init.statement: ! xexpr ';' ! { if ($1) cplus_expand_expr_stmt ($1); } ! | decl ! | '{' compstmtend ; *************** *** 3643,3650 **** full_parm: ! parm ! { $$ = build_tree_list (NULL_TREE, $$); } ! | parm '=' init ! { $$ = build_tree_list ($3, $$); } ; --- 3659,3664 ---- full_parm: ! parm maybe_init ! { $$ = build_tree_list ($2, $$); } ; *************** *** 3679,3702 **** /* empty */ %prec EMPTY { ! warning ("type specifier omitted for parameter"); ! $$ = build_tree_list (TREE_PURPOSE (TREE_VALUE ($-1)), NULL_TREE); } | notype_declarator { ! warning ("type specifier omitted for parameter"); ! $$ = build_tree_list (TREE_PURPOSE (TREE_VALUE ($-1)), $$); } ; ! maybe_raises: %prec EMPTY /* empty */ { $$ = NULL_TREE; } | THROW '(' ansi_raise_identifiers ')' %prec EMPTY { $$ = $3; } ; ansi_raise_identifier: type_id ! { $$ = build_decl_list (NULL_TREE, $$); } ; --- 3693,3718 ---- /* empty */ %prec EMPTY { ! error ("type specifier omitted for parameter"); ! $$ = build_tree_list (integer_type_node, NULL_TREE); } | notype_declarator { ! error ("type specifier omitted for parameter"); ! $$ = build_tree_list (integer_type_node, $$); } ; ! exception_specification_opt: %prec EMPTY /* empty */ { $$ = NULL_TREE; } | THROW '(' ansi_raise_identifiers ')' %prec EMPTY { $$ = $3; } + | THROW LEFT_RIGHT %prec EMPTY + { $$ = build_decl_list (NULL_TREE, NULL_TREE); } ; ansi_raise_identifier: type_id ! { $$ = build_decl_list (NULL_TREE, groktypename($$)); } ; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/pt.c gcc-2.7.0/cp/pt.c *** gcc-2.6.3/cp/pt.c Mon Nov 14 23:34:44 1994 --- gcc-2.7.0/cp/pt.c Thu Jun 15 08:27:07 1995 *************** *** 17,21 **** 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. */ /* Known bugs or deficiencies include: --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Known bugs or deficiencies include: *************** *** 39,42 **** --- 40,45 ---- #include "parse.h" #include "lex.h" + #include "output.h" + #include "defaults.h" extern struct obstack permanent_obstack; *************** *** 98,103 **** /* A template parameter is not modifiable. */ TREE_READONLY (parm) = 1; ! if (TREE_CODE (TREE_TYPE (parm)) == RECORD_TYPE ! || TREE_CODE (TREE_TYPE (parm)) == UNION_TYPE) { sorry ("aggregate template parameter types"); --- 101,105 ---- /* A template parameter is not modifiable. */ TREE_READONLY (parm) = 1; ! if (IS_AGGR_TYPE (TREE_TYPE (parm))) { sorry ("aggregate template parameter types"); *************** *** 130,133 **** --- 132,136 ---- } } + SET_DECL_ARTIFICIAL (decl); pushdecl (decl); parm = build_tree_list (defval, parm); *************** *** 240,245 **** DECL_NAME (decl) = DECL_NAME (d2); TREE_TYPE (decl) = TREE_TYPE (d2); ! if (interface_unknown && flag_external_templates && ! DECL_IN_SYSTEM_HEADER (decl)) ! warn_if_unknown_interface (); TREE_PUBLIC (decl) = TREE_PUBLIC (d2) = flag_external_templates && !interface_unknown; DECL_EXTERNAL (decl) = (DECL_EXTERNAL (d2) --- 243,250 ---- DECL_NAME (decl) = DECL_NAME (d2); TREE_TYPE (decl) = TREE_TYPE (d2); ! if (interface_unknown && flag_external_templates ! && ! flag_alt_external_templates ! && ! DECL_IN_SYSTEM_HEADER (decl)) ! warn_if_unknown_interface (decl); TREE_PUBLIC (decl) = TREE_PUBLIC (d2) = flag_external_templates && !interface_unknown; DECL_EXTERNAL (decl) = (DECL_EXTERNAL (d2) *************** *** 467,471 **** if ((TREE_CODE (a) == VAR_DECL || TREE_CODE (a) == FUNCTION_DECL) ! && !TREE_PUBLIC (a)) { cp_error ("address of non-extern `%E' cannot be used as template argument", a); --- 472,476 ---- if ((TREE_CODE (a) == VAR_DECL || TREE_CODE (a) == FUNCTION_DECL) ! && ! DECL_PUBLIC (a)) { cp_error ("address of non-extern `%E' cannot be used as template argument", a); *************** *** 684,688 **** if (val != error_mark_node) { ! decl = build_decl (VAR_DECL, DECL_NAME (parm), TREE_TYPE (parm)); DECL_INITIAL (decl) = val; TREE_READONLY (decl) = 1; --- 689,694 ---- if (val != error_mark_node) { ! decl = build_decl (CONST_DECL, DECL_NAME (parm), ! TREE_TYPE (parm)); DECL_INITIAL (decl) = val; TREE_READONLY (decl) = 1; *************** *** 691,694 **** --- 697,701 ---- if (decl != 0) { + SET_DECL_ARTIFICIAL (decl); layout_decl (decl, 0); if (class_level) *************** *** 752,755 **** --- 759,764 ---- return uses_template_parms (TREE_TYPE (t)); case RECORD_TYPE: + if (TYPE_PTRMEMFUNC_FLAG (t)) + return uses_template_parms (TYPE_PTRMEMFUNC_FN_TYPE (t)); case UNION_TYPE: if (!TYPE_NAME (t)) *************** *** 835,838 **** --- 844,852 ---- return 1; + case CONSTRUCTOR: + if (TREE_TYPE (t) && TYPE_PTRMEMFUNC_P (TREE_TYPE (t))) + return uses_template_parms (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (t))); + /* else fall through */ + default: switch (TREE_CODE_CLASS (TREE_CODE (t))) *************** *** 899,915 **** type = IDENTIFIER_TYPE_VALUE (id); my_friendly_assert (type != 0, 277); - if (flag_external_templates) - { - if (CLASSTYPE_INTERFACE_UNKNOWN (type)) - { - DECL_EXTERNAL (t2) = 0; - TREE_PUBLIC (t2) = 0; - } - else - { - DECL_EXTERNAL (t2) = CLASSTYPE_INTERFACE_ONLY (type); - TREE_PUBLIC (t2) = 1; - } - } break; case 1: --- 913,916 ---- *************** *** 927,934 **** } ! struct tinst_level *current_tinst_level = 0; ! struct tinst_level *free_tinst_level = 0; ! void push_tinst_level (name) tree name; --- 928,937 ---- } ! static struct tinst_level *current_tinst_level = 0; ! static struct tinst_level *free_tinst_level = 0; ! static int tinst_depth = 0; ! int max_tinst_depth = 17; ! int push_tinst_level (name) tree name; *************** *** 937,940 **** --- 940,951 ---- tree global = IDENTIFIER_GLOBAL_VALUE (name); + if (tinst_depth >= max_tinst_depth) + { + error ("template instantiation depth exceeds maximum of %d", + max_tinst_depth); + cp_error (" instantiating `%D'", name); + return 0; + } + if (free_tinst_level) { *************** *** 958,961 **** --- 969,974 ---- new->next = current_tinst_level; current_tinst_level = new; + ++tinst_depth; + return 1; } *************** *** 968,971 **** --- 981,985 ---- old->next = free_tinst_level; free_tinst_level = old; + --tinst_depth; } *************** *** 1043,1049 **** push_to_top_level (); template_info = DECL_TEMPLATE_INFO (t1); ! if (setup_parse) { - push_tinst_level (classname); push_template_decls (DECL_TEMPLATE_PARMS (TREE_PURPOSE (template)), TREE_VALUE (template), 0); --- 1057,1062 ---- push_to_top_level (); template_info = DECL_TEMPLATE_INFO (t1); ! if (setup_parse && push_tinst_level (classname)) { push_template_decls (DECL_TEMPLATE_PARMS (TREE_PURPOSE (template)), TREE_VALUE (template), 0); *************** *** 1158,1164 **** && type != void_type_node && type != char_type_node) ! type = cp_build_type_variant (tsubst (type, args, nargs, in_decl), ! TYPE_READONLY (type), ! TYPE_VOLATILE (type)); switch (TREE_CODE (t)) { --- 1171,1176 ---- && type != void_type_node && type != char_type_node) ! type = tsubst (type, args, nargs, in_decl); ! switch (TREE_CODE (t)) { *************** *** 1248,1251 **** --- 1260,1296 ---- && constructor_name (DECL_CONTEXT (t)) == DECL_NAME (t)) name = constructor_name (ctx); + + if (DECL_CONSTRUCTOR_P (t) && TYPE_USES_VIRTUAL_BASECLASSES (ctx)) + { + /* Since we didn't know that this class had virtual bases until after + we instantiated it, we have to recreate the arguments to this + constructor, as otherwise it would miss the __in_chrg parameter. */ + tree newtype, parm; + tree parms = TREE_CHAIN (TYPE_ARG_TYPES (type)); + parms = hash_tree_chain (integer_type_node, parms); + newtype = build_cplus_method_type (ctx, + TREE_TYPE (type), + parms); + newtype = build_type_variant (newtype, + TYPE_READONLY (type), + TYPE_VOLATILE (type)); + type = newtype; + + fnargs = copy_node (DECL_ARGUMENTS (t)); + TREE_CHAIN (fnargs) = TREE_CHAIN (DECL_ARGUMENTS (t)); + + /* In this case we need "in-charge" flag saying whether + this constructor is responsible for initialization + of virtual baseclasses or not. */ + parm = build_decl (PARM_DECL, in_charge_identifier, integer_type_node); + /* Mark the artificial `__in_chrg' parameter as "artificial". */ + SET_DECL_ARTIFICIAL (parm); + DECL_ARG_TYPE (parm) = integer_type_node; + DECL_REGISTER (parm) = 1; + TREE_CHAIN (parm) = TREE_CHAIN (fnargs); + TREE_CHAIN (fnargs) = parm; + + fnargs = tsubst (fnargs, args, nargs, t); + } #if 0 fprintf (stderr, "\nfor function %s in class %s:\n", *************** *** 1397,1401 **** DECL_ASSEMBLER_NAME (r) = a; } ! else if (DECL_INLINE (r) && DECL_SAVED_INSNS (r)) { /* This overrides the template version, use it. */ --- 1442,1446 ---- DECL_ASSEMBLER_NAME (r) = a; } ! else if (TREE_STATIC (r)) { /* This overrides the template version, use it. */ *************** *** 1404,1411 **** } } ! TREE_PUBLIC (r) = TREE_PUBLIC (t); ! DECL_EXTERNAL (r) = DECL_EXTERNAL (t); ! TREE_STATIC (r) = TREE_STATIC (t); DECL_INLINE (r) = DECL_INLINE (t); { #if 0 /* Maybe later. -jason */ --- 1449,1460 ---- } } ! TREE_PUBLIC (r) = 1; ! DECL_EXTERNAL (r) = 1; ! TREE_STATIC (r) = 0; ! DECL_INTERFACE_KNOWN (r) = 0; DECL_INLINE (r) = DECL_INLINE (t); + DECL_THIS_INLINE (r) = DECL_THIS_INLINE (t); + TREE_READONLY (r) = TREE_READONLY (t); + TREE_THIS_VOLATILE (r) = TREE_THIS_VOLATILE (t); { #if 0 /* Maybe later. -jason */ *************** *** 1650,1653 **** --- 1699,1706 ---- len = TREE_VEC_LENGTH (DECL_TEMPLATE_PARMS (tmpl)); + i = len; + while (i--) + targ_ptr[i] = copy_to_permanent (targ_ptr[i]); + for (fndecl = DECL_TEMPLATE_INSTANTIATIONS (tmpl); fndecl; fndecl = TREE_CHAIN (fndecl)) *************** *** 1655,1659 **** tree *t1 = &TREE_VEC_ELT (TREE_PURPOSE (fndecl), 0); for (i = len - 1; i >= 0; i--) ! if (t1[i] != targ_ptr[i]) goto no_match; --- 1708,1712 ---- tree *t1 = &TREE_VEC_ELT (TREE_PURPOSE (fndecl), 0); for (i = len - 1; i >= 0; i--) ! if (simple_cst_equal (t1[i], targ_ptr[i]) <= 0) goto no_match; *************** *** 1678,1681 **** --- 1731,1736 ---- goto exit; + assemble_external (fndecl); + /* If it's a static member fn in the template, we need to change it into a FUNCTION_TYPE and chop off its this pointer. */ *************** *** 1695,1699 **** /* If we have a preexisting version of this function, don't expand the template version, use the other instead. */ ! if (DECL_INLINE (fndecl) && DECL_SAVED_INSNS (fndecl)) { SET_DECL_TEMPLATE_SPECIALIZATION (fndecl); --- 1750,1754 ---- /* If we have a preexisting version of this function, don't expand the template version, use the other instead. */ ! if (TREE_STATIC (fndecl)) { SET_DECL_TEMPLATE_SPECIALIZATION (fndecl); *************** *** 1703,1706 **** --- 1758,1762 ---- { SET_DECL_IMPLICIT_INSTANTIATION (fndecl); + repo_template_used (fndecl); p = (struct pending_inline *) permalloc (sizeof (struct pending_inline)); p->parm_vec = t->parm_vec; *************** *** 1719,1726 **** extract_interface_info (); ! ! if (interface_unknown && flag_external_templates && ! DECL_IN_SYSTEM_HEADER (tmpl)) ! warn_if_unknown_interface (); ! if (interface_unknown || !flag_external_templates) p->interface = 1; /* unknown */ else --- 1775,1793 ---- extract_interface_info (); ! ! if (interface_unknown && flag_external_templates) ! { ! if (DECL_CLASS_CONTEXT (fndecl) ! && CLASSTYPE_INTERFACE_KNOWN (DECL_CLASS_CONTEXT (fndecl))) ! { ! interface_unknown = 0; ! interface_only ! = CLASSTYPE_INTERFACE_ONLY (DECL_CLASS_CONTEXT (fndecl)); ! } ! else if (! DECL_IN_SYSTEM_HEADER (tmpl)) ! warn_if_unknown_interface (tmpl); ! } ! ! if (interface_unknown || ! flag_external_templates) p->interface = 1; /* unknown */ else *************** *** 1814,1818 **** #endif ! t = xref_tag (tinfo->aggr, id, NULL_TREE, 0); my_friendly_assert (TREE_CODE (t) == RECORD_TYPE || TREE_CODE (t) == UNION_TYPE --- 1881,1885 ---- #endif ! t = xref_tag (tinfo->aggr, id, NULL_TREE, 1); my_friendly_assert (TREE_CODE (t) == RECORD_TYPE || TREE_CODE (t) == UNION_TYPE *************** *** 1996,1999 **** --- 2063,2075 ---- if (arg == unknown_type_node) return 1; + + if (! uses_template_parms (parm) + && TREE_CODE_CLASS (TREE_CODE (arg)) != 't') + { + if (can_convert_arg (parm, TREE_TYPE (arg), arg)) + continue; + return 1; + } + #if 0 if (TREE_CODE (arg) == VAR_DECL) *************** *** 2005,2008 **** --- 2081,2101 ---- { my_friendly_assert (TREE_TYPE (arg) != NULL_TREE, 293); + if (TREE_CODE (arg) == TREE_LIST + && TREE_TYPE (arg) == unknown_type_node + && TREE_CODE (TREE_VALUE (arg)) == TEMPLATE_DECL) + { + int nsubsts, ntparms; + tree *targs; + + /* Have to back unify here */ + arg = TREE_VALUE (arg); + nsubsts = 0; + ntparms = TREE_VEC_LENGTH (DECL_TEMPLATE_PARMS (arg)); + targs = (tree *) alloca (sizeof (tree) * ntparms); + parm = tree_cons (NULL_TREE, parm, NULL_TREE); + return type_unification (DECL_TEMPLATE_PARMS (arg), targs, + TYPE_ARG_TYPES (TREE_TYPE (arg)), + parm, &nsubsts, 0); + } arg = TREE_TYPE (arg); } *************** *** 2146,2149 **** --- 2239,2244 ---- case REFERENCE_TYPE: + if (TREE_CODE (arg) == REFERENCE_TYPE) + arg = TREE_TYPE (arg); return unify (tparms, targs, ntparms, TREE_TYPE (parm), arg, nsubsts); *************** *** 2188,2193 **** t1 = TREE_OPERAND (parm, 0); t2 = TREE_OPERAND (parm, 1); - if (TREE_CODE (t1) != TEMPLATE_CONST_PARM) - return 1; return unify (tparms, targs, ntparms, t1, fold (build (PLUS_EXPR, integer_type_node, arg, t2)), --- 2283,2286 ---- *************** *** 2213,2232 **** { tree a; ! /* Unification of something that is not a template fails. (mrs) */ ! if (TYPE_NAME (arg) == 0) return 1; a = IDENTIFIER_TEMPLATE (TYPE_IDENTIFIER (arg)); ! /* Unification of something that is not a template fails. (mrs) */ ! if (a == 0) ! return 1; ! if (UPT_TEMPLATE (parm) != TREE_PURPOSE (a)) ! /* different templates */ ! return 1; ! return unify (tparms, targs, ntparms, UPT_PARMS (parm), TREE_VALUE (a), ! nsubsts); } case RECORD_TYPE: ! if (TYPE_PTRMEMFUNC_P (parm)) return unify (tparms, targs, ntparms, TYPE_PTRMEMFUNC_FN_TYPE (parm), arg, nsubsts); --- 2306,2322 ---- { tree a; ! /* Unification of something that is not a class fails. */ ! if (! IS_AGGR_TYPE (arg)) return 1; a = IDENTIFIER_TEMPLATE (TYPE_IDENTIFIER (arg)); ! if (a && UPT_TEMPLATE (parm) == TREE_PURPOSE (a)) ! return unify (tparms, targs, ntparms, UPT_PARMS (parm), ! TREE_VALUE (a), nsubsts); ! /* FIXME: Should check base conversions here. */ ! return 1; } case RECORD_TYPE: ! if (TYPE_PTRMEMFUNC_FLAG (parm)) return unify (tparms, targs, ntparms, TYPE_PTRMEMFUNC_FN_TYPE (parm), arg, nsubsts); *************** *** 2248,2251 **** --- 2338,2344 ---- return 1; check_args: + if (unify (tparms, targs, ntparms, TREE_TYPE (parm), + TREE_TYPE (arg), nsubsts)) + return 1; return type_unification (tparms, targs, TYPE_ARG_TYPES (parm), TYPE_ARG_TYPES (arg), nsubsts, 1); *************** *** 2299,2306 **** if (DECL_EXPLICIT_INSTANTIATION (t)) ! DECIDE (! DECL_EXTERNAL (t)); else if (! flag_implicit_templates) DECIDE (0); /* If it's a method, let the class type decide it. @@ What if the method template is in a separate file? --- 2392,2408 ---- if (DECL_EXPLICIT_INSTANTIATION (t)) ! DECIDE (DECL_NOT_REALLY_EXTERN (t)); else if (! flag_implicit_templates) DECIDE (0); + if (i->interface == 1) + /* OK, it was an implicit instantiation. */ + { + if (SUPPORTS_WEAK) + DECL_WEAK (t) = 1; + else + TREE_PUBLIC (t) = 0; + } + /* If it's a method, let the class type decide it. @@ What if the method template is in a separate file? *************** *** 2320,2324 **** if (CLASSTYPE_INTERFACE_KNOWN (context)) DECIDE (!CLASSTYPE_INTERFACE_ONLY (context)); ! #if 0 /* This doesn't get us stuff needed only by the file initializer. */ DECIDE (TREE_USED (t)); #else /* This compiles too much stuff, but that's probably better in --- 2422,2426 ---- if (CLASSTYPE_INTERFACE_KNOWN (context)) DECIDE (!CLASSTYPE_INTERFACE_ONLY (context)); ! #if 1 /* This doesn't get us stuff needed only by the file initializer. */ DECIDE (TREE_USED (t)); #else /* This compiles too much stuff, but that's probably better in *************** *** 2397,2400 **** --- 2499,2518 ---- } + void + mark_function_instantiated (result, extern_p) + tree result; + int extern_p; + { + if (DECL_TEMPLATE_INSTANTIATION (result)) + SET_DECL_EXPLICIT_INSTANTIATION (result); + TREE_PUBLIC (result) = 1; + + if (! extern_p) + { + DECL_INTERFACE_KNOWN (result) = 1; + DECL_NOT_REALLY_EXTERN (result) = 1; + } + } + /* called from the parser. */ void *************** *** 2403,2417 **** { tree decl = grokdeclarator (declarator, declspecs, NORMAL, 0, 0); ! tree name = DECL_NAME (decl); ! tree fn = IDENTIFIER_GLOBAL_VALUE (name); tree result = NULL_TREE; ! if (fn) { for (fn = get_first_fn (fn); fn; fn = DECL_CHAIN (fn)) ! if (TREE_CODE (fn) == TEMPLATE_DECL) { int ntparms = TREE_VEC_LENGTH (DECL_TEMPLATE_PARMS (fn)); tree *targs = (tree *) malloc (sizeof (tree) * ntparms); ! int i, dummy; i = type_unification (DECL_TEMPLATE_PARMS (fn), targs, TYPE_ARG_TYPES (TREE_TYPE (fn)), --- 2521,2548 ---- { tree decl = grokdeclarator (declarator, declspecs, NORMAL, 0, 0); ! tree name; ! tree fn; tree result = NULL_TREE; ! int extern_p = 0; ! ! /* If we've already seen this template instance, use it. */ ! if (name = DECL_ASSEMBLER_NAME (decl), ! fn = IDENTIFIER_GLOBAL_VALUE (name), ! fn && DECL_TEMPLATE_INSTANTIATION (fn)) ! result = fn; ! else if (name = DECL_NAME (decl), fn = IDENTIFIER_GLOBAL_VALUE (name), fn) { for (fn = get_first_fn (fn); fn; fn = DECL_CHAIN (fn)) ! if (decls_match (fn, decl) ! && DECL_DEFER_OUTPUT (fn)) ! { ! result = fn; ! break; ! } ! else if (TREE_CODE (fn) == TEMPLATE_DECL) { int ntparms = TREE_VEC_LENGTH (DECL_TEMPLATE_PARMS (fn)); tree *targs = (tree *) malloc (sizeof (tree) * ntparms); ! int i, dummy = 0; i = type_unification (DECL_TEMPLATE_PARMS (fn), targs, TYPE_ARG_TYPES (TREE_TYPE (fn)), *************** *** 2425,2461 **** result = instantiate_template (fn, targs); } } } if (! result) ! cp_error ("no matching template for `%D' found", decl); if (flag_external_templates) return; - if (DECL_EXPLICIT_INSTANTIATION (result) && TREE_PUBLIC (result)) - return; - - SET_DECL_EXPLICIT_INSTANTIATION (result); - if (storage == NULL_TREE) - { - TREE_PUBLIC (result) = 1; - DECL_EXTERNAL (result) = (DECL_INLINE (result) - && ! flag_implement_inlines); - TREE_STATIC (result) = ! DECL_EXTERNAL (result); - } - else if (storage == ridpointers[(int) RID_EXTERN]) ; else cp_error ("storage class `%D' applied to template instantiation", storage); } void do_type_instantiation (name, storage) tree name, storage; { tree t = TREE_TYPE (name); ! int extern_p; /* With -fexternal-templates, explicit instantiations are treated the same --- 2556,2606 ---- result = instantiate_template (fn, targs); } + free (targs); } } if (! result) ! { ! cp_error ("no matching template for `%D' found", decl); ! return; ! } if (flag_external_templates) return; if (storage == NULL_TREE) ; + else if (storage == ridpointers[(int) RID_EXTERN]) + extern_p = 1; else cp_error ("storage class `%D' applied to template instantiation", storage); + mark_function_instantiated (result, extern_p); + repo_template_instantiated (result, extern_p); } void + mark_class_instantiated (t, extern_p) + tree t; + int extern_p; + { + SET_CLASSTYPE_EXPLICIT_INSTANTIATION (t); + SET_CLASSTYPE_INTERFACE_KNOWN (t); + CLASSTYPE_INTERFACE_ONLY (t) = extern_p; + CLASSTYPE_VTABLE_NEEDS_WRITING (t) = ! extern_p; + TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (t)) = extern_p; + if (! extern_p) + { + CLASSTYPE_DEBUG_REQUESTED (t) = 1; + rest_of_type_compilation (t, 1); + } + } + + void do_type_instantiation (name, storage) tree name, storage; { tree t = TREE_TYPE (name); ! int extern_p = 0; ! int nomem_p = 0; /* With -fexternal-templates, explicit instantiations are treated the same *************** *** 2472,2476 **** if (storage == NULL_TREE) ! extern_p = 0; else if (storage == ridpointers[(int) RID_EXTERN]) extern_p = 1; --- 2617,2623 ---- if (storage == NULL_TREE) ! /* OK */; ! else if (storage == ridpointers[(int) RID_INLINE]) ! nomem_p = 1; else if (storage == ridpointers[(int) RID_EXTERN]) extern_p = 1; *************** *** 2483,2507 **** /* We've already instantiated this. */ ! if (CLASSTYPE_EXPLICIT_INSTANTIATION (t) && CLASSTYPE_INTERFACE_KNOWN (t)) ! { ! if (! extern_p) ! cp_pedwarn ("multiple explicit instantiation of `%#T'", t); ! return; ! } if (! CLASSTYPE_TEMPLATE_SPECIALIZATION (t)) { ! SET_CLASSTYPE_EXPLICIT_INSTANTIATION (t); ! if (! extern_p) ! { ! SET_CLASSTYPE_INTERFACE_KNOWN (t); ! CLASSTYPE_INTERFACE_ONLY (t) = 0; ! CLASSTYPE_VTABLE_NEEDS_WRITING (t) = 1; ! CLASSTYPE_DEBUG_REQUESTED (t) = 1; ! TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (t)) = 0; ! rest_of_type_compilation (t, 1); ! } } ! { tree tmp; --- 2630,2646 ---- /* We've already instantiated this. */ ! if (CLASSTYPE_EXPLICIT_INSTANTIATION (t) && ! CLASSTYPE_INTERFACE_ONLY (t) ! && extern_p) ! return; if (! CLASSTYPE_TEMPLATE_SPECIALIZATION (t)) { ! mark_class_instantiated (t, extern_p); ! repo_template_instantiated (t, extern_p); } ! ! if (nomem_p) ! return; ! { tree tmp; *************** *** 2517,2535 **** tmp = TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (t), 0); for (; tmp; tmp = TREE_CHAIN (tmp)) ! { ! if (DECL_TEMPLATE_SPECIALIZATION (tmp) ! || (DECL_USE_TEMPLATE (tmp) == 0 ! && CLASSTYPE_TEMPLATE_SPECIALIZATION (t))) ! continue; ! ! SET_DECL_EXPLICIT_INSTANTIATION (tmp); ! if (! extern_p) ! { ! TREE_PUBLIC (tmp) = 1; ! DECL_EXTERNAL (tmp) = (DECL_INLINE (tmp) ! && ! flag_implement_inlines); ! TREE_STATIC (tmp) = ! DECL_EXTERNAL (tmp); ! } ! } #if 0 --- 2656,2664 ---- tmp = TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (t), 0); for (; tmp; tmp = TREE_CHAIN (tmp)) ! if (DECL_TEMPLATE_INSTANTIATION (tmp)) ! { ! mark_function_instantiated (tmp, extern_p); ! repo_template_instantiated (tmp, extern_p); ! } #if 0 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/ptree.c gcc-2.7.0/cp/ptree.c *** gcc-2.6.3/cp/ptree.c Thu Apr 14 21:36:16 1994 --- gcc-2.7.0/cp/ptree.c Thu Jun 15 08:27:27 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/repo.c gcc-2.7.0/cp/repo.c *** gcc-2.6.3/cp/repo.c --- gcc-2.7.0/cp/repo.c Thu Jun 15 08:27:41 1995 *************** *** 0 **** --- 1,409 ---- + /* Code to maintain a C++ template repository. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Jason Merrill (jason@cygnus.com) + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* My strategy here is as follows: + + Everything should be emitted in a translation unit where it is used. + The results of the automatic process should be easily reproducible with + explicit code. */ + + #include + #include "config.h" + #include "tree.h" + #include "cp-tree.h" + #include "input.h" + #include "obstack.h" + + extern char * rindex (); + extern char * getenv (); + extern char * getpwd (); + + static tree pending_repo; + static tree original_repo; + static char *repo_name; + static FILE *repo_file; + + extern int flag_use_repository; + extern int errorcount, sorrycount; + extern struct obstack temporary_obstack; + extern struct obstack permanent_obstack; + + #define IDENTIFIER_REPO_USED(NODE) (TREE_LANG_FLAG_3 (NODE)) + #define IDENTIFIER_REPO_CHOSEN(NODE) (TREE_LANG_FLAG_4 (NODE)) + + /* Record the flags used to compile this translation unit. */ + + void + repo_compile_flags (argc, argv) + int argc; + char **argv; + { + } + + /* If this template has not been seen before, add a note to the repository + saying where the declaration was. This may be used to find the + definition at link time. */ + + void + repo_template_declared (t) + tree t; + {} + + /* Note where the definition of a template lives so that instantiations can + be generated later. */ + + void + repo_template_defined (t) + tree t; + {} + + /* Note where the definition of a class lives to that template + instantiations can use it. */ + + void + repo_class_defined (t) + tree t; + {} + + tree + repo_get_id (t) + tree t; + { + if (TREE_CODE_CLASS (TREE_CODE (t)) == 't') + { + t = TYPE_BINFO_VTABLE (t); + if (t == NULL_TREE) + return t; + } + return DECL_ASSEMBLER_NAME (t); + } + + /* Note that a template has been used. If we can see the definition, offer + to emit it. */ + + void + repo_template_used (t) + tree t; + { + tree id; + + if (! flag_use_repository) + return; + + id = repo_get_id (t); + if (id == NULL_TREE) + return; + + if (TREE_CODE_CLASS (TREE_CODE (t)) == 't') + { + if (IDENTIFIER_REPO_CHOSEN (id)) + mark_class_instantiated (t, 0); + } + else if (TREE_CODE_CLASS (TREE_CODE (t)) == 'd') + { + if (IDENTIFIER_REPO_CHOSEN (id)) + mark_function_instantiated (t, 0); + } + else + my_friendly_abort (1); + + if (! IDENTIFIER_REPO_USED (id)) + { + IDENTIFIER_REPO_USED (id) = 1; + pending_repo = perm_tree_cons (NULL_TREE, id, pending_repo); + } + } + + /* Note that the vtable for a class has been used, and offer to emit it. */ + + void + repo_vtable_used (t) + tree t; + { + if (! flag_use_repository) + return; + + pending_repo = perm_tree_cons (NULL_TREE, t, pending_repo); + } + + /* Note that an inline with external linkage has been used, and offer to + emit it. */ + + void + repo_inline_used (fn) + tree fn; + { + if (! flag_use_repository) + return; + + /* Member functions of polymorphic classes go with their vtables. */ + if (DECL_FUNCTION_MEMBER_P (fn) && TYPE_VIRTUAL_P (DECL_CLASS_CONTEXT (fn))) + { + repo_vtable_used (DECL_CLASS_CONTEXT (fn)); + return; + } + + pending_repo = perm_tree_cons (NULL_TREE, fn, pending_repo); + } + + /* Note that a particular typeinfo node has been used, and offer to + emit it. */ + + void + repo_tinfo_used (ti) + tree ti; + { + } + + void + repo_template_instantiated (t, extern_p) + tree t; + int extern_p; + { + if (! extern_p) + { + tree id = repo_get_id (t); + if (id) + IDENTIFIER_REPO_CHOSEN (id) = 1; + } + } + + static char * + save_string (s, len) + char *s; + int len; + { + return obstack_copy0 (&temporary_obstack, s, len); + } + + static char * + get_base_filename (filename) + char *filename; + { + char *p = getenv ("COLLECT_GCC_OPTIONS"); + char *output = 0; + int compiling = 0; + + if (p) + while (*p) + { + char *q = p; + while (*q && *q != ' ') q++; + if (*p == '-' && p[1] == 'o') + { + p += 2; + if (p == q) + { + p++; q++; + if (*q) + while (*q && *q != ' ') q++; + } + + output = save_string (p, q - p); + } + else if (*p == '-' && p[1] == 'c') + compiling = 1; + if (*q) q++; + p = q; + } + + if (compiling && output) + return output; + + if (p && ! compiling) + { + warning ("-frepo must be used with -c"); + flag_use_repository = 0; + return NULL; + } + + p = rindex (filename, '/'); + if (p) + return p+1; + else + return filename; + } + + static void + open_repo_file (filename) + char *filename; + { + register char *p, *q; + char *s = get_base_filename (filename); + + if (s == NULL) + return; + + p = rindex (s, '/'); + if (! p) + p = s; + p = rindex (p, '.'); + if (! p) + p = s + strlen (s); + + obstack_grow (&permanent_obstack, s, p - s); + repo_name = obstack_copy0 (&permanent_obstack, ".rpo", 4); + + repo_file = fopen (repo_name, "r"); + } + + static char * + afgets (stream) + FILE *stream; + { + int c; + while ((c = getc (stream)) != EOF && c != '\n') + obstack_1grow (&temporary_obstack, c); + if (obstack_object_size (&temporary_obstack) == 0) + return NULL; + obstack_1grow (&temporary_obstack, '\0'); + return obstack_finish (&temporary_obstack); + } + + void + init_repo (filename) + char *filename; + { + char *buf; + + if (! flag_use_repository) + return; + + open_repo_file (filename); + + if (repo_file == 0) + return; + + while (buf = afgets (repo_file)) + { + switch (buf[0]) + { + case 'A': + case 'D': + case 'M': + break; + case 'C': + case 'O': + { + tree id = get_identifier (buf + 2); + tree orig; + + if (buf[0] == 'C') + { + IDENTIFIER_REPO_CHOSEN (id) = 1; + orig = integer_one_node; + } + else + orig = NULL_TREE; + + original_repo = perm_tree_cons (orig, id, original_repo); + } + break; + default: + error ("mysterious repository information in %s", repo_name); + } + obstack_free (&temporary_obstack, buf); + } + } + + static void + reopen_repo_file_for_write () + { + if (repo_file) + fclose (repo_file); + repo_file = fopen (repo_name, "w"); + + if (repo_file == 0) + { + error ("can't create repository information file `%s'", repo_name); + flag_use_repository = 0; + } + } + + /* Emit any pending repos. */ + + void + finish_repo () + { + tree t; + char *p; + int repo_changed = 0; + + if (! flag_use_repository) + return; + + /* Do we have to write out a new info file? */ + + /* Are there any old templates that aren't used any longer or that are + newly chosen? */ + + for (t = original_repo; t; t = TREE_CHAIN (t)) + { + if (! IDENTIFIER_REPO_USED (TREE_VALUE (t)) + || (! TREE_PURPOSE (t) && IDENTIFIER_REPO_CHOSEN (TREE_VALUE (t)))) + { + repo_changed = 1; + break; + } + IDENTIFIER_REPO_USED (TREE_VALUE (t)) = 0; + } + + /* Are there any templates that are newly used? */ + + if (! repo_changed) + for (t = pending_repo; t; t = TREE_CHAIN (t)) + { + if (IDENTIFIER_REPO_USED (TREE_VALUE (t))) + { + repo_changed = 1; + break; + } + } + + if (! repo_changed || errorcount || sorrycount) + goto out; + + reopen_repo_file_for_write (); + + if (repo_file == 0) + goto out; + + fprintf (repo_file, "M %s\n", main_input_filename); + + p = getpwd (); + fprintf (repo_file, "D %s\n", p); + + p = getenv ("COLLECT_GCC_OPTIONS"); + if (p != 0) + fprintf (repo_file, "A %s\n", p); + + for (t = pending_repo; t; t = TREE_CHAIN (t)) + { + tree val = TREE_VALUE (t); + char type = IDENTIFIER_REPO_CHOSEN (val) ? 'C' : 'O'; + + fprintf (repo_file, "%c %s\n", type, IDENTIFIER_POINTER (val)); + } + + out: + if (repo_file) + fclose (repo_file); + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/search.c gcc-2.7.0/cp/search.c *** gcc-2.6.3/cp/search.c Wed Oct 26 21:19:41 1994 --- gcc-2.7.0/cp/search.c Thu Jun 15 08:28:10 1995 *************** *** 1,5 **** /* Breadth-first and depth-first routines for searching multiple-inheritance lattice for GNU C++. ! Copyright (C) 1987, 1989, 1992, 1993 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,5 ---- /* Breadth-first and depth-first routines for searching multiple-inheritance lattice for GNU C++. ! Copyright (C) 1987, 1989, 1992, 1993, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 18,22 **** 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. */ /* High-level class interface. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* High-level class interface. */ *************** *** 28,31 **** --- 29,34 ---- #include "obstack.h" #include "flags.h" + #include "rtl.h" + #include "output.h" #define obstack_chunk_alloc xmalloc *************** *** 34,37 **** --- 37,41 ---- void init_search (); extern struct obstack *current_obstack; + extern tree abort_fndecl; #include "stack.h" *************** *** 378,383 **** } - #if 0 /* unused */ /* This is the newer recursive depth first search routine. */ /* Return non-zero if PARENT is directly derived from TYPE. By directly we mean it's only one step up the inheritance lattice. We check this --- 382,387 ---- } /* This is the newer recursive depth first search routine. */ + #if 0 /* unused */ /* Return non-zero if PARENT is directly derived from TYPE. By directly we mean it's only one step up the inheritance lattice. We check this *************** *** 428,443 **** if (TREE_CODE (parent) == TREE_VEC) parent = BINFO_TYPE (parent); ! /* unions cannot participate in inheritance relationships */ ! else if (TREE_CODE (parent) == UNION_TYPE) ! return NULL_TREE; ! else if (TREE_CODE (parent) != RECORD_TYPE) my_friendly_abort (89); if (TREE_CODE (binfo) == TREE_VEC) type = BINFO_TYPE (binfo); ! else if (TREE_CODE (binfo) == RECORD_TYPE) type = binfo; - else if (TREE_CODE (binfo) == UNION_TYPE) - return NULL_TREE; else my_friendly_abort (90); --- 432,442 ---- if (TREE_CODE (parent) == TREE_VEC) parent = BINFO_TYPE (parent); ! else if (! IS_AGGR_TYPE_CODE (TREE_CODE (parent))) my_friendly_abort (89); if (TREE_CODE (binfo) == TREE_VEC) type = BINFO_TYPE (binfo); ! else if (IS_AGGR_TYPE_CODE (TREE_CODE (binfo))) type = binfo; else my_friendly_abort (90); *************** *** 569,573 **** If PATH_PTR is non-NULL, then also build the list of types ! from PARENT to TYPE, with TREE_VIA_VIRUAL and TREE_VIA_PUBLIC set. --- 568,572 ---- If PATH_PTR is non-NULL, then also build the list of types ! from PARENT to TYPE, with TREE_VIA_VIRTUAL and TREE_VIA_PUBLIC set. *************** *** 799,802 **** --- 798,805 ---- #endif + /* We don't currently support access control on nested types. */ + if (TREE_CODE (field) == TYPE_DECL) + return access_public; + previous_scope = current_scope (); *************** *** 1090,1105 **** rval = lookup_field_1 (type, name); - if (rval || lookup_fnfields_here (type, name)>=0) - { - rval_binfo = basetype_path; - rval_binfo_h = rval_binfo; - } ! if (rval && TREE_CODE (rval) != TYPE_DECL && want_type) ! rval = NULL_TREE; ! ! if (rval) { ! if (protect) { if (TREE_PRIVATE (rval) | TREE_PROTECTED (rval)) --- 1093,1119 ---- rval = lookup_field_1 (type, name); ! if (rval || lookup_fnfields_here (type, name) >= 0) { ! if (rval) ! { ! if (want_type) ! { ! if (TREE_CODE (rval) != TYPE_DECL) ! { ! rval = purpose_member (name, CLASSTYPE_TAGS (type)); ! if (rval) ! rval = TYPE_MAIN_DECL (TREE_VALUE (rval)); ! } ! } ! else ! { ! if (TREE_CODE (rval) == TYPE_DECL ! && lookup_fnfields_here (type, name) >= 0) ! rval = NULL_TREE; ! } ! } ! ! if (protect && rval) { if (TREE_PRIVATE (rval) | TREE_PROTECTED (rval)) *************** *** 1208,1212 **** /* See if we can find NAME in TYPE. If RVAL is nonzero, and we do find NAME in TYPE, verify that such a second ! sighting is in fact legal. */ nval = lookup_field_1 (type, name); --- 1222,1226 ---- /* See if we can find NAME in TYPE. If RVAL is nonzero, and we do find NAME in TYPE, verify that such a second ! sighting is in fact valid. */ nval = lookup_field_1 (type, name); *************** *** 1260,1269 **** TREE_VALUE (entry) = rval; ! if (want_type && (rval == NULL_TREE || TREE_CODE (rval) != TYPE_DECL)) { ! rval = NULL_TREE; ! errstr = 0; } /* If this FIELD_DECL defines its own access level, deal with that. */ if (rval && errstr == 0 --- 1274,1304 ---- TREE_VALUE (entry) = rval; ! if (rval_binfo) { ! type = BINFO_TYPE (rval_binfo); ! ! if (rval) ! { ! if (want_type) ! { ! if (TREE_CODE (rval) != TYPE_DECL) ! { ! rval = purpose_member (name, CLASSTYPE_TAGS (type)); ! if (rval) ! rval = TYPE_MAIN_DECL (TREE_VALUE (rval)); ! } ! } ! else ! { ! if (TREE_CODE (rval) == TYPE_DECL ! && lookup_fnfields_here (type, name) >= 0) ! rval = NULL_TREE; ! } ! } } + if (rval == NULL_TREE) + errstr = 0; + /* If this FIELD_DECL defines its own access level, deal with that. */ if (rval && errstr == 0 *************** *** 1663,1667 **** /* See if we can find NAME in TYPE. If RVAL is nonzero, and we do find NAME in TYPE, verify that such a second ! sighting is in fact legal. */ index = lookup_fnfields_here (type, name); --- 1698,1702 ---- /* See if we can find NAME in TYPE. If RVAL is nonzero, and we do find NAME in TYPE, verify that such a second ! sighting is in fact valid. */ index = lookup_fnfields_here (type, name); *************** *** 1949,1957 **** && compparms (TREE_CHAIN (btypes), TREE_CHAIN (dtypes), 3)) { ! if (IDENTIFIER_ERROR_LOCUS (name) == NULL_TREE ! && ! comptypes (TREE_TYPE (TREE_TYPE (tmp)), drettype, 1)) { cp_error ("conflicting return type specified for virtual function `%#D'", fndecl); ! cp_error_at ("overriding definition as `%#D'", tmp); SET_IDENTIFIER_ERROR_LOCUS (name, basetype); } --- 1984,2032 ---- && compparms (TREE_CHAIN (btypes), TREE_CHAIN (dtypes), 3)) { ! tree brettype = TREE_TYPE (TREE_TYPE (tmp)); ! if (comptypes (brettype, drettype, 1)) ! /* OK */; ! else if ! (TREE_CODE (brettype) == TREE_CODE (drettype) ! && (TREE_CODE (brettype) == POINTER_TYPE ! || TREE_CODE (brettype) == REFERENCE_TYPE) ! && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (brettype)), ! TYPE_MAIN_VARIANT (TREE_TYPE (drettype)), ! 0)) ! /* covariant return type */ ! { ! tree b = TREE_TYPE (brettype), d = TREE_TYPE (drettype); ! if (TYPE_MAIN_VARIANT (b) != TYPE_MAIN_VARIANT (d)) ! { ! tree binfo = get_binfo (b, d, 1); ! if (binfo != error_mark_node ! && ! BINFO_OFFSET_ZEROP (binfo)) ! sorry ("adjusting pointers for covariant returns"); ! } ! if (TYPE_READONLY (d) > TYPE_READONLY (b)) ! { ! cp_error ("return type of `%#D' adds const", fndecl); ! cp_error_at (" overriding definition as `%#D'", ! tmp); ! } ! else if (TYPE_VOLATILE (d) > TYPE_VOLATILE (b)) ! { ! cp_error ("return type of `%#D' adds volatile", ! fndecl); ! cp_error_at (" overriding definition as `%#D'", ! tmp); ! } ! } ! else if (IS_AGGR_TYPE_2 (brettype, drettype) ! && comptypes (brettype, drettype, 0)) { + error ("invalid covariant return type (must use pointer or reference)"); + cp_error_at (" overriding `%#D'", tmp); + cp_error (" with `%#D'", fndecl); + } + else if (IDENTIFIER_ERROR_LOCUS (name) == NULL_TREE) + { cp_error ("conflicting return type specified for virtual function `%#D'", fndecl); ! cp_error_at (" overriding definition as `%#D'", tmp); SET_IDENTIFIER_ERROR_LOCUS (name, basetype); } *************** *** 1996,2005 **** if (do_self && CLASSTYPE_VFIELDS (BINFO_TYPE (binfo))) { tree tmp = TREE_CHAIN (BINFO_VIRTUALS (binfo)); - /* Get around dossier entry if there is one. */ - if (flag_dossier) - tmp = TREE_CHAIN (tmp); - while (tmp) { --- 2071,2077 ---- if (do_self && CLASSTYPE_VFIELDS (BINFO_TYPE (binfo))) { + /* Get around first entry reserved for RTTI. */ tree tmp = TREE_CHAIN (BINFO_VIRTUALS (binfo)); while (tmp) { *************** *** 2196,2200 **** tree base_binfo = TREE_VEC_ELT (binfos, i); ! if ((*qfn)(base_binfo)) { if (fn == dfs_init_vbase_pointers) --- 2268,2272 ---- tree base_binfo = TREE_VEC_ELT (binfos, i); ! if (qfn == 0 || (*qfn)(base_binfo)) { if (fn == dfs_init_vbase_pointers) *************** *** 2360,2365 **** { if (DECL_VINDEX (methods) ! && DECL_SAVED_INSNS (methods) == 0 ! && DECL_PENDING_INLINE_INFO (methods) == 0 && DECL_ABSTRACT_VIRTUAL_P (methods) == 0) { --- 2432,2436 ---- { if (DECL_VINDEX (methods) ! && DECL_THIS_INLINE (methods) == 0 && DECL_ABSTRACT_VIRTUAL_P (methods) == 0) { *************** *** 2418,2425 **** CLEAR_BINFO_VTABLE_PATH_MARKED (binfo); ! /* If there is a dossier, it is the first field, though perhaps from the base class. Otherwise, the first fields are virtual base class pointer fields. */ ! if (CLASSTYPE_DOSSIER (type) && VFIELD_NAME_P (DECL_NAME (fields))) /* Get past vtable for the object. */ fields = TREE_CHAIN (fields); --- 2489,2496 ---- CLEAR_BINFO_VTABLE_PATH_MARKED (binfo); ! /* If there is a rtti, it is the first field, though perhaps from the base class. Otherwise, the first fields are virtual base class pointer fields. */ ! if (CLASSTYPE_RTTI (type) && VFIELD_NAME_P (DECL_NAME (fields))) /* Get past vtable for the object. */ fields = TREE_CHAIN (fields); *************** *** 2486,2489 **** --- 2557,2739 ---- } + /* get the virtual context (the vbase that directly contains the + DECL_CLASS_CONTEXT of the FNDECL) that the given FNDECL is declared in, + or NULL_TREE if there is none. + + FNDECL must come from a virtual table from a virtual base to ensure that + there is only one possible DECL_CLASS_CONTEXT. + + We know that if there is more than one place (binfo) the fndecl that the + declared, they all refer to the same binfo. See get_class_offset_1 for + the check that ensures this. */ + static tree + virtual_context (fndecl, t, vbase) + tree fndecl, t, vbase; + { + tree path; + if (get_base_distance (DECL_CLASS_CONTEXT (fndecl), t, 0, &path) < 0) + { + /* This shouldn't happen, I don't want errors! */ + warning ("recoverable compiler error, fixups for virtual function"); + return vbase; + } + while (path) + { + if (TREE_VIA_VIRTUAL (path)) + return binfo_member (BINFO_TYPE (path), CLASSTYPE_VBASECLASSES (t)); + path = BINFO_INHERITANCE_CHAIN (path); + } + return 0; + } + + /* Fixups upcast offsets for one vtable. + Entries may stay within the VBASE given, or + they may upcast into a direct base, or + they may upcast into a different vbase. + + We only need to do fixups in case 2 and 3. + + This routine mirrors fixup_vtable_deltas in functionality, though + this one is runtime based, and the other is compile time based. + Conceivably that routine could be removed entirely, and all fixups + done at runtime. + + VBASE_OFFSETS is an association list of virtual bases that contains + offset information, so the offsets are only calculated once. */ + static void + expand_upcast_fixups (binfo, addr, orig_addr, vbase, t, vbase_offsets) + tree binfo, addr, orig_addr, vbase, t, *vbase_offsets; + { + tree virtuals = BINFO_VIRTUALS (binfo); + tree vc; + tree delta; + unsigned HOST_WIDE_INT n; + + delta = purpose_member (vbase, *vbase_offsets); + if (! delta) + { + delta = (tree)CLASSTYPE_SEARCH_SLOT (BINFO_TYPE (vbase)); + delta = build (MINUS_EXPR, ptrdiff_type_node, delta, addr); + delta = save_expr (delta); + delta = tree_cons (vbase, delta, *vbase_offsets); + *vbase_offsets = delta; + } + + /* Skip RTTI fake object. */ + n = 1; + if (virtuals) + virtuals = TREE_CHAIN (virtuals); + while (virtuals) + { + tree current_fndecl = TREE_VALUE (virtuals); + current_fndecl = FNADDR_FROM_VTABLE_ENTRY (current_fndecl); + current_fndecl = TREE_OPERAND (current_fndecl, 0); + if (current_fndecl + && current_fndecl != abort_fndecl + && (vc=virtual_context (current_fndecl, t, vbase)) != vbase) + { + /* This may in fact need a runtime fixup. */ + tree idx = DECL_VINDEX (current_fndecl); + tree vtbl = BINFO_VTABLE (binfo); + tree nvtbl = lookup_name (DECL_NAME (vtbl), 0); + tree aref, ref, naref; + tree old_delta, new_delta; + tree init; + + if (nvtbl == NULL_TREE + || nvtbl == IDENTIFIER_GLOBAL_VALUE (DECL_NAME (vtbl))) + { + /* Dup it if it isn't in local scope yet. */ + nvtbl = build_decl (VAR_DECL, + DECL_NAME (vtbl), + TYPE_MAIN_VARIANT (TREE_TYPE (BINFO_VTABLE (binfo)))); + DECL_ALIGN (nvtbl) = MAX (TYPE_ALIGN (double_type_node), + DECL_ALIGN (nvtbl)); + TREE_READONLY (nvtbl) = 0; + nvtbl = pushdecl (nvtbl); + init = NULL_TREE; + cp_finish_decl (nvtbl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); + DECL_VIRTUAL_P (nvtbl) = 1; + DECL_CONTEXT (nvtbl) = t; + init = build (MODIFY_EXPR, TREE_TYPE (nvtbl), + nvtbl, vtbl); + TREE_SIDE_EFFECTS (init) = 1; + expand_expr_stmt (init); + /* Update the vtable pointers as necessary. */ + ref = build_vfield_ref (build_indirect_ref (addr, NULL_PTR), DECL_CONTEXT (CLASSTYPE_VFIELD (BINFO_TYPE (binfo)))); + expand_expr_stmt (build_modify_expr (ref, NOP_EXPR, + build_unary_op (ADDR_EXPR, nvtbl, 0))); + } + assemble_external (vtbl); + aref = build_array_ref (vtbl, idx); + naref = build_array_ref (nvtbl, idx); + old_delta = build_component_ref (aref, delta_identifier, 0, 0); + new_delta = build_component_ref (naref, delta_identifier, 0, 0); + old_delta = build_binary_op (PLUS_EXPR, old_delta, + TREE_VALUE (delta), 0); + if (vc) + { + /* If this is set, we need to add in delta adjustments for + the other virtual base. */ + tree vc_delta = purpose_member (vc, *vbase_offsets); + if (! vc_delta) + { + tree vc_addr = convert_pointer_to_real (vc, orig_addr); + vc_delta = (tree)CLASSTYPE_SEARCH_SLOT (BINFO_TYPE (vc)); + vc_delta = build (MINUS_EXPR, ptrdiff_type_node, + vc_addr, vc_delta); + vc_delta = save_expr (vc_delta); + *vbase_offsets = tree_cons (vc, vc_delta, *vbase_offsets); + } + else + vc_delta = TREE_VALUE (vc_delta); + + old_delta = build_binary_op (PLUS_EXPR, old_delta, vc_delta, 0); + } + + TREE_READONLY (new_delta) = 0; + expand_expr_stmt (build_modify_expr (new_delta, NOP_EXPR, + old_delta)); + } + ++n; + virtuals = TREE_CHAIN (virtuals); + } + } + + /* Fixup upcast offsets for all direct vtables. Patterned after + expand_direct_vtbls_init. */ + static void + fixup_virtual_upcast_offsets (real_binfo, binfo, init_self, can_elide, addr, orig_addr, type, vbase, vbase_offsets) + tree real_binfo, binfo, addr, orig_addr, type, vbase, *vbase_offsets; + int init_self, can_elide; + { + tree real_binfos = BINFO_BASETYPES (real_binfo); + tree binfos = BINFO_BASETYPES (binfo); + int i, n_baselinks = real_binfos ? TREE_VEC_LENGTH (real_binfos) : 0; + + for (i = 0; i < n_baselinks; i++) + { + tree real_base_binfo = TREE_VEC_ELT (real_binfos, i); + tree base_binfo = TREE_VEC_ELT (binfos, i); + int is_not_base_vtable = + i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (real_binfo)); + if (! TREE_VIA_VIRTUAL (real_base_binfo)) + fixup_virtual_upcast_offsets (real_base_binfo, base_binfo, + is_not_base_vtable, can_elide, addr, + orig_addr, type, vbase, vbase_offsets); + } + #if 0 + /* Before turning this on, make sure it is correct. */ + if (can_elide && ! BINFO_MODIFIED (binfo)) + return; + #endif + /* Should we use something besides CLASSTYPE_VFIELDS? */ + if (init_self && CLASSTYPE_VFIELDS (BINFO_TYPE (real_binfo))) + { + addr = convert_pointer_to_real (binfo, addr); + expand_upcast_fixups (real_binfo, addr, orig_addr, vbase, type, vbase_offsets); + } + } + /* Build a COMPOUND_EXPR which when expanded will generate the code needed to initialize all the virtual function table slots of all *************** *** 2495,2499 **** When USE_COMPUTED_OFFSETS is non-zero, we can assume that the ! object was laidout by a top-level contructor and the computed offsets are valid to store vtables. When zero, we must store new vtables through virtual baseclass pointers. --- 2745,2749 ---- When USE_COMPUTED_OFFSETS is non-zero, we can assume that the ! object was laid out by a top-level constructor and the computed offsets are valid to store vtables. When zero, we must store new vtables through virtual baseclass pointers. *************** *** 2511,2514 **** --- 2761,2765 ---- if (TYPE_USES_VIRTUAL_BASECLASSES (type)) { + rtx fixup_insns = NULL_RTX; int old_flag = flag_this_is_variable; tree vbases = CLASSTYPE_VBASECLASSES (type); *************** *** 2521,2527 **** /* This is an object of type IN_TYPE, */ flag_this_is_variable = -2; - dfs_walk (binfo, dfs_find_vbases, unmarked_new_vtablep); } /* Initialized with vtables of type TYPE. */ for (; vbases; vbases = TREE_CHAIN (vbases)) --- 2772,2779 ---- /* This is an object of type IN_TYPE, */ flag_this_is_variable = -2; } + dfs_walk (binfo, dfs_find_vbases, unmarked_new_vtablep); + /* Initialized with vtables of type TYPE. */ for (; vbases; vbases = TREE_CHAIN (vbases)) *************** *** 2561,2564 **** --- 2813,2856 ---- expand_direct_vtbls_init (vbases, TYPE_BINFO (BINFO_TYPE (vbases)), 1, 0, addr); + + /* If we are using computed offsets we can skip fixups. */ + if (use_computed_offsets) + continue; + + /* Now we adjust the offsets for virtual functions that cross + virtual boundaries on an implicit upcast on vf call so that + the layout of the most complete type is used, instead of + assuming the layout of the virtual bases from our current type. */ + + if (flag_vtable_thunks) + { + /* We don't have dynamic thunks yet! So for now, just fail silently. */ + } + else + { + tree vbase_offsets = NULL_TREE; + push_to_sequence (fixup_insns); + fixup_virtual_upcast_offsets (vbases, + TYPE_BINFO (BINFO_TYPE (vbases)), + 1, 0, addr, vbase_decl_ptr, + type, vbases, &vbase_offsets); + fixup_insns = get_insns (); + end_sequence (); + } + } + + if (fixup_insns) + { + extern tree in_charge_identifier; + tree in_charge_node = lookup_name (in_charge_identifier, 0); + if (! in_charge_node) + { + warning ("recoverable internal compiler error, nobody's in charge!"); + in_charge_node = integer_zero_node; + } + in_charge_node = build_binary_op (EQ_EXPR, in_charge_node, integer_zero_node, 1); + expand_start_cond (in_charge_node, 0); + emit_insns (fixup_insns); + expand_end_cond (); } *************** *** 2804,2809 **** : DECL_CONTEXT (value); ! if (context && (context == type ! || TYPE_DERIVES_FROM (context, type))) value = fields; else --- 3096,3107 ---- : DECL_CONTEXT (value); ! if (context == type) ! { ! if (TREE_CODE (value) == TYPE_DECL ! && DECL_ARTIFICIAL (value)) ! value = fields; ! /* else the old value wins */ ! } ! else if (context && TYPE_DERIVES_FROM (context, type)) value = fields; else *************** *** 3213,3215 **** --- 3511,3534 ---- n_outer_fields_searched = 0; n_contexts_saved = 0; + } + + static tree conversions; + static void + add_conversions (binfo) + tree binfo; + { + tree tmp = CLASSTYPE_FIRST_CONVERSION (BINFO_TYPE (binfo)); + for (; tmp && IDENTIFIER_TYPENAME_P (DECL_NAME (tmp)); + tmp = TREE_CHAIN (tmp)) + conversions = tree_cons (DECL_NAME (tmp), TREE_TYPE (TREE_TYPE (tmp)), + conversions); + } + + tree + lookup_conversions (type) + tree type; + { + conversions = NULL_TREE; + dfs_walk (TYPE_BINFO (type), add_conversions, 0); + return conversions; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/sig.c gcc-2.7.0/cp/sig.c *** gcc-2.6.3/cp/sig.c Mon Sep 26 16:13:21 1994 --- gcc-2.7.0/cp/sig.c Thu Jun 15 08:28:38 1995 *************** *** 1,4 **** /* Functions dealing with signatures and signature pointers/references. ! Copyright (C) 1992 Free Software Foundation, Inc. Contributed by Gerald Baumgartner (gb@cs.purdue.edu) --- 1,4 ---- /* Functions dealing with signatures and signature pointers/references. ! Copyright (C) 1992, 1995 Free Software Foundation, Inc. Contributed by Gerald Baumgartner (gb@cs.purdue.edu) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 200,203 **** --- 201,207 ---- DECL_FCONTEXT (CLASSTYPE_VFIELD (t)) = t; TYPE_ALIGN (t) = TYPE_ALIGN (optr_type); + + /* A signature pointer/reference isn't a `real' class. */ + IS_AGGR_TYPE (t) = 0; } *************** *** 237,241 **** saveable_obstack = ambient_saveable_obstack; ! /* Ouput debug information for this type. */ rest_of_type_compilation (t, 1); --- 241,245 ---- saveable_obstack = ambient_saveable_obstack; ! /* Output debug information for this type. */ rest_of_type_compilation (t, 1); *************** *** 648,652 **** variable and just hand back the init expression. ! The declaration processing is done by hand instead of using `finish_decl' so that we can make signature pointers global variables instead of static ones. */ --- 652,656 ---- variable and just hand back the init expression. ! The declaration processing is done by hand instead of using `cp_finish_decl' so that we can make signature pointers global variables instead of static ones. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/spew.c gcc-2.7.0/cp/spew.c *** gcc-2.6.3/cp/spew.c Wed Oct 12 12:43:51 1994 --- gcc-2.7.0/cp/spew.c Thu Jun 15 08:29:02 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 243,246 **** --- 244,248 ---- extern struct obstack *current_obstack, *saveable_obstack; tree got_scope; + tree got_object; int *************** *** 317,321 **** { lastiddecl = trrr; ! if (got_scope) tmp_token.yylval.ttype = DECL_NESTED_TYPENAME (trrr); } --- 319,323 ---- { lastiddecl = trrr; ! if (got_scope || got_object) tmp_token.yylval.ttype = DECL_NESTED_TYPENAME (trrr); } *************** *** 327,330 **** --- 329,337 ---- lastiddecl = NULL_TREE; break; + case NSNAME: + lastiddecl = trrr; + if (got_scope || got_object) + tmp_token.yylval.ttype = trrr; + break; default: my_friendly_abort (101); *************** *** 335,340 **** --- 342,350 ---- got_scope = NULL_TREE; /* and fall through to... */ + case IDENTIFIER_DEFN: case TYPENAME: + case TYPENAME_DEFN: case PTYPENAME: + case PTYPENAME_DEFN: consume_token (); if (looking_for_typename > 0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/tree.c gcc-2.7.0/cp/tree.c *** gcc-2.6.3/cp/tree.c Wed Oct 26 21:15:44 1994 --- gcc-2.7.0/cp/tree.c Thu Jun 15 08:29:28 1995 *************** *** 17,21 **** 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 "config.h" --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 25,28 **** --- 26,30 ---- #include "cp-tree.h" #include "flags.h" + #include "rtl.h" #define CEIL(x,y) (((x) + (y) - 1) / (y)) *************** *** 33,36 **** --- 35,111 ---- int + real_lvalue_p (ref) + tree ref; + { + if (! language_lvalue_valid (ref)) + return 0; + + if (TREE_CODE (TREE_TYPE (ref)) == REFERENCE_TYPE) + return 1; + + if (ref == current_class_decl && flag_this_is_variable <= 0) + return 0; + + switch (TREE_CODE (ref)) + { + /* preincrements and predecrements are valid lvals, provided + what they refer to are valid lvals. */ + case PREINCREMENT_EXPR: + case PREDECREMENT_EXPR: + case COMPONENT_REF: + case SAVE_EXPR: + return real_lvalue_p (TREE_OPERAND (ref, 0)); + + case STRING_CST: + return 1; + + case VAR_DECL: + if (TREE_READONLY (ref) && ! TREE_STATIC (ref) + && DECL_LANG_SPECIFIC (ref) + && DECL_IN_AGGR_P (ref)) + return 0; + case INDIRECT_REF: + case ARRAY_REF: + case PARM_DECL: + case RESULT_DECL: + case ERROR_MARK: + if (TREE_CODE (TREE_TYPE (ref)) != FUNCTION_TYPE + && TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE) + return 1; + break; + + case WITH_CLEANUP_EXPR: + return real_lvalue_p (TREE_OPERAND (ref, 0)); + + /* A currently unresolved scope ref. */ + case SCOPE_REF: + my_friendly_abort (103); + case OFFSET_REF: + if (TREE_CODE (TREE_OPERAND (ref, 1)) == FUNCTION_DECL) + return 1; + return real_lvalue_p (TREE_OPERAND (ref, 0)) + && real_lvalue_p (TREE_OPERAND (ref, 1)); + break; + + case COND_EXPR: + return (real_lvalue_p (TREE_OPERAND (ref, 1)) + && real_lvalue_p (TREE_OPERAND (ref, 2))); + + case MODIFY_EXPR: + return 1; + + case COMPOUND_EXPR: + return real_lvalue_p (TREE_OPERAND (ref, 1)); + + case MAX_EXPR: + case MIN_EXPR: + return (real_lvalue_p (TREE_OPERAND (ref, 0)) + && real_lvalue_p (TREE_OPERAND (ref, 1))); + } + + return 0; + } + + int lvalue_p (ref) tree ref; *************** *** 80,84 **** case CALL_EXPR: ! if (TREE_ADDRESSABLE (TREE_TYPE (ref))) return 1; break; --- 155,159 ---- case CALL_EXPR: ! if (IS_AGGR_TYPE (TREE_TYPE (ref))) return 1; break; *************** *** 103,106 **** --- 178,186 ---- case COMPOUND_EXPR: return lvalue_p (TREE_OPERAND (ref, 1)); + + case MAX_EXPR: + case MIN_EXPR: + return (lvalue_p (TREE_OPERAND (ref, 0)) + && lvalue_p (TREE_OPERAND (ref, 1))); } *************** *** 139,145 **** int with_cleanup_p; { ! tree slot = build (VAR_DECL, type); ! tree rval = build (NEW_EXPR, type, ! TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), slot); TREE_SIDE_EFFECTS (rval) = 1; TREE_ADDRESSABLE (rval) = 1; --- 219,229 ---- int with_cleanup_p; { ! tree slot; ! tree rval; ! ! slot = build (VAR_DECL, type); ! layout_decl (slot, 0); ! rval = build (NEW_EXPR, type, ! TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), slot); TREE_SIDE_EFFECTS (rval) = 1; TREE_ADDRESSABLE (rval) = 1; *************** *** 315,322 **** TYPE_VOLATILE (basetype)); else ! { ! ptype = build_pointer_type (basetype); ! ptype = build_type_variant (ptype, 1, 0); ! } /* The actual arglist for this function includes a "hidden" argument which is "this". Put it into the list of argument types. */ --- 399,404 ---- TYPE_VOLATILE (basetype)); else ! ptype = build_pointer_type (basetype); ! /* The actual arglist for this function includes a "hidden" argument which is "this". Put it into the list of argument types. */ *************** *** 492,495 **** --- 574,578 ---- TREE_VIA_PUBLIC (chain) = TREE_VIA_PUBLIC (base_base_binfo); TREE_VIA_PROTECTED (chain) = TREE_VIA_PROTECTED (base_base_binfo); + BINFO_INHERITANCE_CHAIN (chain) = base_binfo; } /* Now propagate the offset to the base types. */ *************** *** 571,577 **** if (TREE_CODE (TYPE_SIZE (basetype)) == INTEGER_CST) ! const_size += MAX (BITS_PER_UNIT, ! TREE_INT_CST_LOW (TYPE_SIZE (basetype)) ! - TREE_INT_CST_LOW (CLASSTYPE_VBASE_SIZE (basetype))); else if (var_size == 0) var_size = TYPE_SIZE (basetype); --- 654,664 ---- if (TREE_CODE (TYPE_SIZE (basetype)) == INTEGER_CST) ! { ! /* Every virtual baseclass takes a least a UNIT, so that we can ! take it's address and get something different for each base. */ ! const_size += MAX (BITS_PER_UNIT, ! TREE_INT_CST_LOW (TYPE_SIZE (basetype)) ! - TREE_INT_CST_LOW (CLASSTYPE_VBASE_SIZE (basetype))); ! } else if (var_size == 0) var_size = TYPE_SIZE (basetype); *************** *** 582,585 **** --- 669,681 ---- } + if (const_size) + { + /* Because a virtual base might take a single byte above, + we have to re-adjust the total size to make sure it it + a multiple of the alignment. */ + /* Give the whole object the alignment it wants. */ + const_size = CEIL (const_size, record_align) * record_align; + } + /* Set the alignment in the complete type. We don't set CLASSTYPE_ALIGN here, as that is for this class, without any virtual base classes. */ *************** *** 599,602 **** --- 695,700 ---- tree base_binfos = BINFO_BASETYPES (vbase_types); + BINFO_INHERITANCE_CHAIN (vbase_types) = TYPE_BINFO (rec); + if (base_binfos) { *************** *** 619,622 **** --- 717,721 ---- TREE_VIA_PUBLIC (chain) = TREE_VIA_PUBLIC (base_base_binfo); TREE_VIA_PROTECTED (chain) = TREE_VIA_PROTECTED (base_base_binfo); + BINFO_INHERITANCE_CHAIN (chain) = vbase_types; } *************** *** 732,735 **** --- 831,835 ---- DECL_CLASS_CONTEXT (decl) = rec; DECL_FCONTEXT (decl) = basetype; + DECL_SAVED_INSNS (decl) = NULL_RTX; DECL_FIELD_SIZE (decl) = 0; DECL_ALIGN (decl) = TYPE_ALIGN (ptr_type_node); *************** *** 1152,1171 **** } - tree - copy_binfo (list) - tree list; - { - tree binfo = copy_list (list); - tree rval = binfo; - while (binfo) - { - TREE_USED (binfo) = 0; - if (BINFO_BASETYPES (binfo)) - BINFO_BASETYPES (binfo) = copy_node (BINFO_BASETYPES (binfo)); - binfo = TREE_CHAIN (binfo); - } - return rval; - } - /* Return the binfo value for ELEM in TYPE. */ --- 1252,1255 ---- *************** *** 1251,1257 **** if (virtuals != 0) { virtuals = TREE_CHAIN (virtuals); - if (flag_dossier) - virtuals = TREE_CHAIN (virtuals); } i = 1; --- 1335,1340 ---- if (virtuals != 0) { + /* skip the rtti type descriptor entry */ virtuals = TREE_CHAIN (virtuals); } i = 1; *************** *** 1505,1526 **** continue; ! t = raises; ! t2 = TYPE_RAISES_EXCEPTIONS (v); ! while (t && t2) ! { ! if (TREE_TYPE (t) == TREE_TYPE (t2)) ! { ! t = TREE_CHAIN (t); ! t2 = TREE_CHAIN (t2); ! } ! else break; ! } ! if (t || t2) ! continue; ! /* List of exceptions raised matches previously found list. ! ! @@ Nice to free up storage used in consing up the ! @@ list of exceptions raised. */ ! return v; } --- 1588,1598 ---- continue; ! /* @@ This should do set equality, not exact match. */ ! if (simple_cst_list_equal (TYPE_RAISES_EXCEPTIONS (v), raises)) ! /* List of exceptions raised matches previously found list. ! ! @@ Nice to free up storage used in consing up the ! @@ list of exceptions raised. */ ! return v; } *************** *** 1544,1556 **** Assuming T is a node build bottom-up, make it all exist on permanent obstack, if it is not permanent already. */ ! static tree ! make_deep_copy (t) tree t; { enum tree_code code; ! if (t == NULL_TREE || TREE_PERMANENT (t)) return t; switch (code = TREE_CODE (t)) { --- 1616,1634 ---- Assuming T is a node build bottom-up, make it all exist on permanent obstack, if it is not permanent already. */ ! ! tree ! mapcar (t, func) tree t; + tree (*func)(); { enum tree_code code; + tree tmp; ! if (t == NULL_TREE) return t; + if (tmp = func (t), tmp != NULL_TREE) + return tmp; + switch (code = TREE_CODE (t)) { *************** *** 1567,1574 **** tree chain = TREE_CHAIN (t); t = copy_node (t); ! TREE_CHAIN (t) = make_deep_copy (chain); ! TREE_TYPE (t) = make_deep_copy (TREE_TYPE (t)); ! DECL_INITIAL (t) = make_deep_copy (DECL_INITIAL (t)); ! DECL_SIZE (t) = make_deep_copy (DECL_SIZE (t)); return t; } --- 1645,1652 ---- tree chain = TREE_CHAIN (t); t = copy_node (t); ! TREE_CHAIN (t) = mapcar (chain, func); ! TREE_TYPE (t) = mapcar (TREE_TYPE (t), func); ! DECL_INITIAL (t) = mapcar (DECL_INITIAL (t), func); ! DECL_SIZE (t) = mapcar (DECL_SIZE (t), func); return t; } *************** *** 1578,1584 **** tree chain = TREE_CHAIN (t); t = copy_node (t); ! TREE_PURPOSE (t) = make_deep_copy (TREE_PURPOSE (t)); ! TREE_VALUE (t) = make_deep_copy (TREE_VALUE (t)); ! TREE_CHAIN (t) = make_deep_copy (chain); return t; } --- 1656,1662 ---- tree chain = TREE_CHAIN (t); t = copy_node (t); ! TREE_PURPOSE (t) = mapcar (TREE_PURPOSE (t), func); ! TREE_VALUE (t) = mapcar (TREE_VALUE (t), func); ! TREE_CHAIN (t) = mapcar (chain, func); return t; } *************** *** 1590,1594 **** t = copy_node (t); while (len--) ! TREE_VEC_ELT (t, len) = make_deep_copy (TREE_VEC_ELT (t, len)); return t; } --- 1668,1672 ---- t = copy_node (t); while (len--) ! TREE_VEC_ELT (t, len) = mapcar (TREE_VEC_ELT (t, len), func); return t; } *************** *** 1603,1614 **** case NEW_EXPR: t = copy_node (t); ! TREE_OPERAND (t, 0) = make_deep_copy (TREE_OPERAND (t, 0)); ! TREE_OPERAND (t, 1) = make_deep_copy (TREE_OPERAND (t, 1)); ! TREE_OPERAND (t, 2) = make_deep_copy (TREE_OPERAND (t, 2)); return t; case SAVE_EXPR: t = copy_node (t); ! TREE_OPERAND (t, 0) = make_deep_copy (TREE_OPERAND (t, 0)); return t; --- 1681,1692 ---- case NEW_EXPR: t = copy_node (t); ! TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func); ! TREE_OPERAND (t, 1) = mapcar (TREE_OPERAND (t, 1), func); ! TREE_OPERAND (t, 2) = mapcar (TREE_OPERAND (t, 2), func); return t; case SAVE_EXPR: t = copy_node (t); ! TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func); return t; *************** *** 1648,1653 **** case CALL_EXPR: t = copy_node (t); ! TREE_OPERAND (t, 0) = make_deep_copy (TREE_OPERAND (t, 0)); ! TREE_OPERAND (t, 1) = make_deep_copy (TREE_OPERAND (t, 1)); return t; --- 1726,1731 ---- case CALL_EXPR: t = copy_node (t); ! TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func); ! TREE_OPERAND (t, 1) = mapcar (TREE_OPERAND (t, 1), func); return t; *************** *** 1661,1690 **** case COMPONENT_REF: t = copy_node (t); ! TREE_OPERAND (t, 0) = make_deep_copy (TREE_OPERAND (t, 0)); return t; case POINTER_TYPE: ! return build_pointer_type (make_deep_copy (TREE_TYPE (t))); case REFERENCE_TYPE: ! return build_reference_type (make_deep_copy (TREE_TYPE (t))); case FUNCTION_TYPE: ! return build_function_type (make_deep_copy (TREE_TYPE (t)), ! make_deep_copy (TYPE_ARG_TYPES (t))); case ARRAY_TYPE: ! return build_array_type (make_deep_copy (TREE_TYPE (t)), ! make_deep_copy (TYPE_DOMAIN (t))); case OFFSET_TYPE: ! return build_offset_type (make_deep_copy (TYPE_OFFSET_BASETYPE (t)), ! make_deep_copy (TREE_TYPE (t))); case METHOD_TYPE: return build_method_type ! (make_deep_copy (TYPE_METHOD_BASETYPE (t)), build_function_type ! (make_deep_copy (TREE_TYPE (t)), ! make_deep_copy (TREE_CHAIN (TYPE_ARG_TYPES (t))))); case RECORD_TYPE: if (TYPE_PTRMEMFUNC_P (t)) return build_ptrmemfunc_type ! (make_deep_copy (TYPE_PTRMEMFUNC_FN_TYPE (t))); /* else fall through */ --- 1739,1772 ---- case COMPONENT_REF: t = copy_node (t); ! TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func); return t; case POINTER_TYPE: ! return build_pointer_type (mapcar (TREE_TYPE (t), func)); case REFERENCE_TYPE: ! return build_reference_type (mapcar (TREE_TYPE (t), func)); case FUNCTION_TYPE: ! return build_function_type (mapcar (TREE_TYPE (t), func), ! mapcar (TYPE_ARG_TYPES (t), func)); case ARRAY_TYPE: ! return build_array_type (mapcar (TREE_TYPE (t), func), ! mapcar (TYPE_DOMAIN (t), func)); ! case INTEGER_TYPE: ! return build_index_type (mapcar (TYPE_MAX_VALUE (t), func)); ! case OFFSET_TYPE: ! return build_offset_type (mapcar (TYPE_OFFSET_BASETYPE (t), func), ! mapcar (TREE_TYPE (t), func)); case METHOD_TYPE: return build_method_type ! (mapcar (TYPE_METHOD_BASETYPE (t), func), build_function_type ! (mapcar (TREE_TYPE (t), func), ! mapcar (TREE_CHAIN (TYPE_ARG_TYPES (t)), func))); ! case RECORD_TYPE: if (TYPE_PTRMEMFUNC_P (t)) return build_ptrmemfunc_type ! (mapcar (TYPE_PTRMEMFUNC_FN_TYPE (t), func)); /* else fall through */ *************** *** 1702,1705 **** --- 1784,1796 ---- } + static tree + perm_manip (t) + tree t; + { + if (TREE_PERMANENT (t)) + return t; + return NULL_TREE; + } + /* Assuming T is a node built bottom-up, make it all exist on permanent obstack, if it is not permanent already. */ *************** *** 1710,1713 **** --- 1801,1805 ---- register struct obstack *ambient_obstack = current_obstack; register struct obstack *ambient_saveable_obstack = saveable_obstack; + int resume; if (t == NULL_TREE || TREE_PERMANENT (t)) *************** *** 1716,1722 **** saveable_obstack = &permanent_obstack; current_obstack = saveable_obstack; ! t = make_deep_copy (t); current_obstack = ambient_obstack; saveable_obstack = ambient_saveable_obstack; --- 1808,1816 ---- saveable_obstack = &permanent_obstack; current_obstack = saveable_obstack; + resume = suspend_momentary (); ! t = mapcar (t, perm_manip); + resume_momentary (resume); current_obstack = ambient_obstack; saveable_obstack = ambient_saveable_obstack; *************** *** 1788,1790 **** --- 1882,1905 ---- } return sz; + } + + static + tree + bot_manip (t) + tree t; + { + if (TREE_CODE (t) != TREE_LIST && ! TREE_SIDE_EFFECTS (t)) + return t; + else if (TREE_CODE (t) == TARGET_EXPR) + return build_cplus_new (TREE_TYPE (t), + break_out_target_exprs (TREE_OPERAND (t, 1)), 0); + return NULL_TREE; + } + + /* Actually, we'll just clean out the target exprs for the moment. */ + tree + break_out_target_exprs (t) + tree t; + { + return mapcar (t, bot_manip); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/tree.def gcc-2.7.0/cp/tree.def *** gcc-2.6.3/cp/tree.def Fri May 6 05:25:01 1994 --- gcc-2.7.0/cp/tree.def Thu Jun 15 08:30:00 1995 *************** *** 19,23 **** 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. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 102,103 **** --- 103,107 ---- Other kinds of thunks may be defined later. */ DEFTREECODE (THUNK_DECL, "thunk_decl", "d", 0) + + /* A namespace declaration. */ + DEFTREECODE (NAMESPACE_DECL, "namespace_decl", "d", 0) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/typeck.c gcc-2.7.0/cp/typeck.c *** gcc-2.6.3/cp/typeck.c Mon Nov 14 23:33:59 1994 --- gcc-2.7.0/cp/typeck.c Thu Jun 15 08:30:45 1995 *************** *** 1,4 **** /* Build expressions with type checking for C++ compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Build expressions with type checking for C++ compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 38,41 **** --- 39,43 ---- #include "cp-tree.h" #include "flags.h" + #include "output.h" int mark_addressable (); *************** *** 48,53 **** --- 50,57 ---- static tree convert_sequence (); /* static */ tree unary_complex_lvalue (); + static tree get_delta_difference PROTO((tree, tree, int)); extern rtx original_result_rtx; + extern int warn_synth; /* Return the target type of TYPE, which meas return T for: *************** *** 202,208 **** if (TREE_PURPOSE (p1) && !TREE_PURPOSE (p2)) { - /* We used to give a warning here that advised about a default - argument being given in the prototype but not in the function's - declaration. It's best not to bother. */ TREE_PURPOSE (n) = TREE_PURPOSE (p1); any_change = 1; --- 206,209 ---- *************** *** 288,293 **** else { ! /* Pick the longest list, and hang on the other ! list. */ if (list_length (a1) < list_length (a2)) --- 289,294 ---- else { ! /* Pick the longest list, and hang on the other list. */ ! /* ??? For the moment we punt on the issue of attrs with args. */ if (list_length (a1) < list_length (a2)) *************** *** 295,299 **** for (; a2; a2 = TREE_CHAIN (a2)) ! if (!value_member (attributes, a2)) { a1 = copy_node (a2); --- 296,301 ---- for (; a2; a2 = TREE_CHAIN (a2)) ! if (lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (a2)), ! attributes) == NULL_TREE) { a1 = copy_node (a2); *************** *** 352,355 **** --- 354,362 ---- } + if (TYPE_MAIN_VARIANT (t1) == long_double_type_node + || TYPE_MAIN_VARIANT (t2) == long_double_type_node) + return build_type_attribute_variant (long_double_type_node, + attributes); + /* Otherwise prefer the unsigned one. */ *************** *** 367,376 **** So I turned it on again. */ { ! tree target = common_type (TYPE_MAIN_VARIANT (TREE_TYPE (t1)), ! TYPE_MAIN_VARIANT (TREE_TYPE (t2))); int constp = TYPE_READONLY (TREE_TYPE (t1)) || TYPE_READONLY (TREE_TYPE (t2)); int volatilep = TYPE_VOLATILE (TREE_TYPE (t1)) || TYPE_VOLATILE (TREE_TYPE (t2)); target = cp_build_type_variant (target, constp, volatilep); if (code1 == POINTER_TYPE) --- 374,392 ---- So I turned it on again. */ { ! tree tt1 = TYPE_MAIN_VARIANT (TREE_TYPE (t1)); ! tree tt2 = TYPE_MAIN_VARIANT (TREE_TYPE (t2)); int constp = TYPE_READONLY (TREE_TYPE (t1)) || TYPE_READONLY (TREE_TYPE (t2)); int volatilep = TYPE_VOLATILE (TREE_TYPE (t1)) || TYPE_VOLATILE (TREE_TYPE (t2)); + tree target; + + if (tt1 == tt2) + target = tt1; + else if (tt1 == void_type_node || tt2 == void_type_node) + target = void_type_node; + else + target = common_type (tt1, tt2); + target = cp_build_type_variant (target, constp, volatilep); if (code1 == POINTER_TYPE) *************** *** 378,382 **** else t1 = build_reference_type (target); ! return build_type_attribute_variant (t1, attributes); } #if 0 --- 394,403 ---- else t1 = build_reference_type (target); ! t1 = build_type_attribute_variant (t1, attributes); ! ! if (TREE_CODE (target) == METHOD_TYPE) ! t1 = build_ptrmemfunc_type (t1); ! ! return t1; } #if 0 *************** *** 445,461 **** && TYPE_MAIN_VARIANT (t2) == t2, 306); ! if (! binfo_or_else (t1, t2)) ! compiler_error ("common_type called with uncommon aggregate types"); ! return build_type_attribute_variant (t1, attributes); case METHOD_TYPE: ! if (comptypes (TYPE_METHOD_BASETYPE (t1), TYPE_METHOD_BASETYPE (t2), 1) ! && TREE_CODE (TREE_TYPE (t1)) == TREE_CODE (TREE_TYPE (t2))) { /* Get this value the long way, since TYPE_METHOD_BASETYPE is just the main variant of this. */ ! tree basetype = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t1))); tree raises, t3; raises = TYPE_RAISES_EXCEPTIONS (t1); --- 466,496 ---- && TYPE_MAIN_VARIANT (t2) == t2, 306); ! if (DERIVED_FROM_P (t1, t2) && binfo_or_else (t1, t2)) ! return build_type_attribute_variant (t1, attributes); ! else if (binfo_or_else (t2, t1)) ! return build_type_attribute_variant (t2, attributes); ! else ! compiler_error ("common_type called with uncommon aggregate types"); case METHOD_TYPE: ! if (TREE_CODE (TREE_TYPE (t1)) == TREE_CODE (TREE_TYPE (t2))) { /* Get this value the long way, since TYPE_METHOD_BASETYPE is just the main variant of this. */ ! tree basetype; tree raises, t3; + tree b1 = TYPE_OFFSET_BASETYPE (t1); + tree b2 = TYPE_OFFSET_BASETYPE (t2); + + if (DERIVED_FROM_P (b1, b2) && binfo_or_else (b1, b2)) + basetype = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t2))); + else + { + if (binfo_or_else (b2, b1) == NULL_TREE) + compiler_error ("common_type called with uncommon method types"); + basetype = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t1))); + } + raises = TYPE_RAISES_EXCEPTIONS (t1); *************** *** 475,489 **** case OFFSET_TYPE: ! if (TYPE_OFFSET_BASETYPE (t1) == TYPE_OFFSET_BASETYPE (t2) ! && TREE_CODE (TREE_TYPE (t1)) == TREE_CODE (TREE_TYPE (t2))) { ! tree basetype = TYPE_OFFSET_BASETYPE (t1); ! t1 = build_offset_type (basetype, ! common_type (TREE_TYPE (t1), TREE_TYPE (t2))); ! } ! else ! compiler_error ("common_type called with uncommon member types"); ! /* ... falls through ... */ default: --- 510,524 ---- case OFFSET_TYPE: ! if (TREE_TYPE (t1) == TREE_TYPE (t2)) { ! tree b1 = TYPE_OFFSET_BASETYPE (t1); ! tree b2 = TYPE_OFFSET_BASETYPE (t2); ! if (DERIVED_FROM_P (b1, b2) && binfo_or_else (b1, b2)) ! return build_type_attribute_variant (t2, attributes); ! else if (binfo_or_else (b2, b1)) ! return build_type_attribute_variant (t1, attributes); ! } ! compiler_error ("common_type called with uncommon member types"); default: *************** *** 543,547 **** the other is not, compare the target type of the reference to the type that's not a reference (ARM, p308). ! This is used for checking for illegal overloading. 1 : strict (compared according to ANSI C) This is used for checking whether two function decls match. --- 578,582 ---- the other is not, compare the target type of the reference to the type that's not a reference (ARM, p308). ! This is used for checking for invalid overloading. 1 : strict (compared according to ANSI C) This is used for checking whether two function decls match. *************** *** 550,554 **** Otherwise, pointers involving base classes and derived classes ! can be mixed as legal: i.e. a pointer to a base class may be assigned to a pointer to one of its derived classes, as per C++. A pointer to a derived class may be passed as a parameter to a function expecting a --- 585,589 ---- Otherwise, pointers involving base classes and derived classes ! can be mixed as valid: i.e. a pointer to a base class may be assigned to a pointer to one of its derived classes, as per C++. A pointer to a derived class may be passed as a parameter to a function expecting a *************** *** 714,718 **** case UNINSTANTIATED_P_TYPE: ! return UPT_TEMPLATE (t1) == UPT_TEMPLATE (t2); } return attrval == 2 && val == 1 ? 2 : val; --- 749,774 ---- case UNINSTANTIATED_P_TYPE: ! if (UPT_TEMPLATE (t1) != UPT_TEMPLATE (t2)) ! return 0; ! { ! int i = TREE_VEC_LENGTH (UPT_PARMS (t1)); ! tree *p1 = &TREE_VEC_ELT (UPT_PARMS (t1), 0); ! tree *p2 = &TREE_VEC_ELT (UPT_PARMS (t2), 0); ! ! while (i--) ! { ! if (TREE_CODE_CLASS (TREE_CODE (p1[i])) == 't') ! { ! if (! comptypes (p1[i], p2[i], 1)) ! return 0; ! } ! else ! { ! if (simple_cst_equal (p1[i], p2[i]) <= 0) ! return 0; ! } ! } ! } ! return 1; } return attrval == 2 && val == 1 ? 2 : val; *************** *** 741,749 **** if (TREE_CODE (ttr) == POINTER_TYPE) { ! if (TREE_CODE (TREE_TYPE (ttl)) == POINTER_TYPE ! || TREE_CODE (TREE_TYPE (ttl)) == ARRAY_TYPE) ! return comp_ptr_ttypes (TREE_TYPE (ttl), TREE_TYPE (ttr)); ! else ! return comp_target_types (TREE_TYPE (ttl), TREE_TYPE (ttr), nptrs - 1); } --- 797,821 ---- if (TREE_CODE (ttr) == POINTER_TYPE) { ! ttl = TREE_TYPE (ttl); ! ttr = TREE_TYPE (ttr); ! ! if (nptrs > 0) ! { ! if (TREE_CODE (ttl) == VOID_TYPE ! && TREE_CODE (ttr) != FUNCTION_TYPE ! && TREE_CODE (ttr) != METHOD_TYPE ! && TREE_CODE (ttr) != OFFSET_TYPE) ! return 1; ! else if (TREE_CODE (ttr) == VOID_TYPE ! && TREE_CODE (ttl) != FUNCTION_TYPE ! && TREE_CODE (ttl) != METHOD_TYPE ! && TREE_CODE (ttl) != OFFSET_TYPE) ! return -1; ! else if (TREE_CODE (ttl) == POINTER_TYPE ! || TREE_CODE (ttl) == ARRAY_TYPE) ! return comp_ptr_ttypes (ttl, ttr); ! } ! ! return comp_target_types (ttl, ttr, nptrs - 1); } *************** *** 761,767 **** return 1; case 2: ! cp_pedwarn ("converting `%T' to `%T' is a contravariance violation", ! ttr, ttl); ! return 1; default: my_friendly_abort (112); --- 833,837 ---- return 1; case 2: ! return -1; default: my_friendly_abort (112); *************** *** 780,788 **** else if (comptypes (TYPE_OFFSET_BASETYPE (ttl), TYPE_OFFSET_BASETYPE (ttr), 0) && comp_target_types (TREE_TYPE (ttl), TREE_TYPE (ttr), nptrs)) ! { ! cp_pedwarn ("converting `%T' to `%T' is a contravariance violation", ! ttr, ttl); ! return 1; ! } } else if (IS_AGGR_TYPE (ttl)) --- 850,854 ---- else if (comptypes (TYPE_OFFSET_BASETYPE (ttl), TYPE_OFFSET_BASETYPE (ttr), 0) && comp_target_types (TREE_TYPE (ttl), TREE_TYPE (ttr), nptrs)) ! return -1; } else if (IS_AGGR_TYPE (ttl)) *************** *** 790,794 **** if (nptrs < 0) return 0; ! return comptypes (TYPE_POINTER_TO (ttl), TYPE_POINTER_TO (ttr), 0); } --- 856,864 ---- if (nptrs < 0) return 0; ! if (comptypes (TYPE_POINTER_TO (ttl), TYPE_POINTER_TO (ttr), 0)) ! return 1; ! if (comptypes (TYPE_POINTER_TO (ttr), TYPE_POINTER_TO (ttl), 0)) ! return -1; ! return 0; } *************** *** 1223,1227 **** /* Convert in case a char is more than one unit. */ t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), ! size_int (TYPE_PRECISION (char_type_node))); force_fit_type (t, 0); return t; --- 1293,1297 ---- /* Convert in case a char is more than one unit. */ t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), ! size_int (TYPE_PRECISION (char_type_node))); force_fit_type (t, 0); return t; *************** *** 1269,1273 **** tree ! default_conversion (exp) tree exp; { --- 1339,1343 ---- tree ! decay_conversion (exp) tree exp; { *************** *** 1278,1282 **** { if (TREE_CODE (exp) == OFFSET_REF) ! return default_conversion (resolve_offset_ref (exp)); type = TREE_TYPE (type); --- 1348,1352 ---- { if (TREE_CODE (exp) == OFFSET_REF) ! return decay_conversion (resolve_offset_ref (exp)); type = TREE_TYPE (type); *************** *** 1295,1299 **** exp = DECL_INITIAL (exp); /* Replace a nonvolatile const static variable with its value. */ ! else if (TREE_READONLY_DECL_P (exp) && DECL_MODE (exp) != BLKmode) { exp = decl_constant_value (exp); --- 1365,1369 ---- exp = DECL_INITIAL (exp); /* Replace a nonvolatile const static variable with its value. */ ! else if (TREE_READONLY_DECL_P (exp)) { exp = decl_constant_value (exp); *************** *** 1304,1316 **** Leave such NOP_EXPRs, since RHS is being used in non-lvalue context. */ - if (INTEGRAL_CODE_P (code)) - { - tree t = type_promotes_to (type); - if (t != type) - return convert (t, exp); - } - if (flag_traditional - && TYPE_MAIN_VARIANT (type) == float_type_node) - return convert (double_type_node, exp); if (code == VOID_TYPE) { --- 1374,1377 ---- *************** *** 1356,1360 **** if (TREE_CODE (exp) == COMPOUND_EXPR) { ! tree op1 = default_conversion (TREE_OPERAND (exp, 1)); return build (COMPOUND_EXPR, TREE_TYPE (op1), TREE_OPERAND (exp, 0), op1); --- 1417,1421 ---- if (TREE_CODE (exp) == COMPOUND_EXPR) { ! tree op1 = decay_conversion (TREE_OPERAND (exp, 1)); return build (COMPOUND_EXPR, TREE_TYPE (op1), TREE_OPERAND (exp, 0), op1); *************** *** 1402,1405 **** --- 1463,1492 ---- return convert (ptrtype, adr); } + + return exp; + } + + tree + default_conversion (exp) + tree exp; + { + tree type; + enum tree_code code; + + exp = decay_conversion (exp); + + type = TREE_TYPE (exp); + code = TREE_CODE (type); + + if (INTEGRAL_CODE_P (code)) + { + tree t = type_promotes_to (type); + if (t != type) + return convert (t, exp); + } + if (flag_traditional + && TYPE_MAIN_VARIANT (type) == float_type_node) + return convert (double_type_node, exp); + return exp; } *************** *** 1656,1659 **** --- 1743,1747 ---- fndecl = build_vfn_ref (&addr, datum, DECL_VINDEX (fndecl)); } + assemble_external (fndecl); return fndecl; } *************** *** 1665,1669 **** } else ! return build (COMPONENT_REF, unknown_type_node, datum, fndecls); } --- 1753,1769 ---- } else ! { ! /* Just act like build_offset_ref, since the object does ! not matter unless we're actually calling the function. */ ! tree t; ! ! for (t = TREE_VALUE (fndecls); t; t = DECL_CHAIN (t)) ! assemble_external (t); ! ! t = build_tree_list (error_mark_node, fndecls); ! TREE_TYPE (t) = build_offset_type (basetype, ! unknown_type_node); ! return t; ! } } *************** *** 1742,1751 **** char *errorstring; { ! register tree pointer = default_conversion (ptr); register tree type = TREE_TYPE (pointer); ! if (ptr == current_class_decl) return C_C_D; if (TREE_CODE (type) == POINTER_TYPE || TREE_CODE (type) == REFERENCE_TYPE) { --- 1842,1859 ---- char *errorstring; { ! register tree pointer = (TREE_CODE (TREE_TYPE (ptr)) == REFERENCE_TYPE ? ! ptr : default_conversion (ptr)); register tree type = TREE_TYPE (pointer); ! if (ptr == current_class_decl && C_C_D) return C_C_D; + ptr = build_expr_type_conversion (WANT_POINTER, pointer, 1); + if (ptr) + { + pointer = ptr; + type = TREE_TYPE (pointer); + } + if (TREE_CODE (type) == POINTER_TYPE || TREE_CODE (type) == REFERENCE_TYPE) { *************** *** 1824,1847 **** itype = TREE_TYPE (idx); - /* We must check here for the reference, so we can do the possible - conversions immediately afterwards. */ - if (TREE_CODE (itype) == REFERENCE_TYPE) - { - idx = convert_from_reference (idx); - itype = TREE_TYPE (idx); - } - - if (IS_AGGR_TYPE (itype)) - { - if (TYPE_HAS_INT_CONVERSION (itype)) - idx = build_type_conversion (CONVERT_EXPR, - integer_type_node, idx, 1); - else - { - error_with_aggr_type (itype, - "type `%s' requires integer conversion for array indexing"); - return error_mark_node; - } - } if (TREE_CODE (TREE_TYPE (array)) == ARRAY_TYPE --- 1932,1935 ---- *************** *** 1892,1902 **** } - /* Note in C++ we don't bother warning about subscripting a - `register' array, since it's legal in C++ to take the address - of something with that storage specification. */ if (pedantic && !lvalue_p (array)) pedwarn ("ANSI C++ forbids subscripting non-lvalue array"); ! if (pedantic) { tree foo = array; --- 1980,1990 ---- } if (pedantic && !lvalue_p (array)) pedwarn ("ANSI C++ forbids subscripting non-lvalue array"); ! /* Note in C++ it is valid to subscript a `register' array, since ! it is valid to take the address of something with that ! storage specification. */ ! if (extra_warnings) { tree foo = array; *************** *** 1904,1908 **** foo = TREE_OPERAND (foo, 0); if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo)) ! pedwarn ("ANSI C++ forbids subscripting non-lvalue array"); } --- 1992,1996 ---- foo = TREE_OPERAND (foo, 0); if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo)) ! warning ("subscripting array declared `register'"); } *************** *** 2112,2116 **** decl_addr = build_unary_op (ADDR_EXPR, decl, 0); ! function = get_member_function_from_ptrfunc (&decl_addr, decl, TREE_OPERAND (function, 1)); params = tree_cons (NULL_TREE, decl_addr, params); --- 2200,2204 ---- decl_addr = build_unary_op (ADDR_EXPR, decl, 0); ! function = get_member_function_from_ptrfunc (&decl_addr, TREE_OPERAND (function, 1)); params = tree_cons (NULL_TREE, decl_addr, params); *************** *** 2163,2167 **** } else ! decl = build_c_cast (ctypeptr, decl); params = tree_cons (NULL_TREE, decl, params); } --- 2251,2255 ---- } else ! decl = build_c_cast (ctypeptr, decl, 0); params = tree_cons (NULL_TREE, decl, params); } *************** *** 2174,2180 **** tree ! get_member_function_from_ptrfunc (instance_ptrptr, instance, function) tree *instance_ptrptr; - tree instance; tree function; { --- 2262,2267 ---- tree ! get_member_function_from_ptrfunc (instance_ptrptr, function) tree *instance_ptrptr; tree function; { *************** *** 2187,2196 **** { tree fntype = TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (function)); ! tree index = save_expr (convert (integer_type_node, ! build_component_ref (function, ! index_identifier, ! 0, 0))); ! tree e1 = build (GT_EXPR, integer_type_node, index, integer_zero_node); ! tree delta = build_component_ref (function, delta_identifier, 0, 0); tree delta2 = DELTA2_FROM_PTRMEMFUNC (function); tree e2; --- 2274,2284 ---- { tree fntype = TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (function)); ! tree index = save_expr (build_component_ref (function, ! index_identifier, ! 0, 0)); ! tree e1 = build (GT_EXPR, boolean_type_node, index, ! convert (delta_type_node, integer_zero_node)); ! tree delta = convert (ptrdiff_type_node, ! build_component_ref (function, delta_identifier, 0, 0)); tree delta2 = DELTA2_FROM_PTRMEMFUNC (function); tree e2; *************** *** 2198,2204 **** tree aref, vtbl; /* convert down to the right base, before using the instance. */ ! instance = convert_pointer_to_real (TYPE_METHOD_BASETYPE (TREE_TYPE (fntype)), ! build_unary_op (ADDR_EXPR, instance, 0)); if (instance == error_mark_node) return instance; --- 2286,2299 ---- tree aref, vtbl; + tree instance; + tree instance_ptr = *instance_ptrptr; + + if (TREE_SIDE_EFFECTS (instance_ptr)) + instance_ptr = save_expr (instance_ptr); + /* convert down to the right base, before using the instance. */ ! instance ! = convert_pointer_to_real (TYPE_METHOD_BASETYPE (TREE_TYPE (fntype)), ! instance_ptr); if (instance == error_mark_node) return instance; *************** *** 2208,2216 **** = build (PLUS_EXPR, build_pointer_type (build_pointer_type (vtable_entry_type)), ! vtbl, convert (sizetype, delta2)); vtbl = build_indirect_ref (vtbl, NULL_PTR); ! aref = build_array_ref (vtbl, size_binop (MINUS_EXPR, ! index, ! integer_one_node)); if (! flag_vtable_thunks) { --- 2303,2311 ---- = build (PLUS_EXPR, build_pointer_type (build_pointer_type (vtable_entry_type)), ! vtbl, convert (ptrdiff_type_node, delta2)); vtbl = build_indirect_ref (vtbl, NULL_PTR); ! aref = build_array_ref (vtbl, build_binary_op (MINUS_EXPR, ! index, ! integer_one_node, 1)); if (! flag_vtable_thunks) { *************** *** 2222,2233 **** TREE_OPERAND (aref, 0) = save_expr (TREE_OPERAND (aref, 0)); ! delta = build (PLUS_EXPR, integer_type_node, ! build_conditional_expr (e1, build_component_ref (aref, delta_identifier, 0, 0), integer_zero_node), ! delta); } ! *instance_ptrptr = build (PLUS_EXPR, TREE_TYPE (*instance_ptrptr), ! *instance_ptrptr, ! convert (integer_type_node, delta)); if (flag_vtable_thunks) e2 = aref; --- 2317,2327 ---- TREE_OPERAND (aref, 0) = save_expr (TREE_OPERAND (aref, 0)); ! delta = build_binary_op (PLUS_EXPR, ! build_conditional_expr (e1, build_component_ref (aref, delta_identifier, 0, 0), integer_zero_node), ! delta, 1); } ! *instance_ptrptr = build (PLUS_EXPR, TREE_TYPE (instance_ptr), ! instance_ptr, delta); if (flag_vtable_thunks) e2 = aref; *************** *** 2238,2241 **** --- 2332,2341 ---- TREE_TYPE (e2) = TREE_TYPE (e3); function = build_conditional_expr (e1, e2, e3); + + /* Make sure this doesn't get evaluated first inside one of the + branches of the COND_EXPR. */ + if (TREE_CODE (instance_ptr) == SAVE_EXPR) + function = build (COMPOUND_EXPR, TREE_TYPE (function), + instance_ptr, function); } return function; *************** *** 2280,2283 **** --- 2380,2389 ---- } + if (pedantic && DECL_THIS_INLINE (function) && ! DECL_INITIAL (function) + && ! DECL_ARTIFICIAL (function) + && ! DECL_PENDING_INLINE_INFO (function)) + cp_pedwarn ("inline function `%#D' called before definition", + function); + /* Differs from default_conversion by not setting TREE_ADDRESSABLE (because calling an inline function does not mean the function *************** *** 2286,2289 **** --- 2392,2402 ---- if (DECL_INLINE (function)) { + /* Is it a synthesized method that needs to be synthesized? */ + if (DECL_ARTIFICIAL (function) && ! flag_no_inline + && ! DECL_INITIAL (function) + /* Kludge: don't synthesize for default args. */ + && current_function_decl) + synthesize_method (function); + fntype = build_type_variant (TREE_TYPE (function), TREE_READONLY (function), *************** *** 2314,2318 **** tree instance_ptr = build_unary_op (ADDR_EXPR, C_C_D, 0); fntype = TYPE_PTRMEMFUNC_FN_TYPE (fntype); ! function = get_member_function_from_ptrfunc (&instance_ptr, C_C_D, function); } --- 2427,2431 ---- tree instance_ptr = build_unary_op (ADDR_EXPR, C_C_D, 0); fntype = TYPE_PTRMEMFUNC_FN_TYPE (fntype); ! function = get_member_function_from_ptrfunc (&instance_ptr, function); } *************** *** 2324,2328 **** || is_method)) { ! error ("called object is not a function"); return error_mark_node; } --- 2437,2441 ---- || is_method)) { ! cp_error ("`%E' cannot be used as a function", function); return error_mark_node; } *************** *** 2341,2344 **** --- 2454,2463 ---- params, fndecl, 0); + if (coerced_params == error_mark_node) + if (flags & LOOKUP_SPECULATIVELY) + return NULL_TREE; + else + return error_mark_node; + /* Check for errors in format strings. */ *************** *** 2371,2381 **** TREE_SIDE_EFFECTS (result) = 1; ! /* Remove this sometime. */ ! TREE_RAISES (result) |= !! TYPE_RAISES_EXCEPTIONS (fntype); if (! require_complete) ! return result; if (value_type == void_type_node) return result; ! return require_complete_type (result); } } --- 2490,2500 ---- TREE_SIDE_EFFECTS (result) = 1; ! if (! require_complete) ! return convert_from_reference (result); if (value_type == void_type_node) return result; ! result = require_complete_type (result); ! return convert_from_reference (result); } } *************** *** 2428,2432 **** register tree result = NULL_TREE; char *called_thing; - int maybe_raises = 0; int i = 0; --- 2547,2550 ---- *************** *** 2455,2458 **** --- 2573,2579 ---- register tree val = TREE_VALUE (valtail); + if (val == error_mark_node) + return error_mark_node; + if (type == void_type_node) { *************** *** 2540,2546 **** if (val == error_mark_node) ! continue; ! ! maybe_raises |= TREE_RAISES (val); if (type != 0) --- 2661,2665 ---- if (val == error_mark_node) ! return error_mark_node; if (type != 0) *************** *** 2575,2578 **** --- 2694,2701 ---- #endif } + + if (parmval == error_mark_node) + return error_mark_node; + result = tree_cons (NULL_TREE, parmval, result); } *************** *** 2588,2593 **** result = tree_cons (NULL_TREE, convert (double_type_node, val), result); else if (TYPE_LANG_SPECIFIC (TREE_TYPE (val)) ! && (TYPE_HAS_INIT_REF (TREE_TYPE (val)) ! || TYPE_HAS_ASSIGN_REF (TREE_TYPE (val)))) { cp_warning ("cannot pass objects of type `%T' through `...'", --- 2711,2715 ---- result = tree_cons (NULL_TREE, convert (double_type_node, val), result); else if (TYPE_LANG_SPECIFIC (TREE_TYPE (val)) ! && ! TYPE_HAS_TRIVIAL_INIT_REF (TREE_TYPE (val))) { cp_warning ("cannot pass objects of type `%T' through `...'", *************** *** 2623,2627 **** { tree type = TREE_VALUE (typetail); ! tree val = TREE_PURPOSE (typetail); tree parmval; --- 2745,2749 ---- { tree type = TREE_VALUE (typetail); ! tree val = break_out_target_exprs (TREE_PURPOSE (typetail)); tree parmval; *************** *** 2649,2653 **** #endif } ! maybe_raises |= TREE_RAISES (parmval); if (flag_gc --- 2771,2777 ---- #endif } ! ! if (parmval == error_mark_node) ! return error_mark_node; if (flag_gc *************** *** 2677,2682 **** } } - if (result) - TREE_RAISES (result) = maybe_raises; return nreverse (result); --- 2801,2804 ---- *************** *** 2707,2711 **** int convert_p; { - tree type1, type2; tree args[2]; --- 2829,2832 ---- *************** *** 2715,2767 **** if (convert_p) { ! args[0] = default_conversion (args[0]); ! args[1] = default_conversion (args[1]); if (type_unknown_p (args[0])) { ! args[0] = instantiate_type (TREE_TYPE (args[1]), args[0], 1); ! args[0] = default_conversion (args[0]); } else if (type_unknown_p (args[1])) { ! args[1] = require_instantiated_type (TREE_TYPE (args[0]), ! args[1], error_mark_node); ! args[1] = default_conversion (args[1]); } ! type1 = TREE_TYPE (args[0]); ! type2 = TREE_TYPE (args[1]); ! ! if (IS_AGGR_TYPE_2 (type1, type2) && ! TYPE_PTRMEMFUNC_P (type1)) { /* Try to convert this to something reasonable. */ if (! build_default_binary_type_conversion(code, &args[0], &args[1])) - return error_mark_node; - } - else if ((IS_AGGR_TYPE (type1) && ! TYPE_PTRMEMFUNC_P (type1)) - || (IS_AGGR_TYPE (type2) && ! TYPE_PTRMEMFUNC_P (type2))) - { - int convert_index = IS_AGGR_TYPE (type2); - /* Avoid being tripped up by things like (ARG1 != 0). */ - tree types[2], try; - - types[0] = type1; types[1] = type2; - if (code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR) - try = build_type_conversion (code, bool_type_node, - args[convert_index], 1); - else - { - try = build_type_conversion (code, types[convert_index ^ 1], - args[convert_index], 1); - - if (try == 0 - && args[1] == integer_zero_node - && (code == NE_EXPR || code == EQ_EXPR)) - try = build_type_conversion (code, ptr_type_node, - args[convert_index], 1); - } - - if (try == 0) { cp_error ("no match for `%O(%#T, %#T)'", code, --- 2836,2866 ---- if (convert_p) { ! tree args_save [2]; ! tree type0, type1; ! args[0] = decay_conversion (args[0]); ! args[1] = decay_conversion (args[1]); ! ! if (args[0] == error_mark_node || args[1] == error_mark_node) ! return error_mark_node; ! ! type0 = TREE_TYPE (args[0]); ! type1 = TREE_TYPE (args[1]); if (type_unknown_p (args[0])) { ! args[0] = instantiate_type (type1, args[0], 1); ! args[0] = decay_conversion (args[0]); } else if (type_unknown_p (args[1])) { ! args[1] = require_instantiated_type (type0, args[1], error_mark_node); ! args[1] = decay_conversion (args[1]); } ! if (IS_AGGR_TYPE (type0) || IS_AGGR_TYPE (type1)) { /* Try to convert this to something reasonable. */ if (! build_default_binary_type_conversion(code, &args[0], &args[1])) { cp_error ("no match for `%O(%#T, %#T)'", code, *************** *** 2769,2775 **** return error_mark_node; } - if (try == error_mark_node) - error ("ambiguous pointer conversion"); - args[convert_index] = try; } } --- 2868,2871 ---- *************** *** 2822,2827 **** int converted = 0; /* Nonzero means after finally constructing the expression ! give it this type. Otherwise, give it type RESULT_TYPE. */ tree final_type = 0; --- 2918,2927 ---- int converted = 0; + /* Nonzero means create the expression with this type, rather than + RESULT_TYPE. */ + tree build_type = 0; + /* Nonzero means after finally constructing the expression ! convert it to this type. */ tree final_type = 0; *************** *** 2847,2852 **** /* Apply default conversions. */ ! op0 = default_conversion (orig_op0); ! op1 = default_conversion (orig_op1); type0 = TREE_TYPE (op0); --- 2947,2962 ---- /* Apply default conversions. */ ! if (code == TRUTH_AND_EXPR || code == TRUTH_ANDIF_EXPR ! || code == TRUTH_OR_EXPR || code == TRUTH_ORIF_EXPR ! || code == TRUTH_XOR_EXPR) ! { ! op0 = decay_conversion (orig_op0); ! op1 = decay_conversion (orig_op1); ! } ! else ! { ! op0 = default_conversion (orig_op0); ! op1 = default_conversion (orig_op1); ! } type0 = TREE_TYPE (op0); *************** *** 2914,2918 **** else /* When dividing two signed integers, we have to promote to int. ! unless we divide by a conatant != -1. Note that default conversion will have been performed on the operands at this point, so we have to dig out the original type to find out if --- 3024,3028 ---- else /* When dividing two signed integers, we have to promote to int. ! unless we divide by a constant != -1. Note that default conversion will have been performed on the operands at this point, so we have to dig out the original type to find out if *************** *** 2984,2991 **** case TRUTH_AND_EXPR: case TRUTH_OR_EXPR: ! result_type = bool_type_node; ! op0 = bool_truthvalue_conversion (op0); ! op1 = bool_truthvalue_conversion (op1); ! converted = 1; break; --- 3094,3098 ---- case TRUTH_AND_EXPR: case TRUTH_OR_EXPR: ! result_type = boolean_type_node; break; *************** *** 3068,3073 **** case EQ_EXPR: case NE_EXPR: ! result_type = bool_type_node; ! converted = 1; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) --- 3175,3179 ---- case EQ_EXPR: case NE_EXPR: ! build_type = boolean_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) *************** *** 3077,3107 **** register tree tt0 = TYPE_MAIN_VARIANT (TREE_TYPE (type0)); register tree tt1 = TYPE_MAIN_VARIANT (TREE_TYPE (type1)); ! /* Anything compares with void *. void * compares with anything. ! Otherwise, the targets must be the same. */ ! if (tt0 != tt1 && TREE_CODE (tt0) == RECORD_TYPE ! && TREE_CODE (tt1) == RECORD_TYPE) ! { ! tree base = common_base_type (tt0, tt1); ! if (base == NULL_TREE) ! cp_warning ("comparison of distinct object pointer types `%T' and `%T'", type0, type1); ! else if (base == error_mark_node) ! { ! cp_error ("comparison of pointer types `%T' and `%T' requires conversion to ambiguous supertype", type0, type1); ! return error_mark_node; ! } ! else ! { ! if (integer_zerop (op0)) ! op0 = null_pointer_node; ! else ! op0 = convert_pointer_to (base, op0); ! if (integer_zerop (op1)) ! op1 = null_pointer_node; ! else ! op1 = convert_pointer_to (base, op1); ! } ! } ! else if (comp_target_types (type0, type1, 1)) ! ; else if (tt0 == void_type_node) { --- 3183,3189 ---- register tree tt0 = TYPE_MAIN_VARIANT (TREE_TYPE (type0)); register tree tt1 = TYPE_MAIN_VARIANT (TREE_TYPE (type1)); ! ! if (comp_target_types (type0, type1, 1)) ! result_type = common_type (type0, type1); else if (tt0 == void_type_node) { *************** *** 3109,3112 **** --- 3191,3196 ---- && tree_int_cst_lt (TYPE_SIZE (type0), TYPE_SIZE (type1))) pedwarn ("ANSI C++ forbids comparison of `void *' with function pointer"); + else if (TREE_CODE (tt1) == OFFSET_TYPE) + pedwarn ("ANSI C++ forbids conversion of a pointer to member to `void *'"); } else if (tt1 == void_type_node) *************** *** 3116,3143 **** pedwarn ("ANSI C++ forbids comparison of `void *' with function pointer"); } - else if ((TYPE_SIZE (tt0) != 0) != (TYPE_SIZE (tt1) != 0)) - cp_pedwarn ("comparison of %scomplete and %scomplete pointers `%T' and `%T'", - TYPE_SIZE (tt0) == 0 ? "in" : "", - TYPE_SIZE (tt1) == 0 ? "in" : "", - type0, type1); else cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast", type0, type1); } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) ! op1 = null_pointer_node; else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST && integer_zerop (op0)) ! op0 = null_pointer_node; else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { error ("ANSI C++ forbids comparison between pointer and integer"); - op1 = convert (TREE_TYPE (op0), op1); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { error ("ANSI C++ forbids comparison between pointer and integer"); - op0 = convert (TREE_TYPE (op1), op0); } else if (TYPE_PTRMEMFUNC_P (type0) && TREE_CODE (op1) == INTEGER_CST --- 3200,3225 ---- pedwarn ("ANSI C++ forbids comparison of `void *' with function pointer"); } else cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast", type0, type1); + + if (result_type == NULL_TREE) + result_type = ptr_type_node; } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) ! result_type = type0; else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST && integer_zerop (op0)) ! result_type = type1; else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { + result_type = type0; error ("ANSI C++ forbids comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { + result_type = type1; error ("ANSI C++ forbids comparison between pointer and integer"); } else if (TYPE_PTRMEMFUNC_P (type0) && TREE_CODE (op1) == INTEGER_CST *************** *** 3146,3149 **** --- 3228,3232 ---- op0 = build_component_ref (op0, index_identifier, 0, 0); op1 = integer_zero_node; + result_type = TREE_TYPE (op0); } else if (TYPE_PTRMEMFUNC_P (type1) && TREE_CODE (op0) == INTEGER_CST *************** *** 3152,3155 **** --- 3235,3239 ---- op0 = build_component_ref (op1, index_identifier, 0, 0); op1 = integer_zero_node; + result_type = TREE_TYPE (op0); } else if (TYPE_PTRMEMFUNC_P (type0) && TYPE_PTRMEMFUNC_P (type1) *************** *** 3171,3175 **** tree e1, e2, e3; tree integer_neg_one_node ! = size_binop (MINUS_EXPR, integer_zero_node, integer_one_node); e1 = build_binary_op (EQ_EXPR, index0, index1, 1); e2 = build_binary_op (NE_EXPR, index1, integer_neg_one_node, 1); --- 3255,3259 ---- tree e1, e2, e3; tree integer_neg_one_node ! = build_binary_op (MINUS_EXPR, integer_zero_node, integer_one_node, 1); e1 = build_binary_op (EQ_EXPR, index0, index1, 1); e2 = build_binary_op (NE_EXPR, index1, integer_neg_one_node, 1); *************** *** 3192,3196 **** tree e1, e2, e3; tree integer_neg_one_node ! = size_binop (MINUS_EXPR, integer_zero_node, integer_one_node); if (TREE_CODE (TREE_OPERAND (op1, 0)) == FUNCTION_DECL && DECL_VINDEX (TREE_OPERAND (op1, 0))) --- 3276,3280 ---- tree e1, e2, e3; tree integer_neg_one_node ! = build_binary_op (MINUS_EXPR, integer_zero_node, integer_one_node, 1); if (TREE_CODE (TREE_OPERAND (op1, 0)) == FUNCTION_DECL && DECL_VINDEX (TREE_OPERAND (op1, 0))) *************** *** 3227,3234 **** return build_binary_op (code, op1, op0, 1); } - else - /* If args are not valid, clear out RESULT_TYPE - to cause an error message later. */ - result_type = 0; break; --- 3311,3314 ---- *************** *** 3240,3256 **** else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (! comp_target_types (type0, type1, 1)) ! cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast", ! type0, type1); ! else if ((TYPE_SIZE (TREE_TYPE (type0)) != 0) ! != (TYPE_SIZE (TREE_TYPE (type1)) != 0)) ! cp_pedwarn ("comparison of %scomplete and %scomplete pointers", ! TYPE_SIZE (TREE_TYPE (type0)) == 0 ? "in" : "", ! TYPE_SIZE (TREE_TYPE (type1)) == 0 ? "in" : "", ! type0, type1); ! else if (pedantic ! && TREE_CODE (TREE_TYPE (type0)) == FUNCTION_TYPE) ! pedwarn ("ANSI C++ forbids ordered comparisons of pointers to functions"); ! result_type = common_type (type0, type1); } break; --- 3320,3331 ---- else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1, 1)) ! result_type = common_type (type0, type1); ! else ! { ! cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast", ! type0, type1); ! result_type = ptr_type_node; ! } } break; *************** *** 3260,3264 **** case LT_EXPR: case GT_EXPR: ! result_type = bool_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) --- 3335,3339 ---- case LT_EXPR: case GT_EXPR: ! build_type = boolean_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) *************** *** 3266,3315 **** else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (! comp_target_types (type0, type1, 1)) ! cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast", ! type0, type1); ! else if ((TYPE_SIZE (TREE_TYPE (type0)) != 0) ! != (TYPE_SIZE (TREE_TYPE (type1)) != 0)) ! cp_pedwarn ("comparison of %scomplete and %scomplete pointers", ! TYPE_SIZE (TREE_TYPE (type0)) == 0 ? "in" : "", ! TYPE_SIZE (TREE_TYPE (type1)) == 0 ? "in" : "", ! type0, type1); ! else if (pedantic ! && TREE_CODE (TREE_TYPE (type0)) == FUNCTION_TYPE) ! pedwarn ("ANSI C++ forbids ordered comparisons of pointers to functions"); } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) ! { ! op1 = null_pointer_node; ! if (pedantic) ! pedwarn ("ordered comparison of pointer with integer zero"); ! } else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST && integer_zerop (op0)) ! { ! op0 = null_pointer_node; ! if (pedantic) ! pedwarn ("ANSI C++ forbids ordered comparison of pointer with integer zero"); ! } else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { if (pedantic) pedwarn ("ANSI C++ forbids comparison between pointer and integer"); else if (! flag_traditional) warning ("comparison between pointer and integer"); - op1 = convert (TREE_TYPE (op0), op1); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { if (pedantic) pedwarn ("ANSI C++ forbids comparison between pointer and integer"); else if (! flag_traditional) warning ("comparison between pointer and integer"); - op0 = convert (TREE_TYPE (op1), op0); } - else - result_type = 0; - converted = 1; break; } --- 3341,3375 ---- else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { ! if (comp_target_types (type0, type1, 1)) ! result_type = common_type (type0, type1); ! else ! { ! cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast", ! type0, type1); ! result_type = ptr_type_node; ! } } else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) ! result_type = type0; else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST && integer_zerop (op0)) ! result_type = type1; else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { + result_type = type0; if (pedantic) pedwarn ("ANSI C++ forbids comparison between pointer and integer"); else if (! flag_traditional) warning ("comparison between pointer and integer"); } else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) { + result_type = type1; if (pedantic) pedwarn ("ANSI C++ forbids comparison between pointer and integer"); else if (! flag_traditional) warning ("comparison between pointer and integer"); } break; } *************** *** 3405,3408 **** --- 3465,3472 ---- if (TYPE_PRECISION (TREE_TYPE (arg0)) < TYPE_PRECISION (result_type) + /* We can shorten only if the shift count is less than the + number of bits in the smaller type size. */ + && TREE_INT_CST_HIGH (op1) == 0 + && TYPE_PRECISION (TREE_TYPE (arg0)) > TREE_INT_CST_LOW (op1) /* If arg is sign-extended and then unsigned-shifted, we can simulate this with a signed shift in arg's type *************** *** 3442,3447 **** = shorten_compare (&xop0, &xop1, &xresult_type, &xresultcode); if (val != 0) ! return convert (bool_type_node, val); ! op0 = xop0, op1 = xop1, result_type = bool_type_node; resultcode = xresultcode; } --- 3506,3512 ---- = shorten_compare (&xop0, &xop1, &xresult_type, &xresultcode); if (val != 0) ! return convert (boolean_type_node, val); ! op0 = xop0, op1 = xop1; ! converted = 1; resultcode = xresultcode; } *************** *** 3449,3465 **** if (short_compare && extra_warnings) { int unsignedp0, unsignedp1; tree primop0 = get_narrower (op0, &unsignedp0); tree primop1 = get_narrower (op1, &unsignedp1); ! /* Warn if signed and unsigned are being compared in a size larger ! than their original size, as this will always fail. */ ! ! if (unsignedp0 != unsignedp1 ! && (TYPE_PRECISION (TREE_TYPE (primop0)) ! < TYPE_PRECISION (result_type)) ! && (TYPE_PRECISION (TREE_TYPE (primop1)) ! < TYPE_PRECISION (result_type))) ! warning ("comparison between promoted unsigned and signed"); /* Warn if two unsigned values are being compared in a size --- 3514,3556 ---- if (short_compare && extra_warnings) { + int op0_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op0)); + int op1_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op1)); + int unsignedp0, unsignedp1; tree primop0 = get_narrower (op0, &unsignedp0); tree primop1 = get_narrower (op1, &unsignedp1); ! /* Give warnings for comparisons between signed and unsigned ! quantities that may fail. */ ! /* Do the checking based on the original operand trees, so that ! casts will be considered, but default promotions won't be. */ ! ! /* Do not warn if the comparison is being done in a signed type, ! since the signed type will only be chosen if it can represent ! all the values of the unsigned type. */ ! if (! TREE_UNSIGNED (result_type)) ! /* OK */; ! /* Do not warn if both operands are unsigned. */ ! else if (op0_signed == op1_signed) ! /* OK */; ! /* Do not warn if the signed quantity is an unsuffixed ! integer literal (or some static constant expression ! involving such literals) and it is non-negative. */ ! else if ((op0_signed && TREE_CODE (orig_op0) == INTEGER_CST ! && tree_int_cst_sgn (orig_op0) >= 0) ! || (op1_signed && TREE_CODE (orig_op1) == INTEGER_CST ! && tree_int_cst_sgn (orig_op1) >= 0)) ! /* OK */; ! /* Do not warn if the comparison is an equality operation, ! the unsigned quantity is an integral constant and it does ! not use the most significant bit of result_type. */ ! else if ((resultcode == EQ_EXPR || resultcode == NE_EXPR) ! && ((op0_signed && TREE_CODE (orig_op1) == INTEGER_CST ! && int_fits_type_p (orig_op1, signed_type (result_type)) ! || (op1_signed && TREE_CODE (orig_op0) == INTEGER_CST ! && int_fits_type_p (orig_op0, signed_type (result_type)))))) ! /* OK */; ! else ! warning ("comparison between signed and unsigned"); /* Warn if two unsigned values are being compared in a size *************** *** 3471,3476 **** extended. */ ! else if (TREE_CODE (primop0) == BIT_NOT_EXPR ! ^ TREE_CODE (primop1) == BIT_NOT_EXPR) { if (TREE_CODE (primop0) == BIT_NOT_EXPR) --- 3562,3567 ---- extended. */ ! if (TREE_CODE (primop0) == BIT_NOT_EXPR ! ^ TREE_CODE (primop1) == BIT_NOT_EXPR) { if (TREE_CODE (primop0) == BIT_NOT_EXPR) *************** *** 3527,3531 **** if (!result_type) { ! binary_op_error (error_code); return error_mark_node; } --- 3618,3623 ---- if (!result_type) { ! cp_error ("invalid operands `%T' and `%T' to binary `%O'", ! TREE_TYPE (orig_op0), TREE_TYPE (orig_op1), error_code); return error_mark_node; } *************** *** 3539,3544 **** } { ! register tree result = build (resultcode, result_type, op0, op1); register tree folded; --- 3631,3639 ---- } + if (build_type == NULL_TREE) + build_type = result_type; + { ! register tree result = build (resultcode, build_type, op0, op1); register tree folded; *************** *** 3732,3736 **** else /* This conversion is harmless. */ ! rval = convert_force (argtype, rval); if (! integer_zerop (DECL_FIELD_BITPOS (field))) --- 3827,3831 ---- else /* This conversion is harmless. */ ! rval = convert_force (argtype, rval, 0); if (! integer_zerop (DECL_FIELD_BITPOS (field))) *************** *** 3757,3762 **** /* & rec, on incomplete RECORD_TYPEs is the simple opr &, not an error message. */ ! if (code != ADDR_EXPR || TREE_CODE (TREE_TYPE (xarg)) != RECORD_TYPE ! || TYPE_SIZE (TREE_TYPE (xarg))) { tree rval = build_opfncall (code, LOOKUP_SPECULATIVELY, xarg, --- 3852,3861 ---- /* & rec, on incomplete RECORD_TYPEs is the simple opr &, not an error message. */ ! if (code == ADDR_EXPR ! && ((IS_AGGR_TYPE_CODE (TREE_CODE (TREE_TYPE (xarg))) ! && TYPE_SIZE (TREE_TYPE (xarg)) == NULL_TREE) ! || (TREE_CODE (xarg) == OFFSET_REF))) ! /* don't look for a function */; ! else { tree rval = build_opfncall (code, LOOKUP_SPECULATIVELY, xarg, *************** *** 3769,3783 **** } ! /* Just like truthvalue_conversion, but we want a BOOLEAN_TYPE */ tree ! bool_truthvalue_conversion (expr) tree expr; { ! /* We really want to preform the optimizations in truthvalue_conversion ! but, not this way. */ ! /* expr = truthvalue_conversion (expr); */ ! return convert (bool_type_node, expr); } ! /* C++: Must handle pointers to members. --- 3868,3882 ---- } ! /* Just like truthvalue_conversion, but we want a CLEANUP_POINT_EXPR. */ ! tree ! condition_conversion (expr) tree expr; { ! tree t = convert (boolean_type_node, expr); ! t = fold (build1 (CLEANUP_POINT_EXPR, boolean_type_node, t)); ! return t; } ! /* C++: Must handle pointers to members. *************** *** 3797,3819 **** register tree arg = xarg; register tree argtype = 0; - register enum tree_code typecode = TREE_CODE (TREE_TYPE (arg)); char *errstring = NULL; tree val; - int isaggrtype; ! if (typecode == ERROR_MARK) return error_mark_node; - if (typecode == REFERENCE_TYPE && code != ADDR_EXPR && ! noconvert) - { - arg = convert_from_reference (arg); - typecode = TREE_CODE (TREE_TYPE (arg)); - } - - if (typecode == ENUMERAL_TYPE) - typecode = INTEGER_TYPE; - - isaggrtype = IS_AGGR_TYPE_CODE (typecode); - switch (code) { --- 3896,3905 ---- register tree arg = xarg; register tree argtype = 0; char *errstring = NULL; tree val; ! if (arg == error_mark_node) return error_mark_node; switch (code) { *************** *** 3822,3848 **** is enough to prevent anybody from looking inside for associativity, but won't generate any code. */ ! if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE)) ! errstring = "wrong type argument to unary plus"; ! else if (!noconvert) ! arg = default_conversion (arg); ! break; ! ! case NEGATE_EXPR: ! if (isaggrtype) { if (!noconvert) ! arg = default_conversion (arg); ! else ! { ! cp_error ("type conversion for type `%T' not allowed", ! TREE_TYPE (arg)); ! return error_mark_node; ! } ! typecode = TREE_CODE (TREE_TYPE (arg)); ! noconvert = 1; } ! if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE)) ! errstring = "wrong type argument to unary minus"; else if (!noconvert) arg = default_conversion (arg); --- 3908,3925 ---- is enough to prevent anybody from looking inside for associativity, but won't generate any code. */ ! if (!(arg = build_expr_type_conversion ! (WANT_ARITH | WANT_ENUM | WANT_POINTER, arg, 1))) ! errstring = "wrong type argument to unary plus"; ! else { if (!noconvert) ! arg = default_conversion (arg); ! arg = build1 (NON_LVALUE_EXPR, TREE_TYPE (arg), arg); } + break; ! case NEGATE_EXPR: ! if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, 1))) ! errstring = "wrong type argument to unary minus"; else if (!noconvert) arg = default_conversion (arg); *************** *** 3850,3869 **** case BIT_NOT_EXPR: ! if (isaggrtype) ! { ! if (!noconvert) ! arg = default_conversion (arg); ! else ! { ! cp_error ("type conversion for type `%T' not allowed", ! TREE_TYPE (arg)); ! return error_mark_node; ! } ! typecode = TREE_CODE (TREE_TYPE (arg)); ! noconvert = 1; ! } ! ! if (typecode != INTEGER_TYPE) ! errstring = "wrong type argument to bit-complement"; else if (!noconvert) arg = default_conversion (arg); --- 3927,3932 ---- case BIT_NOT_EXPR: ! if (!(arg = build_expr_type_conversion (WANT_INT | WANT_ENUM, arg, 1))) ! errstring = "wrong type argument to bit-complement"; else if (!noconvert) arg = default_conversion (arg); *************** *** 3871,3890 **** case ABS_EXPR: ! if (isaggrtype) ! { ! if (!noconvert) ! arg = default_conversion (arg); ! else ! { ! cp_error ("type conversion for type `%T' not allowed", ! TREE_TYPE (arg)); ! return error_mark_node; ! } ! typecode = TREE_CODE (TREE_TYPE (arg)); ! noconvert = 1; ! } ! ! if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE)) ! errstring = "wrong type argument to abs"; else if (!noconvert) arg = default_conversion (arg); --- 3934,3939 ---- case ABS_EXPR: ! if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, 1))) ! errstring = "wrong type argument to abs"; else if (!noconvert) arg = default_conversion (arg); *************** *** 3892,3896 **** case TRUTH_NOT_EXPR: ! arg = bool_truthvalue_conversion (arg); val = invert_truthvalue (arg); if (arg != error_mark_node) --- 3941,3945 ---- case TRUTH_NOT_EXPR: ! arg = convert (boolean_type_node, arg); val = invert_truthvalue (arg); if (arg != error_mark_node) *************** *** 3915,3927 **** /* Report invalid types. */ ! if (isaggrtype) { - arg = default_conversion (arg); - typecode = TREE_CODE (TREE_TYPE (arg)); - } - - if (typecode != POINTER_TYPE - && typecode != INTEGER_TYPE && typecode != REAL_TYPE) - { if (code == PREINCREMENT_EXPR) errstring ="no pre-increment operator for type"; --- 3964,3970 ---- /* Report invalid types. */ ! if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_POINTER, ! arg, 1))) { if (code == PREINCREMENT_EXPR) errstring ="no pre-increment operator for type"; *************** *** 3959,3963 **** /* Compute the increment. */ ! if (typecode == POINTER_TYPE) { enum tree_code tmp = TREE_CODE (TREE_TYPE (argtype)); --- 4002,4006 ---- /* Compute the increment. */ ! if (TREE_CODE (argtype) == POINTER_TYPE) { enum tree_code tmp = TREE_CODE (TREE_TYPE (argtype)); *************** *** 4010,4016 **** } - if (TREE_CODE (arg) == OFFSET_REF) - arg = resolve_offset_ref (arg); - /* Complain about anything else that is not a true lvalue. */ if (!lvalue_or_else (arg, ((code == PREINCREMENT_EXPR --- 4053,4056 ---- *************** *** 4019,4023 **** return error_mark_node; ! val = build (code, TREE_TYPE (arg), arg, inc); TREE_SIDE_EFFECTS (val) = 1; return convert (result_type, val); --- 4059,4093 ---- return error_mark_node; ! /* Forbid using -- on `bool'. */ ! if (TREE_TYPE (arg) == boolean_type_node) ! { ! if (code == POSTDECREMENT_EXPR || code == PREDECREMENT_EXPR) ! { ! cp_error ("invalid use of `--' on bool variable `%D'", arg); ! return error_mark_node; ! } ! #if 0 ! /* This will only work if someone can convince Kenner to accept ! my patch to expand_increment. (jason) */ ! val = build (code, TREE_TYPE (arg), arg, inc); ! #else ! if (code == POSTINCREMENT_EXPR) ! { ! arg = stabilize_reference (arg); ! val = build (MODIFY_EXPR, TREE_TYPE (arg), arg, ! boolean_true_node); ! TREE_SIDE_EFFECTS (val) = 1; ! arg = save_expr (arg); ! val = build (COMPOUND_EXPR, TREE_TYPE (arg), val, arg); ! val = build (COMPOUND_EXPR, TREE_TYPE (arg), arg, val); ! } ! else ! val = build (MODIFY_EXPR, TREE_TYPE (arg), arg, ! boolean_true_node); ! #endif ! } ! else ! val = build (code, TREE_TYPE (arg), arg, inc); ! TREE_SIDE_EFFECTS (val) = 1; return convert (result_type, val); *************** *** 4028,4032 **** regardless of NOCONVERT. */ ! if (typecode == REFERENCE_TYPE) { arg = build1 (CONVERT_EXPR, build_pointer_type (TREE_TYPE (TREE_TYPE (arg))), arg); --- 4098,4103 ---- regardless of NOCONVERT. */ ! argtype = TREE_TYPE (arg); ! if (TREE_CODE (argtype) == REFERENCE_TYPE) { arg = build1 (CONVERT_EXPR, build_pointer_type (TREE_TYPE (TREE_TYPE (arg))), arg); *************** *** 4079,4091 **** } - /* For &(++foo), we are really taking the address of the variable - being acted upon by the increment/decrement operator. ARM $5.3.1 - However, according to ARM $5.2.5, we don't allow postfix ++ and - --, since the prefix operators return lvalues, but the postfix - operators do not. */ - if (TREE_CODE (arg) == PREINCREMENT_EXPR - || TREE_CODE (arg) == PREDECREMENT_EXPR) - arg = TREE_OPERAND (arg, 0); - /* Uninstantiated types are all functions. Taking the address of a function is a no-op, so just return the --- 4150,4153 ---- *************** *** 4141,4151 **** /* Anything not already handled and not a true memory reference is an error. */ ! else if (typecode != FUNCTION_TYPE ! && typecode != METHOD_TYPE && !lvalue_or_else (arg, "unary `&'")) return error_mark_node; /* Ordinary case; arg is a COMPONENT_REF or a decl. */ - argtype = TREE_TYPE (arg); /* If the lvalue is const or volatile, merge that into the type that the address will point to. */ --- 4203,4212 ---- /* Anything not already handled and not a true memory reference is an error. */ ! else if (TREE_CODE (argtype) != FUNCTION_TYPE ! && TREE_CODE (argtype) != METHOD_TYPE && !lvalue_or_else (arg, "unary `&'")) return error_mark_node; /* Ordinary case; arg is a COMPONENT_REF or a decl. */ /* If the lvalue is const or volatile, merge that into the type that the address will point to. */ *************** *** 4242,4246 **** return rationalize_conditional_expr (code, arg); ! if (TREE_CODE (arg) == MODIFY_EXPR) return unary_complex_lvalue (code, build (COMPOUND_EXPR, TREE_TYPE (TREE_OPERAND (arg, 0)), --- 4303,4309 ---- return rationalize_conditional_expr (code, arg); ! if (TREE_CODE (arg) == MODIFY_EXPR ! || TREE_CODE (arg) == PREINCREMENT_EXPR ! || TREE_CODE (arg) == PREDECREMENT_EXPR) return unary_complex_lvalue (code, build (COMPOUND_EXPR, TREE_TYPE (TREE_OPERAND (arg, 0)), *************** *** 4289,4315 **** else { - /* Can't build a pointer to member if the member must - go through virtual base classes. */ - if (virtual_member (DECL_FIELD_CONTEXT (t), - CLASSTYPE_VBASECLASSES (TREE_TYPE (TREE_OPERAND (arg, 0))))) - { - sorry ("pointer to member via virtual baseclass"); - return error_mark_node; - } - if (TREE_OPERAND (arg, 0) && (TREE_CODE (TREE_OPERAND (arg, 0)) != NOP_EXPR || TREE_OPERAND (TREE_OPERAND (arg, 0), 0) != error_mark_node)) ! { ! /* Don't know if this should return address to just ! _DECL, or actual address resolved in this expression. */ ! sorry ("address of bound pointer-to-member expression"); ! return error_mark_node; ! } ! return convert (build_pointer_type (TREE_TYPE (arg)), ! size_binop (EASY_DIV_EXPR, ! DECL_FIELD_BITPOS (t), ! size_int (BITS_PER_UNIT))); } } --- 4352,4374 ---- else { if (TREE_OPERAND (arg, 0) && (TREE_CODE (TREE_OPERAND (arg, 0)) != NOP_EXPR || TREE_OPERAND (TREE_OPERAND (arg, 0), 0) != error_mark_node)) ! if (TREE_CODE (t) != FIELD_DECL) ! { ! /* Don't know if this should return address to just ! _DECL, or actual address resolved in this expression. */ ! sorry ("address of bound pointer-to-member expression"); ! return error_mark_node; ! } ! offset = get_delta_difference (DECL_FIELD_CONTEXT (t), ! TREE_TYPE (TREE_OPERAND (arg, 0)), ! 0); ! offset = size_binop (PLUS_EXPR, offset, ! size_binop (EASY_DIV_EXPR, ! DECL_FIELD_BITPOS (t), ! size_int (BITS_PER_UNIT))); ! return convert (build_pointer_type (TREE_TYPE (arg)), offset); } } *************** *** 4445,4449 **** The second may be non-zero in the case of a template function. */ x = DECL_MAIN_VARIANT (x); ! if ((DECL_INLINE (x) || DECL_PENDING_INLINE_INFO (x)) && (DECL_CONTEXT (x) == NULL_TREE || TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (x))) != 't' --- 4504,4508 ---- The second may be non-zero in the case of a template function. */ x = DECL_MAIN_VARIANT (x); ! if ((DECL_THIS_INLINE (x) || DECL_PENDING_INLINE_INFO (x)) && (DECL_CONTEXT (x) == NULL_TREE || TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (x))) != 't' *************** *** 4501,4505 **** } ! ifexp = bool_truthvalue_conversion (default_conversion (ifexp)); if (TREE_CODE (ifexp) == ERROR_MARK) --- 4560,4564 ---- } ! ifexp = truthvalue_conversion (ifexp); if (TREE_CODE (ifexp) == ERROR_MARK) *************** *** 4581,4592 **** if (code2 == ENUMERAL_TYPE) { ! message_2_types (error, "enumeral mismatch in conditional expression: `%s' vs `%s'", type1, type2); return error_mark_node; } ! else if (extra_warnings && ! IS_AGGR_TYPE_CODE (code2)) warning ("enumeral and non-enumeral type in conditional expression"); } else if (extra_warnings ! && code2 == ENUMERAL_TYPE && ! IS_AGGR_TYPE_CODE (code1)) warning ("enumeral and non-enumeral type in conditional expression"); --- 4640,4653 ---- if (code2 == ENUMERAL_TYPE) { ! cp_error ("enumeral mismatch in conditional expression: `%T' vs `%T'", type1, type2); return error_mark_node; } ! else if (extra_warnings && ! IS_AGGR_TYPE_CODE (code2) ! && type2 != type_promotes_to (type1)) warning ("enumeral and non-enumeral type in conditional expression"); } else if (extra_warnings ! && code2 == ENUMERAL_TYPE && ! IS_AGGR_TYPE_CODE (code1) ! && type1 != type_promotes_to (type2)) warning ("enumeral and non-enumeral type in conditional expression"); *************** *** 4595,4598 **** --- 4656,4661 ---- op1 = default_conversion (op1); type1 = TREE_TYPE (op1); + if (TYPE_PTRMEMFUNC_P (type1)) + type1 = TYPE_PTRMEMFUNC_FN_TYPE (type1); code1 = TREE_CODE (type1); } *************** *** 4601,4610 **** op2 = default_conversion (op2); type2 = TREE_TYPE (op2); code2 = TREE_CODE (type2); } /* Quickly detect the usual case where op1 and op2 have the same type after promotion. */ ! if (TYPE_MAIN_VARIANT (type1) == TYPE_MAIN_VARIANT (type2)) { if (type1 == type2) --- 4664,4687 ---- op2 = default_conversion (op2); type2 = TREE_TYPE (op2); + if (TYPE_PTRMEMFUNC_P (type2)) + type2 = TYPE_PTRMEMFUNC_FN_TYPE (type2); code2 = TREE_CODE (type2); } + if (code1 == RECORD_TYPE && code2 == RECORD_TYPE + && real_lvalue_p (op1) && real_lvalue_p (op2) + && comptypes (type1, type2, -1)) + { + type1 = build_reference_type (type1); + type2 = build_reference_type (type2); + result_type = common_type (type1, type2); + op1 = convert_to_reference (result_type, op1, CONV_IMPLICIT, + LOOKUP_NORMAL, NULL_TREE); + op2 = convert_to_reference (result_type, op2, CONV_IMPLICIT, + LOOKUP_NORMAL, NULL_TREE); + } /* Quickly detect the usual case where op1 and op2 have the same type after promotion. */ ! else if (TYPE_MAIN_VARIANT (type1) == TYPE_MAIN_VARIANT (type2)) { if (type1 == type2) *************** *** 4714,4718 **** if (code1 == RECORD_TYPE && code2 == RECORD_TYPE) { ! message_2_types (error, "aggregate mismatch in conditional expression: `%s' vs `%s'", type1, type2); return error_mark_node; } --- 4791,4795 ---- if (code1 == RECORD_TYPE && code2 == RECORD_TYPE) { ! cp_error ("aggregate mismatch in conditional expression: `%T' vs `%T'", type1, type2); return error_mark_node; } *************** *** 4752,4755 **** --- 4829,4836 ---- } + if (TREE_CODE (result_type) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (result_type)) == METHOD_TYPE) + result_type = build_ptrmemfunc_type (result_type); + if (result_type != TREE_TYPE (op1)) op1 = convert_and_check (result_type, op1); *************** *** 4797,4801 **** return integer_zerop (ifexp) ? op2 : op1; ! return fold (build (COND_EXPR, result_type, ifexp, op1, op2)); } --- 4878,4883 ---- return integer_zerop (ifexp) ? op2 : op1; ! return convert_from_reference ! (fold (build (COND_EXPR, result_type, ifexp, op1, op2))); } *************** *** 4816,4819 **** --- 4898,4917 ---- if (result) return build_x_compound_expr (tree_cons (NULL_TREE, result, TREE_CHAIN (rest))); + + if (! TREE_SIDE_EFFECTS (TREE_VALUE (list))) + { + /* the left-hand operand of a comma expression is like an expression + statement: we should warn if it doesn't have any side-effects, + unless it was explicitly cast to (void). */ + if ((extra_warnings || warn_unused) + && !(TREE_CODE (TREE_VALUE(list)) == CONVERT_EXPR + && TREE_TYPE (TREE_VALUE(list)) == void_type_node)) + warning("left-hand operand of comma expression has no effect"); + } + #if 0 /* this requires a gcc backend patch to export warn_if_unused_value */ + else if (warn_unused) + warn_if_unused_value (TREE_VALUE(list)); + #endif + return build_compound_expr (tree_cons (NULL_TREE, TREE_VALUE (list), build_tree_list (NULL_TREE, build_x_compound_expr (rest)))); *************** *** 4849,4854 **** rest = build_compound_expr (TREE_CHAIN (list)); ! /* When pedantic, a compound expression can be neither an lvalue ! nor an integer constant expression. */ if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)) && ! pedantic) return rest; --- 4947,4951 ---- rest = build_compound_expr (TREE_CHAIN (list)); ! /* When pedantic, a compound expression cannot be a constant expression. */ if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)) && ! pedantic) return rest; *************** *** 4858,4865 **** } tree build_static_cast (type, expr) tree type, expr; { ! return build_c_cast (type, expr); } --- 4955,4972 ---- } + #ifdef __GNUC__ + __inline + #endif + int + null_ptr_cst_p (t) + tree t; + { + return (TREE_CODE (t) == INTEGER_CST && integer_zerop (t)); + } + tree build_static_cast (type, expr) tree type, expr; { ! return build_c_cast (type, expr, 0); } *************** *** 4867,4871 **** tree type, expr; { ! return build_c_cast (type, expr); } --- 4974,5011 ---- tree type, expr; { ! tree intype = TREE_TYPE (expr); ! ! if (TYPE_PTRMEMFUNC_P (type)) ! type = TYPE_PTRMEMFUNC_FN_TYPE (type); ! if (TYPE_PTRMEMFUNC_P (intype)) ! intype = TYPE_PTRMEMFUNC_FN_TYPE (intype); ! ! if (! POINTER_TYPE_P (type) && ! TREE_CODE (type) == INTEGER_TYPE) ! { ! cp_error ("reinterpret_cast cannot convert to type `%T'", type); ! return error_mark_node; ! } ! if (! POINTER_TYPE_P (intype) && ! TREE_CODE (intype) == INTEGER_TYPE) ! { ! cp_error ("reinterpret_cast cannot convert from type `%T'", type); ! return error_mark_node; ! } ! if (TREE_CODE (type) == INTEGER_TYPE && TREE_CODE (intype) != POINTER_TYPE) ! { ! cp_error ("reinterpret_cast cannot convert non-pointer type `%T' to `%T'", ! intype, type); ! return error_mark_node; ! } ! if (TREE_CODE (intype) == INTEGER_TYPE && TREE_CODE (type) != POINTER_TYPE) ! { ! cp_error ("reinterpret_cast cannot convert `%T' to non-pointer type `%T'", ! intype, type); ! return error_mark_node; ! } ! ! if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (intype) == POINTER_TYPE) ! expr = convert (ptr_type_node, expr); ! ! return build_c_cast (type, expr, 0); } *************** *** 4873,4885 **** tree type, expr; { ! return build_c_cast (type, expr); } ! /* Build an expression representing a cast to type TYPE of expression EXPR. */ tree ! build_c_cast (type, expr) register tree type; tree expr; { register tree value = expr; --- 5013,5088 ---- tree type, expr; { ! tree intype = TREE_TYPE (expr); ! tree t1, t2; ! ! if (TYPE_PTRMEMFUNC_P (type)) ! type = TYPE_PTRMEMFUNC_FN_TYPE (type); ! if (TYPE_PTRMEMFUNC_P (intype)) ! intype = TYPE_PTRMEMFUNC_FN_TYPE (intype); ! ! if (! POINTER_TYPE_P (type)) ! { ! cp_error ("const_cast cannot convert to non-pointer type `%T'", type); ! return error_mark_node; ! } ! if (TREE_CODE (type) == REFERENCE_TYPE && ! real_lvalue_p (expr)) ! { ! cp_error ("const_cast cannot convert rvalue to type `%T'", type); ! return error_mark_node; ! } ! if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (intype) != POINTER_TYPE) ! { ! cp_error ("const_cast cannot convert non-pointer type `%T' to type `%T'", ! intype, type); ! return error_mark_node; ! } ! ! if (TREE_CODE (type) == REFERENCE_TYPE) ! { ! t1 = TREE_TYPE (type); ! t2 = intype; ! } ! else ! { ! t1 = TREE_TYPE (type); ! t2 = TREE_TYPE (intype); ! ! for (; TREE_CODE (t1) == POINTER_TYPE && TREE_CODE (t2) == POINTER_TYPE; ! t1 = TREE_TYPE (t1), t2 = TREE_TYPE (t2)) ! ; ! } ! ! if (TREE_CODE (t1) == OFFSET_TYPE && TREE_CODE (t2) == OFFSET_TYPE) ! { ! if (TYPE_OFFSET_BASETYPE (t1) != TYPE_OFFSET_BASETYPE (t2)) ! { ! cp_error ("const_cast cannot convert between pointers to members of different types `%T' and `%T'", ! TYPE_OFFSET_BASETYPE (t2), TYPE_OFFSET_BASETYPE (t1)); ! return error_mark_node; ! } ! t1 = TREE_TYPE (t1); ! t2 = TREE_TYPE (t2); ! } ! ! if (TYPE_MAIN_VARIANT (t1) != TYPE_MAIN_VARIANT (t2)) ! { ! cp_error ("const_cast cannot convert unrelated type `%T' to `%T'", ! t2, t1); ! return error_mark_node; ! } ! ! return build_c_cast (type, expr, 0); } ! /* Build an expression representing a cast to type TYPE of expression EXPR. ! ! ALLOW_NONCONVERTING is true if we should allow non-converting constructors ! when doing the cast. */ tree ! build_c_cast (type, expr, allow_nonconverting) register tree type; tree expr; + int allow_nonconverting; { register tree value = expr; *************** *** 4889,4894 **** /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue. ! Strip such NOP_EXPRs, since VALUE is being used in non-lvalue context. */ ! if (TREE_CODE (value) == NOP_EXPR && TREE_TYPE (value) == TREE_TYPE (TREE_OPERAND (value, 0))) value = TREE_OPERAND (value, 0); --- 5092,5098 ---- /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue. ! Strip such NOP_EXPRs if VALUE is being used in non-lvalue context. */ ! if (TREE_CODE (type) != REFERENCE_TYPE ! && TREE_CODE (value) == NOP_EXPR && TREE_TYPE (value) == TREE_TYPE (TREE_OPERAND (value, 0))) value = TREE_OPERAND (value, 0); *************** *** 4948,4952 **** else { ! tree otype, ovalue; /* Convert functions and arrays to pointers and --- 5152,5157 ---- else { ! tree otype; ! int flag; /* Convert functions and arrays to pointers and *************** *** 5000,5014 **** #endif ! if (TREE_READONLY_DECL_P (value)) ! value = decl_constant_value (value); ! ! ovalue = value; ! value = convert_force (type, value); ! /* Ignore any integer overflow caused by the cast. */ ! if (TREE_CODE (value) == INTEGER_CST) { ! TREE_OVERFLOW (value) = TREE_OVERFLOW (ovalue); ! TREE_CONSTANT_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (ovalue); } } --- 5205,5230 ---- #endif ! flag = allow_nonconverting ? CONV_NONCONVERTING : 0; ! if (TREE_CODE (type) == REFERENCE_TYPE) ! value = (convert_from_reference ! (convert_to_reference (type, value, CONV_OLD_CONVERT|flag, ! LOOKUP_COMPLAIN, NULL_TREE))); ! else { ! tree ovalue; ! ! if (TREE_READONLY_DECL_P (value)) ! value = decl_constant_value (value); ! ! ovalue = value; ! value = convert_force (type, value, flag); ! ! /* Ignore any integer overflow caused by the cast. */ ! if (TREE_CODE (value) == INTEGER_CST) ! { ! TREE_OVERFLOW (value) = TREE_OVERFLOW (ovalue); ! TREE_CONSTANT_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (ovalue); ! } } } *************** *** 5023,5031 **** && TREE_CODE (expr) == INTEGER_CST && TREE_CODE (TREE_TYPE (expr)) != INTEGER_TYPE)) ! { ! tree nvalue = build1 (NOP_EXPR, type, value); ! TREE_CONSTANT (nvalue) = TREE_CONSTANT (value); ! return nvalue; ! } return value; --- 5239,5243 ---- && TREE_CODE (expr) == INTEGER_CST && TREE_CODE (TREE_TYPE (expr)) != INTEGER_TYPE)) ! value = non_lvalue (value); return value; *************** *** 5308,5311 **** --- 5520,5543 ---- } + tree + expand_target_expr (t) + tree t; + { + tree xval = make_node (RTL_EXPR); + rtx rtxval; + + do_pending_stack_adjust (); + start_sequence_for_rtl_expr (xval); + emit_note (0, -1); + rtxval = expand_expr (t, NULL, VOIDmode, 0); + do_pending_stack_adjust (); + TREE_SIDE_EFFECTS (xval) = 1; + RTL_EXPR_SEQUENCE (xval) = get_insns (); + end_sequence (); + RTL_EXPR_RTL (xval) = rtxval; + TREE_TYPE (xval) = TREE_TYPE (t); + return xval; + } + /* Build an assignment expression of lvalue LHS from value RHS. MODIFYCODE is the code for a binary operator that we use *************** *** 5436,5440 **** if (modifycode == INIT_EXPR) { ! if (TYPE_LANG_SPECIFIC (lhstype) && TYPE_HAS_CONSTRUCTOR (lhstype)) { result = build_method_call (lhs, constructor_name_full (lhstype), --- 5668,5679 ---- if (modifycode == INIT_EXPR) { ! if (! IS_AGGR_TYPE (lhstype)) ! /* Do the default thing */; ! else if (! TYPE_HAS_CONSTRUCTOR (lhstype)) ! cp_error ("`%T' has no constructors", lhstype); ! else if (TYPE_HAS_TRIVIAL_INIT_REF (lhstype) ! && TYPE_MAIN_VARIANT (lhstype) == TYPE_MAIN_VARIANT (TREE_TYPE (newrhs))) ! /* Do the default thing */; ! else { result = build_method_call (lhs, constructor_name_full (lhstype), *************** *** 5450,5454 **** #if 1 /* `operator=' is not an inheritable operator. */ ! if (TYPE_LANG_SPECIFIC (lhstype) && TYPE_HAS_ASSIGNMENT (lhstype)) { result = build_opfncall (MODIFY_EXPR, LOOKUP_NORMAL, --- 5689,5707 ---- #if 1 /* `operator=' is not an inheritable operator. */ ! if (! IS_AGGR_TYPE (lhstype)) ! /* Do the default thing */; ! else if (! TYPE_HAS_ASSIGNMENT (lhstype)) ! cp_error ("`%T' does not define operator=", lhstype); ! else if (TYPE_HAS_TRIVIAL_ASSIGN_REF (lhstype) ! && TYPE_MAIN_VARIANT (lhstype) == TYPE_MAIN_VARIANT (TREE_TYPE (newrhs))) ! { ! if (warn_synth) ! /* If we care about this, do overload resolution. */ ! build_opfncall (MODIFY_EXPR, LOOKUP_NORMAL, ! lhs, rhs, make_node (NOP_EXPR)); ! ! /* Do the default thing */; ! } ! else { result = build_opfncall (MODIFY_EXPR, LOOKUP_NORMAL, *************** *** 5514,5518 **** } else ! return error_mark_node; } else --- 5767,5775 ---- } else ! { ! cp_error ("no match for `%O(%#T, %#T)'", modifycode, ! TREE_TYPE (lhs), TREE_TYPE (rhs)); ! return error_mark_node; ! } } else *************** *** 5609,5613 **** if (flag_this_is_variable > 0 && DECL_NAME (current_function_decl) != NULL_TREE ! && current_class_name != DECL_NAME (current_function_decl)) warning ("assignment to `this' not in constructor or destructor"); current_function_just_assigned_this = 1; --- 5866,5871 ---- if (flag_this_is_variable > 0 && DECL_NAME (current_function_decl) != NULL_TREE ! && (DECL_NAME (current_function_decl) ! != constructor_name (current_class_type))) warning ("assignment to `this' not in constructor or destructor"); current_function_just_assigned_this = 1; *************** *** 5656,5659 **** --- 5914,5919 ---- newrhs = stabilize_reference (newrhs); + #if 0 + /* This is now done by generating X(X&) and operator=(X&). */ /* C++: The semantics of C++ differ from those of C when an assignment of an aggregate is desired. Assignment in C++ is *************** *** 5674,5685 **** && UNIQUELY_DERIVED_FROM_P (lhstype, TREE_TYPE (newrhs))))) { - /* This was decided in finish_struct. */ - if (modifycode == INIT_EXPR) - cp_error ("can't generate default copy constructor for `%T'", lhstype); - else - cp_error ("can't generate default assignment operator for `%T'", - lhstype); - #if 0 - /* This is now done by generating X(X&) and operator=(X&). */ tree vbases = CLASSTYPE_VBASECLASSES (lhstype); tree lhs_addr = build_unary_op (ADDR_EXPR, lhs, 0); --- 5934,5937 ---- *************** *** 5757,5762 **** result); return build_compound_expr (result); - #endif } /* Convert new value to destination type. */ --- 6009,6014 ---- result); return build_compound_expr (result); } + #endif /* Convert new value to destination type. */ *************** *** 5766,5772 **** int from_array; /* Allow array assignment in compiler-generated code. */ ! if ((pedantic || flag_ansi) ! && ! DECL_ARTIFICIAL (current_function_decl)) pedwarn ("ANSI C++ forbids assignment of arrays"); --- 6018,6030 ---- int from_array; + if (! comptypes (lhstype, TREE_TYPE (rhs), 0)) + { + cp_error ("incompatible types in assignment of `%T' to `%T'", + TREE_TYPE (rhs), lhstype); + return error_mark_node; + } + /* Allow array assignment in compiler-generated code. */ ! if (pedantic && ! DECL_ARTIFICIAL (current_function_decl)) pedwarn ("ANSI C++ forbids assignment of arrays"); *************** *** 5812,5815 **** --- 6070,6074 ---- else { + #if 0 if (IS_AGGR_TYPE (lhstype)) { *************** *** 5819,5822 **** --- 6078,6082 ---- return result; } + #endif /* Avoid warnings on enum bit fields. */ if (TREE_CODE (olhstype) == ENUMERAL_TYPE *************** *** 5825,5845 **** newrhs = convert_for_assignment (olhstype, newrhs, "assignment", NULL_TREE, 0); ! newrhs = convert_force (lhstype, newrhs); } else newrhs = convert_for_assignment (lhstype, newrhs, "assignment", ! NULL_TREE, 0); ! if (flag_elide_constructors == 0 ! && TREE_CODE (newrhs) == CALL_EXPR ! && TREE_ADDRESSABLE (lhstype)) ! { ! /* Can't initialized directly from a CALL_EXPR, since ! we don't know about what doesn't alias what. */ ! ! tree temp = get_temp_name (lhstype, 0); ! newrhs = build (COMPOUND_EXPR, lhstype, ! build_modify_expr (temp, INIT_EXPR, newrhs), ! temp); ! } } --- 6085,6103 ---- newrhs = convert_for_assignment (olhstype, newrhs, "assignment", NULL_TREE, 0); ! newrhs = convert_force (lhstype, newrhs, 0); } else newrhs = convert_for_assignment (lhstype, newrhs, "assignment", ! NULL_TREE, 0); ! if (TREE_CODE (newrhs) == CALL_EXPR ! && TYPE_NEEDS_CONSTRUCTING (lhstype)) ! newrhs = build_cplus_new (lhstype, newrhs, 0); ! ! /* Can't initialize directly from a TARGET_EXPR, since that would ! cause the lhs to be constructed twice. So we force the ! TARGET_EXPR to be expanded. expand_expr should really do this ! by itself. */ ! if (TREE_CODE (newrhs) == TARGET_EXPR) ! newrhs = expand_target_expr (newrhs); } *************** *** 5895,5899 **** else if (TREE_CODE (newrhs) == ADDR_EXPR) { ! /* Bad but legal. */ slot = newrhs; warning ("address taken of temporary object"); --- 6153,6157 ---- else if (TREE_CODE (newrhs) == ADDR_EXPR) { ! /* Bad but valid. */ slot = newrhs; warning ("address taken of temporary object"); *************** *** 5947,5951 **** } ! /* Get differnce in deltas for different pointer to member function types. Return inetger_zero_node, if FROM cannot be converted to a TO type. If FORCE is true, then allow reverse conversions as well. */ --- 6205,6209 ---- } ! /* Get difference in deltas for different pointer to member function types. Return inetger_zero_node, if FROM cannot be converted to a TO type. If FORCE is true, then allow reverse conversions as well. */ *************** *** 5993,6005 **** if (TREE_VIA_VIRTUAL (binfo)) { ! warning ("pointer to member conversion to virtual base class will only work if your very careful"); } ! return fold (size_binop (MINUS_EXPR, ! integer_zero_node, ! BINFO_OFFSET (binfo))); } if (TREE_VIA_VIRTUAL (binfo)) { ! warning ("pointer to member conversion from virtual base class will only work if your very careful"); } return BINFO_OFFSET (binfo); --- 6251,6263 ---- if (TREE_VIA_VIRTUAL (binfo)) { ! warning ("pointer to member conversion to virtual base class will only work if you are very careful"); } ! return build_binary_op (MINUS_EXPR, ! integer_zero_node, ! BINFO_OFFSET (binfo), 1); } if (TREE_VIA_VIRTUAL (binfo)) { ! warning ("pointer to member conversion from virtual base class will only work if you are very careful"); } return BINFO_OFFSET (binfo); *************** *** 6029,6033 **** tree u; ! /* Handle multiple conversions of pointer to member fucntions. */ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (pfn))) { --- 6287,6291 ---- tree u; ! /* Handle multiple conversions of pointer to member functions. */ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (pfn))) { *************** *** 6054,6066 **** { tree e1, e2, e3; ! ndelta = convert (sizetype, build_component_ref (pfn, delta_identifier, 0, 0)); ! ndelta2 = convert (sizetype, DELTA2_FROM_PTRMEMFUNC (pfn)); index = build_component_ref (pfn, index_identifier, 0, 0); delta = get_delta_difference (TYPE_METHOD_BASETYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (pfn)))), TYPE_METHOD_BASETYPE (TREE_TYPE (type)), force); ! delta = fold (size_binop (PLUS_EXPR, delta, ndelta)); ! delta2 = fold (size_binop (PLUS_EXPR, ndelta2, delta2)); ! e1 = fold (build (GT_EXPR, integer_type_node, index, integer_zero_node)); u = build_nt (CONSTRUCTOR, 0, tree_cons (delta2_identifier, delta2, NULL_TREE)); --- 6312,6324 ---- { tree e1, e2, e3; ! ndelta = convert (ptrdiff_type_node, build_component_ref (pfn, delta_identifier, 0, 0)); ! ndelta2 = convert (ptrdiff_type_node, DELTA2_FROM_PTRMEMFUNC (pfn)); index = build_component_ref (pfn, index_identifier, 0, 0); delta = get_delta_difference (TYPE_METHOD_BASETYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (pfn)))), TYPE_METHOD_BASETYPE (TREE_TYPE (type)), force); ! delta = build_binary_op (PLUS_EXPR, delta, ndelta, 1); ! delta2 = build_binary_op (PLUS_EXPR, ndelta2, delta2, 1); ! e1 = fold (build (GT_EXPR, boolean_type_node, index, integer_zero_node)); u = build_nt (CONSTRUCTOR, 0, tree_cons (delta2_identifier, delta2, NULL_TREE)); *************** *** 6090,6094 **** else { ! sorry ("value casting of varible nonnull pointer to member functions not supported"); return error_mark_node; } --- 6348,6352 ---- else { ! sorry ("value casting of variable nonnull pointer to member functions not supported"); return error_mark_node; } *************** *** 6098,6102 **** if (integer_zerop (pfn)) { ! pfn = build_c_cast (type, integer_zero_node); u = build_nt (CONSTRUCTOR, 0, tree_cons (pfn_identifier, pfn, NULL_TREE)); u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, integer_zero_node, --- 6356,6360 ---- if (integer_zerop (pfn)) { ! pfn = build_c_cast (type, integer_zero_node, 0); u = build_nt (CONSTRUCTOR, 0, tree_cons (pfn_identifier, pfn, NULL_TREE)); u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, integer_zero_node, *************** *** 6121,6125 **** TYPE_METHOD_BASETYPE (TREE_TYPE (type)), force); ! delta2 = fold (size_binop (PLUS_EXPR, delta2, delta)); if (TREE_CODE (TREE_OPERAND (pfn, 0)) != FUNCTION_DECL) --- 6379,6383 ---- TYPE_METHOD_BASETYPE (TREE_TYPE (type)), force); ! delta2 = build_binary_op (PLUS_EXPR, delta2, delta, 1); if (TREE_CODE (TREE_OPERAND (pfn, 0)) != FUNCTION_DECL) *************** *** 6144,6148 **** else { ! index = fold (size_binop (MINUS_EXPR, integer_zero_node, integer_one_node)); npfn = build1 (NOP_EXPR, type, pfn); --- 6402,6406 ---- else { ! index = size_binop (MINUS_EXPR, integer_zero_node, integer_one_node); npfn = build1 (NOP_EXPR, type, pfn); *************** *** 6276,6284 **** /* Conversions involving enums. */ else if ((codel == ENUMERAL_TYPE ! && (coder == ENUMERAL_TYPE || coder == INTEGER_TYPE || coder == REAL_TYPE)) || (coder == ENUMERAL_TYPE ! && (codel == ENUMERAL_TYPE || codel == INTEGER_TYPE || codel == REAL_TYPE))) { ! return convert (type, rhs); } /* Conversions among pointers */ --- 6534,6542 ---- /* Conversions involving enums. */ else if ((codel == ENUMERAL_TYPE ! && (INTEGRAL_CODE_P (coder) || coder == REAL_TYPE)) || (coder == ENUMERAL_TYPE ! && (INTEGRAL_CODE_P (codel) || codel == REAL_TYPE))) { ! return cp_convert (type, rhs, CONV_IMPLICIT, LOOKUP_NORMAL); } /* Conversions among pointers */ *************** *** 6291,6294 **** --- 6549,6553 ---- register tree ttl = TREE_TYPE (type); register tree ttr; + int ctt = 0; if (coder == RECORD_TYPE) *************** *** 6343,6347 **** else if (TYPE_MAIN_VARIANT (ttl) == void_type_node || TYPE_MAIN_VARIANT (ttr) == void_type_node ! || comp_target_types (type, rhstype, 1) || (unsigned_type (TYPE_MAIN_VARIANT (ttl)) == unsigned_type (TYPE_MAIN_VARIANT (ttr)))) --- 6602,6606 ---- else if (TYPE_MAIN_VARIANT (ttl) == void_type_node || TYPE_MAIN_VARIANT (ttr) == void_type_node ! || (ctt = comp_target_types (type, rhstype, 1)) || (unsigned_type (TYPE_MAIN_VARIANT (ttl)) == unsigned_type (TYPE_MAIN_VARIANT (ttr)))) *************** *** 6351,6358 **** && TREE_CODE (ttr) == OFFSET_TYPE) { ! error ("no standard conversion from pointer to member to `void *'"); return error_mark_node; } if (TYPE_MAIN_VARIANT (ttl) != void_type_node && TYPE_MAIN_VARIANT (ttr) == void_type_node --- 6610,6621 ---- && TREE_CODE (ttr) == OFFSET_TYPE) { ! cp_error ("no standard conversion from `%T' to `void *'", ttr); return error_mark_node; } + if (ctt < 0) + cp_pedwarn ("converting `%T' to `%T' is a contravariance violation", + ttr, ttl); + if (TYPE_MAIN_VARIANT (ttl) != void_type_node && TYPE_MAIN_VARIANT (ttr) == void_type_node *************** *** 6360,6365 **** { if (coder == RECORD_TYPE) ! pedwarn ("implicit conversion of signature pointer to type `%s'", ! type_as_string (type, 0)); else pedwarn ("ANSI C++ forbids implicit conversion from `void *' in %s", --- 6623,6628 ---- { if (coder == RECORD_TYPE) ! cp_pedwarn ("implicit conversion of signature pointer to type `%T'", ! type); else pedwarn ("ANSI C++ forbids implicit conversion from `void *' in %s", *************** *** 6466,6470 **** } ! if (comp_target_types (ttl, ttr, nptrs)) { if (add_quals) --- 6729,6733 ---- } ! if (comp_target_types (ttl, ttr, nptrs) > 0) { if (add_quals) *************** *** 6570,6574 **** return null_pointer_node; } ! else if ((codel == INTEGER_TYPE || codel == BOOLEAN_TYPE) && (coder == POINTER_TYPE || (coder == RECORD_TYPE --- 6833,6837 ---- return null_pointer_node; } ! else if (codel == INTEGER_TYPE && (coder == POINTER_TYPE || (coder == RECORD_TYPE *************** *** 6585,6599 **** return convert (type, rhs); } /* C++ */ ! else if (((coder == POINTER_TYPE && TREE_CODE (rhs) == ADDR_EXPR ! && TREE_CODE (rhstype) == POINTER_TYPE && TREE_CODE (TREE_TYPE (rhstype)) == METHOD_TYPE) || integer_zerop (rhs) ! || TYPE_PTRMEMFUNC_P (TREE_TYPE (rhs))) && TYPE_PTRMEMFUNC_P (type)) { /* compatible pointer to member functions. */ ! return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), rhs, 0); } else if (codel == ERROR_MARK || coder == ERROR_MARK) --- 6848,6879 ---- return convert (type, rhs); } + else if (codel == BOOLEAN_TYPE + && (coder == POINTER_TYPE + || (coder == RECORD_TYPE + && (IS_SIGNATURE_POINTER (rhstype) + || TYPE_PTRMEMFUNC_FLAG (rhstype) + || IS_SIGNATURE_REFERENCE (rhstype))))) + return convert (type, rhs); /* C++ */ ! else if (((coder == POINTER_TYPE && TREE_CODE (TREE_TYPE (rhstype)) == METHOD_TYPE) || integer_zerop (rhs) ! || TYPE_PTRMEMFUNC_P (rhstype)) && TYPE_PTRMEMFUNC_P (type)) { + tree ttl = TYPE_PTRMEMFUNC_FN_TYPE (type); + tree ttr = (TREE_CODE (rhstype) == POINTER_TYPE ? rhstype + : TYPE_PTRMEMFUNC_FN_TYPE (type)); + int ctt = comp_target_types (ttl, ttr, 1); + + if (ctt < 0) + cp_pedwarn ("converting `%T' to `%T' is a contravariance violation", + ttr, ttl); + else if (ctt == 0) + cp_error ("%s to `%T' from `%T'", errtype, ttl, ttr); + /* compatible pointer to member functions. */ ! return build_ptrmemfunc (ttl, rhs, 0); } else if (codel == ERROR_MARK || coder == ERROR_MARK) *************** *** 6604,6609 **** bashed before coming here. */ else if (codel == REFERENCE_TYPE) ! /* Force an abort. */ ! my_friendly_assert (codel != REFERENCE_TYPE, 317); else if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (rhs))) { --- 6884,6888 ---- bashed before coming here. */ else if (codel == REFERENCE_TYPE) ! my_friendly_abort (317); else if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (rhs))) { *************** *** 6631,6635 **** If using constructor make sure no conversion operator exists, if one does ! exist, an ambiguity exists. */ tree convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum) --- 6910,6916 ---- If using constructor make sure no conversion operator exists, if one does ! exist, an ambiguity exists. ! ! If flags doesn't include LOOKUP_COMPLAIN, don't complain about anything. */ tree convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum) *************** *** 6660,6669 **** if (rhs == error_mark_node) return error_mark_node; - rhstype = TREE_TYPE (rhs); - coder = TREE_CODE (rhstype); } if ((TREE_CODE (TREE_TYPE (rhs)) == ARRAY_TYPE ! && TREE_CODE (type) != ARRAY_TYPE && TREE_CODE (type) != REFERENCE_TYPE) || TREE_CODE (TREE_TYPE (rhs)) == FUNCTION_TYPE || TREE_CODE (TREE_TYPE (rhs)) == METHOD_TYPE) --- 6941,6953 ---- if (rhs == error_mark_node) return error_mark_node; } + if (TREE_CODE (TREE_TYPE (rhs)) == REFERENCE_TYPE) + rhs = convert_from_reference (rhs); + if ((TREE_CODE (TREE_TYPE (rhs)) == ARRAY_TYPE ! && TREE_CODE (type) != ARRAY_TYPE ! && (TREE_CODE (type) != REFERENCE_TYPE ! || TREE_CODE (TREE_TYPE (type)) != ARRAY_TYPE)) || TREE_CODE (TREE_TYPE (rhs)) == FUNCTION_TYPE || TREE_CODE (TREE_TYPE (rhs)) == METHOD_TYPE) *************** *** 6758,6761 **** --- 7042,7047 ---- return rhs; } + else if (TYPE_HAS_TRIVIAL_INIT_REF (type)) + return rhs; } if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (rhstype) *************** *** 6797,6801 **** } ! return convert (type, rhs); } --- 7083,7087 ---- } ! return cp_convert (type, rhs, CONV_OLD_CONVERT, flags); } *************** *** 7021,7024 **** --- 7307,7317 ---- value must be returned via that. */ + /* If we're returning in a register, we can't initialize the + return value from a TARGET_EXPR. */ + if (TREE_CODE (retval) == TARGET_EXPR + && TYPE_MAIN_VARIANT (TREE_TYPE (retval)) == TYPE_MAIN_VARIANT (valtype) + && ! current_function_returns_struct) + retval = expand_target_expr (retval); + if (retval == result /* Watch out for constructors, which "return" aggregates *************** *** 7037,7047 **** } } ! else if (IS_AGGR_TYPE (valtype) && TYPE_NEEDS_CONSTRUCTING (valtype)) { ! /* Throw away the cleanup that `build_functional_cast' gave us. */ ! if (TREE_CODE (retval) == WITH_CLEANUP_EXPR ! && TREE_CODE (TREE_OPERAND (retval, 0)) == TARGET_EXPR) ! retval = TREE_OPERAND (retval, 0); ! expand_aggr_init (result, retval, 0); expand_cleanups_to (NULL_TREE); DECL_INITIAL (result) = NULL_TREE; --- 7330,7336 ---- } } ! else if (IS_AGGR_TYPE (valtype) && current_function_returns_struct) { ! expand_aggr_init (result, retval, 0, LOOKUP_ONLYCONVERTING); expand_cleanups_to (NULL_TREE); DECL_INITIAL (result) = NULL_TREE; *************** *** 7102,7106 **** `expand_return' does the magic of protecting RESULT from cleanups. */ ! retval = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (result), retval); /* This part _must_ come second, because expand_return looks for the INIT_EXPR as the toplevel node only. :-( */ --- 7391,7396 ---- `expand_return' does the magic of protecting RESULT from cleanups. */ ! retval = fold (build1 (CLEANUP_POINT_EXPR, TREE_TYPE (result), ! retval)); /* This part _must_ come second, because expand_return looks for the INIT_EXPR as the toplevel node only. :-( */ *************** *** 7214,7219 **** } ! expand_start_case (1, build1 (CLEANUP_POINT_EXPR, TREE_TYPE (exp), exp), ! type, "switch statement"); return exp; --- 7504,7510 ---- } ! expand_start_case ! (1, fold (build1 (CLEANUP_POINT_EXPR, TREE_TYPE (exp), exp)), ! type, "switch statement"); return exp; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/typeck2.c gcc-2.7.0/cp/typeck2.c *** gcc-2.6.3/cp/typeck2.c Thu Nov 17 14:01:54 1994 --- gcc-2.7.0/cp/typeck2.c Thu Jun 15 08:31:22 1995 *************** *** 1,5 **** /* Report error messages, build initializers, and perform some front-end optimizations for C++ compiler. ! Copyright (C) '87, '88, '89, '92, 1993, 1994 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) --- 1,5 ---- /* Report error messages, build initializers, and perform some front-end optimizations for C++ compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 330,334 **** same situation (call exit). */ ! /* First used: 0 (reserved), Last used: 360. Free: 261. */ static int abortcount = 0; --- 331,335 ---- same situation (call exit). */ ! /* First used: 0 (reserved), Last used: 366. Free: */ static int abortcount = 0; *************** *** 380,442 **** element of a "constant" initializer. ! Return 1 if the value is absolute; return 2 if it is relocatable. We assume that VALUE has been folded as much as possible; therefore, we do not need to check for such things as arithmetic-combinations of integers. */ ! static int ! initializer_constant_valid_p (value) tree value; { switch (TREE_CODE (value)) { case CONSTRUCTOR: ! return TREE_STATIC (value); case INTEGER_CST: case REAL_CST: case STRING_CST: ! return 1; case ADDR_EXPR: ! return 2; case CONVERT_EXPR: case NOP_EXPR: ! /* Allow conversions between types of the same kind. */ ! if (TREE_CODE (TREE_TYPE (value)) ! == TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0)))) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0)); /* Allow (int) &foo provided int is as wide as a pointer. */ if (TREE_CODE (TREE_TYPE (value)) == INTEGER_TYPE && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == POINTER_TYPE ! && ! tree_int_cst_lt (TYPE_SIZE (TREE_TYPE (value)), ! TYPE_SIZE (TREE_TYPE (TREE_OPERAND (value, 0))))) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0)); return 0; case PLUS_EXPR: { ! int valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0)); ! int valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1)); ! if (valid0 == 1 && valid1 == 2) ! return 2; ! if (valid0 == 2 && valid1 == 1) ! return 2; return 0; } case MINUS_EXPR: { ! int valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0)); ! int valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1)); ! if (valid0 == 2 && valid1 == 1) ! return 2; return 0; } - - default: - return 0; } } --- 381,509 ---- element of a "constant" initializer. ! Return null_pointer_node if the value is absolute; ! if it is relocatable, return the variable that determines the relocation. We assume that VALUE has been folded as much as possible; therefore, we do not need to check for such things as arithmetic-combinations of integers. */ ! tree ! initializer_constant_valid_p (value, endtype) tree value; + tree endtype; { switch (TREE_CODE (value)) { case CONSTRUCTOR: ! if (TREE_CODE (TREE_TYPE (value)) == UNION_TYPE ! && TREE_CONSTANT (value)) ! return ! initializer_constant_valid_p (TREE_VALUE (CONSTRUCTOR_ELTS (value)), ! endtype); ! ! return TREE_STATIC (value) ? null_pointer_node : 0; case INTEGER_CST: case REAL_CST: case STRING_CST: ! case COMPLEX_CST: ! return null_pointer_node; case ADDR_EXPR: ! return TREE_OPERAND (value, 0); ! ! case NON_LVALUE_EXPR: ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); case CONVERT_EXPR: case NOP_EXPR: ! /* Allow conversions between pointer types. */ ! if (TREE_CODE (TREE_TYPE (value)) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == POINTER_TYPE) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); ! ! /* Allow conversions between real types. */ ! if (TREE_CODE (TREE_TYPE (value)) == REAL_TYPE ! && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == REAL_TYPE) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); ! ! /* Allow length-preserving conversions between integer types. */ ! if (TREE_CODE (TREE_TYPE (value)) == INTEGER_TYPE ! && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == INTEGER_TYPE ! && (TYPE_PRECISION (TREE_TYPE (value)) ! == TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0))))) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype); ! ! /* Allow conversions between other integer types only if ! explicit value. */ ! if (TREE_CODE (TREE_TYPE (value)) == INTEGER_TYPE ! && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == INTEGER_TYPE) ! { ! tree inner = initializer_constant_valid_p (TREE_OPERAND (value, 0), ! endtype); ! if (inner == null_pointer_node) ! return null_pointer_node; ! return 0; ! } ! /* Allow (int) &foo provided int is as wide as a pointer. */ if (TREE_CODE (TREE_TYPE (value)) == INTEGER_TYPE && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == POINTER_TYPE ! && (TYPE_PRECISION (TREE_TYPE (value)) ! >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0))))) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), ! endtype); ! ! /* Likewise conversions from int to pointers. */ ! if (TREE_CODE (TREE_TYPE (value)) == POINTER_TYPE ! && TREE_CODE (TREE_TYPE (TREE_OPERAND (value, 0))) == INTEGER_TYPE ! && (TYPE_PRECISION (TREE_TYPE (value)) ! <= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0))))) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), ! endtype); ! ! /* Allow conversions to union types if the value inside is okay. */ ! if (TREE_CODE (TREE_TYPE (value)) == UNION_TYPE) ! return initializer_constant_valid_p (TREE_OPERAND (value, 0), ! endtype); return 0; case PLUS_EXPR: + if (TREE_CODE (endtype) == INTEGER_TYPE + && TYPE_PRECISION (endtype) < POINTER_SIZE) + return 0; { ! tree valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0), ! endtype); ! tree valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1), ! endtype); ! /* If either term is absolute, use the other terms relocation. */ ! if (valid0 == null_pointer_node) ! return valid1; ! if (valid1 == null_pointer_node) ! return valid0; return 0; } case MINUS_EXPR: + if (TREE_CODE (endtype) == INTEGER_TYPE + && TYPE_PRECISION (endtype) < POINTER_SIZE) + return 0; { ! tree valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0), ! endtype); ! tree valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1), ! endtype); ! /* Win if second argument is absolute. */ ! if (valid1 == null_pointer_node) ! return valid0; ! /* Win if both arguments have the same relocation. ! Then the value is absolute. */ ! if (valid0 == valid1) ! return null_pointer_node; return 0; } } + + return 0; } *************** *** 472,483 **** return NULL_TREE; /* Take care of C++ business up here. */ type = TYPE_MAIN_VARIANT (type); ! /* implicitly tests if IS_AGGR_TYPE. */ ! if (TYPE_NEEDS_CONSTRUCTING (type) && TREE_CODE (init) != CONSTRUCTOR) ! my_friendly_abort (109); ! else if (IS_AGGR_TYPE (type)) { /* Although we are not allowed to declare variables of signature type, we complain about a possible constructor call in such a --- 539,554 ---- return NULL_TREE; + #if 0 + /* This breaks arrays, and should not have any effect for other decls. */ /* Take care of C++ business up here. */ type = TYPE_MAIN_VARIANT (type); + #endif ! if (IS_AGGR_TYPE (type)) { + if (! TYPE_HAS_TRIVIAL_INIT_REF (type) + && TREE_CODE (init) != CONSTRUCTOR) + my_friendly_abort (109); + /* Although we are not allowed to declare variables of signature type, we complain about a possible constructor call in such a *************** *** 504,513 **** /* Check that we're really an aggregate as ARM 8.4.1 defines it. */ if (CLASSTYPE_N_BASECLASSES (type)) ! cp_error_at ("initializer list construction illegal for derived class object `%D'", decl); if (CLASSTYPE_VTBL_PTR (type)) ! cp_error_at ("initializer list construction illegal for polymorphic class object `%D'", decl); if (TYPE_NEEDS_CONSTRUCTING (type)) { ! cp_error_at ("initializer list construction illegal for `%D'", decl); error ("due to the presence of a constructor"); } --- 575,584 ---- /* Check that we're really an aggregate as ARM 8.4.1 defines it. */ if (CLASSTYPE_N_BASECLASSES (type)) ! cp_error_at ("initializer list construction invalid for derived class object `%D'", decl); if (CLASSTYPE_VTBL_PTR (type)) ! cp_error_at ("initializer list construction invalid for polymorphic class object `%D'", decl); if (TYPE_NEEDS_CONSTRUCTING (type)) { ! cp_error_at ("initializer list construction invalid for `%D'", decl); error ("due to the presence of a constructor"); } *************** *** 515,519 **** if (TREE_PRIVATE (field) || TREE_PROTECTED (field)) { ! cp_error_at ("initializer list construction illegal for `%D'", decl); cp_error_at ("due to non-public access of member `%D'", field); } --- 586,590 ---- if (TREE_PRIVATE (field) || TREE_PROTECTED (field)) { ! cp_error_at ("initializer list construction invalid for `%D'", decl); cp_error_at ("due to non-public access of member `%D'", field); } *************** *** 525,529 **** if (field && (TREE_PRIVATE (field) || TREE_PROTECTED (field))) { ! cp_error_at ("initializer list construction illegal for `%D'", decl); cp_error_at ("due to non-public access of member `%D'", field); } --- 596,600 ---- if (field && (TREE_PRIVATE (field) || TREE_PROTECTED (field))) { ! cp_error_at ("initializer list construction invalid for `%D'", decl); cp_error_at ("due to non-public access of member `%D'", field); } *************** *** 584,588 **** else if (TREE_STATIC (decl) && (! TREE_CONSTANT (value) ! || ! initializer_constant_valid_p (value) #if 0 /* A STATIC PUBLIC int variable doesn't have to be --- 655,659 ---- else if (TREE_STATIC (decl) && (! TREE_CONSTANT (value) ! || ! initializer_constant_valid_p (value, TREE_TYPE (value)) #if 0 /* A STATIC PUBLIC int variable doesn't have to be *************** *** 790,793 **** --- 861,872 ---- init = element; } + while (TREE_CODE (init) == CONSTRUCTOR) + { + cp_pedwarn ("braces around scalar initializer for `%T'", type); + init = CONSTRUCTOR_ELTS (init); + if (TREE_CHAIN (init)) + cp_pedwarn ("ignoring extra initializers for `%T'", type); + init = TREE_VALUE (init); + } return convert_for_initialization (0, type, init, LOOKUP_NORMAL, *************** *** 901,904 **** --- 980,990 ---- next1 = digest_init (TYPE_MAIN_VARIANT (TREE_TYPE (type)), TREE_VALUE (tail), &tail1); + if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (type)) + && TYPE_MAIN_VARIANT (TREE_TYPE (type)) != TYPE_MAIN_VARIANT (TREE_TYPE (next1))) + { + /* The fact this needs to be done suggests this code needs + to be totally rewritten. */ + next1 = convert_for_initialization (NULL_TREE, TREE_TYPE (type), next1, LOOKUP_NORMAL, "initialization", NULL_TREE, 0); + } my_friendly_assert (tail1 == 0 || TREE_CODE (tail1) == TREE_LIST, 319); *************** *** 921,925 **** else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (! initializer_constant_valid_p (next1)) allsimple = 0; members = tree_cons (NULL_TREE, next1, members); --- 1007,1011 ---- else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) allsimple = 0; members = tree_cons (NULL_TREE, next1, members); *************** *** 985,989 **** else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (! initializer_constant_valid_p (next1)) allsimple = 0; members = tree_cons (field, next1, members); --- 1071,1075 ---- else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) allsimple = 0; members = tree_cons (field, next1, members); *************** *** 1002,1006 **** else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (! initializer_constant_valid_p (next1)) allsimple = 0; members = tree_cons (field, next1, members); --- 1088,1092 ---- else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) allsimple = 0; members = tree_cons (field, next1, members); *************** *** 1083,1087 **** else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (initializer_constant_valid_p (next1) == 0) allsimple = 0; members = tree_cons (field, next1, members); --- 1169,1173 ---- else if (!TREE_CONSTANT (next1)) allconstant = 0; ! else if (initializer_constant_valid_p (next1, TREE_TYPE (next1)) == 0) allsimple = 0; members = tree_cons (field, next1, members); *************** *** 1319,1322 **** --- 1405,1409 ---- tree objtype = TREE_TYPE (datum); tree rettype; + tree binfo; if (TYPE_PTRMEMFUNC_P (TREE_TYPE (component))) *************** *** 1351,1356 **** return error_mark_node; } ! ! if (! comptypes (TYPE_METHOD_BASETYPE (type), objtype, 0)) { cp_error ("member type `%T::' incompatible with object type `%T'", --- 1438,1444 ---- return error_mark_node; } ! ! binfo = get_binfo (TYPE_METHOD_BASETYPE (type), objtype, 1); ! if (binfo == NULL_TREE) { cp_error ("member type `%T::' incompatible with object type `%T'", *************** *** 1358,1361 **** --- 1446,1451 ---- return error_mark_node; } + else if (binfo == error_mark_node) + return error_mark_node; return build (OFFSET_REF, rettype, datum, component); *************** *** 1418,1422 **** name = TYPE_NAME (type); if (TREE_CODE (name) == TYPE_DECL) ! name = DECL_NAME (name); } --- 1508,1512 ---- name = TYPE_NAME (type); if (TREE_CODE (name) == TYPE_DECL) ! name = DECL_NESTED_TYPENAME (name); } *************** *** 1425,1435 **** /* this must build a C cast */ if (parms == NULL_TREE) ! return build1 (NOP_EXPR, type, integer_zero_node); ! else if (TREE_CHAIN (parms) != NULL_TREE) { ! pedwarn ("initializer list being treated as compound expression"); parms = build_compound_expr (parms); } ! return build_c_cast (type, parms); } --- 1515,1527 ---- /* this must build a C cast */ if (parms == NULL_TREE) ! parms = integer_zero_node; ! else { ! if (TREE_CHAIN (parms) != NULL_TREE) ! pedwarn ("initializer list being treated as compound expression"); parms = build_compound_expr (parms); } ! ! return build_c_cast (type, parms, 1); } *************** *** 1441,1445 **** if (parms && TREE_CHAIN (parms) == NULL_TREE) ! return build_c_cast (type, parms); expr_as_ctor = build_method_call (NULL_TREE, name, parms, --- 1533,1537 ---- if (parms && TREE_CHAIN (parms) == NULL_TREE) ! return build_c_cast (type, parms, 1); expr_as_ctor = build_method_call (NULL_TREE, name, parms, *************** *** 1449,1483 **** return error_mark_node; ! if (current_function_decl) ! return build_cplus_new (type, expr_as_ctor, 1); ! ! { ! register tree parm = TREE_OPERAND (expr_as_ctor, 1); ! ! /* Initializers for static variables and parameters have ! to handle doing the initialization and cleanup themselves. */ ! my_friendly_assert (TREE_CODE (expr_as_ctor) == CALL_EXPR, 322); ! #if 0 ! /* The following assertion fails in cases where we are initializing ! a static member variable of a particular instance of a template ! class with a call to a constructor of the given instance, as in: ! ! TMPL object = TMPL(); ! ! Curiously, the assertion does not fail if we do the same thing ! for a static member of a non-template class, as in: ! ! T object = T(); ! ! I can't see why we should care here whether or not the initializer ! expression involves a call to `new', so for the time being, it ! seems best to just avoid doing this assertion. */ ! my_friendly_assert (TREE_CALLS_NEW (TREE_VALUE (parm)), 323); ! #endif ! TREE_VALUE (parm) = NULL_TREE; ! expr_as_ctor = build_indirect_ref (expr_as_ctor, NULL_PTR); ! TREE_HAS_CONSTRUCTOR (expr_as_ctor) = 1; ! } ! return expr_as_ctor; } --- 1541,1545 ---- return error_mark_node; ! return build_cplus_new (type, expr_as_ctor, 1); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cp/xref.c gcc-2.7.0/cp/xref.c *** gcc-2.6.3/cp/xref.c Wed Jun 15 14:30:37 1994 --- gcc-2.7.0/cp/xref.c Thu Jun 15 08:31:53 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 804,808 **** } ! /* Open file for xrefing. */ static void --- 805,809 ---- } ! /* Open file for xreffing. */ static void diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cplus-dem.c gcc-2.7.0/cplus-dem.c *** gcc-2.6.3/cplus-dem.c --- gcc-2.7.0/cplus-dem.c Thu Jun 15 07:22:07 1995 *************** *** 0 **** --- 1,3001 ---- + /* Demangler for GNU C++ + Copyright 1989, 1991, 1994, 1995 Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.uucp) + Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling + + This file is part of the libiberty library. + Libiberty is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + Libiberty 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with libiberty; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* This file exports two functions; cplus_mangle_opname and cplus_demangle. + + This file imports xmalloc and xrealloc, which are like malloc and + realloc except that they generate a fatal error if there is no + available memory. */ + + #include + #include + #include + + #include + #undef CURRENT_DEMANGLING_STYLE + #define CURRENT_DEMANGLING_STYLE work->options + + extern char *xmalloc PARAMS((unsigned)); + extern char *xrealloc PARAMS((char *, unsigned)); + + char * + mystrstr (s1, s2) + char *s1, *s2; + { + register char *p = s1; + register int len = strlen (s2); + + for (; (p = strchr (p, *s2)) != 0; p++) + { + if (strncmp (p, s2, len) == 0) + { + return (p); + } + } + return (0); + } + + /* In order to allow a single demangler executable to demangle strings + using various common values of CPLUS_MARKER, as well as any specific + one set at compile time, we maintain a string containing all the + commonly used ones, and check to see if the marker we are looking for + is in that string. CPLUS_MARKER is usually '$' on systems where the + assembler can deal with that. Where the assembler can't, it's usually + '.' (but on many systems '.' is used for other things). We put the + current defined CPLUS_MARKER first (which defaults to '$'), followed + by the next most common value, followed by an explicit '$' in case + the value of CPLUS_MARKER is not '$'. + + We could avoid this if we could just get g++ to tell us what the actual + cplus marker character is as part of the debug information, perhaps by + ensuring that it is the character that terminates the gcc_compiled + marker symbol (FIXME). */ + + #if !defined (CPLUS_MARKER) + #define CPLUS_MARKER '$' + #endif + + enum demangling_styles current_demangling_style = gnu_demangling; + + static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' }; + + void + set_cplus_marker_for_demangling (ch) + int ch; + { + cplus_markers[0] = ch; + } + + /* Stuff that is shared between sub-routines. + * Using a shared structure allows cplus_demangle to be reentrant. */ + + struct work_stuff + { + int options; + char **typevec; + int ntypes; + int typevec_size; + int constructor; + int destructor; + int static_type; /* A static member function */ + int const_type; /* A const member function */ + }; + + #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI) + #define PRINT_ARG_TYPES (work -> options & DMGL_PARAMS) + + static const struct optable + { + const char *in; + const char *out; + int flags; + } optable[] = { + {"nw", " new", DMGL_ANSI}, /* new (1.92, ansi) */ + {"dl", " delete", DMGL_ANSI}, /* new (1.92, ansi) */ + {"new", " new", 0}, /* old (1.91, and 1.x) */ + {"delete", " delete", 0}, /* old (1.91, and 1.x) */ + {"vn", " new []", DMGL_ANSI}, /* GNU, pending ansi */ + {"vd", " delete []", DMGL_ANSI}, /* GNU, pending ansi */ + {"as", "=", DMGL_ANSI}, /* ansi */ + {"ne", "!=", DMGL_ANSI}, /* old, ansi */ + {"eq", "==", DMGL_ANSI}, /* old, ansi */ + {"ge", ">=", DMGL_ANSI}, /* old, ansi */ + {"gt", ">", DMGL_ANSI}, /* old, ansi */ + {"le", "<=", DMGL_ANSI}, /* old, ansi */ + {"lt", "<", DMGL_ANSI}, /* old, ansi */ + {"plus", "+", 0}, /* old */ + {"pl", "+", DMGL_ANSI}, /* ansi */ + {"apl", "+=", DMGL_ANSI}, /* ansi */ + {"minus", "-", 0}, /* old */ + {"mi", "-", DMGL_ANSI}, /* ansi */ + {"ami", "-=", DMGL_ANSI}, /* ansi */ + {"mult", "*", 0}, /* old */ + {"ml", "*", DMGL_ANSI}, /* ansi */ + {"amu", "*=", DMGL_ANSI}, /* ansi (ARM/Lucid) */ + {"aml", "*=", DMGL_ANSI}, /* ansi (GNU/g++) */ + {"convert", "+", 0}, /* old (unary +) */ + {"negate", "-", 0}, /* old (unary -) */ + {"trunc_mod", "%", 0}, /* old */ + {"md", "%", DMGL_ANSI}, /* ansi */ + {"amd", "%=", DMGL_ANSI}, /* ansi */ + {"trunc_div", "/", 0}, /* old */ + {"dv", "/", DMGL_ANSI}, /* ansi */ + {"adv", "/=", DMGL_ANSI}, /* ansi */ + {"truth_andif", "&&", 0}, /* old */ + {"aa", "&&", DMGL_ANSI}, /* ansi */ + {"truth_orif", "||", 0}, /* old */ + {"oo", "||", DMGL_ANSI}, /* ansi */ + {"truth_not", "!", 0}, /* old */ + {"nt", "!", DMGL_ANSI}, /* ansi */ + {"postincrement","++", 0}, /* old */ + {"pp", "++", DMGL_ANSI}, /* ansi */ + {"postdecrement","--", 0}, /* old */ + {"mm", "--", DMGL_ANSI}, /* ansi */ + {"bit_ior", "|", 0}, /* old */ + {"or", "|", DMGL_ANSI}, /* ansi */ + {"aor", "|=", DMGL_ANSI}, /* ansi */ + {"bit_xor", "^", 0}, /* old */ + {"er", "^", DMGL_ANSI}, /* ansi */ + {"aer", "^=", DMGL_ANSI}, /* ansi */ + {"bit_and", "&", 0}, /* old */ + {"ad", "&", DMGL_ANSI}, /* ansi */ + {"aad", "&=", DMGL_ANSI}, /* ansi */ + {"bit_not", "~", 0}, /* old */ + {"co", "~", DMGL_ANSI}, /* ansi */ + {"call", "()", 0}, /* old */ + {"cl", "()", DMGL_ANSI}, /* ansi */ + {"alshift", "<<", 0}, /* old */ + {"ls", "<<", DMGL_ANSI}, /* ansi */ + {"als", "<<=", DMGL_ANSI}, /* ansi */ + {"arshift", ">>", 0}, /* old */ + {"rs", ">>", DMGL_ANSI}, /* ansi */ + {"ars", ">>=", DMGL_ANSI}, /* ansi */ + {"component", "->", 0}, /* old */ + {"pt", "->", DMGL_ANSI}, /* ansi; Lucid C++ form */ + {"rf", "->", DMGL_ANSI}, /* ansi; ARM/GNU form */ + {"indirect", "*", 0}, /* old */ + {"method_call", "->()", 0}, /* old */ + {"addr", "&", 0}, /* old (unary &) */ + {"array", "[]", 0}, /* old */ + {"vc", "[]", DMGL_ANSI}, /* ansi */ + {"compound", ", ", 0}, /* old */ + {"cm", ", ", DMGL_ANSI}, /* ansi */ + {"cond", "?:", 0}, /* old */ + {"cn", "?:", DMGL_ANSI}, /* pseudo-ansi */ + {"max", ">?", 0}, /* old */ + {"mx", ">?", DMGL_ANSI}, /* pseudo-ansi */ + {"min", "*", DMGL_ANSI} /* ansi */ + }; + + + typedef struct string /* Beware: these aren't required to be */ + { /* '\0' terminated. */ + char *b; /* pointer to start of string */ + char *p; /* pointer after last character */ + char *e; /* pointer after end of allocated space */ + } string; + + #define STRING_EMPTY(str) ((str) -> b == (str) -> p) + #define PREPEND_BLANK(str) {if (!STRING_EMPTY(str)) \ + string_prepend(str, " ");} + #define APPEND_BLANK(str) {if (!STRING_EMPTY(str)) \ + string_append(str, " ");} + + #define ARM_VTABLE_STRING "__vtbl__" /* Lucid/ARM virtual table prefix */ + #define ARM_VTABLE_STRLEN 8 /* strlen (ARM_VTABLE_STRING) */ + + /* Prototypes for local functions */ + + static char * + mop_up PARAMS ((struct work_stuff *, string *, int)); + + #if 0 + static int + demangle_method_args PARAMS ((struct work_stuff *work, const char **, string *)); + #endif + + static int + demangle_template PARAMS ((struct work_stuff *work, const char **, string *, + string *)); + + static int + demangle_qualified PARAMS ((struct work_stuff *, const char **, string *, + int, int)); + + static int + demangle_class PARAMS ((struct work_stuff *, const char **, string *)); + + static int + demangle_fund_type PARAMS ((struct work_stuff *, const char **, string *)); + + static int + demangle_signature PARAMS ((struct work_stuff *, const char **, string *)); + + static int + demangle_prefix PARAMS ((struct work_stuff *, const char **, string *)); + + static int + gnu_special PARAMS ((struct work_stuff *, const char **, string *)); + + static int + arm_special PARAMS ((struct work_stuff *, const char **, string *)); + + static void + string_need PARAMS ((string *, int)); + + static void + string_delete PARAMS ((string *)); + + static void + string_init PARAMS ((string *)); + + static void + string_clear PARAMS ((string *)); + + #if 0 + static int + string_empty PARAMS ((string *)); + #endif + + static void + string_append PARAMS ((string *, const char *)); + + static void + string_appends PARAMS ((string *, string *)); + + static void + string_appendn PARAMS ((string *, const char *, int)); + + static void + string_prepend PARAMS ((string *, const char *)); + + static void + string_prependn PARAMS ((string *, const char *, int)); + + static int + get_count PARAMS ((const char **, int *)); + + static int + consume_count PARAMS ((const char **)); + + static int + demangle_args PARAMS ((struct work_stuff *, const char **, string *)); + + static int + do_type PARAMS ((struct work_stuff *, const char **, string *)); + + static int + do_arg PARAMS ((struct work_stuff *, const char **, string *)); + + static void + demangle_function_name PARAMS ((struct work_stuff *, const char **, string *, + const char *)); + + static void + remember_type PARAMS ((struct work_stuff *, const char *, int)); + + static void + forget_types PARAMS ((struct work_stuff *)); + + static void + string_prepends PARAMS ((string *, string *)); + + /* Translate count to integer, consuming tokens in the process. + Conversion terminates on the first non-digit character. + Trying to consume something that isn't a count results in + no consumption of input and a return of 0. */ + + static int + consume_count (type) + const char **type; + { + int count = 0; + + while (isdigit (**type)) + { + count *= 10; + count += **type - '0'; + (*type)++; + } + return (count); + } + + int + cplus_demangle_opname (opname, result, options) + char *opname; + char *result; + int options; + { + int len, i, len1, ret; + string type; + struct work_stuff work[1]; + const char *tem; + + len = strlen(opname); + result[0] = '\0'; + ret = 0; + work->options = options; + + if (opname[0] == '_' && opname[1] == '_' + && opname[2] == 'o' && opname[3] == 'p') + { + /* ANSI. */ + /* type conversion operator. */ + tem = opname + 4; + if (do_type (work, &tem, &type)) + { + strcat (result, "operator "); + strncat (result, type.b, type.p - type.b); + string_delete (&type); + ret = 1; + } + } + else if (opname[0] == '_' && opname[1] == '_' + && opname[2] >= 'a' && opname[2] <= 'z' + && opname[3] >= 'a' && opname[3] <= 'z') + { + if (opname[4] == '\0') + { + /* Operator. */ + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + if (strlen (optable[i].in) == 2 + && memcmp (optable[i].in, opname + 2, 2) == 0) + { + strcat (result, "operator"); + strcat (result, optable[i].out); + ret = 1; + break; + } + } + } + else + { + if (opname[2] == 'a' && opname[5] == '\0') + { + /* Assignment. */ + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + if (strlen (optable[i].in) == 3 + && memcmp (optable[i].in, opname + 2, 3) == 0) + { + strcat (result, "operator"); + strcat (result, optable[i].out); + ret = 1; + break; + } + } + } + } + } + else if (len >= 3 + && opname[0] == 'o' + && opname[1] == 'p' + && strchr (cplus_markers, opname[2]) != NULL) + { + /* see if it's an assignment expression */ + if (len >= 10 /* op$assign_ */ + && memcmp (opname + 3, "assign_", 7) == 0) + { + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + len1 = len - 10; + if (strlen (optable[i].in) == len1 + && memcmp (optable[i].in, opname + 10, len1) == 0) + { + strcat (result, "operator"); + strcat (result, optable[i].out); + strcat (result, "="); + ret = 1; + break; + } + } + } + else + { + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + len1 = len - 3; + if (strlen (optable[i].in) == len1 + && memcmp (optable[i].in, opname + 3, len1) == 0) + { + strcat (result, "operator"); + strcat (result, optable[i].out); + ret = 1; + break; + } + } + } + } + else if (len >= 5 && memcmp (opname, "type", 4) == 0 + && strchr (cplus_markers, opname[4]) != NULL) + { + /* type conversion operator */ + tem = opname + 5; + if (do_type (work, &tem, &type)) + { + strcat (result, "operator "); + strncat (result, type.b, type.p - type.b); + string_delete (&type); + ret = 1; + } + } + return ret; + + } + /* Takes operator name as e.g. "++" and returns mangled + operator name (e.g. "postincrement_expr"), or NULL if not found. + + If OPTIONS & DMGL_ANSI == 1, return the ANSI name; + if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */ + + char * + cplus_mangle_opname (opname, options) + char *opname; + int options; + { + int i; + int len; + + len = strlen (opname); + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + if (strlen (optable[i].out) == len + && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI) + && memcmp (optable[i].out, opname, len) == 0) + return ((char *)optable[i].in); + } + return (0); + } + + /* check to see whether MANGLED can match TEXT in the first TEXT_LEN + characters. */ + + int cplus_match (mangled, text, text_len) + const char *mangled; + char *text; + int text_len; + { + if (strncmp (mangled, text, text_len) != 0) { + return(0); /* cannot match either */ + } else { + return(1); /* matches mangled, may match demangled */ + } + } + + /* char *cplus_demangle (const char *mangled, int options) + + If MANGLED is a mangled function name produced by GNU C++, then + a pointer to a malloced string giving a C++ representation + of the name will be returned; otherwise NULL will be returned. + It is the caller's responsibility to free the string which + is returned. + + The OPTIONS arg may contain one or more of the following bits: + + DMGL_ANSI ANSI qualifiers such as `const' and `void' are + included. + DMGL_PARAMS Function parameters are included. + + For example, + + cplus_demangle ("foo__1Ai", DMGL_PARAMS) => "A::foo(int)" + cplus_demangle ("foo__1Ai", DMGL_PARAMS | DMGL_ANSI) => "A::foo(int)" + cplus_demangle ("foo__1Ai", 0) => "A::foo" + + cplus_demangle ("foo__1Afe", DMGL_PARAMS) => "A::foo(float,...)" + cplus_demangle ("foo__1Afe", DMGL_PARAMS | DMGL_ANSI)=> "A::foo(float,...)" + cplus_demangle ("foo__1Afe", 0) => "A::foo" + + Note that any leading underscores, or other such characters prepended by + the compilation system, are presumed to have already been stripped from + MANGLED. */ + + char * + cplus_demangle (mangled, options) + const char *mangled; + int options; + { + string decl; + int success = 0; + struct work_stuff work[1]; + char *demangled = NULL; + + if ((mangled != NULL) && (*mangled != '\0')) + { + memset ((char *) work, 0, sizeof (work)); + work -> options = options; + if ((work->options & DMGL_STYLE_MASK) == 0) + work->options |= (int)current_demangling_style & DMGL_STYLE_MASK; + + string_init (&decl); + + /* First check to see if gnu style demangling is active and if the + string to be demangled contains a CPLUS_MARKER. If so, attempt to + recognize one of the gnu special forms rather than looking for a + standard prefix. In particular, don't worry about whether there + is a "__" string in the mangled string. Consider "_$_5__foo" for + example. */ + + if ((AUTO_DEMANGLING || GNU_DEMANGLING)) + { + success = gnu_special (work, &mangled, &decl); + } + if (!success) + { + success = demangle_prefix (work, &mangled, &decl); + } + if (success && (*mangled != '\0')) + { + success = demangle_signature (work, &mangled, &decl); + } + if (work->constructor == 2) + { + string_prepend(&decl, "global constructors keyed to "); + work->constructor = 0; + } + else if (work->destructor == 2) + { + string_prepend(&decl, "global destructors keyed to "); + work->destructor = 0; + } + demangled = mop_up (work, &decl, success); + } + return (demangled); + } + + static char * + mop_up (work, declp, success) + struct work_stuff *work; + string *declp; + int success; + { + char *demangled = NULL; + + /* Discard the remembered types, if any. */ + + forget_types (work); + if (work -> typevec != NULL) + { + free ((char *) work -> typevec); + } + + /* If demangling was successful, ensure that the demangled string is null + terminated and return it. Otherwise, free the demangling decl. */ + + if (!success) + { + string_delete (declp); + } + else + { + string_appendn (declp, "", 1); + demangled = declp -> b; + } + return (demangled); + } + + /* + + LOCAL FUNCTION + + demangle_signature -- demangle the signature part of a mangled name + + SYNOPSIS + + static int + demangle_signature (struct work_stuff *work, const char **mangled, + string *declp); + + DESCRIPTION + + Consume and demangle the signature portion of the mangled name. + + DECLP is the string where demangled output is being built. At + entry it contains the demangled root name from the mangled name + prefix. I.E. either a demangled operator name or the root function + name. In some special cases, it may contain nothing. + + *MANGLED points to the current unconsumed location in the mangled + name. As tokens are consumed and demangling is performed, the + pointer is updated to continuously point at the next token to + be consumed. + + Demangling GNU style mangled names is nasty because there is no + explicit token that marks the start of the outermost function + argument list. + */ + + static int + demangle_signature (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int success = 1; + int func_done = 0; + int expect_func = 0; + const char *oldmangled = NULL; + string trawname; + string tname; + + while (success && (**mangled != '\0')) + { + switch (**mangled) + { + case 'Q': + oldmangled = *mangled; + success = demangle_qualified (work, mangled, declp, 1, 0); + if (success) + { + remember_type (work, oldmangled, *mangled - oldmangled); + } + if (AUTO_DEMANGLING || GNU_DEMANGLING) + { + expect_func = 1; + } + oldmangled = NULL; + break; + + case 'S': + /* Static member function */ + if (oldmangled == NULL) + { + oldmangled = *mangled; + } + (*mangled)++; + work -> static_type = 1; + break; + + case 'C': + /* a const member function */ + if (oldmangled == NULL) + { + oldmangled = *mangled; + } + (*mangled)++; + work -> const_type = 1; + break; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (oldmangled == NULL) + { + oldmangled = *mangled; + } + success = demangle_class (work, mangled, declp); + if (success) + { + remember_type (work, oldmangled, *mangled - oldmangled); + } + if (AUTO_DEMANGLING || GNU_DEMANGLING) + { + expect_func = 1; + } + oldmangled = NULL; + break; + + case 'F': + /* Function */ + /* ARM style demangling includes a specific 'F' character after + the class name. For GNU style, it is just implied. So we can + safely just consume any 'F' at this point and be compatible + with either style. */ + + oldmangled = NULL; + func_done = 1; + (*mangled)++; + + /* For lucid/ARM style we have to forget any types we might + have remembered up to this point, since they were not argument + types. GNU style considers all types seen as available for + back references. See comment in demangle_args() */ + + if (LUCID_DEMANGLING || ARM_DEMANGLING) + { + forget_types (work); + } + success = demangle_args (work, mangled, declp); + break; + + case 't': + /* G++ Template */ + string_init(&trawname); + string_init(&tname); + if (oldmangled == NULL) + { + oldmangled = *mangled; + } + success = demangle_template (work, mangled, &tname, &trawname); + if (success) + { + remember_type (work, oldmangled, *mangled - oldmangled); + } + string_append(&tname, "::"); + string_prepends(declp, &tname); + if (work -> destructor & 1) + { + string_prepend (&trawname, "~"); + string_appends (declp, &trawname); + work->destructor -= 1; + } + if ((work->constructor & 1) || (work->destructor & 1)) + { + string_appends (declp, &trawname); + work->constructor -= 1; + } + string_delete(&trawname); + string_delete(&tname); + oldmangled = NULL; + expect_func = 1; + break; + + case '_': + /* At the outermost level, we cannot have a return type specified, + so if we run into another '_' at this point we are dealing with + a mangled name that is either bogus, or has been mangled by + some algorithm we don't know how to deal with. So just + reject the entire demangling. */ + success = 0; + break; + + default: + if (AUTO_DEMANGLING || GNU_DEMANGLING) + { + /* Assume we have stumbled onto the first outermost function + argument token, and start processing args. */ + func_done = 1; + success = demangle_args (work, mangled, declp); + } + else + { + /* Non-GNU demanglers use a specific token to mark the start + of the outermost function argument tokens. Typically 'F', + for ARM-demangling, for example. So if we find something + we are not prepared for, it must be an error. */ + success = 0; + } + break; + } + /* + if (AUTO_DEMANGLING || GNU_DEMANGLING) + */ + { + if (success && expect_func) + { + func_done = 1; + success = demangle_args (work, mangled, declp); + } + } + } + if (success && !func_done) + { + if (AUTO_DEMANGLING || GNU_DEMANGLING) + { + /* With GNU style demangling, bar__3foo is 'foo::bar(void)', and + bar__3fooi is 'foo::bar(int)'. We get here when we find the + first case, and need to ensure that the '(void)' gets added to + the current declp. Note that with ARM, the first case + represents the name of a static data member 'foo::bar', + which is in the current declp, so we leave it alone. */ + success = demangle_args (work, mangled, declp); + } + } + if (success && work -> static_type && PRINT_ARG_TYPES) + { + string_append (declp, " static"); + } + if (success && work -> const_type && PRINT_ARG_TYPES) + { + string_append (declp, " const"); + } + return (success); + } + + #if 0 + + static int + demangle_method_args (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int success = 0; + + if (work -> static_type) + { + string_append (declp, *mangled + 1); + *mangled += strlen (*mangled); + success = 1; + } + else + { + success = demangle_args (work, mangled, declp); + } + return (success); + } + + #endif + + static int + demangle_template (work, mangled, tname, trawname) + struct work_stuff *work; + const char **mangled; + string *tname; + string *trawname; + { + int i; + int is_pointer; + int is_real; + int is_integral; + int is_char; + int is_bool; + int r; + int need_comma = 0; + int success = 0; + int done; + const char *old_p; + const char *start; + int symbol_len; + string temp; + + (*mangled)++; + start = *mangled; + /* get template name */ + if ((r = consume_count (mangled)) == 0 || strlen (*mangled) < r) + { + return (0); + } + if (trawname) + string_appendn (trawname, *mangled, r); + string_appendn (tname, *mangled, r); + *mangled += r; + string_append (tname, "<"); + /* get size of template parameter list */ + if (!get_count (mangled, &r)) + { + return (0); + } + for (i = 0; i < r; i++) + { + if (need_comma) + { + string_append (tname, ", "); + } + /* Z for type parameters */ + if (**mangled == 'Z') + { + (*mangled)++; + /* temp is initialized in do_type */ + success = do_type (work, mangled, &temp); + if (success) + { + string_appends (tname, &temp); + } + string_delete(&temp); + if (!success) + { + break; + } + } + else + { + /* otherwise, value parameter */ + old_p = *mangled; + is_pointer = 0; + is_real = 0; + is_integral = 0; + is_char = 0; + done = 0; + /* temp is initialized in do_type */ + success = do_type (work, mangled, &temp); + /* + if (success) + { + string_appends (tname, &temp); + } + */ + string_delete(&temp); + if (!success) + { + break; + } + /* + string_append (tname, "="); + */ + while (*old_p && !done) + { + switch (*old_p) + { + case 'P': + case 'p': + case 'R': + done = is_pointer = 1; + break; + case 'C': /* const */ + case 'S': /* explicitly signed [char] */ + case 'U': /* unsigned */ + case 'V': /* volatile */ + case 'F': /* function */ + case 'M': /* member function */ + case 'O': /* ??? */ + old_p++; + continue; + case 'Q': /* qualified name */ + done = is_integral = 1; + break; + case 'T': /* remembered type */ + abort (); + break; + case 'v': /* void */ + abort (); + break; + case 'x': /* long long */ + case 'l': /* long */ + case 'i': /* int */ + case 's': /* short */ + case 'w': /* wchar_t */ + done = is_integral = 1; + break; + case 'b': /* bool */ + done = is_bool = 1; + break; + case 'c': /* char */ + done = is_char = 1; + break; + case 'r': /* long double */ + case 'd': /* double */ + case 'f': /* float */ + done = is_real = 1; + break; + default: + /* it's probably user defined type, let's assume + it's integral, it seems hard to figure out + what it really is */ + done = is_integral = 1; + } + } + if (is_integral) + { + if (**mangled == 'm') + { + string_appendn (tname, "-", 1); + (*mangled)++; + } + while (isdigit (**mangled)) + { + string_appendn (tname, *mangled, 1); + (*mangled)++; + } + } + else if (is_char) + { + char tmp[2]; + int val; + if (**mangled == 'm') + { + string_appendn (tname, "-", 1); + (*mangled)++; + } + string_appendn (tname, "'", 1); + val = consume_count(mangled); + if (val == 0) + { + success = 0; + break; + } + tmp[0] = (char)val; + tmp[1] = '\0'; + string_appendn (tname, &tmp[0], 1); + string_appendn (tname, "'", 1); + } + else if (is_bool) + { + int val = consume_count (mangled); + if (val == 0) + string_appendn (tname, "false", 5); + else if (val == 1) + string_appendn (tname, "true", 4); + else + success = 0; + } + else if (is_real) + { + if (**mangled == 'm') + { + string_appendn (tname, "-", 1); + (*mangled)++; + } + while (isdigit (**mangled)) + { + string_appendn (tname, *mangled, 1); + (*mangled)++; + } + if (**mangled == '.') /* fraction */ + { + string_appendn (tname, ".", 1); + (*mangled)++; + while (isdigit (**mangled)) + { + string_appendn (tname, *mangled, 1); + (*mangled)++; + } + } + if (**mangled == 'e') /* exponent */ + { + string_appendn (tname, "e", 1); + (*mangled)++; + while (isdigit (**mangled)) + { + string_appendn (tname, *mangled, 1); + (*mangled)++; + } + } + } + else if (is_pointer) + { + if (!get_count (mangled, &symbol_len)) + { + success = 0; + break; + } + string_appendn (tname, *mangled, symbol_len); + *mangled += symbol_len; + } + } + need_comma = 1; + } + if (tname->p[-1] == '>') + string_append (tname, " "); + string_append (tname, ">"); + + /* + if (work -> static_type) + { + string_append (declp, *mangled + 1); + *mangled += strlen (*mangled); + success = 1; + } + else + { + success = demangle_args (work, mangled, declp); + } + } + */ + return (success); + } + + static int + arm_pt (work, mangled, n, anchor, args) + struct work_stuff *work; + const char *mangled; + int n; + const char **anchor, **args; + { + /* ARM template? */ + if (ARM_DEMANGLING && (*anchor = mystrstr (mangled, "__pt__"))) + { + int len; + *args = *anchor + 6; + len = consume_count (args); + if (*args + len == mangled + n && **args == '_') + { + ++*args; + return 1; + } + } + return 0; + } + + static void + demangle_arm_pt (work, mangled, n, declp) + struct work_stuff *work; + const char **mangled; + int n; + string *declp; + { + const char *p; + const char *args; + const char *e = *mangled + n; + + /* ARM template? */ + if (arm_pt (work, *mangled, n, &p, &args)) + { + string arg; + string_init (&arg); + string_appendn (declp, *mangled, p - *mangled); + string_append (declp, "<"); + /* should do error checking here */ + while (args < e) { + string_clear (&arg); + do_type (work, &args, &arg); + string_appends (declp, &arg); + string_append (declp, ","); + } + string_delete (&arg); + --declp->p; + string_append (declp, ">"); + } + else + { + string_appendn (declp, *mangled, n); + } + *mangled += n; + } + + static int + demangle_class_name (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int n; + int success = 0; + + n = consume_count (mangled); + if (strlen (*mangled) >= n) + { + demangle_arm_pt (work, mangled, n, declp); + success = 1; + } + + return (success); + } + + /* + + LOCAL FUNCTION + + demangle_class -- demangle a mangled class sequence + + SYNOPSIS + + static int + demangle_class (struct work_stuff *work, const char **mangled, + strint *declp) + + DESCRIPTION + + DECLP points to the buffer into which demangling is being done. + + *MANGLED points to the current token to be demangled. On input, + it points to a mangled class (I.E. "3foo", "13verylongclass", etc.) + On exit, it points to the next token after the mangled class on + success, or the first unconsumed token on failure. + + If the constRUCTOR or DESTRUCTOR flags are set in WORK, then + we are demangling a constructor or destructor. In this case + we prepend "class::class" or "class::~class" to DECLP. + + Otherwise, we prepend "class::" to the current DECLP. + + Reset the constructor/destructor flags once they have been + "consumed". This allows demangle_class to be called later during + the same demangling, to do normal class demangling. + + Returns 1 if demangling is successful, 0 otherwise. + + */ + + static int + demangle_class (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int success = 0; + string class_name; + + string_init (&class_name); + if (demangle_class_name (work, mangled, &class_name)) + { + if ((work->constructor & 1) || (work->destructor & 1)) + { + string_prepends (declp, &class_name); + if (work -> destructor & 1) + { + string_prepend (declp, "~"); + work -> destructor -= 1; + } + else + { + work -> constructor -= 1; + } + } + string_prepend (declp, "::"); + string_prepends (declp, &class_name); + success = 1; + } + string_delete (&class_name); + return (success); + } + + /* + + LOCAL FUNCTION + + demangle_prefix -- consume the mangled name prefix and find signature + + SYNOPSIS + + static int + demangle_prefix (struct work_stuff *work, const char **mangled, + string *declp); + + DESCRIPTION + + Consume and demangle the prefix of the mangled name. + + DECLP points to the string buffer into which demangled output is + placed. On entry, the buffer is empty. On exit it contains + the root function name, the demangled operator name, or in some + special cases either nothing or the completely demangled result. + + MANGLED points to the current pointer into the mangled name. As each + token of the mangled name is consumed, it is updated. Upon entry + the current mangled name pointer points to the first character of + the mangled name. Upon exit, it should point to the first character + of the signature if demangling was successful, or to the first + unconsumed character if demangling of the prefix was unsuccessful. + + Returns 1 on success, 0 otherwise. + */ + + static int + demangle_prefix (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int success = 1; + const char *scan; + int i; + + if (strlen(*mangled) >= 11 && strncmp(*mangled, "_GLOBAL_", 8) == 0) + { + char *marker = strchr (cplus_markers, (*mangled)[8]); + if (marker != NULL && *marker == (*mangled)[10]) + { + if ((*mangled)[9] == 'D') + { + /* it's a GNU global destructor to be executed at program exit */ + (*mangled) += 11; + work->destructor = 2; + if (gnu_special (work, mangled, declp)) + return success; + } + else if ((*mangled)[9] == 'I') + { + /* it's a GNU global constructor to be executed at program init */ + (*mangled) += 11; + work->constructor = 2; + if (gnu_special (work, mangled, declp)) + return success; + } + } + } + else if (ARM_DEMANGLING && strncmp(*mangled, "__std__", 7) == 0) + { + /* it's a ARM global destructor to be executed at program exit */ + (*mangled) += 7; + work->destructor = 2; + } + else if (ARM_DEMANGLING && strncmp(*mangled, "__sti__", 7) == 0) + { + /* it's a ARM global constructor to be executed at program initial */ + (*mangled) += 7; + work->constructor = 2; + } + + /* This block of code is a reduction in strength time optimization + of: + scan = mystrstr (*mangled, "__"); */ + + { + scan = *mangled; + + do { + scan = strchr (scan, '_'); + } while (scan != NULL && *++scan != '_'); + + if (scan != NULL) --scan; + } + + if (scan != NULL) + { + /* We found a sequence of two or more '_', ensure that we start at + the last pair in the sequence. */ + i = strspn (scan, "_"); + if (i > 2) + { + scan += (i - 2); + } + } + + if (scan == NULL) + { + success = 0; + } + else if (work -> static_type) + { + if (!isdigit (scan[0]) && (scan[0] != 't')) + { + success = 0; + } + } + else if ((scan == *mangled) && + (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't'))) + { + /* The ARM says nothing about the mangling of local variables. + But cfront mangles local variables by prepending __ + to them. As an extension to ARM demangling we handle this case. */ + if ((LUCID_DEMANGLING || ARM_DEMANGLING) && isdigit (scan[2])) + { + *mangled = scan + 2; + consume_count (mangled); + string_append (declp, *mangled); + *mangled += strlen (*mangled); + success = 1; + } + else + { + /* A GNU style constructor starts with __[0-9Qt]. But cfront uses + names like __Q2_3foo3bar for nested type names. So don't accept + this style of constructor for cfront demangling. */ + if (!(LUCID_DEMANGLING || ARM_DEMANGLING)) + work -> constructor += 1; + *mangled = scan + 2; + } + } + else if ((scan == *mangled) && !isdigit (scan[2]) && (scan[2] != 't')) + { + /* Mangled name starts with "__". Skip over any leading '_' characters, + then find the next "__" that separates the prefix from the signature. + */ + if (!(ARM_DEMANGLING || LUCID_DEMANGLING) + || (arm_special (work, mangled, declp) == 0)) + { + while (*scan == '_') + { + scan++; + } + if ((scan = mystrstr (scan, "__")) == NULL || (*(scan + 2) == '\0')) + { + /* No separator (I.E. "__not_mangled"), or empty signature + (I.E. "__not_mangled_either__") */ + success = 0; + } + else + { + demangle_function_name (work, mangled, declp, scan); + } + } + } + else if (ARM_DEMANGLING && scan[2] == 'p' && scan[3] == 't') + { + /* Cfront-style parameterized type. Handled later as a signature. */ + success = 1; + + /* ARM template? */ + demangle_arm_pt (work, mangled, strlen (*mangled), declp); + } + else if (*(scan + 2) != '\0') + { + /* Mangled name does not start with "__" but does have one somewhere + in there with non empty stuff after it. Looks like a global + function name. */ + demangle_function_name (work, mangled, declp, scan); + } + else + { + /* Doesn't look like a mangled name */ + success = 0; + } + + if (!success && (work->constructor == 2 || work->destructor == 2)) + { + string_append (declp, *mangled); + *mangled += strlen (*mangled); + success = 1; + } + return (success); + } + + /* + + LOCAL FUNCTION + + gnu_special -- special handling of gnu mangled strings + + SYNOPSIS + + static int + gnu_special (struct work_stuff *work, const char **mangled, + string *declp); + + + DESCRIPTION + + Process some special GNU style mangling forms that don't fit + the normal pattern. For example: + + _$_3foo (destructor for class foo) + _vt$foo (foo virtual table) + _vt$foo$bar (foo::bar virtual table) + __vt_foo (foo virtual table, new style with thunks) + _3foo$varname (static data member) + _Q22rs2tu$vw (static data member) + __t6vector1Zii (constructor with template) + __thunk_4__$_7ostream (virtual function thunk) + */ + + static int + gnu_special (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int n; + int success = 1; + const char *p; + + if ((*mangled)[0] == '_' + && strchr (cplus_markers, (*mangled)[1]) != NULL + && (*mangled)[2] == '_') + { + /* Found a GNU style destructor, get past "__" */ + (*mangled) += 3; + work -> destructor += 1; + } + else if ((*mangled)[0] == '_' + && (((*mangled)[1] == '_' + && (*mangled)[2] == 'v' + && (*mangled)[3] == 't' + && (*mangled)[4] == '_') + || ((*mangled)[1] == 'v' + && (*mangled)[2] == 't' + && strchr (cplus_markers, (*mangled)[3]) != NULL))) + { + /* Found a GNU style virtual table, get past "_vt" + and create the decl. Note that we consume the entire mangled + input string, which means that demangle_signature has no work + to do. */ + if ((*mangled)[2] == 'v') + (*mangled) += 5; /* New style, with thunks: "__vt_" */ + else + (*mangled) += 4; /* Old style, no thunks: "_vt" */ + while (**mangled != '\0') + { + p = strpbrk (*mangled, cplus_markers); + switch (**mangled) + { + case 'Q': + success = demangle_qualified (work, mangled, declp, 0, 1); + break; + case 't': + success = demangle_template (work, mangled, declp, 0); + break; + default: + if (isdigit(*mangled[0])) + { + n = consume_count(mangled); + } + else + { + n = strcspn (*mangled, cplus_markers); + } + string_appendn (declp, *mangled, n); + (*mangled) += n; + } + + if (success && ((p == NULL) || (p == *mangled))) + { + if (p != NULL) + { + string_append (declp, "::"); + (*mangled)++; + } + } + else + { + success = 0; + break; + } + } + if (success) + string_append (declp, " virtual table"); + } + else if ((*mangled)[0] == '_' + && (strchr("0123456789Qt", (*mangled)[1]) != NULL) + && (p = strpbrk (*mangled, cplus_markers)) != NULL) + { + /* static data member, "_3foo$varname" for example */ + (*mangled)++; + switch (**mangled) + { + case 'Q': + success = demangle_qualified (work, mangled, declp, 0, 1); + break; + case 't': + success = demangle_template (work, mangled, declp, 0); + break; + default: + n = consume_count (mangled); + string_appendn (declp, *mangled, n); + (*mangled) += n; + } + if (success && (p == *mangled)) + { + /* Consumed everything up to the cplus_marker, append the + variable name. */ + (*mangled)++; + string_append (declp, "::"); + n = strlen (*mangled); + string_appendn (declp, *mangled, n); + (*mangled) += n; + } + else + { + success = 0; + } + } + else if (strncmp (*mangled, "__thunk_", 8) == 0) + { + int delta = ((*mangled) += 8, consume_count (mangled)); + char *method = cplus_demangle (++*mangled, work->options); + if (method) + { + char buf[50]; + sprintf (buf, "virtual function thunk (delta:%d) for ", -delta); + string_append (declp, buf); + string_append (declp, method); + free (method); + n = strlen (*mangled); + (*mangled) += n; + } + else + { + success = 0; + } + } + else + { + success = 0; + } + return (success); + } + + /* + + LOCAL FUNCTION + + arm_special -- special handling of ARM/lucid mangled strings + + SYNOPSIS + + static int + arm_special (struct work_stuff *work, const char **mangled, + string *declp); + + + DESCRIPTION + + Process some special ARM style mangling forms that don't fit + the normal pattern. For example: + + __vtbl__3foo (foo virtual table) + __vtbl__3foo__3bar (bar::foo virtual table) + + */ + + static int + arm_special (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + int n; + int success = 1; + const char *scan; + + if (strncmp (*mangled, ARM_VTABLE_STRING, ARM_VTABLE_STRLEN) == 0) + { + /* Found a ARM style virtual table, get past ARM_VTABLE_STRING + and create the decl. Note that we consume the entire mangled + input string, which means that demangle_signature has no work + to do. */ + scan = *mangled + ARM_VTABLE_STRLEN; + while (*scan != '\0') /* first check it can be demangled */ + { + n = consume_count (&scan); + if (n==0) + { + return (0); /* no good */ + } + scan += n; + if (scan[0] == '_' && scan[1] == '_') + { + scan += 2; + } + } + (*mangled) += ARM_VTABLE_STRLEN; + while (**mangled != '\0') + { + n = consume_count (mangled); + string_prependn (declp, *mangled, n); + (*mangled) += n; + if ((*mangled)[0] == '_' && (*mangled)[1] == '_') + { + string_prepend (declp, "::"); + (*mangled) += 2; + } + } + string_append (declp, " virtual table"); + } + else + { + success = 0; + } + return (success); + } + + /* + + LOCAL FUNCTION + + demangle_qualified -- demangle 'Q' qualified name strings + + SYNOPSIS + + static int + demangle_qualified (struct work_stuff *, const char *mangled, + string *result, int isfuncname, int append); + + DESCRIPTION + + Demangle a qualified name, such as "Q25Outer5Inner" which is + the mangled form of "Outer::Inner". The demangled output is + prepended or appended to the result string according to the + state of the append flag. + + If isfuncname is nonzero, then the qualified name we are building + is going to be used as a member function name, so if it is a + constructor or destructor function, append an appropriate + constructor or destructor name. I.E. for the above example, + the result for use as a constructor is "Outer::Inner::Inner" + and the result for use as a destructor is "Outer::Inner::~Inner". + + BUGS + + Numeric conversion is ASCII dependent (FIXME). + + */ + + static int + demangle_qualified (work, mangled, result, isfuncname, append) + struct work_stuff *work; + const char **mangled; + string *result; + int isfuncname; + int append; + { + int qualifiers; + int namelength; + int success = 1; + const char *p; + char num[2]; + string temp; + + string_init (&temp); + switch ((*mangled)[1]) + { + case '_': + /* GNU mangled name with more than 9 classes. The count is preceded + by an underscore (to distinguish it from the <= 9 case) and followed + by an underscore. */ + p = *mangled + 2; + qualifiers = atoi (p); + if (!isdigit (*p) || *p == '0') + success = 0; + + /* Skip the digits. */ + while (isdigit (*p)) + ++p; + + if (*p != '_') + success = 0; + + *mangled = p + 1; + break; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + /* The count is in a single digit. */ + num[0] = (*mangled)[1]; + num[1] = '\0'; + qualifiers = atoi (num); + + /* If there is an underscore after the digit, skip it. This is + said to be for ARM-qualified names, but the ARM makes no + mention of such an underscore. Perhaps cfront uses one. */ + if ((*mangled)[2] == '_') + { + (*mangled)++; + } + (*mangled) += 2; + break; + + case '0': + default: + success = 0; + } + + if (!success) + return success; + + /* Pick off the names and collect them in the temp buffer in the order + in which they are found, separated by '::'. */ + + while (qualifiers-- > 0) + { + if (*mangled[0] == '_') + *mangled = *mangled + 1; + if (*mangled[0] == 't') + { + success = demangle_template(work, mangled, &temp, 0); + if (!success) break; + } + else + { + namelength = consume_count (mangled); + if (strlen (*mangled) < namelength) + { + /* Simple sanity check failed */ + success = 0; + break; + } + string_appendn (&temp, *mangled, namelength); + *mangled += namelength; + } + if (qualifiers > 0) + { + string_appendn (&temp, "::", 2); + } + } + + /* If we are using the result as a function name, we need to append + the appropriate '::' separated constructor or destructor name. + We do this here because this is the most convenient place, where + we already have a pointer to the name and the length of the name. */ + + if (isfuncname && (work->constructor & 1 || work->destructor & 1)) + { + string_appendn (&temp, "::", 2); + if (work -> destructor & 1) + { + string_append (&temp, "~"); + } + string_appendn (&temp, (*mangled) - namelength, namelength); + } + + /* Now either prepend the temp buffer to the result, or append it, + depending upon the state of the append flag. */ + + if (append) + { + string_appends (result, &temp); + } + else + { + if (!STRING_EMPTY (result)) + { + string_appendn (&temp, "::", 2); + } + string_prepends (result, &temp); + } + + string_delete (&temp); + return (success); + } + + /* + + LOCAL FUNCTION + + get_count -- convert an ascii count to integer, consuming tokens + + SYNOPSIS + + static int + get_count (const char **type, int *count) + + DESCRIPTION + + Return 0 if no conversion is performed, 1 if a string is converted. + */ + + static int + get_count (type, count) + const char **type; + int *count; + { + const char *p; + int n; + + if (!isdigit (**type)) + { + return (0); + } + else + { + *count = **type - '0'; + (*type)++; + if (isdigit (**type)) + { + p = *type; + n = *count; + do + { + n *= 10; + n += *p - '0'; + p++; + } + while (isdigit (*p)); + if (*p == '_') + { + *type = p + 1; + *count = n; + } + } + } + return (1); + } + + /* result will be initialised here; it will be freed on failure */ + + static int + do_type (work, mangled, result) + struct work_stuff *work; + const char **mangled; + string *result; + { + int n; + int done; + int success; + string decl; + const char *remembered_type; + int constp; + int volatilep; + + string_init (&decl); + string_init (result); + + done = 0; + success = 1; + while (success && !done) + { + int member; + switch (**mangled) + { + + /* A pointer type */ + case 'P': + case 'p': + (*mangled)++; + string_prepend (&decl, "*"); + break; + + /* A reference type */ + case 'R': + (*mangled)++; + string_prepend (&decl, "&"); + break; + + /* An array */ + case 'A': + { + const char *p = ++(*mangled); + + string_prepend (&decl, "("); + string_append (&decl, ")["); + /* Copy anything up until the next underscore (the size of the + array). */ + while (**mangled && **mangled != '_') + ++(*mangled); + if (**mangled == '_') + { + string_appendn (&decl, p, *mangled - p); + string_append (&decl, "]"); + *mangled += 1; + } + else + success = 0; + break; + } + + /* A back reference to a previously seen type */ + case 'T': + (*mangled)++; + if (!get_count (mangled, &n) || n >= work -> ntypes) + { + success = 0; + } + else + { + remembered_type = work -> typevec[n]; + mangled = &remembered_type; + } + break; + + /* A function */ + case 'F': + (*mangled)++; + if (!STRING_EMPTY (&decl) && decl.b[0] == '*') + { + string_prepend (&decl, "("); + string_append (&decl, ")"); + } + /* After picking off the function args, we expect to either find the + function return type (preceded by an '_') or the end of the + string. */ + if (!demangle_args (work, mangled, &decl) + || (**mangled != '_' && **mangled != '\0')) + { + success = 0; + } + if (success && (**mangled == '_')) + { + (*mangled)++; + } + break; + + case 'M': + case 'O': + { + constp = 0; + volatilep = 0; + + member = **mangled == 'M'; + (*mangled)++; + if (!isdigit (**mangled)) + { + success = 0; + break; + } + n = consume_count (mangled); + if (strlen (*mangled) < n) + { + success = 0; + break; + } + string_append (&decl, ")"); + string_prepend (&decl, "::"); + string_prependn (&decl, *mangled, n); + string_prepend (&decl, "("); + *mangled += n; + if (member) + { + if (**mangled == 'C') + { + (*mangled)++; + constp = 1; + } + if (**mangled == 'V') + { + (*mangled)++; + volatilep = 1; + } + if (*(*mangled)++ != 'F') + { + success = 0; + break; + } + } + if ((member && !demangle_args (work, mangled, &decl)) + || **mangled != '_') + { + success = 0; + break; + } + (*mangled)++; + if (! PRINT_ANSI_QUALIFIERS) + { + break; + } + if (constp) + { + APPEND_BLANK (&decl); + string_append (&decl, "const"); + } + if (volatilep) + { + APPEND_BLANK (&decl); + string_append (&decl, "volatile"); + } + break; + } + case 'G': + (*mangled)++; + break; + + case 'C': + (*mangled)++; + /* + if ((*mangled)[1] == 'P') + { + */ + if (PRINT_ANSI_QUALIFIERS) + { + if (!STRING_EMPTY (&decl)) + { + string_prepend (&decl, " "); + } + string_prepend (&decl, "const"); + } + break; + /* + } + */ + + /* fall through */ + default: + done = 1; + break; + } + } + + switch (**mangled) + { + /* A qualified name, such as "Outer::Inner". */ + case 'Q': + success = demangle_qualified (work, mangled, result, 0, 1); + break; + + default: + success = demangle_fund_type (work, mangled, result); + break; + } + + if (success) + { + if (!STRING_EMPTY (&decl)) + { + string_append (result, " "); + string_appends (result, &decl); + } + } + else + { + string_delete (result); + } + string_delete (&decl); + return (success); + } + + /* Given a pointer to a type string that represents a fundamental type + argument (int, long, unsigned int, etc) in TYPE, a pointer to the + string in which the demangled output is being built in RESULT, and + the WORK structure, decode the types and add them to the result. + + For example: + + "Ci" => "const int" + "Sl" => "signed long" + "CUs" => "const unsigned short" + + */ + + static int + demangle_fund_type (work, mangled, result) + struct work_stuff *work; + const char **mangled; + string *result; + { + int done = 0; + int success = 1; + + /* First pick off any type qualifiers. There can be more than one. */ + + while (!done) + { + switch (**mangled) + { + case 'C': + (*mangled)++; + if (PRINT_ANSI_QUALIFIERS) + { + APPEND_BLANK (result); + string_append (result, "const"); + } + break; + case 'U': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "unsigned"); + break; + case 'S': /* signed char only */ + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "signed"); + break; + case 'V': + (*mangled)++; + if (PRINT_ANSI_QUALIFIERS) + { + APPEND_BLANK (result); + string_append (result, "volatile"); + } + break; + default: + done = 1; + break; + } + } + + /* Now pick off the fundamental type. There can be only one. */ + + switch (**mangled) + { + case '\0': + case '_': + break; + case 'v': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "void"); + break; + case 'x': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "long long"); + break; + case 'l': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "long"); + break; + case 'i': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "int"); + break; + case 's': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "short"); + break; + case 'b': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "bool"); + break; + case 'c': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "char"); + break; + case 'w': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "wchar_t"); + break; + case 'r': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "long double"); + break; + case 'd': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "double"); + break; + case 'f': + (*mangled)++; + APPEND_BLANK (result); + string_append (result, "float"); + break; + case 'G': + (*mangled)++; + if (!isdigit (**mangled)) + { + success = 0; + break; + } + /* fall through */ + /* An explicit type, such as "6mytype" or "7integer" */ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + APPEND_BLANK (result); + if (!demangle_class_name (work, mangled, result)) { + --result->p; + success = 0; + } + break; + case 't': + success = demangle_template(work,mangled, result, 0); + break; + default: + success = 0; + break; + } + + return (success); + } + + /* `result' will be initialized in do_type; it will be freed on failure */ + + static int + do_arg (work, mangled, result) + struct work_stuff *work; + const char **mangled; + string *result; + { + const char *start = *mangled; + + if (!do_type (work, mangled, result)) + { + return (0); + } + else + { + remember_type (work, start, *mangled - start); + return (1); + } + } + + static void + remember_type (work, start, len) + struct work_stuff *work; + const char *start; + int len; + { + char *tem; + + if (work -> ntypes >= work -> typevec_size) + { + if (work -> typevec_size == 0) + { + work -> typevec_size = 3; + work -> typevec = + (char **) xmalloc (sizeof (char *) * work -> typevec_size); + } + else + { + work -> typevec_size *= 2; + work -> typevec = + (char **) xrealloc ((char *)work -> typevec, + sizeof (char *) * work -> typevec_size); + } + } + tem = xmalloc (len + 1); + memcpy (tem, start, len); + tem[len] = '\0'; + work -> typevec[work -> ntypes++] = tem; + } + + /* Forget the remembered types, but not the type vector itself. */ + + static void + forget_types (work) + struct work_stuff *work; + { + int i; + + while (work -> ntypes > 0) + { + i = --(work -> ntypes); + if (work -> typevec[i] != NULL) + { + free (work -> typevec[i]); + work -> typevec[i] = NULL; + } + } + } + + /* Process the argument list part of the signature, after any class spec + has been consumed, as well as the first 'F' character (if any). For + example: + + "__als__3fooRT0" => process "RT0" + "complexfunc5__FPFPc_PFl_i" => process "PFPc_PFl_i" + + DECLP must be already initialised, usually non-empty. It won't be freed + on failure. + + Note that g++ differs significantly from ARM and lucid style mangling + with regards to references to previously seen types. For example, given + the source fragment: + + class foo { + public: + foo::foo (int, foo &ia, int, foo &ib, int, foo &ic); + }; + + foo::foo (int, foo &ia, int, foo &ib, int, foo &ic) { ia = ib = ic; } + void foo (int, foo &ia, int, foo &ib, int, foo &ic) { ia = ib = ic; } + + g++ produces the names: + + __3fooiRT0iT2iT2 + foo__FiR3fooiT1iT1 + + while lcc (and presumably other ARM style compilers as well) produces: + + foo__FiR3fooT1T2T1T2 + __ct__3fooFiR3fooT1T2T1T2 + + Note that g++ bases it's type numbers starting at zero and counts all + previously seen types, while lucid/ARM bases it's type numbers starting + at one and only considers types after it has seen the 'F' character + indicating the start of the function args. For lucid/ARM style, we + account for this difference by discarding any previously seen types when + we see the 'F' character, and subtracting one from the type number + reference. + + */ + + static int + demangle_args (work, mangled, declp) + struct work_stuff *work; + const char **mangled; + string *declp; + { + string arg; + int need_comma = 0; + int r; + int t; + const char *tem; + char temptype; + + if (PRINT_ARG_TYPES) + { + string_append (declp, "("); + if (**mangled == '\0') + { + string_append (declp, "void"); + } + } + + while (**mangled != '_' && **mangled != '\0' && **mangled != 'e') + { + if ((**mangled == 'N') || (**mangled == 'T')) + { + temptype = *(*mangled)++; + + if (temptype == 'N') + { + if (!get_count (mangled, &r)) + { + return (0); + } + } + else + { + r = 1; + } + if (ARM_DEMANGLING && work -> ntypes >= 10) + { + /* If we have 10 or more types we might have more than a 1 digit + index so we'll have to consume the whole count here. This + will lose if the next thing is a type name preceded by a + count but it's impossible to demangle that case properly + anyway. Eg if we already have 12 types is T12Pc "(..., type1, + Pc, ...)" or "(..., type12, char *, ...)" */ + if ((t = consume_count(mangled)) == 0) + { + return (0); + } + } + else + { + if (!get_count (mangled, &t)) + { + return (0); + } + } + if (LUCID_DEMANGLING || ARM_DEMANGLING) + { + t--; + } + /* Validate the type index. Protect against illegal indices from + malformed type strings. */ + if ((t < 0) || (t >= work -> ntypes)) + { + return (0); + } + while (--r >= 0) + { + tem = work -> typevec[t]; + if (need_comma && PRINT_ARG_TYPES) + { + string_append (declp, ", "); + } + if (!do_arg (work, &tem, &arg)) + { + return (0); + } + if (PRINT_ARG_TYPES) + { + string_appends (declp, &arg); + } + string_delete (&arg); + need_comma = 1; + } + } + else + { + if (need_comma & PRINT_ARG_TYPES) + { + string_append (declp, ", "); + } + if (!do_arg (work, mangled, &arg)) + { + return (0); + } + if (PRINT_ARG_TYPES) + { + string_appends (declp, &arg); + } + string_delete (&arg); + need_comma = 1; + } + } + + if (**mangled == 'e') + { + (*mangled)++; + if (PRINT_ARG_TYPES) + { + if (need_comma) + { + string_append (declp, ","); + } + string_append (declp, "..."); + } + } + + if (PRINT_ARG_TYPES) + { + string_append (declp, ")"); + } + return (1); + } + + static void + demangle_function_name (work, mangled, declp, scan) + struct work_stuff *work; + const char **mangled; + string *declp; + const char *scan; + { + int i; + int len; + string type; + const char *tem; + + string_appendn (declp, (*mangled), scan - (*mangled)); + string_need (declp, 1); + *(declp -> p) = '\0'; + + /* Consume the function name, including the "__" separating the name + from the signature. We are guaranteed that SCAN points to the + separator. */ + + (*mangled) = scan + 2; + + if (LUCID_DEMANGLING || ARM_DEMANGLING) + { + + /* See if we have an ARM style constructor or destructor operator. + If so, then just record it, clear the decl, and return. + We can't build the actual constructor/destructor decl until later, + when we recover the class name from the signature. */ + + if (strcmp (declp -> b, "__ct") == 0) + { + work -> constructor += 1; + string_clear (declp); + return; + } + else if (strcmp (declp -> b, "__dt") == 0) + { + work -> destructor += 1; + string_clear (declp); + return; + } + } + + if (declp->p - declp->b >= 3 + && declp->b[0] == 'o' + && declp->b[1] == 'p' + && strchr (cplus_markers, declp->b[2]) != NULL) + { + /* see if it's an assignment expression */ + if (declp->p - declp->b >= 10 /* op$assign_ */ + && memcmp (declp->b + 3, "assign_", 7) == 0) + { + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + len = declp->p - declp->b - 10; + if (strlen (optable[i].in) == len + && memcmp (optable[i].in, declp->b + 10, len) == 0) + { + string_clear (declp); + string_append (declp, "operator"); + string_append (declp, optable[i].out); + string_append (declp, "="); + break; + } + } + } + else + { + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + int len = declp->p - declp->b - 3; + if (strlen (optable[i].in) == len + && memcmp (optable[i].in, declp->b + 3, len) == 0) + { + string_clear (declp); + string_append (declp, "operator"); + string_append (declp, optable[i].out); + break; + } + } + } + } + else if (declp->p - declp->b >= 5 && memcmp (declp->b, "type", 4) == 0 + && strchr (cplus_markers, declp->b[4]) != NULL) + { + /* type conversion operator */ + tem = declp->b + 5; + if (do_type (work, &tem, &type)) + { + string_clear (declp); + string_append (declp, "operator "); + string_appends (declp, &type); + string_delete (&type); + } + } + else if (declp->b[0] == '_' && declp->b[1] == '_' + && declp->b[2] == 'o' && declp->b[3] == 'p') + { + /* ANSI. */ + /* type conversion operator. */ + tem = declp->b + 4; + if (do_type (work, &tem, &type)) + { + string_clear (declp); + string_append (declp, "operator "); + string_appends (declp, &type); + string_delete (&type); + } + } + else if (declp->b[0] == '_' && declp->b[1] == '_' + && declp->b[2] >= 'a' && declp->b[2] <= 'z' + && declp->b[3] >= 'a' && declp->b[3] <= 'z') + { + if (declp->b[4] == '\0') + { + /* Operator. */ + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + if (strlen (optable[i].in) == 2 + && memcmp (optable[i].in, declp->b + 2, 2) == 0) + { + string_clear (declp); + string_append (declp, "operator"); + string_append (declp, optable[i].out); + break; + } + } + } + else + { + if (declp->b[2] == 'a' && declp->b[5] == '\0') + { + /* Assignment. */ + for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++) + { + if (strlen (optable[i].in) == 3 + && memcmp (optable[i].in, declp->b + 2, 3) == 0) + { + string_clear (declp); + string_append (declp, "operator"); + string_append (declp, optable[i].out); + break; + } + } + } + } + } + } + + /* a mini string-handling package */ + + static void + string_need (s, n) + string *s; + int n; + { + int tem; + + if (s->b == NULL) + { + if (n < 32) + { + n = 32; + } + s->p = s->b = xmalloc (n); + s->e = s->b + n; + } + else if (s->e - s->p < n) + { + tem = s->p - s->b; + n += tem; + n *= 2; + s->b = xrealloc (s->b, n); + s->p = s->b + tem; + s->e = s->b + n; + } + } + + static void + string_delete (s) + string *s; + { + if (s->b != NULL) + { + free (s->b); + s->b = s->e = s->p = NULL; + } + } + + static void + string_init (s) + string *s; + { + s->b = s->p = s->e = NULL; + } + + static void + string_clear (s) + string *s; + { + s->p = s->b; + } + + #if 0 + + static int + string_empty (s) + string *s; + { + return (s->b == s->p); + } + + #endif + + static void + string_append (p, s) + string *p; + const char *s; + { + int n; + if (s == NULL || *s == '\0') + return; + n = strlen (s); + string_need (p, n); + memcpy (p->p, s, n); + p->p += n; + } + + static void + string_appends (p, s) + string *p, *s; + { + int n; + + if (s->b != s->p) + { + n = s->p - s->b; + string_need (p, n); + memcpy (p->p, s->b, n); + p->p += n; + } + } + + static void + string_appendn (p, s, n) + string *p; + const char *s; + int n; + { + if (n != 0) + { + string_need (p, n); + memcpy (p->p, s, n); + p->p += n; + } + } + + static void + string_prepend (p, s) + string *p; + const char *s; + { + if (s != NULL && *s != '\0') + { + string_prependn (p, s, strlen (s)); + } + } + + static void + string_prepends (p, s) + string *p, *s; + { + if (s->b != s->p) + { + string_prependn (p, s->b, s->p - s->b); + } + } + + static void + string_prependn (p, s, n) + string *p; + const char *s; + int n; + { + char *q; + + if (n != 0) + { + string_need (p, n); + for (q = p->p - 1; q >= p->b; q--) + { + q[n] = q[0]; + } + memcpy (p->b, s, n); + p->p += n; + } + } + + /* To generate a standalone demangler program for testing purposes, + just compile and link this file with -DMAIN and libiberty.a. When + run, it demangles each command line arg, or each stdin string, and + prints the result on stdout. */ + + #ifdef MAIN + + static void + demangle_it (mangled_name) + char *mangled_name; + { + char *result; + + result = cplus_demangle (mangled_name, DMGL_PARAMS | DMGL_ANSI); + if (result == NULL) + { + printf ("%s\n", mangled_name); + } + else + { + printf ("%s\n", result); + free (result); + } + } + + #include "getopt.h" + + static char *program_name; + static char *program_version = VERSION; + + static void + usage (stream, status) + FILE *stream; + int status; + { + fprintf (stream, "\ + Usage: %s [-_] [-n] [-s {gnu,lucid,arm}] [--strip-underscores]\n\ + [--no-strip-underscores] [--format={gnu,lucid,arm}]\n\ + [--help] [--version] [arg...]\n", + program_name); + exit (status); + } + + #define MBUF_SIZE 512 + char mbuffer[MBUF_SIZE]; + + /* Defined in the automatically-generated underscore.c. */ + extern int prepends_underscore; + + int strip_underscore = 0; + + static struct option long_options[] = { + {"strip-underscores", no_argument, 0, '_'}, + {"format", required_argument, 0, 's'}, + {"help", no_argument, 0, 'h'}, + {"no-strip-underscores", no_argument, 0, 'n'}, + {"version", no_argument, 0, 'v'}, + {0, no_argument, 0, 0} + }; + + int + main (argc, argv) + int argc; + char **argv; + { + char *result; + int c; + + program_name = argv[0]; + + strip_underscore = prepends_underscore; + + while ((c = getopt_long (argc, argv, "_ns:", long_options, (int *) 0)) != EOF) + { + switch (c) + { + case '?': + usage (stderr, 1); + break; + case 'h': + usage (stdout, 0); + case 'n': + strip_underscore = 0; + break; + case 'v': + printf ("GNU %s version %s\n", program_name, program_version); + exit (0); + case '_': + strip_underscore = 1; + break; + case 's': + if (strcmp (optarg, "gnu") == 0) + { + current_demangling_style = gnu_demangling; + } + else if (strcmp (optarg, "lucid") == 0) + { + current_demangling_style = lucid_demangling; + } + else if (strcmp (optarg, "arm") == 0) + { + current_demangling_style = arm_demangling; + } + else + { + fprintf (stderr, "%s: unknown demangling style `%s'\n", + program_name, optarg); + exit (1); + } + break; + } + } + + if (optind < argc) + { + for ( ; optind < argc; optind++) + { + demangle_it (argv[optind]); + } + } + else + { + for (;;) + { + int i = 0; + c = getchar (); + /* Try to read a label. */ + while (c != EOF && (isalnum(c) || c == '_' || c == '$' || c == '.')) + { + if (i >= MBUF_SIZE-1) + break; + mbuffer[i++] = c; + c = getchar (); + } + if (i > 0) + { + int skip_first = 0; + + if (mbuffer[0] == '.') + ++skip_first; + if (strip_underscore && mbuffer[skip_first] == '_') + ++skip_first; + + if (skip_first > i) + skip_first = i; + + mbuffer[i] = 0; + + result = cplus_demangle (mbuffer + skip_first, + DMGL_PARAMS | DMGL_ANSI); + if (result) + { + if (mbuffer[0] == '.') + putc ('.', stdout); + fputs (result, stdout); + free (result); + } + else + fputs (mbuffer, stdout); + + fflush (stdout); + } + if (c == EOF) + break; + putchar (c); + } + } + + exit (0); + } + + static void + fatal (str) + char *str; + { + fprintf (stderr, "%s: %s\n", program_name, str); + exit (1); + } + + char * malloc (); + char * realloc (); + + char * + xmalloc (size) + unsigned size; + { + register char *value = (char *) malloc (size); + if (value == 0) + fatal ("virtual memory exhausted"); + return value; + } + + char * + xrealloc (ptr, size) + char *ptr; + unsigned size; + { + register char *value = (char *) realloc (ptr, size); + if (value == 0) + fatal ("virtual memory exhausted"); + return value; + } + #endif /* main */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cpp.texi gcc-2.7.0/cpp.texi *** gcc-2.6.3/cpp.texi Sun Aug 7 08:57:31 1994 --- gcc-2.7.0/cpp.texi Wed Jun 14 16:22:28 1995 *************** *** 20,24 **** This file documents the GNU C Preprocessor. ! Copyright 1987, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 20,25 ---- This file documents the GNU C Preprocessor. ! Copyright 1987, 1989, 1991, 1992, 1993, 1994, 1995 Free Software ! Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 54,59 **** @vskip 0pt plus 1filll ! Copyright @copyright{} 1987, 1989, 1991, 1992, 1994 Free Software ! Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 55,60 ---- @vskip 0pt plus 1filll ! Copyright @copyright{} 1987, 1989, 1991, 1992, 1993, 1994, 1995 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 93,97 **** @item ! Conditional compilation. Using special preprocessor commands, you can include or exclude parts of the program according to various conditions. --- 94,98 ---- @item ! Conditional compilation. Using special preprocessing directives, you can include or exclude parts of the program according to various conditions. *************** *** 117,140 **** @menu * Global Actions:: Actions made uniformly on all input files. ! * Commands:: General syntax of preprocessor commands. * Header Files:: How and why to use header files. * Macros:: How and why to use macros. * Conditionals:: How and why to use conditionals. * Combining Sources:: Use of line control when you combine source files. ! * Other Commands:: Miscellaneous preprocessor commands. * Output:: Format of output from the C preprocessor. * Invocation:: How to invoke the preprocessor; command options. * Concept Index:: Index of concepts and terms. ! * Index:: Index of commands, predefined macros and options. @end menu ! @node Global Actions, Commands, Top, Top @section Transformations Made Globally ! Most C preprocessor features are inactive unless you give specific commands ! to request their use. (Preprocessor commands are lines starting with ! @samp{#}; @pxref{Commands}). But there are three transformations that the preprocessor always makes on all the input it receives, even in the absence ! of commands. @itemize @bullet --- 118,141 ---- @menu * Global Actions:: Actions made uniformly on all input files. ! * Directives:: General syntax of preprocessing directives. * Header Files:: How and why to use header files. * Macros:: How and why to use macros. * Conditionals:: How and why to use conditionals. * Combining Sources:: Use of line control when you combine source files. ! * Other Directives:: Miscellaneous preprocessing directives. * Output:: Format of output from the C preprocessor. * Invocation:: How to invoke the preprocessor; command options. * Concept Index:: Index of concepts and terms. ! * Index:: Index of directives, predefined macros and options. @end menu ! @node Global Actions, Directives, Top, Top @section Transformations Made Globally ! Most C preprocessor features are inactive unless you give specific directives ! to request their use. (Preprocessing directives are lines starting with ! @samp{#}; @pxref{Directives}). But there are three transformations that the preprocessor always makes on all the input it receives, even in the absence ! of directives. @itemize @bullet *************** *** 153,157 **** The first two transformations are done @emph{before} nearly all other parsing ! and before preprocessor commands are recognized. Thus, for example, you can split a line cosmetically with Backslash-Newline anywhere (except when trigraphs are in use; see below). --- 154,158 ---- The first two transformations are done @emph{before} nearly all other parsing ! and before preprocessing directives are recognized. Thus, for example, you can split a line cosmetically with Backslash-Newline anywhere (except when trigraphs are in use; see below). *************** *** 188,192 **** @item C comments and predefined macro names are not recognized inside a ! @samp{#include} command in which the file name is delimited with @samp{<} and @samp{>}. --- 189,193 ---- @item C comments and predefined macro names are not recognized inside a ! @samp{#include} directive in which the file name is delimited with @samp{<} and @samp{>}. *************** *** 207,245 **** @end itemize ! @node Commands, Header Files, Global Actions, Top ! @section Preprocessor Commands ! @cindex preprocessor commands ! @cindex commands ! Most preprocessor features are active only if you use preprocessor commands to request their use. ! Preprocessor commands are lines in your program that start with @samp{#}. ! The @samp{#} is followed by an identifier that is the @dfn{command name}. ! For example, @samp{#define} is the command that defines a macro. Whitespace is also allowed before and after the @samp{#}. ! The set of valid command names is fixed. Programs cannot define new ! preprocessor commands. ! Some command names require arguments; these make up the rest of the command ! line and must be separated from the command name by whitespace. For example, @samp{#define} must be followed by a macro name and the intended expansion of the macro. @xref{Simple Macros}. ! A preprocessor command cannot be more than one line in normal circumstances. It may be split cosmetically with Backslash-Newline, but that has no effect ! on its meaning. Comments containing Newlines can also divide the command into ! multiple lines, but the comments are changed to Spaces before the command ! is interpreted. The only way a significant Newline can occur in a preprocessor ! command is within a string constant or character constant. Note that most C compilers that might be applied to the output from the preprocessor do not accept string or character constants containing Newlines. ! The @samp{#} and the command name cannot come from a macro expansion. For example, if @samp{foo} is defined as a macro expanding to @samp{define}, ! that does not make @samp{#foo} a valid preprocessor command. ! @node Header Files, Macros, Commands, Top @section Header Files --- 208,247 ---- @end itemize ! @node Directives, Header Files, Global Actions, Top ! @section Preprocessing Directives ! @cindex preprocessing directives ! @cindex directives ! Most preprocessor features are active only if you use preprocessing directives to request their use. ! Preprocessing directives are lines in your program that start with @samp{#}. ! The @samp{#} is followed by an identifier that is the @dfn{directive name}. ! For example, @samp{#define} is the directive that defines a macro. Whitespace is also allowed before and after the @samp{#}. ! The set of valid directive names is fixed. Programs cannot define new ! preprocessing directives. ! Some directive names require arguments; these make up the rest of the directive ! line and must be separated from the directive name by whitespace. For example, @samp{#define} must be followed by a macro name and the intended expansion of the macro. @xref{Simple Macros}. ! A preprocessing directive cannot be more than one line in normal circumstances. It may be split cosmetically with Backslash-Newline, but that has no effect ! on its meaning. Comments containing Newlines can also divide the ! directive into multiple lines, but the comments are changed to Spaces ! before the directive is interpreted. The only way a significant Newline ! can occur in a preprocessing directive is within a string constant or ! character constant. Note that most C compilers that might be applied to the output from the preprocessor do not accept string or character constants containing Newlines. ! The @samp{#} and the directive name cannot come from a macro expansion. For example, if @samp{foo} is defined as a macro expanding to @samp{define}, ! that does not make @samp{#foo} a valid preprocessing directive. ! @node Header Files, Macros, Directives, Top @section Header Files *************** *** 247,256 **** A header file is a file containing C declarations and macro definitions (@pxref{Macros}) to be shared between several source files. You request ! the use of a header file in your program with the C preprocessor command @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. --- 249,258 ---- A header file is a file containing C declarations and macro definitions (@pxref{Macros}) to be shared between several source files. You request ! the use of a header file in your program with the C preprocessing directive @samp{#include}. @menu * Header Uses:: What header files are used for. ! * Include Syntax:: How to write @samp{#include} directives. * Include Operation:: What @samp{#include} does. * Once-Only:: Preventing multiple inclusion of one header file. *************** *** 293,301 **** @node Include Syntax, Include Operation, Header Uses, Header Files ! @subsection The @samp{#include} Command @findex #include ! Both user and system header files are included using the preprocessor ! command @samp{#include}. It has three variants: @table @code --- 295,303 ---- @node Include Syntax, Include Operation, Header Uses, Header Files ! @subsection The @samp{#include} Directive @findex #include ! Both user and system header files are included using the preprocessing ! directive @samp{#include}. It has three variants: @table @code *************** *** 312,316 **** because comments are not recognized within the @samp{<@dots{}>}. Thus, in @samp{#include } the @samp{/*} does not start a comment ! and the command specifies inclusion of a system header file named @file{x/*y}. Of course, a header file with such a name is unlikely to exist on Unix, where shell wildcard features would make it hard to --- 314,318 ---- because comments are not recognized within the @samp{<@dots{}>}. Thus, in @samp{#include } the @samp{/*} does not start a comment ! and the directive specifies inclusion of a system header file named @file{x/*y}. Of course, a header file with such a name is unlikely to exist on Unix, where shell wildcard features would make it hard to *************** *** 340,344 **** @cindex computed @samp{#include} This variant is called a @dfn{computed #include}. Any @samp{#include} ! command whose argument does not fit the above two forms is a computed include. The text @var{anything else} is checked for macro calls, which are expanded (@pxref{Macros}). When this is done, the result --- 342,346 ---- @cindex computed @samp{#include} This variant is called a @dfn{computed #include}. Any @samp{#include} ! directive whose argument does not fit the above two forms is a computed include. The text @var{anything else} is checked for macro calls, which are expanded (@pxref{Macros}). When this is done, the result *************** *** 357,366 **** @subsection How @samp{#include} Works ! The @samp{#include} command works by directing the C preprocessor to scan the specified file as input before continuing with the rest of the current file. The output from the preprocessor contains the output already generated, followed by the output resulting from the included file, followed by the output that comes from the text after the @samp{#include} ! command. For example, given a header file @file{header.h} as follows, @example --- 359,368 ---- @subsection How @samp{#include} Works ! The @samp{#include} directive works by directing the C preprocessor to scan the specified file as input before continuing with the rest of the current file. The output from the preprocessor contains the output already generated, followed by the output resulting from the included file, followed by the output that comes from the text after the @samp{#include} ! directive. For example, given a header file @file{header.h} as follows, @example *************** *** 410,414 **** it. ! The line following the @samp{#include} command is always treated as a separate line by the C preprocessor even if the included file lacks a final newline. --- 412,416 ---- it. ! The line following the @samp{#include} directive is always treated as a separate line by the C preprocessor even if the included file lacks a final newline. *************** *** 452,456 **** @findex #pragma once ! There is also an explicit command to tell the preprocessor that it need not include a file more than once. This is called @samp{#pragma once}, and was used @emph{in addition to} the @samp{#ifndef} conditional around --- 454,458 ---- @findex #pragma once ! There is also an explicit directive to tell the preprocessor that it need not include a file more than once. This is called @samp{#pragma once}, and was used @emph{in addition to} the @samp{#ifndef} conditional around *************** *** 514,518 **** The clean way to solve this problem is to use @samp{#include_next}, which means, ``Include the @emph{next} file with ! this name.'' This command works like @samp{#include} except in searching for the specified file: it starts searching the list of header file directories @emph{after} the directory in which the current file --- 516,520 ---- The clean way to solve this problem is to use @samp{#include_next}, which means, ``Include the @emph{next} file with ! this name.'' This directive works like @samp{#include} except in searching for the specified file: it starts searching the list of header file directories @emph{after} the directory in which the current file *************** *** 557,561 **** Before you can use a macro, you must @dfn{define} it explicitly with the ! @samp{#define} command. @samp{#define} is followed by the name of the macro and then the code it should be an abbreviation for. For example, --- 559,563 ---- Before you can use a macro, you must @dfn{define} it explicitly with the ! @samp{#define} directive. @samp{#define} is followed by the name of the macro and then the code it should be an abbreviation for. For example, *************** *** 566,570 **** @noindent defines a macro named @samp{BUFFER_SIZE} as an abbreviation for the text ! @samp{1020}. If somewhere after this @samp{#define} command there comes a C statement of the form --- 568,572 ---- @noindent defines a macro named @samp{BUFFER_SIZE} as an abbreviation for the text ! @samp{1020}. If somewhere after this @samp{#define} directive there comes a C statement of the form *************** *** 586,590 **** Normally, a macro definition must be a single line, like all C ! preprocessor commands. (You can split a long macro definition cosmetically with Backslash-Newline.) There is one exception: Newlines can be included in the macro definition if within a string or character --- 588,592 ---- Normally, a macro definition must be a single line, like all C ! preprocessing directives. (You can split a long macro definition cosmetically with Backslash-Newline.) There is one exception: Newlines can be included in the macro definition if within a string or character *************** *** 656,660 **** @findex #define ! To define a macro that uses arguments, you write a @samp{#define} command with a list of @dfn{argument names} in parentheses after the name of the macro. The argument names may be any valid C identifiers, separated by --- 658,662 ---- @findex #define ! To define a macro that uses arguments, you write a @samp{#define} directive with a list of @dfn{argument names} in parentheses after the name of the macro. The argument names may be any valid C identifiers, separated by *************** *** 843,850 **** @end smallexample ! A @samp{#include} command changes the expansions of @samp{__FILE__} and @samp{__LINE__} to correspond to the included file. At the end of that file, when processing resumes on the input file that contained ! the @samp{#include} command, the expansions of @samp{__FILE__} and @samp{__LINE__} revert to the values they had before the @samp{#include} (but @samp{__LINE__} is then incremented by one as --- 845,852 ---- @end smallexample ! A @samp{#include} directive changes the expansions of @samp{__FILE__} and @samp{__LINE__} to correspond to the included file. At the end of that file, when processing resumes on the input file that contained ! the @samp{#include} directive, the expansions of @samp{__FILE__} and @samp{__LINE__} revert to the values they had before the @samp{#include} (but @samp{__LINE__} is then incremented by one as *************** *** 852,864 **** The expansions of both @samp{__FILE__} and @samp{__LINE__} are altered ! if a @samp{#line} command is used. @xref{Combining Sources}. ! ! @item __INCLUDE_LEVEL__ ! @findex __INCLUDE_LEVEL_ ! This macro expands to a decimal integer constant that represents the ! depth of nesting in include files. The value of this macro is ! incremented on every @samp{#include} command and decremented at every ! end of file. For input files specified by command line arguments, ! the nesting level is zero. @item __DATE__ --- 854,858 ---- The expansions of both @samp{__FILE__} and @samp{__LINE__} are altered ! if a @samp{#line} directive is used. @xref{Combining Sources}. @item __DATE__ *************** *** 881,884 **** --- 875,888 ---- will operate on the output from the preprocessor.) + @item __STDC_VERSION__ + @findex __STDC_VERSION__ + This macro expands to the C Standard's version number, + a long integer constant of the form @samp{@var{yyyy}@var{mm}L} + where @var{yyyy} and @var{mm} are the year and month of the Standard version. + This signifies which version of the C Standard the preprocessor conforms to. + Like @samp{__STDC__}, whether this version number is accurate + for the entire implementation depends on what C compiler + will operate on the output from the preprocessor. + @item __GNUC__ @findex __GNUC__ *************** *** 889,892 **** --- 893,906 ---- version 1, which is now obsolete, and @samp{2} for version 2). + @item __GNUC_MINOR__ + @findex __GNUC_MINOR__ + The macro contains the minor version number of the compiler. This can + be used to work around differences between different releases of the + compiler (for example, if gcc 2.6.3 is known to support a feature, you + can test for @code{__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)}). + The last number, @samp{3} in the + example above, denotes the bugfix level of the compiler; no macro + contains this value. + @item __GNUG__ @findex __GNUG__ *************** *** 916,919 **** --- 930,941 ---- as an argument when the C compiler was invoked. + @item __INCLUDE_LEVEL__ + @findex __INCLUDE_LEVEL_ + This macro expands to a decimal integer constant that represents the + depth of nesting in include files. The value of this macro is + incremented on every @samp{#include} directive and decremented at every + end of file. For input files specified by command line arguments, + the nesting level is zero. + @item __VERSION__ @findex __VERSION__ *************** *** 939,943 **** macros defined in @file{limit.h}. The preprocessor uses this macro to determine whether or not to sign-extend large character ! constants written in octal; see @ref{#if Command,,The @samp{#if} Command}. @end table --- 961,983 ---- macros defined in @file{limit.h}. The preprocessor uses this macro to determine whether or not to sign-extend large character ! constants written in octal; see @ref{#if Directive,,The @samp{#if} Directive}. ! ! @item __REGISTER_PREFIX__ ! @findex __REGISTER_PREFIX__ ! This macro expands to a string describing the prefix applied to cpu ! registers in assembler code. It can be used to write assembler code ! that is usable in multiple environments. For example, in the ! @samp{m68k-aout} environment it expands to the string @samp{""}, ! but in the @samp{m68k-coff} environment it expands to the string ! @samp{"%"}. ! ! @item __USER_LABEL_PREFIX__ ! @findex __USER_LABEL_PREFIX__ ! This macro expands to a string describing the prefix applied to ! user generated labels in assembler code. It can be used to write ! assembler code that is usable in multiple environments. ! For example, in the @samp{m68k-aout} environment it expands to the ! string @samp{"_"}, but in the @samp{m68k-coff} environment it expands ! to the string @samp{""}. @end table *************** *** 1217,1221 **** @cindex undefining macros To @dfn{undefine} a macro means to cancel its definition. This is done ! with the @samp{#undef} command. @samp{#undef} is followed by the macro name to be undefined. --- 1257,1261 ---- @cindex undefining macros To @dfn{undefine} a macro means to cancel its definition. This is done ! with the @samp{#undef} directive. @samp{#undef} is followed by the macro name to be undefined. *************** *** 1248,1254 **** valid C code. ! The same form of @samp{#undef} command will cancel definitions with arguments or definitions that don't expect arguments. The @samp{#undef} ! command has no effect when used on a name not currently defined as a macro. @node Redefining, Macro Pitfalls, Undefining, Macros --- 1288,1294 ---- valid C code. ! The same form of @samp{#undef} directive will cancel definitions with arguments or definitions that don't expect arguments. The @samp{#undef} ! directive has no effect when used on a name not currently defined as a macro. @node Redefining, Macro Pitfalls, Undefining, Macros *************** *** 1832,1836 **** @cindex conditionals ! In a macro processor, a @dfn{conditional} is a command that allows a part of the program to be ignored during compilation, on some conditions. In the C preprocessor, a conditional can test either an arithmetic expression --- 1872,1876 ---- @cindex conditionals ! In a macro processor, a @dfn{conditional} is a directive that allows a part of the program to be ignored during compilation, on some conditions. In the C preprocessor, a conditional can test either an arithmetic expression *************** *** 1842,1846 **** of your program. Its purpose is to allow your program to behave differently from run to run, depending on the data it is operating on. The condition ! in a preprocessor conditional command is tested when your program is compiled. Its purpose is to allow different code to be included in the program depending on the situation at the time of compilation. --- 1882,1886 ---- of your program. Its purpose is to allow your program to behave differently from run to run, depending on the data it is operating on. The condition ! in a preprocessing conditional directive is tested when your program is compiled. Its purpose is to allow different code to be included in the program depending on the situation at the time of compilation. *************** *** 1852,1856 **** * Macros: Conditionals-Macros. Why conditionals are used with macros. * Assertions:: How and why to use assertions. ! * Errors: #error Command. Detecting inconsistent compilation parameters. @end menu --- 1892,1896 ---- * Macros: Conditionals-Macros. Why conditionals are used with macros. * Assertions:: How and why to use assertions. ! * Errors: #error Directive. Detecting inconsistent compilation parameters. @end menu *************** *** 1868,1872 **** other system. When this happens, it is not enough to avoid executing the invalid code: merely having it in the program makes it impossible ! to link the program and run it. With a preprocessor conditional, the offending code can be effectively excised from the program when it is not valid. --- 1908,1912 ---- other system. When this happens, it is not enough to avoid executing the invalid code: merely having it in the program makes it impossible ! to link the program and run it. With a preprocessing conditional, the offending code can be effectively excised from the program when it is not valid. *************** *** 1886,1890 **** Most simple programs that are intended to run on only one machine will ! not need to use preprocessor conditionals. @node Conditional Syntax --- 1926,1930 ---- Most simple programs that are intended to run on only one machine will ! not need to use preprocessing conditionals. @node Conditional Syntax *************** *** 1893,1910 **** @findex #if A conditional in the C preprocessor begins with a @dfn{conditional ! command}: @samp{#if}, @samp{#ifdef} or @samp{#ifndef}. @xref{Conditionals-Macros}, for information on @samp{#ifdef} and @samp{#ifndef}; only @samp{#if} is explained here. @menu ! * If: #if Command. Basic conditionals using @samp{#if} and @samp{#endif}. ! * Else: #else Command. Including some text if the condition fails. ! * Elif: #elif Command. Testing several alternative possibilities. @end menu ! @node #if Command ! @subsubsection The @samp{#if} Command ! The @samp{#if} command in its simplest form consists of @example --- 1933,1950 ---- @findex #if A conditional in the C preprocessor begins with a @dfn{conditional ! directive}: @samp{#if}, @samp{#ifdef} or @samp{#ifndef}. @xref{Conditionals-Macros}, for information on @samp{#ifdef} and @samp{#ifndef}; only @samp{#if} is explained here. @menu ! * If: #if Directive. Basic conditionals using @samp{#if} and @samp{#endif}. ! * Else: #else Directive. Including some text if the condition fails. ! * Elif: #elif Directive. Testing several alternative possibilities. @end menu ! @node #if Directive ! @subsubsection The @samp{#if} Directive ! The @samp{#if} directive in its simplest form consists of @example *************** *** 1957,1970 **** The @var{controlled text} inside of a conditional can include ! preprocessor commands. Then the commands inside the conditional are obeyed only if that branch of the conditional succeeds. The text can also contain other conditional groups. However, the @samp{#if} and ! @samp{#endif} commands must balance. ! @node #else Command ! @subsubsection The @samp{#else} Command @findex #else ! The @samp{#else} command can be added to a conditional to provide alternative text to be used if the condition is false. This is what it looks like: --- 1997,2010 ---- The @var{controlled text} inside of a conditional can include ! preprocessing directives. Then the directives inside the conditional are obeyed only if that branch of the conditional succeeds. The text can also contain other conditional groups. However, the @samp{#if} and ! @samp{#endif} directives must balance. ! @node #else Directive ! @subsubsection The @samp{#else} Directive @findex #else ! The @samp{#else} directive can be added to a conditional to provide alternative text to be used if the condition is false. This is what it looks like: *************** *** 1983,1988 **** conditional fails, the @var{text-if-false} is considered included. ! @node #elif Command ! @subsubsection The @samp{#elif} Command @findex #elif --- 2023,2028 ---- conditional fails, the @var{text-if-false} is considered included. ! @node #elif Directive ! @subsubsection The @samp{#elif} Directive @findex #elif *************** *** 2002,2006 **** @end example ! Another conditional command, @samp{#elif}, allows this to be abbreviated as follows: --- 2042,2046 ---- @end example ! Another conditional directive, @samp{#elif}, allows this to be abbreviated as follows: *************** *** 2018,2022 **** middle of a @samp{#if}-@samp{#endif} pair and subdivides it; it does not require a matching @samp{#endif} of its own. Like @samp{#if}, the ! @samp{#elif} command includes an expression to be tested. The text following the @samp{#elif} is processed only if the original --- 2058,2062 ---- middle of a @samp{#if}-@samp{#endif} pair and subdivides it; it does not require a matching @samp{#endif} of its own. Like @samp{#if}, the ! @samp{#elif} directive includes an expression to be tested. The text following the @samp{#elif} is processed only if the original *************** *** 2025,2031 **** group. Then the text after each @samp{#elif} is processed only if the @samp{#elif} condition succeeds after the original @samp{#if} and any ! previous @samp{#elif} commands within it have failed. @samp{#else} is equivalent to @samp{#elif 1}, and @samp{#else} is allowed after any ! number of @samp{#elif} commands, but @samp{#elif} may not follow @samp{#else}. --- 2065,2071 ---- group. Then the text after each @samp{#elif} is processed only if the @samp{#elif} condition succeeds after the original @samp{#if} and any ! previous @samp{#elif} directives within it have failed. @samp{#else} is equivalent to @samp{#elif 1}, and @samp{#else} is allowed after any ! number of @samp{#elif} directives, but @samp{#elif} may not follow @samp{#else}. *************** *** 2056,2060 **** Conditionals are useful in connection with macros or assertions, because those are the only ways that an expression's value can vary from one ! compilation to another. A @samp{#if} command whose expression uses no macros or assertions is equivalent to @samp{#if 1} or @samp{#if 0}; you might as well determine which one, by computing the value of the --- 2096,2100 ---- Conditionals are useful in connection with macros or assertions, because those are the only ways that an expression's value can vary from one ! compilation to another. A @samp{#if} directive whose expression uses no macros or assertions is equivalent to @samp{#if 1} or @samp{#if 0}; you might as well determine which one, by computing the value of the *************** *** 2105,2109 **** @findex #ifndef Conditionals that test whether just one name is defined are very common, ! so there are two special short conditional commands for this case. @table @code --- 2145,2149 ---- @findex #ifndef Conditionals that test whether just one name is defined are very common, ! so there are two special short conditional directives for this case. @table @code *************** *** 2134,2138 **** @samp{BUFSIZE} might be defined in a configuration file for your program that is included as a header file in each source file. You ! would use @samp{BUFSIZE} in a preprocessor conditional in order to generate different code depending on the chosen configuration. --- 2174,2178 ---- @samp{BUFSIZE} might be defined in a configuration file for your program that is included as a header file in each source file. You ! would use @samp{BUFSIZE} in a preprocessing conditional in order to generate different code depending on the chosen configuration. *************** *** 2149,2153 **** @ifinfo Assertions are usually predefined, but can be defined with preprocessor ! commands or command-line options. @end ifinfo --- 2189,2193 ---- @ifinfo Assertions are usually predefined, but can be defined with preprocessor ! directives or command-line options. @end ifinfo *************** *** 2159,2163 **** conditionals to test what sort of computer or system the compiled program will run on. Assertions are usually predefined, but you can ! define them with preprocessor commands or command-line options. @cindex predicates --- 2199,2203 ---- conditionals to test what sort of computer or system the compiled program will run on. Assertions are usually predefined, but you can ! define them with preprocessing directives or command-line options. @cindex predicates *************** *** 2282,2290 **** when you run @code{gcc} or @code{cpp}. @xref{Invocation}. ! @node #error Command ! @subsection The @samp{#error} and @samp{#warning} Commands @findex #error ! The command @samp{#error} causes the preprocessor to report a fatal error. The rest of the line that follows @samp{#error} is used as the error message. --- 2322,2330 ---- when you run @code{gcc} or @code{cpp}. @xref{Invocation}. ! @node #error Directive ! @subsection The @samp{#error} and @samp{#warning} Directives @findex #error ! The directive @samp{#error} causes the preprocessor to report a fatal error. The rest of the line that follows @samp{#error} is used as the error message. *************** *** 2318,2322 **** @findex #warning ! The command @samp{#warning} is like the command @samp{#error}, but causes the preprocessor to issue a warning and continue preprocessing. The rest of the line that follows @samp{#warning} is used as the warning message. --- 2358,2362 ---- @findex #warning ! The directive @samp{#warning} is like the directive @samp{#error}, but causes the preprocessor to issue a warning and continue preprocessing. The rest of the line that follows @samp{#warning} is used as the warning message. *************** *** 2325,2329 **** directing the user to the header file which should be used instead. ! @node Combining Sources, Other Commands, Conditionals, Top @section Combining Source Files --- 2365,2369 ---- directing the user to the header file which should be used instead. ! @node Combining Sources, Other Directives, Conditionals, Top @section Combining Source Files *************** *** 2339,2343 **** debuggers such as GDB use the line numbers in your source file. ! The C preprocessor builds on this feature by offering a command by which you can control the feature explicitly. This is useful when a file for input to the C preprocessor is the output from another program such as the --- 2379,2383 ---- debuggers such as GDB use the line numbers in your source file. ! The C preprocessor builds on this feature by offering a directive by which you can control the feature explicitly. This is useful when a file for input to the C preprocessor is the output from another program such as the *************** *** 2352,2357 **** @findex #line ! @code{bison} arranges this by writing @samp{#line} commands into the output ! file. @samp{#line} is a command that specifies the original line number and source file name for subsequent input in the current preprocessor input file. @samp{#line} has three variants: --- 2392,2397 ---- @findex #line ! @code{bison} arranges this by writing @samp{#line} directives into the output ! file. @samp{#line} is a directive that specifies the original line number and source file name for subsequent input in the current preprocessor input file. @samp{#line} has three variants: *************** *** 2377,2400 **** @end table ! @samp{#line} commands alter the results of the @samp{__FILE__} and @samp{__LINE__} predefined macros from that point on. @xref{Standard Predefined}. The output of the preprocessor (which is the input for the rest of the ! compiler) contains commands that look much like @samp{#line} commands. They start with just @samp{#} instead of @samp{#line}, but this is followed by a line number and file name as in @samp{#line}. @xref{Output}. ! @node Other Commands, Output, Combining Sources, Top ! @section Miscellaneous Preprocessor Commands ! @cindex null command ! This section describes three additional preprocessor commands. They are not very useful, but are mentioned for completeness. ! The @dfn{null command} consists of a @samp{#} followed by a Newline, with ! only whitespace (including comments) in between. A null command is ! understood as a preprocessor command but has no effect on the preprocessor ! output. The primary significance of the existence of the null command is that an input line consisting of just a @samp{#} will produce no output, rather than a line of output containing just a @samp{#}. Supposedly --- 2417,2440 ---- @end table ! @samp{#line} directives alter the results of the @samp{__FILE__} and @samp{__LINE__} predefined macros from that point on. @xref{Standard Predefined}. The output of the preprocessor (which is the input for the rest of the ! compiler) contains directives that look much like @samp{#line} directives. They start with just @samp{#} instead of @samp{#line}, but this is followed by a line number and file name as in @samp{#line}. @xref{Output}. ! @node Other Directives, Output, Combining Sources, Top ! @section Miscellaneous Preprocessing Directives ! @cindex null directive ! This section describes three additional preprocessing directives. They are not very useful, but are mentioned for completeness. ! The @dfn{null directive} consists of a @samp{#} followed by a Newline, with ! only whitespace (including comments) in between. A null directive is ! understood as a preprocessing directive but has no effect on the preprocessor ! output. The primary significance of the existence of the null directive is that an input line consisting of just a @samp{#} will produce no output, rather than a line of output containing just a @samp{#}. Supposedly *************** *** 2402,2425 **** @findex #pragma ! The ANSI standard specifies that the @samp{#pragma} command has an arbitrary, implementation-defined effect. In the GNU C preprocessor, ! @samp{#pragma} commands are not used, except for @samp{#pragma once} (@pxref{Once-Only}). However, they are left in the preprocessor output, so they are available to the compilation pass. @findex #ident ! The @samp{#ident} command is supported for compatibility with certain other systems. It is followed by a line of text. On some systems, the text is copied into a special place in the object file; on most systems, ! the text is ignored and this command has no effect. Typically @samp{#ident} is only used in header files supplied with those systems where it is meaningful. ! @node Output, Invocation, Other Commands, Top @section C Preprocessor Output @cindex output format The output from the C preprocessor looks much like the input, except ! that all preprocessor command lines have been replaced with blank lines and all comments with spaces. Whitespace within a line is not altered; however, a space is inserted after the expansions of most macro calls. --- 2442,2465 ---- @findex #pragma ! The ANSI standard specifies that the @samp{#pragma} directive has an arbitrary, implementation-defined effect. In the GNU C preprocessor, ! @samp{#pragma} directives are not used, except for @samp{#pragma once} (@pxref{Once-Only}). However, they are left in the preprocessor output, so they are available to the compilation pass. @findex #ident ! The @samp{#ident} directive is supported for compatibility with certain other systems. It is followed by a line of text. On some 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. Typically @samp{#ident} is only used in header files supplied with those systems where it is meaningful. ! @node Output, Invocation, Other Directives, Top @section C Preprocessor Output @cindex output format The output from the C preprocessor looks much like the input, except ! that all preprocessing directive lines have been replaced with blank lines and all comments with spaces. Whitespace within a line is not altered; however, a space is inserted after the expansions of most macro calls. *************** *** 2586,2590 **** @item -I @var{directory} @findex -I ! Add the directory @var{directory} to the end of the list of directories to be searched for header files (@pxref{Include Syntax}). This can be used to override a system header file, substituting your --- 2626,2630 ---- @item -I @var{directory} @findex -I ! Add the directory @var{directory} to the head of the list of directories to be searched for header files (@pxref{Include Syntax}). This can be used to override a system header file, substituting your *************** *** 2601,2605 **** If additional directories are specified with @samp{-I} options after the @samp{-I-}, these directories are searched for all @samp{#include} ! commands. In addition, the @samp{-I-} option inhibits the use of the current --- 2641,2645 ---- If additional directories are specified with @samp{-I} options after the @samp{-I-}, these directories are searched for all @samp{#include} ! directives. In addition, the @samp{-I-} option inhibits the use of the current *************** *** 2657,2661 **** @findex -dM Instead of outputting the result of preprocessing, output a list of ! @samp{#define} commands for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the --- 2697,2701 ---- @findex -dM Instead of outputting the result of preprocessing, output a list of ! @samp{#define} directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the *************** *** 2673,2677 **** Like @samp{-dM} except in two respects: it does @emph{not} include the predefined macros, and it outputs @emph{both} the @samp{#define} ! commands and the result of preprocessing. Both kinds of output go to the standard output file. --- 2713,2717 ---- Like @samp{-dM} except in two respects: it does @emph{not} include the predefined macros, and it outputs @emph{both} the @samp{#define} ! directives and the result of preprocessing. Both kinds of output go to the standard output file. *************** *** 2771,2775 **** case they end at end of line), and includes extra default include directories for C++; and @samp{-lang-objc} enables the Objective C ! @samp{#import} command. @samp{-lang-c} explicitly turns off both of these extensions, and @samp{-lang-objc++} enables both. --- 2811,2815 ---- case they end at end of line), and includes extra default include directories for C++; and @samp{-lang-objc} enables the Objective C ! @samp{#import} directive. @samp{-lang-c} explicitly turns off both of these extensions, and @samp{-lang-objc++} enables both. *************** *** 2801,2805 **** @node Index,, Concept Index, Top ! @unnumbered Index of Commands, Macros and Options @printindex fn --- 2841,2845 ---- @node Index,, Concept Index, Top ! @unnumbered Index of Directives, Macros and Options @printindex fn diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cppalloc.c gcc-2.7.0/cppalloc.c *** gcc-2.6.3/cppalloc.c --- gcc-2.7.0/cppalloc.c Thu Jun 15 07:22:46 1995 *************** *** 0 **** --- 1,64 ---- + /* Part of CPP library. (memory allocation - xmalloc etc) + Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. + Written by Per Bothner, 1994. + Based on CCCP program by by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + + 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + 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! */ + + #include "config.h" + + static void + memory_full () + { + fatal ("Memory exhausted."); + } + + char * + xmalloc (size) + unsigned size; + { + register char *ptr = (char *) malloc (size); + if (ptr != 0) return (ptr); + memory_full (); + /*NOTREACHED*/ + return 0; + } + + char * + xrealloc (old, size) + char *old; + unsigned size; + { + register char *ptr = (char *) realloc (old, size); + if (ptr == 0) + memory_full (); + return ptr; + } + + char * + xcalloc (number, size) + unsigned number, size; + { + register unsigned total = number * size; + register char *ptr = (char *) calloc (number, size); + if (ptr == 0) + memory_full (); + return ptr; + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cpperror.c gcc-2.7.0/cpperror.c *** gcc-2.6.3/cpperror.c --- gcc-2.7.0/cpperror.c Thu Jun 15 07:23:12 1995 *************** *** 0 **** --- 1,128 ---- + /* Default error handlers for CPP Library. + Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. + Written by Per Bothner, 1994. + Based on CCCP program by by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + + 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + 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! */ + + #ifndef EMACS + #include "config.h" + #endif /* not EMACS */ + + #include "cpplib.h" + #include + + /* Print the file names and line numbers of the #include + commands which led to the current file. */ + + void + cpp_print_containing_files (pfile) + cpp_reader *pfile; + { + cpp_buffer *ip; + int i; + int first = 1; + + /* If stack of files hasn't changed since we last printed + this info, don't repeat it. */ + if (pfile->input_stack_listing_current) + return; + + ip = cpp_file_buffer (pfile); + + /* Give up if we don't find a source file. */ + if (ip == NULL) + return; + + /* Find the other, outer source files. */ + while ((ip = CPP_PREV_BUFFER (ip)), ip != CPP_NULL_BUFFER (pfile)) + { + long line, col; + cpp_buf_line_and_col (ip, &line, &col); + if (ip->fname != NULL) + { + if (first) + { + first = 0; + fprintf (stderr, "In file included"); + } + else + fprintf (stderr, ",\n "); + } + + fprintf (stderr, " from %s:%d", ip->nominal_fname, line); + } + if (! first) + fprintf (stderr, ":\n"); + + /* Record we have printed the status as of this time. */ + pfile->input_stack_listing_current = 1; + } + + void + cpp_file_line_for_message (pfile, filename, line, column) + cpp_reader *pfile; + char *filename; + int line, column; + { + if (column > 0) + fprintf (stderr, "%s:%d:%d: ", filename, line, column); + else + fprintf (stderr, "%s:%d: ", filename, line); + } + + /* IS_ERROR is 1 for error, 0 for warning */ + void cpp_message (pfile, is_error, msg, arg1, arg2, arg3) + int is_error; + cpp_reader *pfile; + char *msg; + char *arg1, *arg2, *arg3; + { + if (is_error) + pfile->errors++; + else + fprintf (stderr, "warning: "); + fprintf (stderr, msg, arg1, arg2, arg3); + fprintf (stderr, "\n"); + } + + void + fatal (str, arg) + char *str, *arg; + { + fprintf (stderr, "%s: ", progname); + fprintf (stderr, str, arg); + fprintf (stderr, "\n"); + exit (FATAL_EXIT_CODE); + } + + + void + cpp_pfatal_with_name (pfile, name) + cpp_reader *pfile; + char *name; + { + cpp_perror_with_name (pfile, name); + #ifdef VMS + exit (vaxc$errno); + #else + exit (FATAL_EXIT_CODE); + #endif + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cppexp.c gcc-2.7.0/cppexp.c *** gcc-2.6.3/cppexp.c --- gcc-2.7.0/cppexp.c Thu Jun 15 07:23:32 1995 *************** *** 0 **** --- 1,999 ---- + /* Parse C expressions for CCCP. + Copyright (C) 1987, 1992, 1994, 1995 Free Software Foundation. + + 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 2, 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + 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! + + Written by Per Bothner 1994. */ + + /* Parse a C expression from text in a string */ + + #include "config.h" + #include "cpplib.h" + + extern char *xmalloc PARAMS ((unsigned)); + extern char *xrealloc PARAMS ((char *, unsigned)); + + #ifdef MULTIBYTE_CHARS + #include + #include + #endif + + #include + + /* This is used for communicating lists of keywords with cccp.c. */ + struct arglist { + struct arglist *next; + U_CHAR *name; + int length; + int argno; + }; + + /* Define a generic NULL if one hasn't already been defined. */ + + #ifndef NULL + #define NULL 0 + #endif + + #ifndef GENERIC_PTR + #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) + #define GENERIC_PTR void * + #else + #define GENERIC_PTR char * + #endif + #endif + + #ifndef NULL_PTR + #define NULL_PTR ((GENERIC_PTR)0) + #endif + + extern char *xmalloc (); + + #ifndef CHAR_TYPE_SIZE + #define CHAR_TYPE_SIZE BITS_PER_UNIT + #endif + + #ifndef INT_TYPE_SIZE + #define INT_TYPE_SIZE BITS_PER_WORD + #endif + + #ifndef LONG_TYPE_SIZE + #define LONG_TYPE_SIZE BITS_PER_WORD + #endif + + #ifndef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE INT_TYPE_SIZE + #endif + + #ifndef MAX_CHAR_TYPE_SIZE + #define MAX_CHAR_TYPE_SIZE CHAR_TYPE_SIZE + #endif + + #ifndef MAX_INT_TYPE_SIZE + #define MAX_INT_TYPE_SIZE INT_TYPE_SIZE + #endif + + #ifndef MAX_LONG_TYPE_SIZE + #define MAX_LONG_TYPE_SIZE LONG_TYPE_SIZE + #endif + + #ifndef MAX_WCHAR_TYPE_SIZE + #define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE + #endif + + /* Yield nonzero if adding two numbers with A's and B's signs can yield a + number with SUM's sign, where A, B, and SUM are all C integers. */ + #define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0) + + static void integer_overflow (); + static long left_shift (); + static long right_shift (); + + #define ERROR 299 + #define OROR 300 + #define ANDAND 301 + #define EQUAL 302 + #define NOTEQUAL 303 + #define LEQ 304 + #define GEQ 305 + #define LSH 306 + #define RSH 307 + #define NAME 308 + #define INT 309 + #define CHAR 310 + + #define LEFT_OPERAND_REQUIRED 1 + #define RIGHT_OPERAND_REQUIRED 2 + #define HAVE_VALUE 4 + /*#define UNSIGNEDP 8*/ + + #ifndef HOST_BITS_PER_WIDE_INT + + #if HOST_BITS_PER_LONG > HOST_BITS_PER_INT + #define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG + #define HOST_WIDE_INT long + #else + #define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT + #define HOST_WIDE_INT int + #endif + + #endif + + struct operation { + short op; + char rprio; /* Priority of op (relative to it right operand). */ + char flags; + char unsignedp; /* true if value should be treated as unsigned */ + HOST_WIDE_INT value; /* The value logically "right" of op. */ + }; + + /* Take care of parsing a number (anything that starts with a digit). + LEN is the number of characters in it. */ + + /* maybe needs to actually deal with floating point numbers */ + + struct operation + parse_number (pfile, start, olen) + cpp_reader *pfile; + char *start; + int olen; + { + struct operation op; + register char *p = start; + register int c; + register unsigned long n = 0, nd, ULONG_MAX_over_base; + register int base = 10; + register int len = olen; + register int overflow = 0; + register int digit, largest_digit = 0; + int spec_long = 0; + + op.unsignedp = 0; + + for (c = 0; c < len; c++) + if (p[c] == '.') { + /* It's a float since it contains a point. */ + cpp_error (pfile, + "floating point numbers not allowed in #if expressions"); + op.op = ERROR; + return op; + } + + if (len >= 3 && (!strncmp (p, "0x", 2) || !strncmp (p, "0X", 2))) { + p += 2; + base = 16; + len -= 2; + } + else if (*p == '0') + base = 8; + + /* Some buggy compilers (e.g. MPW C) seem to need both casts. */ + ULONG_MAX_over_base = ((unsigned long) -1) / ((unsigned long) base); + + for (; len > 0; len--) { + c = *p++; + + if (c >= '0' && c <= '9') + digit = c - '0'; + else if (base == 16 && c >= 'a' && c <= 'f') + digit = c - 'a' + 10; + else if (base == 16 && c >= 'A' && c <= 'F') + digit = c - 'A' + 10; + else { + /* `l' means long, and `u' means unsigned. */ + while (1) { + if (c == 'l' || c == 'L') + { + if (spec_long) + cpp_error (pfile, "two `l's in integer constant"); + spec_long = 1; + } + else if (c == 'u' || c == 'U') + { + if (op.unsignedp) + cpp_error (pfile, "two `u's in integer constant"); + op.unsignedp = 1; + } + else + break; + + if (--len == 0) + break; + c = *p++; + } + /* Don't look for any more digits after the suffixes. */ + break; + } + if (largest_digit < digit) + largest_digit = digit; + nd = n * base + digit; + overflow |= ULONG_MAX_over_base < n | nd < n; + n = nd; + } + + if (len != 0) + { + cpp_error (pfile, "Invalid number in #if expression"); + op.op = ERROR; + return op; + } + + if (base <= largest_digit) + cpp_warning (pfile, "integer constant contains digits beyond the radix"); + + if (overflow) + cpp_warning (pfile, "integer constant out of range"); + + /* If too big to be signed, consider it unsigned. */ + if ((long) n < 0 && ! op.unsignedp) + { + if (base == 10) + cpp_warning (pfile, "integer constant is so large that it is unsigned"); + op.unsignedp = 1; + } + + op.value = n; + op.op = INT; + return op; + } + + struct token { + char *operator; + int token; + }; + + static struct token tokentab2[] = { + {"&&", ANDAND}, + {"||", OROR}, + {"<<", LSH}, + {">>", RSH}, + {"==", EQUAL}, + {"!=", NOTEQUAL}, + {"<=", LEQ}, + {">=", GEQ}, + {"++", ERROR}, + {"--", ERROR}, + {NULL, ERROR} + }; + + /* Read one token. */ + + struct operation + cpp_lex (pfile) + cpp_reader *pfile; + { + register int c; + register int namelen; + register struct token *toktab; + enum cpp_token token; + struct operation op; + U_CHAR *tok_start, *tok_end; + int old_written; + + retry: + + old_written = CPP_WRITTEN (pfile); + cpp_skip_hspace (pfile); + c = CPP_BUF_PEEK (CPP_BUFFER (pfile)); + if (c == '#') + return parse_number (pfile, + cpp_read_check_assertion (pfile) ? "1" : "0", 1); + + if (c == '\n') + { + op.op = 0; + return op; + } + + token = cpp_get_token (pfile); + tok_start = pfile->token_buffer + old_written; + tok_end = CPP_PWRITTEN (pfile); + pfile->limit = tok_start; + switch (token) + { + case CPP_EOF: /* Should not happen ... */ + op.op = 0; + return op; + case CPP_VSPACE: + case CPP_POP: + if (CPP_BUFFER (pfile)->fname != NULL) + { + op.op = 0; + return op; + } + goto retry; + case CPP_HSPACE: case CPP_COMMENT: + goto retry; + case CPP_NUMBER: + return parse_number (pfile, tok_start, tok_end - tok_start); + case CPP_STRING: + cpp_error (pfile, "string constants not allowed in #if expressions"); + op.op = ERROR; + return op; + case CPP_CHAR: + /* This code for reading a character constant + handles multicharacter constants and wide characters. + It is mostly copied from c-lex.c. */ + { + register int result = 0; + register num_chars = 0; + unsigned width = MAX_CHAR_TYPE_SIZE; + int wide_flag = 0; + int max_chars; + U_CHAR *ptr = tok_start; + #ifdef MULTIBYTE_CHARS + char token_buffer[MAX_LONG_TYPE_SIZE/MAX_CHAR_TYPE_SIZE + MB_CUR_MAX]; + #else + char token_buffer[MAX_LONG_TYPE_SIZE/MAX_CHAR_TYPE_SIZE + 1]; + #endif + + if (*ptr == 'L') + { + ptr++; + wide_flag = 1; + width = MAX_WCHAR_TYPE_SIZE; + #ifdef MULTIBYTE_CHARS + max_chars = MB_CUR_MAX; + #else + max_chars = 1; + #endif + } + else + max_chars = MAX_LONG_TYPE_SIZE / width; + + while (1) + { + if (ptr >= CPP_PWRITTEN (pfile) || (c = *ptr++) == '\'') + break; + + if (c == '\\') + { + c = cpp_parse_escape (pfile, &ptr); + if (width < HOST_BITS_PER_INT + && (unsigned) c >= (1 << width)) + cpp_pedwarn (pfile, + "escape sequence out of range for character"); + } + + num_chars++; + + /* Merge character into result; ignore excess chars. */ + if (num_chars < max_chars + 1) + { + if (width < HOST_BITS_PER_INT) + result = (result << width) | (c & ((1 << width) - 1)); + else + result = c; + token_buffer[num_chars - 1] = c; + } + } + + token_buffer[num_chars] = 0; + + if (c != '\'') + cpp_error (pfile, "malformatted character constant"); + else if (num_chars == 0) + cpp_error (pfile, "empty character constant"); + else if (num_chars > max_chars) + { + num_chars = max_chars; + cpp_error (pfile, "character constant too long"); + } + else if (num_chars != 1 && ! CPP_TRADITIONAL (pfile)) + cpp_warning (pfile, "multi-character character constant"); + + /* If char type is signed, sign-extend the constant. */ + if (! wide_flag) + { + int num_bits = num_chars * width; + + if (cpp_lookup (pfile, "__CHAR_UNSIGNED__", + sizeof ("__CHAR_UNSIGNED__")-1, -1) + || ((result >> (num_bits - 1)) & 1) == 0) + op.value + = result & ((unsigned long) ~0 >> (HOST_BITS_PER_LONG - num_bits)); + else + op.value + = result | ~((unsigned long) ~0 >> (HOST_BITS_PER_LONG - num_bits)); + } + else + { + #ifdef MULTIBYTE_CHARS + /* Set the initial shift state and convert the next sequence. */ + result = 0; + /* In all locales L'\0' is zero and mbtowc will return zero, + so don't use it. */ + if (num_chars > 1 + || (num_chars == 1 && token_buffer[0] != '\0')) + { + wchar_t wc; + (void) mbtowc (NULL_PTR, NULL_PTR, 0); + if (mbtowc (& wc, token_buffer, num_chars) == num_chars) + result = wc; + else + cpp_warning (pfile,"Ignoring invalid multibyte character"); + } + #endif + op.value = result; + } + } + + /* This is always a signed type. */ + op.unsignedp = 0; + op.op = CHAR; + + return op; + + case CPP_NAME: + return parse_number (pfile, "0", 0); + + case CPP_OTHER: + /* See if it is a special token of length 2. */ + if (tok_start + 2 == tok_end) + { + for (toktab = tokentab2; toktab->operator != NULL; toktab++) + if (tok_start[0] == toktab->operator[0] + && tok_start[1] == toktab->operator[1]) + break; + if (toktab->token == ERROR) + { + char *buf = (char *) alloca (40); + sprintf (buf, "`%s' not allowed in operand of `#if'", tok_start); + cpp_error (pfile, buf); + } + op.op = toktab->token; + return op; + } + /* fall through */ + default: + op.op = *tok_start; + return op; + } + } + + + /* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + + int + cpp_parse_escape (pfile, string_ptr) + cpp_reader *pfile; + char **string_ptr; + { + register int c = *(*string_ptr)++; + switch (c) + { + case 'a': + return TARGET_BELL; + case 'b': + return TARGET_BS; + case 'e': + case 'E': + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "non-ANSI-standard escape sequence, `\\%c'", c); + return 033; + case 'f': + return TARGET_FF; + case 'n': + return TARGET_NEWLINE; + case 'r': + return TARGET_CR; + case 't': + return TARGET_TAB; + case 'v': + return TARGET_VT; + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + register int i = c - '0'; + register int count = 0; + while (++count < 3) + { + c = *(*string_ptr)++; + if (c >= '0' && c <= '7') + i = (i << 3) + c - '0'; + else + { + (*string_ptr)--; + break; + } + } + if ((i & ~((1 << MAX_CHAR_TYPE_SIZE) - 1)) != 0) + { + i &= (1 << MAX_CHAR_TYPE_SIZE) - 1; + cpp_warning (pfile, + "octal character constant does not fit in a byte"); + } + return i; + } + case 'x': + { + register unsigned i = 0, overflow = 0, digits_found = 0, digit; + for (;;) + { + c = *(*string_ptr)++; + if (c >= '0' && c <= '9') + digit = c - '0'; + else if (c >= 'a' && c <= 'f') + digit = c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + digit = c - 'A' + 10; + else + { + (*string_ptr)--; + break; + } + overflow |= i ^ (i << 4 >> 4); + i = (i << 4) + digit; + digits_found = 1; + } + if (!digits_found) + cpp_error (pfile, "\\x used with no following hex digits"); + if (overflow | (i & ~((1 << BITS_PER_UNIT) - 1))) + { + i &= (1 << BITS_PER_UNIT) - 1; + cpp_warning (pfile, + "hex character constant does not fit in a byte"); + } + return i; + } + default: + return c; + } + } + + static void + integer_overflow (pfile) + cpp_reader *pfile; + { + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "integer overflow in preprocessor expression"); + } + + static long + left_shift (pfile, a, unsignedp, b) + cpp_reader *pfile; + long a; + int unsignedp; + unsigned long b; + { + if (b >= HOST_BITS_PER_LONG) + { + if (! unsignedp && a != 0) + integer_overflow (pfile); + return 0; + } + else if (unsignedp) + return (unsigned long) a << b; + else + { + long l = a << b; + if (l >> b != a) + integer_overflow (pfile); + return l; + } + } + + static long + right_shift (pfile, a, unsignedp, b) + cpp_reader *pfile; + long a; + int unsignedp; + unsigned long b; + { + if (b >= HOST_BITS_PER_LONG) + return unsignedp ? 0 : a >> (HOST_BITS_PER_LONG - 1); + else if (unsignedp) + return (unsigned long) a >> b; + else + return a >> b; + } + + /* These priorities are all even, so we can handle associatively. */ + #define PAREN_INNER_PRIO 0 + #define COMMA_PRIO 4 + #define COND_PRIO (COMMA_PRIO+2) + #define OROR_PRIO (COND_PRIO+2) + #define ANDAND_PRIO (OROR_PRIO+2) + #define OR_PRIO (ANDAND_PRIO+2) + #define XOR_PRIO (OR_PRIO+2) + #define AND_PRIO (XOR_PRIO+2) + #define EQUAL_PRIO (AND_PRIO+2) + #define LESS_PRIO (EQUAL_PRIO+2) + #define SHIFT_PRIO (LESS_PRIO+2) + #define PLUS_PRIO (SHIFT_PRIO+2) + #define MUL_PRIO (PLUS_PRIO+2) + #define UNARY_PRIO (MUL_PRIO+2) + #define PAREN_OUTER_PRIO (UNARY_PRIO+2) + + #define COMPARE(OP) \ + top->unsignedp = 0;\ + top->value = (unsigned1 || unsigned2) ? (unsigned long) v1 OP v2 : (v1 OP v2) + + /* Parse and evaluate a C expression, reading from PFILE. + Returns the value of the expression. */ + + HOST_WIDE_INT + cpp_parse_expr (pfile) + cpp_reader *pfile; + { + /* The implementation is an operator precedence parser, + i.e. a bottom-up parser, using a stack for not-yet-reduced tokens. + + The stack base is 'stack', and the current stack pointer is 'top'. + There is a stack element for each operator (only), + and the most recently pushed operator is 'top->op'. + An operand (value) is stored in the 'value' field of the stack + element of the operator that precedes it. + In that case the 'flags' field has the HAVE_VALUE flag set. */ + + #define INIT_STACK_SIZE 20 + struct operation init_stack[INIT_STACK_SIZE]; + struct operation *stack = init_stack; + struct operation *limit = stack + INIT_STACK_SIZE; + register struct operation *top = stack; + int lprio, rprio; + + top->rprio = 0; + top->flags = 0; + for (;;) + { + struct operation op; + char flags = 0; + + /* Read a token */ + op = cpp_lex (pfile); + + /* See if the token is an operand, in which case go to set_value. + If the token is an operator, figure out its left and right + priorities, and then goto maybe_reduce. */ + + switch (op.op) + { + case NAME: + top->value = 0, top->unsignedp = 0; + goto set_value; + case INT: case CHAR: + top->value = op.value; + top->unsignedp = op.unsignedp; + goto set_value; + case 0: + lprio = 0; goto maybe_reduce; + case '+': case '-': + /* Is this correct if unary ? FIXME */ + flags = RIGHT_OPERAND_REQUIRED; + lprio = PLUS_PRIO; rprio = lprio + 1; goto maybe_reduce; + case '!': case '~': + flags = RIGHT_OPERAND_REQUIRED; + rprio = UNARY_PRIO; lprio = rprio + 1; goto maybe_reduce; + case '*': case '/': case '%': + lprio = MUL_PRIO; goto binop; + case '<': case '>': case LEQ: case GEQ: + lprio = LESS_PRIO; goto binop; + case EQUAL: case NOTEQUAL: + lprio = EQUAL_PRIO; goto binop; + case LSH: case RSH: + lprio = SHIFT_PRIO; goto binop; + case '&': lprio = AND_PRIO; goto binop; + case '^': lprio = XOR_PRIO; goto binop; + case '|': lprio = OR_PRIO; goto binop; + case ANDAND: lprio = ANDAND_PRIO; goto binop; + case OROR: lprio = OROR_PRIO; goto binop; + case ',': + lprio = COMMA_PRIO; goto binop; + case '(': + lprio = PAREN_OUTER_PRIO; rprio = PAREN_INNER_PRIO; + goto maybe_reduce; + case ')': + lprio = PAREN_INNER_PRIO; rprio = PAREN_OUTER_PRIO; + goto maybe_reduce; + case ':': + lprio = COND_PRIO; rprio = COND_PRIO; + goto maybe_reduce; + case '?': + lprio = COND_PRIO + 1; rprio = COND_PRIO; + goto maybe_reduce; + binop: + flags = LEFT_OPERAND_REQUIRED|RIGHT_OPERAND_REQUIRED; + rprio = lprio + 1; + goto maybe_reduce; + default: + cpp_error (pfile, "invalid character in #if"); + goto syntax_error; + } + + set_value: + /* Push a value onto the stack. */ + if (top->flags & HAVE_VALUE) + { + cpp_error (pfile, "syntax error in #if"); + goto syntax_error; + } + top->flags |= HAVE_VALUE; + continue; + + maybe_reduce: + /* Push an operator, and check if we can reduce now. */ + while (top->rprio > lprio) + { + long v1 = top[-1].value, v2 = top[0].value; + int unsigned1 = top[-1].unsignedp, unsigned2 = top[0].unsignedp; + top--; + if ((top[1].flags & LEFT_OPERAND_REQUIRED) + && ! (top[0].flags & HAVE_VALUE)) + { + cpp_error (pfile, "syntax error - missing left operand"); + goto syntax_error; + } + if ((top[1].flags & RIGHT_OPERAND_REQUIRED) + && ! (top[1].flags & HAVE_VALUE)) + { + cpp_error (pfile, "syntax error - missing right operand"); + goto syntax_error; + } + /* top[0].value = (top[1].op)(v1, v2);*/ + switch (top[1].op) + { + case '+': + if (!(top->flags & HAVE_VALUE)) + { /* Unary '+' */ + top->value = v2; + top->unsignedp = unsigned2; + top->flags |= HAVE_VALUE; + } + else + { + top->value = v1 + v2; + top->unsignedp = unsigned1 || unsigned2; + if (! top->unsignedp + && ! possible_sum_sign (v1, v2, top->value)) + integer_overflow (pfile); + } + break; + case '-': + if (!(top->flags & HAVE_VALUE)) + { /* Unary '-' */ + top->value = - v2; + if ((top->value & v2) < 0 && ! unsigned2) + integer_overflow (pfile); + top->unsignedp = unsigned2; + top->flags |= HAVE_VALUE; + } + else + { /* Binary '-' */ + top->value = v1 - v2; + top->unsignedp = unsigned1 || unsigned2; + if (! top->unsignedp + && ! possible_sum_sign (top->value, v2, v1)) + integer_overflow (pfile); + } + break; + case '*': + top->unsignedp = unsigned1 || unsigned2; + if (top->unsignedp) + top->value = (unsigned long) v1 * v2; + else + { + top->value = v1 * v2; + if (v1 + && (top->value / v1 != v2 + || (top->value & v1 & v2) < 0)) + integer_overflow (pfile); + } + break; + case '/': + if (v2 == 0) + { + cpp_error (pfile, "division by zero in #if"); + v2 = 1; + } + top->unsignedp = unsigned1 || unsigned2; + if (top->unsignedp) + top->value = (unsigned long) v1 / v2; + else + { + top->value = v1 / v2; + if ((top->value & v1 & v2) < 0) + integer_overflow (pfile); + } + break; + case '%': + if (v2 == 0) + { + cpp_error (pfile, "division by zero in #if"); + v2 = 1; + } + top->unsignedp = unsigned1 || unsigned2; + if (top->unsignedp) + top->value = (unsigned long) v1 % v2; + else + top->value = v1 % v2; + break; + case '!': + if (top->flags & HAVE_VALUE) + { + cpp_error (pfile, "syntax error"); + goto syntax_error; + } + top->value = ! v2; + top->unsignedp = 0; + top->flags |= HAVE_VALUE; + break; + case '~': + if (top->flags & HAVE_VALUE) + { + cpp_error (pfile, "syntax error"); + goto syntax_error; + } + top->value = ~ v2; + top->unsignedp = unsigned2; + top->flags |= HAVE_VALUE; + break; + case '<': COMPARE(<); break; + case '>': COMPARE(>); break; + case LEQ: COMPARE(<=); break; + case GEQ: COMPARE(>=); break; + case EQUAL: + top->value = (v1 == v2); + top->unsignedp = 0; + break; + case NOTEQUAL: + top->value = (v1 != v2); + top->unsignedp = 0; + break; + case LSH: + top->unsignedp = unsigned1; + if (v2 < 0 && ! unsigned2) + top->value = right_shift (pfile, v1, unsigned1, -v2); + else + top->value = left_shift (pfile, v1, unsigned1, v2); + break; + case RSH: + top->unsignedp = unsigned1; + if (v2 < 0 && ! unsigned2) + top->value = left_shift (pfile, v1, unsigned1, -v2); + else + top->value = right_shift (pfile, v1, unsigned1, v2); + break; + #define LOGICAL(OP) \ + top->value = v1 OP v2;\ + top->unsignedp = unsigned1 || unsigned2; + case '&': LOGICAL(&); break; + case '^': LOGICAL(^); break; + case '|': LOGICAL(|); break; + case ANDAND: + top->value = v1 && v2; top->unsignedp = 0; break; + case OROR: + top->value = v1 || v2; top->unsignedp = 0; break; + case ',': + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "comma operator in operand of `#if'"); + top->value = v2; + top->unsignedp = unsigned2; + break; + case '(': case '?': + cpp_error (pfile, "syntax error in #if"); + goto syntax_error; + case ':': + if (top[0].op != '?') + { + cpp_error (pfile, + "syntax error ':' without preceding '?'"); + goto syntax_error; + } + else if (! (top[1].flags & HAVE_VALUE) + || !(top[-1].flags & HAVE_VALUE) + || !(top[0].flags & HAVE_VALUE)) + { + cpp_error (pfile, "bad syntax for ?: operator"); + goto syntax_error; + } + else + { + top--; + top->value = top->value ? v1 : v2; + top->unsignedp = unsigned1 || unsigned2; + } + break; + case ')': + if ((top[1].flags & HAVE_VALUE) + || ! (top[0].flags & HAVE_VALUE) + || top[0].op != '(' + || (top[-1].flags & HAVE_VALUE)) + { + cpp_error (pfile, "mismatched parentheses in #if"); + goto syntax_error; + } + else + { + top--; + top->value = v1; + top->unsignedp = unsigned1; + top->flags |= HAVE_VALUE; + } + break; + default: + fprintf (stderr, + top[1].op >= ' ' && top[1].op <= '~' + ? "unimplemented operator '%c'\n" + : "unimplemented operator '\\%03o'\n", + top[1].op); + } + } + if (op.op == 0) + { + if (top != stack) + cpp_error (pfile, "internal error in #if expression"); + if (stack != init_stack) + free (stack); + return top->value; + } + top++; + + /* Check for and handle stack overflow. */ + if (top == limit) + { + struct operation *new_stack; + int old_size = (char*)limit - (char*)stack; + int new_size = 2 * old_size; + if (stack != init_stack) + new_stack = (struct operation*) xrealloc (stack, new_size); + else + { + new_stack = (struct operation*) xmalloc (new_size); + bcopy ((char *) stack, (char *) new_stack, old_size); + } + stack = new_stack; + top = (struct operation*)((char*) new_stack + old_size); + limit = (struct operation*)((char*) new_stack + new_size); + } + + top->flags = flags; + top->rprio = rprio; + top->op = op.op; + } + syntax_error: + if (stack != init_stack) + free (stack); + skip_rest_of_line (pfile); + return 0; + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cpphash.c gcc-2.7.0/cpphash.c *** gcc-2.6.3/cpphash.c --- gcc-2.7.0/cpphash.c Thu Jun 15 07:24:00 1995 *************** *** 0 **** --- 1,214 ---- + /* Part of CPP library. (Macro hash table support.) + Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. + Written by Per Bothner, 1994. + Based on CCCP program by by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + + 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + 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! */ + + #include "cpplib.h" + #include "cpphash.h" + + extern char *xmalloc PARAMS ((unsigned)); + + /* Define a generic NULL if one hasn't already been defined. */ + + #ifndef NULL + #define NULL 0 + #endif + + #ifndef __STDC__ + #define const + #define volatile + #endif + + /* + * return hash function on name. must be compatible with the one + * computed a step at a time, elsewhere + */ + int + hashf (name, len, hashsize) + register const U_CHAR *name; + register int len; + int hashsize; + { + register int r = 0; + + while (len--) + r = HASHSTEP (r, *name++); + + return MAKE_POS (r) % hashsize; + } + + /* + * find the most recent hash node for name name (ending with first + * non-identifier char) installed by install + * + * If LEN is >= 0, it is the length of the name. + * Otherwise, compute the length by scanning the entire name. + * + * If HASH is >= 0, it is the precomputed hash code. + * Otherwise, compute the hash code. + */ + HASHNODE * + cpp_lookup (pfile, name, len, hash) + struct parse_file *pfile; + const U_CHAR *name; + int len; + int hash; + { + register const U_CHAR *bp; + register HASHNODE *bucket; + + if (len < 0) + { + for (bp = name; is_idchar[*bp]; bp++) ; + len = bp - name; + } + + if (hash < 0) + hash = hashf (name, len, HASHSIZE); + + bucket = hashtab[hash]; + while (bucket) { + if (bucket->length == len && strncmp (bucket->name, name, len) == 0) + return bucket; + bucket = bucket->next; + } + return (HASHNODE*) 0; + } + + /* + * Delete a hash node. Some weirdness to free junk from macros. + * More such weirdness will have to be added if you define more hash + * types that need it. + */ + + /* Note that the DEFINITION of a macro is removed from the hash table + but its storage is not freed. This would be a storage leak + except that it is not reasonable to keep undefining and redefining + large numbers of macros many times. + In any case, this is necessary, because a macro can be #undef'd + in the middle of reading the arguments to a call to it. + If #undef freed the DEFINITION, that would crash. */ + + void + delete_macro (hp) + HASHNODE *hp; + { + + if (hp->prev != NULL) + hp->prev->next = hp->next; + if (hp->next != NULL) + hp->next->prev = hp->prev; + + /* make sure that the bucket chain header that + the deleted guy was on points to the right thing afterwards. */ + if (hp == *hp->bucket_hdr) + *hp->bucket_hdr = hp->next; + + if (hp->type == T_MACRO) + { + DEFINITION *d = hp->value.defn; + struct reflist *ap, *nextap; + + for (ap = d->pattern; ap != NULL; ap = nextap) + { + nextap = ap->next; + free (ap); + } + if (d->nargs >= 0) + free (d->args.argnames); + free (d); + } + + free (hp); + } + /* + * install a name in the main hash table, even if it is already there. + * name stops with first non alphanumeric, except leading '#'. + * caller must check against redefinition if that is desired. + * delete_macro () removes things installed by install () in fifo order. + * this is important because of the `defined' special symbol used + * in #if, and also if pushdef/popdef directives are ever implemented. + * + * If LEN is >= 0, it is the length of the name. + * Otherwise, compute the length by scanning the entire name. + * + * If HASH is >= 0, it is the precomputed hash code. + * Otherwise, compute the hash code. + */ + HASHNODE * + install (name, len, type, ivalue, value, hash) + U_CHAR *name; + int len; + enum node_type type; + int ivalue; + char *value; + int hash; + { + register HASHNODE *hp; + register int i, bucket; + register U_CHAR *p, *q; + + if (len < 0) { + p = name; + while (is_idchar[*p]) + p++; + len = p - name; + } + + if (hash < 0) + hash = hashf (name, len, HASHSIZE); + + i = sizeof (HASHNODE) + len + 1; + hp = (HASHNODE *) xmalloc (i); + bucket = hash; + hp->bucket_hdr = &hashtab[bucket]; + hp->next = hashtab[bucket]; + hashtab[bucket] = hp; + hp->prev = NULL; + if (hp->next != NULL) + hp->next->prev = hp; + hp->type = type; + hp->length = len; + if (hp->type == T_CONST) + hp->value.ival = ivalue; + else + hp->value.cpval = value; + hp->name = ((U_CHAR *) hp) + sizeof (HASHNODE); + p = hp->name; + q = name; + for (i = 0; i < len; i++) + *p++ = *q++; + hp->name[len] = 0; + return hp; + } + + void + cpp_hash_cleanup (pfile) + cpp_reader *pfile; + { + register int i; + for (i = HASHSIZE; --i >= 0; ) + { + while (hashtab[i]) + delete_macro (hashtab[i]); + } + } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cpphash.h gcc-2.7.0/cpphash.h *** gcc-2.6.3/cpphash.h --- gcc-2.7.0/cpphash.h Sat Jan 7 17:05:58 1995 *************** *** 0 **** --- 1,40 ---- + enum node_type; + + /* different kinds of things that can appear in the value field + of a hash node. Actually, this may be useless now. */ + union hashval { + int ival; + char *cpval; + DEFINITION *defn; + #if 0 + KEYDEF *keydef; + #endif + }; + + struct hashnode { + struct hashnode *next; /* double links for easy deletion */ + struct hashnode *prev; + struct hashnode **bucket_hdr; /* also, a back pointer to this node's hash + chain is kept, in case the node is the head + of the chain and gets deleted. */ + enum node_type type; /* type of special token */ + int length; /* length of token, for quick comparison */ + U_CHAR *name; /* the actual name */ + union hashval value; /* pointer to expansion, or whatever */ + }; + + typedef struct hashnode HASHNODE; + + /* Some definitions for the hash table. The hash function MUST be + computed as shown in hashf () below. That is because the rescan + loop computes the hash value `on the fly' for most tokens, + in order to avoid the overhead of a lot of procedure calls to + the hashf () function. Hashf () only exists for the sake of + politeness, for use when speed isn't so important. */ + + #define HASHSIZE 1403 + static HASHNODE *hashtab[HASHSIZE]; + #define HASHSTEP(old, c) ((old << 2) + c) + #define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */ + + extern HASHNODE* install PARAMS ((U_CHAR*,int,enum node_type, int,char*,int)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cpplib.c gcc-2.7.0/cpplib.c *** gcc-2.6.3/cpplib.c --- gcc-2.7.0/cpplib.c Thu Jun 15 07:24:38 1995 *************** *** 0 **** --- 1,7528 ---- + /* CPP Library. + Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. + Written by Per Bothner, 1994-95. + Based on CCCP program by by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + + 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + 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! */ + + #ifdef EMACS + #define NO_SHORTNAMES + #include "../src/config.h" + #ifdef open + #undef open + #undef read + #undef write + #endif /* open */ + #endif /* EMACS */ + + /* The macro EMACS is defined when cpp is distributed as part of Emacs, + for the sake of machines with limited C compilers. */ + #ifndef EMACS + #include "config.h" + #endif /* not EMACS */ + + #ifndef STANDARD_INCLUDE_DIR + #define STANDARD_INCLUDE_DIR "/usr/include" + #endif + + #ifndef LOCAL_INCLUDE_DIR + #define LOCAL_INCLUDE_DIR "/usr/local/include" + #endif + + #if 0 /* We can't get ptrdiff_t, so I arranged not to need PTR_INT_TYPE. */ + #ifdef __STDC__ + #define PTR_INT_TYPE ptrdiff_t + #else + #define PTR_INT_TYPE long + #endif + #endif /* 0 */ + + #include "cpplib.h" + #include "cpphash.h" + + #ifndef STDC_VALUE + #define STDC_VALUE 1 + #endif + + /* By default, colon separates directories in a path. */ + #ifndef PATH_SEPARATOR + #define PATH_SEPARATOR ':' + #endif + + #include + #include + #include + #ifdef __STDC__ + #include + #endif + + #ifndef VMS + #ifndef USG + #include /* for __DATE__ and __TIME__ */ + #include + #else + #include /* CYGNUS LOCAL: shebs -noquiet */ + #include + #include + #include + #endif /* USG */ + #endif /* not VMS */ + + /* This defines "errno" properly for VMS, and gives us EACCES. */ + #include + + extern char *index (); + extern char *rindex (); + + #ifndef O_RDONLY + #define O_RDONLY 0 + #endif + + #undef MIN + #undef MAX + #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) + #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) + + /* Find the largest host integer type and set its size and type. */ + + #ifndef HOST_BITS_PER_WIDE_INT + + #if HOST_BITS_PER_LONG > HOST_BITS_PER_INT + #define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG + #define HOST_WIDE_INT long + #else + #define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT + #define HOST_WIDE_INT int + #endif + + #endif + + #ifndef S_ISREG + #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) + #endif + + #ifndef S_ISDIR + #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) + #endif + + /* Define a generic NULL if one hasn't already been defined. */ + + #ifndef NULL + #define NULL 0 + #endif + + #ifndef GENERIC_PTR + #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) + #define GENERIC_PTR void * + #else + #define GENERIC_PTR char * + #endif + #endif + + #ifndef NULL_PTR + #define NULL_PTR ((GENERIC_PTR)0) + #endif + + #ifndef INCLUDE_LEN_FUDGE + #define INCLUDE_LEN_FUDGE 0 + #endif + + /* Symbols to predefine. */ + + #ifdef CPP_PREDEFINES + static char *predefs = CPP_PREDEFINES; + #else + static char *predefs = ""; + #endif + + /* We let tm.h override the types used here, to handle trivial differences + such as the choice of unsigned int or long unsigned int for size_t. + When machines start needing nontrivial differences in the size type, + it would be best to do something here to figure out automatically + from other information what type to use. */ + + /* The string value for __SIZE_TYPE__. */ + + #ifndef SIZE_TYPE + #define SIZE_TYPE "long unsigned int" + #endif + + /* The string value for __PTRDIFF_TYPE__. */ + + #ifndef PTRDIFF_TYPE + #define PTRDIFF_TYPE "long int" + #endif + + /* The string value for __WCHAR_TYPE__. */ + + #ifndef WCHAR_TYPE + #define WCHAR_TYPE "int" + #endif + #define CPP_WCHAR_TYPE(PFILE) \ + (CPP_OPTIONS (PFILE)->cplusplus ? "__wchar_t" : WCHAR_TYPE) + + /* The string value for __USER_LABEL_PREFIX__ */ + + #ifndef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + #endif + + /* The string value for __REGISTER_PREFIX__ */ + + #ifndef REGISTER_PREFIX + #define REGISTER_PREFIX "" + #endif + + /* In the definition of a #assert name, this structure forms + a list of the individual values asserted. + Each value is itself a list of "tokens". + These are strings that are compared by name. */ + + struct tokenlist_list { + struct tokenlist_list *next; + struct arglist *tokens; + }; + + struct assertion_hashnode { + struct assertion_hashnode *next; /* double links for easy deletion */ + struct assertion_hashnode *prev; + /* also, a back pointer to this node's hash + chain is kept, in case the node is the head + of the chain and gets deleted. */ + struct assertion_hashnode **bucket_hdr; + int length; /* length of token, for quick comparison */ + U_CHAR *name; /* the actual name */ + /* List of token-sequences. */ + struct tokenlist_list *value; + }; + + #define SKIP_WHITE_SPACE(p) do { while (is_hor_space[*p]) p++; } while (0) + #define SKIP_ALL_WHITE_SPACE(p) do { while (is_space[*p]) p++; } while (0) + + #define PEEKN(N) (CPP_BUFFER (pfile)->rlimit - CPP_BUFFER (pfile)->cur >= (N) ? CPP_BUFFER (pfile)->cur[N] : EOF) + #define FORWARD(N) CPP_FORWARD (CPP_BUFFER (pfile), (N)) + #define GETC() CPP_BUF_GET (CPP_BUFFER (pfile)) + #define PEEKC() CPP_BUF_PEEK (CPP_BUFFER (pfile)) + /* CPP_IS_MACRO_BUFFER is true if the buffer contains macro expansion. + (Note that it is false while we're expanding marco *arguments*.) */ + #define CPP_IS_MACRO_BUFFER(PBUF) ((PBUF)->cleanup == macro_cleanup) + + /* Move all backslash-newline pairs out of embarrassing places. + Exchange all such pairs following BP + with any potentially-embarrassing characters that follow them. + Potentially-embarrassing characters are / and * + (because a backslash-newline inside a comment delimiter + would cause it not to be recognized). */ + + #define NEWLINE_FIX \ + do {while (PEEKC() == '\\' && PEEKN(1) == '\n') FORWARD(2); } while(0) + + /* Same, but assume we've already read the potential '\\' into C. */ + #define NEWLINE_FIX1(C) do { \ + while ((C) == '\\' && PEEKC() == '\n') { FORWARD(1); (C) = GETC(); }\ + } while(0) + + /* Name under which this program was invoked. */ + + char *progname; + + struct cpp_pending { + struct cpp_pending *next; + char *cmd; + char *arg; + }; + + /* Forward declarations. */ + + extern char *xmalloc (); + + static void add_import (); + static void append_include_chain (); + static void make_undef (); + static void make_assertion (); + static void path_include (); + static void initialize_builtins (); + static void initialize_char_syntax (); + static void dump_arg_n (); + static void dump_defn_1 (); + extern void delete_macro (); + static void trigraph_pcp (); + static int finclude (); + static void validate_else (); + static int comp_def_part (); + extern void fancy_abort (); + static void pipe_closed (); + static void print_containing_files (); + static int lookup_import (); + static int redundant_include_p (); + static is_system_include (); + static struct file_name_map *read_name_map (); + static char *read_filename_string (); + static int open_include_file (); + static int check_preconditions (); + static void pcfinclude (); + static void pcstring_used (); + static int check_macro_name (); + static int compare_defs (); + static int compare_token_lists (); + static HOST_WIDE_INT eval_if_expression (); + static int change_newlines (); + extern int hashf (); + static int file_size_and_mode (); + static struct arglist *read_token_list (); + static void free_token_list (); + static int safe_read (); + static void push_macro_expansion PARAMS ((cpp_reader *, + U_CHAR*, int, HASHNODE*)); + static struct cpp_pending *nreverse_pending PARAMS ((struct cpp_pending*)); + extern char *xrealloc (); + extern char *xcalloc (); + static char *savestring (); + + static void conditional_skip (); + static void skip_if_group (); + + /* Last arg to output_line_command. */ + enum file_change_code {same_file, enter_file, leave_file}; + + /* External declarations. */ + + extern HOST_WIDE_INT cpp_parse_expr PARAMS ((cpp_reader*)); + + extern char *getenv (); + extern FILE *fdopen (); + extern char *version_string; + extern struct tm *localtime (); + + /* These functions are declared to return int instead of void since they + are going to be placed in a table and some old compilers have trouble with + pointers to functions returning void. */ + + static int do_define (); + static int do_line (); + static int do_include (); + static int do_undef (); + static int do_error (); + static int do_pragma (); + static int do_ident (); + static int do_if (); + static int do_xifdef (); + static int do_else (); + static int do_elif (); + static int do_endif (); + static int do_sccs (); + static int do_once (); + static int do_assert (); + static int do_unassert (); + static int do_warning (); + + struct file_name_list + { + struct file_name_list *next; + char *fname; + /* If the following is nonzero, it is a macro name. + Don't include the file again if that macro is defined. */ + U_CHAR *control_macro; + /* If the following is nonzero, it is a C-language system include + directory. */ + int c_system_include_path; + /* Mapping of file names for this directory. */ + struct file_name_map *name_map; + /* Non-zero if name_map is valid. */ + int got_name_map; + }; + + /* If a buffer's dir field is SELF_DIR_DUMMY, it means the file was found + via the same directory as the file that #included it. */ + #define SELF_DIR_DUMMY ((struct file_name_list*)(~0)) + + /* #include "file" looks in source file dir, then stack. */ + /* #include just looks in the stack. */ + /* -I directories are added to the end, then the defaults are added. */ + /* The */ + static struct default_include { + char *fname; /* The name of the directory. */ + int cplusplus; /* Only look here if we're compiling C++. */ + int cxx_aware; /* Includes in this directory don't need to + be wrapped in extern "C" when compiling + C++. */ + } include_defaults_array[] + #ifdef INCLUDE_DEFAULTS + = INCLUDE_DEFAULTS; + #else + = { + /* Pick up GNU C++ specific include files. */ + { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, + #ifdef CROSS_COMPILE + /* This is the dir for fixincludes. Put it just before + the files that we fix. */ + { GCC_INCLUDE_DIR, 0, 0 }, + /* For cross-compilation, this dir name is generated + automatically in Makefile.in. */ + { CROSS_INCLUDE_DIR, 0, 0 }, + /* This is another place that the target system's headers might be. */ + { TOOL_INCLUDE_DIR, 0, 1 }, + #else /* not CROSS_COMPILE */ + /* This should be /usr/local/include and should come before + the fixincludes-fixed header files. */ + { LOCAL_INCLUDE_DIR, 0, 1 }, + /* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here. + Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */ + { TOOL_INCLUDE_DIR, 0, 1 }, + /* This is the dir for fixincludes. Put it just before + the files that we fix. */ + { GCC_INCLUDE_DIR, 0, 0 }, + /* Some systems have an extra dir of include files. */ + #ifdef SYSTEM_INCLUDE_DIR + { SYSTEM_INCLUDE_DIR, 0, 0 }, + #endif + { STANDARD_INCLUDE_DIR, 0, 0 }, + #endif /* not CROSS_COMPILE */ + { 0, 0, 0 } + }; + #endif /* no INCLUDE_DEFAULTS */ + + /* `struct directive' defines one #-directive, including how to handle it. */ + + struct directive { + int length; /* Length of name */ + int (*func)(); /* Function to handle directive */ + char *name; /* Name of directive */ + enum node_type type; /* Code which describes which directive. */ + char command_reads_line; /* One if rest of line is read by func. */ + char traditional_comments; /* Nonzero: keep comments if -traditional. */ + char pass_thru; /* Copy preprocessed directive to output file.*/ + }; + + /* Here is the actual list of #-directives, most-often-used first. + The initialize_builtins function assumes #define is the very first. */ + + static struct directive directive_table[] = { + { 6, do_define, "define", T_DEFINE, 0, 1}, + { 5, do_xifdef, "ifdef", T_IFDEF, 1}, + { 6, do_xifdef, "ifndef", T_IFNDEF, 1}, + { 7, do_include, "include", T_INCLUDE, 1}, + { 12, do_include, "include_next", T_INCLUDE_NEXT, 1}, + { 6, do_include, "import", T_IMPORT, 1}, + { 5, do_endif, "endif", T_ENDIF, 1}, + { 4, do_else, "else", T_ELSE, 1}, + { 2, do_if, "if", T_IF, 1}, + { 4, do_elif, "elif", T_ELIF, 1}, + { 5, do_undef, "undef", T_UNDEF}, + { 5, do_error, "error", T_ERROR}, + { 7, do_warning, "warning", T_WARNING}, + { 6, do_pragma, "pragma", T_PRAGMA, 0, 0, 1}, + { 4, do_line, "line", T_LINE, 1}, + { 5, do_ident, "ident", T_IDENT, 1, 0, 1}, + #ifdef SCCS_DIRECTIVE + { 4, do_sccs, "sccs", T_SCCS}, + #endif + { 6, do_assert, "assert", T_ASSERT, 1}, + { 8, do_unassert, "unassert", T_UNASSERT, 1}, + { -1, 0, "", T_UNUSED}, + }; + + /* table to tell if char can be part of a C identifier. */ + U_CHAR is_idchar[256]; + /* table to tell if char can be first char of a c identifier. */ + U_CHAR is_idstart[256]; + /* table to tell if c is horizontal space. */ + U_CHAR is_hor_space[256]; + /* table to tell if c is horizontal or vertical space. */ + static U_CHAR is_space[256]; + + /* Initialize syntactic classifications of characters. */ + + static void + initialize_char_syntax (opts) + struct cpp_options *opts; + { + register int i; + + /* + * Set up is_idchar and is_idstart tables. These should be + * faster than saying (is_alpha (c) || c == '_'), etc. + * Set up these things before calling any routines tthat + * refer to them. + */ + for (i = 'a'; i <= 'z'; i++) { + is_idchar[i - 'a' + 'A'] = 1; + is_idchar[i] = 1; + is_idstart[i - 'a' + 'A'] = 1; + is_idstart[i] = 1; + } + for (i = '0'; i <= '9'; i++) + is_idchar[i] = 1; + is_idchar['_'] = 1; + is_idstart['_'] = 1; + is_idchar['$'] = opts->dollars_in_ident; + is_idstart['$'] = opts->dollars_in_ident; + + /* horizontal space table */ + is_hor_space[' '] = 1; + is_hor_space['\t'] = 1; + is_hor_space['\v'] = 1; + is_hor_space['\f'] = 1; + is_hor_space['\r'] = 1; + + is_space[' '] = 1; + is_space['\t'] = 1; + is_space['\v'] = 1; + is_space['\f'] = 1; + is_space['\n'] = 1; + is_space['\r'] = 1; + } + + + /* Place into PFILE a quoted string representing the string SRC. + Caller must reserve enough space in pfile->token_buffer. */ + static void + quote_string (pfile, src) + cpp_reader *pfile; + char *src; + { + U_CHAR c; + + CPP_PUTC_Q (pfile, '\"'); + for (;;) + switch ((c = *src++)) + { + default: + if (isprint (c)) + CPP_PUTC_Q (pfile, c); + else + { + sprintf (CPP_PWRITTEN (pfile), "\\%03o", c); + CPP_ADJUST_WRITTEN (pfile, 4); + } + break; + + case '\"': + case '\\': + CPP_PUTC_Q (pfile, '\\'); + CPP_PUTC_Q (pfile, c); + break; + + case '\0': + CPP_PUTC_Q (pfile, '\"'); + CPP_NUL_TERMINATE_Q (pfile); + return; + } + } + + /* Make sure PFILE->token_buffer will hold at least N more chars. */ + + void + cpp_grow_buffer (pfile, n) + cpp_reader *pfile; + long n; + { + long old_written = CPP_WRITTEN (pfile); + pfile->token_buffer_size = n + 2 * pfile->token_buffer_size; + pfile->token_buffer = (U_CHAR*) + xrealloc(pfile->token_buffer, pfile->token_buffer_size); + CPP_SET_WRITTEN (pfile, old_written); + } + + + /* + * process a given definition string, for initialization + * If STR is just an identifier, define it with value 1. + * If STR has anything after the identifier, then it should + * be identifier=definition. + */ + + void + cpp_define (pfile, str) + cpp_reader *pfile; + U_CHAR *str; + { + U_CHAR *buf, *p; + + buf = str; + p = str; + if (!is_idstart[*p]) + { + cpp_error (pfile, "malformed option `-D %s'", str); + return; + } + while (is_idchar[*++p]) + ; + if (*p == 0) + { + buf = (U_CHAR *) alloca (p - buf + 4); + strcpy ((char *)buf, str); + strcat ((char *)buf, " 1"); + } + else if (*p != '=') + { + cpp_error (pfile, "malformed option `-D %s'", str); + return; + } + else + { + U_CHAR *q; + /* Copy the entire option so we can modify it. */ + buf = (U_CHAR *) alloca (2 * strlen (str) + 1); + strncpy (buf, str, p - str); + /* Change the = to a space. */ + buf[p - str] = ' '; + /* Scan for any backslash-newline and remove it. */ + p++; + q = &buf[p - str]; + while (*p) + { + if (*p == '\\' && p[1] == '\n') + p += 2; + else + *q++ = *p++; + } + *q = 0; + } + + do_define (pfile, NULL, buf, buf + strlen (buf)); + } + + /* Process the string STR as if it appeared as the body of a #assert. + OPTION is the option name for which STR was the argument. */ + + static void + make_assertion (pfile, option, str) + cpp_reader *pfile; + char *option; + U_CHAR *str; + { + cpp_buffer *ip; + struct directive *kt; + U_CHAR *buf, *p, *q; + + /* Copy the entire option so we can modify it. */ + buf = (U_CHAR *) alloca (strlen (str) + 1); + strcpy ((char *) buf, str); + /* Scan for any backslash-newline and remove it. */ + p = q = buf; + while (*p) { + #if 0 + if (*p == '\\' && p[1] == '\n') + p += 2; + else + #endif + *q++ = *p++; + } + *q = 0; + + p = buf; + if (!is_idstart[*p]) { + cpp_error (pfile, "malformed option `%s %s'", option, str); + return; + } + while (is_idchar[*++p]) + ; + while (*p == ' ' || *p == '\t') p++; + if (! (*p == 0 || *p == '(')) { + cpp_error (pfile, "malformed option `%s %s'", option, str); + return; + } + + ip = cpp_push_buffer (pfile, buf, strlen (buf)); + do_assert (pfile, NULL, NULL, NULL); + cpp_pop_buffer (pfile); + } + + /* Append a chain of `struct file_name_list's + to the end of the main include chain. + FIRST is the beginning of the chain to append, and LAST is the end. */ + + static void + append_include_chain (pfile, first, last) + cpp_reader *pfile; + struct file_name_list *first, *last; + { + struct cpp_options *opts = CPP_OPTIONS (pfile); + struct file_name_list *dir; + + if (!first || !last) + return; + + if (opts->include == 0) + opts->include = first; + else + opts->last_include->next = first; + + if (opts->first_bracket_include == 0) + opts->first_bracket_include = first; + + for (dir = first; ; dir = dir->next) { + int len = strlen (dir->fname) + INCLUDE_LEN_FUDGE; + if (len > pfile->max_include_len) + pfile->max_include_len = len; + if (dir == last) + break; + } + + last->next = NULL; + opts->last_include = last; + } + + /* Add output to `deps_buffer' for the -M switch. + STRING points to the text to be output. + SPACER is ':' for targets, ' ' for dependencies, zero for text + to be inserted literally. */ + + static void + deps_output (pfile, string, spacer) + cpp_reader *pfile; + char *string; + int spacer; + { + int size = strlen (string); + + if (size == 0) + return; + + #ifndef MAX_OUTPUT_COLUMNS + #define MAX_OUTPUT_COLUMNS 72 + #endif + if (spacer + && pfile->deps_column > 0 + && (pfile->deps_column + size) > MAX_OUTPUT_COLUMNS) + { + deps_output (pfile, " \\\n ", 0); + pfile->deps_column = 0; + } + + if (pfile->deps_size + size + 8 > pfile->deps_allocated_size) + { + pfile->deps_allocated_size = (pfile->deps_size + size + 50) * 2; + pfile->deps_buffer = (char *) xrealloc (pfile->deps_buffer, + pfile->deps_allocated_size); + } + if (spacer == ' ' && pfile->deps_column > 0) + pfile->deps_buffer[pfile->deps_size++] = ' '; + bcopy (string, &pfile->deps_buffer[pfile->deps_size], size); + pfile->deps_size += size; + pfile->deps_column += size; + if (spacer == ':') + pfile->deps_buffer[pfile->deps_size++] = ':'; + pfile->deps_buffer[pfile->deps_size] = 0; + } + + /* Given a colon-separated list of file names PATH, + add all the names to the search path for include files. */ + + static void + path_include (pfile, path) + cpp_reader *pfile; + char *path; + { + char *p; + + p = path; + + if (*p) + while (1) { + char *q = p; + char *name; + struct file_name_list *dirtmp; + + /* Find the end of this name. */ + while (*q != 0 && *q != PATH_SEPARATOR) q++; + if (p == q) { + /* An empty name in the path stands for the current directory. */ + name = (char *) xmalloc (2); + name[0] = '.'; + name[1] = 0; + } else { + /* Otherwise use the directory that is named. */ + name = (char *) xmalloc (q - p + 1); + bcopy (p, name, q - p); + name[q - p] = 0; + } + + dirtmp = (struct file_name_list *) + xmalloc (sizeof (struct file_name_list)); + dirtmp->next = 0; /* New one goes on the end */ + dirtmp->control_macro = 0; + dirtmp->c_system_include_path = 0; + dirtmp->fname = name; + dirtmp->got_name_map = 0; + append_include_chain (pfile, dirtmp, dirtmp); + + /* Advance past this name. */ + p = q; + if (*p == 0) + break; + /* Skip the colon. */ + p++; + } + } + + void + init_parse_options (opts) + struct cpp_options *opts; + { + bzero ((char *) opts, sizeof *opts); + opts->in_fname = NULL; + opts->out_fname = NULL; + + /* Initialize is_idchar to allow $. */ + opts->dollars_in_ident = 1; + initialize_char_syntax (opts); + opts->dollars_in_ident = DOLLARS_IN_IDENTIFIERS > 0; + + opts->no_line_commands = 0; + opts->no_trigraphs = 1; + opts->put_out_comments = 0; + opts->print_include_names = 0; + opts->dump_macros = dump_none; + opts->no_output = 0; + opts->cplusplus = 0; + opts->cplusplus_comments = 0; + + opts->verbose = 0; + opts->objc = 0; + opts->lang_asm = 0; + opts->for_lint = 0; + opts->chill = 0; + opts->pedantic_errors = 0; + opts->inhibit_warnings = 0; + opts->warn_comments = 0; + opts->warn_import = 1; + opts->warnings_are_errors = 0; + } + + enum cpp_token + null_underflow (pfile) + cpp_reader *pfile; + { + return CPP_EOF; + } + + int + null_cleanup (pbuf, pfile) + cpp_buffer *pbuf; + cpp_reader *pfile; + { + return 0; + } + + int + macro_cleanup (pbuf, pfile) + cpp_buffer *pbuf; + cpp_reader *pfile; + { + HASHNODE *macro = (HASHNODE*)pbuf->data; + if (macro->type == T_DISABLED) + macro->type = T_MACRO; + if (macro->type != T_MACRO || pbuf->buf != macro->value.defn->expansion) + free (pbuf->buf); + return 0; + } + + int + file_cleanup (pbuf, pfile) + cpp_buffer *pbuf; + cpp_reader *pfile; + { + if (pbuf->buf) + { + free (pbuf->buf); + pbuf->buf = 0; + } + return 0; + } + + static void + newline_fix (pfile) + cpp_reader *pfile; + { + #if 1 + NEWLINE_FIX; + #else + register U_CHAR *p = bp; + + /* First count the backslash-newline pairs here. */ + + while (p[0] == '\\' && p[1] == '\n') + p += 2; + + /* What follows the backslash-newlines is not embarrassing. */ + + if (*p != '/' && *p != '*') + return; + + /* Copy all potentially embarrassing characters + that follow the backslash-newline pairs + down to where the pairs originally started. */ + + while (*p == '*' || *p == '/') + *bp++ = *p++; + + /* Now write the same number of pairs after the embarrassing chars. */ + while (bp < p) { + *bp++ = '\\'; + *bp++ = '\n'; + } + #endif + } + + /* Assuming we have read '/'. + If this is the start of a comment (followed by '*' or '/'), + skip to the end of the comment, and return ' '. + Return EOF if we reached the end of file before the end of the comment. + If not the start of a comment, return '/'. */ + + static int + skip_comment (pfile, linep) + cpp_reader *pfile; + long *linep; + { + int c; + while (PEEKC() == '\\' && PEEKN(1) == '\n') + { + if (linep) + (*linep)++; + FORWARD(2); + } + if (PEEKC() == '*') + { + FORWARD(1); + for (;;) + { + int prev_c = c; + c = GETC (); + if (c == EOF) + return EOF; + while (c == '\\' && PEEKC() == '\n') + { + if (linep) + (*linep)++; + FORWARD(1), c = GETC(); + } + if (prev_c == '*' && c == '/') + return ' '; + if (c == '\n' && linep) + (*linep)++; + } + } + else if (PEEKC() == '/' && CPP_OPTIONS (pfile)->cplusplus_comments) + { + FORWARD(1); + for (;;) + { + c = GETC (); + if (c == EOF) + return ' '; /* Allow // to be terminated by EOF. */ + while (c == '\\' && PEEKC() == '\n') + { + FORWARD(1); + c = GETC(); + if (linep) + (*linep)++; + } + if (c == '\n') + { + /* Don't consider final '\n' to be part of comment. */ + FORWARD(-1); + return ' '; + } + } + } + else + return '/'; + } + + /* Skip whitespace \-newline and comments. Does not macro-expand. */ + void + cpp_skip_hspace (pfile) + cpp_reader *pfile; + { + while (1) + { + int c = PEEKC(); + if (c == EOF) + return; /* FIXME */ + if (is_hor_space[c]) + { + if ((c == '\f' || c == '\v') && CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "%s in preprocessing directive", + c == '\f' ? "formfeed" : "vertical tab"); + FORWARD(1); + } + else if (c == '/') + { + FORWARD (1); + c = skip_comment (pfile, NULL); + if (c == '/') + FORWARD(-1); + if (c == EOF || c == '/') + return; + } + else if (c == '\\' && PEEKN(1) == '\n') { + FORWARD(2); + } + else if (c == '@' && CPP_BUFFER (pfile)->has_escapes + && is_hor_space[PEEKN(1)]) + FORWARD(2); + else return; + } + } + + /* Read the rest of the current line. + The line is appended to PFILE's output buffer. */ + + void + copy_rest_of_line (pfile) + cpp_reader *pfile; + { + struct cpp_options *opts = CPP_OPTIONS (pfile); + for (;;) + { + int c = GETC(); + int nextc; + switch (c) + { + case EOF: + goto end_directive; + case '\\': + if (PEEKC() == '\n') + { + FORWARD (1); + continue; + } + case '\'': + case '\"': + goto scan_directive_token; + break; + case '/': + nextc = PEEKC(); + if (nextc == '*' || (opts->cplusplus_comments && nextc == '*')) + goto scan_directive_token; + break; + case '\f': + case '\v': + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "%s in preprocessing directive", + c == '\f' ? "formfeed" : "vertical tab"); + break; + + case '\n': + FORWARD(-1); + goto end_directive; + scan_directive_token: + FORWARD(-1); + cpp_get_token (pfile); + continue; + } + CPP_PUTC (pfile, c); + } + end_directive: ; + CPP_NUL_TERMINATE (pfile); + } + + void + skip_rest_of_line (pfile) + cpp_reader *pfile; + { + long old = CPP_WRITTEN (pfile); + copy_rest_of_line (pfile); + CPP_SET_WRITTEN (pfile, old); + } + + /* Handle a possible # directive. + '#' has already been read. */ + + int + handle_directive (pfile) + cpp_reader *pfile; + { int c; + register struct directive *kt; + int ident_length; + long after_ident; + U_CHAR *ident, *line_end; + long old_written = CPP_WRITTEN (pfile); + + cpp_skip_hspace (pfile); + + c = PEEKC (); + if (c >= '0' && c <= '9') + { + /* Handle # followed by a line number. */ + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "`#' followed by integer"); + do_line (pfile, NULL); + goto done_a_directive; + } + + /* Now find the directive name. */ + CPP_PUTC (pfile, '#'); + parse_name (pfile, GETC()); + ident = pfile->token_buffer + old_written + 1; + ident_length = CPP_PWRITTEN (pfile) - ident; + if (ident_length == 0 && PEEKC() == '\n') + { + /* A line of just `#' becomes blank. */ + goto done_a_directive; + } + + #if 0 + if (ident_length == 0 || !is_idstart[*ident]) { + U_CHAR *p = ident; + while (is_idchar[*p]) { + if (*p < '0' || *p > '9') + break; + p++; + } + /* Avoid error for `###' and similar cases unless -pedantic. */ + if (p == ident) { + while (*p == '#' || is_hor_space[*p]) p++; + if (*p == '\n') { + if (pedantic && !lang_asm) + cpp_warning (pfile, "invalid preprocessor directive"); + return 0; + } + } + + if (!lang_asm) + cpp_error (pfile, "invalid preprocessor directive name"); + + return 0; + } + #endif + /* + * Decode the keyword and call the appropriate expansion + * routine, after moving the input pointer up to the next line. + */ + for (kt = directive_table; ; kt++) { + if (kt->length <= 0) + goto not_a_directive; + if (kt->length == ident_length && !strncmp (kt->name, ident, ident_length)) + break; + } + + if (! kt->command_reads_line) + { + /* Nonzero means do not delete comments within the directive. + #define needs this when -traditional. */ + int comments = CPP_TRADITIONAL (pfile) && kt->traditional_comments; + int save_put_out_comments = CPP_OPTIONS (pfile)->put_out_comments; + CPP_OPTIONS (pfile)->put_out_comments = comments; + after_ident = CPP_WRITTEN (pfile); + copy_rest_of_line (pfile); + CPP_OPTIONS (pfile)->put_out_comments = save_put_out_comments; + } + + /* For #pragma and #define, we may want to pass through the directive. + Other directives may create output, but we don't want the directive + itself out, so we pop it now. For example #include may write a #line + command (see comment in do_include), and conditionals may emit + #failed ... #endfailed stuff. But note that popping the buffer + means the parameters to kt->func may point after pfile->limit + so these parameters are invalid as soon as something gets appended + to the token_buffer. */ + + line_end = CPP_PWRITTEN (pfile); + if (!kt->pass_thru && kt->type != T_DEFINE) + CPP_SET_WRITTEN (pfile, old_written); + + (*kt->func) (pfile, kt, pfile->token_buffer + after_ident, line_end); + if (kt->pass_thru + || (kt->type == T_DEFINE + && CPP_OPTIONS (pfile)->dump_macros == dump_definitions)) + { + /* Just leave the entire #define in the output stack. */ + } + else if (kt->type == T_DEFINE + && CPP_OPTIONS (pfile)->dump_macros == dump_names) + { + U_CHAR *p = pfile->token_buffer + old_written + 7; /* Skip "#define". */ + SKIP_WHITE_SPACE (p); + while (is_idchar[*p]) p++; + pfile->limit = p; + CPP_PUTC (pfile, '\n'); + } + else if (kt->type == T_DEFINE) + CPP_SET_WRITTEN (pfile, old_written); + done_a_directive: + return 1; + + not_a_directive: + return 0; + } + + /* Pass a directive through to the output file. + BUF points to the contents of the directive, as a contiguous string. + LIMIT points to the first character past the end of the directive. + KEYWORD is the keyword-table entry for the directive. */ + + static void + pass_thru_directive (buf, limit, pfile, keyword) + U_CHAR *buf, *limit; + cpp_reader *pfile; + struct directive *keyword; + { + register unsigned keyword_length = keyword->length; + + CPP_RESERVE (pfile, 1 + keyword_length + (limit - buf)); + CPP_PUTC_Q (pfile, '#'); + CPP_PUTS_Q (pfile, keyword->name, keyword_length); + if (limit != buf && buf[0] != ' ') + CPP_PUTC_Q (pfile, ' '); + CPP_PUTS_Q (pfile, buf, limit - buf); + #if 0 + CPP_PUTS_Q (pfile, '\n'); + /* Count the line we have just made in the output, + to get in sync properly. */ + pfile->lineno++; + #endif + } + + /* The arglist structure is built by do_define to tell + collect_definition where the argument names begin. That + is, for a define like "#define f(x,y,z) foo+x-bar*y", the arglist + would contain pointers to the strings x, y, and z. + Collect_definition would then build a DEFINITION node, + with reflist nodes pointing to the places x, y, and z had + appeared. So the arglist is just convenience data passed + between these two routines. It is not kept around after + the current #define has been processed and entered into the + hash table. */ + + struct arglist { + struct arglist *next; + U_CHAR *name; + int length; + int argno; + char rest_args; + }; + + /* Read a replacement list for a macro with parameters. + Build the DEFINITION structure. + Reads characters of text starting at BUF until END. + ARGLIST specifies the formal parameters to look for + in the text of the definition; NARGS is the number of args + in that list, or -1 for a macro name that wants no argument list. + MACRONAME is the macro name itself (so we can avoid recursive expansion) + and NAMELEN is its length in characters. + + Note that comments, backslash-newlines, and leading white space + have already been deleted from the argument. */ + + static DEFINITION * + collect_expansion (pfile, buf, limit, nargs, arglist) + cpp_reader *pfile; + U_CHAR *buf, *limit; + int nargs; + struct arglist *arglist; + { + DEFINITION *defn; + register U_CHAR *p, *lastp, *exp_p; + struct reflist *endpat = NULL; + /* Pointer to first nonspace after last ## seen. */ + U_CHAR *concat = 0; + /* Pointer to first nonspace after last single-# seen. */ + U_CHAR *stringify = 0; + int maxsize; + int expected_delimiter = '\0'; + + /* Scan thru the replacement list, ignoring comments and quoted + strings, picking up on the macro calls. It does a linear search + thru the arg list on every potential symbol. Profiling might say + that something smarter should happen. */ + + if (limit < buf) + abort (); + + /* Find the beginning of the trailing whitespace. */ + p = buf; + while (p < limit && is_space[limit[-1]]) limit--; + + /* Allocate space for the text in the macro definition. + Leading and trailing whitespace chars need 2 bytes each. + Each other input char may or may not need 1 byte, + so this is an upper bound. The extra 5 are for invented + leading and trailing newline-marker and final null. */ + maxsize = (sizeof (DEFINITION) + + (limit - p) + 5); + /* Occurrences of '@' get doubled, so allocate extra space for them. */ + while (p < limit) + if (*p++ == '@') + maxsize++; + defn = (DEFINITION *) xcalloc (1, maxsize); + + defn->nargs = nargs; + exp_p = defn->expansion = (U_CHAR *) defn + sizeof (DEFINITION); + lastp = exp_p; + + p = buf; + + /* Add one initial space escape-marker to prevent accidental + token-pasting (often removed by macroexpand). */ + *exp_p++ = '@'; + *exp_p++ = ' '; + + if (limit - p >= 2 && p[0] == '#' && p[1] == '#') { + cpp_error (pfile, "`##' at start of macro definition"); + p += 2; + } + + /* Process the main body of the definition. */ + while (p < limit) { + int skipped_arg = 0; + register U_CHAR c = *p++; + + *exp_p++ = c; + + if (!CPP_TRADITIONAL (pfile)) { + switch (c) { + case '\'': + case '\"': + if (expected_delimiter != '\0') { + if (c == expected_delimiter) + expected_delimiter = '\0'; + } else + expected_delimiter = c; + break; + + case '\\': + if (p < limit && expected_delimiter) { + /* In a string, backslash goes through + and makes next char ordinary. */ + *exp_p++ = *p++; + } + break; + + case '@': + /* An '@' in a string or character constant stands for itself, + and does not need to be escaped. */ + if (!expected_delimiter) + *exp_p++ = c; + break; + + case '#': + /* # is ordinary inside a string. */ + if (expected_delimiter) + break; + if (p < limit && *p == '#') { + /* ##: concatenate preceding and following tokens. */ + /* Take out the first #, discard preceding whitespace. */ + exp_p--; + while (exp_p > lastp && is_hor_space[exp_p[-1]]) + --exp_p; + /* Skip the second #. */ + p++; + /* Discard following whitespace. */ + SKIP_WHITE_SPACE (p); + concat = p; + if (p == limit) + cpp_error (pfile, "`##' at end of macro definition"); + } else if (nargs >= 0) { + /* Single #: stringify following argument ref. + Don't leave the # in the expansion. */ + exp_p--; + SKIP_WHITE_SPACE (p); + if (p == limit || ! is_idstart[*p]) + cpp_error (pfile, + "`#' operator is not followed by a macro argument name"); + else + stringify = p; + } + break; + } + } else { + /* In -traditional mode, recognize arguments inside strings and + and character constants, and ignore special properties of #. + Arguments inside strings are considered "stringified", but no + extra quote marks are supplied. */ + switch (c) { + case '\'': + case '\"': + if (expected_delimiter != '\0') { + if (c == expected_delimiter) + expected_delimiter = '\0'; + } else + expected_delimiter = c; + break; + + case '\\': + /* Backslash quotes delimiters and itself, but not macro args. */ + if (expected_delimiter != 0 && p < limit + && (*p == expected_delimiter || *p == '\\')) { + *exp_p++ = *p++; + continue; + } + break; + + case '/': + if (expected_delimiter != '\0') /* No comments inside strings. */ + break; + if (*p == '*') { + /* If we find a comment that wasn't removed by handle_directive, + this must be -traditional. So replace the comment with + nothing at all. */ + exp_p--; + p += 1; + while (p < limit && !(p[-2] == '*' && p[-1] == '/')) + p++; + #if 0 + /* Mark this as a concatenation-point, as if it had been ##. */ + concat = p; + #endif + } + break; + } + } + + /* Handle the start of a symbol. */ + if (is_idchar[c] && nargs > 0) { + U_CHAR *id_beg = p - 1; + int id_len; + + --exp_p; + while (p != limit && is_idchar[*p]) p++; + id_len = p - id_beg; + + if (is_idstart[c]) { + register struct arglist *arg; + + for (arg = arglist; arg != NULL; arg = arg->next) { + struct reflist *tpat; + + if (arg->name[0] == c + && arg->length == id_len + && strncmp (arg->name, id_beg, id_len) == 0) { + if (expected_delimiter && CPP_OPTIONS (pfile)->warn_stringify) { + if (CPP_TRADITIONAL (pfile)) { + cpp_warning (pfile, "macro argument `%.*s' is stringified.", + id_len, arg->name); + } else { + cpp_warning (pfile, + "macro arg `%.*s' would be stringified with -traditional.", + id_len, arg->name); + } + } + /* If ANSI, don't actually substitute inside a string. */ + if (!CPP_TRADITIONAL (pfile) && expected_delimiter) + break; + /* make a pat node for this arg and append it to the end of + the pat list */ + tpat = (struct reflist *) xmalloc (sizeof (struct reflist)); + tpat->next = NULL; + tpat->raw_before = concat == id_beg; + tpat->raw_after = 0; + tpat->rest_args = arg->rest_args; + tpat->stringify = (CPP_TRADITIONAL (pfile) + ? expected_delimiter != '\0' + : stringify == id_beg); + + if (endpat == NULL) + defn->pattern = tpat; + else + endpat->next = tpat; + endpat = tpat; + + tpat->argno = arg->argno; + tpat->nchars = exp_p - lastp; + { + register U_CHAR *p1 = p; + SKIP_WHITE_SPACE (p1); + if (p1 + 2 <= limit && p1[0] == '#' && p1[1] == '#') + tpat->raw_after = 1; + } + lastp = exp_p; /* place to start copying from next time */ + skipped_arg = 1; + break; + } + } + } + + /* If this was not a macro arg, copy it into the expansion. */ + if (! skipped_arg) { + register U_CHAR *lim1 = p; + p = id_beg; + while (p != lim1) + *exp_p++ = *p++; + if (stringify == id_beg) + cpp_error (pfile, + "`#' operator should be followed by a macro argument name"); + } + } + } + + if (!CPP_TRADITIONAL (pfile) && expected_delimiter == 0) + { + /* If ANSI, put in a "@ " marker to prevent token pasting. + But not if "inside a string" (which in ANSI mode + happens only for -D option). */ + *exp_p++ = '@'; + *exp_p++ = ' '; + } + + *exp_p = '\0'; + + defn->length = exp_p - defn->expansion; + + /* Crash now if we overrun the allocated size. */ + if (defn->length + 1 > maxsize) + abort (); + + #if 0 + /* This isn't worth the time it takes. */ + /* give back excess storage */ + defn->expansion = (U_CHAR *) xrealloc (defn->expansion, defn->length + 1); + #endif + + return defn; + } + + /* + * special extension string that can be added to the last macro argument to + * allow it to absorb the "rest" of the arguments when expanded. Ex: + * #define wow(a, b...) process (b, a, b) + * { wow (1, 2, 3); } -> { process (2, 3, 1, 2, 3); } + * { wow (one, two); } -> { process (two, one, two); } + * if this "rest_arg" is used with the concat token '##' and if it is not + * supplied then the token attached to with ## will not be outputted. Ex: + * #define wow (a, b...) process (b ## , a, ## b) + * { wow (1, 2); } -> { process (2, 1, 2); } + * { wow (one); } -> { process (one); { + */ + static char rest_extension[] = "..."; + #define REST_EXTENSION_LENGTH (sizeof (rest_extension) - 1) + + /* Create a DEFINITION node from a #define directive. Arguments are + as for do_define. */ + static MACRODEF + create_definition (buf, limit, pfile, predefinition) + U_CHAR *buf, *limit; + cpp_reader *pfile; + int predefinition; + { + U_CHAR *bp; /* temp ptr into input buffer */ + U_CHAR *symname; /* remember where symbol name starts */ + int sym_length; /* and how long it is */ + int rest_args = 0; + long line, col; + char *file = CPP_BUFFER (pfile) ? CPP_BUFFER (pfile)->nominal_fname : ""; + DEFINITION *defn; + int arglengths = 0; /* Accumulate lengths of arg names + plus number of args. */ + MACRODEF mdef; + cpp_buf_line_and_col (CPP_BUFFER (pfile), &line, &col); + + bp = buf; + + while (is_hor_space[*bp]) + bp++; + + symname = bp; /* remember where it starts */ + + sym_length = check_macro_name (pfile, bp, "macro"); + bp += sym_length; + + /* Lossage will occur if identifiers or control keywords are broken + across lines using backslash. This is not the right place to take + care of that. */ + + if (*bp == '(') { + struct arglist *arg_ptrs = NULL; + int argno = 0; + + bp++; /* skip '(' */ + SKIP_WHITE_SPACE (bp); + + /* Loop over macro argument names. */ + while (*bp != ')') { + struct arglist *temp; + + temp = (struct arglist *) alloca (sizeof (struct arglist)); + temp->name = bp; + temp->next = arg_ptrs; + temp->argno = argno++; + temp->rest_args = 0; + arg_ptrs = temp; + + if (rest_args) + cpp_pedwarn (pfile, "another parameter follows `%s'", rest_extension); + + if (!is_idstart[*bp]) + cpp_pedwarn (pfile, "invalid character in macro parameter name"); + + /* Find the end of the arg name. */ + while (is_idchar[*bp]) { + bp++; + /* do we have a "special" rest-args extension here? */ + if (limit - bp > REST_EXTENSION_LENGTH && + strncmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) { + rest_args = 1; + temp->rest_args = 1; + break; + } + } + temp->length = bp - temp->name; + if (rest_args == 1) + bp += REST_EXTENSION_LENGTH; + arglengths += temp->length + 2; + SKIP_WHITE_SPACE (bp); + if (temp->length == 0 || (*bp != ',' && *bp != ')')) { + cpp_error (pfile, "badly punctuated parameter list in `#define'"); + goto nope; + } + if (*bp == ',') { + bp++; + SKIP_WHITE_SPACE (bp); + } + if (bp >= limit) { + cpp_error (pfile, "unterminated parameter list in `#define'"); + goto nope; + } + { + struct arglist *otemp; + + for (otemp = temp->next; otemp != NULL; otemp = otemp->next) + if (temp->length == otemp->length && + strncmp (temp->name, otemp->name, temp->length) == 0) { + U_CHAR *name; + + name = (U_CHAR *) alloca (temp->length + 1); + (void) strncpy (name, temp->name, temp->length); + name[temp->length] = '\0'; + cpp_error (pfile, + "duplicate argument name `%s' in `#define'", name); + goto nope; + } + } + } + + ++bp; /* skip paren */ + SKIP_WHITE_SPACE (bp); + /* now everything from bp before limit is the definition. */ + defn = collect_expansion (pfile, bp, limit, argno, arg_ptrs); + defn->rest_args = rest_args; + + /* Now set defn->args.argnames to the result of concatenating + the argument names in reverse order + with comma-space between them. */ + defn->args.argnames = (U_CHAR *) xmalloc (arglengths + 1); + { + struct arglist *temp; + int i = 0; + for (temp = arg_ptrs; temp; temp = temp->next) { + bcopy (temp->name, &defn->args.argnames[i], temp->length); + i += temp->length; + if (temp->next != 0) { + defn->args.argnames[i++] = ','; + defn->args.argnames[i++] = ' '; + } + } + defn->args.argnames[i] = 0; + } + } else { + /* Simple expansion or empty definition. */ + + if (bp < limit) + { + if (is_hor_space[*bp]) { + bp++; + SKIP_WHITE_SPACE (bp); + } else { + switch (*bp) { + case '!': case '"': case '#': case '%': case '&': case '\'': + case ')': case '*': case '+': case ',': case '-': case '.': + case '/': case ':': case ';': case '<': case '=': case '>': + case '?': case '[': case '\\': case ']': case '^': case '{': + case '|': case '}': case '~': + cpp_warning (pfile, "missing white space after `#define %.*s'", + sym_length, symname); + break; + + default: + cpp_pedwarn (pfile, "missing white space after `#define %.*s'", + sym_length, symname); + break; + } + } + } + /* now everything from bp before limit is the definition. */ + defn = collect_expansion (pfile, bp, limit, -1, NULL_PTR); + defn->args.argnames = (U_CHAR *) ""; + } + + defn->line = line; + defn->file = file; + + /* OP is null if this is a predefinition */ + defn->predefined = predefinition; + mdef.defn = defn; + mdef.symnam = symname; + mdef.symlen = sym_length; + + return mdef; + + nope: + mdef.defn = 0; + return mdef; + } + + /* Check a purported macro name SYMNAME, and yield its length. + USAGE is the kind of name this is intended for. */ + + static int + check_macro_name (pfile, symname, usage) + cpp_reader *pfile; + U_CHAR *symname; + char *usage; + { + U_CHAR *p; + int sym_length; + + for (p = symname; is_idchar[*p]; p++) + ; + sym_length = p - symname; + if (sym_length == 0) + cpp_error (pfile, "invalid %s name", usage); + else if (!is_idstart[*symname]) { + U_CHAR *msg; /* what pain... */ + msg = (U_CHAR *) alloca (sym_length + 1); + bcopy (symname, msg, sym_length); + msg[sym_length] = 0; + cpp_error (pfile, "invalid %s name `%s'", usage, msg); + } else { + if (! strncmp (symname, "defined", 7) && sym_length == 7) + cpp_error (pfile, "invalid %s name `defined'", usage); + } + return sym_length; + } + + /* + * return zero if two DEFINITIONs are isomorphic + */ + static int + compare_defs (d1, d2) + DEFINITION *d1, *d2; + { + register struct reflist *a1, *a2; + register U_CHAR *p1 = d1->expansion; + register U_CHAR *p2 = d2->expansion; + int first = 1; + + if (d1->nargs != d2->nargs) + return 1; + if (strcmp ((char *)d1->args.argnames, (char *)d2->args.argnames)) + return 1; + for (a1 = d1->pattern, a2 = d2->pattern; a1 && a2; + a1 = a1->next, a2 = a2->next) { + if (!((a1->nchars == a2->nchars && ! strncmp (p1, p2, a1->nchars)) + || ! comp_def_part (first, p1, a1->nchars, p2, a2->nchars, 0)) + || a1->argno != a2->argno + || a1->stringify != a2->stringify + || a1->raw_before != a2->raw_before + || a1->raw_after != a2->raw_after) + return 1; + first = 0; + p1 += a1->nchars; + p2 += a2->nchars; + } + if (a1 != a2) + return 1; + if (comp_def_part (first, p1, d1->length - (p1 - d1->expansion), + p2, d2->length - (p2 - d2->expansion), 1)) + return 1; + return 0; + } + + /* Return 1 if two parts of two macro definitions are effectively different. + One of the parts starts at BEG1 and has LEN1 chars; + the other has LEN2 chars at BEG2. + Any sequence of whitespace matches any other sequence of whitespace. + FIRST means these parts are the first of a macro definition; + so ignore leading whitespace entirely. + LAST means these parts are the last of a macro definition; + so ignore trailing whitespace entirely. */ + + static int + comp_def_part (first, beg1, len1, beg2, len2, last) + int first; + U_CHAR *beg1, *beg2; + int len1, len2; + int last; + { + register U_CHAR *end1 = beg1 + len1; + register U_CHAR *end2 = beg2 + len2; + if (first) { + while (beg1 != end1 && is_space[*beg1]) beg1++; + while (beg2 != end2 && is_space[*beg2]) beg2++; + } + if (last) { + while (beg1 != end1 && is_space[end1[-1]]) end1--; + while (beg2 != end2 && is_space[end2[-1]]) end2--; + } + while (beg1 != end1 && beg2 != end2) { + if (is_space[*beg1] && is_space[*beg2]) { + while (beg1 != end1 && is_space[*beg1]) beg1++; + while (beg2 != end2 && is_space[*beg2]) beg2++; + } else if (*beg1 == *beg2) { + beg1++; beg2++; + } else break; + } + return (beg1 != end1) || (beg2 != end2); + } + + /* Process a #define command. + BUF points to the contents of the #define command, as a contiguous string. + LIMIT points to the first character past the end of the definition. + KEYWORD is the keyword-table entry for #define, + or NULL for a "predefined" macro. */ + + static int + do_define (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + int hashcode; + MACRODEF mdef; + HASHNODE *hp; + + #if 0 + /* If this is a precompiler run (with -pcp) pass thru #define commands. */ + if (pcp_outfile && keyword) + pass_thru_directive (buf, limit, pfile, keyword); + #endif + + mdef = create_definition (buf, limit, pfile, keyword == NULL); + if (mdef.defn == 0) + goto nope; + + hashcode = hashf (mdef.symnam, mdef.symlen, HASHSIZE); + + if ((hp = cpp_lookup (pfile, mdef.symnam, mdef.symlen, hashcode)) != NULL) + { + int ok = 0; + /* Redefining a precompiled key is ok. */ + if (hp->type == T_PCSTRING) + ok = 1; + /* Redefining a macro is ok if the definitions are the same. */ + else if (hp->type == T_MACRO) + ok = ! compare_defs (mdef.defn, hp->value.defn); + /* Redefining a constant is ok with -D. */ + else if (hp->type == T_CONST) + ok = ! CPP_OPTIONS (pfile)->done_initializing; + /* Print the warning if it's not ok. */ + if (!ok) + { + U_CHAR *msg; /* what pain... */ + + /* If we are passing through #define and #undef directives, do + that for this re-definition now. */ + if (CPP_OPTIONS (pfile)->debug_output && keyword) + pass_thru_directive (buf, limit, pfile, keyword); + + msg = (U_CHAR *) alloca (mdef.symlen + 22); + *msg = '`'; + bcopy (mdef.symnam, msg + 1, mdef.symlen); + strcpy ((char *) (msg + mdef.symlen + 1), "' redefined"); + cpp_pedwarn (pfile, msg); + if (hp->type == T_MACRO) + cpp_pedwarn_with_file_and_line (pfile, hp->value.defn->file, hp->value.defn->line, + "this is the location of the previous definition"); + } + /* Replace the old definition. */ + hp->type = T_MACRO; + hp->value.defn = mdef.defn; + } + else + { + /* If we are passing through #define and #undef directives, do + that for this new definition now. */ + if (CPP_OPTIONS (pfile)->debug_output && keyword) + pass_thru_directive (buf, limit, pfile, keyword); + install (mdef.symnam, mdef.symlen, T_MACRO, 0, + (char *) mdef.defn, hashcode); + } + + return 0; + + nope: + + return 1; + } + + /* This structure represents one parsed argument in a macro call. + `raw' points to the argument text as written (`raw_length' is its length). + `expanded' points to the argument's macro-expansion + (its length is `expand_length'). + `stringified_length' is the length the argument would have + if stringified. + `use_count' is the number of times this macro arg is substituted + into the macro. If the actual use count exceeds 10, + the value stored is 10. */ + + /* raw and expanded are relative to ARG_BASE */ + #define ARG_BASE ((pfile)->token_buffer) + + struct argdata { + /* Strings relative to pfile->token_buffer */ + long raw, expanded, stringified; + int raw_length, expand_length; + int stringified_length; + char newlines; + char use_count; + }; + + + cpp_buffer* + cpp_push_buffer (pfile, buffer, length) + cpp_reader *pfile; + U_CHAR *buffer; + long length; + { + #ifdef STATIC_BUFFERS + register cpp_buffer *buf = CPP_BUFFER (pfile); + if (buf == pfile->buffer_stack) + fatal ("%s: macro or `#include' recursion too deep", buf->fname); + buf--; + bzero ((char *) buf, sizeof (cpp_buffer)); + CPP_BUFFER (pfile) = buf; + #else + register cpp_buffer *buf = (cpp_buffer*) xmalloc (sizeof(cpp_buffer)); + bzero ((char *) buf, sizeof (cpp_buffer)); + CPP_PREV_BUFFER (buf) = CPP_BUFFER (pfile); + CPP_BUFFER (pfile) = buf; + #endif + buf->if_stack = pfile->if_stack; + buf->cleanup = null_cleanup; + buf->underflow = null_underflow; + buf->buf = buf->cur = buffer; + buf->alimit = buf->rlimit = buffer + length; + + return buf; + } + + cpp_buffer* + cpp_pop_buffer (pfile) + cpp_reader *pfile; + { + cpp_buffer *buf = CPP_BUFFER (pfile); + #ifdef STATIC_BUFFERS + (*buf->cleanup) (buf, pfile); + return ++CPP_BUFFER (pfile); + #else + cpp_buffer *next_buf = CPP_PREV_BUFFER (buf); + (*buf->cleanup) (buf, pfile); + CPP_BUFFER (pfile) = next_buf; + free (buf); + return next_buf; + #endif + } + + /* Scan until CPP_BUFFER (PFILE) is exhausted into PFILE->token_buffer. + Pop the buffer when done. */ + + void + cpp_scan_buffer (pfile) + cpp_reader *pfile; + { + cpp_buffer *buffer = CPP_BUFFER (pfile); + for (;;) + { + enum cpp_token token = cpp_get_token (pfile); + if (token == CPP_EOF) /* Should not happen ... */ + break; + if (token == CPP_POP && CPP_BUFFER (pfile) == buffer) + { + cpp_pop_buffer (pfile); + break; + } + } + } + + /* + * Rescan a string (which may have escape marks) into pfile's buffer. + * Place the result in pfile->token_buffer. + * + * The input is copied before it is scanned, so it is safe to pass + * it something from the token_buffer that will get overwritten + * (because it follows CPP_WRITTEN). This is used by do_include. + */ + + static void + cpp_expand_to_buffer (pfile, buf, length) + cpp_reader *pfile; + U_CHAR *buf; + int length; + { + register cpp_buffer *ip; + cpp_buffer obuf; + U_CHAR *limit = buf + length; + U_CHAR *buf1; + #if 0 + int odepth = indepth; + #endif + + if (length < 0) + abort (); + + /* Set up the input on the input stack. */ + + buf1 = (U_CHAR *) alloca (length + 1); + { + register U_CHAR *p1 = buf; + register U_CHAR *p2 = buf1; + + while (p1 != limit) + *p2++ = *p1++; + } + buf1[length] = 0; + + ip = cpp_push_buffer (pfile, buf1, length); + ip->has_escapes = 1; + #if 0 + ip->lineno = obuf.lineno = 1; + #endif + + /* Scan the input, create the output. */ + cpp_scan_buffer (pfile); + + #if 0 + if (indepth != odepth) + abort (); + #endif + + CPP_NUL_TERMINATE (pfile); + } + + + static void + adjust_position (buf, limit, linep, colp) + U_CHAR *buf; + U_CHAR *limit; + long *linep; + long *colp; + { + while (buf < limit) + { + U_CHAR ch = *buf++; + if (ch == '\n') + (*linep)++, (*colp) = 1; + else + (*colp)++; + } + } + + /* Move line_base forward, updating lineno and colno. */ + + static void + update_position (pbuf) + register cpp_buffer *pbuf; + { + unsigned char *old_pos = pbuf->buf + pbuf->line_base; + unsigned char *new_pos = pbuf->cur; + register struct parse_marker *mark; + for (mark = pbuf->marks; mark != NULL; mark = mark->next) + { + if (pbuf->buf + mark->position < new_pos) + new_pos = pbuf->buf + mark->position; + } + pbuf->line_base += new_pos - old_pos; + adjust_position (old_pos, new_pos, &pbuf->lineno, &pbuf->colno); + } + + void + cpp_buf_line_and_col (pbuf, linep, colp) + register cpp_buffer *pbuf; + long *linep, *colp; + { + long dummy; + if (colp == NULL) + colp = &dummy; + if (pbuf) + { + *linep = pbuf->lineno; + *colp = pbuf->colno; + adjust_position (pbuf->buf + pbuf->line_base, pbuf->cur, linep, colp); + } + else + { + *linep = 0; + *colp = 0; + } + } + + /* Return the cpp_buffer that corresponds to a file (not a macro). */ + + cpp_buffer* + cpp_file_buffer (pfile) + cpp_reader *pfile; + { + cpp_buffer *ip = CPP_BUFFER (pfile); + + for ( ; ip != CPP_NULL_BUFFER (pfile); ip = CPP_PREV_BUFFER (ip)) + if (ip->fname != NULL) + return ip; + return NULL; + } + + static long + count_newlines (buf, limit) + register U_CHAR *buf; + register U_CHAR *limit; + { + register long count = 0; + while (buf < limit) + { + U_CHAR ch = *buf++; + if (ch == '\n') + count++; + } + return count; + } + + /* + * write out a #line command, for instance, after an #include file. + * If CONDITIONAL is nonzero, we can omit the #line if it would + * appear to be a no-op, and we can output a few newlines instead + * if we want to increase the line number by a small amount. + * FILE_CHANGE says whether we are entering a file, leaving, or neither. + */ + + static void + output_line_command (pfile, conditional, file_change) + cpp_reader *pfile; + int conditional; + enum file_change_code file_change; + { + int len; + char *line_cmd_buf, *line_end; + long line, col; + cpp_buffer *ip = CPP_BUFFER (pfile); + + if (CPP_OPTIONS (pfile)->no_line_commands + || ip->fname == NULL || CPP_OPTIONS (pfile)->no_output) { + return; + } + + update_position (ip); + line = CPP_BUFFER (pfile)->lineno; + col = CPP_BUFFER (pfile)->colno; + adjust_position (CPP_LINE_BASE (ip), ip->cur, &line, &col); + + if (conditional) { + if (line == pfile->lineno) + return; + + /* If the inherited line number is a little too small, + output some newlines instead of a #line command. */ + if (line > pfile->lineno && line < pfile->lineno + 8) { + CPP_RESERVE (pfile, 20); + while (line > pfile->lineno) { + CPP_PUTC_Q (pfile, '\n'); + pfile->lineno++; + } + return; + } + } + + #if 0 + /* Don't output a line number of 0 if we can help it. */ + if (ip->lineno == 0 && ip->bufp - ip->buf < ip->length + && *ip->bufp == '\n') { + ip->lineno++; + ip->bufp++; + } + #endif + + CPP_RESERVE (pfile, 4 * strlen (ip->nominal_fname) + 50); + { + #ifdef OUTPUT_LINE_COMMANDS + static char sharp_line[] = "#line "; + #else + static char sharp_line[] = "# "; + #endif + CPP_PUTS_Q (pfile, sharp_line, sizeof(sharp_line)-1); + } + + sprintf (CPP_PWRITTEN (pfile), "%d ", line); + CPP_ADJUST_WRITTEN (pfile, strlen (CPP_PWRITTEN (pfile))); + + quote_string (pfile, ip->nominal_fname); + if (file_change != same_file) { + CPP_PUTC_Q (pfile, ' '); + CPP_PUTC_Q (pfile, file_change == enter_file ? '1' : '2'); + } + /* Tell cc1 if following text comes from a system header file. */ + if (ip->system_header_p) { + CPP_PUTC_Q (pfile, ' '); + CPP_PUTC_Q (pfile, '3'); + } + #ifndef NO_IMPLICIT_EXTERN_C + /* Tell cc1plus if following text should be treated as C. */ + if (ip->system_header_p == 2 && CPP_OPTIONS (pfile)->cplusplus) { + CPP_PUTC_Q (pfile, ' '); + CPP_PUTC_Q (pfile, '4'); + } + #endif + CPP_PUTC_Q (pfile, '\n'); + pfile->lineno = line; + } + + /* + * Parse a macro argument and append the info on PFILE's token_buffer. + * REST_ARGS means to absorb the rest of the args. + * Return nonzero to indicate a syntax error. + */ + + static enum cpp_token + macarg (pfile, rest_args) + cpp_reader *pfile; + int rest_args; + { + int paren = 0; + enum cpp_token token; + long arg_start = CPP_WRITTEN (pfile); + char save_put_out_comments = CPP_OPTIONS (pfile)->put_out_comments; + CPP_OPTIONS (pfile)->put_out_comments = 0; + + /* Try to parse as much of the argument as exists at this + input stack level. */ + pfile->no_macro_expand++; + for (;;) + { + token = cpp_get_token (pfile); + switch (token) + { + case CPP_EOF: + goto done; + case CPP_POP: + /* If we've hit end of file, it's an error (reported by caller). + Ditto if it's the end of cpp_expand_to_buffer text. + If we've hit end of macro, just continue. */ + if (! CPP_IS_MACRO_BUFFER (CPP_BUFFER (pfile))) + goto done; + break; + case CPP_LPAREN: + paren++; + break; + case CPP_RPAREN: + if (--paren < 0) + goto found; + break; + case CPP_COMMA: + /* if we've returned to lowest level and + we aren't absorbing all args */ + if (paren == 0 && rest_args == 0) + goto found; + break; + found: + /* Remove ',' or ')' from argument buffer. */ + CPP_ADJUST_WRITTEN (pfile, -1); + goto done; + default: ; + } + } + + done: + CPP_OPTIONS (pfile)->put_out_comments = save_put_out_comments; + pfile->no_macro_expand--; + + return token; + } + + /* Turn newlines to spaces in the string of length LENGTH at START, + except inside of string constants. + The string is copied into itself with its beginning staying fixed. */ + + static int + change_newlines (start, length) + U_CHAR *start; + int length; + { + register U_CHAR *ibp; + register U_CHAR *obp; + register U_CHAR *limit; + register int c; + + ibp = start; + limit = start + length; + obp = start; + + while (ibp < limit) { + *obp++ = c = *ibp++; + switch (c) { + + case '\'': + case '\"': + /* Notice and skip strings, so that we don't delete newlines in them. */ + { + int quotec = c; + while (ibp < limit) { + *obp++ = c = *ibp++; + if (c == quotec) + break; + if (c == '\n' && quotec == '\'') + break; + } + } + break; + } + } + + return obp - start; + } + + + static struct tm * + timestamp (pfile) + cpp_reader *pfile; + { + if (!pfile->timebuf) { + time_t t = time ((time_t *)0); + pfile->timebuf = localtime (&t); + } + return pfile->timebuf; + } + + static char *monthnames[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + }; + + /* + * expand things like __FILE__. Place the expansion into the output + * buffer *without* rescanning. + */ + + static void + special_symbol (hp, pfile) + HASHNODE *hp; + cpp_reader *pfile; + { + char *buf; + int i, len; + int true_indepth; + cpp_buffer *ip = NULL; + struct tm *timebuf; + + int paren = 0; /* For special `defined' keyword */ + + #if 0 + if (pcp_outfile && pcp_inside_if + && hp->type != T_SPEC_DEFINED && hp->type != T_CONST) + cpp_error (pfile, + "Predefined macro `%s' used inside `#if' during precompilation", + hp->name); + #endif + + for (ip = CPP_BUFFER (pfile); ; ip = CPP_PREV_BUFFER (ip)) + { + if (ip == NULL) + { + cpp_error (pfile, "cccp error: not in any file?!"); + return; /* the show must go on */ + } + if (ip->fname != NULL) + break; + } + + switch (hp->type) + { + case T_FILE: + case T_BASE_FILE: + { + char *string; + if (hp->type == T_BASE_FILE) + { + while (CPP_PREV_BUFFER (ip)) + ip = CPP_PREV_BUFFER (ip); + } + string = ip->nominal_fname; + + if (!string) + string = ""; + CPP_RESERVE (pfile, 3 + 4 * strlen (string)); + quote_string (pfile, string); + return; + } + + case T_INCLUDE_LEVEL: + true_indepth = 0; + for (ip = CPP_BUFFER (pfile); ip != NULL; ip = CPP_PREV_BUFFER (ip)) + if (ip->fname != NULL) + true_indepth++; + + buf = (char *) alloca (8); /* Eight bytes ought to be more than enough */ + sprintf (buf, "%d", true_indepth - 1); + break; + + case T_VERSION: + buf = (char *) alloca (3 + strlen (version_string)); + sprintf (buf, "\"%s\"", version_string); + break; + + #ifndef NO_BUILTIN_SIZE_TYPE + case T_SIZE_TYPE: + buf = SIZE_TYPE; + break; + #endif + + #ifndef NO_BUILTIN_PTRDIFF_TYPE + case T_PTRDIFF_TYPE: + buf = PTRDIFF_TYPE; + break; + #endif + + case T_WCHAR_TYPE: + buf = CPP_WCHAR_TYPE (pfile); + break; + + case T_USER_LABEL_PREFIX_TYPE: + buf = USER_LABEL_PREFIX; + break; + + case T_REGISTER_PREFIX_TYPE: + buf = REGISTER_PREFIX; + break; + + case T_CONST: + buf = (char *) alloca (4 * sizeof (int)); + sprintf (buf, "%d", hp->value.ival); + #if 0 + if (pcp_inside_if && pcp_outfile) + /* Output a precondition for this macro use */ + fprintf (pcp_outfile, "#define %s %d\n", hp->name, hp->value.ival); + #endif + break; + + case T_SPECLINE: + { + long line = ip->lineno; + long col = ip->colno; + adjust_position (CPP_LINE_BASE (ip), ip->cur, &line, &col); + + buf = (char *) alloca (10); + sprintf (buf, "%d", line); + } + break; + + case T_DATE: + case T_TIME: + buf = (char *) alloca (20); + timebuf = timestamp (pfile); + if (hp->type == T_DATE) + sprintf (buf, "\"%s %2d %4d\"", monthnames[timebuf->tm_mon], + timebuf->tm_mday, timebuf->tm_year + 1900); + else + sprintf (buf, "\"%02d:%02d:%02d\"", timebuf->tm_hour, timebuf->tm_min, + timebuf->tm_sec); + break; + + case T_SPEC_DEFINED: + buf = " 0 "; /* Assume symbol is not defined */ + ip = CPP_BUFFER (pfile); + SKIP_WHITE_SPACE (ip->cur); + if (*ip->cur == '(') + { + paren++; + ip->cur++; /* Skip over the paren */ + SKIP_WHITE_SPACE (ip->cur); + } + + if (!is_idstart[*ip->cur]) + goto oops; + if (hp = cpp_lookup (pfile, ip->cur, -1, -1)) + { + #if 0 + if (pcp_outfile && pcp_inside_if + && (hp->type == T_CONST + || (hp->type == T_MACRO && hp->value.defn->predefined))) + /* Output a precondition for this macro use. */ + fprintf (pcp_outfile, "#define %s\n", hp->name); + #endif + buf = " 1 "; + } + #if 0 + else + if (pcp_outfile && pcp_inside_if) + { + /* Output a precondition for this macro use */ + U_CHAR *cp = ip->bufp; + fprintf (pcp_outfile, "#undef "); + while (is_idchar[*cp]) /* Ick! */ + fputc (*cp++, pcp_outfile); + putc ('\n', pcp_outfile); + } + #endif + while (is_idchar[*ip->cur]) + ++ip->cur; + SKIP_WHITE_SPACE (ip->cur); + if (paren) + { + if (*ip->cur != ')') + goto oops; + ++ip->cur; + } + break; + + oops: + + cpp_error (pfile, "`defined' without an identifier"); + break; + + default: + cpp_error (pfile, "cccp error: invalid special hash type"); /* time for gdb */ + abort (); + } + len = strlen (buf); + CPP_RESERVE (pfile, len + 1); + CPP_PUTS_Q (pfile, buf, len); + CPP_NUL_TERMINATE_Q (pfile); + + return; + } + + /* Initialize the built-in macros. */ + + static void + initialize_builtins (pfile) + cpp_reader *pfile; + { + install ("__LINE__", -1, T_SPECLINE, 0, 0, -1); + install ("__DATE__", -1, T_DATE, 0, 0, -1); + install ("__FILE__", -1, T_FILE, 0, 0, -1); + install ("__BASE_FILE__", -1, T_BASE_FILE, 0, 0, -1); + install ("__INCLUDE_LEVEL__", -1, T_INCLUDE_LEVEL, 0, 0, -1); + install ("__VERSION__", -1, T_VERSION, 0, 0, -1); + #ifndef NO_BUILTIN_SIZE_TYPE + install ("__SIZE_TYPE__", -1, T_SIZE_TYPE, 0, 0, -1); + #endif + #ifndef NO_BUILTIN_PTRDIFF_TYPE + install ("__PTRDIFF_TYPE__ ", -1, T_PTRDIFF_TYPE, 0, 0, -1); + #endif + install ("__WCHAR_TYPE__", -1, T_WCHAR_TYPE, 0, 0, -1); + install ("__USER_LABEL_PREFIX__", -1, T_USER_LABEL_PREFIX_TYPE, 0, 0, -1); + install ("__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE, 0, 0, -1); + install ("__TIME__", -1, T_TIME, 0, 0, -1); + if (!CPP_TRADITIONAL (pfile)) + install ("__STDC__", -1, T_CONST, STDC_VALUE, 0, -1); + if (CPP_OPTIONS (pfile)->objc) + install ("__OBJC__", -1, T_CONST, 1, 0, -1); + /* This is supplied using a -D by the compiler driver + so that it is present only when truly compiling with GNU C. */ + /* install ("__GNUC__", -1, T_CONST, 2, 0, -1); */ + + if (CPP_OPTIONS (pfile)->debug_output) + { + char directive[2048]; + register struct directive *dp = &directive_table[0]; + struct tm *timebuf = timestamp (pfile); + cpp_buffer *pbuffer = CPP_BUFFER (pfile); + + while (CPP_PREV_BUFFER (pbuffer)) + pbuffer = CPP_PREV_BUFFER (pbuffer); + sprintf (directive, " __BASE_FILE__ \"%s\"\n", + pbuffer->nominal_fname); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + + sprintf (directive, " __VERSION__ \"%s\"\n", version_string); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + + #ifndef NO_BUILTIN_SIZE_TYPE + sprintf (directive, " __SIZE_TYPE__ %s\n", SIZE_TYPE); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + #endif + + #ifndef NO_BUILTIN_PTRDIFF_TYPE + sprintf (directive, " __PTRDIFF_TYPE__ %s\n", PTRDIFF_TYPE); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + #endif + + sprintf (directive, " __WCHAR_TYPE__ %s\n", CPP_WCHAR_TYPE (pfile)); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + + sprintf (directive, " __DATE__ \"%s %2d %4d\"\n", + monthnames[timebuf->tm_mon], + timebuf->tm_mday, timebuf->tm_year + 1900); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + + sprintf (directive, " __TIME__ \"%02d:%02d:%02d\"\n", + timebuf->tm_hour, timebuf->tm_min, timebuf->tm_sec); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], pfile, dp); + + if (!CPP_TRADITIONAL (pfile)) + { + sprintf (directive, " __STDC__ 1"); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], + pfile, dp); + } + if (CPP_OPTIONS (pfile)->objc) + { + sprintf (directive, " __OBJC__ 1"); + output_line_command (pfile, 0, same_file); + pass_thru_directive (directive, &directive[strlen (directive)], + pfile, dp); + } + } + } + + /* Return 1 iff a token ending in C1 followed directly by a token C2 + could cause mis-tokenization. */ + + static int + unsafe_chars (c1, c2) + int c1, c2; + { + switch (c1) + { + case '+': case '-': + if (c2 == c1 || c2 == '=') + return 1; + goto letter; + case '.': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case 'e': case 'E': + if (c2 == '-' || c2 == '+') + return 1; /* could extend a pre-processing number */ + goto letter; + case 'L': + if (c2 == '\'' || c2 == '\"') + return 1; /* Could turn into L"xxx" or L'xxx'. */ + goto letter; + letter: + case '_': + case 'a': case 'b': case 'c': case 'd': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case 'A': case 'B': case 'C': case 'D': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + /* We're in the middle of either a name or a pre-processing number. */ + return (is_idchar[c2] || c2 == '.'); + case '<': case '>': case '!': case '%': case '#': case ':': + case '^': case '&': case '|': case '*': case '/': case '=': + return (c2 == c1 || c2 == '='); + } + return 0; + } + + /* Expand a macro call. + HP points to the symbol that is the macro being called. + Put the result of expansion onto the input stack + so that subsequent input by our caller will use it. + + If macro wants arguments, caller has already verified that + an argument list follows; arguments come from the input stack. */ + + static void + macroexpand (pfile, hp) + cpp_reader *pfile; + HASHNODE *hp; + { + int nargs; + DEFINITION *defn = hp->value.defn; + register U_CHAR *xbuf; + long start_line, start_column; + int xbuf_len; + struct argdata *args; + long old_written = CPP_WRITTEN (pfile); + #if 0 + int start_line = instack[indepth].lineno; + #endif + int rest_args, rest_zero; + register int i; + + #if 0 + CHECK_DEPTH (return;); + #endif + + #if 0 + /* This macro is being used inside a #if, which means it must be */ + /* recorded as a precondition. */ + if (pcp_inside_if && pcp_outfile && defn->predefined) + dump_single_macro (hp, pcp_outfile); + #endif + + pfile->output_escapes++; + cpp_buf_line_and_col (cpp_file_buffer (pfile), &start_line, &start_column); + + nargs = defn->nargs; + + if (nargs >= 0) + { + enum cpp_token token; + + args = (struct argdata *) alloca ((nargs + 1) * sizeof (struct argdata)); + + for (i = 0; i < nargs; i++) + { + args[i].raw = args[i].expanded = 0; + args[i].raw_length = 0; + args[i].expand_length = args[i].stringified_length = -1; + args[i].use_count = 0; + } + + /* Parse all the macro args that are supplied. I counts them. + The first NARGS args are stored in ARGS. + The rest are discarded. If rest_args is set then we assume + macarg absorbed the rest of the args. */ + i = 0; + rest_args = 0; + rest_args = 0; + FORWARD(1); /* Discard the open-parenthesis before the first arg. */ + do + { + if (rest_args) + continue; + if (i < nargs || (nargs == 0 && i == 0)) + { + /* if we are working on last arg which absorbs rest of args... */ + if (i == nargs - 1 && defn->rest_args) + rest_args = 1; + args[i].raw = CPP_WRITTEN (pfile); + token = macarg (pfile, rest_args); + args[i].raw_length = CPP_WRITTEN (pfile) - args[i].raw; + args[i].newlines = 0; /* FIXME */ + } + else + token = macarg (pfile, 0); + if (token == CPP_EOF || token == CPP_POP) + { + cpp_error_with_line (pfile, start_line, start_column, + "unterminated macro call"); + return; + } + i++; + } while (token == CPP_COMMA); + + /* If we got one arg but it was just whitespace, call that 0 args. */ + if (i == 1) + { + register U_CHAR *bp = ARG_BASE + args[0].raw; + register U_CHAR *lim = bp + args[0].raw_length; + /* cpp.texi says for foo ( ) we provide one argument. + However, if foo wants just 0 arguments, treat this as 0. */ + if (nargs == 0) + while (bp != lim && is_space[*bp]) bp++; + if (bp == lim) + i = 0; + } + + /* Don't output an error message if we have already output one for + a parse error above. */ + rest_zero = 0; + if (nargs == 0 && i > 0) + { + cpp_error (pfile, "arguments given to macro `%s'", hp->name); + } + else if (i < nargs) + { + /* traditional C allows foo() if foo wants one argument. */ + if (nargs == 1 && i == 0 && CPP_TRADITIONAL (pfile)) + ; + /* the rest args token is allowed to absorb 0 tokens */ + else if (i == nargs - 1 && defn->rest_args) + rest_zero = 1; + else if (i == 0) + cpp_error (pfile, "macro `%s' used without args", hp->name); + else if (i == 1) + cpp_error (pfile, "macro `%s' used with just one arg", hp->name); + else + cpp_error (pfile, "macro `%s' used with only %d args", + hp->name, i); + } + else if (i > nargs) + { + cpp_error (pfile, + "macro `%s' used with too many (%d) args", hp->name, i); + } + } + + /* If macro wants zero args, we parsed the arglist for checking only. + Read directly from the macro definition. */ + if (nargs <= 0) + { + xbuf = defn->expansion; + xbuf_len = defn->length; + } + else + { + register U_CHAR *exp = defn->expansion; + register int offset; /* offset in expansion, + copied a piece at a time */ + register int totlen; /* total amount of exp buffer filled so far */ + + register struct reflist *ap, *last_ap; + + /* Macro really takes args. Compute the expansion of this call. */ + + /* Compute length in characters of the macro's expansion. + Also count number of times each arg is used. */ + xbuf_len = defn->length; + for (ap = defn->pattern; ap != NULL; ap = ap->next) + { + if (ap->stringify) + { + register struct argdata *arg = &args[ap->argno]; + /* Stringify it it hasn't already been */ + if (arg->stringified_length < 0) + { + int arglen = arg->raw_length; + int escaped = 0; + int in_string = 0; + int c; + /* Initially need_space is -1. Otherwise, 1 means the + previous character was a space, but we suppressed it; + 0 means the previous character was a non-space. */ + int need_space = -1; + i = 0; + arg->stringified = CPP_WRITTEN (pfile); + if (!CPP_TRADITIONAL (pfile)) + CPP_PUTC (pfile, '\"'); /* insert beginning quote */ + for (; i < arglen; i++) + { + c = (ARG_BASE + arg->raw)[i]; + + if (! in_string) + { + /* Internal sequences of whitespace are replaced by + one space except within an string or char token.*/ + if (is_space[c]) + { + if (CPP_WRITTEN (pfile) > arg->stringified + && (CPP_PWRITTEN (pfile))[-1] == '@') + { + /* "@ " escape markers are removed */ + CPP_ADJUST_WRITTEN (pfile, -1); + continue; + } + if (need_space == 0) + need_space = 1; + continue; + } + else if (need_space > 0) + CPP_PUTC (pfile, ' '); + need_space = 0; + } + + if (escaped) + escaped = 0; + else + { + if (c == '\\') + escaped = 1; + if (in_string) + { + if (c == in_string) + in_string = 0; + } + else if (c == '\"' || c == '\'') + in_string = c; + } + + /* Escape these chars */ + if (c == '\"' || (in_string && c == '\\')) + CPP_PUTC (pfile, '\\'); + if (isprint (c)) + CPP_PUTC (pfile, c); + else + { + CPP_RESERVE (pfile, 4); + sprintf (CPP_PWRITTEN (pfile), "\\%03o", + (unsigned int) c); + CPP_ADJUST_WRITTEN (pfile, 4); + } + } + if (!CPP_TRADITIONAL (pfile)) + CPP_PUTC (pfile, '\"'); /* insert ending quote */ + arg->stringified_length + = CPP_WRITTEN (pfile) - arg->stringified; + } + xbuf_len += args[ap->argno].stringified_length; + } + else if (ap->raw_before || ap->raw_after || CPP_TRADITIONAL (pfile)) + /* Add 4 for two newline-space markers to prevent + token concatenation. */ + xbuf_len += args[ap->argno].raw_length + 4; + else + { + /* We have an ordinary (expanded) occurrence of the arg. + So compute its expansion, if we have not already. */ + if (args[ap->argno].expand_length < 0) + { + args[ap->argno].expanded = CPP_WRITTEN (pfile); + cpp_expand_to_buffer (pfile, + ARG_BASE + args[ap->argno].raw, + args[ap->argno].raw_length); + + args[ap->argno].expand_length + = CPP_WRITTEN (pfile) - args[ap->argno].expanded; + } + + /* Add 4 for two newline-space markers to prevent + token concatenation. */ + xbuf_len += args[ap->argno].expand_length + 4; + } + if (args[ap->argno].use_count < 10) + args[ap->argno].use_count++; + } + + xbuf = (U_CHAR *) xmalloc (xbuf_len + 1); + + /* Generate in XBUF the complete expansion + with arguments substituted in. + TOTLEN is the total size generated so far. + OFFSET is the index in the definition + of where we are copying from. */ + offset = totlen = 0; + for (last_ap = NULL, ap = defn->pattern; ap != NULL; + last_ap = ap, ap = ap->next) + { + register struct argdata *arg = &args[ap->argno]; + int count_before = totlen; + + /* Add chars to XBUF. */ + for (i = 0; i < ap->nchars; i++, offset++) + xbuf[totlen++] = exp[offset]; + + /* If followed by an empty rest arg with concatenation, + delete the last run of nonwhite chars. */ + if (rest_zero && totlen > count_before + && ((ap->rest_args && ap->raw_before) + || (last_ap != NULL && last_ap->rest_args + && last_ap->raw_after))) + { + /* Delete final whitespace. */ + while (totlen > count_before && is_space[xbuf[totlen - 1]]) + totlen--; + + /* Delete the nonwhites before them. */ + while (totlen > count_before && ! is_space[xbuf[totlen - 1]]) + totlen--; + } + + if (ap->stringify != 0) + { + bcopy (ARG_BASE + arg->stringified, + xbuf + totlen, arg->stringified_length); + totlen += arg->stringified_length; + } + else if (ap->raw_before || ap->raw_after || CPP_TRADITIONAL (pfile)) + { + U_CHAR *p1 = ARG_BASE + arg->raw; + U_CHAR *l1 = p1 + arg->raw_length; + if (ap->raw_before) + { + while (p1 != l1 && is_space[*p1]) p1++; + while (p1 != l1 && is_idchar[*p1]) + xbuf[totlen++] = *p1++; + } + if (ap->raw_after) + { + /* Arg is concatenated after: delete trailing whitespace, + whitespace markers, and no-reexpansion markers. */ + while (p1 != l1) + { + if (is_space[l1[-1]]) l1--; + else if (l1[-1] == '-') + { + U_CHAR *p2 = l1 - 1; + /* If a `-' is preceded by an odd number of newlines then it + and the last newline are a no-reexpansion marker. */ + while (p2 != p1 && p2[-1] == '\n') p2--; + if ((l1 - 1 - p2) & 1) { + l1 -= 2; + } + else break; + } + else break; + } + } + + bcopy (p1, xbuf + totlen, l1 - p1); + totlen += l1 - p1; + } + else + { + U_CHAR *expanded = ARG_BASE + arg->expanded; + if (!ap->raw_before && totlen > 0 && arg->expand_length + && !CPP_TRADITIONAL(pfile) + && unsafe_chars (xbuf[totlen-1], expanded[0])) + { + xbuf[totlen++] = '@'; + xbuf[totlen++] = ' '; + } + + bcopy (expanded, xbuf + totlen, arg->expand_length); + totlen += arg->expand_length; + + if (!ap->raw_after && totlen > 0 && offset < defn->length + && !CPP_TRADITIONAL(pfile) + && unsafe_chars (xbuf[totlen-1], exp[offset])) + { + xbuf[totlen++] = '@'; + xbuf[totlen++] = ' '; + } + + /* If a macro argument with newlines is used multiple times, + then only expand the newlines once. This avoids creating + output lines which don't correspond to any input line, + which confuses gdb and gcov. */ + if (arg->use_count > 1 && arg->newlines > 0) + { + /* Don't bother doing change_newlines for subsequent + uses of arg. */ + arg->use_count = 1; + arg->expand_length + = change_newlines (expanded, arg->expand_length); + } + } + + if (totlen > xbuf_len) + abort (); + } + + /* if there is anything left of the definition + after handling the arg list, copy that in too. */ + + for (i = offset; i < defn->length; i++) + { + /* if we've reached the end of the macro */ + if (exp[i] == ')') + rest_zero = 0; + if (! (rest_zero && last_ap != NULL && last_ap->rest_args + && last_ap->raw_after)) + xbuf[totlen++] = exp[i]; + } + + xbuf[totlen] = 0; + xbuf_len = totlen; + + } + + pfile->output_escapes--; + + /* Now put the expansion on the input stack + so our caller will commence reading from it. */ + push_macro_expansion (pfile, xbuf, xbuf_len, hp); + CPP_BUFFER (pfile)->has_escapes = 1; + + /* Pop the space we've used in the token_buffer for argument expansion. */ + CPP_SET_WRITTEN (pfile, old_written); + + /* Recursive macro use sometimes works traditionally. + #define foo(x,y) bar (x (y,0), y) + foo (foo, baz) */ + + if (!CPP_TRADITIONAL (pfile)) + hp->type = T_DISABLED; + } + + static void + push_macro_expansion (pfile, xbuf, xbuf_len, hp) + cpp_reader *pfile; + register U_CHAR *xbuf; + int xbuf_len; + HASHNODE *hp; + { + register cpp_buffer *mbuf = cpp_push_buffer (pfile, xbuf, xbuf_len); + mbuf->cleanup = macro_cleanup; + mbuf->data = hp; + + /* The first chars of the expansion should be a "@ " added by + collect_expansion. This is to prevent accidental token-pasting + between the text preceding the macro invocation, and the macro + expansion text. + + We would like to avoid adding unneeded spaces (for the sake of + tools that use cpp, such as imake). In some common cases we can + tell that it is safe to omit the space. + + The character before the macro invocation cannot have been an + idchar (or else it would have been pasted with the idchars of + the macro name). Therefore, if the first non-space character + of the expansion is an idchar, we do not need the extra space + to prevent token pasting. + + Also, we don't need the extra space if the first char is '(', + or some other (less common) characters. */ + + if (xbuf[0] == '@' && xbuf[1] == ' ' + && (is_idchar[xbuf[2]] || xbuf[2] == '(' || xbuf[2] == '\'' + || xbuf[2] == '\"')) + mbuf->cur += 2; + } + + /* Like cpp_get_token, except that it does not read past end-of-line. + Also, horizontal space is skipped, and macros are popped. */ + + static enum cpp_token + get_directive_token (pfile) + cpp_reader *pfile; + { + for (;;) + { + long old_written = CPP_WRITTEN (pfile); + enum cpp_token token; + cpp_skip_hspace (pfile); + if (PEEKC () == '\n') + return CPP_VSPACE; + token = cpp_get_token (pfile); + switch (token) + { + case CPP_POP: + if (! CPP_IS_MACRO_BUFFER (CPP_BUFFER (pfile))) + return token; + /* ... else fall though ... */ + case CPP_HSPACE: case CPP_COMMENT: + CPP_SET_WRITTEN (pfile, old_written); + break; + default: + return token; + } + } + } + + /* Handle #include and #import. + This function expects to see "fname" or on the input. + + The input is normally in part of the output_buffer following + CPP_WRITTEN, and will get overwritten by output_line_command. + I.e. in input file specification has been popped by handle_directive. + This is safe. */ + + static int + do_include (pfile, keyword, unused1, unused2) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *unused1, *unused2; + { + int importing = (keyword->type == T_IMPORT); + int skip_dirs = (keyword->type == T_INCLUDE_NEXT); + char *fname; /* Dynamically allocated fname buffer */ + char *pcftry; + char *pcfname; + U_CHAR *fbeg, *fend; /* Beginning and end of fname */ + enum cpp_token token; + + /* Chain of dirs to search */ + struct file_name_list *search_start = CPP_OPTIONS (pfile)->include; + struct file_name_list dsp[1]; /* First in chain, if #include "..." */ + struct file_name_list *searchptr = 0; + long old_written = CPP_WRITTEN (pfile); + + int flen; + + int f; /* file number */ + + int retried = 0; /* Have already tried macro + expanding the include line*/ + int angle_brackets = 0; /* 0 for "...", 1 for <...> */ + int pcf = -1; + char *pcfbuf; + char *pcfbuflimit; + int pcfnum; + f= -1; /* JF we iz paranoid! */ + + if (importing && CPP_OPTIONS (pfile)->warn_import + && !CPP_OPTIONS (pfile)->inhibit_warnings + && !CPP_BUFFER (pfile)->system_header_p && !pfile->import_warning) + { + pfile->import_warning = 1; + cpp_warning (pfile, "using `#import' is not recommended"); + fprintf (stderr, "The fact that a certain header file need not be processed more than once\n"); + fprintf (stderr, "should be indicated in the header file, not where it is used.\n"); + fprintf (stderr, "The best way to do this is with a conditional of this form:\n\n"); + fprintf (stderr, " #ifndef _FOO_H_INCLUDED\n"); + fprintf (stderr, " #define _FOO_H_INCLUDED\n"); + fprintf (stderr, " ... ...\n"); + fprintf (stderr, " #endif /* Not _FOO_H_INCLUDED */\n\n"); + fprintf (stderr, "Then users can use `#include' any number of times.\n"); + fprintf (stderr, "GNU C automatically avoids processing the file more than once\n"); + fprintf (stderr, "when it is equipped with such a conditional.\n"); + } + + pfile->parsing_include_directive++; + token = get_directive_token (pfile); + pfile->parsing_include_directive--; + + if (token == CPP_STRING) + { + /* FIXME - check no trailing garbage */ + fbeg = pfile->token_buffer + old_written + 1; + fend = CPP_PWRITTEN (pfile) - 1; + if (fbeg[-1] == '<') + { + angle_brackets = 1; + /* If -I-, start with the first -I dir after the -I-. */ + if (CPP_OPTIONS (pfile)->first_bracket_include) + search_start = CPP_OPTIONS (pfile)->first_bracket_include; + } + /* If -I- was specified, don't search current dir, only spec'd ones. */ + else if (! CPP_OPTIONS (pfile)->ignore_srcdir) + { + cpp_buffer *fp; + /* We have "filename". Figure out directory this source + file is coming from and put it on the front of the list. */ + + for (fp = CPP_BUFFER (pfile); fp != NULL; fp = CPP_PREV_BUFFER (fp)) + { + int n; + char *ep,*nam; + + if ((nam = fp->nominal_fname) != NULL) + { + /* Found a named file. Figure out dir of the file, + and put it in front of the search list. */ + dsp[0].next = search_start; + search_start = dsp; + #ifndef VMS + ep = rindex (nam, '/'); + #else /* VMS */ + ep = rindex (nam, ']'); + if (ep == NULL) ep = rindex (nam, '>'); + if (ep == NULL) ep = rindex (nam, ':'); + if (ep != NULL) ep++; + #endif /* VMS */ + if (ep != NULL) + { + n = ep - nam; + dsp[0].fname = (char *) alloca (n + 1); + strncpy (dsp[0].fname, nam, n); + dsp[0].fname[n] = '\0'; + if (n + INCLUDE_LEN_FUDGE > pfile->max_include_len) + pfile->max_include_len = n + INCLUDE_LEN_FUDGE; + } + else + { + dsp[0].fname = 0; /* Current directory */ + } + dsp[0].got_name_map = 0; + break; + } + } + } + } + #ifdef VMS + else if (token == CPP_NAME) + { + /* + * Support '#include xyz' like VAX-C to allow for easy use of all the + * decwindow include files. It defaults to '#include ' (so the + * code from case '<' is repeated here) and generates a warning. + */ + cpp_warning (pfile, + "VAX-C-style include specification found, use '#include ' !"); + angle_brackets = 1; + /* If -I-, start with the first -I dir after the -I-. */ + if (CPP_OPTIONS (pfile)->first_bracket_include) + search_start = CPP_OPTIONS (pfile)->first_bracket_include; + fbeg = pfile->token_buffer + old_written; + fend = CPP_PWRITTEN (pfile); + } + #endif + else + { + cpp_error (pfile, + "`#%s' expects \"FILENAME\" or ", keyword->name); + CPP_SET_WRITTEN (pfile, old_written); + skip_rest_of_line (pfile); + return 0; + } + + *fend = 0; + + token = get_directive_token (pfile); + if (token != CPP_VSPACE) + { + cpp_error (pfile, "junk at end of `#include'"); + while (token != CPP_VSPACE && token != CPP_EOF && token != CPP_POP) + token = get_directive_token (pfile); + } + + /* For #include_next, skip in the search path + past the dir in which the containing file was found. */ + if (skip_dirs) + { + cpp_buffer *fp; + for (fp = CPP_BUFFER (pfile); fp != NULL; fp = CPP_PREV_BUFFER (fp)) + if (fp->fname != NULL) + { + /* fp->dir is null if the containing file was specified with + an absolute file name. In that case, don't skip anything. */ + if (fp->dir == SELF_DIR_DUMMY) + search_start = CPP_OPTIONS (pfile)->include; + else if (fp->dir) + search_start = fp->dir->next; + break; + } + } + + CPP_SET_WRITTEN (pfile, old_written); + + flen = fend - fbeg; + + if (flen == 0) + { + cpp_error (pfile, "empty file name in `#%s'", keyword->name); + return 0; + } + + /* Allocate this permanently, because it gets stored in the definitions + of macros. */ + fname = (char *) xmalloc (pfile->max_include_len + flen + 4); + /* + 2 above for slash and terminating null. */ + /* + 2 added for '.h' on VMS (to support '#include filename') */ + + /* If specified file name is absolute, just open it. */ + + if (*fbeg == '/') { + strncpy (fname, fbeg, flen); + fname[flen] = 0; + if (redundant_include_p (pfile, fname)) + return 0; + if (importing) + f = lookup_import (pfile, fname, NULL_PTR); + else + f = open_include_file (pfile, fname, NULL_PTR); + if (f == -2) + return 0; /* Already included this file */ + } else { + /* Search directory path, trying to open the file. + Copy each filename tried into FNAME. */ + + for (searchptr = search_start; searchptr; searchptr = searchptr->next) { + if (searchptr->fname) { + /* The empty string in a search path is ignored. + This makes it possible to turn off entirely + a standard piece of the list. */ + if (searchptr->fname[0] == 0) + continue; + strcpy (fname, searchptr->fname); + strcat (fname, "/"); + fname[strlen (fname) + flen] = 0; + } else { + fname[0] = 0; + } + strncat (fname, fbeg, flen); + #ifdef VMS + /* Change this 1/2 Unix 1/2 VMS file specification into a + full VMS file specification */ + if (searchptr->fname && (searchptr->fname[0] != 0)) { + /* Fix up the filename */ + hack_vms_include_specification (fname); + } else { + /* This is a normal VMS filespec, so use it unchanged. */ + strncpy (fname, fbeg, flen); + fname[flen] = 0; + /* if it's '#include filename', add the missing .h */ + if (index(fname,'.')==NULL) { + strcat (fname, ".h"); + } + } + #endif /* VMS */ + /* ??? There are currently 3 separate mechanisms for avoiding processing + of redundant include files: #import, #pragma once, and + redundant_include_p. It would be nice if they were unified. */ + if (redundant_include_p (pfile, fname)) + return 0; + if (importing) + f = lookup_import (pfile, fname, searchptr); + else + f = open_include_file (pfile, fname, searchptr); + if (f == -2) + return 0; /* Already included this file */ + #ifdef EACCES + else if (f == -1 && errno == EACCES) + cpp_warning (pfile, "Header file %s exists, but is not readable", + fname); + #endif + if (f >= 0) + break; + } + } + + if (f < 0) + { + /* A file that was not found. */ + strncpy (fname, fbeg, flen); + fname[flen] = 0; + /* If generating dependencies and -MG was specified, we assume missing + files are leaf files, living in the same directory as the source file + or other similar place; these missing files may be generated from + other files and may not exist yet (eg: y.tab.h). */ + + if (CPP_OPTIONS(pfile)->print_deps_missing_files + && CPP_PRINT_DEPS (pfile) + > (angle_brackets || (pfile->system_include_depth > 0))) + { + /* If it was requested as a system header file, + then assume it belongs in the first place to look for such. */ + if (angle_brackets) + { + for (searchptr = search_start; searchptr; + searchptr = searchptr->next) + { + if (searchptr->fname) + { + char *p; + + if (searchptr->fname[0] == 0) + continue; + p = (char *) alloca (strlen (searchptr->fname) + + strlen (fname) + 2); + strcpy (p, searchptr->fname); + strcat (p, "/"); + strcat (p, fname); + deps_output (pfile, p, ' '); + break; + } + } + } + else + { + /* Otherwise, omit the directory, as if the file existed + in the directory with the source. */ + deps_output (pfile, fname, ' '); + } + } + /* If -M was specified, and this header file won't be added to the + dependency list, then don't count this as an error, because we can + still produce correct output. Otherwise, we can't produce correct + output, because there may be dependencies we need inside the missing + file, and we don't know what directory this missing file exists in.*/ + else if (CPP_PRINT_DEPS (pfile) + && (CPP_PRINT_DEPS (pfile) + <= (angle_brackets || (pfile->system_include_depth > 0)))) + cpp_warning (pfile, "No include path in which to find %s", fname); + else if (search_start) + cpp_error_from_errno (pfile, fname); + else + cpp_error (pfile, "No include path in which to find %s", 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 = pfile->dont_repeat_files; ptr; ptr = ptr->next) { + if (!strcmp (ptr->fname, fname)) { + close (f); + return 0; /* This file was once'd. */ + } + } + + for (ptr = pfile->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->control_macro = 0; + ptr->c_system_include_path = 0; + ptr->next = pfile->all_include_files; + pfile->all_include_files = ptr; + ptr->fname = savestring (fname); + ptr->got_name_map = 0; + + /* For -M, add this file to the dependencies. */ + if (CPP_PRINT_DEPS (pfile) + > (angle_brackets || (pfile->system_include_depth > 0))) + deps_output (pfile, fname, ' '); + } + + /* Handle -H option. */ + if (CPP_OPTIONS(pfile)->print_include_names) + { + cpp_buffer *buf = CPP_BUFFER (pfile); + while ((buf = CPP_PREV_BUFFER (buf)) != NULL) + putc ('.', stderr); + fprintf (stderr, "%s\n", fname); + } + + if (angle_brackets) + pfile->system_include_depth++; + + /* Actually process the file. */ + + /* Record file on "seen" list for #import. */ + add_import (pfile, f, fname); + + pcftry = (char *) alloca (strlen (fname) + 30); + pcfbuf = 0; + pcfnum = 0; + + #if 0 + if (!no_precomp) + { + struct stat stat_f; + + fstat (f, &stat_f); + + do { + sprintf (pcftry, "%s%d", fname, pcfnum++); + + pcf = open (pcftry, O_RDONLY, 0666); + if (pcf != -1) + { + struct stat s; + + fstat (pcf, &s); + if (bcmp ((char *) &stat_f.st_ino, (char *) &s.st_ino, + sizeof (s.st_ino)) + || stat_f.st_dev != s.st_dev) + { + pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit); + /* Don't need it any more. */ + close (pcf); + } + else + { + /* Don't need it at all. */ + close (pcf); + break; + } + } + } while (pcf != -1 && !pcfbuf); + } + #endif + + /* Actually process the file */ + cpp_push_buffer (pfile, NULL, 0); + if (finclude (pfile, f, fname, is_system_include (pfile, fname), + searchptr != dsp ? searchptr : SELF_DIR_DUMMY)) + { + output_line_command (pfile, 0, enter_file); + pfile->only_seen_white = 2; + } + + if (angle_brackets) + pfile->system_include_depth--; + } + return 0; + } + + /* Return nonzero if there is no need to include file NAME + because it has already been included and it contains a conditional + to make a repeated include do nothing. */ + + static int + redundant_include_p (pfile, name) + cpp_reader *pfile; + char *name; + { + struct file_name_list *l = pfile->all_include_files; + for (; l; l = l->next) + if (! strcmp (name, l->fname) + && l->control_macro + && cpp_lookup (pfile, l->control_macro, -1, -1)) + return 1; + return 0; + } + + /* Return nonzero if the given FILENAME is an absolute pathname which + designates a file within one of the known "system" include file + directories. We assume here that if the given FILENAME looks like + it is the name of a file which resides either directly in a "system" + include file directory, or within any subdirectory thereof, then the + given file must be a "system" include file. This function tells us + if we should suppress pedantic errors/warnings for the given FILENAME. + + The value is 2 if the file is a C-language system header file + for which C++ should (on most systems) assume `extern "C"'. */ + + static int + is_system_include (pfile, filename) + cpp_reader *pfile; + register char *filename; + { + struct file_name_list *searchptr; + + for (searchptr = CPP_OPTIONS (pfile)->first_system_include; searchptr; + searchptr = searchptr->next) + if (searchptr->fname) { + register char *sys_dir = searchptr->fname; + register unsigned length = strlen (sys_dir); + + if (! strncmp (sys_dir, filename, length) && filename[length] == '/') + { + if (searchptr->c_system_include_path) + return 2; + else + return 1; + } + } + return 0; + } + + + /* + * Install a name in the assertion hash table. + * + * If LEN is >= 0, it is the length of the name. + * Otherwise, compute the length by scanning the entire name. + * + * If HASH is >= 0, it is the precomputed hash code. + * Otherwise, compute the hash code. + */ + static ASSERTION_HASHNODE * + assertion_install (pfile, name, len, hash) + cpp_reader *pfile; + U_CHAR *name; + int len; + int hash; + { + register ASSERTION_HASHNODE *hp; + register int i, bucket; + register U_CHAR *p, *q; + + i = sizeof (ASSERTION_HASHNODE) + len + 1; + hp = (ASSERTION_HASHNODE *) xmalloc (i); + bucket = hash; + hp->bucket_hdr = &pfile->assertion_hashtab[bucket]; + hp->next = pfile->assertion_hashtab[bucket]; + pfile->assertion_hashtab[bucket] = hp; + hp->prev = NULL; + if (hp->next != NULL) + hp->next->prev = hp; + hp->length = len; + hp->value = 0; + hp->name = ((U_CHAR *) hp) + sizeof (ASSERTION_HASHNODE); + p = hp->name; + q = name; + for (i = 0; i < len; i++) + *p++ = *q++; + hp->name[len] = 0; + return hp; + } + /* + * find the most recent hash node for name name (ending with first + * non-identifier char) installed by install + * + * If LEN is >= 0, it is the length of the name. + * Otherwise, compute the length by scanning the entire name. + * + * If HASH is >= 0, it is the precomputed hash code. + * Otherwise, compute the hash code. + */ + + static ASSERTION_HASHNODE * + assertion_lookup (pfile, name, len, hash) + cpp_reader *pfile; + U_CHAR *name; + int len; + int hash; + { + register ASSERTION_HASHNODE *bucket; + + bucket = pfile->assertion_hashtab[hash]; + while (bucket) { + if (bucket->length == len && strncmp (bucket->name, name, len) == 0) + return bucket; + bucket = bucket->next; + } + return NULL; + } + + static void + delete_assertion (hp) + ASSERTION_HASHNODE *hp; + { + struct tokenlist_list *tail; + if (hp->prev != NULL) + hp->prev->next = hp->next; + if (hp->next != NULL) + hp->next->prev = hp->prev; + + for (tail = hp->value; tail; ) + { + struct tokenlist_list *next = tail->next; + free_token_list (tail->tokens); + free (tail); + tail = next; + } + + /* make sure that the bucket chain header that + the deleted guy was on points to the right thing afterwards. */ + if (hp == *hp->bucket_hdr) + *hp->bucket_hdr = hp->next; + + free (hp); + } + + /* Convert a character string literal into a nul-terminated string. + The input string is [IN ... LIMIT). + The result is placed in RESULT. RESULT can be the same as IN. + The value returned in the end of the string written to RESULT, + or NULL on error. */ + + static U_CHAR* + convert_string (pfile, result, in, limit, handle_escapes) + cpp_reader *pfile; + register U_CHAR *result, *in, *limit; + int handle_escapes; + { + U_CHAR c; + c = *in++; + if (c != '\"') + return NULL; + while (in < limit) + { + U_CHAR c = *in++; + switch (c) + { + case '\0': + return NULL; + case '\"': + limit = in; + break; + case '\\': + if (handle_escapes) + { + char *bpc = (char *) in; + int i = (U_CHAR) cpp_parse_escape (pfile, &bpc); + in = (U_CHAR *) bpc; + if (i >= 0) + *result++ = (U_CHAR)c; + break; + } + /* else fall through */ + default: + *result++ = c; + } + } + *result = 0; + return result; + } + + /* + * interpret #line command. Remembers previously seen fnames + * in its very own hash table. + */ + #define FNAME_HASHSIZE 37 + + static int + do_line (pfile, keyword) + cpp_reader *pfile; + struct directive *keyword; + { + cpp_buffer *ip = CPP_BUFFER (pfile); + int new_lineno; + long old_written = CPP_WRITTEN (pfile); + enum file_change_code file_change = same_file; + enum cpp_token token; + int i; + + token = get_directive_token (pfile); + + if (token != CPP_NUMBER + || !isdigit(pfile->token_buffer[old_written])) + { + cpp_error (pfile, "invalid format `#line' command"); + goto bad_line_directive; + } + + /* The Newline at the end of this line remains to be processed. + To put the next line at the specified line number, + we must store a line number now that is one less. */ + new_lineno = atoi (pfile->token_buffer + old_written) - 1; + CPP_SET_WRITTEN (pfile, old_written); + + /* NEW_LINENO is one less than the actual line number here. */ + if (CPP_PEDANTIC (pfile) && new_lineno < 0) + cpp_pedwarn (pfile, "line number out of range in `#line' command"); + + #if 0 /* #line 10"foo.c" is supposed to be allowed. */ + if (PEEKC() && !is_space[PEEKC()]) { + cpp_error (pfile, "invalid format `#line' command"); + goto bad_line_directive; + } + #endif + + token = get_directive_token (pfile); + + if (token == CPP_STRING) { + U_CHAR *fname = pfile->token_buffer + old_written; + U_CHAR *end_name; + static HASHNODE *fname_table[FNAME_HASHSIZE]; + HASHNODE *hp, **hash_bucket; + U_CHAR *p; + long num_start; + int fname_length; + + /* Turn the file name, which is a character string literal, + into a null-terminated string. Do this in place. */ + end_name = convert_string (pfile, fname, fname, CPP_PWRITTEN (pfile), 1); + if (end_name == NULL) + { + cpp_error (pfile, "invalid format `#line' command"); + goto bad_line_directive; + } + + fname_length = end_name - fname; + + num_start = CPP_WRITTEN (pfile); + token = get_directive_token (pfile); + if (token != CPP_VSPACE && token != CPP_EOF && token != CPP_POP) { + p = pfile->token_buffer + num_start; + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "garbage at end of `#line' command"); + + if (token != CPP_NUMBER || *p < '0' || *p > '4' || p[1] != '\0') + { + cpp_error (pfile, "invalid format `#line' command"); + goto bad_line_directive; + } + if (*p == '1') + file_change = enter_file; + else if (*p == 2) + file_change = leave_file; + else if (*p == 3) + ip->system_header_p = 1; + else /* if (*p == 4) */ + ip->system_header_p = 2; + + CPP_SET_WRITTEN (pfile, num_start); + token = get_directive_token (pfile); + p = pfile->token_buffer + num_start; + if (token == CPP_NUMBER && p[1] == '\0' && (*p == '3' || *p== '4')) { + ip->system_header_p = *p == 3 ? 1 : 2; + token = get_directive_token (pfile); + } + if (token != CPP_VSPACE) { + cpp_error (pfile, "invalid format `#line' command"); + goto bad_line_directive; + } + } + + hash_bucket = + &fname_table[hashf (fname, fname_length, FNAME_HASHSIZE)]; + for (hp = *hash_bucket; hp != NULL; hp = hp->next) + if (hp->length == fname_length && + strncmp (hp->value.cpval, fname, fname_length) == 0) { + ip->nominal_fname = hp->value.cpval; + break; + } + if (hp == 0) { + /* Didn't find it; cons up a new one. */ + hp = (HASHNODE *) xcalloc (1, sizeof (HASHNODE) + fname_length + 1); + hp->next = *hash_bucket; + *hash_bucket = hp; + + hp->length = fname_length; + ip->nominal_fname = hp->value.cpval = ((char *) hp) + sizeof (HASHNODE); + bcopy (fname, hp->value.cpval, fname_length); + } + } + else if (token != CPP_VSPACE && token != CPP_EOF) { + cpp_error (pfile, "invalid format `#line' command"); + goto bad_line_directive; + } + + ip->lineno = new_lineno; + bad_line_directive: + skip_rest_of_line (pfile); + CPP_SET_WRITTEN (pfile, old_written); + output_line_command (pfile, 0, file_change); + return 0; + } + + /* + * remove the definition of a symbol from the symbol table. + * according to un*x /lib/cpp, it is not an error to undef + * something that has no definitions, so it isn't one here either. + */ + + static int + do_undef (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + int sym_length; + HASHNODE *hp; + U_CHAR *orig_buf = buf; + + #if 0 + /* If this is a precompiler run (with -pcp) pass thru #undef commands. */ + if (pcp_outfile && keyword) + pass_thru_directive (buf, limit, pfile, keyword); + #endif + + SKIP_WHITE_SPACE (buf); + sym_length = check_macro_name (pfile, buf, "macro"); + + while ((hp = cpp_lookup (pfile, buf, sym_length, -1)) != NULL) + { + /* If we are generating additional info for debugging (with -g) we + need to pass through all effective #undef commands. */ + if (CPP_OPTIONS (pfile)->debug_output && keyword) + pass_thru_directive (orig_buf, limit, pfile, keyword); + if (hp->type != T_MACRO) + cpp_warning (pfile, "undefining `%s'", hp->name); + delete_macro (hp); + } + + if (CPP_PEDANTIC (pfile)) { + buf += sym_length; + SKIP_WHITE_SPACE (buf); + if (buf != limit) + cpp_pedwarn (pfile, "garbage after `#undef' directive"); + } + return 0; + } + + /* + * Report an error detected by the program we are processing. + * Use the text of the line in the error message. + * (We use error because it prints the filename & line#.) + */ + + static int + do_error (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + int length = limit - buf; + U_CHAR *copy = (U_CHAR *) xmalloc (length + 1); + bcopy (buf, copy, length); + copy[length] = 0; + SKIP_WHITE_SPACE (copy); + cpp_error (pfile, "#error %s", copy); + return 0; + } + + /* + * Report a warning detected by the program we are processing. + * Use the text of the line in the warning message, then continue. + * (We use error because it prints the filename & line#.) + */ + + static int + do_warning (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + int length = limit - buf; + U_CHAR *copy = (U_CHAR *) xmalloc (length + 1); + bcopy (buf, copy, length); + copy[length] = 0; + SKIP_WHITE_SPACE (copy); + cpp_warning (pfile, "#warning %s", copy); + return 0; + } + + /* Remember the name of the current file being read from so that we can + avoid ever including it again. */ + + static int + do_once (pfile) + cpp_reader *pfile; + { + cpp_buffer *ip = NULL; + struct file_name_list *new; + + for (ip = CPP_BUFFER (pfile); ; ip = CPP_PREV_BUFFER (ip)) + { + if (ip == NULL) + return 0; + if (ip->fname != NULL) + break; + } + + + new = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); + new->next = pfile->dont_repeat_files; + pfile->dont_repeat_files = new; + new->fname = savestring (ip->fname); + new->control_macro = 0; + new->got_name_map = 0; + new->c_system_include_path = 0; + + return 0; + } + + /* #ident has already been copied to the output file, so just ignore it. */ + + static int + do_ident (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + /* long old_written = CPP_WRITTEN (pfile);*/ + int len; + + /* Allow #ident in system headers, since that's not user's fault. */ + if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) + cpp_pedwarn (pfile, "ANSI C does not allow `#ident'"); + + /* Leave rest of line to be read by later calls to cpp_get_token. */ + + return 0; + } + + /* #pragma and its argument line have already been copied to the output file. + Just check for some recognized pragmas that need validation here. */ + + static int + do_pragma (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + while (*buf == ' ' || *buf == '\t') + buf++; + if (!strncmp (buf, "once", 4)) { + /* Allow #pragma once in system headers, since that's not the user's + fault. */ + if (!CPP_BUFFER (pfile)->system_header_p) + cpp_warning (pfile, "`#pragma once' is obsolete"); + do_once (pfile); + } + + if (!strncmp (buf, "implementation", 14)) { + /* Be quiet about `#pragma implementation' for a file only if it hasn't + been included yet. */ + struct file_name_list *ptr; + U_CHAR *p = buf + 14, *fname, *inc_fname; + int fname_len; + SKIP_WHITE_SPACE (p); + if (*p == '\n' || *p != '\"') + return 0; + + fname = p + 1; + p = (U_CHAR *) index (fname, '\"'); + fname_len = p != NULL ? p - fname : strlen (fname); + + for (ptr = pfile->all_include_files; ptr; ptr = ptr->next) { + inc_fname = (U_CHAR *) rindex (ptr->fname, '/'); + inc_fname = inc_fname ? inc_fname + 1 : (U_CHAR *) ptr->fname; + if (inc_fname && !strncmp (inc_fname, fname, fname_len)) + cpp_warning (pfile, + "`#pragma implementation' for `%s' appears after file is included", + fname); + } + } + + return 0; + } + + #if 0 + /* This was a fun hack, but #pragma seems to start to be useful. + By failing to recognize it, we pass it through unchanged to cc1. */ + + /* + * the behavior of the #pragma directive is implementation defined. + * this implementation defines it as follows. + */ + + static int + do_pragma () + { + close (0); + if (open ("/dev/tty", O_RDONLY, 0666) != 0) + goto nope; + close (1); + if (open ("/dev/tty", O_WRONLY, 0666) != 1) + goto nope; + execl ("/usr/games/hack", "#pragma", 0); + execl ("/usr/games/rogue", "#pragma", 0); + execl ("/usr/new/emacs", "-f", "hanoi", "9", "-kill", 0); + execl ("/usr/local/emacs", "-f", "hanoi", "9", "-kill", 0); + nope: + fatal ("You are in a maze of twisty compiler features, all different"); + } + #endif + + /* Just ignore #sccs, on systems where we define it at all. */ + + static int + do_sccs (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + if (CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "ANSI C does not allow `#sccs'"); + return 0; + } + + /* + * handle #if command by + * 1) inserting special `defined' keyword into the hash table + * that gets turned into 0 or 1 by special_symbol (thus, + * if the luser has a symbol called `defined' already, it won't + * work inside the #if command) + * 2) rescan the input into a temporary output buffer + * 3) pass the output buffer to the yacc parser and collect a value + * 4) clean up the mess left from steps 1 and 2. + * 5) call conditional_skip to skip til the next #endif (etc.), + * or not, depending on the value from step 3. + */ + + static int + do_if (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + HOST_WIDE_INT value = eval_if_expression (pfile, buf, limit - buf); + conditional_skip (pfile, value == 0, T_IF, NULL_PTR); + return 0; + } + + /* + * handle a #elif directive by not changing if_stack either. + * see the comment above do_else. + */ + + static int + do_elif (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + if (pfile->if_stack == CPP_BUFFER (pfile)->if_stack) { + cpp_error (pfile, "`#elif' not within a conditional"); + return 0; + } else { + if (pfile->if_stack->type != T_IF && pfile->if_stack->type != T_ELIF) { + cpp_error (pfile, "`#elif' after `#else'"); + #if 0 + fprintf (stderr, " (matches line %d", pfile->if_stack->lineno); + #endif + if (pfile->if_stack->fname != NULL && CPP_BUFFER (pfile)->fname != NULL + && strcmp (pfile->if_stack->fname, + CPP_BUFFER (pfile)->nominal_fname) != 0) + fprintf (stderr, ", file %s", pfile->if_stack->fname); + fprintf (stderr, ")\n"); + } + pfile->if_stack->type = T_ELIF; + } + + if (pfile->if_stack->if_succeeded) + skip_if_group (pfile, 0); + else { + HOST_WIDE_INT value = eval_if_expression (pfile, buf, limit - buf); + if (value == 0) + skip_if_group (pfile, 0); + else { + ++pfile->if_stack->if_succeeded; /* continue processing input */ + output_line_command (pfile, 1, same_file); + } + } + return 0; + } + + /* + * evaluate a #if expression in BUF, of length LENGTH, + * then parse the result as a C expression and return the value as an int. + */ + static HOST_WIDE_INT + eval_if_expression (pfile, buf, length) + cpp_reader *pfile; + U_CHAR *buf; + int length; + { + HASHNODE *save_defined; + HOST_WIDE_INT value; + long old_written = CPP_WRITTEN (pfile); + + save_defined = install ("defined", -1, T_SPEC_DEFINED, 0, 0, -1); + pfile->pcp_inside_if = 1; + + value = cpp_parse_expr (pfile); + pfile->pcp_inside_if = 0; + delete_macro (save_defined); /* clean up special symbol */ + + CPP_SET_WRITTEN (pfile, old_written); /* Pop */ + + return value; + } + + /* + * routine to handle ifdef/ifndef. Try to look up the symbol, + * then do or don't skip to the #endif/#else/#elif depending + * on what directive is actually being processed. + */ + + static int + do_xifdef (pfile, keyword, unused1, unused2) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *unused1, *unused2; + { + int skip; + cpp_buffer *ip = CPP_BUFFER (pfile); + U_CHAR* ident; + int ident_length; + enum cpp_token token; + int start_of_file = 0; + U_CHAR *control_macro = 0; + int old_written = CPP_WRITTEN (pfile); + + /* Detect a #ifndef at start of file (not counting comments). */ + if (ip->fname != 0 && keyword->type == T_IFNDEF) + start_of_file = pfile->only_seen_white == 2; + + pfile->no_macro_expand++; + token = get_directive_token (pfile); + pfile->no_macro_expand--; + + ident = pfile->token_buffer + old_written; + ident_length = CPP_WRITTEN (pfile) - old_written; + CPP_SET_WRITTEN (pfile, old_written); /* Pop */ + + if (token == CPP_VSPACE || token == CPP_POP || token == CPP_EOF) + { + skip = (keyword->type == T_IFDEF); + if (! CPP_TRADITIONAL (pfile)) + cpp_pedwarn (pfile, "`#%s' with no argument", keyword->name); + } + else if (token == CPP_NAME) + { + HASHNODE *hp = cpp_lookup (pfile, ident, ident_length, -1); + skip = (hp == NULL) ^ (keyword->type == T_IFNDEF); + if (start_of_file && !skip) + { + control_macro = (U_CHAR *) xmalloc (ident_length + 1); + bcopy (ident, control_macro, ident_length + 1); + } + } + else + { + skip = (keyword->type == T_IFDEF); + if (! CPP_TRADITIONAL (pfile)) + cpp_error (pfile, "`#%s' with invalid argument", keyword->name); + } + + if (!CPP_TRADITIONAL (pfile)) + { int c; + cpp_skip_hspace (pfile); + c = PEEKC (); + if (c != EOF && c != '\n') + cpp_pedwarn (pfile, "garbage at end of `#%s' argument", keyword->name); + } + skip_rest_of_line (pfile); + + #if 0 + if (pcp_outfile) { + /* Output a precondition for this macro. */ + if (hp && hp->value.defn->predefined) + fprintf (pcp_outfile, "#define %s\n", hp->name); + else { + U_CHAR *cp = buf; + fprintf (pcp_outfile, "#undef "); + while (is_idchar[*cp]) /* Ick! */ + fputc (*cp++, pcp_outfile); + putc ('\n', pcp_outfile); + } + #endif + + conditional_skip (pfile, skip, T_IF, control_macro); + return 0; + } + + /* Push TYPE on stack; then, if SKIP is nonzero, skip ahead. + If this is a #ifndef starting at the beginning of a file, + CONTROL_MACRO is the macro name tested by the #ifndef. + Otherwise, CONTROL_MACRO is 0. */ + + static void + conditional_skip (pfile, skip, type, control_macro) + cpp_reader *pfile; + int skip; + enum node_type type; + U_CHAR *control_macro; + { + IF_STACK_FRAME *temp; + + temp = (IF_STACK_FRAME *) xcalloc (1, sizeof (IF_STACK_FRAME)); + temp->fname = CPP_BUFFER (pfile)->nominal_fname; + #if 0 + temp->lineno = CPP_BUFFER (pfile)->lineno; + #endif + temp->next = pfile->if_stack; + temp->control_macro = control_macro; + pfile->if_stack = temp; + + pfile->if_stack->type = type; + + if (skip != 0) { + skip_if_group (pfile, 0); + return; + } else { + ++pfile->if_stack->if_succeeded; + output_line_command (pfile, 1, same_file); + } + } + + /* + * skip to #endif, #else, or #elif. adjust line numbers, etc. + * leaves input ptr at the sharp sign found. + * If ANY is nonzero, return at next directive of any sort. + */ + static void + skip_if_group (pfile, any) + cpp_reader *pfile; + int any; + { + int c; + int at_beg_of_line = 1; + struct directive *kt; + IF_STACK_FRAME *save_if_stack = pfile->if_stack; /* don't pop past here */ + #if 0 + U_CHAR *beg_of_line = bp; + #endif + register int ident_length; + U_CHAR *ident, *after_ident; + struct parse_marker line_start_mark; + + parse_set_mark (&line_start_mark, pfile); + + if (CPP_OPTIONS (pfile)->output_conditionals) { + static char failed[] = "#failed\n"; + CPP_PUTS (pfile, failed, sizeof(failed)-1); + pfile->lineno++; + output_line_command (pfile, 1, same_file); + } + + beg_of_line: + if (CPP_OPTIONS (pfile)->output_conditionals) + { + cpp_buffer *pbuf = CPP_BUFFER (pfile); + U_CHAR *start_line = pbuf->buf + line_start_mark.position; + CPP_PUTS (pfile, start_line, pbuf->cur - start_line); + } + parse_move_mark (&line_start_mark, pfile); + if (!CPP_TRADITIONAL (pfile)) + cpp_skip_hspace (pfile); + c = GETC(); + if (c == '#') + { + int old_written = CPP_WRITTEN (pfile); + cpp_skip_hspace (pfile); + + parse_name (pfile, GETC()); + ident_length = CPP_WRITTEN (pfile) - old_written; + ident = pfile->token_buffer + old_written; + pfile->limit = ident; + #if 0 + if (ident_length == 0) + goto not_a_directive; + + /* Handle # followed by a line number. */ + + /* Avoid error for `###' and similar cases unless -pedantic. */ + #endif + + for (kt = directive_table; kt->length >= 0; kt++) + { + IF_STACK_FRAME *temp; + if (ident_length == kt->length + && strncmp (ident, kt->name, kt->length) == 0) + { + /* If we are asked to return on next directive, do so now. */ + if (any) + goto done; + + switch (kt->type) + { + case T_IF: + case T_IFDEF: + case T_IFNDEF: + temp + = (IF_STACK_FRAME *) xcalloc (1, sizeof (IF_STACK_FRAME)); + temp->next = pfile->if_stack; + pfile->if_stack = temp; + #if 0 + temp->lineno = CPP_BUFFER(pfile)->lineno; + #endif + temp->fname = CPP_BUFFER(pfile)->nominal_fname; + temp->type = kt->type; + break; + case T_ELSE: + case T_ENDIF: + if (CPP_PEDANTIC (pfile) && pfile->if_stack != save_if_stack) + validate_else (pfile, + kt->type == T_ELSE ? "#else" : "#endif"); + case T_ELIF: + if (pfile->if_stack == CPP_BUFFER (pfile)->if_stack) + { + cpp_error (pfile, + "`#%s' not within a conditional", kt->name); + break; + } + else if (pfile->if_stack == save_if_stack) + goto done; /* found what we came for */ + + if (kt->type != T_ENDIF) + { + if (pfile->if_stack->type == T_ELSE) + cpp_error (pfile, "`#else' or `#elif' after `#else'"); + pfile->if_stack->type = kt->type; + break; + } + + temp = pfile->if_stack; + pfile->if_stack = temp->next; + free (temp); + break; + default: ; + } + break; + } + /* Don't let erroneous code go by. */ + if (kt->length < 0 && !CPP_OPTIONS (pfile)->lang_asm + && CPP_PEDANTIC (pfile)) + cpp_pedwarn (pfile, "invalid preprocessor directive name"); + } + c = GETC (); + } + /* We're in the middle of a line. Skip the rest of it. */ + for (;;) { + switch (c) + { + long old; + case EOF: + goto done; + case '/': /* possible comment */ + c = skip_comment (pfile, NULL); + if (c == EOF) + goto done; + break; + case '\"': + case '\'': + FORWARD(-1); + old = CPP_WRITTEN (pfile); + cpp_get_token (pfile); + CPP_SET_WRITTEN (pfile, old); + break; + case '\\': + /* Char after backslash loses its special meaning. */ + if (PEEKC() == '\n') + FORWARD (1); + break; + case '\n': + goto beg_of_line; + break; + } + c = GETC (); + } + done: + if (CPP_OPTIONS (pfile)->output_conditionals) { + static char end_failed[] = "#endfailed\n"; + CPP_PUTS (pfile, end_failed, sizeof(end_failed)-1); + pfile->lineno++; + } + pfile->only_seen_white = 1; + parse_goto_mark (&line_start_mark, pfile); + parse_clear_mark (&line_start_mark); + } + + /* + * handle a #else directive. Do this by just continuing processing + * without changing if_stack ; this is so that the error message + * for missing #endif's etc. will point to the original #if. It + * is possible that something different would be better. + */ + + static int + do_else (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + cpp_buffer *ip = CPP_BUFFER (pfile); + + if (CPP_PEDANTIC (pfile)) + validate_else (pfile, "#else"); + skip_rest_of_line (pfile); + + if (pfile->if_stack == CPP_BUFFER (pfile)->if_stack) { + cpp_error (pfile, "`#else' not within a conditional"); + return 0; + } else { + /* #ifndef can't have its special treatment for containing the whole file + if it has a #else clause. */ + pfile->if_stack->control_macro = 0; + + if (pfile->if_stack->type != T_IF && pfile->if_stack->type != T_ELIF) { + cpp_error (pfile, "`#else' after `#else'"); + fprintf (stderr, " (matches line %d", pfile->if_stack->lineno); + if (strcmp (pfile->if_stack->fname, ip->nominal_fname) != 0) + fprintf (stderr, ", file %s", pfile->if_stack->fname); + fprintf (stderr, ")\n"); + } + pfile->if_stack->type = T_ELSE; + } + + if (pfile->if_stack->if_succeeded) + skip_if_group (pfile, 0); + else { + ++pfile->if_stack->if_succeeded; /* continue processing input */ + output_line_command (pfile, 1, same_file); + } + return 0; + } + + /* + * unstack after #endif command + */ + + static int + do_endif (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + if (CPP_PEDANTIC (pfile)) + validate_else (pfile, "#endif"); + skip_rest_of_line (pfile); + + if (pfile->if_stack == CPP_BUFFER (pfile)->if_stack) + cpp_error (pfile, "unbalanced `#endif'"); + else + { + IF_STACK_FRAME *temp = pfile->if_stack; + pfile->if_stack = temp->next; + if (temp->control_macro != 0) + { + /* This #endif matched a #ifndef at the start of the file. + See if it is at the end of the file. */ + struct parse_marker start_mark; + int c; + + parse_set_mark (&start_mark, pfile); + + for (;;) + { + cpp_skip_hspace (pfile); + c = GETC (); + if (c != '\n') + break; + } + parse_goto_mark (&start_mark, pfile); + parse_clear_mark (&start_mark); + + if (c == EOF) + { + /* If we get here, this #endif ends a #ifndef + that contains all of the file (aside from whitespace). + Arrange not to include the file again + if the macro that was tested is defined. + + Do not do this for the top-level file in a -include or any + file in a -imacros. */ + #if 0 + FIXME! + if (indepth != 0 + && ! (indepth == 1 && pfile->no_record_file) + && ! (pfile->no_record_file && no_output)) + #endif + { + struct file_name_list *ifile = pfile->all_include_files; + + for ( ; ifile != NULL; ifile = ifile->next) + { + if (!strcmp (ifile->fname, CPP_BUFFER (pfile)->fname)) + { + ifile->control_macro = temp->control_macro; + break; + } + } + } + } + } + free (temp); + output_line_command (pfile, 1, same_file); + } + return 0; + } + + /* When an #else or #endif is found while skipping failed conditional, + if -pedantic was specified, this is called to warn about text after + the command name. P points to the first char after the command name. */ + + static void + validate_else (pfile, directive) + cpp_reader *pfile; + char *directive; + { + int c; + cpp_skip_hspace (pfile); + c = PEEKC (); + if (c != EOF && c != '\n') + cpp_pedwarn (pfile, + "text following `%s' violates ANSI standard", directive); + } + + /* Get the next token, and add it to the text in pfile->token_buffer. + Return the kind of token we got. */ + + + enum cpp_token + cpp_get_token (pfile) + cpp_reader *pfile; + { + register int c, c2, c3; + long old_written; + long start_line, start_column; + enum cpp_token token; + struct cpp_options *opts = CPP_OPTIONS (pfile); + CPP_BUFFER (pfile)->prev = CPP_BUFFER (pfile)->cur; + get_next: + c = GETC(); + if (c == EOF) + { + handle_eof: + if (CPP_BUFFER (pfile)->seen_eof) + { + if (cpp_pop_buffer (pfile) != CPP_NULL_BUFFER (pfile)) + goto get_next; + else + return CPP_EOF; + } + else + { + cpp_buffer *next_buf + = CPP_PREV_BUFFER (CPP_BUFFER (pfile)); + CPP_BUFFER (pfile)->seen_eof = 1; + if (CPP_BUFFER (pfile)->nominal_fname && next_buf != 0) + { + /* We're about to return from an #include file. + Emit #line information now (as part of the CPP_POP) result. + But the #line refers to the file we will pop to. */ + cpp_buffer *cur_buffer = CPP_BUFFER (pfile); + CPP_BUFFER (pfile) = next_buf; + pfile->input_stack_listing_current = 0; + output_line_command (pfile, 0, leave_file); + CPP_BUFFER (pfile) = cur_buffer; + } + return CPP_POP; + } + } + else + { + switch (c) + { + long newlines; + struct parse_marker start_mark; + case '/': + if (PEEKC () == '=') + goto op2; + if (opts->put_out_comments) + parse_set_mark (&start_mark, pfile); + newlines = 0; + cpp_buf_line_and_col (cpp_file_buffer (pfile), + &start_line, &start_column); + c = skip_comment (pfile, &newlines); + if (opts->put_out_comments && (c == '/' || c == EOF)) + parse_clear_mark (&start_mark); + if (c == '/') + goto randomchar; + if (c == EOF) + { + cpp_error_with_line (pfile, start_line, start_column, + "unterminated comment"); + goto handle_eof; + } + c = '/'; /* Initial letter of comment. */ + return_comment: + /* Comments are equivalent to spaces. + For -traditional, a comment is equivalent to nothing. */ + if (opts->put_out_comments) + { + cpp_buffer *pbuf = CPP_BUFFER (pfile); + long dummy; + U_CHAR *start = pbuf->buf + start_mark.position; + int len = pbuf->cur - start; + CPP_RESERVE(pfile, 1 + len); + CPP_PUTC_Q (pfile, c); + CPP_PUTS_Q (pfile, start, len); + pfile->lineno += newlines; + parse_clear_mark (&start_mark); + return CPP_COMMENT; + } + else if (CPP_TRADITIONAL (pfile)) + { + return CPP_COMMENT; + } + else + { + #if 0 + /* This may not work if cpp_get_token is called recursively, + since many places look for horizontal space. */ + if (newlines) + { + /* Copy the newlines into the output buffer, in order to + avoid the pain of a #line every time a multiline comment + is seen. */ + CPP_RESERVE(pfile, newlines); + while (--newlines >= 0) + { + CPP_PUTC_Q (pfile, '\n'); + pfile->lineno++; + } + return CPP_VSPACE; + } + #endif + CPP_RESERVE(pfile, 1); + CPP_PUTC_Q (pfile, ' '); + return CPP_HSPACE; + } + #if 0 + if (opts->for_lint) { + U_CHAR *argbp; + int cmdlen, arglen; + char *lintcmd = get_lintcmd (ibp, limit, &argbp, &arglen, &cmdlen); + + if (lintcmd != NULL) { + /* I believe it is always safe to emit this newline: */ + obp[-1] = '\n'; + bcopy ("#pragma lint ", (char *) obp, 13); + obp += 13; + bcopy (lintcmd, (char *) obp, cmdlen); + obp += cmdlen; + + if (arglen != 0) { + *(obp++) = ' '; + bcopy (argbp, (char *) obp, arglen); + obp += arglen; + } + + /* OK, now bring us back to the state we were in before we entered + this branch. We need #line b/c the newline for the pragma + could fuck things up. */ + output_line_command (pfile, 0, same_file); + *(obp++) = ' '; /* just in case, if comments are copied thru */ + *(obp++) = '/'; + } + } + #endif + + case '#': + #if 0 + /* If this is expanding a macro definition, don't recognize + preprocessor directives. */ + if (ip->macro != 0) + goto randomchar; + /* If this is expand_into_temp_buffer, recognize them + only after an actual newline at this level, + not at the beginning of the input level. */ + if (ip->fname == 0 && beg_of_line == ip->buf) + goto randomchar; + if (ident_length) + goto specialchar; + #endif + + if (!pfile->only_seen_white) + goto randomchar; + if (handle_directive (pfile)) + return CPP_DIRECTIVE; + pfile->only_seen_white = 0; + return CPP_OTHER; + + case '\"': + case '\'': + /* A single quoted string is treated like a double -- some + programs (e.g., troff) are perverse this way */ + cpp_buf_line_and_col (cpp_file_buffer (pfile), + &start_line, &start_column); + old_written = CPP_WRITTEN (pfile); + string: + CPP_PUTC (pfile, c); + while (1) + { + int cc = GETC(); + if (cc == EOF) + { + if (CPP_IS_MACRO_BUFFER (CPP_BUFFER (pfile))) + { + /* try harder: this string crosses a macro expansion + boundary. This can happen naturally if -traditional. + Otherwise, only -D can make a macro with an unmatched + quote. */ + cpp_buffer *next_buf + = CPP_PREV_BUFFER (CPP_BUFFER (pfile)); + (*CPP_BUFFER (pfile)->cleanup) + (CPP_BUFFER (pfile), pfile); + CPP_BUFFER (pfile) = next_buf; + continue; + } + if (!CPP_TRADITIONAL (pfile)) + { + cpp_error_with_line (pfile, start_line, start_column, + "unterminated string or character constant"); + if (pfile->multiline_string_line != start_line + && pfile->multiline_string_line != 0) + cpp_error_with_line (pfile, + pfile->multiline_string_line, -1, + "possible real start of unterminated constant"); + pfile->multiline_string_line = 0; + } + break; + } + CPP_PUTC (pfile, cc); + switch (cc) + { + case '\n': + /* Traditionally, end of line ends a string constant with + no error. So exit the loop and record the new line. */ + if (CPP_TRADITIONAL (pfile)) + goto while2end; + if (c == '\'') + { + cpp_error_with_line (pfile, start_line, start_column, + "unterminated character constant"); + goto while2end; + } + if (CPP_PEDANTIC (pfile) + && pfile->multiline_string_line == 0) + { + cpp_pedwarn_with_line (pfile, start_line, start_column, + "string constant runs past end of line"); + } + if (pfile->multiline_string_line == 0) + pfile->multiline_string_line = start_line; + break; + + case '\\': + cc = GETC(); + if (cc == '\n') + { + /* Backslash newline is replaced by nothing at all. */ + CPP_ADJUST_WRITTEN (pfile, -1); + pfile->lineno++; + } + else + { + /* ANSI stupidly requires that in \\ the second \ + is *not* prevented from combining with a newline. */ + NEWLINE_FIX1(cc); + if (cc != EOF) + CPP_PUTC (pfile, cc); + } + break; + + case '\"': + case '\'': + if (cc == c) + goto while2end; + break; + } + } + while2end: + pfile->lineno += count_newlines (pfile->token_buffer + old_written, + CPP_PWRITTEN (pfile)); + pfile->only_seen_white = 0; + return c == '\'' ? CPP_CHAR : CPP_STRING; + + case '$': + if (!opts->dollars_in_ident) + goto randomchar; + goto letter; + + case ':': + if (opts->cplusplus && PEEKC () == ':') + goto op2; + goto randomchar; + + case '&': + case '+': + case '|': + NEWLINE_FIX; + c2 = PEEKC (); + if (c2 == c || c2 == '=') + goto op2; + goto randomchar; + + case '*': + case '!': + case '%': + case '=': + case '^': + NEWLINE_FIX; + if (PEEKC () == '=') + goto op2; + goto randomchar; + + case '-': + NEWLINE_FIX; + c2 = PEEKC (); + if (c2 == '-' && opts->chill) + { + /* Chill style comment */ + if (opts->put_out_comments) + parse_set_mark (&start_mark, pfile); + FORWARD(1); /* Skip second '-'. */ + for (;;) + { + c = GETC (); + if (c == EOF) + break; + if (c == '\n') + { + /* Don't consider final '\n' to be part of comment. */ + FORWARD(-1); + break; + } + } + c = '-'; + goto return_comment; + } + if (c2 == '-' || c2 == '=' || c2 == '>') + goto op2; + goto randomchar; + + case '<': + if (pfile->parsing_include_directive) + { + for (;;) + { + CPP_PUTC (pfile, c); + if (c == '>') + break; + c = GETC (); + NEWLINE_FIX1 (c); + if (c == '\n' || c == EOF) + { + cpp_error (pfile, + "missing '>' in `#include '"); + break; + } + } + return CPP_STRING; + } + /* else fall through */ + case '>': + NEWLINE_FIX; + c2 = PEEKC (); + if (c2 == '=') + goto op2; + if (c2 != c) + goto randomchar; + FORWARD(1); + CPP_RESERVE (pfile, 4); + CPP_PUTC (pfile, c); + CPP_PUTC (pfile, c2); + NEWLINE_FIX; + c3 = PEEKC (); + if (c3 == '=') + CPP_PUTC_Q (pfile, GETC ()); + CPP_NUL_TERMINATE_Q (pfile); + pfile->only_seen_white = 0; + return CPP_OTHER; + + case '@': + if (CPP_BUFFER (pfile)->has_escapes) + { + c = GETC (); + if (c == '-') + { + if (pfile->output_escapes) + CPP_PUTS (pfile, "@-", 2); + parse_name (pfile, GETC ()); + return CPP_NAME; + } + else if (is_space [c]) + { + CPP_RESERVE (pfile, 2); + if (pfile->output_escapes) + CPP_PUTC_Q (pfile, '@'); + CPP_PUTC_Q (pfile, c); + return CPP_HSPACE; + } + } + if (pfile->output_escapes) + { + CPP_PUTS (pfile, "@@", 2); + return CPP_OTHER; + } + goto randomchar; + + case '.': + NEWLINE_FIX; + c2 = PEEKC (); + if (isdigit(c2)) + { + CPP_RESERVE(pfile, 2); + CPP_PUTC_Q (pfile, '.'); + c = GETC (); + goto number; + } + /* FIXME - misses the case "..\\\n." */ + if (c2 == '.' && PEEKN(1) == '.') + { + CPP_RESERVE(pfile, 4); + CPP_PUTC_Q (pfile, '.'); + CPP_PUTC_Q (pfile, '.'); + CPP_PUTC_Q (pfile, '.'); + FORWARD (2); + CPP_NUL_TERMINATE_Q (pfile); + pfile->only_seen_white = 0; + return CPP_3DOTS; + } + goto randomchar; + + op2: + token = CPP_OTHER; + pfile->only_seen_white = 0; + op2any: + CPP_RESERVE(pfile, 3); + CPP_PUTC_Q (pfile, c); + CPP_PUTC_Q (pfile, GETC ()); + CPP_NUL_TERMINATE_Q (pfile); + return token; + + case 'L': + NEWLINE_FIX; + c2 = PEEKC (); + if ((c2 == '\'' || c2 == '\"') && !CPP_TRADITIONAL (pfile)) + { + CPP_PUTC (pfile, c); + c = GETC (); + goto string; + } + goto letter; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + number: + c2 = '.'; + for (;;) + { + CPP_RESERVE (pfile, 2); + CPP_PUTC_Q (pfile, c); + NEWLINE_FIX; + c = PEEKC (); + if (c == EOF) + break; + if (!is_idchar[c] && c != '.' + && ((c2 != 'e' && c2 != 'E') || (c != '+' && c != '-'))) + break; + FORWARD(1); + c2= c; + } + CPP_NUL_TERMINATE_Q (pfile); + pfile->only_seen_white = 0; + return CPP_NUMBER; + case 'b': case 'c': case 'd': case 'h': case 'o': + case 'B': case 'C': case 'D': case 'H': case 'O': + if (opts->chill && PEEKC () == '\'') + { + pfile->only_seen_white = 0; + CPP_RESERVE (pfile, 2); + CPP_PUTC_Q (pfile, c); + CPP_PUTC_Q (pfile, '\''); + FORWARD(1); + for (;;) + { + c = GETC(); + if (c == EOF) + goto chill_number_eof; + if (!is_idchar[c]) + { + if (c == '\\' && PEEKC() == '\n') + { + FORWARD(2); + continue; + } + break; + } + CPP_PUTC (pfile, c); + } + if (c == '\'') + { + CPP_RESERVE (pfile, 2); + CPP_PUTC_Q (pfile, c); + CPP_NUL_TERMINATE_Q (pfile); + return CPP_STRING; + } + else + { + FORWARD(-1); + chill_number_eof: + CPP_NUL_TERMINATE (pfile); + return CPP_NUMBER; + } + } + else + goto letter; + case '_': + case 'a': case 'e': case 'f': case 'g': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'p': case 'q': + case 'r': case 's': case 't': case 'u': case 'v': case 'w': + case 'x': case 'y': case 'z': + case 'A': case 'E': case 'F': case 'G': case 'I': case 'J': + case 'K': case 'M': case 'N': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + letter: + { + HASHNODE *hp; + unsigned char *ident; + int before_name_written = CPP_WRITTEN (pfile); + int ident_len; + parse_name (pfile, c); + pfile->only_seen_white = 0; + if (pfile->no_macro_expand) + return CPP_NAME; + ident = pfile->token_buffer + before_name_written; + ident_len = CPP_PWRITTEN (pfile) - ident; + hp = cpp_lookup (pfile, ident, ident_len, -1); + if (!hp) + return CPP_NAME; + if (hp->type == T_DISABLED) + { + if (pfile->output_escapes) + { /* Return "@-IDENT", followed by '\0'. */ + int i; + CPP_RESERVE (pfile, 3); + ident = pfile->token_buffer + before_name_written; + CPP_ADJUST_WRITTEN (pfile, 2); + for (i = ident_len; i >= 0; i--) ident[i+2] = ident[i]; + ident[0] = '@'; + ident[1] = '-'; + } + return CPP_NAME; + } + + /* If macro wants an arglist, verify that a '(' follows. + first skip all whitespace, copying it to the output + after the macro name. Then, if there is no '(', + decide this is not a macro call and leave things that way. */ + if (hp->type == T_MACRO && hp->value.defn->nargs >= 0) + { + struct parse_marker macro_mark; + int is_macro_call; + while (CPP_IS_MACRO_BUFFER (CPP_BUFFER (pfile))) + { + cpp_buffer *next_buf; + cpp_skip_hspace (pfile); + if (PEEKC () != EOF) + break; + next_buf = CPP_PREV_BUFFER (CPP_BUFFER (pfile)); + (*CPP_BUFFER (pfile)->cleanup) (CPP_BUFFER (pfile), pfile); + CPP_BUFFER (pfile) = next_buf; + } + parse_set_mark (¯o_mark, pfile); + for (;;) + { + cpp_skip_hspace (pfile); + c = PEEKC (); + is_macro_call = c == '('; + if (c != '\n') + break; + FORWARD (1); + } + if (!is_macro_call) + parse_goto_mark (¯o_mark, pfile); + parse_clear_mark (¯o_mark); + if (!is_macro_call) + return CPP_NAME; + } + /* This is now known to be a macro call. */ + + /* it might not actually be a macro. */ + if (hp->type != T_MACRO) { + int xbuf_len; U_CHAR *xbuf; + CPP_SET_WRITTEN (pfile, before_name_written); + special_symbol (hp, pfile); + xbuf_len = CPP_WRITTEN (pfile) - before_name_written; + xbuf = (U_CHAR *) xmalloc (xbuf_len + 1); + CPP_SET_WRITTEN (pfile, before_name_written); + bcopy (CPP_PWRITTEN (pfile), xbuf, xbuf_len + 1); + push_macro_expansion (pfile, xbuf, xbuf_len, hp); + } + else + { + /* Expand the macro, reading arguments as needed, + and push the expansion on the input stack. */ + macroexpand (pfile, hp); + CPP_SET_WRITTEN (pfile, before_name_written); + } + + /* An extra "@ " is added to the end of a macro expansion + to prevent accidental token pasting. We prefer to avoid + unneeded extra spaces (for the sake of cpp-using tools like + imake). Here we remove the space if it is safe to do so. */ + if (pfile->buffer->rlimit - pfile->buffer->cur >= 3 + && pfile->buffer->rlimit[-2] == '@' + && pfile->buffer->rlimit[-1] == ' ') + { + int c1 = pfile->buffer->rlimit[-3]; + int c2 = CPP_BUF_PEEK (CPP_PREV_BUFFER (CPP_BUFFER (pfile))); + if (c2 == EOF || ! unsafe_chars (c1, c2)) + pfile->buffer->rlimit -= 2; + } + } + goto get_next; + + case ' ': case '\t': case '\v': case '\r': + for (;;) + { + CPP_PUTC (pfile, c); + c = PEEKC (); + if (c == EOF || !is_hor_space[c]) + break; + FORWARD(1); + } + return CPP_HSPACE; + + case '\\': + c2 = PEEKC (); + if (c2 != '\n') + goto randomchar; + token = CPP_HSPACE; + goto op2any; + + case '\n': + CPP_PUTC (pfile, c); + if (pfile->only_seen_white == 0) + pfile->only_seen_white = 1; + pfile->lineno++; + output_line_command (pfile, 1, same_file); + return CPP_VSPACE; + + case '(': token = CPP_LPAREN; goto char1; + case ')': token = CPP_RPAREN; goto char1; + case '{': token = CPP_LBRACE; goto char1; + case '}': token = CPP_RBRACE; goto char1; + case ',': token = CPP_COMMA; goto char1; + case ';': token = CPP_SEMICOLON; goto char1; + + randomchar: + default: + token = CPP_OTHER; + char1: + pfile->only_seen_white = 0; + CPP_PUTC (pfile, c); + return token; + } + } + } + + /* Like cpp_get_token, but skip spaces and comments. */ + enum cpp_token + cpp_get_non_space_token (pfile) + cpp_reader *pfile; + { + int old_written = CPP_WRITTEN (pfile); + for (;;) + { + enum cpp_token token = cpp_get_token (pfile); + if (token != CPP_COMMENT && token != CPP_POP + && token != CPP_HSPACE && token != CPP_VSPACE) + return token; + CPP_SET_WRITTEN (pfile, old_written); + } + } + + /* Parse an identifier starting with C. */ + + int + parse_name (pfile, c) + cpp_reader *pfile; int c; + { + for (;;) + { + if (! is_idchar[c]) + { + if (c == '\\' && PEEKC() == '\n') + { + FORWARD(2); + continue; + } + FORWARD (-1); + break; + } + + CPP_RESERVE(pfile, 2); /* One more for final NUL. */ + CPP_PUTC_Q (pfile, c); + c = GETC(); + if (c == EOF) + break; + } + CPP_NUL_TERMINATE_Q (pfile); + return 1; + } + + + /* Maintain and search list of included files, for #import. */ + + /* Hash a file name for import_hash_table. */ + + static int + import_hash (f) + char *f; + { + int val = 0; + + while (*f) val += *f++; + return (val%IMPORT_HASH_SIZE); + } + + /* Search for file FILENAME in import_hash_table. + Return -2 if found, either a matching name or a matching inode. + Otherwise, open the file and return a file descriptor if successful + or -1 if unsuccessful. */ + + static int + lookup_import (pfile, filename, searchptr) + cpp_reader *pfile; + char *filename; + struct file_name_list *searchptr; + { + struct import_file *i; + int h; + int hashval; + struct stat sb; + int fd; + + hashval = import_hash (filename); + + /* Attempt to find file in list of already included files */ + i = pfile->import_hash_table[hashval]; + + while (i) { + if (!strcmp (filename, i->name)) + return -2; /* return found */ + i = i->next; + } + /* Open it and try a match on inode/dev */ + fd = open_include_file (pfile, filename, searchptr); + if (fd < 0) + return fd; + fstat (fd, &sb); + for (h = 0; h < IMPORT_HASH_SIZE; h++) { + i = pfile->import_hash_table[h]; + while (i) { + /* Compare the inode and the device. + Supposedly on some systems the inode is not a scalar. */ + if (!bcmp ((char *) &i->inode, (char *) &sb.st_ino, sizeof (sb.st_ino)) + && i->dev == sb.st_dev) { + close (fd); + return -2; /* return found */ + } + i = i->next; + } + } + return fd; /* Not found, return open file */ + } + + /* Add the file FNAME, open on descriptor FD, to import_hash_table. */ + + static void + add_import (pfile, fd, fname) + cpp_reader *pfile; + int fd; + char *fname; + { + struct import_file *i; + int hashval; + struct stat sb; + + hashval = import_hash (fname); + fstat (fd, &sb); + i = (struct import_file *)xmalloc (sizeof (struct import_file)); + i->name = (char *)xmalloc (strlen (fname)+1); + strcpy (i->name, fname); + bcopy ((char *) &sb.st_ino, (char *) &i->inode, sizeof (sb.st_ino)); + i->dev = sb.st_dev; + i->next = pfile->import_hash_table[hashval]; + pfile->import_hash_table[hashval] = i; + } + + /* The file_name_map structure holds a mapping of file names for a + particular directory. This mapping is read from the file named + FILE_NAME_MAP_FILE in that directory. Such a file can be used to + map filenames on a file system with severe filename restrictions, + such as DOS. The format of the file name map file is just a series + of lines with two tokens on each line. The first token is the name + to map, and the second token is the actual name to use. */ + + struct file_name_map + { + struct file_name_map *map_next; + char *map_from; + char *map_to; + }; + + #define FILE_NAME_MAP_FILE "header.gcc" + + /* Read a space delimited string of unlimited length from a stdio + file. */ + + static char * + read_filename_string (ch, f) + int ch; + FILE *f; + { + char *alloc, *set; + int len; + + len = 20; + set = alloc = xmalloc (len + 1); + if (! is_space[ch]) + { + *set++ = ch; + while ((ch = getc (f)) != EOF && ! is_space[ch]) + { + if (set - alloc == len) + { + len *= 2; + alloc = xrealloc (alloc, len + 1); + set = alloc + len / 2; + } + *set++ = ch; + } + } + *set = '\0'; + ungetc (ch, f); + return alloc; + } + + /* This structure holds a linked list of file name maps, one per directory. */ + struct file_name_map_list + { + struct file_name_map_list *map_list_next; + char *map_list_name; + struct file_name_map *map_list_map; + }; + + /* Read the file name map file for DIRNAME. */ + + static struct file_name_map * + read_name_map (pfile, dirname) + cpp_reader *pfile; + char *dirname; + { + register struct file_name_map_list *map_list_ptr; + char *name; + FILE *f; + + for (map_list_ptr = CPP_OPTIONS (pfile)->map_list; map_list_ptr; + map_list_ptr = map_list_ptr->map_list_next) + if (! strcmp (map_list_ptr->map_list_name, dirname)) + return map_list_ptr->map_list_map; + + map_list_ptr = ((struct file_name_map_list *) + xmalloc (sizeof (struct file_name_map_list))); + map_list_ptr->map_list_name = savestring (dirname); + map_list_ptr->map_list_map = NULL; + + name = (char *) alloca (strlen (dirname) + strlen (FILE_NAME_MAP_FILE) + 2); + strcpy (name, dirname); + if (*dirname) + strcat (name, "/"); + strcat (name, FILE_NAME_MAP_FILE); + f = fopen (name, "r"); + if (!f) + map_list_ptr->map_list_map = NULL; + else + { + int ch; + int dirlen = strlen (dirname); + + while ((ch = getc (f)) != EOF) + { + char *from, *to; + struct file_name_map *ptr; + + if (is_space[ch]) + continue; + from = read_filename_string (ch, f); + while ((ch = getc (f)) != EOF && is_hor_space[ch]) + ; + to = read_filename_string (ch, f); + + ptr = ((struct file_name_map *) + xmalloc (sizeof (struct file_name_map))); + ptr->map_from = from; + + /* Make the real filename absolute. */ + if (*to == '/') + ptr->map_to = to; + else + { + ptr->map_to = xmalloc (dirlen + strlen (to) + 2); + strcpy (ptr->map_to, dirname); + ptr->map_to[dirlen] = '/'; + strcpy (ptr->map_to + dirlen + 1, to); + free (to); + } + + ptr->map_next = map_list_ptr->map_list_map; + map_list_ptr->map_list_map = ptr; + + while ((ch = getc (f)) != '\n') + if (ch == EOF) + break; + } + fclose (f); + } + + map_list_ptr->map_list_next = CPP_OPTIONS (pfile)->map_list; + CPP_OPTIONS (pfile)->map_list = map_list_ptr; + + return map_list_ptr->map_list_map; + } + + /* Try to open include file FILENAME. SEARCHPTR is the directory + being tried from the include file search path. This function maps + filenames on file systems based on information read by + read_name_map. */ + + static int + open_include_file (pfile, filename, searchptr) + cpp_reader *pfile; + char *filename; + struct file_name_list *searchptr; + { + register struct file_name_map *map; + register char *from; + char *p, *dir; + + if (searchptr && ! searchptr->got_name_map) + { + searchptr->name_map = read_name_map (pfile, + searchptr->fname + ? searchptr->fname : "."); + searchptr->got_name_map = 1; + } + + /* First check the mapping for the directory we are using. */ + if (searchptr && searchptr->name_map) + { + from = filename; + if (searchptr->fname) + from += strlen (searchptr->fname) + 1; + for (map = searchptr->name_map; map; map = map->map_next) + { + if (! strcmp (map->map_from, from)) + { + /* Found a match. */ + return open (map->map_to, O_RDONLY, 0666); + } + } + } + + /* Try to find a mapping file for the particular directory we are + looking in. Thus #include will look up sys/types.h + in /usr/include/header.gcc and look up types.h in + /usr/include/sys/header.gcc. */ + p = rindex (filename, '/'); + if (! p) + p = filename; + if (searchptr + && searchptr->fname + && strlen (searchptr->fname) == p - filename + && ! strncmp (searchptr->fname, filename, p - filename)) + { + /* FILENAME is in SEARCHPTR, which we've already checked. */ + return open (filename, O_RDONLY, 0666); + } + + if (p == filename) + { + dir = "."; + from = filename; + } + else + { + dir = (char *) alloca (p - filename + 1); + bcopy (filename, dir, p - filename); + dir[p - filename] = '\0'; + from = p + 1; + } + for (map = read_name_map (pfile, dir); map; map = map->map_next) + if (! strcmp (map->map_from, from)) + return open (map->map_to, O_RDONLY, 0666); + + return open (filename, O_RDONLY, 0666); + } + + /* Process the contents of include file FNAME, already open on descriptor F, + with output to OP. + SYSTEM_HEADER_P is 1 if this file resides in any one of the known + "system" include directories (as decided by the `is_system_include' + function above). + DIRPTR is the link in the dir path through which this file was found, + or 0 if the file name was absolute or via the current directory. + Return 1 on success, 0 on failure. + + The caller is responsible for the cpp_push_buffer. */ + + static int + finclude (pfile, f, fname, system_header_p, dirptr) + cpp_reader *pfile; + int f; + char *fname; + int system_header_p; + struct file_name_list *dirptr; + { + int st_mode; + long st_size; + long i; + int length; + cpp_buffer *fp; /* For input stack frame */ + int missing_newline = 0; + + if (file_size_and_mode (f, &st_mode, &st_size) < 0) + { + cpp_perror_with_name (pfile, fname); + close (f); + cpp_pop_buffer (pfile); + return 0; + } + + fp = CPP_BUFFER (pfile); + fp->nominal_fname = fp->fname = fname; + #if 0 + fp->length = 0; + #endif + fp->dir = dirptr; + fp->system_header_p = system_header_p; + fp->lineno = 1; + fp->colno = 1; + fp->cleanup = file_cleanup; + + if (S_ISREG (st_mode)) { + fp->buf = (U_CHAR *) xmalloc (st_size + 2); + fp->alimit = fp->buf + st_size + 2; + fp->cur = fp->buf; + + /* Read the file contents, knowing that st_size is an upper bound + on the number of bytes we can read. */ + length = safe_read (f, fp->buf, st_size); + fp->rlimit = fp->buf + length; + if (length < 0) goto nope; + } + else if (S_ISDIR (st_mode)) { + cpp_error (pfile, "directory `%s' specified in #include", fname); + close (f); + return 0; + } else { + /* Cannot count its file size before reading. + First read the entire file into heap and + copy them into buffer on stack. */ + + int bsize = 2000; + + st_size = 0; + fp->buf = (U_CHAR *) xmalloc (bsize + 2); + + for (;;) { + i = safe_read (f, fp->buf + st_size, bsize - st_size); + if (i < 0) + goto nope; /* error! */ + st_size += i; + if (st_size != bsize) + break; /* End of file */ + bsize *= 2; + fp->buf = (U_CHAR *) xrealloc (fp->buf, bsize + 2); + } + length = st_size; + } + + if ((length > 0 && fp->buf[length - 1] != '\n') + /* Backslash-newline at end is not good enough. */ + || (length > 1 && fp->buf[length - 2] == '\\')) { + fp->buf[length++] = '\n'; + #if 0 + missing_newline = 1; + #endif + } + fp->buf[length] = '\0'; + fp->rlimit = fp->buf + length; + + /* Close descriptor now, so nesting does not use lots of descriptors. */ + close (f); + + /* Must do this before calling trigraph_pcp, so that the correct file name + will be printed in warning messages. */ + + pfile->input_stack_listing_current = 0; + + #if 0 + if (!no_trigraphs) + trigraph_pcp (fp); + #endif + + #if 0 + rescan (op, 0); + + if (missing_newline) + fp->lineno--; + + if (CPP_PEDANTIC (pfile) && missing_newline) + pedwarn ("file does not end in newline"); + + indepth--; + input_file_stack_tick++; + free (fp->buf); + #endif + return 1; + + nope: + + cpp_perror_with_name (pfile, fname); + close (f); + free (fp->buf); + return 1; + } + + int + push_parse_file (pfile, fname) + cpp_reader *pfile; + char *fname; + { + struct cpp_options *opts = CPP_OPTIONS (pfile); + struct cpp_pending *pend; + char *p; + int f; + cpp_buffer *fp; + + /* The code looks at the defaults through this pointer, rather than through + the constant structure above. This pointer gets changed if an environment + variable specifies other defaults. */ + struct default_include *include_defaults = include_defaults_array; + + /* Add dirs from CPATH after dirs from -I. */ + /* There seems to be confusion about what CPATH should do, + so for the moment it is not documented. */ + /* Some people say that CPATH should replace the standard include dirs, + but that seems pointless: it comes before them, so it overrides them + anyway. */ + p = (char *) getenv ("CPATH"); + if (p != 0 && ! opts->no_standard_includes) + path_include (pfile, p); + + /* Now that dollars_in_ident is known, initialize is_idchar. */ + initialize_char_syntax (opts); + + /* Do partial setup of input buffer for the sake of generating + early #line directives (when -g is in effect). */ + fp = cpp_push_buffer (pfile, NULL, 0); + if (opts->in_fname == NULL) + opts->in_fname = ""; + fp->nominal_fname = fp->fname = opts->in_fname; + fp->lineno = 0; + + /* Install __LINE__, etc. Must follow initialize_char_syntax + and option processing. */ + initialize_builtins (pfile); + + /* Do standard #defines and assertions + that identify system and machine type. */ + + if (!opts->inhibit_predefs) { + char *p = (char *) alloca (strlen (predefs) + 1); + strcpy (p, predefs); + while (*p) { + char *q; + while (*p == ' ' || *p == '\t') + p++; + /* Handle -D options. */ + if (p[0] == '-' && p[1] == 'D') { + q = &p[2]; + while (*p && *p != ' ' && *p != '\t') + p++; + if (*p != 0) + *p++= 0; + if (opts->debug_output) + output_line_command (pfile, 0, same_file); + cpp_define (pfile, q); + while (*p == ' ' || *p == '\t') + p++; + } else if (p[0] == '-' && p[1] == 'A') { + /* Handle -A options (assertions). */ + char *assertion; + char *past_name; + char *value; + char *past_value; + char *termination; + int save_char; + + assertion = &p[2]; + past_name = assertion; + /* Locate end of name. */ + while (*past_name && *past_name != ' ' + && *past_name != '\t' && *past_name != '(') + past_name++; + /* Locate `(' at start of value. */ + value = past_name; + while (*value && (*value == ' ' || *value == '\t')) + value++; + if (*value++ != '(') + abort (); + while (*value && (*value == ' ' || *value == '\t')) + value++; + past_value = value; + /* Locate end of value. */ + while (*past_value && *past_value != ' ' + && *past_value != '\t' && *past_value != ')') + past_value++; + termination = past_value; + while (*termination && (*termination == ' ' || *termination == '\t')) + termination++; + if (*termination++ != ')') + abort (); + if (*termination && *termination != ' ' && *termination != '\t') + abort (); + /* Temporarily null-terminate the value. */ + save_char = *termination; + *termination = '\0'; + /* Install the assertion. */ + make_assertion (pfile, "-A", assertion); + *termination = (char) save_char; + p = termination; + while (*p == ' ' || *p == '\t') + p++; + } else { + abort (); + } + } + } + + /* Now handle the command line options. */ + + /* Do -U's, -D's and -A's in the order they were seen. */ + /* First reverse the list. */ + opts->pending = nreverse_pending (opts->pending); + + for (pend = opts->pending; pend; pend = pend->next) + { + if (pend->cmd != NULL && pend->cmd[0] == '-') + { + switch (pend->cmd[1]) + { + case 'U': + if (opts->debug_output) + output_line_command (pfile, 0, same_file); + do_undef (pfile, NULL, pend->arg, pend->arg + strlen (pend->arg)); + break; + case 'D': + if (opts->debug_output) + output_line_command (pfile, 0, same_file); + cpp_define (pfile, pend->arg); + break; + case 'A': + make_assertion (pfile, "-A", pend->arg); + break; + } + } + } + + opts->done_initializing = 1; + + { /* read the appropriate environment variable and if it exists + replace include_defaults with the listed path. */ + char *epath = 0; + switch ((opts->objc << 1) + opts->cplusplus) + { + case 0: + epath = getenv ("C_INCLUDE_PATH"); + break; + case 1: + epath = getenv ("CPLUS_INCLUDE_PATH"); + break; + case 2: + epath = getenv ("OBJC_INCLUDE_PATH"); + break; + case 3: + epath = getenv ("OBJCPLUS_INCLUDE_PATH"); + break; + } + /* If the environment var for this language is set, + add to the default list of include directories. */ + if (epath) { + char *nstore = (char *) alloca (strlen (epath) + 2); + int num_dirs; + char *startp, *endp; + + for (num_dirs = 1, startp = epath; *startp; startp++) + if (*startp == PATH_SEPARATOR) + num_dirs++; + include_defaults + = (struct default_include *) xmalloc ((num_dirs + * sizeof (struct default_include)) + + sizeof (include_defaults_array)); + startp = endp = epath; + num_dirs = 0; + while (1) { + /* Handle cases like c:/usr/lib:d:/gcc/lib */ + if ((*endp == PATH_SEPARATOR) + || *endp == 0) { + strncpy (nstore, startp, endp-startp); + if (endp == startp) + strcpy (nstore, "."); + else + nstore[endp-startp] = '\0'; + + include_defaults[num_dirs].fname = savestring (nstore); + include_defaults[num_dirs].cplusplus = opts->cplusplus; + include_defaults[num_dirs].cxx_aware = 1; + num_dirs++; + if (*endp == '\0') + break; + endp = startp = endp + 1; + } else + endp++; + } + /* Put the usual defaults back in at the end. */ + bcopy ((char *) include_defaults_array, + (char *) &include_defaults[num_dirs], + sizeof (include_defaults_array)); + } + } + + append_include_chain (pfile, opts->before_system, opts->last_before_system); + opts->first_system_include = opts->before_system; + + /* Unless -fnostdinc, + tack on the standard include file dirs to the specified list */ + if (!opts->no_standard_includes) { + struct default_include *p = include_defaults; + char *specd_prefix = opts->include_prefix; + char *default_prefix = savestring (GCC_INCLUDE_DIR); + int default_len = 0; + /* Remove the `include' from /usr/local/lib/gcc.../include. */ + if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) { + default_len = strlen (default_prefix) - 7; + default_prefix[default_len] = 0; + } + /* Search "translated" versions of GNU directories. + These have /usr/local/lib/gcc... replaced by specd_prefix. */ + if (specd_prefix != 0 && default_len != 0) + for (p = include_defaults; p->fname; p++) { + /* Some standard dirs are only for C++. */ + if (!p->cplusplus + || (opts->cplusplus && !opts->no_standard_cplusplus_includes)) { + /* Does this dir start with the prefix? */ + if (!strncmp (p->fname, default_prefix, default_len)) { + /* Yes; change prefix and add to search list. */ + struct file_name_list *new + = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); + int this_len = strlen (specd_prefix) + strlen (p->fname) - default_len; + char *str = (char *) xmalloc (this_len + 1); + strcpy (str, specd_prefix); + strcat (str, p->fname + default_len); + new->fname = str; + new->control_macro = 0; + new->c_system_include_path = !p->cxx_aware; + new->got_name_map = 0; + append_include_chain (pfile, new, new); + if (opts->first_system_include == 0) + opts->first_system_include = new; + } + } + } + /* Search ordinary names for GNU include directories. */ + for (p = include_defaults; p->fname; p++) { + /* Some standard dirs are only for C++. */ + if (!p->cplusplus + || (opts->cplusplus && !opts->no_standard_cplusplus_includes)) { + struct file_name_list *new + = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); + new->control_macro = 0; + new->c_system_include_path = !p->cxx_aware; + new->fname = p->fname; + new->got_name_map = 0; + append_include_chain (pfile, new, new); + if (opts->first_system_include == 0) + opts->first_system_include = new; + } + } + } + + /* Tack the after_include chain at the end of the include chain. */ + append_include_chain (pfile, opts->after_include, opts->last_after_include); + if (opts->first_system_include == 0) + opts->first_system_include = opts->after_include; + + /* With -v, print the list of dirs to search. */ + if (opts->verbose) { + struct file_name_list *p; + fprintf (stderr, "#include \"...\" search starts here:\n"); + for (p = opts->include; p; p = p->next) { + if (p == opts->first_bracket_include) + fprintf (stderr, "#include <...> search starts here:\n"); + fprintf (stderr, " %s\n", p->fname); + } + fprintf (stderr, "End of search list.\n"); + } + + /* Scan the -imacros files before the main input. + Much like #including them, but with no_output set + so that only their macro definitions matter. */ + + opts->no_output++; pfile->no_record_file++; + for (pend = opts->pending; pend; pend = pend->next) + { + if (pend->cmd != NULL && strcmp (pend->cmd, "-imacros") == 0) + { + int fd = open (pend->arg, O_RDONLY, 0666); + if (fd < 0) + { + cpp_perror_with_name (pfile, pend->arg); + return FATAL_EXIT_CODE; + } + cpp_push_buffer (pfile, NULL, 0); + finclude (pfile, fd, pend->arg, 0, NULL_PTR); + cpp_scan_buffer (pfile); + } + } + opts->no_output--; pfile->no_record_file--; + + /* Copy the entire contents of the main input file into + the stacked input buffer previously allocated for it. */ + if (fname == NULL || *fname == 0) { + fname = ""; + f = 0; + } else if ((f = open (fname, O_RDONLY, 0666)) < 0) + cpp_pfatal_with_name (pfile, fname); + + /* -MG doesn't select the form of output and must be specified with one of + -M or -MM. -MG doesn't make sense with -MD or -MMD since they don't + inhibit compilation. */ + if (opts->print_deps_missing_files + && (opts->print_deps == 0 || !opts->no_output)) + fatal (pfile, "-MG must be specified with one of -M or -MM"); + + /* Either of two environment variables can specify output of deps. + Its value is either "OUTPUT_FILE" or "OUTPUT_FILE DEPS_TARGET", + where OUTPUT_FILE is the file to write deps info to + and DEPS_TARGET is the target to mention in the deps. */ + + if (opts->print_deps == 0 + && (getenv ("SUNPRO_DEPENDENCIES") != 0 + || getenv ("DEPENDENCIES_OUTPUT") != 0)) { + char *spec = getenv ("DEPENDENCIES_OUTPUT"); + char *s; + char *output_file; + + if (spec == 0) + { + spec = getenv ("SUNPRO_DEPENDENCIES"); + opts->print_deps = 2; + } + else + opts->print_deps = 1; + + s = spec; + /* Find the space before the DEPS_TARGET, if there is one. */ + /* This should use index. (mrs) */ + while (*s != 0 && *s != ' ') s++; + if (*s != 0) + { + opts->deps_target = s + 1; + output_file = (char *) xmalloc (s - spec + 1); + bcopy (spec, output_file, s - spec); + output_file[s - spec] = 0; + } + else + { + opts->deps_target = 0; + output_file = spec; + } + + opts->deps_file = output_file; + opts->print_deps_append = 1; + } + + /* For -M, print the expected object file name + as the target of this Make-rule. */ + if (opts->print_deps) + { + pfile->deps_allocated_size = 200; + pfile->deps_buffer = (char *) xmalloc (pfile->deps_allocated_size); + pfile->deps_buffer[0] = 0; + pfile->deps_size = 0; + pfile->deps_column = 0; + + if (opts->deps_target) + deps_output (pfile, opts->deps_target, ':'); + else if (*opts->in_fname == 0) + deps_output (pfile, "-", ':'); + else + { + char *p, *q; + int len; + + /* Discard all directory prefixes from filename. */ + if ((q = rindex (opts->in_fname, '/')) != NULL + #ifdef DIR_SEPARATOR + && (q = rindex (opts->in_fname, DIR_SEPARATOR)) != NULL + #endif + ) + ++q; + else + q = opts->in_fname; + + /* Copy remainder to mungable area. */ + p = (char *) alloca (strlen(q) + 8); + strcpy (p, q); + + /* Output P, but remove known suffixes. */ + len = strlen (p); + q = p + len; + if (len >= 2 + && p[len - 2] == '.' + && index("cCsSm", p[len - 1])) + q = p + (len - 2); + else if (len >= 3 + && p[len - 3] == '.' + && p[len - 2] == 'c' + && p[len - 1] == 'c') + q = p + (len - 3); + else if (len >= 4 + && p[len - 4] == '.' + && p[len - 3] == 'c' + && p[len - 2] == 'x' + && p[len - 1] == 'x') + q = p + (len - 4); + else if (len >= 4 + && p[len - 4] == '.' + && p[len - 3] == 'c' + && p[len - 2] == 'p' + && p[len - 1] == 'p') + q = p + (len - 4); + + /* Supply our own suffix. */ + #ifndef VMS + strcpy (q, ".o"); + #else + strcpy (q, ".obj"); + #endif + + deps_output (pfile, p, ':'); + deps_output (pfile, opts->in_fname, ' '); + } + } + + #if 0 + /* Make sure data ends with a newline. And put a null after it. */ + + if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n') + /* Backslash-newline at end is not good enough. */ + || (fp->length > 1 && fp->buf[fp->length - 2] == '\\')) { + fp->buf[fp->length++] = '\n'; + missing_newline = 1; + } + fp->buf[fp->length] = '\0'; + + /* Unless inhibited, convert trigraphs in the input. */ + + if (!no_trigraphs) + trigraph_pcp (fp); + #endif + + /* Scan the -include files before the main input. + We push these in reverse order, so that the first one is handled first. */ + + pfile->no_record_file++; + opts->pending = nreverse_pending (opts->pending); + for (pend = opts->pending; pend; pend = pend->next) + { + if (pend->cmd != NULL && strcmp (pend->cmd, "-include") == 0) + { + int fd = open (pend->arg, O_RDONLY, 0666); + if (fd < 0) + { + cpp_perror_with_name (pfile, pend->arg); + return FATAL_EXIT_CODE; + } + cpp_push_buffer (pfile, NULL, 0); + finclude (pfile, fd, pend->arg, 0, NULL_PTR); + } + } + pfile->no_record_file--; + + /* Free the pending list. */ + for (pend = opts->pending; pend; ) + { + struct cpp_pending *next = pend->next; + free (pend); + pend = next; + } + opts->pending = NULL; + + #if 0 + /* Scan the input, processing macros and directives. */ + + rescan (&outbuf, 0); + + if (missing_newline) + fp->lineno--; + + if (CPP_PEDANTIC (pfile) && missing_newline) + pedwarn ("file does not end in newline"); + + #endif + if (finclude (pfile, f, fname, 0, NULL_PTR)) + output_line_command (pfile, 0, same_file); + return SUCCESS_EXIT_CODE; + } + + void + init_parse_file (pfile) + cpp_reader *pfile; + { + bzero ((char *) pfile, sizeof (cpp_reader)); + pfile->get_token = cpp_get_token; + + pfile->token_buffer_size = 200; + pfile->token_buffer = (U_CHAR*)xmalloc (pfile->token_buffer_size); + CPP_SET_WRITTEN (pfile, 0); + + pfile->system_include_depth = 0; + pfile->dont_repeat_files = 0; + pfile->all_include_files = 0; + pfile->max_include_len = 0; + pfile->timebuf = NULL; + pfile->only_seen_white = 1; + pfile->buffer = CPP_NULL_BUFFER(pfile); + } + + static struct cpp_pending * + nreverse_pending (list) + struct cpp_pending *list; + + { + register struct cpp_pending *prev = 0, *next, *pend; + for (pend = list; pend; pend = next) + { + next = pend->next; + pend->next = prev; + prev = pend; + } + return prev; + } + + static void + push_pending (pfile, cmd, arg) + cpp_reader *pfile; + char *cmd; + char *arg; + { + struct cpp_pending *pend + = (struct cpp_pending*)xmalloc (sizeof (struct cpp_pending)); + pend->cmd = cmd; + pend->arg = arg; + pend->next = CPP_OPTIONS (pfile)->pending; + CPP_OPTIONS (pfile)->pending = pend; + } + + /* Handle command-line options in (argc, argv). + Can be called multiple times, to handle multiple sets of options. + Returns if an unrecognized option is seen. + Returns number of handled arguments. */ + + int + cpp_handle_options (pfile, argc, argv) + cpp_reader *pfile; + int argc; + char **argv; + { + int i; + struct cpp_options *opts = CPP_OPTIONS (pfile); + for (i = 0; i < argc; i++) { + if (argv[i][0] != '-') { + if (opts->out_fname != NULL) + fatal ("Usage: %s [switches] input output", argv[0]); + else if (opts->in_fname != NULL) + opts->out_fname = argv[i]; + else + opts->in_fname = argv[i]; + } else { + switch (argv[i][1]) { + + case 'i': + if (!strcmp (argv[i], "-include") + || !strcmp (argv[i], "-imacros")) { + if (i + 1 == argc) + fatal ("Filename missing after `%s' option", argv[i]); + else + push_pending (pfile, argv[i], argv[i+1]), i++; + } + if (!strcmp (argv[i], "-iprefix")) { + if (i + 1 == argc) + fatal ("Filename missing after `-iprefix' option"); + else + opts->include_prefix = argv[++i]; + } + if (!strcmp (argv[i], "-ifoutput")) { + opts->output_conditionals = 1; + } + if (!strcmp (argv[i], "-isystem")) { + struct file_name_list *dirtmp; + + if (i + 1 == argc) + fatal ("Filename missing after `-isystem' option"); + + dirtmp = (struct file_name_list *) + xmalloc (sizeof (struct file_name_list)); + dirtmp->next = 0; + dirtmp->control_macro = 0; + dirtmp->c_system_include_path = 1; + dirtmp->fname = (char *) xmalloc (strlen (argv[i+1]) + 1); + strcpy (dirtmp->fname, argv[++i]); + dirtmp->got_name_map = 0; + + if (opts->before_system == 0) + opts->before_system = dirtmp; + else + opts->last_before_system->next = dirtmp; + opts->last_before_system = dirtmp; /* Tail follows the last one */ + } + /* Add directory to end of path for includes, + with the default prefix at the front of its name. */ + if (!strcmp (argv[i], "-iwithprefix")) { + struct file_name_list *dirtmp; + char *prefix; + + if (opts->include_prefix != 0) + prefix = opts->include_prefix; + else { + prefix = savestring (GCC_INCLUDE_DIR); + /* Remove the `include' from /usr/local/lib/gcc.../include. */ + if (!strcmp (prefix + strlen (prefix) - 8, "/include")) + prefix[strlen (prefix) - 7] = 0; + } + + dirtmp = (struct file_name_list *) + xmalloc (sizeof (struct file_name_list)); + dirtmp->next = 0; /* New one goes on the end */ + dirtmp->control_macro = 0; + dirtmp->c_system_include_path = 0; + if (i + 1 == argc) + fatal ("Directory name missing after `-iwithprefix' option"); + + dirtmp->fname = (char *) xmalloc (strlen (argv[i+1]) + + strlen (prefix) + 1); + strcpy (dirtmp->fname, prefix); + strcat (dirtmp->fname, argv[++i]); + dirtmp->got_name_map = 0; + + if (opts->after_include == 0) + opts->after_include = dirtmp; + else + opts->last_after_include->next = dirtmp; + opts->last_after_include = dirtmp; /* Tail follows the last one */ + } + /* Add directory to main path for includes, + with the default prefix at the front of its name. */ + if (!strcmp (argv[i], "-iwithprefixbefore")) { + struct file_name_list *dirtmp; + char *prefix; + + if (opts->include_prefix != 0) + prefix = opts->include_prefix; + else { + prefix = savestring (GCC_INCLUDE_DIR); + /* Remove the `include' from /usr/local/lib/gcc.../include. */ + if (!strcmp (prefix + strlen (prefix) - 8, "/include")) + prefix[strlen (prefix) - 7] = 0; + } + + dirtmp = (struct file_name_list *) + xmalloc (sizeof (struct file_name_list)); + dirtmp->next = 0; /* New one goes on the end */ + dirtmp->control_macro = 0; + dirtmp->c_system_include_path = 0; + if (i + 1 == argc) + fatal ("Directory name missing after `-iwithprefixbefore' option"); + + dirtmp->fname = (char *) xmalloc (strlen (argv[i+1]) + + strlen (prefix) + 1); + strcpy (dirtmp->fname, prefix); + strcat (dirtmp->fname, argv[++i]); + dirtmp->got_name_map = 0; + + append_include_chain (pfile, dirtmp, dirtmp); + } + /* Add directory to end of path for includes. */ + if (!strcmp (argv[i], "-idirafter")) { + struct file_name_list *dirtmp; + + dirtmp = (struct file_name_list *) + xmalloc (sizeof (struct file_name_list)); + dirtmp->next = 0; /* New one goes on the end */ + dirtmp->control_macro = 0; + dirtmp->c_system_include_path = 0; + if (i + 1 == argc) + fatal ("Directory name missing after `-idirafter' option"); + else + dirtmp->fname = argv[++i]; + dirtmp->got_name_map = 0; + + if (opts->after_include == 0) + opts->after_include = dirtmp; + else + opts->last_after_include->next = dirtmp; + opts->last_after_include = dirtmp; /* Tail follows the last one */ + } + break; + + case 'o': + if (opts->out_fname != NULL) + fatal ("Output filename specified twice"); + if (i + 1 == argc) + fatal ("Filename missing after -o option"); + opts->out_fname = argv[++i]; + if (!strcmp (opts->out_fname, "-")) + opts->out_fname = ""; + break; + + case 'p': + if (!strcmp (argv[i], "-pedantic")) + CPP_PEDANTIC (pfile) = 1; + else if (!strcmp (argv[i], "-pedantic-errors")) { + CPP_PEDANTIC (pfile) = 1; + opts->pedantic_errors = 1; + } + #if 0 + else if (!strcmp (argv[i], "-pcp")) { + char *pcp_fname = argv[++i]; + pcp_outfile = + ((pcp_fname[0] != '-' || pcp_fname[1] != '\0') + ? fopen (pcp_fname, "w") + : fdopen (dup (fileno (stdout)), "w")); + if (pcp_outfile == 0) + cpp_pfatal_with_name (pfile, pcp_fname); + no_precomp = 1; + } + #endif + break; + + case 't': + if (!strcmp (argv[i], "-traditional")) { + opts->traditional = 1; + if (opts->dollars_in_ident > 0) + opts->dollars_in_ident = 1; + } else if (!strcmp (argv[i], "-trigraphs")) { + if (!opts->chill) + opts->no_trigraphs = 0; + } + break; + + case 'l': + if (! strcmp (argv[i], "-lang-c")) + opts->cplusplus = 0, opts->cplusplus_comments = 0, opts->objc = 0; + if (! strcmp (argv[i], "-lang-c++")) + opts->cplusplus = 1, opts->cplusplus_comments = 1, opts->objc = 0; + if (! strcmp (argv[i], "-lang-c-c++-comments")) + opts->cplusplus = 0, opts->cplusplus_comments = 1, opts->objc = 0; + if (! strcmp (argv[i], "-lang-objc")) + opts->objc = 1, opts->cplusplus = 0, opts->cplusplus_comments = 1; + if (! strcmp (argv[i], "-lang-objc++")) + opts->objc = 1, opts->cplusplus = 1, opts->cplusplus_comments = 1; + if (! strcmp (argv[i], "-lang-asm")) + opts->lang_asm = 1; + if (! strcmp (argv[i], "-lint")) + opts->for_lint = 1; + if (! strcmp (argv[i], "-lang-chill")) + opts->objc = 0, opts->cplusplus = 0, opts->chill = 1, + opts->traditional = 1, opts->no_trigraphs = 1; + break; + + case '+': + opts->cplusplus = 1, opts->cplusplus_comments = 1; + break; + + case 'w': + opts->inhibit_warnings = 1; + break; + + case 'W': + if (!strcmp (argv[i], "-Wtrigraphs")) + opts->warn_trigraphs = 1; + else if (!strcmp (argv[i], "-Wno-trigraphs")) + opts->warn_trigraphs = 0; + else if (!strcmp (argv[i], "-Wcomment")) + opts->warn_comments = 1; + else if (!strcmp (argv[i], "-Wno-comment")) + opts->warn_comments = 0; + else if (!strcmp (argv[i], "-Wcomments")) + opts->warn_comments = 1; + else if (!strcmp (argv[i], "-Wno-comments")) + opts->warn_comments = 0; + else if (!strcmp (argv[i], "-Wtraditional")) + opts->warn_stringify = 1; + else if (!strcmp (argv[i], "-Wno-traditional")) + opts->warn_stringify = 0; + else if (!strcmp (argv[i], "-Wimport")) + opts->warn_import = 1; + else if (!strcmp (argv[i], "-Wno-import")) + opts->warn_import = 0; + else if (!strcmp (argv[i], "-Werror")) + opts->warnings_are_errors = 1; + else if (!strcmp (argv[i], "-Wno-error")) + opts->warnings_are_errors = 0; + else if (!strcmp (argv[i], "-Wall")) + { + opts->warn_trigraphs = 1; + opts->warn_comments = 1; + } + break; + + case 'M': + /* The style of the choices here is a bit mixed. + The chosen scheme is a hybrid of keeping all options in one string + and specifying each option in a separate argument: + -M|-MM|-MD file|-MMD file [-MG]. An alternative is: + -M|-MM|-MD file|-MMD file|-MG|-MMG; or more concisely: + -M[M][G][D file]. This is awkward to handle in specs, and is not + as extensible. */ + /* ??? -MG must be specified in addition to one of -M or -MM. + This can be relaxed in the future without breaking anything. + The converse isn't true. */ + + /* -MG isn't valid with -MD or -MMD. This is checked for later. */ + if (!strcmp (argv[i], "-MG")) + { + opts->print_deps_missing_files = 1; + break; + } + if (!strcmp (argv[i], "-M")) + opts->print_deps = 2; + else if (!strcmp (argv[i], "-MM")) + opts->print_deps = 1; + else if (!strcmp (argv[i], "-MD")) + opts->print_deps = 2; + else if (!strcmp (argv[i], "-MMD")) + opts->print_deps = 1; + /* For -MD and -MMD options, write deps on file named by next arg. */ + if (!strcmp (argv[i], "-MD") || !strcmp (argv[i], "-MMD")) + { + if (i+1 == argc) + fatal ("Filename missing after %s option", argv[i]); + opts->deps_file = argv[++i]; + } + else + { + /* For -M and -MM, write deps on standard output + and suppress the usual output. */ + opts->no_output = 1; + } + break; + + case 'd': + { + char *p = argv[i] + 2; + char c; + while ((c = *p++) != 0) { + /* Arg to -d specifies what parts of macros to dump */ + switch (c) { + case 'M': + opts->dump_macros = dump_only; + opts->no_output = 1; + break; + case 'N': + opts->dump_macros = dump_names; + break; + case 'D': + opts->dump_macros = dump_definitions; + break; + } + } + } + break; + + case 'g': + if (argv[i][2] == '3') + opts->debug_output = 1; + break; + + case 'v': + fprintf (stderr, "GNU CPP version %s", version_string); + #ifdef TARGET_VERSION + TARGET_VERSION; + #endif + fprintf (stderr, "\n"); + opts->verbose = 1; + break; + + case 'H': + opts->print_include_names = 1; + break; + + case 'D': + if (argv[i][2] != 0) + push_pending (pfile, "-D", argv[i] + 2); + else if (i + 1 == argc) + fatal ("Macro name missing after -D option"); + else + i++, push_pending (pfile, "-D", argv[i]); + break; + + case 'A': + { + char *p; + + if (argv[i][2] != 0) + p = argv[i] + 2; + else if (i + 1 == argc) + fatal ("Assertion missing after -A option"); + else + p = argv[++i]; + + if (!strcmp (p, "-")) { + struct cpp_pending **ptr; + /* -A- eliminates all predefined macros and assertions. + Let's include also any that were specified earlier + on the command line. That way we can get rid of any + that were passed automatically in from GCC. */ + int j; + opts->inhibit_predefs = 1; + for (ptr = &opts->pending; *ptr != NULL; ) + { + struct cpp_pending *pend = *ptr; + if (pend->cmd && pend->cmd[0] == '-' + && (pend->cmd[1] == 'D' || pend->cmd[1] == 'A')) + { + *ptr = pend->next; + free (pend); + } + else + ptr = &pend->next; + } + } else { + push_pending (pfile, "-A", p); + } + } + break; + + case 'U': /* JF #undef something */ + if (argv[i][2] != 0) + push_pending (pfile, "-U", argv[i] + 2); + else if (i + 1 == argc) + fatal ("Macro name missing after -U option"); + else + push_pending (pfile, "-U", argv[i+1]), i++; + break; + + case 'C': + opts->put_out_comments = 1; + break; + + case 'E': /* -E comes from cc -E; ignore it. */ + break; + + case 'P': + opts->no_line_commands = 1; + break; + + case '$': /* Don't include $ in identifiers. */ + opts->dollars_in_ident = 0; + break; + + case 'I': /* Add directory to path for includes. */ + { + struct file_name_list *dirtmp; + + if (! CPP_OPTIONS(pfile)->ignore_srcdir + && !strcmp (argv[i] + 2, "-")) { + CPP_OPTIONS (pfile)->ignore_srcdir = 1; + /* Don't use any preceding -I directories for #include <...>. */ + CPP_OPTIONS (pfile)->first_bracket_include = 0; + } + else { + dirtmp = (struct file_name_list *) + xmalloc (sizeof (struct file_name_list)); + dirtmp->next = 0; /* New one goes on the end */ + dirtmp->control_macro = 0; + dirtmp->c_system_include_path = 0; + if (argv[i][2] != 0) + dirtmp->fname = argv[i] + 2; + else if (i + 1 == argc) + fatal ("Directory name missing after -I option"); + else + dirtmp->fname = argv[++i]; + dirtmp->got_name_map = 0; + append_include_chain (pfile, dirtmp, dirtmp); + } + } + break; + + case 'n': + if (!strcmp (argv[i], "-nostdinc")) + /* -nostdinc causes no default include directories. + You must specify all include-file directories with -I. */ + opts->no_standard_includes = 1; + else if (!strcmp (argv[i], "-nostdinc++")) + /* -nostdinc++ causes no default C++-specific include directories. */ + opts->no_standard_cplusplus_includes = 1; + #if 0 + else if (!strcmp (argv[i], "-noprecomp")) + no_precomp = 1; + #endif + break; + + case 'u': + /* Sun compiler passes undocumented switch "-undef". + Let's assume it means to inhibit the predefined symbols. */ + opts->inhibit_predefs = 1; + break; + + case '\0': /* JF handle '-' as file name meaning stdin or stdout */ + if (opts->in_fname == NULL) { + opts->in_fname = ""; + break; + } else if (opts->out_fname == NULL) { + opts->out_fname = ""; + break; + } /* else fall through into error */ + + default: + return i; + } + } + } + return i; + } + + void + cpp_finish (pfile) + cpp_reader *pfile; + { + struct cpp_options *opts = CPP_OPTIONS (pfile); + + if (opts->print_deps) + { + /* Stream on which to print the dependency information. */ + FILE *deps_stream; + + /* Don't actually write the deps file if compilation has failed. */ + if (pfile->errors == 0) + { + char *deps_mode = opts->print_deps_append ? "a" : "w"; + if (opts->deps_file == 0) + deps_stream = stdout; + else if ((deps_stream = fopen (opts->deps_file, deps_mode)) == 0) + cpp_pfatal_with_name (pfile, opts->deps_file); + fputs (pfile->deps_buffer, deps_stream); + putc ('\n', deps_stream); + if (opts->deps_file) + { + if (ferror (deps_stream) || fclose (deps_stream) != 0) + fatal ("I/O error on output"); + } + } + } + } + + /* Free resources used by PFILE. */ + + void + cpp_cleanup (pfile) + cpp_reader *pfile; + { + int i; + while ( CPP_BUFFER (pfile) != CPP_NULL_BUFFER (pfile)) + cpp_pop_buffer (pfile); + + if (pfile->token_buffer) + { + free (pfile->token_buffer); + pfile->token_buffer = NULL; + } + + if (pfile->deps_buffer) + { + free (pfile->deps_buffer); + pfile->deps_buffer = NULL; + pfile->deps_allocated_size = 0; + } + + while (pfile->if_stack) + { + IF_STACK_FRAME *temp = pfile->if_stack; + pfile->if_stack = temp->next; + free (temp); + } + + while (pfile->dont_repeat_files) + { + struct file_name_list *temp = pfile->dont_repeat_files; + pfile->dont_repeat_files = temp->next; + free (temp->fname); + free (temp); + } + + while (pfile->all_include_files) + { + struct file_name_list *temp = pfile->all_include_files; + pfile->all_include_files = temp->next; + free (temp->fname); + free (temp); + } + + for (i = IMPORT_HASH_SIZE; --i >= 0; ) + { + register struct import_file *imp = pfile->import_hash_table[i]; + while (imp) + { + struct import_file *next = imp->next; + free (imp->name); + free (imp); + imp = next; + } + pfile->import_hash_table[i] = 0; + } + + for (i = ASSERTION_HASHSIZE; --i >= 0; ) + { + while (pfile->assertion_hashtab[i]) + delete_assertion (pfile->assertion_hashtab[i]); + } + + cpp_hash_cleanup (pfile); + } + + static int + do_assert (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + long symstart; /* remember where symbol name starts */ + int c; + int sym_length; /* and how long it is */ + struct arglist *tokens = NULL; + + if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->done_initializing + && !CPP_BUFFER (pfile)->system_header_p) + cpp_pedwarn (pfile, "ANSI C does not allow `#assert'"); + + cpp_skip_hspace (pfile); + symstart = CPP_WRITTEN (pfile); /* remember where it starts */ + parse_name (pfile, GETC()); + sym_length = check_macro_name (pfile, pfile->token_buffer + symstart, + "assertion"); + + cpp_skip_hspace (pfile); + if (PEEKC() != '(') { + cpp_error (pfile, "missing token-sequence in `#assert'"); + goto error; + } + + { + int error_flag = 0; + tokens = read_token_list (pfile, &error_flag); + if (error_flag) + goto error; + if (tokens == 0) { + cpp_error (pfile, "empty token-sequence in `#assert'"); + goto error; + } + cpp_skip_hspace (pfile); + c = PEEKC (); + if (c != EOF && c != '\n') + cpp_pedwarn (pfile, "junk at end of `#assert'"); + skip_rest_of_line (pfile); + } + + /* If this name isn't already an assertion name, make it one. + Error if it was already in use in some other way. */ + + { + ASSERTION_HASHNODE *hp; + U_CHAR *symname = pfile->token_buffer + symstart; + int hashcode = hashf (symname, sym_length, ASSERTION_HASHSIZE); + struct tokenlist_list *value + = (struct tokenlist_list *) xmalloc (sizeof (struct tokenlist_list)); + + hp = assertion_lookup (pfile, symname, sym_length, hashcode); + if (hp == NULL) { + if (sym_length == 7 && ! strncmp (symname, "defined", sym_length)) + cpp_error (pfile, "`defined' redefined as assertion"); + hp = assertion_install (pfile, symname, sym_length, hashcode); + } + + /* Add the spec'd token-sequence to the list of such. */ + value->tokens = tokens; + value->next = hp->value; + hp->value = value; + } + CPP_SET_WRITTEN (pfile, symstart); /* Pop */ + return 0; + error: + CPP_SET_WRITTEN (pfile, symstart); /* Pop */ + skip_rest_of_line (pfile); + return 1; + } + + static int + do_unassert (pfile, keyword, buf, limit) + cpp_reader *pfile; + struct directive *keyword; + U_CHAR *buf, *limit; + { + long symstart; /* remember where symbol name starts */ + int sym_length; /* and how long it is */ + int c; + + struct arglist *tokens = NULL; + int tokens_specified = 0; + + if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->done_initializing + && !CPP_BUFFER (pfile)->system_header_p) + cpp_pedwarn (pfile, "ANSI C does not allow `#unassert'"); + + cpp_skip_hspace (pfile); + + symstart = CPP_WRITTEN (pfile); /* remember where it starts */ + parse_name (pfile, GETC()); + sym_length = check_macro_name (pfile, pfile->token_buffer + symstart, + "assertion"); + + cpp_skip_hspace (pfile); + if (PEEKC() == '(') { + int error_flag = 0; + + tokens = read_token_list (pfile, &error_flag); + if (error_flag) + goto error; + if (tokens == 0) { + cpp_error (pfile, "empty token list in `#unassert'"); + goto error; + } + + tokens_specified = 1; + } + + cpp_skip_hspace (pfile); + c = PEEKC (); + if (c != EOF && c != '\n') + cpp_error (pfile, "junk at end of `#unassert'"); + skip_rest_of_line (pfile); + + { + ASSERTION_HASHNODE *hp; + U_CHAR *symname = pfile->token_buffer + symstart; + int hashcode = hashf (symname, sym_length, ASSERTION_HASHSIZE); + struct tokenlist_list *tail, *prev; + + hp = assertion_lookup (pfile, symname, sym_length, hashcode); + if (hp == NULL) + return 1; + + /* If no token list was specified, then eliminate this assertion + entirely. */ + if (! tokens_specified) + delete_assertion (hp); + else { + /* If a list of tokens was given, then delete any matching list. */ + + tail = hp->value; + prev = 0; + while (tail) { + struct tokenlist_list *next = tail->next; + if (compare_token_lists (tail->tokens, tokens)) { + if (prev) + prev->next = next; + else + hp->value = tail->next; + free_token_list (tail->tokens); + free (tail); + } else { + prev = tail; + } + tail = next; + } + } + } + + CPP_SET_WRITTEN (pfile, symstart); /* Pop */ + return 0; + error: + CPP_SET_WRITTEN (pfile, symstart); /* Pop */ + skip_rest_of_line (pfile); + return 1; + } + + /* Test whether there is an assertion named NAME + and optionally whether it has an asserted token list TOKENS. + NAME is not null terminated; its length is SYM_LENGTH. + If TOKENS_SPECIFIED is 0, then don't check for any token list. */ + + int + check_assertion (pfile, name, sym_length, tokens_specified, tokens) + cpp_reader *pfile; + U_CHAR *name; + int sym_length; + int tokens_specified; + struct arglist *tokens; + { + ASSERTION_HASHNODE *hp; + int hashcode = hashf (name, sym_length, ASSERTION_HASHSIZE); + + if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) + cpp_pedwarn (pfile, "ANSI C does not allow testing assertions"); + + hp = assertion_lookup (pfile, name, sym_length, hashcode); + if (hp == NULL) + /* It is not an assertion; just return false. */ + return 0; + + /* If no token list was specified, then value is 1. */ + if (! tokens_specified) + return 1; + + { + struct tokenlist_list *tail; + + tail = hp->value; + + /* If a list of tokens was given, + then succeed if the assertion records a matching list. */ + + while (tail) { + if (compare_token_lists (tail->tokens, tokens)) + return 1; + tail = tail->next; + } + + /* Fail if the assertion has no matching list. */ + return 0; + } + } + + /* Compare two lists of tokens for equality including order of tokens. */ + + static int + compare_token_lists (l1, l2) + struct arglist *l1, *l2; + { + while (l1 && l2) { + if (l1->length != l2->length) + return 0; + if (strncmp (l1->name, l2->name, l1->length)) + return 0; + l1 = l1->next; + l2 = l2->next; + } + + /* Succeed if both lists end at the same time. */ + return l1 == l2; + } + + struct arglist * + reverse_token_list (tokens) + struct arglist *tokens; + { + register struct arglist *prev = 0, *this, *next; + for (this = tokens; this; this = next) + { + next = this->next; + this->next = prev; + prev = this; + } + return prev; + } + + /* Read a space-separated list of tokens ending in a close parenthesis. + Return a list of strings, in the order they were written. + (In case of error, return 0 and store -1 in *ERROR_FLAG.) */ + + static struct arglist * + read_token_list (pfile, error_flag) + cpp_reader *pfile; + int *error_flag; + { + struct arglist *token_ptrs = 0; + int depth = 1; + int length; + + *error_flag = 0; + FORWARD (1); /* Skip '(' */ + + /* Loop over the assertion value tokens. */ + while (depth > 0) + { + struct arglist *temp; + long name_written = CPP_WRITTEN (pfile); + int eofp = 0; int c; + + cpp_skip_hspace (pfile); + + c = GETC (); + + /* Find the end of the token. */ + if (c == '(') + { + CPP_PUTC (pfile, c); + depth++; + } + else if (c == ')') + { + depth--; + if (depth == 0) + break; + CPP_PUTC (pfile, c); + } + else if (c == '"' || c == '\'') + { + FORWARD(-1); + cpp_get_token (pfile); + } + else if (c == '\n') + break; + else + { + while (c != EOF && ! is_space[c] && c != '(' && c != ')' + && c != '"' && c != '\'') + { + CPP_PUTC (pfile, c); + c = GETC(); + } + if (c != EOF) FORWARD(-1); + } + + length = CPP_WRITTEN (pfile) - name_written; + temp = (struct arglist *) + xmalloc (sizeof (struct arglist) + length + 1); + temp->name = (U_CHAR *) (temp + 1); + bcopy ((char *) (pfile->token_buffer + name_written), + (char *) temp->name, length); + temp->name[length] = 0; + temp->next = token_ptrs; + token_ptrs = temp; + temp->length = length; + + CPP_ADJUST_WRITTEN (pfile, -length); /* pop */ + + if (c == EOF || c == '\n') + { /* FIXME */ + cpp_error (pfile, + "unterminated token sequence following `#' operator"); + return 0; + } + } + + /* We accumulated the names in reverse order. + Now reverse them to get the proper order. */ + return reverse_token_list (token_ptrs); + } + + static void + free_token_list (tokens) + struct arglist *tokens; + { + while (tokens) { + struct arglist *next = tokens->next; + free (tokens->name); + free (tokens); + tokens = next; + } + } + + /* Get the file-mode and data size of the file open on FD + and store them in *MODE_POINTER and *SIZE_POINTER. */ + + static int + file_size_and_mode (fd, mode_pointer, size_pointer) + int fd; + int *mode_pointer; + long int *size_pointer; + { + struct stat sbuf; + + if (fstat (fd, &sbuf) < 0) return (-1); + if (mode_pointer) *mode_pointer = sbuf.st_mode; + if (size_pointer) *size_pointer = sbuf.st_size; + return 0; + } + + /* Read LEN bytes at PTR from descriptor DESC, for file FILENAME, + retrying if necessary. Return a negative value if an error occurs, + otherwise return the actual number of bytes read, + which must be LEN unless end-of-file was reached. */ + + static int + safe_read (desc, ptr, len) + int desc; + char *ptr; + int len; + { + int left = len; + while (left > 0) { + int nchars = read (desc, ptr, left); + if (nchars < 0) + { + #ifdef EINTR + if (errno == EINTR) + continue; + #endif + return nchars; + } + if (nchars == 0) + break; + ptr += nchars; + left -= nchars; + } + return len - left; + } + + static char * + savestring (input) + char *input; + { + unsigned size = strlen (input); + char *output = xmalloc (size + 1); + strcpy (output, input); + return output; + } + + /* Initialize PMARK to remember the current position of PFILE. */ + void + parse_set_mark (pmark, pfile) + struct parse_marker *pmark; + cpp_reader *pfile; + { + cpp_buffer *pbuf = CPP_BUFFER (pfile); + pmark->next = pbuf->marks; + pbuf->marks = pmark; + pmark->buf = pbuf; + pmark->position = pbuf->cur - pbuf->buf; + } + + /* Cleanup PMARK - we no longer need it. */ + void + parse_clear_mark (pmark) + struct parse_marker *pmark; + { + struct parse_marker **pp = &pmark->buf->marks; + for (; ; pp = &(*pp)->next) { + if (*pp == NULL) fatal ("internal error", "in parse_set_mark"); + if (*pp == pmark) break; + } + *pp = pmark->next; + } + + /* Backup the current position of PFILE to that saved in PMARK. */ + + void + parse_goto_mark (pmark, pfile) + struct parse_marker *pmark; + cpp_reader *pfile; + { + cpp_buffer *pbuf = CPP_BUFFER (pfile); + if (pbuf != pmark->buf) + fatal ("internal error %s", "parse_goto_mark"); + pbuf->cur = pbuf->buf + pmark->position; + } + + /* Reset PMARK to point to the current position of PFILE. (Same + as parse_clear_mark (PMARK), parse_set_mark (PMARK, PFILE) but faster. */ + + void + parse_move_mark (pmark, pfile) + struct parse_marker *pmark; + cpp_reader *pfile; + { + cpp_buffer *pbuf = CPP_BUFFER (pfile); + if (pbuf != pmark->buf) + fatal ("internal error %s", "parse_move_mark"); + pmark->position = pbuf->cur - pbuf->buf; + } + + int + cpp_read_check_assertion (pfile) + cpp_reader *pfile; + { + int name_start = CPP_WRITTEN (pfile); + int name_length, name_written; + int result; + FORWARD (1); /* Skip '#' */ + cpp_skip_hspace (pfile); + parse_name (pfile, GETC ()); + name_written = CPP_WRITTEN (pfile); + name_length = name_written - name_start; + cpp_skip_hspace (pfile); + if (CPP_BUF_PEEK (CPP_BUFFER (pfile)) == '(') + { + int error_flag; + struct arglist *token_ptrs = read_token_list (pfile, &error_flag); + result = check_assertion (pfile, + pfile->token_buffer + name_start, name_length, + 1, token_ptrs); + } + else + result = check_assertion (pfile, + pfile->token_buffer + name_start, name_length, + 0, NULL_PTR); + CPP_ADJUST_WRITTEN (pfile, - name_length); /* pop */ + return result; + } + + void + cpp_print_file_and_line (pfile) + cpp_reader *pfile; + { + cpp_buffer *ip = cpp_file_buffer (pfile); + + if (ip != NULL) + { + long line, col; + cpp_buf_line_and_col (ip, &line, &col); + cpp_file_line_for_message (pfile, ip->nominal_fname, + line, pfile->show_column ? col : -1); + } + } + + void + cpp_error (pfile, msg, arg1, arg2, arg3) + cpp_reader *pfile; + char *msg; + char *arg1, *arg2, *arg3; + { + cpp_print_containing_files (pfile); + cpp_print_file_and_line (pfile); + cpp_message (pfile, 1, msg, arg1, arg2, arg3); + } + + /* Print error message but don't count it. */ + + void + cpp_warning (pfile, msg, arg1, arg2, arg3) + cpp_reader *pfile; + char *msg; + char *arg1, *arg2, *arg3; + { + if (CPP_OPTIONS (pfile)->inhibit_warnings) + return; + + if (CPP_OPTIONS (pfile)->warnings_are_errors) + pfile->errors++; + + cpp_print_containing_files (pfile); + cpp_print_file_and_line (pfile); + cpp_message (pfile, 0, msg, arg1, arg2, arg3); + } + + /* Print an error message and maybe count it. */ + + void + cpp_pedwarn (pfile, msg, arg1, arg2, arg3) + cpp_reader *pfile; + char *msg; + char *arg1, *arg2, *arg3; + { + if (CPP_OPTIONS (pfile)->pedantic_errors) + cpp_error (pfile, msg, arg1, arg2, arg3); + else + cpp_warning (pfile, msg, arg1, arg2, arg3); + } + + void + cpp_error_with_line (pfile, line, column, msg, arg1, arg2, arg3) + cpp_reader *pfile; + int line, column; + char *msg; + char *arg1, *arg2, *arg3; + { + int i; + cpp_buffer *ip = cpp_file_buffer (pfile); + + cpp_print_containing_files (pfile); + + if (ip != NULL) + cpp_file_line_for_message (pfile, ip->nominal_fname, line, column); + + cpp_message (pfile, 1, msg, arg1, arg2, arg3); + } + + static void + cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3) + cpp_reader *pfile; + int line, column; + char *msg; + char *arg1, *arg2, *arg3; + { + int i; + cpp_buffer *ip; + + if (CPP_OPTIONS (pfile)->inhibit_warnings) + return; + + if (CPP_OPTIONS (pfile)->warnings_are_errors) + pfile->errors++; + + cpp_print_containing_files (pfile); + + ip = cpp_file_buffer (pfile); + + if (ip != NULL) + cpp_file_line_for_message (pfile, ip->nominal_fname, line, column); + + cpp_message (pfile, 0, msg, arg1, arg2, arg3); + } + + void + cpp_pedwarn_with_line (pfile, line, column, msg, arg1, arg2, arg3) + cpp_reader *pfile; + int line; + char *msg; + char *arg1, *arg2, *arg3; + { + if (CPP_OPTIONS (pfile)->pedantic_errors) + cpp_error_with_line (pfile, column, line, msg, arg1, arg2, arg3); + else + cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3); + } + + /* Report a warning (or an error if pedantic_errors) + giving specified file name and line number, not current. */ + + void + cpp_pedwarn_with_file_and_line (pfile, file, line, msg, arg1, arg2, arg3) + cpp_reader *pfile; + char *file; + int line; + char *msg; + char *arg1, *arg2, *arg3; + { + if (!CPP_OPTIONS (pfile)->pedantic_errors + && CPP_OPTIONS (pfile)->inhibit_warnings) + return; + if (file != NULL) + cpp_file_line_for_message (pfile, file, line, -1); + cpp_message (pfile, CPP_OPTIONS (pfile)->pedantic_errors, + msg, arg1, arg2, arg3); + } + + /* This defines "errno" properly for VMS, and gives us EACCES. */ + #include + #ifndef errno + extern int errno; + #endif + + #ifndef VMS + #ifndef HAVE_STRERROR + extern int sys_nerr; + #if defined(bsd4_4) + extern const char *const sys_errlist[]; + #else + extern char *sys_errlist[]; + #endif + #else /* HAVE_STRERROR */ + char *strerror (); + #endif + #else /* VMS */ + char *strerror (int,...); + #endif + + /* + * my_strerror - return the descriptive text associated with an `errno' code. + */ + + char * + my_strerror (errnum) + int errnum; + { + char *result; + + #ifndef VMS + #ifndef HAVE_STRERROR + result = (char *) ((errnum < sys_nerr) ? sys_errlist[errnum] : 0); + #else + result = strerror (errnum); + #endif + #else /* VMS */ + /* VAXCRTL's strerror() takes an optional second argument, which only + matters when the first argument is EVMSERR. However, it's simplest + just to pass it unconditionally. `vaxc$errno' is declared in + , and maintained by the library in parallel with `errno'. + We assume that caller's `errnum' either matches the last setting of + `errno' by the library or else does not have the value `EVMSERR'. */ + + result = strerror (errnum, vaxc$errno); + #endif + + if (!result) + result = "undocumented I/O error"; + + return result; + } + + /* Error including a message from `errno'. */ + + void + cpp_error_from_errno (pfile, name) + cpp_reader *pfile; + char *name; + { + int i; + cpp_buffer *ip = cpp_file_buffer (pfile); + + cpp_print_containing_files (pfile); + + if (ip != NULL) + cpp_file_line_for_message (pfile, ip->nominal_fname, ip->lineno, -1); + + cpp_message (pfile, 1, "%s: %s", name, my_strerror (errno)); + } + + void + cpp_perror_with_name (pfile, name) + cpp_reader *pfile; + char *name; + { + cpp_message (pfile, 1, "%s: %s: %s", progname, name, my_strerror (errno)); + } + + /* TODO: + * No pre-compiled header file support. + * + * Possibly different enum token codes for each C/C++ token. + * + * Should clean up remaining directives to that do_XXX functions + * only take two arguments and all have command_reads_line. + * + * Find and cleanup remaining uses of static variables, + * + * Support for trigraphs. + * + * Support -dM flag (dump_all_macros). + * + * Support for_lint flag. + */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cpplib.h gcc-2.7.0/cpplib.h *** gcc-2.6.3/cpplib.h --- gcc-2.7.0/cpplib.h Thu Jun 15 07:25:11 1995 *************** *** 0 **** --- 1,651 ---- + /* Definitions for CPP library. + Copyright (C) 1995 Free Software Foundation, Inc. + Written by Per Bothner, 1994-95. + + 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + 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! */ + + #include + #include + + #ifdef __cplusplus + extern "C" { + #endif + + #define STATIC_BUFFERS + + typedef unsigned char U_CHAR; + + struct parse_file; + typedef struct cpp_reader cpp_reader; + typedef struct cpp_buffer cpp_buffer; + typedef struct cpp_options cpp_options; + typedef struct hashnode cpp_hashnode; + + enum cpp_token { + CPP_EOF = -1, + CPP_OTHER = 0, + CPP_COMMENT = 1, + CPP_HSPACE, + CPP_VSPACE, /* newlines and #line directives */ + CPP_NAME, + CPP_NUMBER, + CPP_CHAR, + CPP_STRING, + CPP_DIRECTIVE, + CPP_LPAREN, /* "(" */ + CPP_RPAREN, /* ")" */ + CPP_LBRACE, /* "{" */ + CPP_RBRACE, /* "}" */ + CPP_COMMA, /* "," */ + CPP_SEMICOLON,/* ";" */ + CPP_3DOTS, /* "..." */ + #if 0 + CPP_ANDAND, /* "&&" */ + CPP_OROR, /* "||" */ + CPP_LSH, /* "<<" */ + CPP_RSH, /* ">>" */ + CPP_EQL, /* "==" */ + CPP_NEQ, /* "!=" */ + CPP_LEQ, /* "<=" */ + CPP_GEQ, /* ">=" */ + CPP_PLPL, /* "++" */ + CPP_MINMIN, /* "--" */ + #endif + /* POP_TOKEN is returned when we've popped a cpp_buffer. */ + CPP_POP + }; + + #ifndef PARAMS + #ifdef __STDC + #define PARAMS(P) P + #else + #define PARAMS(P) () + #endif + #endif /* !PARAMS */ + + typedef enum cpp_token (*parse_underflow_t) PARAMS((cpp_reader*)); + typedef int (*parse_cleanup_t) PARAMS((cpp_buffer *, cpp_reader*)); + + /* A parse_marker indicates a previous position, + which we can backtrack to. */ + + struct parse_marker { + cpp_buffer *buf; + struct parse_marker *next; + int position; + }; + + extern void parse_set_mark PARAMS ((struct parse_marker*, cpp_reader*)); + extern void parse_clear_mark PARAMS ((struct parse_marker*)); + extern void parse_goto_mark PARAMS((struct parse_marker*, cpp_reader*)); + extern void parse_move_mark PARAMS((struct parse_marker*, cpp_reader*)); + + extern int cpp_handle_options PARAMS ((cpp_reader*, int, char**)); + extern enum cpp_token cpp_get_token PARAMS ((struct parse_marker*)); + extern void cpp_skip_hspace PARAMS((cpp_reader*)); + extern enum cpp_token cpp_get_non_space_token PARAMS ((cpp_reader *)); + + + /* Maintain and search list of included files, for #import. */ + + #define IMPORT_HASH_SIZE 31 + + struct import_file { + char *name; + ino_t inode; + dev_t dev; + struct import_file *next; + }; + + /* If we have a huge buffer, may need to cache more recent counts */ + #define CPP_LINE_BASE(BUF) ((BUF)->buf + (BUF)->line_base) + + struct cpp_buffer { + unsigned char *buf; + unsigned char *cur; + unsigned char *rlimit; /* end of valid data */ + unsigned char *alimit; /* end of allocated buffer */ + unsigned char *prev; /* start of current token */ + + char *fname; + /* Filename specified with #line command. */ + char *nominal_fname; + + /* Record where in the search path this file was found. + For #include_next. */ + struct file_name_list *dir; + + long line_base; + long lineno; /* Line number at CPP_LINE_BASE. */ + long colno; /* Column number at CPP_LINE_BASE. */ + #ifndef STATIC_BUFFERS + cpp_buffer *chain; + #endif + parse_underflow_t underflow; + parse_cleanup_t cleanup; + void *data; + struct parse_marker *marks; + /* Value of if_stack at start of this file. + Used to prohibit unmatched #endif (etc) in an include file. */ + struct if_stack *if_stack; + + /* True if this is a header file included using . */ + char system_header_p; + char seen_eof; + + /* True if buffer contains escape sequences. + Currently there are are only two kind: + "@-" means following identifier should not be macro-expanded. + "@ " means a token-separator. This turns into " " in final output + if not stringizing and needed to separate tokens; otherwise nothing. + "@@" means a normal '@'. + (An '@' inside a string stands for itself and is never an escape.) */ + char has_escapes; + }; + + struct cpp_pending; /* Forward declaration - for C++. */ + struct file_name_map_list; + + typedef struct assertion_hashnode ASSERTION_HASHNODE; + #define ASSERTION_HASHSIZE 37 + + #ifdef STATIC_BUFFERS + /* Maximum nesting of cpp_buffers. We use a static limit, partly for + efficiency, and partly to limit runaway recursion. */ + #define CPP_STACK_MAX 200 + #endif + + struct cpp_reader { + unsigned char *limit; + parse_underflow_t get_token; + cpp_buffer *buffer; + #ifdef STATIC_BUFFERS + cpp_buffer buffer_stack[CPP_STACK_MAX]; + #endif + + int errors; /* Error counter for exit code */ + void *data; + + U_CHAR *token_buffer; + int token_buffer_size; + + /* Line where a newline was first seen in a string constant. */ + int multiline_string_line; + + /* Current depth in #include directives that use <...>. */ + int system_include_depth; + + /* List of included files that contained #pragma once. */ + struct file_name_list *dont_repeat_files; + + /* List of other included files. + If ->control_macro if nonzero, the file had a #ifndef + around the entire contents, and ->control_macro gives the macro name. */ + struct file_name_list *all_include_files; + + /* Current maximum length of directory names in the search path + for include files. (Altered as we get more of them.) */ + int max_include_len; + + /* Hash table of files already included with #include or #import. */ + struct import_file *import_hash_table[IMPORT_HASH_SIZE]; + + struct if_stack *if_stack; + + /* Nonzero means we are inside an IF during a -pcp run. In this mode + macro expansion is done, and preconditions are output for all macro + uses requiring them. */ + char pcp_inside_if; + + /* Nonzero means we have printed (while error reporting) a list of + containing files that matches the current status. */ + char input_stack_listing_current; + + /* If non-zero, macros are not expanded. */ + char no_macro_expand; + + /* Print column number in error messages. */ + char show_column; + + /* We're printed a warning recommending against using #import. */ + char import_warning; + + /* If true, character between '<' and '>' are a single (string) token. */ + char parsing_include_directive; + + /* True if escape sequences (as described for has_escapes in + parse_buffer) should be emitted. */ + char output_escapes; + + /* 0: Have seen non-white-space on this line. + 1: Only seen white space so far on this line. + 2: Only seen white space so far in this file. */ + char only_seen_white; + + /* Nonzero means this file was included with a -imacros or -include + command line and should not be recorded as an include file. */ + + int no_record_file; + + long lineno; + + struct tm *timebuf; + + ASSERTION_HASHNODE *assertion_hashtab[ASSERTION_HASHSIZE]; + + /* Buffer of -M output. */ + char *deps_buffer; + + /* Number of bytes allocated in above. */ + int deps_allocated_size; + + /* Number of bytes used. */ + int deps_size; + + /* Number of bytes since the last newline. */ + int deps_column; + }; + + #define CPP_BUF_PEEK(BUFFER) \ + ((BUFFER)->cur < (BUFFER)->rlimit ? *(BUFFER)->cur : EOF) + #define CPP_BUF_GET(BUFFER) \ + ((BUFFER)->cur < (BUFFER)->rlimit ? *(BUFFER)->cur++ : EOF) + #define CPP_FORWARD(BUFFER, N) ((BUFFER)->cur += (N)) + + /* Number of characters currently in PFILE's output buffer. */ + #define CPP_WRITTEN(PFILE) ((PFILE)->limit - (PFILE)->token_buffer) + #define CPP_PWRITTEN(PFILE) ((PFILE)->limit) + + /* Make sure PFILE->token_buffer has space for at least N more characters. */ + #define CPP_RESERVE(PFILE, N) \ + (CPP_WRITTEN (PFILE) + N > (PFILE)->token_buffer_size \ + && (cpp_grow_buffer (PFILE, N), 0)) + + /* Append string STR (of length N) to PFILE's output buffer. + Assume there is enough space. */ + #define CPP_PUTS_Q(PFILE, STR, N) \ + (bcopy (STR, (PFILE)->limit, (N)), (PFILE)->limit += (N)) + /* Append string STR (of length N) to PFILE's output buffer. Make space. */ + #define CPP_PUTS(PFILE, STR, N) CPP_RESERVE(PFILE, N), CPP_PUTS_Q(PFILE, STR,N) + /* Append character CH to PFILE's output buffer. Assume sufficient space. */ + #define CPP_PUTC_Q(PFILE, CH) (*(PFILE)->limit++ = (CH)) + /* Append character CH to PFILE's output buffer. Make space if need be. */ + #define CPP_PUTC(PFILE, CH) (CPP_RESERVE (PFILE, 1), CPP_PUTC_Q (PFILE, CH)) + /* Make sure PFILE->limit is followed by '\0'. */ + #define CPP_NUL_TERMINATE_Q(PFILE) (*(PFILE)->limit = 0) + #define CPP_NUL_TERMINATE(PFILE) (CPP_RESERVE(PFILE, 1), *(PFILE)->limit = 0) + #define CPP_ADJUST_WRITTEN(PFILE,DELTA) ((PFILE)->limit += (DELTA)) + #define CPP_SET_WRITTEN(PFILE,N) ((PFILE)->limit = (PFILE)->token_buffer + (N)) + + #define CPP_OPTIONS(PFILE) ((cpp_options*)(PFILE)->data) + #define CPP_BUFFER(PFILE) ((PFILE)->buffer) + #ifdef STATIC_BUFFERS + #define CPP_PREV_BUFFER(BUFFER) ((BUFFER)+1) + #define CPP_NULL_BUFFER(PFILE) (&(PFILE)->buffer_stack[CPP_STACK_MAX]) + #else + #define CPP_PREV_BUFFER(BUFFER) ((BUFFER)->chain) + #define CPP_NULL_BUFFER(PFILE) ((cpp_buffer*)0) + #endif + + /* Pointed to by parse_file::data. */ + struct cpp_options { + char *in_fname; + + /* Name of output file, for error messages. */ + char *out_fname; + + struct file_name_map_list *map_list; + + /* Non-0 means -v, so print the full set of include dirs. */ + char verbose; + + /* Nonzero means use extra default include directories for C++. */ + + char cplusplus; + + /* Nonzero means handle cplusplus style comments */ + + char cplusplus_comments; + + /* Nonzero means handle #import, for objective C. */ + + char objc; + + /* Nonzero means this is an assembly file, and allow + unknown directives, which could be comments. */ + + int lang_asm; + + /* Nonzero means turn NOTREACHED into #pragma NOTREACHED etc */ + + char for_lint; + + /* Nonzero means handle CHILL comment syntax + and output CHILL string delimiter for __DATE___ etc. */ + + char chill; + + /* Nonzero means copy comments into the output file. */ + + char put_out_comments; + + /* Nonzero means don't process the ANSI trigraph sequences. */ + + char no_trigraphs; + + /* Nonzero means print the names of included files rather than + the preprocessed output. 1 means just the #include "...", + 2 means #include <...> as well. */ + + char print_deps; + + /* Nonzero if missing .h files in -M output are assumed to be generated + files and not errors. */ + + char print_deps_missing_files; + + /* If true, fopen (deps_file, "a") else fopen (deps_file, "w"). */ + char print_deps_append; + + /* Nonzero means print names of header files (-H). */ + + char print_include_names; + + /* Nonzero means try to make failure to fit ANSI C an error. */ + + char pedantic_errors; + + /* Nonzero means don't print warning messages. -w. */ + + char inhibit_warnings; + + /* Nonzero means warn if slash-star appears in a comment. */ + + char warn_comments; + + /* Nonzero means warn if there are any trigraphs. */ + + char warn_trigraphs; + + /* Nonzero means warn if #import is used. */ + + char warn_import; + + /* Nonzero means warn if a macro argument is (or would be) + stringified with -traditional. */ + + char warn_stringify; + + /* Nonzero means turn warnings into errors. */ + + char warnings_are_errors; + + /* Nonzero causes output not to be done, + but directives such as #define that have side effects + are still obeyed. */ + + char no_output; + + /* Nonzero means don't output line number information. */ + + char no_line_commands; + + /* Nonzero means output the text in failing conditionals, + inside #failed ... #endfailed. */ + + char output_conditionals; + + /* Nonzero means -I- has been seen, + so don't look for #include "foo" the source-file directory. */ + char ignore_srcdir; + + /* Zero means dollar signs are punctuation. + -$ stores 0; -traditional may store 1. Default is 1 for VMS, 0 otherwise. + This must be 0 for correct processing of this ANSI C program: + #define foo(a) #a + #define lose(b) foo (b) + #define test$ + lose (test) */ + char dollars_in_ident; + #ifndef DOLLARS_IN_IDENTIFIERS + #define DOLLARS_IN_IDENTIFIERS 1 + #endif + + /* Nonzero means try to imitate old fashioned non-ANSI preprocessor. */ + char traditional; + + /* Nonzero means give all the error messages the ANSI standard requires. */ + char pedantic; + + char done_initializing; + + struct file_name_list *include; /* First dir to search */ + /* First dir to search for */ + /* This is the first element to use for #include <...>. + If it is 0, use the entire chain for such includes. */ + struct file_name_list *first_bracket_include; + /* This is the first element in the chain that corresponds to + a directory of system header files. */ + struct file_name_list *first_system_include; + struct file_name_list *last_include; /* Last in chain */ + + /* Chain of include directories to put at the end of the other chain. */ + struct file_name_list *after_include; + struct file_name_list *last_after_include; /* Last in chain */ + + /* Chain to put at the start of the system include files. */ + struct file_name_list *before_system; + struct file_name_list *last_before_system; /* Last in chain */ + + /* Directory prefix that should replace `/usr' in the standard + include file directories. */ + char *include_prefix; + + char inhibit_predefs; + char no_standard_includes; + char no_standard_cplusplus_includes; + + /* dump_only means inhibit output of the preprocessed text + and instead output the definitions of all user-defined + macros in a form suitable for use as input to cccp. + dump_names means pass #define and the macro name through to output. + dump_definitions means pass the whole definition (plus #define) through + */ + + enum {dump_none = 0, dump_only, dump_names, dump_definitions} + dump_macros; + + /* Nonzero means pass all #define and #undef directives which we actually + process through to the output stream. This feature is used primarily + to allow cc1 to record the #defines and #undefs for the sake of + debuggers which understand about preprocessor macros, but it may + also be useful with -E to figure out how symbols are defined, and + where they are defined. */ + int debug_output; + + /* Pending -D, -U and -A options, in reverse order. */ + struct cpp_pending *pending; + + /* File name which deps are being written to. + This is 0 if deps are being written to stdout. */ + char *deps_file; + + /* Target-name to write with the dependency information. */ + char *deps_target; + }; + + #define CPP_TRADITIONAL(PFILE) (CPP_OPTIONS(PFILE)-> traditional) + #define CPP_PEDANTIC(PFILE) (CPP_OPTIONS (PFILE)->pedantic) + #define CPP_PRINT_DEPS(PFILE) (CPP_OPTIONS (PFILE)->print_deps) + + /* Name under which this program was invoked. */ + + extern char *progname; + + /* The structure of a node in the hash table. The hash table + has entries for all tokens defined by #define commands (type T_MACRO), + plus some special tokens like __LINE__ (these each have their own + type, and the appropriate code is run when that type of node is seen. + It does not contain control words like "#define", which are recognized + by a separate piece of code. */ + + /* different flavors of hash nodes --- also used in keyword table */ + enum node_type { + T_DEFINE = 1, /* the `#define' keyword */ + T_INCLUDE, /* the `#include' keyword */ + T_INCLUDE_NEXT, /* the `#include_next' keyword */ + T_IMPORT, /* the `#import' keyword */ + T_IFDEF, /* the `#ifdef' keyword */ + T_IFNDEF, /* the `#ifndef' keyword */ + T_IF, /* the `#if' keyword */ + T_ELSE, /* `#else' */ + T_PRAGMA, /* `#pragma' */ + T_ELIF, /* `#elif' */ + T_UNDEF, /* `#undef' */ + T_LINE, /* `#line' */ + T_ERROR, /* `#error' */ + T_WARNING, /* `#warning' */ + T_ENDIF, /* `#endif' */ + T_SCCS, /* `#sccs', used on system V. */ + T_IDENT, /* `#ident', used on system V. */ + T_ASSERT, /* `#assert', taken from system V. */ + T_UNASSERT, /* `#unassert', taken from system V. */ + T_SPECLINE, /* special symbol `__LINE__' */ + T_DATE, /* `__DATE__' */ + T_FILE, /* `__FILE__' */ + T_BASE_FILE, /* `__BASE_FILE__' */ + T_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */ + T_VERSION, /* `__VERSION__' */ + T_SIZE_TYPE, /* `__SIZE_TYPE__' */ + T_PTRDIFF_TYPE, /* `__PTRDIFF_TYPE__' */ + T_WCHAR_TYPE, /* `__WCHAR_TYPE__' */ + T_USER_LABEL_PREFIX_TYPE, /* `__USER_LABEL_PREFIX__' */ + T_REGISTER_PREFIX_TYPE, /* `__REGISTER_PREFIX__' */ + T_TIME, /* `__TIME__' */ + T_CONST, /* Constant value, used by `__STDC__' */ + T_MACRO, /* macro defined by `#define' */ + T_DISABLED, /* macro temporarily turned off for rescan */ + T_SPEC_DEFINED, /* special `defined' macro for use in #if statements */ + T_PCSTRING, /* precompiled string (hashval is KEYDEF *) */ + T_UNUSED /* Used for something not defined. */ + }; + + /* Structure returned by create_definition */ + typedef struct macrodef MACRODEF; + struct macrodef + { + struct definition *defn; + U_CHAR *symnam; + int symlen; + }; + + /* Structure allocated for every #define. For a simple replacement + such as + #define foo bar , + nargs = -1, the `pattern' list is null, and the expansion is just + the replacement text. Nargs = 0 means a functionlike macro with no args, + e.g., + #define getchar() getc (stdin) . + When there are args, the expansion is the replacement text with the + args squashed out, and the reflist is a list describing how to + build the output from the input: e.g., "3 chars, then the 1st arg, + then 9 chars, then the 3rd arg, then 0 chars, then the 2nd arg". + The chars here come from the expansion. Whatever is left of the + expansion after the last arg-occurrence is copied after that arg. + Note that the reflist can be arbitrarily long--- + its length depends on the number of times the arguments appear in + the replacement text, not how many args there are. Example: + #define f(x) x+x+x+x+x+x+x would have replacement text "++++++" and + pattern list + { (0, 1), (1, 1), (1, 1), ..., (1, 1), NULL } + where (x, y) means (nchars, argno). */ + + typedef struct definition DEFINITION; + struct definition { + int nargs; + int length; /* length of expansion string */ + int predefined; /* True if the macro was builtin or */ + /* came from the command line */ + U_CHAR *expansion; + int line; /* Line number of definition */ + char *file; /* File of definition */ + char rest_args; /* Nonzero if last arg. absorbs the rest */ + struct reflist { + struct reflist *next; + char stringify; /* nonzero if this arg was preceded by a + # operator. */ + char raw_before; /* Nonzero if a ## operator before arg. */ + char raw_after; /* Nonzero if a ## operator after arg. */ + char rest_args; /* Nonzero if this arg. absorbs the rest */ + int nchars; /* Number of literal chars to copy before + this arg occurrence. */ + int argno; /* Number of arg to substitute (origin-0) */ + } *pattern; + union { + /* Names of macro args, concatenated in reverse order + with comma-space between them. + The only use of this is that we warn on redefinition + if this differs between the old and new definitions. */ + U_CHAR *argnames; + } args; + }; + + extern U_CHAR is_idchar[256]; + + /* Stack of conditionals currently in progress + (including both successful and failing conditionals). */ + + struct if_stack { + struct if_stack *next; /* for chaining to the next stack frame */ + char *fname; /* copied from input when frame is made */ + int lineno; /* similarly */ + int if_succeeded; /* true if a leg of this if-group + has been passed through rescan */ + U_CHAR *control_macro; /* For #ifndef at start of file, + this is the macro name tested. */ + enum node_type type; /* type of last directive seen in this group */ + }; + typedef struct if_stack IF_STACK_FRAME; + + extern void cpp_buf_line_and_col PARAMS((cpp_buffer*, long*, long*)); + extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader*)); + extern void cpp_define PARAMS ((cpp_reader*, U_CHAR*)); + + extern void cpp_error (); + extern void cpp_warning (); + extern void cpp_pedwarn (); + extern void cpp_error_with_line (); + extern void cpp_pedwarn_with_line (); + extern void cpp_pedwarn_with_file_and_line (); + extern void fatal (); + extern void cpp_error_from_errno (); + extern void cpp_perror_with_name (); + extern void cpp_pfatal_with_name (); + + extern void cpp_grow_buffer PARAMS ((cpp_reader*, long)); + extern int cpp_parse_escape PARAMS ((cpp_reader*, char**)); + extern cpp_buffer* cpp_push_buffer PARAMS ((cpp_reader *, U_CHAR*, long)); + extern cpp_buffer* cpp_pop_buffer PARAMS ((cpp_reader *)); + + extern cpp_hashnode* cpp_lookup PARAMS ((cpp_reader*, const U_CHAR*, + int, int)); + + #ifdef __cplusplus + } + #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cppmain.c gcc-2.7.0/cppmain.c *** gcc-2.6.3/cppmain.c --- gcc-2.7.0/cppmain.c Thu Jun 15 07:25:35 1995 *************** *** 0 **** --- 1,98 ---- + /* CPP main program, using CPP Library. + Copyright (C) 1995 Free Software Foundation, Inc. + Written by Per Bothner, 1994-95. + + 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + 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! */ + + #include "cpplib.h" + #include + + #ifndef EMACS + #include "config.h" + #endif /* not EMACS */ + + extern char *getenv (); + + cpp_reader parse_in; + cpp_options options; + + /* More 'friendly' abort that prints the line and file. + config.h can #define abort fancy_abort if you like that sort of thing. */ + + void + fancy_abort () + { + fatal ("Internal gcc abort."); + } + + + int + main (argc, argv) + int argc; + char **argv; + { + char *p; + int i; + int argi = 1; /* Next argument to handle. */ + struct cpp_options *opts = &options; + + p = argv[0] + strlen (argv[0]); + while (p != argv[0] && p[-1] != '/') --p; + progname = p; + + init_parse_file (&parse_in); + parse_in.data = opts; + + init_parse_options (opts); + + argi += cpp_handle_options (&parse_in, argc - argi , argv + argi); + if (argi < argc) + fatal ("Invalid option `%s'", argv[argi]); + parse_in.show_column = 1; + + i = push_parse_file (&parse_in, opts->in_fname); + if (i != SUCCESS_EXIT_CODE) + return i; + + /* Now that we know the input file is valid, open the output. */ + + if (!opts->out_fname || !strcmp (opts->out_fname, "")) + opts->out_fname = "stdout"; + else if (! freopen (opts->out_fname, "w", stdout)) + cpp_pfatal_with_name (&parse_in, opts->out_fname); + + for (;;) + { + enum cpp_token kind; + if (! opts->no_output) + { + fwrite (parse_in.token_buffer, 1, CPP_WRITTEN (&parse_in), stdout); + } + parse_in.limit = parse_in.token_buffer; + kind = cpp_get_token (&parse_in); + if (kind == CPP_EOF) + break; + } + + cpp_finish (&parse_in); + + if (parse_in.errors) + exit (FATAL_EXIT_CODE); + exit (SUCCESS_EXIT_CODE); + } Only in gcc-2.6.3: cross-test.c diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/crtstuff.c gcc-2.7.0/crtstuff.c *** gcc-2.6.3/crtstuff.c Wed Mar 23 16:32:05 1994 --- gcc-2.7.0/crtstuff.c Thu Jun 15 07:25:52 1995 *************** *** 4,8 **** Written by Ron Guilmette (rfg@netcom.com) with help from Richard Stallman. ! Copyright (C) 1991 Free Software Foundation, Inc. This file is part of GNU CC. --- 4,8 ---- Written by Ron Guilmette (rfg@netcom.com) with help from Richard Stallman. ! Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 20,24 **** 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. */ /* As a special exception, if you link this library with files --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files *************** *** 55,65 **** #include "tm.h" #ifndef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"a\",@progbits" #endif #ifndef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"a\",@progbits" #endif #include "gbl-ctors.h" --- 56,90 ---- #include "tm.h" + /* Provide default definitions for the pseudo-ops used to switch to the + .ctors and .dtors sections. + + Note that we want to give these sections the SHF_WRITE attribute + because these sections will actually contain data (i.e. tables of + addresses of functions in the current root executable or shared library + file) and, in the case of a shared library, the relocatable addresses + will have to be properly resolved/relocated (and then written into) by + the dynamic linker when it actually attaches the given shared library + to the executing process. (Note that on SVR4, you may wish to use the + `-z text' option to the ELF linker, when building a shared library, as + an additional check that you are doing everything right. But if you do + use the `-z text' option when building a shared library, you will get + errors unless the .ctors and .dtors sections are marked as writable + via the SHF_WRITE attribute.) */ + #ifndef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\"" #endif #ifndef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\"" #endif + #ifdef OBJECT_FORMAT_ELF + + /* Declare a pointer to void function type. */ + typedef void (*func_ptr) (void); + #define STATIC static + + #else /* OBJECT_FORMAT_ELF */ + #include "gbl-ctors.h" *************** *** 67,70 **** --- 92,98 ---- #define ON_EXIT(a, b) #endif + #define STATIC + + #endif /* OBJECT_FORMAT_ELF */ #ifdef CRT_BEGIN *************** *** 72,75 **** --- 100,142 ---- #ifdef INIT_SECTION_ASM_OP + #ifdef OBJECT_FORMAT_ELF + + /* Run all the global destructors on exit from the program. */ + + /* Some systems place the number of pointers in the first word of the + table. On SVR4 however, that word is -1. In all cases, the table is + null-terminated. On SVR4, we start from the beginning of the list and + invoke each per-compilation-unit destructor routine in order + until we find that null. + + Note that this function MUST be static. There will be one of these + functions in each root executable and one in each shared library, but + although they all have the same code, each one is unique in that it + refers to one particular associated `__DTOR_LIST__' which belongs to the + same particular root executable or shared library file. */ + + static func_ptr __DTOR_LIST__[]; + static void + __do_global_dtors_aux () + { + func_ptr *p; + for (p = __DTOR_LIST__ + 1; *p; p++) + (*p) (); + } + + /* Stick a call to __do_global_dtors_aux into the .fini section. */ + static void + fini_dummy () + { + asm (FINI_SECTION_ASM_OP); + __do_global_dtors_aux (); + #ifdef FORCE_FINI_SECTION_ALIGN + FORCE_FINI_SECTION_ALIGN; + #endif + asm (TEXT_SECTION_ASM_OP); + } + + #else /* OBJECT_FORMAT_ELF */ + /* The function __do_global_ctors_aux is compiled twice (once in crtbegin.o and once in crtend.o). It must be declared static to avoid a link *************** *** 93,102 **** asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! /* On some svr4 systems, the .init section preamble code provided in ! crti.o may do some evil things which we have to undo before we reach ! the function prologue code for __do_global_ctors (directly below). ! For such systems, define the macro INIT_SECTION_PREAMBLE to ! expand into the code needed to undo the actions of the crti.o file. */ ! #ifdef INIT_SECTION_PREAMBLE INIT_SECTION_PREAMBLE; --- 160,169 ---- asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! /* On some svr4 systems, the initial .init section preamble code provided in ! crti.o may do something, such as bump the stack, which we have to ! undo before we reach the function prologue code for __do_global_ctors ! (directly below). For such systems, define the macro INIT_SECTION_PREAMBLE ! to expand into the code needed to undo the actions of the crti.o file. */ ! #ifdef INIT_SECTION_PREAMBLE INIT_SECTION_PREAMBLE; *************** *** 119,122 **** --- 186,190 ---- } + #endif /* OBJECT_FORMAT_ELF */ #endif /* defined(INIT_SECTION_ASM_OP) */ *************** *** 124,127 **** --- 192,207 ---- static func_ptr force_to_data[0] = { }; + /* NOTE: In order to be able to support SVR4 shared libraries, we arrange + to have one set of symbols { __CTOR_LIST__, __DTOR_LIST__, __CTOR_END__, + __DTOR_END__ } per root executable and also one set of these symbols + per shared library. So in any given whole process image, we may have + multiple definitions of each of these symbols. In order to prevent + these definitions from conflicting with one another, and in order to + ensure that the proper lists are used for the initialization/finalization + of each individual shared library (respectively), we give these symbols + only internal (i.e. `static') linkage, and we also make it a point to + refer to only the __CTOR_END__ symbol in crtend.o and the __DTOR_LIST__ + symbol in crtbegin.o, where they are defined. */ + /* The -1 is a flag to __do_global_[cd]tors indicating that this table does not start with a count of elements. */ *************** *** 130,134 **** #else asm (CTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }; #endif --- 210,214 ---- #else asm (CTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }; #endif *************** *** 137,141 **** #else asm (DTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }; #endif --- 217,221 ---- #else asm (DTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }; #endif *************** *** 146,160 **** #ifdef INIT_SECTION_ASM_OP ! /* A routine to invoke all of the global constructors upon entry to the ! program. We put this into the .init section (for systems that have ! such a thing) so that we can properly perform the construction of ! file-scope static-storage C++ objects within shared libraries. ! This must be virtually identical to the one above so that we can ! insure that the function prologue from the one above works correctly ! with the epilogue from this one. (They will both go into the .init ! section as the first and last things (respectively) that the linker ! will put in that section.) ! */ static void --- 226,289 ---- #ifdef INIT_SECTION_ASM_OP ! #ifdef OBJECT_FORMAT_ELF ! ! static func_ptr __CTOR_END__[]; ! static void ! __do_global_ctors_aux () ! { ! func_ptr *p; ! for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--) ! (*p) (); ! } ! ! /* Stick a call to __do_global_ctors_aux into the .init section. */ ! static void ! init_dummy () ! { ! asm (INIT_SECTION_ASM_OP); ! __do_global_ctors_aux (); ! #ifdef FORCE_INIT_SECTION_ALIGN ! FORCE_INIT_SECTION_ALIGN; ! #endif ! asm (TEXT_SECTION_ASM_OP); ! ! /* This is a kludge. The Linux dynamic linker needs ___brk_addr, __environ ! and atexit (). We have to make sure they are in the .dynsym section. We ! accomplish it by making a dummy call here. This ! code is never reached. */ ! ! #if defined(__linux__) && defined(__PIC__) ! { ! extern void *___brk_addr; ! extern char **__environ; ! ! ___brk_addr = __environ; ! atexit (); ! } ! #endif ! } ! ! #else /* OBJECT_FORMAT_ELF */ ! /* Stick the real initialization code, followed by a normal sort of ! function epilogue at the very end of the .init section for this ! entire root executable file or for this entire shared library file. ! ! Note that we use some tricks here to get *just* the body and just ! a function epilogue (but no function prologue) into the .init ! section of the crtend.o file. Specifically, we switch to the .text ! section, start to define a function, and then we switch to the .init ! section just before the body code. ! ! Earlier on, we put the corresponding function prologue into the .init ! section of the crtbegin.o file (which will be linked in first). ! ! Note that we want to invoke all constructors for C++ file-scope static- ! storage objects AFTER any other possible initialization actions which ! may be performed by the code in the .init section contributions made by ! other libraries, etc. That's because those other initializations may ! include setup operations for very primitive things (e.g. initializing ! the state of the floating-point coprocessor, etc.) which should be done ! before we start to execute any of the user's code. */ static void *************** *** 166,169 **** --- 295,300 ---- } /* epilogue and body go in .init section */ + #endif /* OBJECT_FORMAT_ELF */ + #endif /* defined(INIT_SECTION_ASM_OP) */ *************** *** 171,179 **** static func_ptr force_to_data[0] = { }; #ifdef CTOR_LIST_END CTOR_LIST_END; #else asm (CTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! func_ptr __CTOR_END__[1] = { (func_ptr) 0 }; #endif --- 302,316 ---- static func_ptr force_to_data[0] = { }; + /* Put a word containing zero at the end of each of our two lists of function + addresses. Note that the words defined here go into the .ctors and .dtors + sections of the crtend.o file, and since that file is always linked in + last, these words naturally end up at the very ends of the two lists + contained in these two sections. */ + #ifdef CTOR_LIST_END CTOR_LIST_END; #else asm (CTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! STATIC func_ptr __CTOR_END__[1] = { (func_ptr) 0 }; #endif *************** *** 182,186 **** #else asm (DTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! func_ptr __DTOR_END__[1] = { (func_ptr) 0 }; #endif --- 319,323 ---- #else asm (DTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ! STATIC func_ptr __DTOR_END__[1] = { (func_ptr) 0 }; #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/cse.c gcc-2.7.0/cse.c *** gcc-2.6.3/cse.c Tue Nov 1 18:38:40 1994 --- gcc-2.7.0/cse.c Thu Jun 15 07:26:31 1995 *************** *** 1,4 **** /* Common subexpression elimination for GNU compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Common subexpression elimination for GNU compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 2959,2963 **** } #endif /* REAL_ARITHMETIC */ ! return CONST_DOUBLE_FROM_REAL_VALUE (d, mode); } --- 2960,2964 ---- } #endif /* REAL_ARITHMETIC */ ! d = real_value_truncate (mode, d); return CONST_DOUBLE_FROM_REAL_VALUE (d, mode); } *************** *** 2973,2977 **** lv = CONST_DOUBLE_LOW (op), hv = CONST_DOUBLE_HIGH (op); ! if (GET_MODE_BITSIZE (op_mode) >= HOST_BITS_PER_WIDE_INT * 2) ; else --- 2974,2985 ---- lv = CONST_DOUBLE_LOW (op), hv = CONST_DOUBLE_HIGH (op); ! if (op_mode == VOIDmode) ! { ! /* We don't know how to interpret negative-looking numbers in ! this case, so don't try to fold those. */ ! if (hv < 0) ! return 0; ! } ! else if (GET_MODE_BITSIZE (op_mode) >= HOST_BITS_PER_WIDE_INT * 2) ; else *************** *** 2987,2991 **** d += (double) (unsigned HOST_WIDE_INT) lv; #endif /* REAL_ARITHMETIC */ ! return CONST_DOUBLE_FROM_REAL_VALUE (d, mode); } --- 2995,2999 ---- d += (double) (unsigned HOST_WIDE_INT) lv; #endif /* REAL_ARITHMETIC */ ! d = real_value_truncate (mode, d); return CONST_DOUBLE_FROM_REAL_VALUE (d, mode); } *************** *** 3079,3083 **** && ((val & ((HOST_WIDE_INT) (-1) << (width - 1))) != ((HOST_WIDE_INT) (-1) << (width - 1)))) ! val &= (1 << width) - 1; return GEN_INT (val); --- 3087,3091 ---- && ((val & ((HOST_WIDE_INT) (-1) << (width - 1))) != ((HOST_WIDE_INT) (-1) << (width - 1)))) ! val &= ((HOST_WIDE_INT) 1 << width) - 1; return GEN_INT (val); *************** *** 3260,3263 **** --- 3268,3284 ---- val &= ((HOST_WIDE_INT) 1 << width) - 1; + /* If this would be an entire word for the target, but is not for + the host, then sign-extend on the host so that the number will look + the same way on the host that it would on the target. + + For example, when building a 64 bit alpha hosted 32 bit sparc + targeted compiler, then we want the 32 bit unsigned value -1 to be + represented as a 64 bit value -1, and not as 0x00000000ffffffff. + The later confuses the sparc backend. */ + + if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT && BITS_PER_WORD == width + && (val & ((HOST_WIDE_INT) 1 << (width - 1)))) + val |= ((HOST_WIDE_INT) (-1) << width); + return GEN_INT (val); } *************** *** 3289,3293 **** --- 3310,3330 ---- && GET_CODE (XEXP (XEXP (op, 0), 1)) == LABEL_REF) return XEXP (op, 0); + + #ifdef POINTERS_EXTEND_UNSIGNED + if (! POINTERS_EXTEND_UNSIGNED + && mode == Pmode && GET_MODE (op) == ptr_mode + && CONSTANT_P (op)) + return convert_memory_address (Pmode, op); + #endif + break; + + #ifdef POINTERS_EXTEND_UNSIGNED + case ZERO_EXTEND: + if (POINTERS_EXTEND_UNSIGNED + && mode == Pmode && GET_MODE (op) == ptr_mode + && CONSTANT_P (op)) + return convert_memory_address (Pmode, op); break; + #endif } *************** *** 3719,3722 **** --- 3756,3768 ---- if (GET_CODE (op1) == CONST_INT && GET_MODE (op0) != VOIDmode) return plus_constant (op0, - INTVAL (op1)); + + /* (x - (x & y)) -> (x & ~y) */ + if (GET_CODE (op1) == AND) + { + if (rtx_equal_p (op0, XEXP (op1, 0))) + return cse_gen_binary (AND, mode, op0, gen_rtx (NOT, mode, XEXP (op1, 1))); + if (rtx_equal_p (op0, XEXP (op1, 1))) + return cse_gen_binary (AND, mode, op0, gen_rtx (NOT, mode, XEXP (op1, 0))); + } break; *************** *** 4111,4114 **** --- 4157,4173 ---- val &= ((HOST_WIDE_INT) 1 << width) - 1; + /* If this would be an entire word for the target, but is not for + the host, then sign-extend on the host so that the number will look + the same way on the host that it would on the target. + + For example, when building a 64 bit alpha hosted 32 bit sparc + targeted compiler, then we want the 32 bit unsigned value -1 to be + represented as a 64 bit value -1, and not as 0x00000000ffffffff. + The later confuses the sparc backend. */ + + if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT && BITS_PER_WORD == width + && (val & ((HOST_WIDE_INT) 1 << (width - 1)))) + val |= ((HOST_WIDE_INT) (-1) << width); + return GEN_INT (val); } *************** *** 4363,4372 **** prevent infinite recursion here and speed things up. ! If CODE is an unsigned comparison, we can only do this if A - B is a ! constant integer, and then we have to compare that integer with zero as a ! signed comparison. Note that this will give the incorrect result from ! comparisons that overflow. Since these are undefined, this is probably ! OK. If it causes a problem, we can check for A or B being an address ! (fp + const or SYMBOL_REF) and only do it in that case. */ if (INTEGRAL_MODE_P (mode) && op1 != const0_rtx --- 4422,4429 ---- prevent infinite recursion here and speed things up. ! If CODE is an unsigned comparison, then we can never do this optimization, ! because it gives an incorrect result if the subtraction wraps around zero. ! ANSI C defines unsigned operations such that they never overflow, and ! thus such cases can not be ignored. */ if (INTEGRAL_MODE_P (mode) && op1 != const0_rtx *************** *** 4374,4380 **** && (GET_CODE (op1) == REG || GET_CODE (op1) == CONST_INT)) && 0 != (tem = simplify_binary_operation (MINUS, mode, op0, op1)) ! && (GET_CODE (tem) == CONST_INT ! || (code != GTU && code != GEU && ! code != LTU && code != LEU))) return simplify_relational_operation (signed_condition (code), mode, tem, const0_rtx); --- 4431,4435 ---- && (GET_CODE (op1) == REG || GET_CODE (op1) == CONST_INT)) && 0 != (tem = simplify_binary_operation (MINUS, mode, op0, op1)) ! && code != GTU && code != GEU && code != LTU && code != LEU) return simplify_relational_operation (signed_condition (code), mode, tem, const0_rtx); *************** *** 4582,4590 **** HOST_WIDE_INT val = INTVAL (op0); ! #if BITS_BIG_ENDIAN ! val >>= (GET_MODE_BITSIZE (op0_mode) - INTVAL (op2) - INTVAL (op1)); ! #else ! val >>= INTVAL (op2); ! #endif if (HOST_BITS_PER_WIDE_INT != INTVAL (op1)) { --- 4637,4646 ---- HOST_WIDE_INT val = INTVAL (op0); ! if (BITS_BIG_ENDIAN) ! val >>= (GET_MODE_BITSIZE (op0_mode) ! - INTVAL (op2) - INTVAL (op1)); ! else ! val >>= INTVAL (op2); ! if (HOST_BITS_PER_WIDE_INT != INTVAL (op1)) { *************** *** 4945,4949 **** return constant; ! /* If this actually isn't a constant (wierd!), we can't do anything. Otherwise, handle the two most common cases: extracting a word from a multi-word constant, and extracting --- 5001,5005 ---- return constant; ! /* If this actually isn't a constant (weird!), we can't do anything. Otherwise, handle the two most common cases: extracting a word from a multi-word constant, and extracting *************** *** 5626,5639 **** rtx new; ! #if WORDS_BIG_ENDIAN ! offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) ! - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); ! #endif ! #if BYTES_BIG_ENDIAN ! /* Adjust the address so that the address-after-the-data ! is unchanged. */ ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))); ! #endif new = gen_rtx (MEM, mode, plus_constant (XEXP (x, 0), offset)); if (! memory_address_p (mode, XEXP (new, 0))) --- 5682,5693 ---- rtx new; ! if (WORDS_BIG_ENDIAN) ! offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) ! - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); ! if (BYTES_BIG_ENDIAN) ! /* Adjust the address so that the address-after-the-data is ! unchanged. */ ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))); new = gen_rtx (MEM, mode, plus_constant (XEXP (x, 0), offset)); if (! memory_address_p (mode, XEXP (new, 0))) *************** *** 6140,6144 **** is a STRICT_LOW_PART. The latter condition is necessary because SRC_EQV is handled specially for this case, and if it isn't set, then there will ! be no equivalence for the destinatation. */ if (n_sets == 1 && REG_NOTES (insn) != 0 && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0 --- 6194,6198 ---- is a STRICT_LOW_PART. The latter condition is necessary because SRC_EQV is handled specially for this case, and if it isn't set, then there will ! be no equivalence for the destination. */ if (n_sets == 1 && REG_NOTES (insn) != 0 && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0 *************** *** 6254,6258 **** /* If this is a STRICT_LOW_PART assignment, src_eqv corresponds to the value of the INNER register, not the destination. So it is not ! a legal substitution for the source. But save it for later. */ if (GET_CODE (dest) == STRICT_LOW_PART) src_eqv_here = 0; --- 6308,6312 ---- /* If this is a STRICT_LOW_PART assignment, src_eqv corresponds to the value of the INNER register, not the destination. So it is not ! a valid substitution for the source. But save it for later. */ if (GET_CODE (dest) == STRICT_LOW_PART) src_eqv_here = 0; *************** *** 6955,6959 **** if (NEXT_INSN (insn) == 0 || GET_CODE (NEXT_INSN (insn)) != BARRIER) ! emit_barrier_after (insn); /* We might have two BARRIERs separated by notes. Delete the second --- 7009,7013 ---- if (NEXT_INSN (insn) == 0 || GET_CODE (NEXT_INSN (insn)) != BARRIER) ! emit_barrier_before (NEXT_INSN (insn)); /* We might have two BARRIERs separated by notes. Delete the second *************** *** 7221,7225 **** elt = insert (dest, sets[i].src_elt, sets[i].dest_hash, GET_MODE (dest)); ! elt->in_memory = GET_CODE (sets[i].inner_dest) == MEM; if (elt->in_memory) { --- 7275,7281 ---- elt = insert (dest, sets[i].src_elt, sets[i].dest_hash, GET_MODE (dest)); ! elt->in_memory = (GET_CODE (sets[i].inner_dest) == MEM ! && ! RTX_UNCHANGING_P (sets[i].inner_dest)); ! if (elt->in_memory) { *************** *** 8375,8394 **** { struct cse_basic_block_data val; insn = NEXT_INSN (to); if (LABEL_NUSES (to) == 0) ! delete_insn (to); ! ! /* Find the end of the following block. Note that we won't be ! following branches in this case. If TO was the last insn ! in the function, we are done. Similarly, if we deleted the ! insn after TO, it must have been because it was preceded by ! a BARRIER. In that case, we are done with this block because it ! has no continuation. */ ! if (insn == 0 || INSN_DELETED_P (insn)) return 0; to_usage = 0; val.path_size = 0; --- 8431,8453 ---- { struct cse_basic_block_data val; + rtx prev; insn = NEXT_INSN (to); if (LABEL_NUSES (to) == 0) ! insn = delete_insn (to); ! /* If TO was the last insn in the function, we are done. */ ! if (insn == 0) return 0; + /* If TO was preceded by a BARRIER we are done with this block + because it has no continuation. */ + prev = prev_nonnote_insn (to); + if (prev && GET_CODE (prev) == BARRIER) + return insn; + + /* Find the end of the following block. Note that we won't be + following branches in this case. */ to_usage = 0; val.path_size = 0; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/dbxout.c gcc-2.7.0/dbxout.c *** gcc-2.6.3/dbxout.c Fri Sep 9 17:02:25 1994 --- gcc-2.7.0/dbxout.c Thu Jun 15 07:27:10 1995 *************** *** 1,4 **** /* Output dbx-format symbol table information from GNU compiler. ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Output dbx-format symbol table information from GNU compiler. ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 113,116 **** --- 114,122 ---- #endif + /* This is used for parameters passed by invisible reference in a register. */ + #ifndef GDB_INV_REF_REGPARM_STABS_LETTER + #define GDB_INV_REF_REGPARM_STABS_LETTER 'a' + #endif + #ifndef DBX_MEMPARM_STABS_LETTER #define DBX_MEMPARM_STABS_LETTER 'p' *************** *** 519,524 **** output_quoted_string (file, filename); fprintf (file, ",%d,0,0,%s\n", N_SOL, <ext_label_name[1]); ! text_section (); ! ASM_OUTPUT_INTERNAL_LABEL (asmfile, "Ltext", source_label_number); source_label_number++; #endif --- 525,534 ---- output_quoted_string (file, filename); fprintf (file, ",%d,0,0,%s\n", N_SOL, <ext_label_name[1]); ! if (current_function_decl != NULL_TREE ! && DECL_SECTION_NAME (current_function_decl) != NULL_TREE) ! ; /* Don't change section amid function. */ ! else ! text_section (); ! ASM_OUTPUT_INTERNAL_LABEL (file, "Ltext", source_label_number); source_label_number++; #endif *************** *** 614,618 **** { have_used_extensions = 1; ! CHARS (3 + IDENTIFIER_LENGTH (DECL_NAME (TYPE_NAME (DECL_FCONTEXT (tem))))); fputs (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (tem)), asmfile); dbxout_type (DECL_FCONTEXT (tem), 0, 0); --- 624,628 ---- { have_used_extensions = 1; ! CHARS (3 + IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (tem))); fputs (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (tem)), asmfile); dbxout_type (DECL_FCONTEXT (tem), 0, 0); *************** *** 688,692 **** char *debug_name; { - tree firstarg = TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))); char c1 = 'A', c2; --- 698,701 ---- *************** *** 695,698 **** --- 704,708 ---- else /* it's a METHOD_TYPE. */ { + tree firstarg = TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))); /* A for normal functions. B for `const' member functions. *************** *** 1668,1672 **** zero). This prevents the sun4 Sun OS 4.x dbx from crashing. */ ! if (tag_needed && TYPE_NAME (type) != 0 && TYPE_SIZE (type) != 0 && !TREE_ASM_WRITTEN (TYPE_NAME (type))) { --- 1678,1685 ---- zero). This prevents the sun4 Sun OS 4.x dbx from crashing. */ ! if (tag_needed && TYPE_NAME (type) != 0 ! && (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE ! || (DECL_NAME (TYPE_NAME (type)) != 0)) ! && TYPE_SIZE (type) != 0 && !TREE_ASM_WRITTEN (TYPE_NAME (type))) { *************** *** 1995,2007 **** /* One slight hitch: if this is a VAR_DECL which is a static class member, we must put out the mangled name instead of the ! DECL_NAME. */ ! ! char *name; ! /* Note also that static member (variable) names DO NOT begin with underscores in .stabs directives. */ ! if (DECL_LANG_SPECIFIC (decl)) ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! else ! name = IDENTIFIER_POINTER (DECL_NAME (decl)); if (name == 0) name = "(anon)"; --- 2008,2014 ---- /* One slight hitch: if this is a VAR_DECL which is a static class member, we must put out the mangled name instead of the ! DECL_NAME. Note also that static member (variable) names DO NOT begin with underscores in .stabs directives. */ ! char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); if (name == 0) name = "(anon)"; *************** *** 2123,2157 **** } ! if (GET_CODE (DECL_RTL (parms)) == REG ! && REGNO (DECL_RTL (parms)) >= 0 ! && REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER) ! dbxout_type (DECL_ARG_TYPE (parms), 0, 0); ! else ! { ! int original_value = current_sym_value; ! ! /* This is the case where the parm is passed as an int or double ! and it is converted to a char, short or float and stored back ! in the parmlist. In this case, describe the parm ! with the variable's declared type, and adjust the address ! if the least significant bytes (which we are using) are not ! the first ones. */ ! #if BYTES_BIG_ENDIAN ! if (TREE_TYPE (parms) != DECL_ARG_TYPE (parms)) ! current_sym_value += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms))) ! - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))); ! #endif ! ! if (GET_CODE (DECL_RTL (parms)) == MEM ! && GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS ! && GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 1)) == CONST_INT ! && INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)) == current_sym_value) ! dbxout_type (TREE_TYPE (parms), 0, 0); ! else ! { ! current_sym_value = original_value; ! dbxout_type (DECL_ARG_TYPE (parms), 0, 0); ! } ! } current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr); dbxout_finish_symbol (parms); --- 2130,2134 ---- } ! dbxout_type (DECL_ARG_TYPE (parms), 0, 0); current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr); dbxout_finish_symbol (parms); *************** *** 2227,2231 **** current_sym_code = DBX_REGPARM_STABS_CODE; ! regparm_letter = DBX_REGPARM_STABS_LETTER; /* DECL_RTL looks like (MEM (REG...). Get the register number. --- 2204,2211 ---- current_sym_code = DBX_REGPARM_STABS_CODE; ! if (use_gnu_debug_info_extensions) ! regparm_letter = GDB_INV_REF_REGPARM_STABS_LETTER; ! else ! regparm_letter = DBX_REGPARM_STABS_LETTER; /* DECL_RTL looks like (MEM (REG...). Get the register number. *************** *** 2247,2251 **** fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP, IDENTIFIER_POINTER (DECL_NAME (parms)), ! DBX_REGPARM_STABS_LETTER); } else --- 2227,2231 ---- fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP, IDENTIFIER_POINTER (DECL_NAME (parms)), ! regparm_letter); } else *************** *** 2253,2257 **** current_sym_nchars = 8; fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP, ! DBX_REGPARM_STABS_LETTER); } --- 2233,2237 ---- current_sym_nchars = 8; fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP, ! regparm_letter); } *************** *** 2321,2325 **** { for (; parms; parms = TREE_CHAIN (parms)) ! if (DECL_NAME (parms)) { dbxout_prepare_symbol (parms); --- 2301,2305 ---- { for (; parms; parms = TREE_CHAIN (parms)) ! if (DECL_NAME (parms) && PARM_PASSED_IN_MEMORY (parms)) { dbxout_prepare_symbol (parms); *************** *** 2329,2396 **** if (GET_CODE (DECL_RTL (parms)) == REG && REGNO (DECL_RTL (parms)) >= 0 ! && REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER ! && PARM_PASSED_IN_MEMORY (parms)) dbxout_symbol_location (parms, TREE_TYPE (parms), 0, DECL_RTL (parms)); ! else if (GET_CODE (DECL_RTL (parms)) == CONCAT ! && PARM_PASSED_IN_MEMORY (parms)) dbxout_symbol_location (parms, TREE_TYPE (parms), 0, DECL_RTL (parms)); /* Report parms that live in memory but not where they were passed. */ else if (GET_CODE (DECL_RTL (parms)) == MEM - && GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS - && GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 1)) == CONST_INT - && PARM_PASSED_IN_MEMORY (parms) && ! rtx_equal_p (DECL_RTL (parms), DECL_INCOMING_RTL (parms))) ! { ! #if 0 /* ??? It is not clear yet what should replace this. */ ! int offset = DECL_OFFSET (parms) / BITS_PER_UNIT; ! /* A parm declared char is really passed as an int, ! so it occupies the least significant bytes. ! On a big-endian machine those are not the low-numbered ones. */ ! #if BYTES_BIG_ENDIAN ! if (offset != -1 && TREE_TYPE (parms) != DECL_ARG_TYPE (parms)) ! offset += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms))) ! - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))); ! #endif ! if (INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)) != offset) {...} ! #endif ! dbxout_symbol_location (parms, TREE_TYPE (parms), ! 0, DECL_RTL (parms)); ! } ! #if 0 ! else if (GET_CODE (DECL_RTL (parms)) == MEM ! && GET_CODE (XEXP (DECL_RTL (parms), 0)) == REG) ! { ! /* Parm was passed via invisible reference. ! That is, its address was passed in a register. ! Output it as if it lived in that register. ! The debugger will know from the type ! that it was actually passed by invisible reference. */ ! ! current_sym_code = N_RSYM; ! ! /* DECL_RTL looks like (MEM (REG...). Get the register number. */ ! current_sym_value = REGNO (XEXP (DECL_RTL (parms), 0)); ! current_sym_addr = 0; ! ! FORCE_TEXT; ! if (DECL_NAME (parms)) ! { ! current_sym_nchars = 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms))); ! ! fprintf (asmfile, "%s \"%s:r", ASM_STABS_OP, ! IDENTIFIER_POINTER (DECL_NAME (parms))); ! } ! else ! { ! current_sym_nchars = 8; ! fprintf (asmfile, "%s \"(anon):r", ASM_STABS_OP); ! } ! ! dbxout_type (TREE_TYPE (parms), 0, 0); ! dbxout_finish_symbol (parms); ! } ! #endif } } --- 2309,2323 ---- if (GET_CODE (DECL_RTL (parms)) == REG && REGNO (DECL_RTL (parms)) >= 0 ! && REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER) dbxout_symbol_location (parms, TREE_TYPE (parms), 0, DECL_RTL (parms)); ! else if (GET_CODE (DECL_RTL (parms)) == CONCAT) dbxout_symbol_location (parms, TREE_TYPE (parms), 0, DECL_RTL (parms)); /* Report parms that live in memory but not where they were passed. */ else if (GET_CODE (DECL_RTL (parms)) == MEM && ! rtx_equal_p (DECL_RTL (parms), DECL_INCOMING_RTL (parms))) ! dbxout_symbol_location (parms, TREE_TYPE (parms), ! 0, DECL_RTL (parms)); } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/defaults.h gcc-2.7.0/defaults.h *** gcc-2.6.3/defaults.h Wed Mar 23 16:32:11 1994 --- gcc-2.7.0/defaults.h Thu Jun 15 07:27:38 1995 *************** *** 21,25 **** 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. */ /* Store in OUTPUT a string (made with alloca) containing --- 21,26 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Store in OUTPUT a string (made with alloca) containing *************** *** 130,133 **** --- 131,143 ---- fprintf (FILE, "\n"); \ } while (0) + #endif + #endif + + /* This determines whether or not we support weak symbols. */ + #ifndef SUPPORTS_WEAK + #ifdef ASM_WEAKEN_LABEL + #define SUPPORTS_WEAK 1 + #else + #define SUPPORTS_WEAK 0 #endif #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/demangle.h gcc-2.7.0/demangle.h *** gcc-2.6.3/demangle.h --- gcc-2.7.0/demangle.h Thu Jun 15 07:27:54 1995 *************** *** 0 **** --- 1,108 ---- + /* Defs for interface to demanglers. + Copyright 1992, 1995 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 2, 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., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + + #if !defined (DEMANGLE_H) + #define DEMANGLE_H + + #ifdef IN_GCC + + /* Add prototype support. */ + #ifndef PROTO + #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) + #define PROTO(ARGS) ARGS + #else + #define PROTO(ARGS) () + #endif + #endif + + #define PARAMS(ARGS) PROTO(ARGS) + + #ifdef __STDC__ + #define PTR void * + #else + #ifndef const + #define const + #endif + #define PTR char * + #endif + + #else /* ! IN_GCC */ + #include + #endif /* IN_GCC */ + + /* Options passed to cplus_demangle (in 2nd parameter). */ + + #define DMGL_NO_OPTS 0 /* For readability... */ + #define DMGL_PARAMS (1 << 0) /* Include function args */ + #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ + + #define DMGL_AUTO (1 << 8) + #define DMGL_GNU (1 << 9) + #define DMGL_LUCID (1 << 10) + #define DMGL_ARM (1 << 11) + /* If none of these are set, use 'current_demangling_style' as the default. */ + #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM) + + /* Enumeration of possible demangling styles. + + Lucid and ARM styles are still kept logically distinct, even though + they now both behave identically. The resulting style is actual the + union of both. I.E. either style recognizes both "__pt__" and "__rf__" + for operator "->", even though the first is lucid style and the second + is ARM style. (FIXME?) */ + + extern enum demangling_styles + { + unknown_demangling = 0, + auto_demangling = DMGL_AUTO, + gnu_demangling = DMGL_GNU, + lucid_demangling = DMGL_LUCID, + arm_demangling = DMGL_ARM + } current_demangling_style; + + /* Define string names for the various demangling styles. */ + + #define AUTO_DEMANGLING_STYLE_STRING "auto" + #define GNU_DEMANGLING_STYLE_STRING "gnu" + #define LUCID_DEMANGLING_STYLE_STRING "lucid" + #define ARM_DEMANGLING_STYLE_STRING "arm" + + /* Some macros to test what demangling style is active. */ + + #define CURRENT_DEMANGLING_STYLE current_demangling_style + #define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO) + #define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU) + #define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID) + #define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM) + + extern char * + cplus_demangle PARAMS ((const char *mangled, int options)); + + extern int + cplus_demangle_opname PARAMS ((char *opname, char *result, int options)); + + extern char * + cplus_mangle_opname PARAMS ((char *opname, int options)); + + /* Note: This sets global state. FIXME if you care about multi-threading. */ + + extern void + set_cplus_marker_for_demangling PARAMS ((int ch)); + + #endif /* DEMANGLE_H */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/dwarf.h gcc-2.7.0/dwarf.h *** gcc-2.6.3/dwarf.h Wed Mar 23 16:32:16 1994 --- gcc-2.7.0/dwarf.h Thu Jun 15 07:28:27 1995 *************** *** 20,24 **** 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 is derived from the DWARF specification (a public document) --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This file is derived from the DWARF specification (a public document) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/dwarfout.c gcc-2.7.0/dwarfout.c *** gcc-2.6.3/dwarfout.c Thu Jul 28 19:55:34 1994 --- gcc-2.7.0/dwarfout.c Thu Jun 15 07:28:59 1995 *************** *** 20,24 **** 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 "config.h" --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "config.h" *************** *** 348,352 **** #ifndef PUSHSECTION_FORMAT ! #define PUSHSECTION_FORMAT "%s\t%s\n" #endif --- 349,353 ---- #ifndef PUSHSECTION_FORMAT ! #define PUSHSECTION_FORMAT "\t%s\t%s\n" #endif *************** *** 1958,1962 **** the absence of a location attribute in certain kinds of DIEs is used to indicate something else entirely... i.e. that the DIE ! represents an object declaration, but not a definition. So sayeth the PLSIG. */ --- 1959,1963 ---- the absence of a location attribute in certain kinds of DIEs is used to indicate something else entirely... i.e. that the DIE ! represents an object declaration, but not a definition. So saith the PLSIG. */ *************** *** 2205,2214 **** if (declared_type == passed_type) rtl = DECL_INCOMING_RTL (decl); ! #if (BYTES_BIG_ENDIAN == 0) ! else if (TREE_CODE (declared_type) == INTEGER_TYPE) if (TYPE_SIZE (declared_type) <= TYPE_SIZE (passed_type)) rtl = DECL_INCOMING_RTL (decl); - #endif /* (BYTES_BIG_ENDIAN == 0) */ } --- 2206,2213 ---- if (declared_type == passed_type) rtl = DECL_INCOMING_RTL (decl); ! else if (! BYTES_BIG_ENDIAN) if (TREE_CODE (declared_type) == INTEGER_TYPE) if (TYPE_SIZE (declared_type) <= TYPE_SIZE (passed_type)) rtl = DECL_INCOMING_RTL (decl); } *************** *** 2417,2421 **** } ! /* Output the prefix byte that says that the element type is comming up. */ ASM_OUTPUT_DWARF_FMT_BYTE (asm_out_file, FMT_ET); --- 2416,2420 ---- } ! /* Output the prefix byte that says that the element type is coming up. */ ASM_OUTPUT_DWARF_FMT_BYTE (asm_out_file, FMT_ET); *************** *** 2520,2536 **** highest_order_field_bit_offset = bitpos_int; ! #if (BYTES_BIG_ENDIAN == 0) ! highest_order_field_bit_offset ! += (unsigned) TREE_INT_CST_LOW (DECL_SIZE (decl)); ! highest_order_object_bit_offset += simple_type_size_in_bits (type); ! #endif /* (BYTES_BIG_ENDIAN == 0) */ bit_offset = ! #if (BYTES_BIG_ENDIAN == 0) ! highest_order_object_bit_offset - highest_order_field_bit_offset; ! #else /* (BYTES_BIG_ENDIAN != 0) */ ! highest_order_field_bit_offset - highest_order_object_bit_offset; ! #endif /* (BYTES_BIG_ENDIAN != 0) */ ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_bit_offset); --- 2519,2534 ---- highest_order_field_bit_offset = bitpos_int; ! if (! BYTES_BIG_ENDIAN) ! { ! highest_order_field_bit_offset ! += (unsigned) TREE_INT_CST_LOW (DECL_SIZE (decl)); ! highest_order_object_bit_offset += simple_type_size_in_bits (type); ! } bit_offset = ! (! BYTES_BIG_ENDIAN ! ? highest_order_object_bit_offset - highest_order_field_bit_offset ! : highest_order_field_bit_offset - highest_order_object_bit_offset); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_bit_offset); *************** *** 4363,4366 **** --- 4361,4375 ---- return; + /* If a structure is declared within an initialization, e.g. as the + operand of a sizeof, then it will not have a name. We don't want + to output a DIE for it, as the tree nodes are in the temporary obstack */ + + if ((TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE + || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE) + && ((DECL_NAME (decl) == 0 && TYPE_NAME (TREE_TYPE (decl)) == 0) + || (TYPE_FIELDS (TREE_TYPE (decl)) + && (TREE_CODE (TYPE_FIELDS (TREE_TYPE (decl))) == ERROR_MARK)))) + return; + /* If this ..._DECL node is marked to be ignored, then ignore it. But don't ignore a function definition, since that would screw *************** *** 4517,4521 **** else { ! /* this is unprotoyped, check for undefined (just declaration) */ if (!DECL_INITIAL (decl)) output_die (output_unspecified_parameters_die, decl); --- 4526,4530 ---- else { ! /* this is unprototyped, check for undefined (just declaration) */ if (!DECL_INITIAL (decl)) output_die (output_unspecified_parameters_die, decl); *************** *** 4548,4552 **** Just within the `outer_scope' there will be another BLOCK node representing the function's outermost pair of curly ! braces. We musn't generate a lexical_block DIE for this outermost pair of curly braces because that is not really an independent scope according to ANSI C rules. Rather, it is --- 4557,4561 ---- Just within the `outer_scope' there will be another BLOCK node representing the function's outermost pair of curly ! braces. We mustn't generate a lexical_block DIE for this outermost pair of curly braces because that is not really an independent scope according to ANSI C rules. Rather, it is *************** *** 4749,4758 **** file-scope declarations of file-scope functions which are never referenced later within this translation unit (and keep all of ! ones that *are* referenced later on) but we aren't clarvoiant, so we have no idea which functions will be referenced in the future (i.e. later on within the current translation unit). So here we just ignore all file-scope function declarations which are not also definitions. If and when the debugger needs ! to know something about these funcstion, it wil have to hunt around and find the DWARF information associated with the *definition* of the function. --- 4758,4767 ---- file-scope declarations of file-scope functions which are never referenced later within this translation unit (and keep all of ! ones that *are* referenced later on) but we aren't clairvoyant, so we have no idea which functions will be referenced in the future (i.e. later on within the current translation unit). So here we just ignore all file-scope function declarations which are not also definitions. If and when the debugger needs ! to know something about these functions, it wil have to hunt around and find the DWARF information associated with the *definition* of the function. *************** *** 4927,4931 **** char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! text_section (); sprintf (label, BLOCK_BEGIN_LABEL_FMT, blocknum); ASM_OUTPUT_LABEL (asm_out_file, label); --- 4936,4940 ---- char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! function_section (current_function_decl); sprintf (label, BLOCK_BEGIN_LABEL_FMT, blocknum); ASM_OUTPUT_LABEL (asm_out_file, label); *************** *** 4941,4945 **** char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! text_section (); sprintf (label, BLOCK_END_LABEL_FMT, blocknum); ASM_OUTPUT_LABEL (asm_out_file, label); --- 4950,4954 ---- char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! function_section (current_function_decl); sprintf (label, BLOCK_END_LABEL_FMT, blocknum); ASM_OUTPUT_LABEL (asm_out_file, label); *************** *** 4957,4961 **** char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! text_section (); sprintf (label, INSN_LABEL_FMT, current_funcdef_number, (unsigned) INSN_UID (insn)); --- 4966,4970 ---- char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! function_section (current_function_decl); sprintf (label, INSN_LABEL_FMT, current_funcdef_number, (unsigned) INSN_UID (insn)); *************** *** 4973,4977 **** char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! text_section (); sprintf (label, BODY_BEGIN_LABEL_FMT, current_funcdef_number); ASM_OUTPUT_LABEL (asm_out_file, label); --- 4982,4986 ---- char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! function_section (current_function_decl); sprintf (label, BODY_BEGIN_LABEL_FMT, current_funcdef_number); ASM_OUTPUT_LABEL (asm_out_file, label); *************** *** 4986,4990 **** char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! text_section (); sprintf (label, BODY_END_LABEL_FMT, current_funcdef_number); ASM_OUTPUT_LABEL (asm_out_file, label); --- 4995,4999 ---- char label[MAX_ARTIFICIAL_LABEL_BYTES]; ! function_section (current_function_decl); sprintf (label, BODY_END_LABEL_FMT, current_funcdef_number); ASM_OUTPUT_LABEL (asm_out_file, label); *************** *** 5160,5164 **** register unsigned this_file_entry_num = lookup_filename (filename); ! text_section (); sprintf (label, LINE_CODE_LABEL_FMT, ++last_line_entry_num); ASM_OUTPUT_LABEL (asm_out_file, label); --- 5169,5173 ---- register unsigned this_file_entry_num = lookup_filename (filename); ! function_section (current_function_decl); sprintf (label, LINE_CODE_LABEL_FMT, ++last_line_entry_num); ASM_OUTPUT_LABEL (asm_out_file, label); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/emit-rtl.c gcc-2.7.0/emit-rtl.c *** gcc-2.6.3/emit-rtl.c Tue Nov 22 17:43:29 1994 --- gcc-2.7.0/emit-rtl.c Thu Jun 15 07:29:36 1995 *************** *** 1,4 **** /* Emit RTL for the GNU C-Compiler expander. ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Emit RTL for the GNU C-Compiler expander. ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 73,78 **** /* Commonly used modes. */ ! enum machine_mode byte_mode; /* Mode whose width is BITS_PER_UNIT */ ! enum machine_mode word_mode; /* Mode whose width is BITS_PER_WORD */ /* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function. --- 74,80 ---- /* Commonly used modes. */ ! enum machine_mode byte_mode; /* Mode whose width is BITS_PER_UNIT. */ ! enum machine_mode word_mode; /* Mode whose width is BITS_PER_WORD. */ ! enum machine_mode ptr_mode; /* Mode whose width is POINTER_SIZE. */ /* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function. *************** *** 932,935 **** --- 934,943 ---- / UNITS_PER_WORD); + /* + * ??? This fails miserably for complex values being passed in registers + * where the sizeof the real and imaginary part are not equal to the + * sizeof SImode. FIXME + */ + if (REGNO (x) < FIRST_PSEUDO_REGISTER /* integrate.c can't handle parts of a return value register. */ *************** *** 1106,1109 **** --- 1114,1126 ---- | (HOST_WIDE_INT) k[WORDS_BIG_ENDIAN]); #endif + else if (BITS_PER_WORD == 16) + { + long value; + value = k[i >> 1]; + if ((i & 0x1) == 0) + value >>= 16; + value &= 0xffff; + return GEN_INT ((HOST_WIDE_INT) value); + } else abort (); *************** *** 1321,1325 **** gen_inline_header_rtx (first_insn, first_parm_insn, first_labelno, last_labelno, max_parm_regnum, max_regnum, args_size, ! pops_args, stack_slots, function_flags, outgoing_args_size, original_arg_vector, original_decl_initial) --- 1338,1342 ---- gen_inline_header_rtx (first_insn, first_parm_insn, first_labelno, last_labelno, max_parm_regnum, max_regnum, args_size, ! pops_args, stack_slots, forced_labels, function_flags, outgoing_args_size, original_arg_vector, original_decl_initial) *************** *** 1328,1331 **** --- 1345,1349 ---- int pops_args; rtx stack_slots; + rtx forced_labels; int function_flags; int outgoing_args_size; *************** *** 1338,1342 **** first_labelno, last_labelno, max_parm_regnum, max_regnum, args_size, pops_args, ! stack_slots, function_flags, outgoing_args_size, original_arg_vector, original_decl_initial); return header; --- 1356,1361 ---- first_labelno, last_labelno, max_parm_regnum, max_regnum, args_size, pops_args, ! stack_slots, forced_labels, function_flags, ! outgoing_args_size, original_arg_vector, original_decl_initial); return header; *************** *** 1581,1585 **** code = GET_CODE (x); ! /* These types may be freely shared so we needn't do any reseting for them. */ --- 1600,1604 ---- code = GET_CODE (x); ! /* These types may be freely shared so we needn't do any resetting for them. */ *************** *** 3032,3036 **** && (GET_CODE (first_insn) == INSN || GET_CODE (first_insn) == JUMP_INSN ! || GET_CODE (first_insn) == CALL_INSN)) return PATTERN (first_insn); --- 3051,3057 ---- && (GET_CODE (first_insn) == INSN || GET_CODE (first_insn) == JUMP_INSN ! /* Don't discard the call usage field. */ ! || (GET_CODE (first_insn) == CALL_INSN ! && CALL_INSN_FUNCTION_USAGE (first_insn) == NULL_RTX))) return PATTERN (first_insn); *************** *** 3041,3046 **** else { ! /* Ensure that this rtl goes in saveable_obstack, since we may be ! caching it. */ push_obstacks_nochange (); rtl_in_saveable_obstack (); --- 3062,3067 ---- else { ! /* Ensure that this rtl goes in saveable_obstack, since we may ! cache it. */ push_obstacks_nochange (); rtl_in_saveable_obstack (); *************** *** 3240,3243 **** --- 3261,3265 ---- REGNO_POINTER_FLAG (STACK_POINTER_REGNUM) = 1; REGNO_POINTER_FLAG (FRAME_POINTER_REGNUM) = 1; + REGNO_POINTER_FLAG (HARD_FRAME_POINTER_REGNUM) = 1; REGNO_POINTER_FLAG (ARG_POINTER_REGNUM) = 1; *************** *** 3282,3285 **** --- 3304,3309 ---- word_mode = mode; } + + ptr_mode = mode_for_size (POINTER_SIZE, GET_MODE_CLASS (Pmode), 0); /* Create the unique rtx's for certain rtx codes and operand values. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/explow.c gcc-2.7.0/explow.c *** gcc-2.6.3/explow.c Thu Jul 14 09:41:31 1994 --- gcc-2.7.0/explow.c Thu Jun 15 07:30:10 1995 *************** *** 1,4 **** /* Subroutines for manipulating rtx's in semantically interesting ways. ! Copyright (C) 1987, 1991, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Subroutines for manipulating rtx's in semantically interesting ways. ! Copyright (C) 1987, 1991, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 30,33 **** --- 31,36 ---- #include "insn-codes.h" + static rtx break_out_memory_refs PROTO((rtx)); + /* Return an rtx for the sum of X and the integer C. *************** *** 289,292 **** --- 292,342 ---- } + #ifdef POINTERS_EXTEND_UNSIGNED + + /* Given X, a memory address in ptr_mode, convert it to an address + in Pmode, or vice versa (TO_MODE says which way). We take advantage of + the fact that pointers are not allowed to overflow by commuting arithmetic + operations over conversions so that address arithmetic insns can be + used. */ + + rtx + convert_memory_address (to_mode, x) + enum machine_mode to_mode; + rtx x; + { + rtx temp; + + switch (GET_CODE (x)) + { + case CONST_INT: + case CONST_DOUBLE: + return x; + + case LABEL_REF: + return gen_rtx (LABEL_REF, to_mode, XEXP (x, 0)); + + case SYMBOL_REF: + temp = gen_rtx (SYMBOL_REF, to_mode, XSTR (x, 0)); + SYMBOL_REF_FLAG (temp) = SYMBOL_REF_FLAG (x); + return temp; + + case PLUS: + case MULT: + return gen_rtx (GET_CODE (x), to_mode, + convert_memory_address (to_mode, XEXP (x, 0)), + convert_memory_address (to_mode, XEXP (x, 1))); + + case CONST: + return gen_rtx (CONST, to_mode, + convert_memory_address (to_mode, XEXP (x, 0))); + + default: + return convert_modes (to_mode, + to_mode == ptr_mode ? Pmode : ptr_mode, + x, POINTERS_EXTEND_UNSIGNED); + } + } + #endif + /* Given a memory address or facsimile X, construct a new address, currently equivalent, that is stable: future stores won't change it. *************** *** 339,342 **** --- 389,397 ---- register rtx oldx = x; + #ifdef POINTERS_EXTEND_UNSIGNED + if (GET_MODE (x) == ptr_mode) + x = convert_memory_address (Pmode, x); + #endif + /* By passing constant addresses thru registers we get a chance to cse them. */ *************** *** 401,405 **** } ! if (GET_CODE (x) == MULT || GET_CODE (x) == MINUS) x = force_operand (x, NULL_RTX); --- 456,460 ---- } ! else if (GET_CODE (x) == MULT || GET_CODE (x) == MINUS) x = force_operand (x, NULL_RTX); *************** *** 668,673 **** --- 723,732 ---- #endif + #ifdef POINTERS_EXTEND_UNSIGNED case POINTER_TYPE: + mode = Pmode; + unsignedp = POINTERS_EXTEND_UNSIGNED; break; + #endif } *************** *** 925,929 **** { /* If we're asking for zero bytes, it doesn't matter what we point ! to since we can't derefference it. But return a reasonable address anyway. */ if (size == const0_rtx) --- 984,988 ---- { /* If we're asking for zero bytes, it doesn't matter what we point ! to since we can't dereference it. But return a reasonable address anyway. */ if (size == const0_rtx) *************** *** 950,971 **** that might result from the alignment operation. */ ! #if defined (STACK_DYNAMIC_OFFSET) || defined(STACK_POINTER_OFFSET) || defined (ALLOCATE_OUTGOING_ARGS) ! #define MUST_ALIGN ! #endif ! ! #if ! defined (MUST_ALIGN) && (!defined(STACK_BOUNDARY) || STACK_BOUNDARY < BIGGEST_ALIGNMENT) ! #define MUST_ALIGN #endif ! #ifdef MUST_ALIGN ! ! #if 0 /* It turns out we must always make extra space, if MUST_ALIGN ! because we must always round the address up at the end, ! because we don't know whether the dynamic offset ! will mess up the desired alignment. */ ! /* If we have to round the address up regardless of known_align, ! make extra space regardless, also. */ ! if (known_align % BIGGEST_ALIGNMENT != 0) ! #endif { if (GET_CODE (size) == CONST_INT) --- 1009,1019 ---- that might result from the alignment operation. */ ! #if defined (STACK_DYNAMIC_OFFSET) || defined (STACK_POINTER_OFFSET) || defined (ALLOCATE_OUTGOING_ARGS) || ! defined (STACK_BOUNDARY) ! #define MUST_ALIGN 1 ! #else ! #define MUST_ALIGN (STACK_BOUNDARY < BIGGEST_ALIGNMENT) #endif ! if (MUST_ALIGN) { if (GET_CODE (size) == CONST_INT) *************** *** 978,983 **** } - #endif - #ifdef SETJMP_VIA_SAVE_AREA /* If setjmp restores regs from a save area in the stack frame, --- 1026,1029 ---- *************** *** 1012,1017 **** /* If we added a variable amount to SIZE, we can no longer assume it is aligned. */ ! #if !defined (SETJMP_VIA_SAVE_AREA) && !defined (MUST_ALIGN) ! if (known_align % STACK_BOUNDARY != 0) #endif size = round_push (size); --- 1058,1063 ---- /* If we added a variable amount to SIZE, we can no longer assume it is aligned. */ ! #if !defined (SETJMP_VIA_SAVE_AREA) ! if (MUST_ALIGN || known_align % STACK_BOUNDARY != 0) #endif size = round_push (size); *************** *** 1040,1043 **** --- 1086,1091 ---- = insn_operand_mode[(int) CODE_FOR_allocate_stack][0]; + size = convert_modes (mode, ptr_mode, size, 1); + if (insn_operand_predicate[(int) CODE_FOR_allocate_stack][0] && ! ((*insn_operand_predicate[(int) CODE_FOR_allocate_stack][0]) *************** *** 1049,1053 **** else #endif ! anti_adjust_stack (size); #ifdef STACK_GROWS_DOWNWARD --- 1097,1104 ---- else #endif ! { ! size = convert_modes (Pmode, ptr_mode, size, 1); ! anti_adjust_stack (size); ! } #ifdef STACK_GROWS_DOWNWARD *************** *** 1055,1064 **** #endif ! #ifdef MUST_ALIGN ! #if 0 /* Even if we know the stack pointer has enough alignment, ! there's no way to tell whether virtual_stack_dynamic_rtx shares that ! alignment, so we still need to round the address up. */ ! if (known_align % BIGGEST_ALIGNMENT != 0) ! #endif { /* CEIL_DIV_EXPR needs to worry about the addition overflowing, --- 1106,1110 ---- #endif ! if (MUST_ALIGN) { /* CEIL_DIV_EXPR needs to worry about the addition overflowing, *************** *** 1074,1078 **** NULL_RTX, 1); } - #endif /* Some systems require a particular insn to refer to the stack --- 1120,1123 ---- *************** *** 1101,1105 **** tree func; { ! return FUNCTION_VALUE (valtype, func); } --- 1146,1171 ---- tree func; { ! rtx val = FUNCTION_VALUE (valtype, func); ! if (GET_CODE (val) == REG ! && GET_MODE (val) == BLKmode) ! { ! int bytes = int_size_in_bytes (valtype); ! enum machine_mode tmpmode; ! for (tmpmode = GET_CLASS_NARROWEST_MODE (MODE_INT); ! tmpmode != MAX_MACHINE_MODE; ! tmpmode = GET_MODE_WIDER_MODE (tmpmode)) ! { ! /* Have we found a large enough mode? */ ! if (GET_MODE_SIZE (tmpmode) >= bytes) ! break; ! } ! ! /* No suitable mode found. */ ! if (tmpmode == MAX_MACHINE_MODE) ! abort (); ! ! PUT_MODE (val, tmpmode); ! } ! return val; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/expmed.c gcc-2.7.0/expmed.c *** gcc-2.6.3/expmed.c Tue Nov 29 16:51:15 1994 --- gcc-2.7.0/expmed.c Thu Jun 15 07:30:40 1995 *************** *** 1,5 **** /* Medium-level subroutines: convert bit-field store and extract and shifts, multiplies and divides to rtl instructions. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Medium-level subroutines: convert bit-field store and extract and shifts, multiplies and divides to rtl instructions. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 62,70 **** #endif ! /* Cost of various pieces of RTL. */ static int add_cost, negate_cost, zero_cost; static int shift_cost[MAX_BITS_PER_WORD]; static int shiftadd_cost[MAX_BITS_PER_WORD]; static int shiftsub_cost[MAX_BITS_PER_WORD]; void --- 63,76 ---- #endif ! /* Cost of various pieces of RTL. Note that some of these are indexed by shift count, ! and some by mode. */ static int add_cost, negate_cost, zero_cost; static int shift_cost[MAX_BITS_PER_WORD]; static int shiftadd_cost[MAX_BITS_PER_WORD]; static int shiftsub_cost[MAX_BITS_PER_WORD]; + static int mul_cost[NUM_MACHINE_MODES]; + static int div_cost[NUM_MACHINE_MODES]; + static int mul_widen_cost[NUM_MACHINE_MODES]; + static int mul_highpart_cost[NUM_MACHINE_MODES]; void *************** *** 78,81 **** --- 84,88 ---- int dummy; int m; + enum machine_mode mode, wider_mode; start_sequence (); *************** *** 139,142 **** --- 146,175 ---- <= 2 * add_cost); + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + { + reg = gen_rtx (REG, mode, 10000); + div_cost[(int) mode] = rtx_cost (gen_rtx (UDIV, mode, reg, reg), SET); + mul_cost[(int) mode] = rtx_cost (gen_rtx (MULT, mode, reg, reg), SET); + wider_mode = GET_MODE_WIDER_MODE (mode); + if (wider_mode != VOIDmode) + { + mul_widen_cost[(int) wider_mode] + = rtx_cost (gen_rtx (MULT, wider_mode, + gen_rtx (ZERO_EXTEND, wider_mode, reg), + gen_rtx (ZERO_EXTEND, wider_mode, reg)), + SET); + mul_highpart_cost[(int) mode] + = rtx_cost (gen_rtx (TRUNCATE, mode, + gen_rtx (LSHIFTRT, wider_mode, + gen_rtx (MULT, wider_mode, + gen_rtx (ZERO_EXTEND, wider_mode, reg), + gen_rtx (ZERO_EXTEND, wider_mode, reg)), + GEN_INT (GET_MODE_BITSIZE (mode)))), + SET); + } + } + /* Free the objects we just allocated. */ end_sequence (); *************** *** 222,232 **** } - #if BYTES_BIG_ENDIAN /* If OP0 is a register, BITPOS must count within a word. But as we have it, it counts within whatever size OP0 now has. On a bigendian machine, these are not the same, so convert. */ ! if (GET_CODE (op0) != MEM && unit > GET_MODE_BITSIZE (GET_MODE (op0))) bitpos += unit - GET_MODE_BITSIZE (GET_MODE (op0)); - #endif value = protect_from_queue (value, 0); --- 255,265 ---- } /* If OP0 is a register, BITPOS must count within a word. But as we have it, it counts within whatever size OP0 now has. On a bigendian machine, these are not the same, so convert. */ ! if (BYTES_BIG_ENDIAN ! && GET_CODE (op0) != MEM ! && unit > GET_MODE_BITSIZE (GET_MODE (op0))) bitpos += unit - GET_MODE_BITSIZE (GET_MODE (op0)); value = protect_from_queue (value, 0); *************** *** 262,270 **** if (GET_CODE (op0) != MEM ! #if BYTES_BIG_ENDIAN ! && bitpos + bitsize == unit ! #else ! && bitpos == 0 ! #endif && bitsize == GET_MODE_BITSIZE (fieldmode) && (GET_MODE (op0) == fieldmode --- 295,299 ---- if (GET_CODE (op0) != MEM ! && (BYTES_BIG_ENDIAN ? bitpos + bitsize == unit : bitpos == 0) && bitsize == GET_MODE_BITSIZE (fieldmode) && (GET_MODE (op0) == fieldmode *************** *** 414,418 **** if (bestmode == VOIDmode ! || (STRICT_ALIGNMENT && GET_MODE_SIZE (bestmode) > align)) goto insv_loses; --- 443,447 ---- if (bestmode == VOIDmode ! || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)) goto insv_loses; *************** *** 451,463 **** If the bit field insn does not, we must invert. */ ! #if BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN ! xbitpos = unit - bitsize - xbitpos; ! #endif /* We have been counting XBITPOS within UNIT. Count instead within the size of the register. */ ! #if BITS_BIG_ENDIAN ! if (GET_CODE (xop0) != MEM) xbitpos += GET_MODE_BITSIZE (maxmode) - unit; ! #endif unit = GET_MODE_BITSIZE (maxmode); --- 480,491 ---- If the bit field insn does not, we must invert. */ ! if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) ! xbitpos = unit - bitsize - xbitpos; ! /* We have been counting XBITPOS within UNIT. Count instead within the size of the register. */ ! if (BITS_BIG_ENDIAN && GET_CODE (xop0) != MEM) xbitpos += GET_MODE_BITSIZE (maxmode) - unit; ! unit = GET_MODE_BITSIZE (maxmode); *************** *** 607,617 **** (OP0's mode may actually be narrower than MODE.) */ ! #if BYTES_BIG_ENDIAN ! /* BITPOS is the distance between our msb ! and that of the containing datum. ! Convert it to the distance from the lsb. */ - bitpos = total_bits - bitsize - bitpos; - #endif /* Now BITPOS is always the distance between our lsb and that of OP0. */ --- 635,644 ---- (OP0's mode may actually be narrower than MODE.) */ ! if (BYTES_BIG_ENDIAN) ! /* BITPOS is the distance between our msb ! and that of the containing datum. ! Convert it to the distance from the lsb. */ ! bitpos = total_bits - bitsize - bitpos; /* Now BITPOS is always the distance between our lsb and that of OP0. */ *************** *** 722,726 **** else value = gen_lowpart_common (word_mode, ! force_reg (GET_MODE (value), value)); } --- 749,755 ---- else value = gen_lowpart_common (word_mode, ! force_reg (GET_MODE (value) != VOIDmode ! ? GET_MODE (value) ! : word_mode, value)); } *************** *** 741,767 **** thissize = MIN (thissize, unit - thispos); ! #if BYTES_BIG_ENDIAN ! /* Fetch successively less significant portions. */ ! if (GET_CODE (value) == CONST_INT) ! part = GEN_INT (((unsigned HOST_WIDE_INT) (INTVAL (value)) ! >> (bitsize - bitsdone - thissize)) ! & (((HOST_WIDE_INT) 1 << thissize) - 1)); ! else ! /* The args are chosen so that the last part includes the lsb. ! Give extract_bit_field the value it needs (with endianness ! compensation) to fetch the piece we want. */ ! part = extract_fixed_bit_field (word_mode, value, 0, thissize, ! GET_MODE_BITSIZE (GET_MODE (value)) ! - bitsize + bitsdone, ! NULL_RTX, 1, align); ! #else ! /* Fetch successively more significant portions. */ ! if (GET_CODE (value) == CONST_INT) ! part = GEN_INT (((unsigned HOST_WIDE_INT) (INTVAL (value)) >> bitsdone) ! & (((HOST_WIDE_INT) 1 << thissize) - 1)); else ! part = extract_fixed_bit_field (word_mode, value, 0, thissize, ! bitsdone, NULL_RTX, 1, align); ! #endif /* If OP0 is a register, then handle OFFSET here. --- 770,809 ---- thissize = MIN (thissize, unit - thispos); ! if (BYTES_BIG_ENDIAN) ! { ! int total_bits; ! ! /* We must do an endian conversion exactly the same way as it is ! done in extract_bit_field, so that the two calls to ! extract_fixed_bit_field will have comparable arguments. */ ! if (GET_CODE (value) != MEM) ! total_bits = BITS_PER_WORD; ! else ! total_bits = GET_MODE_BITSIZE (GET_MODE (value)); ! ! /* Fetch successively less significant portions. */ ! if (GET_CODE (value) == CONST_INT) ! part = GEN_INT (((unsigned HOST_WIDE_INT) (INTVAL (value)) ! >> (bitsize - bitsdone - thissize)) ! & (((HOST_WIDE_INT) 1 << thissize) - 1)); ! else ! /* The args are chosen so that the last part includes the ! lsb. Give extract_bit_field the value it needs (with ! endianness compensation) to fetch the piece we want. */ ! part = extract_fixed_bit_field (word_mode, value, 0, thissize, ! total_bits - bitsize + bitsdone, ! NULL_RTX, 1, align); ! } else ! { ! /* Fetch successively more significant portions. */ ! if (GET_CODE (value) == CONST_INT) ! part = GEN_INT (((unsigned HOST_WIDE_INT) (INTVAL (value)) ! >> bitsdone) ! & (((HOST_WIDE_INT) 1 << thissize) - 1)); ! else ! part = extract_fixed_bit_field (word_mode, value, 0, thissize, ! bitsdone, NULL_RTX, 1, align); ! } /* If OP0 is a register, then handle OFFSET here. *************** *** 847,861 **** while (GET_CODE (op0) == SUBREG) { offset += SUBREG_WORD (op0); op0 = SUBREG_REG (op0); } - #if BYTES_BIG_ENDIAN /* If OP0 is a register, BITPOS must count within a word. But as we have it, it counts within whatever size OP0 now has. On a bigendian machine, these are not the same, so convert. */ ! if (GET_CODE (op0) != MEM && unit > GET_MODE_BITSIZE (GET_MODE (op0))) bitpos += unit - GET_MODE_BITSIZE (GET_MODE (op0)); - #endif /* Extracting a full-word or multi-word value --- 889,921 ---- while (GET_CODE (op0) == SUBREG) { + int outer_size = GET_MODE_BITSIZE (GET_MODE (op0)); + int inner_size = GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))); + offset += SUBREG_WORD (op0); + + if (BYTES_BIG_ENDIAN && (outer_size < inner_size)) + { + bitpos += inner_size - outer_size; + if (bitpos > unit) + { + offset += (bitpos / unit); + bitpos %= unit; + } + } + op0 = SUBREG_REG (op0); } + + /* ??? We currently assume TARGET is at least as big as BITSIZE. + If that's wrong, the solution is to test for it and set TARGET to 0 + if needed. */ /* If OP0 is a register, BITPOS must count within a word. But as we have it, it counts within whatever size OP0 now has. On a bigendian machine, these are not the same, so convert. */ ! if (BYTES_BIG_ENDIAN && ! GET_CODE (op0) != MEM ! && unit > GET_MODE_BITSIZE (GET_MODE (op0))) bitpos += unit - GET_MODE_BITSIZE (GET_MODE (op0)); /* Extracting a full-word or multi-word value *************** *** 873,882 **** && bitpos % BITS_PER_WORD == 0) || (mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0) != BLKmode ! #if BYTES_BIG_ENDIAN ! && bitpos + bitsize == BITS_PER_WORD ! #else ! && bitpos == 0 ! #endif ! ))) { enum machine_mode mode1 --- 933,939 ---- && bitpos % BITS_PER_WORD == 0) || (mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0) != BLKmode ! && (BYTES_BIG_ENDIAN ! ? bitpos + bitsize == BITS_PER_WORD ! : bitpos == 0)))) { enum machine_mode mode1 *************** *** 915,919 **** /* If I is 0, use the low-order word in both field and target; if I is 1, use the next to lowest word; and so on. */ ! int wordnum = (WORDS_BIG_ENDIAN ? nwords - i - 1 : i); int bit_offset = (WORDS_BIG_ENDIAN ? MAX (0, bitsize - (i + 1) * BITS_PER_WORD) --- 972,980 ---- /* If I is 0, use the low-order word in both field and target; if I is 1, use the next to lowest word; and so on. */ ! /* Word number in TARGET to use. */ ! int wordnum = (WORDS_BIG_ENDIAN ! ? GET_MODE_SIZE (GET_MODE (target)) / UNITS_PER_WORD - i - 1 ! : i); ! /* Offset from start of field in OP0. */ int bit_offset = (WORDS_BIG_ENDIAN ? MAX (0, bitsize - (i + 1) * BITS_PER_WORD) *************** *** 935,939 **** if (unsignedp) ! return target; /* Signed bit field: sign-extend with two arithmetic shifts. */ target = expand_shift (LSHIFT_EXPR, mode, target, --- 996,1017 ---- if (unsignedp) ! { ! /* Unless we've filled TARGET, the upper regs in a multi-reg value ! need to be zero'd out. */ ! if (GET_MODE_SIZE (GET_MODE (target)) > nwords * UNITS_PER_WORD) ! { ! int i,total_words; ! ! total_words = GET_MODE_SIZE (GET_MODE (target)) / UNITS_PER_WORD; ! for (i = nwords; i < total_words; i++) ! { ! int wordnum = WORDS_BIG_ENDIAN ? total_words - i - 1 : i; ! rtx target_part = operand_subword (target, wordnum, 1, VOIDmode); ! emit_move_insn (target_part, const0_rtx); ! } ! } ! return target; ! } ! /* Signed bit field: sign-extend with two arithmetic shifts. */ target = expand_shift (LSHIFT_EXPR, mode, target, *************** *** 1018,1022 **** if (bestmode == VOIDmode ! || (STRICT_ALIGNMENT && GET_MODE_SIZE (bestmode) > align)) goto extzv_loses; --- 1096,1100 ---- if (bestmode == VOIDmode ! || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)) goto extzv_loses; *************** *** 1051,1062 **** /* On big-endian machines, we count bits from the most significant. If the bit field insn does not, we must invert. */ ! #if BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN ! xbitpos = unit - bitsize - xbitpos; ! #endif /* Now convert from counting within UNIT to counting in MAXMODE. */ ! #if BITS_BIG_ENDIAN ! if (GET_CODE (xop0) != MEM) xbitpos += GET_MODE_BITSIZE (maxmode) - unit; ! #endif unit = GET_MODE_BITSIZE (maxmode); --- 1129,1139 ---- /* On big-endian machines, we count bits from the most significant. If the bit field insn does not, we must invert. */ ! if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) ! xbitpos = unit - bitsize - xbitpos; ! /* Now convert from counting within UNIT to counting in MAXMODE. */ ! if (BITS_BIG_ENDIAN && GET_CODE (xop0) != MEM) xbitpos += GET_MODE_BITSIZE (maxmode) - unit; ! unit = GET_MODE_BITSIZE (maxmode); *************** *** 1155,1159 **** if (bestmode == VOIDmode ! || (STRICT_ALIGNMENT && GET_MODE_SIZE (bestmode) > align)) goto extv_loses; --- 1232,1236 ---- if (bestmode == VOIDmode ! || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)) goto extv_loses; *************** *** 1186,1198 **** /* On big-endian machines, we count bits from the most significant. If the bit field insn does not, we must invert. */ ! #if BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN ! xbitpos = unit - bitsize - xbitpos; ! #endif /* XBITPOS counts within a size of UNIT. Adjust to count within a size of MAXMODE. */ ! #if BITS_BIG_ENDIAN ! if (GET_CODE (xop0) != MEM) xbitpos += (GET_MODE_BITSIZE (maxmode) - unit); ! #endif unit = GET_MODE_BITSIZE (maxmode); --- 1263,1274 ---- /* On big-endian machines, we count bits from the most significant. If the bit field insn does not, we must invert. */ ! if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) ! xbitpos = unit - bitsize - xbitpos; ! /* XBITPOS counts within a size of UNIT. Adjust to count within a size of MAXMODE. */ ! if (BITS_BIG_ENDIAN && GET_CODE (xop0) != MEM) xbitpos += (GET_MODE_BITSIZE (maxmode) - unit); ! unit = GET_MODE_BITSIZE (maxmode); *************** *** 1348,1357 **** mode = GET_MODE (op0); ! #if BYTES_BIG_ENDIAN ! /* BITPOS is the distance between our msb and that of OP0. ! Convert it to the distance from the lsb. */ - bitpos = total_bits - bitsize - bitpos; - #endif /* Now BITPOS is always the distance between the field's lsb and that of OP0. We have reduced the big-endian case to the little-endian case. */ --- 1424,1435 ---- mode = GET_MODE (op0); ! if (BYTES_BIG_ENDIAN) ! { ! /* BITPOS is the distance between our msb and that of OP0. ! Convert it to the distance from the lsb. */ ! ! bitpos = total_bits - bitsize - bitpos; ! } /* Now BITPOS is always the distance between the field's lsb and that of OP0. We have reduced the big-endian case to the little-endian case. */ *************** *** 1430,1434 **** of mode MODE with BITSIZE ones followed by BITPOS zeros, or the complement of that if COMPLEMENT. The mask is truncated if ! necessary to the width of mode MODE. */ static rtx --- 1508,1513 ---- of mode MODE with BITSIZE ones followed by BITPOS zeros, or the complement of that if COMPLEMENT. The mask is truncated if ! necessary to the width of mode MODE. The mask is zero-extended if ! BITSIZE+BITPOS is too small for MODE. */ static rtx *************** *** 1571,1583 **** /* Shift this part into place for the result. */ ! #if BYTES_BIG_ENDIAN ! if (bitsize != bitsdone) ! part = expand_shift (LSHIFT_EXPR, word_mode, part, ! build_int_2 (bitsize - bitsdone, 0), 0, 1); ! #else ! if (bitsdone != thissize) ! part = expand_shift (LSHIFT_EXPR, word_mode, part, ! build_int_2 (bitsdone - thissize, 0), 0, 1); ! #endif if (first) --- 1650,1665 ---- /* Shift this part into place for the result. */ ! if (BYTES_BIG_ENDIAN) ! { ! if (bitsize != bitsdone) ! part = expand_shift (LSHIFT_EXPR, word_mode, part, ! build_int_2 (bitsize - bitsdone, 0), 0, 1); ! } ! else ! { ! if (bitsdone != thissize) ! part = expand_shift (LSHIFT_EXPR, word_mode, part, ! build_int_2 (bitsdone - thissize, 0), 0, 1); ! } if (first) *************** *** 1656,1660 **** op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0); ! #if 0 && SHIFT_COUNT_TRUNCATED if (SHIFT_COUNT_TRUNCATED && GET_CODE (op1) == CONST_INT --- 1738,1742 ---- op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0); ! #if SHIFT_COUNT_TRUNCATED if (SHIFT_COUNT_TRUNCATED && GET_CODE (op1) == CONST_INT *************** *** 2447,2458 **** MODE is the mode of operation and result. ! UNSIGNEDP nonzero means unsigned multiply. */ rtx ! expand_mult_highpart (mode, op0, cnst1, target, unsignedp) enum machine_mode mode; register rtx op0, target; unsigned HOST_WIDE_INT cnst1; int unsignedp; { enum machine_mode wider_mode = GET_MODE_WIDER_MODE (mode); --- 2529,2543 ---- MODE is the mode of operation and result. ! UNSIGNEDP nonzero means unsigned multiply. + MAX_COST is the total allowed cost for the expanded RTL. */ + rtx ! expand_mult_highpart (mode, op0, cnst1, target, unsignedp, max_cost) enum machine_mode mode; register rtx op0, target; unsigned HOST_WIDE_INT cnst1; int unsignedp; + int max_cost; { enum machine_mode wider_mode = GET_MODE_WIDER_MODE (mode); *************** *** 2481,2485 **** /* expand_mult handles constant multiplication of word_mode or narrower. It does a poor job for large modes. */ ! if (size < BITS_PER_WORD) { /* We have to do this, since expand_binop doesn't do conversion for --- 2566,2571 ---- /* expand_mult handles constant multiplication of word_mode or narrower. It does a poor job for large modes. */ ! if (size < BITS_PER_WORD ! && mul_cost[(int) wider_mode] + shift_cost[size-1] < max_cost) { /* We have to do this, since expand_binop doesn't do conversion for *************** *** 2490,2494 **** tem = expand_shift (RSHIFT_EXPR, wider_mode, tem, build_int_2 (size, 0), NULL_RTX, 1); ! return gen_lowpart (mode, tem); } --- 2576,2580 ---- tem = expand_shift (RSHIFT_EXPR, wider_mode, tem, build_int_2 (size, 0), NULL_RTX, 1); ! return convert_modes (mode, wider_mode, tem, unsignedp); } *************** *** 2498,2550 **** /* Firstly, try using a multiplication insn that only generates the needed high part of the product, and in the sign flavor of unsignedp. */ ! mul_highpart_optab = unsignedp ? umul_highpart_optab : smul_highpart_optab; ! target = expand_binop (mode, mul_highpart_optab, ! op0, op1, target, unsignedp, OPTAB_DIRECT); ! if (target) ! return target; /* Secondly, same as above, but use sign flavor opposite of unsignedp. Need to adjust the result after the multiplication. */ ! mul_highpart_optab = unsignedp ? smul_highpart_optab : umul_highpart_optab; ! target = expand_binop (mode, mul_highpart_optab, ! op0, op1, target, unsignedp, OPTAB_DIRECT); ! if (target) ! /* We used the wrong signedness. Adjust the result. */ ! return expand_mult_highpart_adjust (mode, target, op0, ! op1, target, unsignedp); ! ! /* Thirdly, we try to use a widening multiplication, or a wider mode ! multiplication. */ moptab = unsignedp ? umul_widen_optab : smul_widen_optab; ! if (moptab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing) ! ; ! else if (smul_optab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing) ! moptab = smul_optab; ! else { ! /* Try widening multiplication of opposite signedness, and adjust. */ ! moptab = unsignedp ? smul_widen_optab : umul_widen_optab; ! if (moptab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing) { ! tem = expand_binop (wider_mode, moptab, op0, wide_op1, ! NULL_RTX, ! unsignedp, OPTAB_WIDEN); ! if (tem != 0) ! { ! /* Extract the high half of the just generated product. */ ! tem = expand_shift (RSHIFT_EXPR, wider_mode, tem, ! build_int_2 (size, 0), NULL_RTX, 1); ! tem = gen_lowpart (mode, tem); ! /* We used the wrong signedness. Adjust the result. */ ! return expand_mult_highpart_adjust (mode, tem, op0, op1, ! target, unsignedp); ! } } - - /* As a last resort, try widening the mode and perform a - non-widening multiplication. */ - moptab = smul_optab; } /* Pass NULL_RTX as target since TARGET has wrong mode. */ tem = expand_binop (wider_mode, moptab, op0, wide_op1, --- 2584,2644 ---- /* Firstly, try using a multiplication insn that only generates the needed high part of the product, and in the sign flavor of unsignedp. */ ! if (mul_highpart_cost[(int) mode] < max_cost) ! { ! mul_highpart_optab = unsignedp ? umul_highpart_optab : smul_highpart_optab; ! target = expand_binop (mode, mul_highpart_optab, ! op0, wide_op1, target, unsignedp, OPTAB_DIRECT); ! if (target) ! return target; ! } /* Secondly, same as above, but use sign flavor opposite of unsignedp. Need to adjust the result after the multiplication. */ ! if (mul_highpart_cost[(int) mode] + 2 * shift_cost[size-1] + 4 * add_cost < max_cost) ! { ! mul_highpart_optab = unsignedp ? smul_highpart_optab : umul_highpart_optab; ! target = expand_binop (mode, mul_highpart_optab, ! op0, wide_op1, target, unsignedp, OPTAB_DIRECT); ! if (target) ! /* We used the wrong signedness. Adjust the result. */ ! return expand_mult_highpart_adjust (mode, target, op0, ! op1, target, unsignedp); ! } + /* Try widening multiplication. */ moptab = unsignedp ? umul_widen_optab : smul_widen_optab; ! if (moptab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing ! && mul_widen_cost[(int) wider_mode] < max_cost) ! goto try; ! ! /* Try widening the mode and perform a non-widening multiplication. */ ! moptab = smul_optab; ! if (smul_optab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing ! && mul_cost[(int) wider_mode] + shift_cost[size-1] < max_cost) ! goto try; ! ! /* Try widening multiplication of opposite signedness, and adjust. */ ! moptab = unsignedp ? smul_widen_optab : umul_widen_optab; ! if (moptab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing ! && (mul_widen_cost[(int) wider_mode] ! + 2 * shift_cost[size-1] + 4 * add_cost < max_cost)) { ! tem = expand_binop (wider_mode, moptab, op0, wide_op1, ! NULL_RTX, ! unsignedp, OPTAB_WIDEN); ! if (tem != 0) { ! /* Extract the high half of the just generated product. */ ! tem = expand_shift (RSHIFT_EXPR, wider_mode, tem, ! build_int_2 (size, 0), NULL_RTX, 1); ! tem = convert_modes (mode, wider_mode, tem, unsignedp); ! /* We used the wrong signedness. Adjust the result. */ ! return expand_mult_highpart_adjust (mode, tem, op0, op1, ! target, unsignedp); } } + return 0; + + try: /* Pass NULL_RTX as target since TARGET has wrong mode. */ tem = expand_binop (wider_mode, moptab, op0, wide_op1, *************** *** 2556,2560 **** tem = expand_shift (RSHIFT_EXPR, wider_mode, tem, build_int_2 (size, 0), NULL_RTX, 1); ! return gen_lowpart (mode, tem); } --- 2650,2654 ---- tem = expand_shift (RSHIFT_EXPR, wider_mode, tem, build_int_2 (size, 0), NULL_RTX, 1); ! return convert_modes (mode, wider_mode, tem, unsignedp); } *************** *** 2594,2597 **** --- 2688,2692 ---- optab optab1, optab2; int op1_is_constant, op1_is_pow2; + int max_cost, extra_cost; op1_is_constant = GET_CODE (op1) == CONST_INT; *************** *** 2698,2706 **** #if 0 /* It should be possible to restrict the precision to GET_MODE_BITSIZE ! (mode), and thereby get better code when OP1 is a constant. Do that for ! GCC 2.7. It will require going over all usages of SIZE below. */ size = GET_MODE_BITSIZE (mode); #endif /* Now convert to the best mode to use. */ if (compute_mode != mode) --- 2793,2804 ---- #if 0 /* It should be possible to restrict the precision to GET_MODE_BITSIZE ! (mode), and thereby get better code when OP1 is a constant. Do that ! later. It will require going over all usages of SIZE below. */ size = GET_MODE_BITSIZE (mode); #endif + max_cost = div_cost[(int) compute_mode] + - (rem_flag ? mul_cost[(int) compute_mode] + add_cost : 0); + /* Now convert to the best mode to use. */ if (compute_mode != mode) *************** *** 2724,2728 **** last = get_last_insn (); ! /* Promote floor rouding to trunc rounding for unsigned operations. */ if (unsignedp) { --- 2822,2826 ---- last = get_last_insn (); ! /* Promote floor rounding to trunc rounding for unsigned operations. */ if (unsignedp) { *************** *** 2740,2746 **** if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size) { ! if (unsignedp ! || (INTVAL (op1) ! == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (compute_mode) - 1))) { unsigned HOST_WIDE_INT mh, ml; --- 2838,2842 ---- if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size) { ! if (unsignedp) { unsigned HOST_WIDE_INT mh, ml; *************** *** 2772,2776 **** quotient = emit_store_flag (tquotient, GEU, op0, op1, compute_mode, 1, 1); - /* Can emit_store_flag have failed? */ if (quotient == 0) goto fail1; --- 2868,2871 ---- *************** *** 2803,2808 **** rtx t1, t2, t3, t4; t1 = expand_mult_highpart (compute_mode, op0, ml, ! NULL_RTX, 1); if (t1 == 0) goto fail1; --- 2898,2906 ---- rtx t1, t2, t3, t4; + extra_cost = (shift_cost[post_shift - 1] + + shift_cost[1] + 2 * add_cost); t1 = expand_mult_highpart (compute_mode, op0, ml, ! NULL_RTX, 1, ! max_cost - extra_cost); if (t1 == 0) goto fail1; *************** *** 2827,2832 **** build_int_2 (pre_shift, 0), NULL_RTX, 1); t2 = expand_mult_highpart (compute_mode, t1, ml, ! NULL_RTX, 1); if (t2 == 0) goto fail1; --- 2925,2933 ---- build_int_2 (pre_shift, 0), NULL_RTX, 1); + extra_cost = (shift_cost[pre_shift] + + shift_cost[post_shift]); t2 = expand_mult_highpart (compute_mode, t1, ml, ! NULL_RTX, 1, ! max_cost - extra_cost); if (t2 == 0) goto fail1; *************** *** 2865,2868 **** --- 2966,2977 ---- quotient = expand_unop (compute_mode, neg_optab, op0, tquotient, 0); + else if (abs_d == (unsigned HOST_WIDE_INT) 1 << (size - 1)) + { + /* This case is not handled correctly below. */ + quotient = emit_store_flag (tquotient, EQ, op0, op1, + compute_mode, 1, 1); + if (quotient == 0) + goto fail1; + } else if (EXACT_POWER_OF_2_OR_ZERO_P (d) && (rem_flag ? smod_pow2_cheap : sdiv_pow2_cheap)) *************** *** 2929,2934 **** rtx t1, t2, t3; t1 = expand_mult_highpart (compute_mode, op0, ml, ! NULL_RTX, 0); if (t1 == 0) goto fail1; --- 3038,3046 ---- rtx t1, t2, t3; + extra_cost = (shift_cost[post_shift] + + shift_cost[size - 1] + add_cost); t1 = expand_mult_highpart (compute_mode, op0, ml, ! NULL_RTX, 0, ! max_cost - extra_cost); if (t1 == 0) goto fail1; *************** *** 2949,2954 **** ml |= (~(unsigned HOST_WIDE_INT) 0) << (size - 1); t1 = expand_mult_highpart (compute_mode, op0, ml, ! NULL_RTX, 0); if (t1 == 0) goto fail1; --- 3061,3069 ---- ml |= (~(unsigned HOST_WIDE_INT) 0) << (size - 1); + extra_cost = (shift_cost[post_shift] + + shift_cost[size - 1] + 2 * add_cost); t1 = expand_mult_highpart (compute_mode, op0, ml, ! NULL_RTX, 0, ! max_cost - extra_cost); if (t1 == 0) goto fail1; *************** *** 3024,3029 **** t2 = expand_binop (compute_mode, xor_optab, op0, t1, NULL_RTX, 0, OPTAB_WIDEN); t3 = expand_mult_highpart (compute_mode, t2, ml, ! NULL_RTX, 1); if (t3 != 0) { --- 3139,3147 ---- t2 = expand_binop (compute_mode, xor_optab, op0, t1, NULL_RTX, 0, OPTAB_WIDEN); + extra_cost = (shift_cost[post_shift] + + shift_cost[size - 1] + 2 * add_cost); t3 = expand_mult_highpart (compute_mode, t2, ml, ! NULL_RTX, 1, ! max_cost - extra_cost); if (t3 != 0) { *************** *** 3073,3084 **** if (target == 0) target = gen_reg_rtx (compute_mode); if (rem_flag) { ! remainder = target; quotient = gen_reg_rtx (compute_mode); } else { ! quotient = target; remainder = gen_reg_rtx (compute_mode); } --- 3191,3205 ---- if (target == 0) target = gen_reg_rtx (compute_mode); + if (rem_flag) { ! remainder ! = GET_CODE (target) == REG ? target : gen_reg_rtx (compute_mode); quotient = gen_reg_rtx (compute_mode); } else { ! quotient ! = GET_CODE (target) == REG ? target : gen_reg_rtx (compute_mode); remainder = gen_reg_rtx (compute_mode); } *************** *** 3197,3208 **** if (target == 0) target = gen_reg_rtx (compute_mode); if (rem_flag) { ! remainder = target; quotient = gen_reg_rtx (compute_mode); } else { ! quotient = target; remainder = gen_reg_rtx (compute_mode); } --- 3318,3332 ---- if (target == 0) target = gen_reg_rtx (compute_mode); + if (rem_flag) { ! remainder = (GET_CODE (target) == REG ! ? target : gen_reg_rtx (compute_mode)); quotient = gen_reg_rtx (compute_mode); } else { ! quotient = (GET_CODE (target) == REG ! ? target : gen_reg_rtx (compute_mode)); remainder = gen_reg_rtx (compute_mode); } *************** *** 3298,3307 **** if (rem_flag) { ! remainder = target; quotient = gen_reg_rtx (compute_mode); } else { ! quotient = target; remainder = gen_reg_rtx (compute_mode); } --- 3422,3433 ---- if (rem_flag) { ! remainder= (GET_CODE (target) == REG ! ? target : gen_reg_rtx (compute_mode)); quotient = gen_reg_rtx (compute_mode); } else { ! quotient = (GET_CODE (target) == REG ! ? target : gen_reg_rtx (compute_mode)); remainder = gen_reg_rtx (compute_mode); } *************** *** 3727,3736 **** enum machine_mode target_mode = GET_MODE (target); rtx tem; ! rtx last = 0; rtx pattern, comparison; - if (mode == VOIDmode) - mode = GET_MODE (op0); - /* If one operand is constant, make it the second one. Only do this if the other operand is not constant as well. */ --- 3853,3859 ---- enum machine_mode target_mode = GET_MODE (target); rtx tem; ! rtx last = get_last_insn (); rtx pattern, comparison; /* If one operand is constant, make it the second one. Only do this if the other operand is not constant as well. */ *************** *** 3745,3748 **** --- 3868,3874 ---- } + if (mode == VOIDmode) + mode = GET_MODE (op0); + /* For some comparisons with 1 and -1, we can convert this to comparisons with zero. This will often produce more opportunities for *************** *** 3925,3932 **** } ! if (last) ! delete_insns_since (last); ! subtarget = target_mode == mode ? target : 0; /* If we reached here, we can't do this with a scc insn. However, there --- 4051,4061 ---- } ! delete_insns_since (last); ! /* If expensive optimizations, use different pseudo registers for each ! insn, instead of reusing the same pseudo. This leads to better CSE, ! but slows down the compiler, since there are more pseudos */ ! subtarget = (!flag_expensive_optimizations ! && (target_mode == mode)) ? target : NULL_RTX; /* If we reached here, we can't do this with a scc insn. However, there *************** *** 4073,4085 **** tem = expand_shift (RSHIFT_EXPR, mode, tem, size_int (GET_MODE_BITSIZE (mode) - 1), ! tem, normalizep == 1); ! if (tem && GET_MODE (tem) != target_mode) { ! convert_move (target, tem, 0); ! tem = target; } ! ! if (tem == 0) delete_insns_since (last); --- 4202,4221 ---- tem = expand_shift (RSHIFT_EXPR, mode, tem, size_int (GET_MODE_BITSIZE (mode) - 1), ! subtarget, normalizep == 1); ! if (tem) { ! if (GET_MODE (tem) != target_mode) ! { ! convert_move (target, tem, 0); ! tem = target; ! } ! else if (!subtarget) ! { ! emit_move_insn (target, tem); ! tem = target; ! } } ! else delete_insns_since (last); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/expr.c gcc-2.7.0/expr.c *** gcc-2.6.3/expr.c Wed Nov 30 19:08:49 1994 --- gcc-2.7.0/expr.c Thu Jun 15 07:31:31 1995 *************** *** 1,4 **** /* Convert tree expression to rtl instructions, for GNU compiler. ! Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Convert tree expression to rtl instructions, for GNU compiler. ! Copyright (C) 1988, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 119,126 **** --- 120,129 ---- int autinc_to; int explicit_inc_to; + int to_struct; rtx from; rtx from_addr; int autinc_from; int explicit_inc_from; + int from_struct; int len; int offset; *************** *** 216,220 **** #ifndef SLOW_UNALIGNED_ACCESS ! #define SLOW_UNALIGNED_ACCESS 0 #endif --- 219,223 ---- #ifndef SLOW_UNALIGNED_ACCESS ! #define SLOW_UNALIGNED_ACCESS STRICT_ALIGNMENT #endif *************** *** 1082,1085 **** --- 1085,1091 ---- || GET_CODE (from) == SUBREG)) from = force_reg (from_mode, from); + if (GET_CODE (from) == REG && REGNO (from) < FIRST_PSEUDO_REGISTER + && ! HARD_REGNO_MODE_OK (REGNO (from), to_mode)) + from = copy_to_reg (from); emit_move_insn (to, gen_lowpart (to_mode, from)); return; *************** *** 1093,1102 **** != CODE_FOR_nothing) { - /* If FROM is a SUBREG, put it into a register. Do this - so that we always generate the same set of insns for - better cse'ing; if an intermediate assignment occurred, - we won't be doing the operation directly on the SUBREG. */ - if (optimize > 0 && GET_CODE (from) == SUBREG) - from = force_reg (from_mode, from); emit_unop_insn (code, to, from, equiv_code); return; --- 1099,1102 ---- *************** *** 1416,1419 **** --- 1416,1422 ---- data.len = len; + data.to_struct = MEM_IN_STRUCT_P (to); + data.from_struct = MEM_IN_STRUCT_P (from); + /* If copying requires more than two move insns, copy addresses to registers (to make displacements shorter) *************** *** 1460,1464 **** } ! if (! (STRICT_ALIGNMENT || SLOW_UNALIGNED_ACCESS) || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; --- 1463,1467 ---- } ! if (! SLOW_UNALIGNED_ACCESS || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; *************** *** 1505,1509 **** int max_size = MOVE_MAX + 1; ! if (! (STRICT_ALIGNMENT || SLOW_UNALIGNED_ACCESS) || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; --- 1508,1512 ---- int max_size = MOVE_MAX + 1; ! if (! SLOW_UNALIGNED_ACCESS || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; *************** *** 1555,1558 **** --- 1558,1562 ---- : change_address (data->to, mode, plus_constant (data->to_addr, data->offset))); + MEM_IN_STRUCT_P (to1) = data->to_struct; from1 = (data->autinc_from *************** *** 1560,1563 **** --- 1564,1568 ---- : change_address (data->from, mode, plus_constant (data->from_addr, data->offset))); + MEM_IN_STRUCT_P (from1) = data->from_struct; #ifdef HAVE_PRE_DECREMENT *************** *** 1836,1846 **** emit_library_call (memset_libfunc, 0, VOIDmode, 3, ! XEXP (object, 0), Pmode, const0_rtx, Pmode, ! GEN_INT (size), Pmode); #else emit_library_call (bzero_libfunc, 0, VOIDmode, 2, XEXP (object, 0), Pmode, ! GEN_INT (size), Pmode); #endif } --- 1841,1851 ---- emit_library_call (memset_libfunc, 0, VOIDmode, 3, ! XEXP (object, 0), Pmode, const0_rtx, ptr_mode, ! GEN_INT (size), ptr_mode); #else emit_library_call (bzero_libfunc, 0, VOIDmode, 2, XEXP (object, 0), Pmode, ! GEN_INT (size), ptr_mode); #endif } *************** *** 2025,2028 **** --- 2030,2035 ---- { register rtx temp; + + size = convert_modes (Pmode, ptr_mode, size, 1); if (CONSTANT_P (size)) anti_adjust_stack (plus_constant (size, extra)); *************** *** 2168,2172 **** forces many pushes of a small amount of data, and such small pushes do rounding that causes trouble. */ ! && ((! STRICT_ALIGNMENT && ! SLOW_UNALIGNED_ACCESS) || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT || PUSH_ROUNDING (align) == align) --- 2175,2179 ---- forces many pushes of a small amount of data, and such small pushes do rounding that causes trouble. */ ! && ((! SLOW_UNALIGNED_ACCESS) || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT || PUSH_ROUNDING (align) == align) *************** *** 2471,2475 **** && ((TREE_CODE (TREE_OPERAND (to, 1)) == INTEGER_CST && TREE_CODE (TYPE_SIZE (TREE_TYPE (to))) == INTEGER_CST) ! || (STRICT_ALIGNMENT && get_inner_unaligned_p (to))))) { enum machine_mode mode1; --- 2478,2482 ---- && ((TREE_CODE (TREE_OPERAND (to, 1)) == INTEGER_CST && TREE_CODE (TYPE_SIZE (TREE_TYPE (to))) == INTEGER_CST) ! || (SLOW_UNALIGNED_ACCESS && get_inner_unaligned_p (to))))) { enum machine_mode mode1; *************** *** 2501,2506 **** abort (); to_rtx = change_address (to_rtx, VOIDmode, ! gen_rtx (PLUS, Pmode, XEXP (to_rtx, 0), ! force_reg (Pmode, offset_rtx))); /* If we have a variable offset, the known alignment is only that of the innermost structure containing the field. --- 2508,2513 ---- abort (); to_rtx = change_address (to_rtx, VOIDmode, ! gen_rtx (PLUS, ptr_mode, XEXP (to_rtx, 0), ! force_reg (ptr_mode, offset_rtx))); /* If we have a variable offset, the known alignment is only that of the innermost structure containing the field. *************** *** 2515,2519 **** { if (GET_CODE (to_rtx) == MEM) ! MEM_VOLATILE_P (to_rtx) = 1; #if 0 /* This was turned off because, when a field is volatile in an object which is not volatile, the object may be in a register, --- 2522,2533 ---- { if (GET_CODE (to_rtx) == MEM) ! { ! /* When the offset is zero, to_rtx is the address of the ! structure we are storing into, and hence may be shared. ! We must make a new MEM before setting the volatile bit. */ ! if (offset == 0) ! to_rtx = change_address (to_rtx, VOIDmode, XEXP (to_rtx, 0)); ! MEM_VOLATILE_P (to_rtx) = 1; ! } #if 0 /* This was turned off because, when a field is volatile in an object which is not volatile, the object may be in a register, *************** *** 2565,2569 **** if (to_rtx == 0) to_rtx = expand_expr (to, NULL_RTX, VOIDmode, 0); ! emit_move_insn (to_rtx, value); preserve_temp_slots (to_rtx); free_temp_slots (); --- 2579,2590 ---- if (to_rtx == 0) to_rtx = expand_expr (to, NULL_RTX, VOIDmode, 0); ! ! if (GET_MODE (to_rtx) == BLKmode) ! { ! int align = MIN (TYPE_ALIGN (TREE_TYPE (from)), BITS_PER_WORD); ! emit_block_move (to_rtx, value, expr_size (from), align); ! } ! else ! emit_move_insn (to_rtx, value); preserve_temp_slots (to_rtx); free_temp_slots (); *************** *** 2742,2750 **** expression. */ { temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); /* If TEMP is a volatile MEM and we want a result value, make the access now so it gets done only once. */ ! if (GET_CODE (temp) == MEM && MEM_VOLATILE_P (temp)) temp = copy_to_reg (temp); --- 2763,2790 ---- expression. */ { + /* If we don't want a value, we can do the conversion inside EXP, + which will often result in some optimizations. Do the conversion + in two steps: first change the signedness, if needed, then + the extend. */ + if (! want_value) + { + if (TREE_UNSIGNED (TREE_TYPE (exp)) + != SUBREG_PROMOTED_UNSIGNED_P (target)) + exp + = convert + (signed_or_unsigned_type (SUBREG_PROMOTED_UNSIGNED_P (target), + TREE_TYPE (exp)), + exp); + + exp = convert (type_for_mode (GET_MODE (SUBREG_REG (target)), + SUBREG_PROMOTED_UNSIGNED_P (target)), + exp); + } + temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); /* If TEMP is a volatile MEM and we want a result value, make the access now so it gets done only once. */ ! if (GET_CODE (temp) == MEM && MEM_VOLATILE_P (temp) && want_value) temp = copy_to_reg (temp); *************** *** 2841,2862 **** TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT); ! /* Figure out how much is left in TARGET ! that we have to clear. */ if (GET_CODE (copy_size_rtx) == CONST_INT) { ! addr = plus_constant (XEXP (target, 0), ! TREE_STRING_LENGTH (exp)); size = plus_constant (size, - TREE_STRING_LENGTH (exp)); } else { ! enum machine_mode size_mode = Pmode; ! ! addr = force_reg (Pmode, XEXP (target, 0)); ! addr = expand_binop (size_mode, add_optab, addr, copy_size_rtx, NULL_RTX, 0, OPTAB_LIB_WIDEN); ! size = expand_binop (size_mode, sub_optab, size, copy_size_rtx, NULL_RTX, 0, OPTAB_LIB_WIDEN); --- 2881,2903 ---- TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT); ! /* Figure out how much is left in TARGET that we have to clear. ! Do all calculations in ptr_mode. */ ! ! addr = XEXP (target, 0); ! addr = convert_modes (ptr_mode, Pmode, addr, 1); ! if (GET_CODE (copy_size_rtx) == CONST_INT) { ! addr = plus_constant (addr, TREE_STRING_LENGTH (exp)); size = plus_constant (size, - TREE_STRING_LENGTH (exp)); } else { ! addr = force_reg (ptr_mode, addr); ! addr = expand_binop (ptr_mode, add_optab, addr, copy_size_rtx, NULL_RTX, 0, OPTAB_LIB_WIDEN); ! size = expand_binop (ptr_mode, sub_optab, size, copy_size_rtx, NULL_RTX, 0, OPTAB_LIB_WIDEN); *************** *** 2872,2879 **** #ifdef TARGET_MEM_FUNCTIONS emit_library_call (memset_libfunc, 0, VOIDmode, 3, addr, ! Pmode, const0_rtx, Pmode, size, Pmode); #else emit_library_call (bzero_libfunc, 0, VOIDmode, 2, ! addr, Pmode, size, Pmode); #endif } --- 2913,2920 ---- #ifdef TARGET_MEM_FUNCTIONS emit_library_call (memset_libfunc, 0, VOIDmode, 3, addr, ! Pmode, const0_rtx, Pmode, size, ptr_mode); #else emit_library_call (bzero_libfunc, 0, VOIDmode, 2, ! addr, Pmode, size, ptr_mode); #endif } *************** *** 2945,2950 **** /* If we are building a static constructor into a register, set the initial value as zero so we can fold the value into ! a constant. */ ! else if (GET_CODE (target) == REG && TREE_STATIC (exp)) emit_move_insn (target, const0_rtx); --- 2986,2993 ---- /* If we are building a static constructor into a register, set the initial value as zero so we can fold the value into ! a constant. But if more than one register is involved, ! this probably loses. */ ! else if (GET_CODE (target) == REG && TREE_STATIC (exp) ! && GET_MODE_SIZE (GET_MODE (target)) <= UNITS_PER_WORD) emit_move_insn (target, const0_rtx); *************** *** 2993,2997 **** if (constant) ! bitpos = TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field)); if (offset) --- 3036,3040 ---- if (constant) ! bitpos = TREE_INT_CST_LOW (constant); if (offset) *************** *** 3012,3017 **** to_rtx = change_address (to_rtx, VOIDmode, ! gen_rtx (PLUS, Pmode, XEXP (to_rtx, 0), ! force_reg (Pmode, offset_rtx))); } --- 3055,3060 ---- to_rtx = change_address (to_rtx, VOIDmode, ! gen_rtx (PLUS, ptr_mode, XEXP (to_rtx, 0), ! force_reg (ptr_mode, offset_rtx))); } *************** *** 3062,3073 **** unsignedp = TREE_UNSIGNED (elttype); ! if (index != 0 && TREE_CODE (index) != INTEGER_CST) { - /* We don't currently allow variable indices in a - C initializer, but let's try here to support them. */ rtx pos_rtx, addr, xtarget; tree position; ! position = size_binop (MULT_EXPR, index, TYPE_SIZE (elttype)); pos_rtx = expand_expr (position, 0, VOIDmode, 0); addr = gen_rtx (PLUS, Pmode, XEXP (target, 0), pos_rtx); --- 3105,3120 ---- unsignedp = TREE_UNSIGNED (elttype); ! if ((index != 0 && TREE_CODE (index) != INTEGER_CST) ! || TREE_CODE (TYPE_SIZE (elttype)) != INTEGER_CST) { rtx pos_rtx, addr, xtarget; tree position; ! if (index == 0) ! index = size_int (i); ! ! position = size_binop (EXACT_DIV_EXPR, TYPE_SIZE (elttype), ! size_int (BITS_PER_UNIT)); ! position = size_binop (MULT_EXPR, index, position); pos_rtx = expand_expr (position, 0, VOIDmode, 0); addr = gen_rtx (PLUS, Pmode, XEXP (target, 0), pos_rtx); *************** *** 3092,3095 **** --- 3139,3317 ---- } } + /* set constructor assignments */ + else if (TREE_CODE (type) == SET_TYPE) + { + tree elt; + rtx xtarget = XEXP (target, 0); + int set_word_size = TYPE_ALIGN (type); + int nbytes = int_size_in_bytes (type); + tree non_const_elements; + int need_to_clear_first; + tree domain = TYPE_DOMAIN (type); + tree domain_min, domain_max, bitlength; + + /* The default implementation strategy is to extract the constant + parts of the constructor, use that to initialize the target, + and then "or" in whatever non-constant ranges we need in addition. + + If a large set is all zero or all ones, it is + probably better to set it using memset (if available) or bzero. + Also, if a large set has just a single range, it may also be + better to first clear all the first clear the set (using + bzero/memset), and set the bits we want. */ + + /* Check for all zeros. */ + if (CONSTRUCTOR_ELTS (exp) == NULL_TREE) + { + clear_storage (target, nbytes); + return; + } + + if (nbytes < 0) + abort(); + + domain_min = convert (sizetype, TYPE_MIN_VALUE (domain)); + domain_max = convert (sizetype, TYPE_MAX_VALUE (domain)); + bitlength = size_binop (PLUS_EXPR, + size_binop (MINUS_EXPR, domain_max, domain_min), + size_one_node); + + /* Check for range all ones, or at most a single range. + (This optimization is only a win for big sets.) */ + if (GET_MODE (target) == BLKmode && nbytes > 16 + && TREE_CHAIN (CONSTRUCTOR_ELTS (exp)) == NULL_TREE) + { + need_to_clear_first = 1; + non_const_elements = CONSTRUCTOR_ELTS (exp); + } + else + { + int nbits = nbytes * BITS_PER_UNIT; + int set_word_size = TYPE_ALIGN (TREE_TYPE (exp)); + enum machine_mode mode = mode_for_size (set_word_size, MODE_INT, 1); + char *bit_buffer = (char*) alloca (nbits); + HOST_WIDE_INT word = 0; + int bit_pos = 0; + int ibit = 0; + int offset = 0; /* In bytes from beginning of set. */ + non_const_elements = get_set_constructor_bits (exp, + bit_buffer, nbits); + for (;;) + { + if (bit_buffer[ibit]) + { + if (BYTES_BIG_ENDIAN) + word |= (1 << (set_word_size - 1 - bit_pos)); + else + word |= 1 << bit_pos; + } + bit_pos++; ibit++; + if (bit_pos >= set_word_size || ibit == nbits) + { + rtx datum = GEN_INT (word); + rtx to_rtx; + /* The assumption here is that it is safe to use XEXP if + the set is multi-word, but not if it's single-word. */ + if (GET_CODE (target) == MEM) + to_rtx = change_address (target, mode, + plus_constant (XEXP (target, 0), + offset)); + else if (offset == 0) + to_rtx = target; + else + abort (); + emit_move_insn (to_rtx, datum); + if (ibit == nbits) + break; + word = 0; + bit_pos = 0; + offset += set_word_size / BITS_PER_UNIT; + } + } + need_to_clear_first = 0; + } + + for (elt = non_const_elements; elt != NULL_TREE; elt = TREE_CHAIN (elt)) + { + /* start of range of element or NULL */ + tree startbit = TREE_PURPOSE (elt); + /* end of range of element, or element value */ + tree endbit = TREE_VALUE (elt); + HOST_WIDE_INT startb, endb; + rtx bitlength_rtx, startbit_rtx, endbit_rtx, targetx; + + bitlength_rtx = expand_expr (bitlength, + NULL_RTX, MEM, EXPAND_CONST_ADDRESS); + + /* handle non-range tuple element like [ expr ] */ + if (startbit == NULL_TREE) + { + startbit = save_expr (endbit); + endbit = startbit; + } + startbit = convert (sizetype, startbit); + endbit = convert (sizetype, endbit); + if (! integer_zerop (domain_min)) + { + startbit = size_binop (MINUS_EXPR, startbit, domain_min); + endbit = size_binop (MINUS_EXPR, endbit, domain_min); + } + startbit_rtx = expand_expr (startbit, NULL_RTX, MEM, + EXPAND_CONST_ADDRESS); + endbit_rtx = expand_expr (endbit, NULL_RTX, MEM, + EXPAND_CONST_ADDRESS); + + if (REG_P (target)) + { + targetx = assign_stack_temp (GET_MODE (target), + GET_MODE_SIZE (GET_MODE (target)), + 0); + emit_move_insn (targetx, target); + } + else if (GET_CODE (target) == MEM) + targetx = target; + else + abort (); + + #ifdef TARGET_MEM_FUNCTIONS + /* Optimization: If startbit and endbit are + constants divisible by BITS_PER_UNIT, + call memset instead. */ + if (TREE_CODE (startbit) == INTEGER_CST + && TREE_CODE (endbit) == INTEGER_CST + && (startb = TREE_INT_CST_LOW (startbit)) % BITS_PER_UNIT == 0 + && (endb = TREE_INT_CST_LOW (endbit)) % BITS_PER_UNIT == 0) + { + + if (need_to_clear_first + && endb - startb != nbytes * BITS_PER_UNIT) + clear_storage (target, nbytes); + need_to_clear_first = 0; + emit_library_call (memset_libfunc, 0, + VOIDmode, 3, + plus_constant (XEXP (targetx, 0), startb), + Pmode, + constm1_rtx, Pmode, + GEN_INT ((endb - startb) / BITS_PER_UNIT), + Pmode); + } + else + #endif + { + if (need_to_clear_first) + { + clear_storage (target, nbytes); + need_to_clear_first = 0; + } + emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__setbits"), + 0, VOIDmode, 4, XEXP (targetx, 0), Pmode, + bitlength_rtx, TYPE_MODE (sizetype), + startbit_rtx, TYPE_MODE (sizetype), + endbit_rtx, TYPE_MODE (sizetype)); + } + if (REG_P (target)) + emit_move_insn (target, targetx); + } + } else *************** *** 3174,3180 **** /* If the field isn't aligned enough to store as an ordinary memref, store it as a bit field. */ ! || (STRICT_ALIGNMENT && align * BITS_PER_UNIT < GET_MODE_ALIGNMENT (mode)) ! || (STRICT_ALIGNMENT && bitpos % GET_MODE_ALIGNMENT (mode) != 0)) { rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); --- 3396,3402 ---- /* If the field isn't aligned enough to store as an ordinary memref, store it as a bit field. */ ! || (SLOW_UNALIGNED_ACCESS && align * BITS_PER_UNIT < GET_MODE_ALIGNMENT (mode)) ! || (SLOW_UNALIGNED_ACCESS && bitpos % GET_MODE_ALIGNMENT (mode) != 0)) { rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); *************** *** 3348,3351 **** --- 3570,3574 ---- ? DECL_FIELD_BITPOS (TREE_OPERAND (exp, 1)) : TREE_OPERAND (exp, 2)); + tree constant = integer_zero_node, var = pos; /* If this field hasn't been filled in yet, don't go *************** *** 3355,3389 **** break; ! if (TREE_CODE (pos) == PLUS_EXPR) ! { ! tree constant, var; ! if (TREE_CODE (TREE_OPERAND (pos, 0)) == INTEGER_CST) ! { ! constant = TREE_OPERAND (pos, 0); ! var = TREE_OPERAND (pos, 1); ! } ! else if (TREE_CODE (TREE_OPERAND (pos, 1)) == INTEGER_CST) ! { ! constant = TREE_OPERAND (pos, 1); ! var = TREE_OPERAND (pos, 0); ! } ! else ! abort (); ! ! *pbitpos += TREE_INT_CST_LOW (constant); ! offset = size_binop (PLUS_EXPR, offset, ! size_binop (FLOOR_DIV_EXPR, var, ! size_int (BITS_PER_UNIT))); ! } else if (TREE_CODE (pos) == INTEGER_CST) ! *pbitpos += TREE_INT_CST_LOW (pos); ! else ! { ! /* Assume here that the offset is a multiple of a unit. ! If not, there should be an explicitly added constant. */ ! offset = size_binop (PLUS_EXPR, offset, ! size_binop (FLOOR_DIV_EXPR, pos, ! size_int (BITS_PER_UNIT))); ! } } --- 3578,3595 ---- break; ! /* Assume here that the offset is a multiple of a unit. ! If not, there should be an explicitly added constant. */ ! if (TREE_CODE (pos) == PLUS_EXPR ! && TREE_CODE (TREE_OPERAND (pos, 1)) == INTEGER_CST) ! constant = TREE_OPERAND (pos, 1), var = TREE_OPERAND (pos, 0); else if (TREE_CODE (pos) == INTEGER_CST) ! constant = pos, var = integer_zero_node; ! ! *pbitpos += TREE_INT_CST_LOW (constant); ! ! if (var) ! offset = size_binop (PLUS_EXPR, offset, ! size_binop (EXACT_DIV_EXPR, var, ! size_int (BITS_PER_UNIT))); } *************** *** 3423,3426 **** --- 3629,3635 ---- && ! ((TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR) + && ! (TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE + && (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) + != UNION_TYPE)) && (TYPE_MODE (TREE_TYPE (exp)) == TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))))) *************** *** 3553,3556 **** --- 3762,3766 ---- rtx target = assign_stack_temp (TYPE_MODE (part_type), int_size_in_bytes (part_type), 0); + MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (part_type); if (! memory_address_p (TYPE_MODE (part_type), XEXP (target, 0))) target = change_address (target, TYPE_MODE (part_type), NULL_RTX); *************** *** 4102,4105 **** --- 4312,4317 ---- MEM_IN_STRUCT_P (temp) = AGGREGATE_TYPE_P (type); } + else if (mode == VOIDmode) + temp = const0_rtx; else temp = gen_reg_rtx (promote_mode (type, mode, &unsignedp, 0)); *************** *** 4123,4127 **** } ! store_expr (TREE_OPERAND (exp, 0), temp, 0); } --- 4335,4342 ---- } ! if (temp == const0_rtx) ! expand_expr (TREE_OPERAND (exp, 0), const0_rtx, VOIDmode, 0); ! else ! store_expr (TREE_OPERAND (exp, 0), temp, 0); } *************** *** 4153,4157 **** for (object = TREE_PURPOSE (placeholder_list); ! TREE_TYPE (object) != type && (TREE_CODE_CLASS (TREE_CODE (object)) == 'r' || TREE_CODE_CLASS (TREE_CODE (object)) == '1' --- 4368,4373 ---- for (object = TREE_PURPOSE (placeholder_list); ! (TYPE_MAIN_VARIANT (TREE_TYPE (object)) ! != TYPE_MAIN_VARIANT (type)) && (TREE_CODE_CLASS (TREE_CODE (object)) == 'r' || TREE_CODE_CLASS (TREE_CODE (object)) == '1' *************** *** 4161,4165 **** ; ! if (object && TREE_TYPE (object) == type) { /* Expand this object skipping the list entries before --- 4377,4383 ---- ; ! if (object != 0 ! && (TYPE_MAIN_VARIANT (TREE_TYPE (object)) ! == TYPE_MAIN_VARIANT (type))) { /* Expand this object skipping the list entries before *************** *** 4267,4272 **** || (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST && (move_by_pieces_ninsns ! (TREE_INT_CST_LOW (TYPE_SIZE (type)), ! TYPE_ALIGN (type)) > MOVE_RATIO)))) || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp))) --- 4485,4490 ---- || (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST && (move_by_pieces_ninsns ! (TREE_INT_CST_LOW (TYPE_SIZE (type))/BITS_PER_UNIT, ! TYPE_ALIGN (type) / BITS_PER_UNIT) > MOVE_RATIO)))) || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp))) *************** *** 4316,4322 **** if (TREE_CODE (exp1) == SAVE_EXPR && SAVE_EXPR_RTL (exp1) == 0 ! && TREE_CODE (exp2 = TREE_OPERAND (exp1, 0)) != ERROR_MARK ! && TYPE_MODE (TREE_TYPE (exp1)) == Pmode ! && TYPE_MODE (TREE_TYPE (exp2)) == Pmode) { temp = expand_expr (TREE_OPERAND (exp1, 0), NULL_RTX, --- 4534,4538 ---- if (TREE_CODE (exp1) == SAVE_EXPR && SAVE_EXPR_RTL (exp1) == 0 ! && TYPE_MODE (TREE_TYPE (exp1)) == ptr_mode) { temp = expand_expr (TREE_OPERAND (exp1, 0), NULL_RTX, *************** *** 4344,4352 **** MEM_IN_STRUCT_P (temp) = 1; MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp) | flag_volatile; ! #if 0 /* It is incorrect to set RTX_UNCHANGING_P here, because the fact that ! a location is accessed through a pointer to const does not mean ! that the value there can never change. */ ! RTX_UNCHANGING_P (temp) = TREE_READONLY (exp); ! #endif return temp; } --- 4560,4570 ---- MEM_IN_STRUCT_P (temp) = 1; MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp) | flag_volatile; ! ! /* It is incorrect to set RTX_UNCHANGING_P from TREE_READONLY ! here, because, in C and C++, the fact that a location is accessed ! through a pointer to const does not mean that the value there can ! never change. Languages where it can never change should ! also set TREE_STATIC. */ ! RTX_UNCHANGING_P (temp) = TREE_READONLY (exp) | TREE_STATIC (exp); return temp; } *************** *** 4385,4389 **** if ((TREE_CODE (index) != INTEGER_CST || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) ! && (! STRICT_ALIGNMENT || ! get_inner_unaligned_p (exp))) { /* Nonconstant array index or nonconstant element size, and --- 4603,4607 ---- if ((TREE_CODE (index) != INTEGER_CST || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) ! && (! SLOW_UNALIGNED_ACCESS || ! get_inner_unaligned_p (exp))) { /* Nonconstant array index or nonconstant element size, and *************** *** 4561,4566 **** abort (); op0 = change_address (op0, VOIDmode, ! gen_rtx (PLUS, Pmode, XEXP (op0, 0), ! force_reg (Pmode, offset_rtx))); /* If we have a variable offset, the known alignment is only that of the innermost structure containing the field. --- 4779,4784 ---- abort (); op0 = change_address (op0, VOIDmode, ! gen_rtx (PLUS, ptr_mode, XEXP (op0, 0), ! force_reg (ptr_mode, offset_rtx))); /* If we have a variable offset, the known alignment is only that of the innermost structure containing the field. *************** *** 4587,4599 **** storing into memory, and changing the mode to BLKmode. */ if (mode1 == VOIDmode - || (mode1 != BLKmode && ! direct_load[(int) mode1] - && modifier != EXPAND_CONST_ADDRESS - && modifier != EXPAND_SUM && modifier != EXPAND_INITIALIZER) || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG ! /* If the field isn't aligned enough to fetch as a memref, ! fetch it as a bit field. */ ! || (STRICT_ALIGNMENT ! && TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)) ! || (STRICT_ALIGNMENT && bitpos % GET_MODE_ALIGNMENT (mode) != 0)) { enum machine_mode ext_mode = mode; --- 4805,4818 ---- storing into memory, and changing the mode to BLKmode. */ if (mode1 == VOIDmode || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG ! || (modifier != EXPAND_CONST_ADDRESS ! && modifier != EXPAND_SUM ! && modifier != EXPAND_INITIALIZER ! && ((mode1 != BLKmode && ! direct_load[(int) mode1]) ! /* If the field isn't aligned enough to fetch as a memref, ! fetch it as a bit field. */ ! || (SLOW_UNALIGNED_ACCESS ! && ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)) ! || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))))) { enum machine_mode ext_mode = mode; *************** *** 4793,4797 **** push_temp_slots (); target_temp_slot_level = temp_slot_level; ! op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, modifier); expand_cleanups_to (old_cleanups); preserve_temp_slots (op0); --- 5012,5019 ---- push_temp_slots (); target_temp_slot_level = temp_slot_level; ! op0 = expand_expr (TREE_OPERAND (exp, 0), target, tmode, modifier); ! /* If we're going to use this value, load it up now. */ ! if (! ignore) ! op0 = force_not_mem (op0); expand_cleanups_to (old_cleanups); preserve_temp_slots (op0); *************** *** 4821,4839 **** case CONVERT_EXPR: case REFERENCE_EXPR: - if (mode == TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) - { - op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, - modifier); - - /* If the signedness of the conversion differs and OP0 is - a promoted SUBREG, clear that indication since we now - have to do the proper extension. */ - if (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))) != unsignedp - && GET_CODE (op0) == SUBREG) - SUBREG_PROMOTED_VAR_P (op0) = 0; - - return op0; - } - if (TREE_CODE (type) == UNION_TYPE) { --- 5043,5046 ---- *************** *** 4850,4853 **** --- 5057,5061 ---- + BITS_PER_UNIT - 1) / BITS_PER_UNIT, 0); + MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (type); } else *************** *** 4873,4876 **** --- 5081,5099 ---- } + if (mode == TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) + { + op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, + modifier); + + /* If the signedness of the conversion differs and OP0 is + a promoted SUBREG, clear that indication since we now + have to do the proper extension. */ + if (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))) != unsignedp + && GET_CODE (op0) == SUBREG) + SUBREG_PROMOTED_VAR_P (op0) = 0; + + return op0; + } + op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, mode, 0); if (GET_MODE (op0) == mode) *************** *** 4927,4931 **** } ! /* If the result is to be Pmode and we are adding an integer to something, we might be forming a constant. So try to use plus_constant. If it produces a sum and we can't accept it, --- 5150,5154 ---- } ! /* If the result is to be ptr_mode and we are adding an integer to something, we might be forming a constant. So try to use plus_constant. If it produces a sum and we can't accept it, *************** *** 4936,4940 **** If this is an EXPAND_SUM call, always return the sum. */ if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER ! || mode == Pmode) { if (TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST --- 5159,5163 ---- If this is an EXPAND_SUM call, always return the sum. */ if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER ! || mode == ptr_mode) { if (TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST *************** *** 4978,4982 **** zero-extend. */ if ((modifier != EXPAND_SUM && modifier != EXPAND_INITIALIZER) ! || mode != Pmode) goto binop; --- 5201,5205 ---- zero-extend. */ if ((modifier != EXPAND_SUM && modifier != EXPAND_INITIALIZER) ! || mode != ptr_mode) goto binop; *************** *** 5050,5057 **** VOIDmode, modifier); - /* If one operand is a CONST_INT, put it last. */ - if (GET_CODE (op0) == CONST_INT) - temp = op0, op0 = op1, op1 = temp; - /* If the last operand is a CONST_INT, use plus_constant of the negated constant. Else make the MINUS. */ --- 5273,5276 ---- *************** *** 5064,5071 **** if (TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST) { ! exp = build (PLUS_EXPR, type, TREE_OPERAND (exp, 0), ! fold (build1 (NEGATE_EXPR, type, ! TREE_OPERAND (exp, 1)))); ! goto plus_expr; } this_optab = sub_optab; --- 5283,5309 ---- if (TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST) { ! tree negated = fold (build1 (NEGATE_EXPR, type, ! TREE_OPERAND (exp, 1))); ! ! /* Deal with the case where we can't negate the constant ! in TYPE. */ ! if (TREE_UNSIGNED (type) || TREE_OVERFLOW (negated)) ! { ! tree newtype = signed_type (type); ! tree newop0 = convert (newtype, TREE_OPERAND (exp, 0)); ! tree newop1 = convert (newtype, TREE_OPERAND (exp, 1)); ! tree newneg = fold (build1 (NEGATE_EXPR, newtype, newop1)); ! ! if (! TREE_OVERFLOW (newneg)) ! return expand_expr (convert (type, ! build (PLUS_EXPR, newtype, ! newop0, newneg)), ! target, tmode, modifier); ! } ! else ! { ! exp = build (PLUS_EXPR, type, TREE_OPERAND (exp, 0), negated); ! goto plus_expr; ! } } this_optab = sub_optab; *************** *** 5087,5091 **** indexed address, for machines that support that. */ ! if (modifier == EXPAND_SUM && mode == Pmode && TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) --- 5325,5329 ---- indexed address, for machines that support that. */ ! if (modifier == EXPAND_SUM && mode == ptr_mode && TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) *************** *** 5264,5267 **** --- 5502,5511 ---- return temp; + /* At this point, a MEM target is no longer useful; we will get better + code without it. */ + + if (GET_CODE (target) == MEM) + target = gen_reg_rtx (mode); + if (target != op0) emit_move_insn (target, op0); *************** *** 5820,5823 **** --- 6064,6068 ---- { target = assign_stack_temp (mode, int_size_in_bytes (type), 2); + MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (type); /* All temp slots at this level must not conflict. */ preserve_temp_slots (target); *************** *** 6028,6031 **** --- 6273,6277 ---- = assign_stack_temp (inner_mode, int_size_in_bytes (inner_type), 1); + MEM_IN_STRUCT_P (memloc) = AGGREGATE_TYPE_P (inner_type); mark_temp_addr_taken (memloc); *************** *** 6038,6042 **** if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER) ! return XEXP (op0, 0); op0 = force_operand (XEXP (op0, 0), target); --- 6284,6296 ---- if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER) ! { ! temp = XEXP (op0, 0); ! #ifdef POINTERS_EXTEND_UNSIGNED ! if (GET_MODE (temp) == Pmode && GET_MODE (temp) != mode ! && mode == ptr_mode) ! temp = convert_memory_address (ptr_mode, temp); ! #endif ! return temp; ! } op0 = force_operand (XEXP (op0, 0), target); *************** *** 6054,6057 **** --- 6308,6317 ---- update_temp_slot_address (temp, op0); + #ifdef POINTERS_EXTEND_UNSIGNED + if (GET_MODE (op0) == Pmode && GET_MODE (op0) != mode + && mode == ptr_mode) + op0 = convert_memory_address (ptr_mode, op0); + #endif + return op0; *************** *** 7195,7199 **** warning ("second parameter of `va_start' not last named argument"); } ! else /* Evidently an out of date version of ; can't validate va_start's second argument, but can still work as intended. */ --- 7455,7459 ---- warning ("second parameter of `va_start' not last named argument"); } ! else if (! current_function_varargs) /* Evidently an out of date version of ; can't validate va_start's second argument, but can still work as intended. */ *************** *** 7259,7265 **** return const0_rtx; else ! return (TREE_CODE_CLASS (TREE_CODE (TREE_VALUE (arglist))) == 'c' ! ? const1_rtx : const0_rtx); case BUILT_IN_FRAME_ADDRESS: /* The argument must be a nonnegative integer constant. --- 7519,7532 ---- return const0_rtx; else ! { ! tree arg = TREE_VALUE (arglist); + STRIP_NOPS (arg); + return (TREE_CODE_CLASS (TREE_CODE (arg)) == 'c' + || (TREE_CODE (arg) == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (arg, 0)) == STRING_CST) + ? const1_rtx : const0_rtx); + } + case BUILT_IN_FRAME_ADDRESS: /* The argument must be a nonnegative integer constant. *************** *** 7421,7425 **** src_rtx = memory_address (BLKmode, ! expand_expr (src, NULL_RTX, Pmode, EXPAND_NORMAL)); if (! (*insn_operand_predicate[(int)icode][1]) (src_rtx, Pmode)) --- 7688,7692 ---- src_rtx = memory_address (BLKmode, ! expand_expr (src, NULL_RTX, ptr_mode, EXPAND_NORMAL)); if (! (*insn_operand_predicate[(int)icode][1]) (src_rtx, Pmode)) *************** *** 7489,7492 **** --- 7756,7760 ---- tree src = TREE_VALUE (TREE_CHAIN (arglist)); tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); + tree type; int src_align *************** *** 7505,7516 **** } ! dest_rtx = expand_expr (dest, NULL_RTX, Pmode, EXPAND_NORMAL); dest_mem = gen_rtx (MEM, BLKmode, memory_address (BLKmode, dest_rtx)); src_mem = gen_rtx (MEM, BLKmode, memory_address (BLKmode, expand_expr (src, NULL_RTX, ! Pmode, ! EXPAND_NORMAL))); /* Copy word part most expediently. */ --- 7773,7796 ---- } ! dest_rtx = expand_expr (dest, NULL_RTX, ptr_mode, EXPAND_SUM); dest_mem = gen_rtx (MEM, BLKmode, memory_address (BLKmode, dest_rtx)); + /* There could be a void* cast on top of the object. */ + if (TREE_CODE (dest) == NOP_EXPR) + type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (dest, 0))); + else + type = TREE_TYPE (TREE_TYPE (dest)); + MEM_IN_STRUCT_P (dest_mem) = AGGREGATE_TYPE_P (type); src_mem = gen_rtx (MEM, BLKmode, memory_address (BLKmode, expand_expr (src, NULL_RTX, ! ptr_mode, ! EXPAND_SUM))); ! /* There could be a void* cast on top of the object. */ ! if (TREE_CODE (src) == NOP_EXPR) ! type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (src, 0))); ! else ! type = TREE_TYPE (TREE_TYPE (src)); ! MEM_IN_STRUCT_P (src_mem) = AGGREGATE_TYPE_P (type); /* Copy word part most expediently. */ *************** *** 7518,7522 **** expand_expr (len, NULL_RTX, VOIDmode, 0), MIN (src_align, dest_align)); ! return dest_rtx; } --- 7798,7802 ---- expand_expr (len, NULL_RTX, VOIDmode, 0), MIN (src_align, dest_align)); ! return force_operand (dest_rtx, NULL_RTX); } *************** *** 7623,7630 **** emit_insn (gen_cmpstrsi (result, gen_rtx (MEM, BLKmode, ! expand_expr (arg1, NULL_RTX, Pmode, EXPAND_NORMAL)), gen_rtx (MEM, BLKmode, ! expand_expr (arg2, NULL_RTX, Pmode, EXPAND_NORMAL)), expand_expr (len, NULL_RTX, VOIDmode, 0), --- 7903,7912 ---- emit_insn (gen_cmpstrsi (result, gen_rtx (MEM, BLKmode, ! expand_expr (arg1, NULL_RTX, ! ptr_mode, EXPAND_NORMAL)), gen_rtx (MEM, BLKmode, ! expand_expr (arg2, NULL_RTX, ! ptr_mode, EXPAND_NORMAL)), expand_expr (len, NULL_RTX, VOIDmode, 0), *************** *** 7678,7682 **** /* For each register that may be used for calling a function, this gives the offset of that register into the block returned by ! __bultin_apply_args. 0 indicates that the register is not used for calling a function. */ static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER]; --- 7960,7964 ---- /* For each register that may be used for calling a function, this gives the offset of that register into the block returned by ! __builtin_apply_args. 0 indicates that the register is not used for calling a function. */ static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER]; *************** *** 7880,7890 **** if ((mode = apply_args_mode[regno]) != VOIDmode) { align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT; if (size % align != 0) size = CEIL (size, align) * align; emit_move_insn (change_address (registers, mode, plus_constant (XEXP (registers, 0), size)), ! gen_rtx (REG, mode, INCOMING_REGNO (regno))); size += GET_MODE_SIZE (mode); } --- 8162,8184 ---- if ((mode = apply_args_mode[regno]) != VOIDmode) { + rtx tem; + align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT; if (size % align != 0) size = CEIL (size, align) * align; + + tem = gen_rtx (REG, mode, INCOMING_REGNO (regno)); + + #ifdef STACK_REGS + /* For reg-stack.c's stack register household. + Compare with a similar piece of code in function.c. */ + + emit_insn (gen_rtx (USE, mode, tem)); + #endif + emit_move_insn (change_address (registers, mode, plus_constant (XEXP (registers, 0), size)), ! tem); size += GET_MODE_SIZE (mode); } *************** *** 8178,8182 **** /* If OP0 is a SUBREG made for a promoted variable, we cannot increment ! in place but intead must do sign- or zero-extension during assignment, so we copy it into a new register and let the code below use it as a copy. --- 8472,8476 ---- /* If OP0 is a SUBREG made for a promoted variable, we cannot increment ! in place but instead must do sign- or zero-extension during assignment, so we copy it into a new register and let the code below use it as a copy. *************** *** 8256,8259 **** --- 8550,8561 ---- incremented, TREE_OPERAND (exp, 1)); + + while (TREE_CODE (incremented) == NOP_EXPR + || TREE_CODE (incremented) == CONVERT_EXPR) + { + newexp = convert (TREE_TYPE (incremented), newexp); + incremented = TREE_OPERAND (incremented, 0); + } + temp = expand_assignment (incremented, newexp, ! post, 0); return post ? op0 : temp; *************** *** 8792,8821 **** case EQ_EXPR: ! if (integer_zerop (TREE_OPERAND (exp, 1))) ! do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); ! else if (((GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) ! == MODE_INT) ! && ! !can_compare_p (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))))) ! || GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) == MODE_COMPLEX_FLOAT ! || GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) == MODE_COMPLEX_INT) ! do_jump_by_parts_equality (exp, if_false_label, if_true_label); ! else ! comparison = compare (exp, EQ, EQ); ! break; case NE_EXPR: ! if (integer_zerop (TREE_OPERAND (exp, 1))) ! do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); ! else if (((GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) ! == MODE_INT) ! && ! !can_compare_p (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))))) ! || GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) == MODE_COMPLEX_FLOAT ! || GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))) == MODE_COMPLEX_INT) ! do_jump_by_parts_equality (exp, if_true_label, if_false_label); ! else ! comparison = compare (exp, NE, NE); ! break; case LT_EXPR: --- 9094,9163 ---- case EQ_EXPR: ! { ! tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0)); ! ! if (integer_zerop (TREE_OPERAND (exp, 1))) ! do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); ! else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_FLOAT ! || GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_INT) ! do_jump ! (fold ! (build (TRUTH_ANDIF_EXPR, TREE_TYPE (exp), ! fold (build (EQ_EXPR, TREE_TYPE (exp), ! fold (build1 (REALPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 0))), ! fold (build1 (REALPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 1))))), ! fold (build (EQ_EXPR, TREE_TYPE (exp), ! fold (build1 (IMAGPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 0))), ! fold (build1 (IMAGPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 1))))))), ! if_false_label, if_true_label); ! else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT ! && !can_compare_p (TYPE_MODE (inner_type))) ! do_jump_by_parts_equality (exp, if_false_label, if_true_label); ! else ! comparison = compare (exp, EQ, EQ); ! break; ! } case NE_EXPR: ! { ! tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0)); ! ! if (integer_zerop (TREE_OPERAND (exp, 1))) ! do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); ! else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_FLOAT ! || GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_INT) ! do_jump ! (fold ! (build (TRUTH_ORIF_EXPR, TREE_TYPE (exp), ! fold (build (NE_EXPR, TREE_TYPE (exp), ! fold (build1 (REALPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 0))), ! fold (build1 (REALPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 1))))), ! fold (build (NE_EXPR, TREE_TYPE (exp), ! fold (build1 (IMAGPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 0))), ! fold (build1 (IMAGPART_EXPR, ! TREE_TYPE (inner_type), ! TREE_OPERAND (exp, 1))))))), ! if_false_label, if_true_label); ! else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT ! && !can_compare_p (TYPE_MODE (inner_type))) ! do_jump_by_parts_equality (exp, if_true_label, if_false_label); ! else ! comparison = compare (exp, NE, NE); ! break; ! } case LT_EXPR: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/expr.h gcc-2.7.0/expr.h *** gcc-2.6.3/expr.h Tue Nov 15 18:39:54 1994 --- gcc-2.7.0/expr.h Thu Jun 15 07:32:10 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 177,190 **** #ifndef FUNCTION_ARG_PADDING - #if BYTES_BIG_ENDIAN #define FUNCTION_ARG_PADDING(MODE, TYPE) \ ! (((MODE) == BLKmode \ ! ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ ! && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \ ! : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ ! ? downward : upward) ! #else ! #define FUNCTION_ARG_PADDING(MODE, TYPE) upward ! #endif #endif --- 178,189 ---- #ifndef FUNCTION_ARG_PADDING #define FUNCTION_ARG_PADDING(MODE, TYPE) \ ! (! BYTES_BIG_ENDIAN \ ! ? upward \ ! : (((MODE) == BLKmode \ ! ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ ! && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \ ! : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ ! ? downward : upward)) #endif *************** *** 213,222 **** For a little-endian machine, the reverse is true. */ - #if BYTES_BIG_ENDIAN - #define MUST_PASS_IN_STACK_BAD_PADDING upward - #else - #define MUST_PASS_IN_STACK_BAD_PADDING downward - #endif - #define MUST_PASS_IN_STACK(MODE,TYPE) \ ((TYPE) != 0 \ --- 212,215 ---- *************** *** 228,232 **** % (PARM_BOUNDARY / BITS_PER_UNIT))) \ && (FUNCTION_ARG_PADDING (MODE, TYPE) \ ! == MUST_PASS_IN_STACK_BAD_PADDING)))) /* Nonzero if type TYPE should be returned in memory. --- 221,225 ---- % (PARM_BOUNDARY / BITS_PER_UNIT))) \ && (FUNCTION_ARG_PADDING (MODE, TYPE) \ ! == (BYTES_BIG_ENDIAN ? upward : downward))))) /* Nonzero if type TYPE should be returned in memory. *************** *** 469,472 **** --- 462,472 ---- extern enum insn_code setcc_gen_code[NUM_RTX_CODE]; + #ifdef HAVE_conditional_move + /* Indexed by the the machine mode, gives the insn code to make a conditional + move insn. */ + + extern enum insn_code movcc_gen_code[NUM_MACHINE_MODES]; + #endif + /* This array records the insn_code of insns to perform block moves. */ extern enum insn_code movstr_optab[NUM_MACHINE_MODES]; *************** *** 526,529 **** --- 526,539 ---- extern void emit_indirect_jump PROTO((rtx)); + #ifdef HAVE_conditional_move + /* Emit a conditional move operation. */ + rtx emit_conditional_move PROTO((rtx, enum rtx_code, rtx, rtx, + enum machine_mode, rtx, rtx, + enum machine_mode, int)); + + /* Return non-zero if the conditional move is supported. */ + int can_conditionally_move_p PROTO((enum machine_mode mode)); + #endif + /* Create but don't emit one rtl instruction to add one rtx into another. Modes must match; operands must meet the operation's predicates. *************** *** 635,639 **** extern rtx push_block PROTO((rtx, int, int)); ! /* Make an operand to push someting on the stack. */ extern rtx gen_push_operand PROTO((void)); --- 645,649 ---- extern rtx push_block PROTO((rtx, int, int)); ! /* Make an operand to push something on the stack. */ extern rtx gen_push_operand PROTO((void)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/extend.texi gcc-2.7.0/extend.texi *** gcc-2.6.3/extend.texi Fri Nov 11 13:44:19 1994 --- gcc-2.7.0/extend.texi Thu Jun 15 17:26:42 1995 *************** *** 51,54 **** --- 51,55 ---- * Character Escapes:: @samp{\e} stands for the character @key{ESC}. * Variable Attributes:: Specifying attributes of variables. + * Type Attributes:: Specifying attributes of types. * Alignment:: Inquiring about the alignment of a type or variable. * Inline:: Defining inline functions (as fast as macros). *************** *** 93,96 **** --- 94,98 ---- * Character Escapes:: @samp{\e} stands for the character @key{ESC}. * Variable Attributes:: Specifying attributes of variables. + * Type Attributes:: Specifying attributes of types. * Alignment:: Inquiring about the alignment of a type or variable. * Inline:: Defining inline functions (as fast as macros). *************** *** 1272,1275 **** --- 1274,1280 ---- @cindex @code{const} applied to function @cindex functions with @code{printf} or @code{scanf} style arguments + @cindex functions that are passed arguments in registers on the 386 + @cindex functions that pop the argument stack on the 386 + @cindex functions that do not pop the argument stack on the 386 In GNU C, you declare certain things about functions called in your program *************** *** 1279,1289 **** The keyword @code{__attribute__} allows you to specify special attributes when making a declaration. This keyword is followed by an ! attribute specification inside double parentheses. Four attributes, ! @code{noreturn}, @code{const}, @code{format}, and @code{section} are ! currently defined for functions. Other attributes, including @code{section} ! are supported for variables declarations ! (@pxref{Variable Attributes}). ! You may also specify attributes with @samp{__} preceeding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, --- 1284,1295 ---- The keyword @code{__attribute__} allows you to specify special attributes when making a declaration. This keyword is followed by an ! attribute specification inside double parentheses. Eight attributes, ! @code{noreturn}, @code{const}, @code{format}, @code{section}, ! @code{constructor}, @code{destructor}, @code{unused} and @code{weak} are ! currently defined for functions. Other attributes, including ! @code{section} are supported for variables declarations (@pxref{Variable ! Attributes}) and for types (@pxref{Type Attributes}). ! You may also specify attributes with @samp{__} preceding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, *************** *** 1418,1426 **** @smallexample ! extern void foobar (void) __attribute__ ((section (".init"))); @end smallexample @noindent ! puts the function @code{foobar} in the @code{.init} section. Some file formats do not support arbitrary sections so the @code{section} --- 1424,1432 ---- @smallexample ! extern void foobar (void) __attribute__ ((section ("bar"))); @end smallexample @noindent ! puts the function @code{foobar} in the @code{bar} section. Some file formats do not support arbitrary sections so the @code{section} *************** *** 1428,1431 **** --- 1434,1499 ---- If you need to map the entire contents of a module to a particular section, consider using the facilities of the linker instead. + + @item constructor + @itemx destructor + @cindex @code{constructor} function attribute + @cindex @code{destructor} function attribute + The @code{constructor} attribute causes the function to be called + automatically before execution enters @code{main ()}. Similarly, the + @code{destructor} attribute causes the function to be called + automatically after @code{main ()} has completed or @code{exit ()} has + been called. Functions with these attributes are useful for + initializing data that will be used implicitly during the execution of + the program. + + These attributes are not currently implemented for Objective C. + + @item unused + This attribute, attached to a function, means that the function is meant + to be possibly unused. GNU CC will not produce a warning for this + function. + + @item weak + @cindex @code{weak} attribute + The @code{weak} attribute causes the declaration to be emitted as a weak + symbol rather than a global. This is primarily useful in defining + library functions which can be overridden in user code, though it can + also be used with non-function declarations. Weak symbols are supported + for ELF targets, and also for a.out targets when using the GNU assembler + and linker. + + @item alias ("target") + @cindex @code{alias} attribute + The @code{alias} attribute causes the declaration to be emitted as an + alias for another symbol, which must be specified. For instance, + + @smallexample + void __f () @{ /* do something */; @} + void f () __attribute__ ((weak, alias ("__f"))); + @end smallexample + + declares @samp{f} to be a weak alias for @samp{__f}. In C++, the + mangled name for the target must be used. + + @item regparm (@var{number}) + @cindex functions that are passed arguments in registers on the 386 + On the Intel 386, the @code{regparm} attribute causes the compiler to + pass up to @var{number} integer arguments in registers @var{EAX}, + @var{EDX}, and @var{ECX} instead of on the stack. Functions that take a + variable number of arguments will continue to be passed all of their + arguments on the stack. + + @item stdcall + @cindex functions that pop the argument stack on the 386 + On the Intel 386, the @code{stdcall} attribute causes the compiler to + assume that the called function will pop off the stack space used to + pass arguments, unless it takes a variable number of arguments. + + @item cdecl + @cindex functions that do pop the argument stack on the 386 + On the Intel 386, the @code{cdecl} attribute causes the compiler to + assume that the called function will pop off the stack space used to + pass arguments, unless it takes a variable number of arguments. This is + useful to override the effects of the @samp{-mrtd} switch. @end table *************** *** 1587,1597 **** The keyword @code{__attribute__} allows you to specify special attributes of variables or structure fields. This keyword is followed ! by an attribute specification inside double parentheses. Four attributes are currently defined for variables: @code{aligned}, ! @code{mode}, @code{packed}, and @code{section}. Other attributes are ! defined for functions, and thus not documented here; ! see @ref{Function Attributes}. ! You may also specify attributes with @samp{__} preceeding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, --- 1655,1666 ---- The keyword @code{__attribute__} allows you to specify special attributes of variables or structure fields. This keyword is followed ! by an attribute specification inside double parentheses. Eight attributes are currently defined for variables: @code{aligned}, ! @code{mode}, @code{nocommon}, @code{packed}, @code{section}, ! @code{transparent_union}, @code{unused}, and @code{weak}. Other ! attributes are available for functions (@pxref{Function Attributes}) and ! for types (@pxref{Type Attributes}). ! You may also specify attributes with @samp{__} preceding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, *************** *** 1630,1643 **** name is just an alias, not a distinct type. The @code{aligned} attribute can only increase the alignment; but you can decrease it by specifying @code{packed} as well. See below. ! The linker of your operating system imposes a maximum alignment. If the ! linker aligns each object file on a four byte boundary, then it is ! beyond the compiler's power to cause anything to be aligned to a larger ! boundary than that. For example, if the linker happens to put this object ! file at address 136 (eight more than a multiple of 64), then the compiler ! cannot guarantee an alignment of more than 8 just by aligning variables in ! the object file. @item mode (@var{mode}) --- 1699,1732 ---- name is just an alias, not a distinct type. + As in the preceding examples, you can explicitly specify the alignment + (in bytes) that you wish the compiler to use for a given variable or + structure field. Alternatively, you can leave out the alignment factor + and just ask the compiler to align a variable or field to the maximum + useful alignment for the target machine you are compiling for. For + example, you could write: + + @smallexample + short array[3] __attribute__ ((aligned)); + @end smallexample + + Whenever you leave out the alignment factor in an @code{aligned} attribute + specification, the compiler automatically sets the alignment for the declared + variable or field to the largest alignment which is ever used for any data + type on the target machine you are compiling for. Doing this can often make + copy operations more efficient, because the compiler can use whatever + instructions copy the biggest chunks of memory when performing copies to + or from the variables or fields that you have aligned this way. + The @code{aligned} attribute can only increase the alignment; but you can decrease it by specifying @code{packed} as well. See below. ! Note that the effectiveness of @code{aligned} attributes may be limited ! by inherent limitations in your linker. On many systems, the linker is ! only able to arrange for variables to be aligned up to a certain maximum ! alignment. (For some linkers, the maximum supported alignment may ! be very very small.) If your linker is only able to align variables ! up to a maximum of 8 byte alignment, then specifying @code{aligned(16)} ! in an @code{__attribute__} will still only provide you with 8 byte ! alignment. See your linker documentation for further information. @item mode (@var{mode}) *************** *** 1647,1650 **** --- 1736,1755 ---- request an integer or floating point type according to its width. + You may also specify a mode of @samp{byte} or @samp{__byte__} to + indicate the mode corresponding to a one-byte integer, @samp{word} or + @samp{__word__} for the mode of a one-word integer, and @samp{pointer} + or @samp{__pointer__} for the mode used to represent pointers. + + @item nocommon + @cindex @code{nocommon} attribute + This attribute specifies requests GNU CC not to place a variable + ``common'' but instead to allocate space for it directly. If you + specify the @samp{-fno-common} flag, GNU CC will do this for all + variables. + + Specifying the @code{nocommon} attribute for a variable provides an + initialization of zeros. A variable may only be initialized in one + source file. + @item packed @cindex @code{packed} attribute *************** *** 1701,1708 **** You may only use the @code{section} attribute with a fully initialized ! global definition because of the way linkers work. ! The linker requires each object be defined once, with the exception that ! uninitialized variables tentatively go in the @code{common} (or @code{bss}) ! section and can be multiply "defined". Some file formats do not support arbitrary sections so the @code{section} --- 1806,1815 ---- You may only use the @code{section} attribute with a fully initialized ! global definition because of the way linkers work. The linker requires ! each object be defined once, with the exception that uninitialized ! variables tentatively go in the @code{common} (or @code{bss}) section ! and can be multiply "defined". You can force a variable to be ! initialized with the @samp{-fno-common} flag or the @code{nocommon} ! attribute. Some file formats do not support arbitrary sections so the @code{section} *************** *** 1714,1720 **** This attribute, attached to a function argument variable which is a union, means to pass the argument in the same way that the first union ! alternative would be passed. You can also use this attribute on a @code{typedef} for a union data type; then it applies to all function arguments with that type. @end table --- 1821,1973 ---- This attribute, attached to a function argument variable which is a union, means to pass the argument in the same way that the first union ! member would be passed. You can also use this attribute on a @code{typedef} for a union data type; then it applies to all function arguments with that type. + + @item unused + This attribute, attached to a variable, means that the variable is meant + to be possibly unused. GNU CC will not produce a warning for this + variable. + + @item weak + The @code{weak} attribute is described in @xref{Function Attributes}. + @end table + + To specify multiple attributes, separate them by commas within the + double parentheses: for example, @samp{__attribute__ ((aligned (16), + packed))}. + + @node Type Attributes + @section Specifying Attributes of Types + @cindex attribute of types + @cindex type attributes + + The keyword @code{__attribute__} allows you to specify special + attributes of @code{struct} and @code{union} types when you define such + types. This keyword is followed by an attribute specification inside + double parentheses. Three attributes are currently defined for types: + @code{aligned}, @code{packed}, and @code{transparent_union}. Other + attributes are defined for functions (@pxref{Function Attributes}) and + for variables (@pxref{Variable Attributes}). + + You may also specify any one of these attributes with @samp{__} + preceding and following its keyword. This allows you to use these + attributes in header files without being concerned about a possible + macro of the same name. For example, you may use @code{__aligned__} + instead of @code{aligned}. + + You may specify the @code{aligned} and @code{transparent_union} + attributes either in a @code{typedef} declaration or just past the + closing curly brace of a complete enum, struct or union type + @emph{definition} and the @code{packed} attribute only past the closing + brace of a definition. + + @table @code + @cindex @code{aligned} attribute + @item aligned (@var{alignment}) + This attribute specifies a minimum alignment (in bytes) for variables + of the specified type. For example, the declarations: + + @smallexample + struct S @{ short f[3]; @} __attribute__ ((aligned (8)); + typedef int more_aligned_int __attribute__ ((aligned (8)); + @end smallexample + + @noindent + force the compiler to insure (as fas as it can) that each variable whose + type is @code{struct S} or @code{more_aligned_int} will be allocated and + aligned @emph{at least} on a 8-byte boundary. On a Sparc, having all + variables of type @code{struct S} aligned to 8-byte boundaries allows + the compiler to use the @code{ldd} and @code{std} (doubleword load and + store) instructions when copying one variable of type @code{struct S} to + another, thus improving run-time efficiency. + + Note that the alignment of any given @code{struct} or @code{union} type + is required by the ANSI C standard to be at least a perfect multiple of + the lowest common multiple of the alignments of all of the members of + the @code{struct} or @code{union} in question. This means that you @emph{can} + effectively adjust the alignment of a @code{struct} or @code{union} + type by attaching an @code{aligned} attribute to any one of the members + of such a type, but the notation illustrated in the example above is a + more obvious, intuitive, and readable way to request the compiler to + adjust the alignment of an entire @code{struct} or @code{union} type. + + As in the preceding example, you can explicitly specify the alignment + (in bytes) that you wish the compiler to use for a given @code{struct} + or @code{union} type. Alternatively, you can leave out the alignment factor + and just ask the compiler to align a type to the maximum + useful alignment for the target machine you are compiling for. For + example, you could write: + + @smallexample + struct S @{ short f[3]; @} __attribute__ ((aligned)); + @end smallexample + + Whenever you leave out the alignment factor in an @code{aligned} + attribute specification, the compiler automatically sets the alignment + for the type to the largest alignment which is ever used for any data + type on the target machine you are compiling for. Doing this can often + make copy operations more efficient, because the compiler can use + whatever instructions copy the biggest chunks of memory when performing + copies to or from the variables which have types that you have aligned + this way. + + In the example above, if the size of each @code{short} is 2 bytes, then + the size of the entire @code{struct S} type is 6 bytes. The smallest + power of two which is greater than or equal to that is 8, so the + compiler sets the alignment for the entire @code{struct S} type to 8 + bytes. + + Note that although you can ask the compiler to select a time-efficient + alignment for a given type and then declare only individual stand-alone + objects of that type, the compiler's ability to select a time-efficient + alignment is primarily useful only when you plan to create arrays of + variables having the relevant (efficiently aligned) type. If you + declare or use arrays of variables of an efficiently-aligned type, then + it is likely that your program will also be doing pointer arithmetic (or + subscripting, which amounts to the same thing) on pointers to the + relevant type, and the code that the compiler generates for these + pointer arithmetic operations will often be more efficient for + efficiently-aligned types than for other types. + + The @code{aligned} attribute can only increase the alignment; but you + can decrease it by specifying @code{packed} as well. See below. + + Note that the effectiveness of @code{aligned} attributes may be limited + by inherent limitations in your linker. On many systems, the linker is + only able to arrange for variables to be aligned up to a certain maximum + alignment. (For some linkers, the maximum supported alignment may + be very very small.) If your linker is only able to align variables + up to a maximum of 8 byte alignment, then specifying @code{aligned(16)} + in an @code{__attribute__} will still only provide you with 8 byte + alignment. See your linker documentation for further information. + + @item packed + This attribute, attached to an @code{enum}, @code{struct}, or + @code{union} type definition, specified that the minimum required memory + be used to represent the type. + + Specifying this attribute for @code{struct} and @code{union} types is + equivalent to specifying the @code{packed} attribute on each of the + structure or union members. Specifying the @samp{-fshort-enums} + flag on the line is equivalent to specifying the @code{packed} + attribute on all @code{enum} definitions. + + You may only specify this attribute after a closing curly brace on an + @code{enum} definition, not in a @code{typedef} declaration. + + @item transparent_union + This attribute, attached to a @code{union} type definition, indicates + that any variable having that union type should, if passed to a + function, be passed in the same way that the first union member would be + passed. For example: + + @example + union foo + @{ + char a; + int x[2]; + @} __attribute__ ((transparent_union)); + @end example @end table *************** *** 1859,1863 **** not know what it means, or whether it is valid assembler input. The extended @code{asm} feature is most often used for machine instructions ! that the compiler itself does not know exist. The output operands must be write-only; GNU CC will assume that the values --- 2112,2120 ---- not know what it means, or whether it is valid assembler input. The extended @code{asm} feature is most often used for machine instructions ! that the compiler itself does not know exist. If the output expression ! cannot be directly addressed (for example, it is a bit field), your ! constraint must allow a register. In that case, GNU CC will use ! the register as the output of the @code{asm}, and then store that ! register into the output. The output operands must be write-only; GNU CC will assume that the values *************** *** 2438,2442 **** Using the extended GNU C++ function-definition syntax, you can avoid the temporary allocation and copying by naming @code{r} as your return value ! as the outset, and assigning to its @code{a} field directly: @example --- 2695,2699 ---- Using the extended GNU C++ function-definition syntax, you can avoid the temporary allocation and copying by naming @code{r} as your return value ! at the outset, and assigning to its @code{a} field directly: @example *************** *** 2810,2814 **** Polymorphism} by @w{Gerald} Baumgartner and Vincent F. Russo (Tech report CSD--TR--93--059, Dept. of Computer Sciences, Purdue University, ! September 1993, to appear in @emph{Software Practice & Experience}). You can get the tech report by anonymous FTP from @code{ftp.cs.purdue.edu} in @file{pub/reports/TR93-059.PS.Z}. --- 3067,3071 ---- Polymorphism} by @w{Gerald} Baumgartner and Vincent F. Russo (Tech report CSD--TR--93--059, Dept. of Computer Sciences, Purdue University, ! December 1994, to appear in @emph{Software Practice & Experience}). You can get the tech report by anonymous FTP from @code{ftp.cs.purdue.edu} in @file{pub/reports/TR93-059.PS.Z}. *************** *** 2879,2883 **** @cindex default implementation, signature member function ! @cindex signature member function default implemention There is one more detail about signatures. A signature declaration can contain member function @emph{definitions} as well as member function --- 3136,3140 ---- @cindex default implementation, signature member function ! @cindex signature member function default implementation There is one more detail about signatures. A signature declaration can contain member function @emph{definitions} as well as member function diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/final.c gcc-2.7.0/final.c *** gcc-2.6.3/final.c Tue Sep 20 20:05:03 1994 --- gcc-2.7.0/final.c Thu Jun 15 07:32:51 1995 *************** *** 1,4 **** /* Convert RTL to assembler code and output it, for GNU compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Convert RTL to assembler code and output it, for GNU compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 122,125 **** --- 123,132 ---- static int last_linenum; + /* Highest line number in current block. */ + static int high_block_linenum; + + /* Likewise for function. */ + static int high_function_linenum; + /* Filename of last NOTE. */ static char *last_filename; *************** *** 271,274 **** --- 278,282 ---- static rtx walk_alter_subreg PROTO((rtx)); static int alter_cond PROTO((rtx)); + static void output_asm_name PROTO((void)); static void output_operand PROTO((rtx, int)); static void leaf_renumber_regs PROTO((rtx)); *************** *** 809,812 **** --- 817,823 ---- } } + /* For a non-optimizing compile, do only a single pass. */ + if (!optimize) + break; } #endif /* HAVE_ATTR_length */ *************** *** 878,881 **** --- 889,895 ---- if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED) { + last_linenum = high_block_linenum = high_function_linenum + = NOTE_LINE_NUMBER (first); + if (write_symbols == SDB_DEBUG) /* For sdb, let's not, but say we did. *************** *** 884,894 **** (sdb_begin_function_line is not set, and other compilers don't do it.) */ ! last_linenum = NOTE_LINE_NUMBER (first); #ifdef XCOFF_DEBUGGING_INFO else if (write_symbols == XCOFF_DEBUG) ! { ! last_linenum = NOTE_LINE_NUMBER (first); ! xcoffout_output_first_source_line (file, last_linenum); ! } #endif else --- 898,905 ---- (sdb_begin_function_line is not set, and other compilers don't do it.) */ ! ; #ifdef XCOFF_DEBUGGING_INFO else if (write_symbols == XCOFF_DEBUG) ! xcoffout_output_first_source_line (file, last_linenum); #endif else *************** *** 1034,1038 **** #ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG) ! sdbout_end_function (last_linenum); #endif --- 1045,1049 ---- #ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG) ! sdbout_end_function (high_function_linenum); #endif *************** *** 1044,1048 **** #ifdef XCOFF_DEBUGGING_INFO if (write_symbols == XCOFF_DEBUG) ! xcoffout_end_function (file, last_linenum); #endif --- 1055,1059 ---- #ifdef XCOFF_DEBUGGING_INFO if (write_symbols == XCOFF_DEBUG) ! xcoffout_end_function (file, high_function_linenum); #endif *************** *** 1345,1348 **** --- 1356,1361 ---- pending_blocks[block_depth++] = next_block_index; + high_block_linenum = last_linenum; + /* Output debugging info about the symbol-block beginning. */ *************** *** 1382,1386 **** #ifdef XCOFF_DEBUGGING_INFO if (write_symbols == XCOFF_DEBUG && block_depth >= 0) ! xcoffout_end_block (file, last_linenum, pending_blocks[block_depth]); #endif #ifdef DBX_DEBUGGING_INFO --- 1395,1400 ---- #ifdef XCOFF_DEBUGGING_INFO if (write_symbols == XCOFF_DEBUG && block_depth >= 0) ! xcoffout_end_block (file, high_block_linenum, ! pending_blocks[block_depth]); #endif #ifdef DBX_DEBUGGING_INFO *************** *** 1391,1395 **** #ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG && block_depth >= 0) ! sdbout_end_block (file, last_linenum, pending_blocks[block_depth]); #endif #ifdef DWARF_DEBUGGING_INFO --- 1405,1410 ---- #ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG && block_depth >= 0) ! sdbout_end_block (file, high_block_linenum, ! pending_blocks[block_depth]); #endif #ifdef DWARF_DEBUGGING_INFO *************** *** 1502,1506 **** #endif /* READONLY_DATA_SECTION */ #else /* JUMP_TABLES_IN_TEXT_SECTION */ ! text_section (); #endif /* JUMP_TABLES_IN_TEXT_SECTION */ #ifdef ASM_OUTPUT_CASE_LABEL --- 1517,1521 ---- #endif /* READONLY_DATA_SECTION */ #else /* JUMP_TABLES_IN_TEXT_SECTION */ ! function_section (current_function_decl); #endif /* JUMP_TABLES_IN_TEXT_SECTION */ #ifdef ASM_OUTPUT_CASE_LABEL *************** *** 1591,1595 **** #endif ! text_section (); break; --- 1606,1610 ---- #endif ! function_section (current_function_decl); break; *************** *** 2019,2022 **** --- 2034,2039 ---- last_filename = filename; last_linenum = NOTE_LINE_NUMBER (insn); + high_block_linenum = MAX (last_linenum, high_block_linenum); + high_function_linenum = MAX (last_linenum, high_function_linenum); if (write_symbols != NO_DEBUG) *************** *** 2078,2085 **** { register int offset = SUBREG_WORD (x) * UNITS_PER_WORD; ! #if BYTES_BIG_ENDIAN ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (y)))); ! #endif PUT_CODE (x, MEM); MEM_VOLATILE_P (x) = MEM_VOLATILE_P (y); --- 2095,2101 ---- { register int offset = SUBREG_WORD (x) * UNITS_PER_WORD; ! if (BYTES_BIG_ENDIAN) ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (y)))); PUT_CODE (x, MEM); MEM_VOLATILE_P (x) = MEM_VOLATILE_P (y); *************** *** 2303,2306 **** --- 2319,2344 ---- of the operand, with no other punctuation. */ + static void + output_asm_name () + { + if (flag_print_asm_name) + { + /* Annotate the assembly with a comment describing the pattern and + alternative used. */ + if (debug_insn) + { + register int num = INSN_CODE (debug_insn); + fprintf (asm_out_file, " %s %d %s", + ASM_COMMENT_START, INSN_UID (debug_insn), insn_name[num]); + if (insn_n_alternatives[num] > 1) + fprintf (asm_out_file, "/%d", which_alternative + 1); + + /* Clear this so only the first assembler insn + of any rtl insn will get the special comment for -dp. */ + debug_insn = 0; + } + } + } + void output_asm_insn (template, operands) *************** *** 2326,2332 **** switch (c) { - #ifdef ASM_OUTPUT_OPCODE case '\n': putc (c, asm_out_file); while ((c = *p) == '\t') { --- 2364,2371 ---- switch (c) { case '\n': + output_asm_name (); putc (c, asm_out_file); + #ifdef ASM_OUTPUT_OPCODE while ((c = *p) == '\t') { *************** *** 2335,2340 **** } ASM_OUTPUT_OPCODE (asm_out_file, p); - break; #endif #ifdef ASSEMBLER_DIALECT --- 2374,2379 ---- } ASM_OUTPUT_OPCODE (asm_out_file, p); #endif + break; #ifdef ASSEMBLER_DIALECT *************** *** 2449,2469 **** } ! if (flag_print_asm_name) ! { ! /* Annotate the assembly with a comment describing the pattern and ! alternative used. */ ! if (debug_insn) ! { ! register int num = INSN_CODE (debug_insn); ! fprintf (asm_out_file, " %s %d %s", ! ASM_COMMENT_START, INSN_UID (debug_insn), insn_name[num]); ! if (insn_n_alternatives[num] > 1) ! fprintf (asm_out_file, "/%d", which_alternative + 1); ! ! /* Clear this so only the first assembler insn ! of any rtl insn will get the special comment for -dp. */ ! debug_insn = 0; ! } ! } putc ('\n', asm_out_file); --- 2488,2492 ---- } ! output_asm_name (); putc ('\n', asm_out_file); *************** *** 2836,2860 **** if (GET_CODE (value) == CONST_INT) { ! /* The rule for using CONST_INT for a wider mode ! is that we regard the value as signed. ! So sign-extend it. */ ! rtx high = (INTVAL (value) < 0 ? constm1_rtx : const0_rtx); ! #if WORDS_BIG_ENDIAN ! *first = high; ! *second = value; ! #else ! *first = value; ! *second = high; ! #endif } else if (GET_CODE (value) != CONST_DOUBLE) { ! #if WORDS_BIG_ENDIAN ! *first = const0_rtx; ! *second = value; ! #else ! *first = value; ! *second = const0_rtx; ! #endif } else if (GET_MODE (value) == VOIDmode --- 2859,2916 ---- if (GET_CODE (value) == CONST_INT) { ! if (HOST_BITS_PER_WIDE_INT >= (2 * BITS_PER_WORD)) ! { ! /* In this case the CONST_INT holds both target words. ! Extract the bits from it into two word-sized pieces. */ ! rtx low, high; ! HOST_WIDE_INT word_mask; ! /* Avoid warnings for shift count >= BITS_PER_WORD. */ ! int shift_count = BITS_PER_WORD - 1; ! ! word_mask = (HOST_WIDE_INT) 1 << shift_count; ! word_mask |= word_mask - 1; ! low = GEN_INT (INTVAL (value) & word_mask); ! high = GEN_INT ((INTVAL (value) >> (shift_count + 1)) & word_mask); ! if (WORDS_BIG_ENDIAN) ! { ! *first = high; ! *second = low; ! } ! else ! { ! *first = low; ! *second = high; ! } ! } ! else ! { ! /* The rule for using CONST_INT for a wider mode ! is that we regard the value as signed. ! So sign-extend it. */ ! rtx high = (INTVAL (value) < 0 ? constm1_rtx : const0_rtx); ! if (WORDS_BIG_ENDIAN) ! { ! *first = high; ! *second = value; ! } ! else ! { ! *first = value; ! *second = high; ! } ! } } else if (GET_CODE (value) != CONST_DOUBLE) { ! if (WORDS_BIG_ENDIAN) ! { ! *first = const0_rtx; ! *second = value; ! } ! else ! { ! *first = value; ! *second = const0_rtx; ! } } else if (GET_MODE (value) == VOIDmode *************** *** 2864,2874 **** /* In an integer, the words are defined as most and least significant. So order them by the target's convention. */ ! #if WORDS_BIG_ENDIAN ! *first = GEN_INT (CONST_DOUBLE_HIGH (value)); ! *second = GEN_INT (CONST_DOUBLE_LOW (value)); ! #else ! *first = GEN_INT (CONST_DOUBLE_LOW (value)); ! *second = GEN_INT (CONST_DOUBLE_HIGH (value)); ! #endif } else --- 2920,2933 ---- /* In an integer, the words are defined as most and least significant. So order them by the target's convention. */ ! if (WORDS_BIG_ENDIAN) ! { ! *first = GEN_INT (CONST_DOUBLE_HIGH (value)); ! *second = GEN_INT (CONST_DOUBLE_LOW (value)); ! } ! else ! { ! *first = GEN_INT (CONST_DOUBLE_LOW (value)); ! *second = GEN_INT (CONST_DOUBLE_HIGH (value)); ! } } else *************** *** 2892,2903 **** abort (); ! #if defined (HOST_WORDS_BIG_ENDIAN) == WORDS_BIG_ENDIAN ! /* Host and target agree => no need to swap. */ ! *first = GEN_INT (CONST_DOUBLE_LOW (value)); ! *second = GEN_INT (CONST_DOUBLE_HIGH (value)); #else ! *second = GEN_INT (CONST_DOUBLE_LOW (value)); ! *first = GEN_INT (CONST_DOUBLE_HIGH (value)); #endif #endif /* no REAL_ARITHMETIC */ } --- 2951,2971 ---- abort (); ! if ( ! #ifdef HOST_WORDS_BIG_ENDIAN ! WORDS_BIG_ENDIAN #else ! ! WORDS_BIG_ENDIAN #endif + ) + { + /* Host and target agree => no need to swap. */ + *first = GEN_INT (CONST_DOUBLE_LOW (value)); + *second = GEN_INT (CONST_DOUBLE_HIGH (value)); + } + else + { + *second = GEN_INT (CONST_DOUBLE_LOW (value)); + *first = GEN_INT (CONST_DOUBLE_HIGH (value)); + } #endif /* no REAL_ARITHMETIC */ } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fix-header.c gcc-2.7.0/fix-header.c *** gcc-2.6.3/fix-header.c Thu Aug 11 18:18:24 1994 --- gcc-2.7.0/fix-header.c Thu Jun 15 07:33:44 1995 *************** *** 1,4 **** /* fix-header.c - Make C header file suitable for C++. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it --- 1,4 ---- /* fix-header.c - Make C header file suitable for C++. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it *************** *** 14,18 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This program massages a system include file (such as stdio.h), --- 14,18 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This program massages a system include file (such as stdio.h), *************** *** 30,34 **** * The program can be given a list of (names of) required standard ! functions (such as fclose for stdio.h). If a reqquired function is not seen in the input, then a prototype for it will be written to the output. --- 30,34 ---- * The program can be given a list of (names of) required standard ! functions (such as fclose for stdio.h). If a required function is not seen in the input, then a prototype for it will be written to the output. *************** *** 60,64 **** Usage: ! fix-header FOO.H INFILE.H OUTFILE.H REQUIRED_FUNCS , July 1993. */ --- 67,71 ---- * OUTFILE.H is the full pathname for where to write the output file, if anything needs to be done. (e.g. ./include/stdio.h) ! * OPTIONS are such as you would pass to cpp. Written by Per Bothner , July 1993. */ *************** *** 74,95 **** #include #include - #include - #include - #ifndef O_RDONLY - #define O_RDONLY 0 - #endif #include "hconfig.h" #include "obstack.h" #include "scan.h" ! extern sstring buf; int verbose = 0; int partial_count = 0; ! #if 0 ! /* All uses of this are ifdefed out. This is no longer needed, because ! cccp.c implicitly forces the standard include files to be treated as C. ! Adding an explicit extern "C" is undesireable as it breaks the SunOS 4.x ! sun4c/romvec.h file. */ int missing_extern_C_count = 0; #endif --- 73,99 ---- #include #include #include "hconfig.h" #include "obstack.h" #include "scan.h" + #include "cpplib.h" + #ifndef O_RDONLY + #define O_RDONLY 0 + #endif + + #if !__STDC__ + #define const /* nothing */ + #endif ! sstring buf; int verbose = 0; int partial_count = 0; ! int warnings = 0; ! ! /* We no longer need to add extern "C", because cpp implicitly ! forces the standard include files to be treated as C. */ ! /*#define ADD_MISSING_EXTERN_C 1 */ ! ! #if ADD_MISSING_EXTERN_C int missing_extern_C_count = 0; #endif *************** *** 98,101 **** --- 102,120 ---- #include "xsys-protos.h" + #ifdef FIXPROTO_IGNORE_LIST + /* This is a currently unused feature. */ + + /* List of files and directories to ignore. + A directory name (ending in '/') means ignore anything in that + directory. (It might be more efficient to do directory pruning + earlier in fixproto, but this is simpler and easier to customize.) */ + + static char *files_to_ignore[] = { + "X11/", + FIXPROTO_IGNORE_LIST + 0 + }; + #endif + char *inf_buffer; char *inf_limit; *************** *** 107,112 **** { no_special, ! errno_special, ! sys_stat_special }; --- 126,257 ---- { no_special, ! errno_h, ! stdio_h, ! sys_stat_h ! }; ! ! /* A NAMELIST is a sequence of names, separated by '\0', and terminated ! by an empty name (i.e. by "\0\0"). */ ! ! typedef const char* namelist; ! ! struct std_include_entry { ! const char *name; ! namelist required; ! namelist extra; ! int special; ! }; ! ! /* End of namelist NAMES. */ ! ! namelist ! namelist_end (names) ! namelist names; ! { ! register namelist ptr; ! for (ptr = names; ; ptr++) ! { ! if (*ptr == '\0') ! { ! ptr++; ! if (*ptr == '\0') ! return ptr; ! } ! } ! } ! ! const char NONE[] = ""; ! ! struct std_include_entry *include_entry; ! ! struct std_include_entry std_include_table [] = { ! { "ctype.h", ! "isalnum\0isalpha\0iscntrl\0isdigit\0isgraph\0islower\0\ ! isprint\0ispunct\0isspace\0isupper\0isxdigit\0tolower\0toupper\0", NONE }, ! ! { "dirent.h", "closedir\0opendir\0readdir\0rewinddir\0", NONE}, ! ! { "errno.h", NONE, "errno\0" }, ! ! { "curses.h", "box\0delwin\0endwin\0getcurx\0getcury\0initscr\0\ ! mvcur\0mvwprintw\0mvwscanw\0newwin\0overlay\0overwrite\0\ ! scroll\0subwin\0touchwin\0waddstr\0wclear\0wclrtobot\0wclrtoeol\0\ ! waddch\0wdelch\0wdeleteln\0werase\0wgetch\0wgetstr\0winsch\0winsertln\0\ ! wmove\0wprintw\0wrefresh\0wscanw\0wstandend\0wstandout\0", NONE }, ! ! { "fcntl.h", "creat\0fcntl\0open\0", NONE }, ! ! /* Maybe also "getgrent fgetgrent setgrent endgrent" */ ! { "grp.h", "getgrgid\0getgrnam\0", NONE }, ! ! /*{ "limit.h", ... provided by gcc }, */ ! ! { "locale.h", "localeconv\0setlocale\0", NONE }, ! ! { "math.h", "acos\0asin\0atan\0atan2\0ceil\0cos\0cosh\0exp\0\ ! fabs\0floor\0fmod\0frexp\0ldexp\0log10\0log\0modf\0pow\0sin\0sinh\0sqrt\0\ ! tan\0tanh\0", "HUGE_VAL\0" }, ! ! { "pwd.h", "getpwnam\0getpwuid\0", NONE }, ! ! /* Left out siglongjmp sigsetjmp - these depend on sigjmp_buf. */ ! { "setjmp.h", "longjmp\0setjmp\0", NONE }, ! ! /* Left out signal() - its prototype is too complex for us! ! Also left out "sigaction sigaddset sigdelset sigemptyset ! sigfillset sigismember sigpending sigprocmask sigsuspend" ! because these need sigset_t or struct sigaction. ! Most systems that provide them will also declare them. */ ! { "signal.h", "kill\0raise\0", NONE }, ! ! { "stdio.h", "clearerr\0fclose\0feof\0ferror\0fflush\0fgetc\0fgetpos\0\ ! fgets\0fopen\0fprintf\0fputc\0fputs\0fread\0freopen\0fscanf\0fseek\0\ ! fsetpos\0ftell\0fwrite\0getc\0getchar\0gets\0pclose\0perror\0popen\0\ ! printf\0putc\0putchar\0puts\0remove\0rename\0rewind\0scanf\0setbuf\0\ ! setvbuf\0sprintf\0sscanf\0vprintf\0vsprintf\0vfprintf\0tmpfile\0\ ! tmpnam\0ungetc\0", NONE }, ! /* Should perhaps also handle NULL, EOF, ... ? */ ! ! /* "div ldiv", - ignored because these depend on div_t, ldiv_t ! ignore these: "mblen mbstowcs mbstowc wcstombs wctomb" ! Left out getgroups, because SunOS4 has incompatible BSD and SVR4 versions. ! Should perhaps also add NULL */ ! { "stdlib.h", "abort\0abs\0atexit\0atof\0atoi\0atol\0bsearch\0calloc\0\ ! exit\0free\0getenv\0labs\0malloc\0putenv\0qsort\0rand\0realloc\0\ ! srand\0strtod\0strtol\0strtoul\0system\0", NONE }, ! ! { "string.h", "memchr\0memcmp\0memcpy\0memmove\0memset\0\ ! strcat\0strchr\0strcmp\0strcoll\0strcpy\0strcspn\0strerror\0\ ! strlen\0strncat\0strncmp\0strncpy\0strpbrk\0strrchr\0strspn\0strstr\0\ ! strtok\0strxfrm\0", NONE }, ! /* Should perhaps also add NULL and size_t */ ! ! { "sys/stat.h", "chmod\0fstat\0mkdir\0mkfifo\0stat\0lstat\0umask\0", ! "S_ISDIR\0S_ISBLK\0S_ISCHR\0S_ISFIFO\0S_ISREG\0S_ISLNK\0S_IFDIR\0\ ! S_IFBLK\0S_IFCHR\0S_IFIFO\0S_IFREG\0S_IFLNK\0" }, ! ! { "sys/times.h", "times\0", NONE }, ! /* "sys/types.h" add types (not in old g++-include) */ ! ! { "sys/utsname.h", "uname\0", NONE }, ! ! { "sys/wait.h", "wait\0waitpid\0", ! "WEXITSTATUS\0WIFEXITED\0WIFSIGNALED\0WIFSTOPPED\0WSTOPSIG\0\ ! WTERMSIG\0WNOHANG\0WNOTRACED\0" }, ! ! { "tar.h", NONE, NONE }, ! ! { "termios.h", "cfgetispeed\0cfgetospeed\0cfsetispeed\0cfsetospeed\0tcdrain\0tcflow\0tcflush\0tcgetattr\0tcsendbreak\0tcsetattr\0", NONE }, ! ! { "time.h", "asctime\0clock\0ctime\0difftime\0gmtime\0localtime\0mktime\0strftime\0time\0tzset\0", NONE }, ! ! { "unistd.h", "_exit\0access\0alarm\0chdir\0chown\0close\0ctermid\0cuserid\0\ ! dup\0dup2\0execl\0execle\0execlp\0execv\0execve\0execvp\0fork\0fpathconf\0\ ! getcwd\0getegid\0geteuid\0getgid\0getlogin\0getopt\0getpgrp\0getpid\0\ ! getppid\0getuid\0isatty\0link\0lseek\0pathconf\0pause\0pipe\0read\0rmdir\0\ ! setgid\0setpgid\0setsid\0setuid\0sleep\0sysconf\0tcgetpgrp\0tcsetpgrp\0\ ! ttyname\0unlink\0write\0", NONE }, ! ! { 0, NONE, NONE } }; *************** *** 147,154 **** /* NOTE: If you edit this, also edit gen-protos.c !! */ struct fn_decl * ! lookup_std_proto (name) ! char *name; { ! int i = hash (name) % HASH_SIZE; int i0 = i; for (;;) --- 292,300 ---- /* NOTE: If you edit this, also edit gen-protos.c !! */ struct fn_decl * ! lookup_std_proto (name, name_length) ! const char *name; ! int name_length; { ! int i = hashf (name, name_length, HASH_SIZE); int i0 = i; for (;;) *************** *** 158,162 **** return NULL; fn = &std_protos[hash_tab[i]]; ! if (strcmp (fn->fname, name) == 0) return fn; i = (i+1) % HASH_SIZE; --- 304,309 ---- return NULL; fn = &std_protos[hash_tab[i]]; ! if (strlen (fn->fname) == name_length ! && strncmp (fn->fname, name, name_length) == 0) return fn; i = (i+1) % HASH_SIZE; *************** *** 174,179 **** int lbrac_line, rbrac_line; ! char **required_functions; ! int required_unseen_count; void --- 321,326 ---- int lbrac_line, rbrac_line; ! namelist required_functions_list; ! int required_unseen_count = 0; void *************** *** 181,185 **** { ! #if 0 if (missing_extern_C_count + required_unseen_count > 0) fprintf (outf, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"); --- 328,332 ---- { ! #if ADD_MISSING_EXTERN_C if (missing_extern_C_count + required_unseen_count > 0) fprintf (outf, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"); *************** *** 208,215 **** struct partial_proto *partial_proto_list = NULL; ! struct partial_proto required_dummy_proto; #define REQUIRED(FN) ((FN)->partial == &required_dummy_proto) #define SET_REQUIRED(FN) ((FN)->partial = &required_dummy_proto) ! #define CLEAR_REQUIRED(FN) ((FN)->partial = 0) void --- 355,363 ---- struct partial_proto *partial_proto_list = NULL; ! struct partial_proto required_dummy_proto, seen_dummy_proto; #define REQUIRED(FN) ((FN)->partial == &required_dummy_proto) #define SET_REQUIRED(FN) ((FN)->partial = &required_dummy_proto) ! #define SET_SEEN(FN) ((FN)->partial = &seen_dummy_proto) ! #define SEEN(FN) ((FN)->partial == &seen_dummy_proto) void *************** *** 218,236 **** { /* The original include file defines fname as a macro. */ ! struct fn_decl *fn = lookup_std_proto (fname); /* Since fname is a macro, don't require a prototype for it. */ ! if (fn && REQUIRED (fn)) { ! CLEAR_REQUIRED (fn); ! required_unseen_count--; } switch (special_file_handling) { ! case errno_special: if (strcmp (fname, "errno") == 0) missing_errno = 0; break; ! case sys_stat_special: if (fname[0] == 'S' && fname[1] == '_') { --- 366,385 ---- { /* The original include file defines fname as a macro. */ ! struct fn_decl *fn = lookup_std_proto (fname, strlen (fname)); /* Since fname is a macro, don't require a prototype for it. */ ! if (fn) { ! if (REQUIRED (fn)) ! required_unseen_count--; ! SET_SEEN (fn); } switch (special_file_handling) { ! case errno_h: if (strcmp (fname, "errno") == 0) missing_errno = 0; break; ! case sys_stat_h: if (fname[0] == 'S' && fname[1] == '_') { *************** *** 252,263 **** void ! recognized_extern (name, type) char *name; char *type; { switch (special_file_handling) { ! case errno_special: ! if (strcmp (name, "errno") == 0) missing_errno = 0; break; } --- 401,413 ---- void ! recognized_extern (name, name_length, type, type_length) char *name; char *type; + int name_length, type_length; { switch (special_file_handling) { ! case errno_h: ! if (strncmp (name, "errno", name_length) == 0) missing_errno = 0; break; } *************** *** 273,281 **** void ! recognized_function (fname, kind, rtype, args, file_seen, line_seen) char *fname; int kind; /* One of 'f' 'F' or 'I' */ char *rtype; ! char *args; char *file_seen; int line_seen; --- 423,435 ---- void ! recognized_function (fname, fname_length, ! kind, rtype, rtype_length, ! have_arg_list, file_seen, line_seen) char *fname; + int fname_length; int kind; /* One of 'f' 'F' or 'I' */ char *rtype; ! int rtype_length; ! int have_arg_list; char *file_seen; int line_seen; *************** *** 284,303 **** int i; struct fn_decl *fn; ! #if 0 if (kind == 'f') missing_extern_C_count++; #endif ! fn = lookup_std_proto (fname); /* Remove the function from the list of required function. */ ! if (fn && REQUIRED (fn)) { ! CLEAR_REQUIRED (fn); ! required_unseen_count--; } /* If we have a full prototype, we're done. */ ! if (args[0] != '\0') return; --- 438,458 ---- int i; struct fn_decl *fn; ! #if ADD_MISSING_EXTERN_C if (kind == 'f') missing_extern_C_count++; #endif ! fn = lookup_std_proto (fname, fname_length); /* Remove the function from the list of required function. */ ! if (fn) { ! if (REQUIRED (fn)) ! required_unseen_count--; ! SET_SEEN (fn); } /* If we have a full prototype, we're done. */ ! if (have_arg_list) return; *************** *** 322,329 **** partial = (struct partial_proto*) obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto)); ! partial->fname = obstack_alloc (&scan_file_obstack, strlen (fname) + 1); ! strcpy (partial->fname, fname); ! partial->rtype = obstack_alloc (&scan_file_obstack, strlen (rtype) + 1); ! strcpy (partial->rtype, rtype); partial->line_seen = line_seen; partial->fn = fn; --- 477,485 ---- partial = (struct partial_proto*) obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto)); ! partial->fname = obstack_alloc (&scan_file_obstack, fname_length + 1); ! bcopy (fname, partial->fname, fname_length); ! partial->fname[fname_length] = 0; ! partial->rtype = obstack_alloc (&scan_file_obstack, rtype_length + 1); ! sprintf (partial->rtype, "%.*s", rtype_length, rtype); partial->line_seen = line_seen; partial->fn = fn; *************** *** 334,351 **** { fprintf (stderr, "(%s: %s non-prototype function declaration.)\n", ! inc_filename, fname); } } void ! read_scan_file (scan_file) ! FILE *scan_file; { obstack_init (&scan_file_obstack); ! scan_decls (scan_file); if (required_unseen_count + partial_count + missing_errno ! #if 0 + missing_extern_C_count #endif --- 490,609 ---- { fprintf (stderr, "(%s: %s non-prototype function declaration.)\n", ! inc_filename, partial->fname); ! } ! } ! ! /* For any name in NAMES that is defined as a macro, ! call recognized_macro on it. */ ! ! void ! check_macro_names (pfile, names) ! struct parse_file *pfile; ! namelist names; ! { ! while (*names) ! { ! if (cpp_lookup (pfile, names, -1, -1)) ! recognized_macro (names); ! names += strlen (names) + 1; } } void ! read_scan_file (in_fname, argc, argv) ! char *in_fname; ! int argc; ! char **argv; { + cpp_reader scan_in; + cpp_options scan_options; + struct fn_decl *fn; + int i; + obstack_init (&scan_file_obstack); ! init_parse_file (&scan_in); ! scan_in.data = &scan_options; ! init_parse_options (&scan_options); ! i = cpp_handle_options (&scan_in, argc, argv); ! if (i < argc) ! fatal ("Invalid option `%s'", argv[i]); ! push_parse_file (&scan_in, in_fname); ! CPP_OPTIONS (&scan_in)->no_line_commands = 1; ! ! scan_decls (&scan_in, argc, argv); ! check_macro_names (&scan_in, include_entry->required); ! check_macro_names (&scan_in, include_entry->extra); ! ! if (verbose && (scan_in.errors + warnings) > 0) ! fprintf (stderr, "(%s: %d errors and %d warnings from cpp)\n", ! inc_filename, scan_in.errors, warnings); ! if (scan_in.errors) ! exit (0); ! ! /* Traditionally, getc and putc are defined in terms of _filbuf and _flsbuf. ! If so, those functions are also required. */ ! if (special_file_handling == stdio_h ! && (fn = lookup_std_proto ("_filbuf", 7)) != NULL) ! { ! static char getchar_call[] = "getchar();"; ! cpp_buffer *buf = ! cpp_push_buffer (&scan_in, getchar_call, sizeof(getchar_call) - 1); ! int old_written = CPP_WRITTEN (&scan_in); ! int seen_filbuf = 0; ! ! /* Scan the macro expansion of "getchar();". */ ! for (;;) ! { ! enum cpp_token token = cpp_get_token (&scan_in); ! int length = CPP_WRITTEN (&scan_in) - old_written; ! CPP_SET_WRITTEN (&scan_in, old_written); ! if (token == CPP_EOF) /* Should not happen ... */ ! break; ! if (token == CPP_POP && CPP_BUFFER (&scan_in) == buf) ! { ! cpp_pop_buffer (&scan_in); ! break; ! } ! if (token == CPP_NAME && length == 7 ! && strcmp ("_filbuf", scan_in.token_buffer + old_written) == 0) ! seen_filbuf++; ! } ! if (seen_filbuf) ! { ! int need_filbuf = !SEEN (fn) && !REQUIRED (fn); ! struct fn_decl *flsbuf_fn = lookup_std_proto ("_flsbuf", 7); ! int need_flsbuf ! = flsbuf_fn && !SEEN (flsbuf_fn) && !REQUIRED (flsbuf_fn); ! ! /* Append "_filbuf" and/or "_flsbuf" to end of ! required_functions_list. */ ! if (need_filbuf + need_flsbuf) ! { ! int old_len = namelist_end (required_functions_list) ! - required_functions_list; ! char *new_list = (char*) xmalloc (old_len + 20); ! bcopy (required_functions_list, new_list, old_len); ! if (need_filbuf) ! { ! strcpy (new_list + old_len, "_filbuf"); ! old_len += 8; ! SET_REQUIRED (fn); ! } ! if (need_flsbuf) ! { ! strcpy (new_list + old_len, "_flsbuf"); ! old_len += 8; ! SET_REQUIRED (flsbuf_fn); ! } ! new_list[old_len] = '\0'; ! required_functions_list = (namelist)new_list; ! required_unseen_count += need_filbuf + need_flsbuf; ! } ! } ! } if (required_unseen_count + partial_count + missing_errno ! #if ADD_MISSING_EXTERN_C + missing_extern_C_count #endif *************** *** 366,370 **** fprintf (stderr, "%s: %d non-prototype function declarations.\n", inc_filename, partial_count); ! #if 0 if (missing_extern_C_count) fprintf (stderr, --- 624,628 ---- fprintf (stderr, "%s: %d non-prototype function declarations.\n", inc_filename, partial_count); ! #if ADD_MISSING_EXTERN_C if (missing_extern_C_count) fprintf (stderr, *************** *** 379,383 **** { struct fn_decl *fn; ! char **rptr; if (required_unseen_count) --- 637,641 ---- { struct fn_decl *fn; ! const char *cptr; if (required_unseen_count) *************** *** 391,399 **** /* Now we print out prototypes for those functions that we haven't seen. */ ! for (rptr = required_functions; *rptr; rptr++) { int macro_protect = 0; ! fn = lookup_std_proto (*rptr); if (fn == NULL || !REQUIRED (fn)) continue; --- 649,659 ---- /* Now we print out prototypes for those functions that we haven't seen. */ ! for (cptr = required_functions_list; *cptr!= '\0'; ) { int macro_protect = 0; + int name_len = strlen (cptr); ! fn = lookup_std_proto (cptr, name_len); ! cptr+= name_len + 1; if (fn == NULL || !REQUIRED (fn)) continue; *************** *** 426,434 **** switch (special_file_handling) { ! case errno_special: if (missing_errno) fprintf (outf, "extern int errno;\n"); break; ! case sys_stat_special: if (!seen_S_ISBLK && seen_S_IFBLK) fprintf (outf, --- 686,694 ---- switch (special_file_handling) { ! case errno_h: if (missing_errno) fprintf (outf, "extern int errno;\n"); break; ! case sys_stat_h: if (!seen_S_ISBLK && seen_S_IFBLK) fprintf (outf, *************** *** 453,457 **** ! #if 0 if (missing_extern_C_count + required_unseen_count > 0) fprintf (outf, "#ifdef __cplusplus\n}\n#endif\n"); --- 713,717 ---- ! #if ADD_MISSING_EXTERN_C if (missing_extern_C_count + required_unseen_count > 0) fprintf (outf, "#ifdef __cplusplus\n}\n#endif\n"); *************** *** 675,679 **** int c; int i, done; ! char *cptr, *cptr0, **pptr; int ifndef_line; int endif_line; --- 935,939 ---- int c; int i, done; ! const char *cptr, **pptr; int ifndef_line; int endif_line; *************** *** 694,698 **** if (argc < 4) { ! fprintf (stderr, "%s: Usage: foo.h infile.h outfile.h req_funcs cptr0) { ! struct fn_decl *fn = lookup_std_proto (cptr0); ! *pptr++ = cptr0; ! if (fn == NULL) ! fprintf (stderr, "Internal error: No prototype for %s\n", ! cptr0); ! else ! SET_REQUIRED (fn); } - cptr0 = cptr + 1; } } - required_unseen_count = pptr - required_functions; - *pptr = 0; ! read_scan_file (stdin); inf_fd = open (argv[2], O_RDONLY, 0666); --- 961,1011 ---- inc_filename = argv[1]; inc_filename_length = strlen (inc_filename); ! #ifdef FIXPROTO_IGNORE_LIST ! for (i = 0; files_to_ignore[i] != NULL; i++) { ! char *ignore_name = files_to_ignore[i]; ! int ignore_len = strlen (ignore_name); ! if (strncmp (inc_filename, ignore_name, ignore_len) == 0) { ! if (ignore_name[ignore_len-1] == '/' ! || inc_filename[ignore_len] == '\0') { ! if (verbose) ! fprintf (stderr, "%s: ignoring %s\n", progname, inc_filename); ! exit (0); } } + + } + #endif + + if (strcmp (inc_filename, "sys/stat.h") == 0) + special_file_handling = sys_stat_h; + else if (strcmp (inc_filename, "errno.h") == 0) + special_file_handling = errno_h, missing_errno = 1; + else if (strcmp (inc_filename, "stdio.h") == 0) + special_file_handling = stdio_h; + include_entry = std_include_table; + while (include_entry->name != NULL + && strcmp (inc_filename, include_entry->name) != 0) + include_entry++; + + required_functions_list = include_entry->required; + + /* Count and mark the prototypes required for this include file. */ + for (cptr = required_functions_list; *cptr!= '\0'; ) + { + int name_len = strlen (cptr); + struct fn_decl *fn = lookup_std_proto (cptr, name_len); + required_unseen_count++; + if (fn == NULL) + fprintf (stderr, "Internal error: No prototype for %s\n", cptr); + else + SET_REQUIRED (fn); + cptr += name_len + 1; } ! read_scan_file (argv[2], argc - 4, argv + 4); inf_fd = open (argv[2], O_RDONLY, 0666); *************** *** 795,802 **** if (check_protection (&ifndef_line, &endif_line)) { - #if 0 - fprintf (stderr, "#ifndef %s on line %d; #endif on line %d\n", - protect_name, ifndef_line, endif_line); - #endif lbrac_line = ifndef_line+1; rbrac_line = endif_line; --- 1068,1071 ---- *************** *** 829,833 **** INF_UNGET (c); fputs (buf.base, outf); ! fn = lookup_std_proto (buf.base); /* We only want to edit the declaration matching the one seen by scan-decls, as there can be multiple --- 1098,1102 ---- INF_UNGET (c); fputs (buf.base, outf); ! fn = lookup_std_proto (buf.base, strlen (buf.base)); /* We only want to edit the declaration matching the one seen by scan-decls, as there can be multiple *************** *** 872,874 **** --- 1141,1202 ---- return 0; + } + + /* Stub error functions. These replace cpperror.c, + because we want to suppress error messages. */ + + void + cpp_file_line_for_message (pfile, filename, line, column) + cpp_reader *pfile; + char *filename; + int line, column; + { + if (!verbose) + return; + if (column > 0) + fprintf (stderr, "%s:%d:%d: ", filename, line, column); + else + fprintf (stderr, "%s:%d: ", filename, line); + } + + void + cpp_print_containing_files (pfile) + cpp_reader *pfile; + { + } + + /* IS_ERROR is 1 for error, 0 for warning */ + void cpp_message (pfile, is_error, msg, arg1, arg2, arg3) + int is_error; + cpp_reader *pfile; + char *msg; + char *arg1, *arg2, *arg3; + { + if (is_error) + pfile->errors++; + if (!verbose) + return; + if (!is_error) + fprintf (stderr, "warning: "); + fprintf (stderr, msg, arg1, arg2, arg3); + fprintf (stderr, "\n"); + } + + void + fatal (str, arg) + char *str, *arg; + { + fprintf (stderr, "%s: %s: ", progname, inc_filename); + fprintf (stderr, str, arg); + fprintf (stderr, "\n"); + exit (FATAL_EXIT_CODE); + } + + void + cpp_pfatal_with_name (pfile, name) + cpp_reader *pfile; + char *name; + { + cpp_perror_with_name (pfile, name); + exit (FATAL_EXIT_CODE); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixinc.dgux gcc-2.7.0/fixinc.dgux *** gcc-2.6.3/fixinc.dgux Thu May 26 11:47:20 1994 --- gcc-2.7.0/fixinc.dgux Thu Jun 15 17:02:11 1995 *************** *** 19,23 **** # 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. # # --- 19,24 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # # diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixinc.ptx gcc-2.7.0/fixinc.ptx *** gcc-2.6.3/fixinc.ptx Sat Sep 10 06:45:05 1994 --- gcc-2.7.0/fixinc.ptx Thu Jun 15 17:02:40 1995 *************** *** 20,24 **** # 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 script munges the native include files provided with DYNIX/ptx --- 20,25 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # # This script munges the native include files provided with DYNIX/ptx diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixinc.sco gcc-2.7.0/fixinc.sco *** gcc-2.6.3/fixinc.sco Thu May 26 11:47:10 1994 --- gcc-2.7.0/fixinc.sco Thu Jun 15 17:03:03 1995 *************** *** 21,25 **** # 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 script munges the native include files provided with SCO --- 21,26 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # # This script munges the native include files provided with SCO diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixinc.svr4 gcc-2.7.0/fixinc.svr4 *** gcc-2.6.3/fixinc.svr4 Thu Sep 22 13:14:18 1994 --- gcc-2.7.0/fixinc.svr4 Thu Jun 15 17:03:29 1995 *************** *** 20,24 **** # 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 script munges the native include files provided with System V --- 20,25 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # # This script munges the native include files provided with System V *************** *** 189,192 **** --- 190,194 ---- s/__STDC__[ ][ ]*!=[ ][ ]*0/defined (__STRICT_ANSI__)/g s/__STDC__ - 0 == 0/!defined (__STRICT_ANSI__)/g + /^typedef[ ][ ]*[unsigned ]*long[ ][ ]*[u_]*longlong_t;/s/long/long long/ ' $2/$file > $2/$file.sed mv $2/$file.sed $2/$file *************** *** 1008,1038 **** # Conditionalize some of on _KERNEL being defined. - file=netinet/in.h - base=`basename $file` - if [ -r ${LIB}/$file ]; then - file_to_fix=${LIB}/$file - else - if [ -r ${INPUT}/$file ]; then - file_to_fix=${INPUT}/$file - else - file_to_fix="" - fi - fi - if [ \! -z "$file_to_fix" ]; then - echo Checking $file_to_fix - if grep _KERNEL $file_to_fix > /dev/null; then - true - else - sed -e '/#ifdef INKERNEL/i\ - #ifdef _KERNEL' \ - -e '/#endif[ ]*\/\* INKERNEL \*\//a\ - #endif /* _KERNEL */' \ - $file_to_fix > ${LIB}/${file}.sed - rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file - echo Fixed $file_to_fix - fi - fi - # Conditionalize some of on __GNUC__ and __GNUG__. --- 1010,1041 ---- # Conditionalize some of on _KERNEL being defined. + # This has been taken out because it breaks on some versions of + # DYNIX/ptx, and it does not seem to do much good on any system. + # file=netinet/in.h + # base=`basename $file` + # if [ -r ${LIB}/$file ]; then + # file_to_fix=${LIB}/$file + # else + # if [ -r ${INPUT}/$file ]; then + # file_to_fix=${INPUT}/$file + # else + # file_to_fix="" + # fi + # fi + # if [ \! -z "$file_to_fix" ]; then + # echo Checking $file_to_fix + # if grep _KERNEL $file_to_fix > /dev/null; then + # true + # else + # sed -e '/#ifdef INKERNEL/i\ + # #ifdef _KERNEL' \ + # -e '/#endif[ ]*\/\* INKERNEL \*\//a\ + # #endif /* _KERNEL */' \ + # $file_to_fix > ${LIB}/${file}.sed + # rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + # echo Fixed $file_to_fix + # fi + # fi # Conditionalize some of on __GNUC__ and __GNUG__. *************** *** 1510,1517 **** #ifdef __STDC__ ! extern __inline__ unsigned long htonl (unsigned long); ! extern __inline__ unsigned short htons (unsigned int); ! extern __inline__ unsigned long ntohl (unsigned long); ! extern __inline__ unsigned short ntohs (unsigned int); #endif /* defined (__STDC__) */ --- 1513,1520 ---- #ifdef __STDC__ ! static __inline__ unsigned long htonl (unsigned long); ! static __inline__ unsigned short htons (unsigned int); ! static __inline__ unsigned long ntohl (unsigned long); ! static __inline__ unsigned short ntohs (unsigned int); #endif /* defined (__STDC__) */ *************** *** 1526,1530 **** /* We must use a new-style function definition, so that this will also be valid for C++. */ ! extern __inline__ unsigned long htonl (unsigned long __arg) { --- 1529,1533 ---- /* We must use a new-style function definition, so that this will also be valid for C++. */ ! static __inline__ unsigned long htonl (unsigned long __arg) { *************** *** 1539,1543 **** /* Convert a host short to a network short. */ ! extern __inline__ unsigned short htons (unsigned int __arg) { --- 1542,1546 ---- /* Convert a host short to a network short. */ ! static __inline__ unsigned short htons (unsigned int __arg) { *************** *** 1561,1565 **** /* Convert a host long to a network long. */ ! extern __inline__ unsigned long htonl (unsigned long __arg) { --- 1564,1568 ---- /* Convert a host long to a network long. */ ! static __inline__ unsigned long htonl (unsigned long __arg) { *************** *** 1575,1579 **** /* Convert a host short to a network short. */ ! extern __inline__ unsigned short htons (unsigned int __arg) { --- 1578,1582 ---- /* Convert a host short to a network short. */ ! static __inline__ unsigned short htons (unsigned int __arg) { *************** *** 1593,1597 **** /* Convert a host long to a network long. */ ! extern __inline__ unsigned long htonl (unsigned long __arg) { --- 1596,1600 ---- /* Convert a host long to a network long. */ ! static __inline__ unsigned long htonl (unsigned long __arg) { *************** *** 1601,1605 **** /* Convert a host short to a network short. */ ! extern __inline__ unsigned short htons (unsigned int __arg) { --- 1604,1608 ---- /* Convert a host short to a network short. */ ! static __inline__ unsigned short htons (unsigned int __arg) { *************** *** 1611,1615 **** /* Convert a network long to a host long. */ ! extern __inline__ unsigned long ntohl (unsigned long __arg) { --- 1614,1618 ---- /* Convert a network long to a host long. */ ! static __inline__ unsigned long ntohl (unsigned long __arg) { *************** *** 1619,1623 **** /* Convert a network short to a host short. */ ! extern __inline__ unsigned short ntohs (unsigned int __arg) { --- 1622,1626 ---- /* Convert a network short to a host short. */ ! static __inline__ unsigned short ntohs (unsigned int __arg) { diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixinc.winnt gcc-2.7.0/fixinc.winnt *** gcc-2.6.3/fixinc.winnt --- gcc-2.7.0/fixinc.winnt Thu Jun 15 17:03:55 1995 *************** *** 0 **** --- 1,223 ---- + #! sh + # + # fixinc.winnt -- Install modified versions of Windows NT system include + # files. + # + # Based on fixinc.sco script by Ian Lance Taylor (ian@airs.com)). + # Modifications by Douglas Rupp (drupp@cs.washington.edu) + # + # 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 2, 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, 59 Temple Place - Suite 330, + # Boston, MA 02111-1307, USA. + # + # This script munges the native include files provided with Windows NT + # 3.5 SDK systems so as to provide a reasonable namespace when + # compiling with gcc. The header files by default do not + # provide many essential definitions and declarations if + # __STDC__ is 1. This script modifies the header files to check + # for __STRICT_ANSI__ being defined instead. However the most + # important modification is to change all occurrences of __stdcall + # and __cdecl to __attribute__((stdcall)) and __attribute__((cdecl)), + # respectively. Once munged, the + # resulting new system include files are placed in a directory + # that GNU C will search *before* searching the /mstools/h + # directory. This script should work properly for an /mstools/h + # directory dated 9/4/94 on the installation CDROM. + # + # See README-fixinc for more information. + + # Directory containing the original header files. + INPUT=${2-${INPUT-/mstools/h}} + + # Fail if no arg to specify a directory for the output. + if [ x$1 = x ] + then echo fixincludes: no output directory specified + exit 1 + fi + + # Directory in which to store the results. + LIB=${1?"fixincludes: output directory not specified"} + + # Make sure it exists. + if [ ! -d $LIB ]; then + mkdir $LIB || exit 1 + fi + + ORIG_DIR=`pwd` + + # Make LIB absolute if it is relative. + # Don't do this if not necessary, since may screw up automounters. + case $LIB in + /*) + ;; + *) + cd $LIB; LIB=`${PWDCMD-pwd}` + ;; + esac + + echo 'Building fixincludes in ' ${LIB} + + # Determine whether this filesystem has symbolic links. + if ln -s X $LIB/ShouldNotExist 2>NUL; then + rm -f $LIB/ShouldNotExist + LINKS=true + else + LINKS=false + fi + + echo 'Making directories:' + cd ${INPUT} + if $LINKS; then + files=`ls -LR | sed -n s/:$//p` + else + files=`find . -type d -print | sed '/^.$/d'` + fi + for file in $files; do + rm -rf $LIB/$file + if [ ! -d $LIB/$file ] + then mkdir $LIB/$file + fi + done + + # treetops gets an alternating list + # of old directories to copy + # and the new directories to copy to. + treetops="${INPUT} ${LIB}" + + 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 ${INPUT} + cd $1 + files=`find . -name '*.[hH]' -type f -print` + echo 'Checking header files:' + for file in $files; do + echo $file + if egrep "!__STDC__" $file >NUL; then + if [ -r $file ]; then + cp $file $2/$file >NUL 2>&1 || echo "Can't copy $file" + chmod +w,a+r $2/$file + + # The following have been removed from the sed command below + # because it is more useful to leave these things in. + # The only reason to remove them was for -pedantic, + # which isn't much of a reason. -- rms. + # /^[ ]*#[ ]*ident/d + + sed -e ' + s/!__STDC__/!defined (__STRICT_ANSI__)/g + ' $2/$file > $2/$file.sed + mv $2/$file.sed $2/$file + if cmp $file $2/$file >NUL 2>&1; then + rm $2/$file + else + echo Fixed $file + fi + fi + fi + done + shift; shift + done + + # Fix first broken decl of getcwd present on some svr4 systems. + + file=direct.h + base=`basename $file` + if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file + else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi + fi + if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + sed -e 's/getcwd(char \*, int)/getcwd(char *, size_t)/' $file_to_fix > /tmp/$base + if cmp $file_to_fix /tmp/$base >NUL 2>&1; then \ + true + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base + fi + + file=rpcndr.h + base=`basename $file` + if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file + else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi + fi + if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + sed -e 's/Format\[\]/Format\[1\]/' $file_to_fix > /tmp/$base + if cmp $file_to_fix /tmp/$base >NUL 2>&1; then \ + true + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base + fi + + file=winnt.h + base=`basename $file` + if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file + else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi + fi + if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + sed -e ' + s/^#if !defined (__cplusplus)/#if 0/ + s/^#define DECLSPEC_IMPORT __declspec(dllimport)/#define DECLSPEC_IMPORT/ + ' $file_to_fix > /tmp/$base + if cmp $file_to_fix /tmp/$base >NUL 2>&1; then \ + true + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base + fi + + echo 'Removing unneeded directories:' + cd $LIB + files=`find . -type d -print | sort -r` + for file in $files; do + rmdir $LIB/$file > NUL 2>&1 + done + + exit 0 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixincludes gcc-2.7.0/fixincludes *** gcc-2.6.3/fixincludes Mon Nov 14 19:19:12 1994 --- gcc-2.7.0/fixincludes Sun Jun 11 13:37:31 1995 *************** *** 290,294 **** /#define[ ]*[ ]_CTRL/ s/'\''\([cgx]\)'\''/\1/g /#define.BSD43_CTRL/ s/'\''\([cgx]\)'\''/\1/g ! /#[el]*if/{ s/[a-zA-Z0-9_][a-zA-Z0-9_]*/ & /g --- 290,294 ---- /#define[ ]*[ ]_CTRL/ s/'\''\([cgx]\)'\''/\1/g /#define.BSD43_CTRL/ s/'\''\([cgx]\)'\''/\1/g ! /#[ ]*[el]*if/{ s/[a-zA-Z0-9_][a-zA-Z0-9_]*/ & /g *************** *** 306,312 **** --- 306,314 ---- s/ pdp11 / __pdp11__ /g s/ pyr / __pyr__ /g + s/ sel / __sel__ /g s/ sony_news / __sony_news__ /g s/ sparc / __sparc__ /g s/ sun\([a-z0-9]*\) / __sun\1__ /g + s/ tahoe / __tahoe__ /g s/ tower\([_0-9]*\) / __tower\1__ /g s/ u370 / __u370__ /g *************** *** 315,319 **** s/ vax / __vax__ /g s/ _*MIPSE\([LB]\) / __MIPSE\1__ /g ! s/ _*R\([34]\)000 / __R\1000__ /g s/ _*SYSTYPE_\([A-Z0-9]*\) / __SYSTYPE_\1__ /g --- 317,321 ---- s/ vax / __vax__ /g s/ _*MIPSE\([LB]\) / __MIPSE\1__ /g ! s/ _*\([Rr][34]\)000 / __\1000__ /g s/ _*SYSTYPE_\([A-Z0-9]*\) / __SYSTYPE_\1__ /g *************** *** 1526,1529 **** --- 1528,1532 ---- sed -e 's@ va_list @ __gnuc_va_list @' \ -e 's@ va_list)@ __gnuc_va_list)@' \ + -e 's@ _BSD_VA_LIST_));@ __gnuc_va_list));@' \ -e 's@ _VA_LIST_));@ __gnuc_va_list));@' \ -e 's@ va_list@ __va_list__@' \ *************** *** 1556,1560 **** fi ! # parameter to atof not const on DECstation Ultrix V4.0. # also get rid of bogus inline definitions in HP-UX 8.0 file=math.h --- 1559,1563 ---- fi ! # parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R. # also get rid of bogus inline definitions in HP-UX 8.0 file=math.h *************** *** 1567,1572 **** if [ -r ${LIB}/$file ]; then echo Fixing $file, non-const arg ! sed -e 's@atof( char \*__nptr );@atof( const char *__nptr );@' \ ! -e 's@inline int abs(int [a-z][a-z]*) {.*}@@' \ -e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \ -e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \ --- 1570,1575 ---- if [ -r ${LIB}/$file ]; then echo Fixing $file, non-const arg ! sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \ ! -e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \ -e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \ -e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \ *************** *** 1585,1588 **** --- 1588,1620 ---- fi + # fix bogus recursive stdlib.h in NEWS-OS 4.0C + file=stdlib.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, recursive inclusion + sed -e '/^#include /i\ + #if 0 + ' \ + -e '/^#include /a\ + #endif + ' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + # Avoid nested comments on Ultrix 4.3. file=rpc/svc.h *************** *** 1827,1830 **** --- 1859,1886 ---- fi + # Correct the return type for strlen in strings.h in SunOS 4. + file=strings.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + # Delete the '#define void int' line from curses.h on Lynx file=curses.h *************** *** 1851,1854 **** --- 1907,1934 ---- fi + # Fix `typedef struct term;' on hppa1.1-hp-hpux9. + file=curses.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/^[ ]*typedef[ ][ ]*\(struct[ ][ ]*term[ ]*;[ ]*\)$/\1/' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + # For C++, avoid any typedef or macro definition of bool, and use the # built in type instead. *************** *** 1866,1872 **** -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\ #endif'\ ! -e '/^typedef[ ][ ]*char[ ][ ]*bool;[ ]*$/i\ #ifndef __cplusplus'\ ! -e '/^typedef[ ][ ]*char[ ][ ]*bool;[ ]*$/a\ #endif'\ ${LIB}/$file > ${LIB}/${file}.sed --- 1946,1952 ---- -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\ #endif'\ ! -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;[ ]*$/i\ #ifndef __cplusplus'\ ! -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;[ ]*$/a\ #endif'\ ${LIB}/$file > ${LIB}/${file}.sed *************** *** 2097,2101 **** else echo "Fixing $file (needs stdio.h)" ! echo '#include ' >>${LIB}/$file fi fi --- 2177,2183 ---- else echo "Fixing $file (needs stdio.h)" ! echo '#ifdef __cplusplus ! #include ! #endif' >>${LIB}/$file fi fi *************** *** 2106,2110 **** else echo "Fixing $file (needs stdlib.h)" ! echo '#include ' >>${LIB}/$file fi fi --- 2188,2194 ---- else echo "Fixing $file (needs stdlib.h)" ! echo '#ifdef __cplusplus ! #include ! #endif' >>${LIB}/$file fi fi *************** *** 2199,2202 **** --- 2283,2417 ---- fi fi + + # Fix definitions of macros used by va-i960.h in VxWorks header file. + file=arch/i960/archI960.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/__vsiz/__vxvsiz/' -e 's/__vali/__vxvali/' \ + -e s'/__vpad/__vxvpad/' -e 's/__alignof__/__vxalignof__/' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + + # Make VxWorks header which is almost gcc ready fully gcc ready. + file=types/vxTypesBase.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/' \ + -e '/[ ]size_t/i\ + #ifndef _GCC_SIZE_T\ + #define _GCC_SIZE_T + ' \ + -e '/[ ]size_t/a\ + #endif + ' \ + -e '/[ ]ptrdiff_t/i\ + #ifndef _GCC_PTRDIFF_T\ + #define _GCC_PTRDIFF_T + ' \ + -e '/[ ]ptrdiff_t/a\ + #endif + ' \ + -e '/[ ]wchar_t/i\ + #ifndef _GCC_WCHAR_T\ + #define _GCC_WCHAR_T + ' \ + -e '/[ ]wchar_t/a\ + #endif + ' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + + # Fix VxWorks to not require including . + file=sys/stat.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/sys 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + if egrep '#include' ${LIB}/$file >/dev/null 2>&1; then + : + else + if egrep 'ULONG' ${LIB}/$file >/dev/null 2>&1 \ + && [ -r types/vxTypesOld.h ]; then + echo Fixing $file + sed -e '/#define[ ][ ]*__INCstath/a\ + #include + ' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + fi + fi + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + + # Fix VxWorks to not require including . + file=time.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/sys 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + if egrep 'uint_t[ ][ ]*_clocks_per_sec' ${LIB}/$file >/dev/null 2>&1; then + echo Fixing $file + sed -e 's/uint_t/unsigned int/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + fi + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + else + # Find any include directives that use "file". + for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" + done + fi + fi + # This loop does not appear to do anything, because it uses file Only in gcc-2.6.3: fixlimits.h diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fixproto gcc-2.7.0/fixproto *** gcc-2.6.3/fixproto Wed Aug 31 20:38:31 1994 --- gcc-2.7.0/fixproto Thu Jun 15 17:04:17 1995 *************** *** 20,24 **** # 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. # # DESCRIPTION --- 20,25 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # # DESCRIPTION *************** *** 47,51 **** # by "reference", using GNU cpp's #include_next mechanism. # This is currently not done, partly because #include_next is ! # fragile (susceptible to version incompatibilties, and depends # and GCC-specific features), and partly for performance reasons. # --- 48,52 ---- # by "reference", using GNU cpp's #include_next mechanism. # This is currently not done, partly because #include_next is ! # fragile (susceptible to version incompatibilities, and depends # and GCC-specific features), and partly for performance reasons. # *************** *** 57,61 **** progname=`basename $progname` original_dir=`pwd` - CPP=${CPP-./cpp} FIX_HEADER=${FIX_HEADER-$original_dir/fix-header} DEFINES="-D__STDC__=0 -D__cplusplus ${FIXPROTO_DEFINES}" --- 58,61 ---- *************** *** 244,333 **** then true else ! # echo doing $rel_source_file from $abs_source_dir ! required_list= ! extra_check_list= ! case $rel_source_file in ! ctype.h) ! required_list="isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper" ;; ! dirent.h) ! required_list="closedir opendir readdir rewinddir" ;; ! errno.h) ! extra_check_list="errno" ;; ! curses.h) ! required_list="box delwin endwin getcurx getcury initscr mvcur mvwprintw mvwscanw newwin overlay overwrite scroll subwin touchwin waddstr wclear wclrtobot wclrtoeol waddch wdelch wdeleteln werase wgetch wgetstr winsch winsertln wmove wprintw wrefresh wscanw wstandend wstandout" ;; ! fcntl.h) ! required_list="creat fcntl open" ;; ! grp.h) ! #Maybe also "getgrent fgetgrent setgrent endgrent" */ ! required_list="getgrgid getgrnam" ;; ! limit.h) ! required_list= /* Lots of macros */ ;; ! locale.h) ! required_list="localeconv setlocale" ;; ! math.h) ! required_list="acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp ldexp log10 log modf pow sin sinh sqrt tan tanh" ! extra_check_list="HUGE_VAL" ;; ! pwd.h) ! required_list="getpwnam getpwuid" ;; ! setjmp.h) ! # Left out siglongjmp sigsetjmp - these depend on sigjmp_buf. ! required_list="longjmp setjmp" ;; ! signal.h) ! # Left out signal() - its prototype is too complex for us! ! # Also left out "sigaction sigaddset sigdelset sigemptyset ! # sigfillset sigismember sigpending sigprocmask sigsuspend" ! # because these need sigset_t or struct sigaction. ! # Most systems that provide them will also declare them. ! required_list="kill raise" ;; ! stdio.h) ! required_list="clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell fwrite getc getchar gets pclose perror popen printf putc putchar puts remove rename rewind scanf setbuf setvbuf sprintf sscanf vprintf vsprintf vfprintf tmpfile tmpnam ungetc" ! if grep '[^_a-zA-Z0-9]_flsbuf' <$abs_source_file >/dev/null; then ! required_list="$required_list _flsbuf _filbuf" ! fi ! # Should perhaps also handle NULL, EOF, ... ? ! ;; ! stdlib.h) ! required_list="$required_stdlib_h" ;; ! string.h) ! required_list="memchr memcmp memcpy memmove memset strcat strchr strcmp strcoll strcpy strcspn strerror strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtok strxfrm" ;; ! # Should perhaps also add NULL and size_t ! sys/stat.h) ! required_list="chmod fstat mkdir mkfifo stat lstat umask" ! extra_check_list="S_ISDIR S_ISBLK S_ISCHR S_ISFIFO S_ISREG S_ISLNK S_IFDIR S_IFBLK S_IFCHR S_IFIFO S_IFREG S_IFLNK" ;; ! sys/times.h) ! required_list="times" ;; ! # "sys/types.h" add types (not in old g++-include) ! sys/utsname.h) ! required_list="uname" ;; ! sys/wait.h) ! required_list="wait waitpid" ! extra_check_list="WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG WNOHANG WNOTRACED" ;; ! tar.h) ! required_list= ;; ! termios.h) ! required_list="cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain tcflow tcflush tcgetattr tcsendbreak tcsetattr" ;; ! time.h) ! required_list="asctime clock ctime difftime gmtime localtime mktime strftime time tzset" ;; ! unistd.h) ! required_list="$required_unistd_h" ;; ! esac ! rm -f fixtmp.c fixtmp.i ! echo "#include <${rel_source_file}>" >fixtmp.c ! for macro in ${required_list} ${extra_check_list} ! do ! echo "#ifdef ${macro}" >>fixtmp.c ! echo "__DEFINED_MACRO_${macro};" >>fixtmp.c ! echo "#endif" >>fixtmp.c ! done ! if ${CPP} ${DEFINES} $include_path fixtmp.c >fixtmp.i 2>/dev/null ! then ! $FIX_HEADER $rel_source_file $abs_source_file $abs_target_file "$required_list" >fixproto.list fi done - rm -f fixtmp.c fixtmp.i done done_dirs="$done_dir $rel_source_dir" --- 244,251 ---- then true else ! $FIX_HEADER $rel_source_file $abs_source_file $abs_target_file ${DEFINES} $include_path echo "${rel_source_file}" >>fixproto.list fi done done done_dirs="$done_dir $rel_source_dir" *************** *** 349,353 **** #endif EOF ! ${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file "$required_list" 200) + { + pass++; + n_basic_blocks -= deleted; + /* `n_basic_blocks' may not be correct at this point: two previously + separate blocks may now be merged. That's ok though as we + recalculate it during the second pass. It certainly can't be + any larger than the current value. */ + goto restart; + } } } + /* Subroutines of find_basic_blocks. */ + /* Return 1 if X contain a REG or MEM that is not in the constant pool. */ *************** *** 721,725 **** return 0; } ! /* Check expression X for label references; if one is found, add INSN to the label's chain of references. --- 791,795 ---- return 0; } ! /* Check expression X for label references; if one is found, add INSN to the label's chain of references. *************** *** 782,785 **** --- 852,869 ---- } } + + /* Delete INSN by patching it out. + Return the next insn. */ + + static rtx + flow_delete_insn (insn) + rtx insn; + { + /* ??? For the moment we assume we don't have to watch for NULLs here + since the start/end of basic blocks aren't deleted like this. */ + NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); + PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); + return NEXT_INSN (insn); + } /* Determine which registers are live at the start of each *************** *** 1356,1381 **** prev = PREV_INSN (insn); ! /* Look for loop boundaries, remembering that we are going backwards. */ ! if (GET_CODE (insn) == NOTE ! && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END) ! loop_depth++; ! else if (GET_CODE (insn) == NOTE ! && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) ! loop_depth--; ! ! /* If we have LOOP_DEPTH == 0, there has been a bookkeeping error. ! Abort now rather than setting register status incorrectly. */ ! if (loop_depth == 0) ! abort (); ! /* If this is a call to `setjmp' et al, ! warn if any non-volatile datum is live. */ ! if (final && GET_CODE (insn) == NOTE ! && NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP) ! { ! int i; ! for (i = 0; i < regset_size; i++) ! regs_live_at_setjmp[i] |= old[i]; } --- 1440,1466 ---- prev = PREV_INSN (insn); ! if (GET_CODE (insn) == NOTE) ! { ! /* Look for loop boundaries, remembering that we are going ! backwards. */ ! if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END) ! loop_depth++; ! else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) ! loop_depth--; ! ! /* If we have LOOP_DEPTH == 0, there has been a bookkeeping error. ! Abort now rather than setting register status incorrectly. */ ! if (loop_depth == 0) ! abort (); ! /* If this is a call to `setjmp' et al, ! warn if any non-volatile datum is live. */ ! if (final && NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP) ! { ! int i; ! for (i = 0; i < regset_size; i++) ! regs_live_at_setjmp[i] |= old[i]; ! } } *************** *** 1387,1391 **** and then LIVE regs turned on. */ ! if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') { register int i; --- 1472,1476 ---- and then LIVE regs turned on. */ ! else if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') { register int i; *************** *** 1946,1952 **** register int blocknum = BLOCK_NUM (insn); - /* The next use is no longer "next", since a store intervenes. */ - reg_next_use[regno] = 0; - /* If this is a hard reg, record this function uses the reg. */ --- 2031,2034 ---- *************** *** 1958,1961 **** --- 2040,2047 ---- for (i = regno; i < endregno; i++) { + /* The next use is no longer "next", since a store + intervenes. */ + reg_next_use[i] = 0; + regs_ever_live[i] = 1; reg_n_sets[i]++; *************** *** 1964,1967 **** --- 2050,2057 ---- else { + /* The next use is no longer "next", since a store + intervenes. */ + reg_next_use[regno] = 0; + /* Keep track of which basic blocks each reg appears in. */ *************** *** 2299,2305 **** && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER && (GET_MODE_SIZE (GET_MODE (x)) ! != GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! && (INTEGRAL_MODE_P (GET_MODE (x)) ! || INTEGRAL_MODE_P (GET_MODE (SUBREG_REG (x))))) reg_changes_size[REGNO (SUBREG_REG (x))] = 1; --- 2389,2393 ---- && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER && (GET_MODE_SIZE (GET_MODE (x)) ! != GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) reg_changes_size[REGNO (SUBREG_REG (x))] = 1; *************** *** 2307,2310 **** --- 2395,2405 ---- x = SUBREG_REG (x); + /* In case the SUBREG is not of a register, don't optimize */ + if (GET_CODE (x) != REG) + { + mark_used_regs (needed, live, x, final, insn); + return; + } + /* ... fall through ... */ *************** *** 2492,2495 **** --- 2587,2597 ---- || GET_CODE (testreg) == SUBREG) { + if (GET_CODE (testreg) == SUBREG + && GET_CODE (SUBREG_REG (testreg)) == REG + && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER + && (GET_MODE_SIZE (GET_MODE (testreg)) + != GET_MODE_SIZE (GET_MODE (SUBREG_REG (testreg))))) + reg_changes_size[REGNO (SUBREG_REG (testreg))] = 1; + /* Modifying a single register in an alternate mode does not use any of the old value. But these other diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/fold-const.c gcc-2.7.0/fold-const.c *** gcc-2.6.3/fold-const.c Wed Nov 30 19:03:17 1994 --- gcc-2.7.0/fold-const.c Thu Jun 15 07:35:19 1995 *************** *** 1,4 **** /* Fold a constant sub-tree into a single node for C-compiler ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Fold a constant sub-tree into a single node for C-compiler ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 should be rewritten to use an arbitrary precision --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /*@@ This file should be rewritten to use an arbitrary precision *************** *** 64,67 **** --- 65,69 ---- static tree eval_subst PROTO((tree, tree, tree, tree, tree)); static tree omit_one_operand PROTO((tree, tree, tree)); + static tree pedantic_omit_one_operand PROTO((tree, tree, tree)); static tree distribute_bit_expr PROTO((enum tree_code, tree, tree, tree)); static tree make_bit_field_ref PROTO((tree, tree, int, int, int)); *************** *** 75,78 **** --- 77,81 ---- static tree range_test PROTO((enum tree_code, tree, enum tree_code, enum tree_code, tree, tree, tree)); + static tree unextend PROTO((tree, int, int)); static tree fold_truthop PROTO((enum tree_code, tree, tree, tree)); static tree strip_compound_expr PROTO((tree, tree)); *************** *** 186,190 **** /* Unsigned types do not suffer sign extension or overflow. */ if (TREE_UNSIGNED (TREE_TYPE (t))) ! return 0; /* If the value's sign bit is set, extend the sign. */ --- 189,193 ---- /* Unsigned types do not suffer sign extension or overflow. */ if (TREE_UNSIGNED (TREE_TYPE (t))) ! return overflow; /* If the value's sign bit is set, extend the sign. */ *************** *** 336,341 **** } ! if (count >= prec) ! count = (unsigned HOST_WIDE_INT) count & prec; if (count >= HOST_BITS_PER_WIDE_INT) --- 339,346 ---- } ! #ifdef SHIFT_COUNT_TRUNCATED ! if (SHIFT_COUNT_TRUNCATED) ! count %= prec; ! #endif if (count >= HOST_BITS_PER_WIDE_INT) *************** *** 369,374 **** : 0); ! if (count >= prec) ! count = (unsigned HOST_WIDE_INT) count % prec; if (count >= HOST_BITS_PER_WIDE_INT) --- 374,381 ---- : 0); ! #ifdef SHIFT_COUNT_TRUNCATED ! if (SHIFT_COUNT_TRUNCATED) ! count %= prec; ! #endif if (count >= HOST_BITS_PER_WIDE_INT) *************** *** 398,429 **** HOST_WIDE_INT *lv, *hv; { ! HOST_WIDE_INT arg1[4]; ! register int i; ! register int carry; if (count < 0) ! { ! rrotate_double (l1, h1, - count, prec, lv, hv); ! return; ! } ! ! encode (arg1, l1, h1); ! ! if (count > prec) ! count = prec; ! ! carry = arg1[4 - 1] >> 16 - 1; ! while (count > 0) ! { ! for (i = 0; i < 4; i++) ! { ! carry += arg1[i] << 1; ! arg1[i] = LOWPART (carry); ! carry = HIGHPART (carry); ! } ! count--; ! } ! decode (arg1, lv, hv); } --- 405,418 ---- HOST_WIDE_INT *lv, *hv; { ! HOST_WIDE_INT s1l, s1h, s2l, s2h; + count %= prec; if (count < 0) ! count += prec; ! lshift_double (l1, h1, count, prec, &s1l, &s1h, 0); ! rshift_double (l1, h1, prec - count, prec, &s2l, &s2h, 0); ! *lv = s1l | s2l; ! *hv = s1h | s2h; } *************** *** 438,463 **** HOST_WIDE_INT *lv, *hv; { ! HOST_WIDE_INT arg1[4]; ! register int i; ! register int carry; ! ! encode (arg1, l1, h1); ! if (count > prec) ! count = prec; ! ! carry = arg1[0] & 1; ! while (count > 0) ! { ! for (i = 4 - 1; i >= 0; i--) ! { ! carry *= BASE; ! carry += arg1[i]; ! arg1[i] = LOWPART (carry >> 1); ! } ! count--; ! } ! decode (arg1, lv, hv); } --- 427,440 ---- HOST_WIDE_INT *lv, *hv; { ! HOST_WIDE_INT s1l, s1h, s2l, s2h; ! count %= prec; ! if (count < 0) ! count += prec; ! rshift_double (l1, h1, count, prec, &s1l, &s1h, 0); ! lshift_double (l1, h1, prec - count, prec, &s2l, &s2h, 0); ! *lv = s1l | s2l; ! *hv = s1h | s2h; } *************** *** 1162,1166 **** TREE_TYPE (t) = TREE_TYPE (arg1); TREE_OVERFLOW (t) ! = ((notrunc ? !uns && overflow : force_fit_type (t, overflow)) | TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2)); --- 1139,1143 ---- TREE_TYPE (t) = TREE_TYPE (arg1); TREE_OVERFLOW (t) ! = ((notrunc ? !uns && overflow : force_fit_type (t, overflow && !uns)) | TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2)); *************** *** 1328,1332 **** tree size_int (number) ! unsigned int number; { register tree t; --- 1305,1309 ---- tree size_int (number) ! unsigned HOST_WIDE_INT number; { register tree t; *************** *** 1562,1565 **** --- 1539,1547 ---- } + /* Nonzero means lvalues are limited to those valid in pedantic ANSI C. + Zero means allow extended lvalues. */ + + int pedantic_lvalues; + /* When pedantic, return an expr equal to X but certainly not valid as a pedantic lvalue. Otherwise, return X. */ *************** *** 1569,1573 **** tree x; { ! if (pedantic) return non_lvalue (x); else --- 1551,1555 ---- tree x; { ! if (pedantic_lvalues) return non_lvalue (x); else *************** *** 1765,1769 **** return 1; ! if (! INTEGRAL_TYPE_P (TREE_TYPE (arg0))) return 0; --- 1747,1752 ---- return 1; ! if (! INTEGRAL_TYPE_P (TREE_TYPE (arg0)) ! || ! INTEGRAL_TYPE_P (TREE_TYPE (arg1))) return 0; *************** *** 1998,2001 **** --- 1981,2000 ---- return non_lvalue (t); } + + /* Similar, but call pedantic_non_lvalue instead of non_lvalue. */ + + static tree + pedantic_omit_one_operand (type, result, omitted) + tree type, result, omitted; + { + tree t = convert (type, result); + + if (TREE_SIDE_EFFECTS (omitted)) + return build (COMPOUND_EXPR, type, omitted, t); + + return pedantic_non_lvalue (t); + } + + /* Return a simplified tree node for the truth-negation of ARG. This *************** *** 2095,2098 **** --- 2094,2101 ---- case SAVE_EXPR: return build1 (TRUTH_NOT_EXPR, type, arg); + + case CLEANUP_POINT_EXPR: + return build1 (CLEANUP_POINT_EXPR, type, + invert_truthvalue (TREE_OPERAND (arg, 0))); } if (TREE_CODE (TREE_TYPE (arg)) != BOOLEAN_TYPE) *************** *** 2273,2279 **** } ! #if BYTES_BIG_ENDIAN ! lbitpos = lnbitsize - lbitsize - lbitpos; ! #endif /* Make the mask to be used against the extracted field. */ --- 2276,2281 ---- } ! if (BYTES_BIG_ENDIAN) ! lbitpos = lnbitsize - lbitsize - lbitpos; /* Make the mask to be used against the extracted field. */ *************** *** 2415,2425 **** } - if (TREE_CODE (exp) != COMPONENT_REF && TREE_CODE (exp) != ARRAY_REF - && TREE_CODE (exp) != BIT_FIELD_REF) - return 0; inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode, punsignedp, pvolatilep); ! if (inner == exp || *pbitsize < 0 || offset != 0) return 0; --- 2417,2425 ---- } inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode, punsignedp, pvolatilep); ! if ((inner == exp && and_mask == 0) ! || *pbitsize < 0 || offset != 0) return 0; *************** *** 2459,2468 **** force_fit_type (tmask, 0); return ! operand_equal_p (mask, ! const_binop (RSHIFT_EXPR, ! const_binop (LSHIFT_EXPR, tmask, ! size_int (precision - size), 0), ! size_int (precision - size), 0), ! 0); } --- 2459,2468 ---- force_fit_type (tmask, 0); return ! tree_int_cst_equal (mask, ! const_binop (RSHIFT_EXPR, ! const_binop (LSHIFT_EXPR, tmask, ! size_int (precision - size), ! 0), ! size_int (precision - size), 0)); } *************** *** 2620,2623 **** --- 2620,2653 ---- } + /* Subroutine for fold_truthop: C is an INTEGER_CST interpreted as a P + bit value. Arrange things so the extra bits will be set to zero if and + only if C is signed-extended to its full width. */ + + static tree + unextend (c, p, unsignedp) + tree c; + int p; + int unsignedp; + { + tree type = TREE_TYPE (c); + int modesize = GET_MODE_BITSIZE (TYPE_MODE (type)); + tree temp; + + if (p == modesize || unsignedp) + return c; + + if (TREE_UNSIGNED (type)) + c = convert (signed_type (type), c); + + /* We work by getting just the sign bit into the low-order bit, then + into the high-order bit, then sign-extend. We then XOR that value + with C. */ + temp = const_binop (RSHIFT_EXPR, c, size_int (p - 1), 0); + temp = const_binop (BIT_AND_EXPR, temp, size_int (1), 0); + temp = const_binop (LSHIFT_EXPR, temp, size_int (modesize - 1), 0); + temp = const_binop (RSHIFT_EXPR, temp, size_int (modesize - p - 1), 0); + return convert (type, const_binop (BIT_XOR_EXPR, c, temp, 0)); + } + /* Find ways of folding logical expressions of LHS and RHS: Try to merge two comparisons to the same innermost item. *************** *** 2824,2831 **** xll_bitpos = ll_bitpos - lnbitpos, xrl_bitpos = rl_bitpos - lnbitpos; ! #if BYTES_BIG_ENDIAN ! xll_bitpos = lnbitsize - xll_bitpos - ll_bitsize; ! xrl_bitpos = lnbitsize - xrl_bitpos - rl_bitsize; ! #endif ll_mask = const_binop (LSHIFT_EXPR, convert (type, ll_mask), --- 2854,2862 ---- xll_bitpos = ll_bitpos - lnbitpos, xrl_bitpos = rl_bitpos - lnbitpos; ! if (BYTES_BIG_ENDIAN) ! { ! xll_bitpos = lnbitsize - xll_bitpos - ll_bitsize; ! xrl_bitpos = lnbitsize - xrl_bitpos - rl_bitsize; ! } ll_mask = const_binop (LSHIFT_EXPR, convert (type, ll_mask), *************** *** 2834,2851 **** size_int (xrl_bitpos), 0); - /* Make sure the constants are interpreted as unsigned, so we - don't have sign bits outside the range of their type. */ - if (l_const) { ! l_const = convert (unsigned_type (TREE_TYPE (l_const)), l_const); ! l_const = const_binop (LSHIFT_EXPR, convert (type, l_const), ! size_int (xll_bitpos), 0); } if (r_const) { ! r_const = convert (unsigned_type (TREE_TYPE (r_const)), r_const); ! r_const = const_binop (LSHIFT_EXPR, convert (type, r_const), ! size_int (xrl_bitpos), 0); } --- 2865,2901 ---- size_int (xrl_bitpos), 0); if (l_const) { ! l_const = convert (type, unextend (l_const, ll_bitsize, ll_unsignedp)); ! l_const = const_binop (LSHIFT_EXPR, l_const, size_int (xll_bitpos), 0); ! if (! integer_zerop (const_binop (BIT_AND_EXPR, l_const, ! fold (build1 (BIT_NOT_EXPR, ! type, ll_mask)), ! 0))) ! { ! warning ("comparison is always %s", ! wanted_code == NE_EXPR ? "one" : "zero"); ! ! return convert (truth_type, ! wanted_code == NE_EXPR ! ? integer_one_node : integer_zero_node); ! } } if (r_const) { ! r_const = convert (type, unextend (r_const, rl_bitsize, rl_unsignedp)); ! r_const = const_binop (LSHIFT_EXPR, r_const, size_int (xrl_bitpos), 0); ! if (! integer_zerop (const_binop (BIT_AND_EXPR, r_const, ! fold (build1 (BIT_NOT_EXPR, ! type, rl_mask)), ! 0))) ! { ! warning ("comparison is always %s", ! wanted_code == NE_EXPR ? "one" : "zero"); ! ! return convert (truth_type, ! wanted_code == NE_EXPR ! ? integer_one_node : integer_zero_node); ! } } *************** *** 2874,2881 **** xlr_bitpos = lr_bitpos - rnbitpos, xrr_bitpos = rr_bitpos - rnbitpos; ! #if BYTES_BIG_ENDIAN ! xlr_bitpos = rnbitsize - xlr_bitpos - lr_bitsize; ! xrr_bitpos = rnbitsize - xrr_bitpos - rr_bitsize; ! #endif lr_mask = const_binop (LSHIFT_EXPR, convert (type, lr_mask), --- 2924,2932 ---- xlr_bitpos = lr_bitpos - rnbitpos, xrr_bitpos = rr_bitpos - rnbitpos; ! if (BYTES_BIG_ENDIAN) ! { ! xlr_bitpos = rnbitsize - xlr_bitpos - lr_bitsize; ! xrr_bitpos = rnbitsize - xrr_bitpos - rr_bitsize; ! } lr_mask = const_binop (LSHIFT_EXPR, convert (type, lr_mask), *************** *** 3174,3180 **** /* If this was a conversion, and all we did was to move into ! inside the COND_EXPR, bring it back out. Then return so we ! don't get into an infinite recursion loop taking the conversion ! out and then back in. */ if ((code == NOP_EXPR || code == CONVERT_EXPR --- 3225,3235 ---- /* If this was a conversion, and all we did was to move into ! inside the COND_EXPR, bring it back out. But leave it if ! it is a conversion from integer to integer and the ! result precision is no wider than a word since such a ! conversion is cheap and may be optimized away by combine, ! while it couldn't if it were outside the COND_EXPR. Then return ! so we don't get into an infinite recursion loop taking the ! conversion out and then back in. */ if ((code == NOP_EXPR || code == CONVERT_EXPR *************** *** 3184,3188 **** && TREE_CODE (TREE_OPERAND (t, 2)) == code && (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 1), 0)) ! == TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 2), 0)))) t = build1 (code, type, build (COND_EXPR, --- 3239,3246 ---- && TREE_CODE (TREE_OPERAND (t, 2)) == code && (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 1), 0)) ! == TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 2), 0))) ! && ! (INTEGRAL_TYPE_P (TREE_TYPE (t)) ! && INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 1), 0))) ! && TYPE_PRECISION (TREE_TYPE (t)) <= BITS_PER_WORD)) t = build1 (code, type, build (COND_EXPR, *************** *** 3218,3224 **** else { test = arg1; ! true_value = integer_one_node; ! false_value = integer_zero_node; } --- 3276,3283 ---- else { + tree testtype = TREE_TYPE (arg1); test = arg1; ! true_value = convert (testtype, integer_one_node); ! false_value = convert (testtype, integer_zero_node); } *************** *** 3229,3233 **** to make this SAVE_EXPR. Since we do this optimization primarily to see if we do end up with constant and this ! SAVE_EXPR interfers with later optimizations, suppressing it when we can is important. */ --- 3288,3292 ---- to make this SAVE_EXPR. Since we do this optimization primarily to see if we do end up with constant and this ! SAVE_EXPR interferes with later optimizations, suppressing it when we can is important. */ *************** *** 3273,3279 **** else { test = arg0; ! true_value = integer_one_node; ! false_value = integer_zero_node; } --- 3332,3339 ---- else { + tree testtype = TREE_TYPE (arg0); test = arg0; ! true_value = convert (testtype, integer_one_node); ! false_value = convert (testtype, integer_zero_node); } *************** *** 3331,3387 **** /* Other kinds of FIX are not handled properly by fold_convert. */ ! /* In addition to the cases of two conversions in a row ! handled below, if we are converting something to its own ! type via an object of identical or wider precision, neither ! conversion is needed. */ ! if ((TREE_CODE (TREE_OPERAND (t, 0)) == NOP_EXPR ! || TREE_CODE (TREE_OPERAND (t, 0)) == CONVERT_EXPR) ! && TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0)) == TREE_TYPE (t) ! && ((INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0))) ! && INTEGRAL_TYPE_P (TREE_TYPE (t))) ! || (FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0))) ! && FLOAT_TYPE_P (TREE_TYPE (t)))) ! && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0))) ! >= TYPE_PRECISION (TREE_TYPE (t)))) ! return TREE_OPERAND (TREE_OPERAND (t, 0), 0); ! ! /* Two conversions in a row are not needed unless: ! - the intermediate type is narrower than both initial and final, or ! - the intermediate type and innermost type differ in signedness, ! and the outermost type is wider than the intermediate, or ! - the initial type is a pointer type and the precisions of the ! intermediate and final types differ, or ! - the final type is a pointer type and the precisions of the ! initial and intermediate types differ. */ ! if ((TREE_CODE (TREE_OPERAND (t, 0)) == NOP_EXPR ! || TREE_CODE (TREE_OPERAND (t, 0)) == CONVERT_EXPR) ! && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0))) ! > TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0))) ! || ! TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0))) ! > TYPE_PRECISION (TREE_TYPE (t))) ! && ! ((TREE_CODE (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0))) ! == INTEGER_TYPE) ! && (TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) ! == INTEGER_TYPE) ! && (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (t, 0))) ! != TREE_UNSIGNED (TREE_OPERAND (TREE_OPERAND (t, 0), 0))) ! && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0))) ! < TYPE_PRECISION (TREE_TYPE (t)))) ! && ((TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (t, 0))) ! && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0))) ! > TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0))))) ! == ! (TREE_UNSIGNED (TREE_TYPE (t)) ! && (TYPE_PRECISION (TREE_TYPE (t)) ! > TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0)))))) ! && ! ((TREE_CODE (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0))) ! == POINTER_TYPE) ! && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0))) ! != TYPE_PRECISION (TREE_TYPE (t)))) ! && ! (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE ! && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0))) ! != TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (t, 0)))))) ! return convert (TREE_TYPE (t), TREE_OPERAND (TREE_OPERAND (t, 0), 0)); if (TREE_CODE (TREE_OPERAND (t, 0)) == MODIFY_EXPR --- 3391,3462 ---- /* Other kinds of FIX are not handled properly by fold_convert. */ ! if (TREE_TYPE (TREE_OPERAND (t, 0)) == TREE_TYPE (t)) ! return TREE_OPERAND (t, 0); ! ! /* Handle cases of two conversions in a row. */ ! if (TREE_CODE (TREE_OPERAND (t, 0)) == NOP_EXPR ! || TREE_CODE (TREE_OPERAND (t, 0)) == CONVERT_EXPR) ! { ! tree inside_type = TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0)); ! tree inter_type = TREE_TYPE (TREE_OPERAND (t, 0)); ! tree final_type = TREE_TYPE (t); ! int inside_int = INTEGRAL_TYPE_P (inside_type); ! int inside_ptr = POINTER_TYPE_P (inside_type); ! int inside_float = FLOAT_TYPE_P (inside_type); ! int inside_prec = TYPE_PRECISION (inside_type); ! int inside_unsignedp = TREE_UNSIGNED (inside_type); ! int inter_int = INTEGRAL_TYPE_P (inter_type); ! int inter_ptr = POINTER_TYPE_P (inter_type); ! int inter_float = FLOAT_TYPE_P (inter_type); ! int inter_prec = TYPE_PRECISION (inter_type); ! int inter_unsignedp = TREE_UNSIGNED (inter_type); ! int final_int = INTEGRAL_TYPE_P (final_type); ! int final_ptr = POINTER_TYPE_P (final_type); ! int final_float = FLOAT_TYPE_P (final_type); ! int final_prec = TYPE_PRECISION (final_type); ! int final_unsignedp = TREE_UNSIGNED (final_type); ! ! /* In addition to the cases of two conversions in a row ! handled below, if we are converting something to its own ! type via an object of identical or wider precision, neither ! conversion is needed. */ ! if (inside_type == final_type ! && ((inter_int && final_int) || (inter_float && final_float)) ! && inter_prec >= final_prec) ! return TREE_OPERAND (TREE_OPERAND (t, 0), 0); ! ! /* Likewise, if the intermediate and final types are either both ! float or both integer, we don't need the middle conversion if ! it is wider than the final type and doesn't change the signedness ! (for integers). Avoid this if the final type is a pointer ! since then we sometimes need the inner conversion. */ ! if ((((inter_int || inter_ptr) && (inside_int || inside_ptr)) ! || (inter_float && inside_float)) ! && inter_prec >= inside_prec ! && (inter_float || inter_unsignedp == inside_unsignedp) ! && ! final_ptr) ! return convert (final_type, TREE_OPERAND (TREE_OPERAND (t, 0), 0)); ! ! /* Two conversions in a row are not needed unless: ! - some conversion is floating-point (overstrict for now), or ! - the intermediate type is narrower than both initial and ! final, or ! - the intermediate type and innermost type differ in signedness, ! and the outermost type is wider than the intermediate, or ! - the initial type is a pointer type and the precisions of the ! intermediate and final types differ, or ! - the final type is a pointer type and the precisions of the ! initial and intermediate types differ. */ ! if (! inside_float && ! inter_float && ! final_float ! && (inter_prec > inside_prec || inter_prec > final_prec) ! && ! (inside_int && inter_int ! && inter_unsignedp != inside_unsignedp ! && inter_prec < final_prec) ! && ((inter_unsignedp && inter_prec > inside_prec) ! == (final_unsignedp && final_prec > inter_prec)) ! && ! (inside_ptr && inter_prec != final_prec) ! && ! (final_ptr && inside_prec != inter_prec)) ! return convert (final_type, TREE_OPERAND (TREE_OPERAND (t, 0), 0)); ! } if (TREE_CODE (TREE_OPERAND (t, 0)) == MODIFY_EXPR *************** *** 3619,3626 **** /* Otherwise return (CON +- ARG1) - VAR. */ ! TREE_SET_CODE (t, MINUS_EXPR); ! TREE_OPERAND (t, 1) = var; ! TREE_OPERAND (t, 0) ! = fold (build (code, TREE_TYPE (t), con, arg1)); } else --- 3694,3699 ---- /* Otherwise return (CON +- ARG1) - VAR. */ ! t = build (MINUS_EXPR, type, ! fold (build (code, type, con, arg1)), var); } else *************** *** 3638,3644 **** /* Otherwise return VAR +- (ARG1 +- CON). */ ! TREE_OPERAND (t, 1) = tem ! = fold (build (code, TREE_TYPE (t), arg1, con)); ! TREE_OPERAND (t, 0) = var; if (integer_zerop (tem) && (code == PLUS_EXPR || code == MINUS_EXPR)) --- 3711,3717 ---- /* Otherwise return VAR +- (ARG1 +- CON). */ ! tem = fold (build (code, type, arg1, con)); ! t = build (code, type, var, tem); ! if (integer_zerop (tem) && (code == PLUS_EXPR || code == MINUS_EXPR)) *************** *** 3681,3687 **** } ! TREE_OPERAND (t, 0) ! = fold (build (code, TREE_TYPE (t), arg0, con)); ! TREE_OPERAND (t, 1) = var; if (integer_zerop (TREE_OPERAND (t, 0)) && TREE_CODE (t) == PLUS_EXPR) --- 3754,3760 ---- } ! t = build (TREE_CODE (t), type, ! fold (build (code, TREE_TYPE (t), arg0, con)), var); ! if (integer_zerop (TREE_OPERAND (t, 0)) && TREE_CODE (t) == PLUS_EXPR) *************** *** 4068,4073 **** /* Since negative shift count is not well-defined, don't try to compute it in the compiler. */ ! if (tree_int_cst_sgn (arg1) < 0) return t; goto binary; --- 4141,4189 ---- /* Since negative shift count is not well-defined, don't try to compute it in the compiler. */ ! if (TREE_CODE (arg1) == INTEGER_CST && tree_int_cst_sgn (arg1) < 0) return t; + /* Rewrite an LROTATE_EXPR by a constant into an + RROTATE_EXPR by a new constant. */ + if (code == LROTATE_EXPR && TREE_CODE (arg1) == INTEGER_CST) + { + TREE_SET_CODE (t, RROTATE_EXPR); + code = RROTATE_EXPR; + TREE_OPERAND (t, 1) = arg1 + = const_binop + (MINUS_EXPR, + convert (TREE_TYPE (arg1), + build_int_2 (GET_MODE_BITSIZE (TYPE_MODE (type)), 0)), + arg1, 0); + if (tree_int_cst_sgn (arg1) < 0) + return t; + } + + /* If we have a rotate of a bit operation with the rotate count and + the second operand of the bit operation both constant, + permute the two operations. */ + if (code == RROTATE_EXPR && TREE_CODE (arg1) == INTEGER_CST + && (TREE_CODE (arg0) == BIT_AND_EXPR + || TREE_CODE (arg0) == BIT_ANDTC_EXPR + || TREE_CODE (arg0) == BIT_IOR_EXPR + || TREE_CODE (arg0) == BIT_XOR_EXPR) + && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST) + return fold (build (TREE_CODE (arg0), type, + fold (build (code, type, + TREE_OPERAND (arg0, 0), arg1)), + fold (build (code, type, + TREE_OPERAND (arg0, 1), arg1)))); + + /* Two consecutive rotates adding up to the width of the mode can + be ignored. */ + if (code == RROTATE_EXPR && TREE_CODE (arg1) == INTEGER_CST + && TREE_CODE (arg0) == RROTATE_EXPR + && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST + && TREE_INT_CST_HIGH (arg1) == 0 + && TREE_INT_CST_HIGH (TREE_OPERAND (arg0, 1)) == 0 + && ((TREE_INT_CST_LOW (arg1) + + TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1))) + == GET_MODE_BITSIZE (TYPE_MODE (type)))) + return TREE_OPERAND (arg0, 0); + goto binary; *************** *** 4093,4097 **** ("true" is a fixed value perhaps depending on the language, but we don't handle values other than 1 correctly yet.) */ ! return invert_truthvalue (arg0); case TRUTH_ANDIF_EXPR: --- 4209,4217 ---- ("true" is a fixed value perhaps depending on the language, but we don't handle values other than 1 correctly yet.) */ ! tem = invert_truthvalue (arg0); ! /* Avoid infinite recursion. */ ! if (TREE_CODE (tem) == TRUTH_NOT_EXPR) ! return t; ! return convert (type, tem); case TRUTH_ANDIF_EXPR: *************** *** 4226,4235 **** { tree constop = 0, varop; ! tree *constoploc; if (TREE_CONSTANT (arg1)) ! constoploc = &TREE_OPERAND (t, 1), constop = arg1, varop = arg0; if (TREE_CONSTANT (arg0)) ! constoploc = &TREE_OPERAND (t, 0), constop = arg0, varop = arg1; if (constop && TREE_CODE (varop) == POSTINCREMENT_EXPR) --- 4346,4355 ---- { tree constop = 0, varop; ! int constopnum = -1; if (TREE_CONSTANT (arg1)) ! constopnum = 1, constop = arg1, varop = arg0; if (TREE_CONSTANT (arg0)) ! constopnum = 0, constop = arg0, varop = arg1; if (constop && TREE_CODE (varop) == POSTINCREMENT_EXPR) *************** *** 4247,4251 **** constop, TREE_OPERAND (varop, 1))); TREE_SET_CODE (varop, PREINCREMENT_EXPR); ! *constoploc = newconst; return t; } --- 4367,4374 ---- constop, TREE_OPERAND (varop, 1))); TREE_SET_CODE (varop, PREINCREMENT_EXPR); ! ! t = build (code, type, TREE_OPERAND (t, 0), ! TREE_OPERAND (t, 1)); ! TREE_OPERAND (t, constopnum) = newconst; return t; } *************** *** 4261,4265 **** constop, TREE_OPERAND (varop, 1))); TREE_SET_CODE (varop, PREDECREMENT_EXPR); ! *constoploc = newconst; return t; } --- 4384,4390 ---- constop, TREE_OPERAND (varop, 1))); TREE_SET_CODE (varop, PREDECREMENT_EXPR); ! t = build (code, type, TREE_OPERAND (t, 0), ! TREE_OPERAND (t, 1)); ! TREE_OPERAND (t, constopnum) = newconst; return t; } *************** *** 4276,4289 **** case GE_EXPR: code = GT_EXPR; - TREE_SET_CODE (t, code); arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0); ! TREE_OPERAND (t, 1) = arg1; break; case LT_EXPR: code = LE_EXPR; - TREE_SET_CODE (t, code); arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0); ! TREE_OPERAND (t, 1) = arg1; } } --- 4401,4413 ---- case GE_EXPR: code = GT_EXPR; arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0); ! t = build (code, type, TREE_OPERAND (t, 0), arg1); break; case LT_EXPR: code = LE_EXPR; arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0); ! t = build (code, type, TREE_OPERAND (t, 0), arg1); ! break; } } *************** *** 4669,4673 **** (TREE_OPERAND (t, (integer_zerop (arg0) ? 2 : 1))); else if (operand_equal_p (arg1, TREE_OPERAND (expr, 2), 0)) ! return pedantic_non_lvalue (omit_one_operand (type, arg1, arg0)); /* If the second operand is zero, invert the comparison and swap --- 4793,4797 ---- (TREE_OPERAND (t, (integer_zerop (arg0) ? 2 : 1))); else if (operand_equal_p (arg1, TREE_OPERAND (expr, 2), 0)) ! return pedantic_omit_one_operand (type, arg1, arg0); /* If the second operand is zero, invert the comparison and swap *************** *** 4690,4697 **** if (TREE_CODE (tem) != TRUTH_NOT_EXPR) { ! arg0 = TREE_OPERAND (t, 0) = tem; ! TREE_OPERAND (t, 1) = TREE_OPERAND (t, 2); ! TREE_OPERAND (t, 2) = arg1; ! arg1 = TREE_OPERAND (t, 1); } } --- 4814,4822 ---- if (TREE_CODE (tem) != TRUTH_NOT_EXPR) { ! t = build (code, type, tem, ! TREE_OPERAND (t, 2), TREE_OPERAND (t, 1)); ! arg0 = tem; ! arg1 = TREE_OPERAND (t, 2); ! STRIP_NOPS (arg1); } } *************** *** 4712,4718 **** enum tree_code comp_code = TREE_CODE (arg0); /* If we have A op 0 ? A : -A, this is A, -A, abs (A), or abs (-A), depending on the comparison operation. */ ! if (integer_zerop (TREE_OPERAND (arg0, 1)) && TREE_CODE (arg2) == NEGATE_EXPR && operand_equal_p (TREE_OPERAND (arg2, 0), arg1, 0)) --- 4837,4847 ---- enum tree_code comp_code = TREE_CODE (arg0); + STRIP_NOPS (arg2); + /* If we have A op 0 ? A : -A, this is A, -A, abs (A), or abs (-A), depending on the comparison operation. */ ! if ((FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (arg0, 1))) ! ? real_zerop (TREE_OPERAND (arg0, 1)) ! : integer_zerop (TREE_OPERAND (arg0, 1))) && TREE_CODE (arg2) == NEGATE_EXPR && operand_equal_p (TREE_OPERAND (arg2, 0), arg1, 0)) *************** *** 4727,4736 **** case GT_EXPR: return pedantic_non_lvalue ! (fold (build1 (ABS_EXPR, type, arg1))); case LE_EXPR: case LT_EXPR: return pedantic_non_lvalue (fold (build1 (NEGATE_EXPR, type, ! fold (build1 (ABS_EXPR, type, arg1))))); } --- 4856,4869 ---- case GT_EXPR: return pedantic_non_lvalue ! (convert (type, fold (build1 (ABS_EXPR, ! TREE_TYPE (arg1), arg1)))); case LE_EXPR: case LT_EXPR: return pedantic_non_lvalue (fold (build1 (NEGATE_EXPR, type, ! convert (type, ! fold (build1 (ABS_EXPR, ! TREE_TYPE (arg1), ! arg1)))))); } *************** *** 4751,4769 **** if (operand_equal_for_comparison_p (TREE_OPERAND (arg0, 1), arg2, TREE_OPERAND (arg0, 0))) ! switch (comp_code) ! { ! case EQ_EXPR: ! return pedantic_non_lvalue (convert (type, arg2)); ! case NE_EXPR: ! return pedantic_non_lvalue (convert (type, arg1)); ! case LE_EXPR: ! case LT_EXPR: ! return pedantic_non_lvalue ! (fold (build (MIN_EXPR, type, arg1, arg2))); ! case GE_EXPR: ! case GT_EXPR: ! return pedantic_non_lvalue ! (fold (build (MAX_EXPR, type, arg1, arg2))); ! } /* If this is A op C1 ? A : C2 with C1 and C2 constant integers, --- 4884,4910 ---- if (operand_equal_for_comparison_p (TREE_OPERAND (arg0, 1), arg2, TREE_OPERAND (arg0, 0))) ! { ! tree comp_op0 = TREE_OPERAND (arg0, 0); ! tree comp_op1 = TREE_OPERAND (arg0, 1); ! tree comp_type = TREE_TYPE (comp_op0); ! ! switch (comp_code) ! { ! case EQ_EXPR: ! return pedantic_non_lvalue (convert (type, arg2)); ! case NE_EXPR: ! return pedantic_non_lvalue (convert (type, arg1)); ! case LE_EXPR: ! case LT_EXPR: ! return pedantic_non_lvalue ! (convert (type, (fold (build (MIN_EXPR, comp_type, ! comp_op0, comp_op1))))); ! case GE_EXPR: ! case GT_EXPR: ! return pedantic_non_lvalue ! (convert (type, fold (build (MAX_EXPR, comp_type, ! comp_op0, comp_op1)))); ! } ! } /* If this is A op C1 ? A : C2 with C1 and C2 constant integers, *************** *** 4780,4785 **** case EQ_EXPR: /* We can replace A with C1 in this case. */ ! arg1 = TREE_OPERAND (t, 1) ! = convert (type, TREE_OPERAND (arg0, 1)); break; --- 4921,4927 ---- case EQ_EXPR: /* We can replace A with C1 in this case. */ ! arg1 = convert (type, TREE_OPERAND (arg0, 1)); ! t = build (code, type, TREE_OPERAND (t, 0), arg1, ! TREE_OPERAND (t, 2)); break; *************** *** 4826,4829 **** --- 4968,4994 ---- } + /* If the second operand is simpler than the third, swap them + since that produces better jump optimization results. */ + if ((TREE_CONSTANT (arg1) || TREE_CODE_CLASS (TREE_CODE (arg1)) == 'd' + || TREE_CODE (arg1) == SAVE_EXPR) + && ! (TREE_CONSTANT (TREE_OPERAND (t, 2)) + || TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (t, 2))) == 'd' + || TREE_CODE (TREE_OPERAND (t, 2)) == SAVE_EXPR)) + { + /* See if this can be inverted. If it can't, possibly because + it was a floating-point inequality comparison, don't do + anything. */ + tem = invert_truthvalue (arg0); + + if (TREE_CODE (tem) != TRUTH_NOT_EXPR) + { + t = build (code, type, tem, + TREE_OPERAND (t, 2), TREE_OPERAND (t, 1)); + arg0 = tem; + arg1 = TREE_OPERAND (t, 2); + STRIP_NOPS (arg1); + } + } + /* Convert A ? 1 : 0 to simply A. */ if (integer_onep (TREE_OPERAND (t, 1)) *************** *** 4836,4840 **** return pedantic_non_lvalue (arg0); - /* Look for expressions of the form A & 2 ? 2 : 0. The result of this operation is simply A & 2. */ --- 5001,5004 ---- *************** *** 4897,4900 **** --- 5061,5103 ---- TREE_OPERAND (arg0, 1))))); return t; + + /* Pull arithmetic ops out of the CLEANUP_POINT_EXPR where + appropriate. */ + case CLEANUP_POINT_EXPR: + if (! TREE_SIDE_EFFECTS (arg0)) + return convert (type, arg0); + + { + enum tree_code code0 = TREE_CODE (arg0); + int kind0 = TREE_CODE_CLASS (code0); + tree arg00 = TREE_OPERAND (arg0, 0); + tree arg01; + + if (kind0 == '1' || code0 == TRUTH_NOT_EXPR) + return fold (build1 (code0, type, + fold (build1 (CLEANUP_POINT_EXPR, + TREE_TYPE (arg00), arg00)))); + + if (kind0 == '<' || kind0 == '2' + || code0 == TRUTH_ANDIF_EXPR || code0 == TRUTH_ORIF_EXPR + || code0 == TRUTH_AND_EXPR || code0 == TRUTH_OR_EXPR + || code0 == TRUTH_XOR_EXPR) + { + arg01 = TREE_OPERAND (arg0, 1); + + if (! TREE_SIDE_EFFECTS (arg00)) + return fold (build (code0, type, arg00, + fold (build1 (CLEANUP_POINT_EXPR, + TREE_TYPE (arg01), arg01)))); + + if (! TREE_SIDE_EFFECTS (arg01)) + return fold (build (code0, type, + fold (build1 (CLEANUP_POINT_EXPR, + TREE_TYPE (arg00), arg00)), + arg01)); + } + + return t; + } default: diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/function.c gcc-2.7.0/function.c *** gcc-2.6.3/function.c Fri Nov 11 18:54:39 1994 --- gcc-2.7.0/function.c Thu Jun 15 17:50:37 1995 *************** *** 1,4 **** /* Expands front end tree to back end RTL for GNU C-Compiler ! Copyright (C) 1987, 88, 89, 91, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Expands front end tree to back end RTL for GNU C-Compiler ! Copyright (C) 1987, 88, 89, 91-94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 61,65 **** cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or niether. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" --- 62,66 ---- cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or neither. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" *************** *** 463,468 **** void ! push_function_context_to (toplevel) ! int toplevel; { struct function *p = (struct function *) xmalloc (sizeof (struct function)); --- 464,469 ---- void ! push_function_context_to (context) ! tree context; { struct function *p = (struct function *) xmalloc (sizeof (struct function)); *************** *** 482,485 **** --- 483,487 ---- p->has_nonlocal_label = current_function_has_nonlocal_label; p->has_nonlocal_goto = current_function_has_nonlocal_goto; + p->contains_functions = current_function_contains_functions; p->args_size = current_function_args_size; p->pretend_args_size = current_function_pretend_args_size; *************** *** 515,519 **** p->epilogue_delay_list = current_function_epilogue_delay_list; ! save_tree_status (p, toplevel); save_storage_status (p); save_emit_status (p); --- 517,521 ---- p->epilogue_delay_list = current_function_epilogue_delay_list; ! save_tree_status (p, context); save_storage_status (p); save_emit_status (p); *************** *** 530,534 **** push_function_context () { ! push_function_context_to (0); } --- 532,536 ---- push_function_context () { ! push_function_context_to (current_function_decl); } *************** *** 537,542 **** void ! pop_function_context_from (toplevel) ! int toplevel; { struct function *p = outer_function_chain; --- 539,544 ---- void ! pop_function_context_from (context) ! tree context; { struct function *p = outer_function_chain; *************** *** 544,547 **** --- 546,552 ---- outer_function_chain = p->next; + current_function_contains_functions + = p->contains_functions || p->inline_obstacks + || context == current_function_decl; current_function_name = p->name; current_function_decl = p->decl; *************** *** 555,560 **** current_function_has_nonlocal_label = p->has_nonlocal_label; current_function_has_nonlocal_goto = p->has_nonlocal_goto; - if (! toplevel) - current_function_contains_functions = 1; current_function_args_size = p->args_size; current_function_pretend_args_size = p->pretend_args_size; --- 560,563 ---- *************** *** 590,594 **** reg_renumber = 0; ! restore_tree_status (p, toplevel); restore_storage_status (p); restore_expr_status (p); --- 593,597 ---- reg_renumber = 0; ! restore_tree_status (p); restore_storage_status (p); restore_expr_status (p); *************** *** 617,621 **** void pop_function_context () { ! pop_function_context_from (0); } --- 620,624 ---- void pop_function_context () { ! pop_function_context_from (current_function_decl); } *************** *** 683,690 **** /* On a big-endian machine, if we are allocating more space than we will use, use the least significant bytes of those that are allocated. */ ! #if BYTES_BIG_ENDIAN ! if (mode != BLKmode) bigend_correction = size - GET_MODE_SIZE (mode); - #endif #ifdef FRAME_GROWS_DOWNWARD --- 686,691 ---- /* On a big-endian machine, if we are allocating more space than we will use, use the least significant bytes of those that are allocated. */ ! if (BYTES_BIG_ENDIAN && mode != BLKmode) bigend_correction = size - GET_MODE_SIZE (mode); #ifdef FRAME_GROWS_DOWNWARD *************** *** 756,763 **** /* On a big-endian machine, if we are allocating more space than we will use, use the least significant bytes of those that are allocated. */ ! #if BYTES_BIG_ENDIAN ! if (mode != BLKmode) bigend_correction = size - GET_MODE_SIZE (mode); - #endif #ifdef FRAME_GROWS_DOWNWARD --- 757,762 ---- /* On a big-endian machine, if we are allocating more space than we will use, use the least significant bytes of those that are allocated. */ ! if (BYTES_BIG_ENDIAN && mode != BLKmode) bigend_correction = size - GET_MODE_SIZE (mode); #ifdef FRAME_GROWS_DOWNWARD *************** *** 857,865 **** if (p == 0) { p = (struct temp_slot *) oballoc (sizeof (struct temp_slot)); - p->size = size; /* If the temp slot mode doesn't indicate the alignment, use the largest possible, so no one will be disappointed. */ p->slot = assign_stack_local (mode, size, mode == BLKmode ? -1 : 0); p->address = 0; p->next = temp_slots; --- 856,874 ---- if (p == 0) { + int frame_offset_old = frame_offset; p = (struct temp_slot *) oballoc (sizeof (struct temp_slot)); /* If the temp slot mode doesn't indicate the alignment, use the largest possible, so no one will be disappointed. */ p->slot = assign_stack_local (mode, size, mode == BLKmode ? -1 : 0); + /* The following slot size computation is necessary because we don't + know the actual size of the temporary slot until assign_stack_local + has performed all the frame alignment and size rounding for the + requested temporary. Otherwise combine_temp_slots won't think that + adjacent slots really are adjacent. */ + #ifdef FRAME_GROWS_DOWNWARD + p->size = frame_offset_old - frame_offset; + #else + p->size = frame_offset - frame_offset_old; + #endif p->address = 0; p->next = temp_slots; *************** *** 971,975 **** } ! /* Indicate that NEW is an alternate way of refering to the temp slot that previous was known by OLD. */ --- 980,984 ---- } ! /* Indicate that NEW is an alternate way of referring to the temp slot that previous was known by OLD. */ *************** *** 995,999 **** /* If X could be a reference to a temporary slot, mark the fact that its ! adddress was taken. */ void --- 1004,1008 ---- /* If X could be a reference to a temporary slot, mark the fact that its ! address was taken. */ void *************** *** 1075,1078 **** --- 1084,1088 ---- p->level--; + p->addr_taken = 0; return; } *************** *** 1462,1466 **** If we don't use an intermediate pseudo, such things as address computations to make the address of VAR valid ! if it is not can be placed beween the CALL_INSN and INSN. To make sure this doesn't happen, we record the destination --- 1472,1476 ---- If we don't use an intermediate pseudo, such things as address computations to make the address of VAR valid ! if it is not can be placed between the CALL_INSN and INSN. To make sure this doesn't happen, we record the destination *************** *** 1694,1701 **** /* If the bytes and bits are counted differently, we must adjust the offset. */ ! #if BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN ! offset = (GET_MODE_SIZE (is_mode) ! - GET_MODE_SIZE (wanted_mode) - offset); ! #endif pos %= GET_MODE_BITSIZE (wanted_mode); --- 1704,1710 ---- /* If the bytes and bits are counted differently, we must adjust the offset. */ ! if (BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN) ! offset = (GET_MODE_SIZE (is_mode) ! - GET_MODE_SIZE (wanted_mode) - offset); pos %= GET_MODE_BITSIZE (wanted_mode); *************** *** 1867,1874 **** rtx newmem; ! #if BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN ! offset = (GET_MODE_SIZE (is_mode) ! - GET_MODE_SIZE (wanted_mode) - offset); ! #endif pos %= GET_MODE_BITSIZE (wanted_mode); --- 1876,1882 ---- rtx newmem; ! if (BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN) ! offset = (GET_MODE_SIZE (is_mode) ! - GET_MODE_SIZE (wanted_mode) - offset); pos %= GET_MODE_BITSIZE (wanted_mode); *************** *** 2079,2086 **** abort (); ! #if BYTES_BIG_ENDIAN ! offset += (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))); ! #endif addr = plus_constant (addr, offset); if (!flag_force_addr && memory_address_p (mode, addr)) --- 2087,2093 ---- abort (); ! if (BYTES_BIG_ENDIAN) ! offset += (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))); addr = plus_constant (addr, offset); if (!flag_force_addr && memory_address_p (mode, addr)) *************** *** 2262,2269 **** /* Adjust OFFSET to count bits from low-address byte. */ ! #if BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN ! offset = (GET_MODE_BITSIZE (GET_MODE (XEXP (bitfield, 0))) ! - offset - INTVAL (XEXP (bitfield, 1))); ! #endif /* Adjust OFFSET to count bytes from low-address byte. */ offset /= BITS_PER_UNIT; --- 2269,2276 ---- /* Adjust OFFSET to count bits from low-address byte. */ ! if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) ! offset = (GET_MODE_BITSIZE (GET_MODE (XEXP (bitfield, 0))) ! - offset - INTVAL (XEXP (bitfield, 1))); ! /* Adjust OFFSET to count bytes from low-address byte. */ offset /= BITS_PER_UNIT; *************** *** 2271,2280 **** { offset += SUBREG_WORD (XEXP (bitfield, 0)) * UNITS_PER_WORD; ! #if BYTES_BIG_ENDIAN ! offset -= (MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (XEXP (bitfield, 0)))) ! - MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (memref)))); ! #endif } --- 2278,2286 ---- { offset += SUBREG_WORD (XEXP (bitfield, 0)) * UNITS_PER_WORD; ! if (BYTES_BIG_ENDIAN) ! offset -= (MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (XEXP (bitfield, 0)))) ! - MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (memref)))); } *************** *** 2317,2321 **** while (GET_CODE (dest) == SUBREG ! && SUBREG_WORD (dest) == 0) dest = SUBREG_REG (dest); --- 2323,2329 ---- while (GET_CODE (dest) == SUBREG ! && SUBREG_WORD (dest) == 0 ! && (GET_MODE_CLASS (GET_MODE (dest)) ! == GET_MODE_CLASS (GET_MODE (SUBREG_REG (dest))))) dest = SUBREG_REG (dest); *************** *** 2459,2463 **** tree decl; ! if (DECL_INLINE (fndecl)) /* When compiling an inline function, the obstack used for rtl allocation is the maybepermanent_obstack. Calling --- 2467,2471 ---- tree decl; ! if (DECL_INLINE (fndecl) || DECL_DEFER_OUTPUT (fndecl)) /* When compiling an inline function, the obstack used for rtl allocation is the maybepermanent_obstack. Calling *************** *** 2478,2482 **** instantiate_decls_1 (DECL_INITIAL (fndecl), valid_only); ! if (DECL_INLINE (fndecl)) { /* Save all rtl allocated for this function by raising the --- 2486,2490 ---- instantiate_decls_1 (DECL_INITIAL (fndecl), valid_only); ! if (DECL_INLINE (fndecl) || DECL_DEFER_OUTPUT (fndecl)) { /* Save all rtl allocated for this function by raising the *************** *** 2674,2678 **** if (CONSTANT_P (XEXP (x, 1))) { ! rtx old; /* Check for (plus (plus VIRT foo) (const_int)) first. */ --- 2682,2686 ---- if (CONSTANT_P (XEXP (x, 1))) { ! rtx old, new_offset; /* Check for (plus (plus VIRT foo) (const_int)) first. */ *************** *** 2721,2736 **** } ! old = XEXP (x, 0); ! XEXP (x, 0) = new; ! new = plus_constant (XEXP (x, 1), offset); ! /* If the new constant is zero, try to replace the sum with its ! first operand. */ ! if (new == const0_rtx ! && validate_change (object, loc, XEXP (x, 0), 0)) return 1; ! /* Next try to replace constant with new one. */ ! if (!validate_change (object, &XEXP (x, 1), new, 0)) { if (! extra_insns) --- 2729,2752 ---- } ! new_offset = plus_constant (XEXP (x, 1), offset); ! /* If the new constant is zero, try to replace the sum with just ! the register. */ ! if (new_offset == const0_rtx ! && validate_change (object, loc, new, 0)) return 1; ! /* Next try to replace the register and new offset. ! There are two changes to validate here and we can't assume that ! in the case of old offset equals new just changing the register ! will yield a valid insn. In the interests of a little efficiency, ! however, we only call validate change once (we don't queue up the ! changes and then call apply_change_group). */ ! ! old = XEXP (x, 0); ! if (offset == 0 ! ? ! validate_change (object, &XEXP (x, 0), new, 0) ! : (XEXP (x, 0) = new, ! ! validate_change (object, &XEXP (x, 1), new_offset, 0))) { if (! extra_insns) *************** *** 2743,2748 **** constant with that register. */ temp = gen_reg_rtx (Pmode); if (validate_change (object, &XEXP (x, 1), temp, 0)) ! emit_insn_before (gen_move_insn (temp, new), object); else { --- 2759,2765 ---- constant with that register. */ temp = gen_reg_rtx (Pmode); + XEXP (x, 0) = new; if (validate_change (object, &XEXP (x, 1), temp, 0)) ! emit_insn_before (gen_move_insn (temp, new_offset), object); else { *************** *** 2750,2755 **** register containing the sum. */ - new = gen_rtx (PLUS, Pmode, XEXP (x, 0), new); XEXP (x, 0) = old; start_sequence (); --- 2767,2772 ---- register containing the sum. */ XEXP (x, 0) = old; + new = gen_rtx (PLUS, Pmode, new, new_offset); start_sequence (); *************** *** 2945,2949 **** if nothing local refers to them. */ if (GET_CODE (insn) == CODE_LABEL) ! LABEL_PRESERVE_P (insn) = 0; if (GET_CODE (insn) == INSN && ((nonlocal_goto_handler_slot != 0 --- 2962,2984 ---- if nothing local refers to them. */ if (GET_CODE (insn) == CODE_LABEL) ! { ! tree t, last_t; ! ! LABEL_PRESERVE_P (insn) = 0; ! ! /* Remove it from the nonlocal_label list, to avoid confusing ! flow. */ ! for (t = nonlocal_labels, last_t = 0; t; ! last_t = t, t = TREE_CHAIN (t)) ! if (DECL_RTL (TREE_VALUE (t)) == insn) ! break; ! if (t) ! { ! if (! last_t) ! nonlocal_labels = TREE_CHAIN (nonlocal_labels); ! else ! TREE_CHAIN (last_t) = TREE_CHAIN (t); ! } ! } if (GET_CODE (insn) == INSN && ((nonlocal_goto_handler_slot != 0 *************** *** 3096,3100 **** register rtx stack_parm = 0; CUMULATIVE_ARGS args_so_far; ! enum machine_mode promoted_mode, passed_mode, nominal_mode; int unsignedp; /* Total space needed so far for args on the stack, --- 3131,3136 ---- register rtx stack_parm = 0; CUMULATIVE_ARGS args_so_far; ! enum machine_mode promoted_mode, passed_mode; ! enum machine_mode nominal_mode, promoted_nominal_mode; int unsignedp; /* Total space needed so far for args on the stack, *************** *** 3186,3190 **** --- 3222,3228 ---- struct args_size arg_size; int passed_pointer = 0; + int did_conversion = 0; tree passed_type = DECL_ARG_TYPE (parm); + tree nominal_type = TREE_TYPE (parm); /* Set LAST_NAMED if this is last named arg before some *************** *** 3214,3218 **** as it should be during execution of this function. */ passed_mode = TYPE_MODE (passed_type); ! nominal_mode = TYPE_MODE (TREE_TYPE (parm)); /* If the parm's mode is VOID, its value doesn't matter, --- 3252,3256 ---- as it should be during execution of this function. */ passed_mode = TYPE_MODE (passed_type); ! nominal_mode = TYPE_MODE (nominal_type); /* If the parm's mode is VOID, its value doesn't matter, *************** *** 3238,3242 **** if ((TREE_CODE (TYPE_SIZE (passed_type)) != INTEGER_CST && contains_placeholder_p (TYPE_SIZE (passed_type))) ! || TYPE_NEEDS_CONSTRUCTING (passed_type) #ifdef FUNCTION_ARG_PASS_BY_REFERENCE || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode, --- 3276,3280 ---- if ((TREE_CODE (TYPE_SIZE (passed_type)) != INTEGER_CST && contains_placeholder_p (TYPE_SIZE (passed_type))) ! || TREE_ADDRESSABLE (passed_type) #ifdef FUNCTION_ARG_PASS_BY_REFERENCE || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode, *************** *** 3245,3249 **** ) { ! passed_type = build_pointer_type (passed_type); passed_pointer = 1; passed_mode = nominal_mode = Pmode; --- 3283,3287 ---- ) { ! passed_type = nominal_type = build_pointer_type (passed_type); passed_pointer = 1; passed_mode = nominal_mode = Pmode; *************** *** 3267,3272 **** #endif ! if (entry_parm) ! passed_mode = promoted_mode; #ifdef SETUP_INCOMING_VARARGS --- 3305,3310 ---- #endif ! if (entry_parm == 0) ! promoted_mode = passed_mode; #ifdef SETUP_INCOMING_VARARGS *************** *** 3283,3287 **** if (last_named && !varargs_setup) { ! SETUP_INCOMING_VARARGS (args_so_far, passed_mode, passed_type, current_function_pretend_args_size, second_time); --- 3321,3325 ---- if (last_named && !varargs_setup) { ! SETUP_INCOMING_VARARGS (args_so_far, promoted_mode, passed_type, current_function_pretend_args_size, second_time); *************** *** 3303,3317 **** 0 as it was the previous time. */ ! locate_and_pad_parm (passed_mode, passed_type, #ifdef STACK_PARMS_IN_REG_PARM_AREA 1, #else #ifdef FUNCTION_INCOMING_ARG ! FUNCTION_INCOMING_ARG (args_so_far, passed_mode, passed_type, (! last_named || varargs_setup)) != 0, #else ! FUNCTION_ARG (args_so_far, passed_mode, passed_type, ! last_named || varargs_setup) != 0, --- 3341,3355 ---- 0 as it was the previous time. */ ! locate_and_pad_parm (promoted_mode, passed_type, #ifdef STACK_PARMS_IN_REG_PARM_AREA 1, #else #ifdef FUNCTION_INCOMING_ARG ! FUNCTION_INCOMING_ARG (args_so_far, promoted_mode, passed_type, (! last_named || varargs_setup)) != 0, #else ! FUNCTION_ARG (args_so_far, promoted_mode, passed_type, ! last_named || varargs_setup) != 0, *************** *** 3325,3331 **** if (offset_rtx == const0_rtx) ! stack_parm = gen_rtx (MEM, passed_mode, internal_arg_pointer); else ! stack_parm = gen_rtx (MEM, passed_mode, gen_rtx (PLUS, Pmode, internal_arg_pointer, offset_rtx)); --- 3363,3369 ---- if (offset_rtx == const0_rtx) ! stack_parm = gen_rtx (MEM, promoted_mode, internal_arg_pointer); else ! stack_parm = gen_rtx (MEM, promoted_mode, gen_rtx (PLUS, Pmode, internal_arg_pointer, offset_rtx)); *************** *** 3338,3342 **** /* If this parameter was passed both in registers and in the stack, use the copy on the stack. */ ! if (MUST_PASS_IN_STACK (passed_mode, passed_type)) entry_parm = 0; --- 3376,3380 ---- /* If this parameter was passed both in registers and in the stack, use the copy on the stack. */ ! if (MUST_PASS_IN_STACK (promoted_mode, passed_type)) entry_parm = 0; *************** *** 3352,3356 **** if (entry_parm) { ! int nregs = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, passed_mode, passed_type, ! last_named); --- 3390,3394 ---- if (entry_parm) { ! int nregs = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, promoted_mode, passed_type, ! last_named); *************** *** 3409,3413 **** /* Update info on where next arg arrives in registers. */ ! FUNCTION_ARG_ADVANCE (args_so_far, passed_mode, passed_type, ! last_named); --- 3447,3451 ---- /* Update info on where next arg arrives in registers. */ ! FUNCTION_ARG_ADVANCE (args_so_far, promoted_mode, passed_type, ! last_named); *************** *** 3421,3425 **** { int thisparm_boundary ! = FUNCTION_ARG_BOUNDARY (passed_mode, passed_type); if (GET_MODE_ALIGNMENT (nominal_mode) > thisparm_boundary) --- 3459,3463 ---- { int thisparm_boundary ! = FUNCTION_ARG_BOUNDARY (promoted_mode, passed_type); if (GET_MODE_ALIGNMENT (nominal_mode) > thisparm_boundary) *************** *** 3445,3453 **** rtx offset_rtx; ! #if BYTES_BIG_ENDIAN ! if (GET_MODE_SIZE (nominal_mode) < UNITS_PER_WORD) stack_offset.constant += (GET_MODE_SIZE (passed_mode) - GET_MODE_SIZE (nominal_mode)); - #endif offset_rtx = ARGS_SIZE_RTX (stack_offset); --- 3483,3490 ---- rtx offset_rtx; ! if (BYTES_BIG_ENDIAN ! && GET_MODE_SIZE (nominal_mode) < UNITS_PER_WORD) stack_offset.constant += (GET_MODE_SIZE (passed_mode) - GET_MODE_SIZE (nominal_mode)); offset_rtx = ARGS_SIZE_RTX (stack_offset); *************** *** 3465,3468 **** --- 3502,3516 ---- #endif /* 0 */ + #ifdef STACK_REGS + /* We need this "use" info, because the gcc-register->stack-register + converter in reg-stack.c needs to know which registers are active + at the start of the function call. The actual parameter loading + instructions are not always available then anymore, since they might + have been optimised away. */ + + if (GET_CODE (entry_parm) == REG && !(hide_last_arg && last_named)) + emit_insn (gen_rtx (USE, GET_MODE (entry_parm), entry_parm)); + #endif + /* ENTRY_PARM is an RTX for the parameter as it arrives, in the mode in which it arrives. *************** *** 3484,3489 **** if (GET_CODE (entry_parm) == REG) { ! int size_stored = CEIL_ROUND (int_size_in_bytes (TREE_TYPE (parm)), ! UNITS_PER_WORD); /* Note that we will be storing an integral number of words. --- 3532,3538 ---- if (GET_CODE (entry_parm) == REG) { ! int size_stored ! = CEIL_ROUND (int_size_in_bytes (TREE_TYPE (parm)), ! UNITS_PER_WORD); /* Note that we will be storing an integral number of words. *************** *** 3498,3504 **** { stack_parm ! = assign_stack_local (GET_MODE (entry_parm), size_stored, 0); ! /* If this is a memory ref that contains aggregate components, ! mark it as such for cse and loop optimize. */ MEM_IN_STRUCT_P (stack_parm) = aggregate; } --- 3547,3555 ---- { stack_parm ! = assign_stack_local (GET_MODE (entry_parm), ! size_stored, 0); ! ! /* If this is a memory ref that contains aggregate ! components, mark it as such for cse and loop optimize. */ MEM_IN_STRUCT_P (stack_parm) = aggregate; } *************** *** 3537,3544 **** unsignedp = TREE_UNSIGNED (TREE_TYPE (parm)); ! nominal_mode = promote_mode (TREE_TYPE (parm), nominal_mode, ! &unsignedp, 1); ! parmreg = gen_reg_rtx (nominal_mode); REG_USERVAR_P (parmreg) = 1; --- 3588,3596 ---- unsignedp = TREE_UNSIGNED (TREE_TYPE (parm)); ! ! promoted_nominal_mode ! = promote_mode (TREE_TYPE (parm), nominal_mode, &unsignedp, 0); ! parmreg = gen_reg_rtx (promoted_nominal_mode); REG_USERVAR_P (parmreg) = 1; *************** *** 3547,3551 **** if (passed_pointer) { ! DECL_RTL (parm) = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (passed_type)), parmreg); MEM_IN_STRUCT_P (DECL_RTL (parm)) = aggregate; } --- 3599,3604 ---- if (passed_pointer) { ! DECL_RTL (parm) ! = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (passed_type)), parmreg); MEM_IN_STRUCT_P (DECL_RTL (parm)) = aggregate; } *************** *** 3554,3560 **** /* Copy the value into the register. */ ! if (GET_MODE (parmreg) != GET_MODE (entry_parm)) { ! /* If ENTRY_PARM is a hard register, it might be in a register not valid for operating in its mode (e.g., an odd-numbered register for a DFmode). In that case, moves are the only --- 3607,3620 ---- /* Copy the value into the register. */ ! if (nominal_mode != passed_mode ! || promoted_nominal_mode != promoted_mode) { ! /* ENTRY_PARM has been converted to PROMOTED_MODE, its ! mode, by the caller. We now have to convert it to ! NOMINAL_MODE, if different. However, PARMREG may be in ! a diffent mode than NOMINAL_MODE if it is being stored ! promoted. ! ! If ENTRY_PARM is a hard register, it might be in a register not valid for operating in its mode (e.g., an odd-numbered register for a DFmode). In that case, moves are the only *************** *** 3574,3579 **** push_to_sequence (conversion_insns); ! convert_move (parmreg, tempreg, unsignedp); conversion_insns = get_insns (); end_sequence (); } --- 3634,3643 ---- push_to_sequence (conversion_insns); ! tempreg = convert_to_mode (nominal_mode, tempreg, unsignedp); ! ! expand_assignment (parm, ! make_tree (nominal_type, tempreg), 0, 0); conversion_insns = get_insns (); + did_conversion = 1; end_sequence (); } *************** *** 3637,3644 **** --- 3701,3710 ---- copy = assign_stack_temp (TYPE_MODE (type), int_size_in_bytes (type), 1); + MEM_IN_STRUCT_P (copy) = AGGREGATE_TYPE_P (type); store_expr (parm, copy, 0); emit_move_insn (parmreg, XEXP (copy, 0)); conversion_insns = get_insns (); + did_conversion = 1; end_sequence (); } *************** *** 3700,3704 **** as we make here would screw up life analysis for it. */ if (nominal_mode == passed_mode ! && ! conversion_insns && GET_CODE (entry_parm) == MEM && entry_parm == stack_parm --- 3766,3770 ---- as we make here would screw up life analysis for it. */ if (nominal_mode == passed_mode ! && ! did_conversion && GET_CODE (entry_parm) == MEM && entry_parm == stack_parm *************** *** 3742,3746 **** during function execution. */ ! if (passed_mode != nominal_mode) { /* Conversion is required. */ --- 3808,3812 ---- during function execution. */ ! if (promoted_mode != nominal_mode) { /* Conversion is required. */ *************** *** 3753,3756 **** --- 3819,3823 ---- TREE_UNSIGNED (TREE_TYPE (parm))); conversion_insns = get_insns (); + did_conversion = 1; end_sequence (); } *************** *** 3768,3772 **** } ! if (passed_mode != nominal_mode) { push_to_sequence (conversion_insns); --- 3835,3839 ---- } ! if (promoted_mode != nominal_mode) { push_to_sequence (conversion_insns); *************** *** 3843,3847 **** on return. */ ! current_function_pops_args = RETURN_POPS_ARGS (TREE_TYPE (fndecl), current_function_args_size); --- 3910,3914 ---- on return. */ ! current_function_pops_args = RETURN_POPS_ARGS (fndecl, TREE_TYPE (fndecl), current_function_args_size); *************** *** 3879,3883 **** arg = TREE_CHAIN (arg)) if (GET_CODE (DECL_INCOMING_RTL (arg)) == REG ! && REGNO (DECL_INCOMING_RTL (arg)) == regno) { enum machine_mode mode = TYPE_MODE (TREE_TYPE (arg)); --- 3946,3951 ---- arg = TREE_CHAIN (arg)) if (GET_CODE (DECL_INCOMING_RTL (arg)) == REG ! && REGNO (DECL_INCOMING_RTL (arg)) == regno ! && TYPE_MODE (DECL_ARG_TYPE (arg)) == TYPE_MODE (TREE_TYPE (arg))) { enum machine_mode mode = TYPE_MODE (TREE_TYPE (arg)); *************** *** 4015,4018 **** --- 4083,4094 ---- #endif + /* Pad_below needs the pre-rounded size to know how much to pad below + so this must be done before rounding up. */ + if (where_pad == downward + /* However, BLKmode args passed in regs have their padding done elsewhere. + The stack slot must be able to hold the entire register. */ + && !(in_regs && passed_mode == BLKmode)) + pad_below (offset_ptr, passed_mode, sizetree); + if (where_pad != none && (TREE_CODE (sizetree) != INTEGER_CST *************** *** 4020,4027 **** sizetree = round_up (sizetree, PARM_BOUNDARY / BITS_PER_UNIT); - /* This must be done after rounding sizetree, so that it will subtract - the same value that we explicitly add below. */ - if (where_pad == downward) - pad_below (offset_ptr, passed_mode, sizetree); ADD_PARM_SIZE (*arg_size_ptr, sizetree); #endif /* ARGS_GROW_DOWNWARD */ --- 4096,4099 ---- *************** *** 4752,4756 **** current_function_returns_pointer ! = (TREE_CODE (TREE_TYPE (DECL_RESULT (subr))) == POINTER_TYPE); /* Indicate that we need to distinguish between the return value of the --- 4824,4828 ---- current_function_returns_pointer ! = POINTER_TYPE_P (TREE_TYPE (DECL_RESULT (subr))); /* Indicate that we need to distinguish between the return value of the *************** *** 5057,5061 **** tem = decl_function_context (current_function_decl); /* If not doing stupid register allocation copy the static chain ! pointer into a psuedo. If we have small register classes, copy the value from memory if static_chain_incoming_rtx is a REG. If we do stupid register allocation, we use the stack address generated above. */ --- 5129,5133 ---- tem = decl_function_context (current_function_decl); /* If not doing stupid register allocation copy the static chain ! pointer into a pseudo. If we have small register classes, copy the value from memory if static_chain_incoming_rtx is a REG. If we do stupid register allocation, we use the stack address generated above. */ *************** *** 5186,5201 **** } ! #if 0 /* I think unused parms are legitimate enough. */ ! /* Warn about unused parms. */ ! if (warn_unused) { ! rtx decl; for (decl = DECL_ARGUMENTS (current_function_decl); decl; decl = TREE_CHAIN (decl)) ! if (! TREE_USED (decl) && TREE_CODE (decl) == VAR_DECL) warning_with_decl (decl, "unused parameter `%s'"); } - #endif /* Delete handlers for nonlocal gotos if nothing uses them. */ --- 5258,5272 ---- } ! /* Warn about unused parms if extra warnings were specified. */ ! if (warn_unused && extra_warnings) { ! tree decl; for (decl = DECL_ARGUMENTS (current_function_decl); decl; decl = TREE_CHAIN (decl)) ! if (! TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL ! && DECL_NAME (decl) && ! DECL_ARTIFICIAL (decl)) warning_with_decl (decl, "unused parameter `%s'"); } /* Delete handlers for nonlocal gotos if nothing uses them. */ *************** *** 5405,5409 **** } ! /* Generate the prologe and epilogue RTL if the machine supports it. Thread this into place with notes indicating where the prologue ends and where the epilogue begins. Update the basic block information when possible. */ --- 5476,5480 ---- } ! /* Generate the prologue and epilogue RTL if the machine supports it. Thread this into place with notes indicating where the prologue ends and where the epilogue begins. Update the basic block information when possible. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/function.h gcc-2.7.0/function.h *** gcc-2.6.3/function.h Wed Apr 6 07:48:40 1994 --- gcc-2.7.0/function.h Thu Jun 15 07:36:35 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 27,36 **** struct var_refs_queue ! { ! rtx modified; ! enum machine_mode promoted_mode; ! int unsignedp; ! struct var_refs_queue *next; ! }; /* Stack of pending (incomplete) sequences saved by `start_sequence'. --- 28,37 ---- struct var_refs_queue ! { ! rtx modified; ! enum machine_mode promoted_mode; ! int unsignedp; ! struct var_refs_queue *next; ! }; /* Stack of pending (incomplete) sequences saved by `start_sequence'. *************** *** 48,51 **** --- 49,60 ---- extern struct sequence_stack *sequence_stack; + + /* Stack of single obstacks. */ + + struct simple_obstack_stack + { + struct obstack *obstack; + struct simple_obstack_stack *next; + }; /* This structure can save all the important global and static variables *************** *** 68,71 **** --- 77,81 ---- int has_nonlocal_label; int has_nonlocal_goto; + int contains_functions; rtx nonlocal_goto_handler_slot; rtx nonlocal_goto_stack_level; *************** *** 159,162 **** --- 169,173 ---- struct obstack *saveable_obstack; struct obstack *rtl_obstack; + struct simple_obstack_stack *inline_obstacks; /* For integrate.c. */ *************** *** 207,210 **** --- 218,225 ---- extern void (*save_machine_status) (); extern void (*restore_machine_status) (); + + /* Save and restore varasm.c status for a nested function. */ + extern void save_varasm_status PROTO((struct function *)); + extern void restore_varasm_status PROTO((struct function *)); #ifdef rtx Only in gcc-2.6.3: future.options diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gbl-ctors.h gcc-2.7.0/gbl-ctors.h *** gcc-2.6.3/gbl-ctors.h Fri Aug 5 12:20:13 1994 --- gcc-2.7.0/gbl-ctors.h Thu Jun 15 07:36:54 1995 *************** *** 3,11 **** will get included either by libgcc2.c (for systems that don't support a .init section) or by crtstuff.c (for those that do). - Written by Ron Guilmette (rfg@netcom.com) - - Copyright (C) 1991 Free Software Foundation, Inc. - This file is part of GNU CC. --- 3,9 ---- will get included either by libgcc2.c (for systems that don't support a .init section) or by crtstuff.c (for those that do). + Copyright (C) 1991, 1995 Free Software Foundation, Inc. + Contributed by Ron Guilmette (rfg@segfault.us.com) This file is part of GNU CC. *************** *** 22,26 **** 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 contains definitions and declarations of things --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This file contains definitions and declarations of things *************** *** 33,37 **** --- 32,40 ---- #ifdef HAVE_ATEXIT + #ifdef WINNT + extern int atexit (void (*) (void)); + #else extern void atexit (void (*) (void)); + #endif #define ON_EXIT(FUNC,ARG) atexit ((FUNC)) #else diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gcc.1 gcc-2.7.0/gcc.1 *** gcc-2.6.3/gcc.1 Mon Jul 11 18:32:32 1994 --- gcc-2.7.0/gcc.1 Mon May 15 23:11:30 1995 *************** *** 375,379 **** \-mno\-ocs\-frame\-position \-mno\-optimize\-arg\-area ! \-mno\-seriazlize\-volatile \-mno\-underscores \-mocs\-debug\-info --- 375,379 ---- \-mno\-ocs\-frame\-position \-mno\-optimize\-arg\-area ! \-mno\-serialize\-volatile \-mno\-underscores \-mocs\-debug\-info *************** *** 2620,2624 **** \&; then assigns the result of .B foo\c ! \& to a temporary; and, finally, replaces the initial valyue of `\|\c .B y\c --- 2620,2624 ---- \&; then assigns the result of .B foo\c ! \& to a temporary; and, finally, replaces the initial value of `\|\c .B y\c *************** *** 2907,2911 **** .B \-mcypress (the default), the compiler optimises code for the Cypress CY7C602 chip, as ! used in the SparcStation/SparcSever 3xx series. This is also apropriate for the older SparcStation 1, 2, IPX etc. .Sp --- 2907,2911 ---- .B \-mcypress (the default), the compiler optimises code for the Cypress CY7C602 chip, as ! used in the SparcStation/SparcServer 3xx series. This is also appropriate for the older SparcStation 1, 2, IPX etc. .Sp diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gcc.c gcc-2.7.0/gcc.c *** gcc-2.6.3/gcc.c Mon Nov 7 11:01:43 1994 --- gcc-2.7.0/gcc.c Thu Jun 15 07:38:02 1995 *************** *** 1,4 **** /* Compiler driver program that can handle many languages. ! Copyright (C) 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Compiler driver program that can handle many languages. ! Copyright (C) 1987, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 paragraph is here to try to keep Sun CC from dying. --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. This paragraph is here to try to keep Sun CC from dying. *************** *** 37,41 **** #include ! #ifndef WINNT #include /* May get R_OK, etc. on some systems. */ #else --- 38,42 ---- #include ! #ifndef _WIN32 #include /* May get R_OK, etc. on some systems. */ #else *************** *** 145,148 **** --- 146,156 ---- #endif + /* By default, the suffix for object files is ".o". */ + #ifdef OBJECT_SUFFIX + #define HAVE_OBJECT_SUFFIX + #else + #define OBJECT_SUFFIX ".o" + #endif + /* By default, colon separates directories in a path. */ #ifndef PATH_SEPARATOR *************** *** 167,175 **** extern int sys_nerr; ! #if defined(bsd4_4) || defined(__NetBSD__) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif extern int execv (), execvp (); --- 175,187 ---- extern int sys_nerr; ! #ifndef HAVE_STRERROR ! #if defined(bsd4_4) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif + #else + extern char *strerror(); + #endif extern int execv (), execvp (); *************** *** 180,183 **** --- 192,200 ---- #define MIN_FATAL_STATUS 1 + /* Flag saying to print the directories gcc will search through looking for + programs, libraries, etc. */ + + static int print_search_dirs; + /* Flag saying to print the full filename of this file as found through our usual search mechanism. */ *************** *** 251,254 **** --- 268,273 ---- static void set_spec PROTO((char *, char *)); static struct compiler *lookup_compiler PROTO((char *, int, char *)); + static char *build_search_list PROTO((struct path_prefix *, char *, int)); + static void putenv_from_prefixes PROTO((struct path_prefix *, char *)); static char *find_a_file PROTO((struct path_prefix *, char *, int)); static void add_prefix PROTO((struct path_prefix *, char *, int, int, int *)); *************** *** 335,338 **** --- 354,358 ---- at all, but they are included among the output files, so they will be linked. + %O substitutes the suffix for object files. %p substitutes the standard macro predefinitions for the current target machine. Use this when running cpp. *************** *** 363,366 **** --- 383,387 ---- %l process LINK_SPEC as a spec. %L process LIB_SPEC as a spec. + %G process LIBGCC_SPEC as a spec. %S process STARTFILE_SPEC as a spec. A capital S is actually used here. %E process ENDFILE_SPEC as a spec. A capital E is actually used here. *************** *** 459,469 **** /* config.h can define LIB_SPEC to override the default libraries. */ #ifndef LIB_SPEC ! #define LIB_SPEC "%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" #endif /* config.h can define STARTFILE_SPEC to override the default crt0 files. */ #ifndef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" #endif --- 480,501 ---- /* config.h can define LIB_SPEC to override the default libraries. */ #ifndef LIB_SPEC ! #define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" ! #endif ! ! /* config.h can define LIBGCC_SPEC to override how and when libgcc.a is ! included. */ ! #ifndef LIBGCC_SPEC ! #if defined(LINK_LIBGCC_SPECIAL) || defined(LINK_LIBGCC_SPECIAL_1) ! /* Have gcc do the search for libgcc.a. */ ! #define LIBGCC_SPEC "%{!shared:libgcc.a%s}" ! #else ! #define LIBGCC_SPEC "%{!shared:-lgcc}" #endif + #endif /* config.h can define STARTFILE_SPEC to override the default crt0 files. */ #ifndef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}" #endif *************** *** 506,509 **** --- 538,542 ---- static char *link_spec = LINK_SPEC; static char *lib_spec = LIB_SPEC; + static char *libgcc_spec = LIBGCC_SPEC; static char *endfile_spec = ENDFILE_SPEC; static char *startfile_spec = STARTFILE_SPEC; *************** *** 517,521 **** ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ ! || (CHAR) == 'I' || (CHAR) == 'm' \ || (CHAR) == 'L' || (CHAR) == 'A') #endif --- 550,554 ---- ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ ! || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \ || (CHAR) == 'L' || (CHAR) == 'A') #endif *************** *** 584,589 **** %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ %{!pipe:%g.s} %A\n }}}}"}, {"-", --- 617,622 ---- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:as %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"}, {"-", *************** *** 619,624 **** %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ %{!pipe:%g.s} %A\n }}}}"}, {".h", "@c-header"}, --- 652,657 ---- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:as %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"}, {".h", "@c-header"}, *************** *** 635,663 **** %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ %i %W{o*}"}, - {".cc", "@c++"}, - {".cxx", "@c++"}, - {".cpp", "@c++"}, - {".c++", "@c++"}, - {".C", "@c++"}, - {"@c++", - "cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ - %{C:%{!E:%eGNU C++ does not support -C without using -E}}\ - %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ - -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\ - %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\ - %c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\ - %{traditional-cpp:-traditional} %{trigraphs}\ - %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ - %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", - "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\ - %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\ - %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\ - %{traditional} %{v:-version} %{pg:-p} %{p}\ - %{f*} %{+e*} %{aux-info*}\ - %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ - %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\ - %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ - %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ - %{!pipe:%g.s} %A\n }}}}"}, {".i", "@cpp-output"}, {"@cpp-output", --- 668,671 ---- *************** *** 668,689 **** %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ %{!pipe:%g.s} %A\n }}}}"}, - {".ii", "@c++-cpp-output"}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\ - %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\ - %{traditional} %{v:-version} %{pg:-p} %{p}\ - %{f*} %{+e*} %{aux-info*}\ - %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ - %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ - %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ - %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ - %{!pipe:%g.s} %A\n }}}}"}, {".s", "@assembler"}, {"@assembler", ! "%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ %i %A\n }}}}"}, {".S", "@assembler-with-cpp"}, --- 676,686 ---- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:as %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"}, {".s", "@assembler"}, {"@assembler", ! "%{!M:%{!MM:%{!E:%{!S:as %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %i %A\n }}}}"}, {".S", "@assembler-with-cpp"}, *************** *** 697,715 **** %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", ! "%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\ %{!pipe:%g.s} %A\n }}}}"}, ! {".ads", "@ada"}, ! {".adb", "@ada"}, ! {".ada", "@ada"}, ! {"@ada", ! "%{!M:%{!MM:%{!E:gnat1 %{k8:-gnatk8} %{w:-gnatws} %{!Q:-quiet}\ ! -dumpbase %b.ada %{g*} %{O*} %{p} %{pg:-p} %{f*}\ ! %{d*}\ ! %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ ! %i %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ ! %{!S:%{!gnatc:%{!gnats:as %{R} %{j} %{J} %{h} %{d2} %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b.o}}\ ! %{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n}}}}}} "}, /* Mark end of table */ {0, 0} --- 694,701 ---- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", ! "%{!M:%{!MM:%{!E:%{!S:as %a %Y\ ! %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"}, ! #include "specs.h" /* Mark end of table */ {0, 0} *************** *** 729,758 **** scripts which exist in user specified directories, or in standard directories. */ - #ifdef LINK_LIBGCC_SPECIAL_1 - /* Have gcc do the search for libgcc.a, but generate -L options as usual. */ - static char *link_command_spec = "\ - %{!fsyntax-only: \ - %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ - %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ - %{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\ - %{L*} %D %{T*} %o %{!nostdlib:libgcc.a%s %L libgcc.a%s %{!A:%E}}\n }}}}}}"; - #else #ifdef LINK_LIBGCC_SPECIAL ! /* Have gcc do the search for libgcc.a, and don't generate -L options. */ static char *link_command_spec = "\ %{!fsyntax-only: \ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ ! %{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\ ! %{L*} %{T*} %o %{!nostdlib:libgcc.a%s %L libgcc.a%s %{!A:%E}}\n }}}}}}"; #else ! /* Use -L and have the linker do the search for -lgcc. */ static char *link_command_spec = "\ %{!fsyntax-only: \ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ ! %{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\ ! %{L*} %D %{T*} %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}}"; ! #endif #endif --- 715,738 ---- scripts which exist in user specified directories, or in standard directories. */ #ifdef LINK_LIBGCC_SPECIAL ! /* Don't generate -L options. */ static char *link_command_spec = "\ %{!fsyntax-only: \ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ ! %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ ! %{static:} %{L*} %{T*} %o\ ! %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ ! %{!A:%{!nostdlib:%{!nostartfiles:%E}}}\n }}}}}}"; #else ! /* Use -L. */ static char *link_command_spec = "\ %{!fsyntax-only: \ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ ! %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ ! %{static:} %{L*} %D %{T*} %o\ ! %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ ! %{!A:%{!nostdlib:%{!nostartfiles:%E}}}\n }}}}}}"; #endif *************** *** 838,841 **** --- 818,822 ---- {"--prefix", "-B", "a"}, {"--preprocess", "-E", 0}, + {"--print-search-dirs", "-print-search-dirs", 0}, {"--print-file-name", "-print-file-name=", "aj"}, {"--print-libgcc-file-name", "-print-libgcc-file-name", 0}, *************** *** 1028,1031 **** --- 1009,1034 ---- } + char * + my_strerror(e) + int e; + { + + #ifdef HAVE_STRERROR + return strerror(e); + + #else + + static char buffer[30]; + if (!e) + return ""; + + if (e > 0 && e < sys_nerr) + return sys_errlist[e]; + + sprintf (buffer, "Unknown error %d", e); + return buffer; + #endif + } + /* Read compilation specs from a file named FILENAME, replacing the default ones. *************** *** 1044,1047 **** --- 1047,1051 ---- { int desc; + int readlen; struct stat statbuf; char *buffer; *************** *** 1060,1065 **** /* Read contents of file into BUFFER. */ buffer = xmalloc ((unsigned) statbuf.st_size + 1); ! read (desc, buffer, (unsigned) statbuf.st_size); ! buffer[statbuf.st_size] = 0; close (desc); --- 1064,1071 ---- /* Read contents of file into BUFFER. */ buffer = xmalloc ((unsigned) statbuf.st_size + 1); ! readlen = read (desc, buffer, (unsigned) statbuf.st_size); ! if (readlen < 0) ! pfatal_with_name (filename); ! buffer[readlen] = 0; close (desc); *************** *** 1230,1233 **** --- 1236,1241 ---- else if (! strcmp (name, "lib")) lib_spec = sl->spec; + else if (! strcmp (name, "libgcc")) + libgcc_spec = sl->spec; else if (! strcmp (name, "link")) link_spec = sl->spec; *************** *** 1644,1653 **** ! /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables for collect. */ ! static void ! putenv_from_prefixes (paths, env_var) struct path_prefix *paths; ! char *env_var; { int suffix_len = (machine_suffix) ? strlen (machine_suffix) : 0; --- 1652,1666 ---- ! /* Build a list of search directories from PATHS. ! PREFIX is a string to prepend to the list. ! If CHECK_DIR_P is non-zero we ensure the directory exists. ! This is used mostly by putenv_from_prefixes so we use `collect_obstack'. ! It is also used by the --print-search-dirs flag. */ ! static char * ! build_search_list (paths, prefix, check_dir_p) struct path_prefix *paths; ! char *prefix; ! int check_dir_p; { int suffix_len = (machine_suffix) ? strlen (machine_suffix) : 0; *************** *** 1657,1661 **** struct prefix_list *pprefix; ! obstack_grow (&collect_obstack, env_var, strlen (env_var)); for (pprefix = paths->plist; pprefix != 0; pprefix = pprefix->next) --- 1670,1674 ---- struct prefix_list *pprefix; ! obstack_grow (&collect_obstack, prefix, strlen (prefix)); for (pprefix = paths->plist; pprefix != 0; pprefix = pprefix->next) *************** *** 1664,1668 **** if (machine_suffix ! && is_directory (pprefix->prefix, machine_suffix, 0)) { if (!first_time) --- 1677,1682 ---- if (machine_suffix ! && (!check_dir_p ! || is_directory (pprefix->prefix, machine_suffix, 0))) { if (!first_time) *************** *** 1676,1680 **** if (just_machine_suffix && pprefix->require_machine_suffix == 2 ! && is_directory (pprefix->prefix, just_machine_suffix, 0)) { if (!first_time) --- 1690,1695 ---- if (just_machine_suffix && pprefix->require_machine_suffix == 2 ! && (!check_dir_p ! || is_directory (pprefix->prefix, just_machine_suffix, 0))) { if (!first_time) *************** *** 1697,1703 **** } obstack_1grow (&collect_obstack, '\0'); ! putenv (obstack_finish (&collect_obstack)); } /* Search for NAME using the prefix list PREFIXES. MODE is passed to --- 1712,1727 ---- } obstack_1grow (&collect_obstack, '\0'); ! return obstack_finish (&collect_obstack); } + /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables for collect. */ + + static void + putenv_from_prefixes (paths, env_var) + struct path_prefix *paths; + char *env_var; + { + putenv (build_search_list (paths, env_var, 1)); + } /* Search for NAME using the prefix list PREFIXES. MODE is passed to *************** *** 1996,2000 **** #endif ! #if !defined(__MSDOS__) && !defined(OS2) && !defined(WINNT) static int --- 2020,2024 ---- #endif ! #if !defined(__MSDOS__) && !defined(OS2) && !defined(_WIN32) static int *************** *** 2086,2128 **** } ! #endif /* not __MSDOS__ and not OS2 */ ! #if defined(OS2) || defined(WINNT) ! #ifdef WINNT ! char ** fix_argv (argvec) ! char **argvec { ! int i; ! for (i = 1; argvec[i] != 0; i++) ! { ! int len, j; ! char *temp, *newtemp; ! ! temp = argvec[i]; ! len = strlen (temp); ! for (j = 0; j < len; j++) ! { ! if (temp[j] == '"') ! { ! newtemp = xmalloc (len + 2); ! strncpy (newtemp, temp, j); ! newtemp [j] = '\\'; ! strncpy (&newtemp [j+1], &temp [j], len-j); ! newtemp [len+1] = 0; ! free (temp); ! temp = newtemp; ! len++; ! j++; ! } ! } ! argvec[i] = temp; ! } ! return argvec; } --- 2110,2154 ---- } ! #endif /* not __MSDOS__ and not OS2 and not _WIN32 */ ! ! #if defined(OS2) || defined(_WIN32) ! #ifdef _WIN32 ! /* This is a kludge to get around the Microsoft C spawn functions' propensity ! to remove the outermost set of double quotes from all arguments. */ ! const char * const fix_argv (argvec) ! char **argvec; { ! int i; ! ! for (i = 1; argvec[i] != 0; i++) ! { ! int len, j; ! char *temp, *newtemp; ! temp = argvec[i]; ! len = strlen (temp); ! for (j = 0; j < len; j++) ! { ! if (temp[j] == '"') ! { ! newtemp = xmalloc (len + 2); ! strncpy (newtemp, temp, j); ! newtemp [j] = '\\'; ! strncpy (&newtemp [j+1], &temp [j], len-j); ! newtemp [len+1] = 0; ! temp = newtemp; ! len++; ! j++; ! } ! } ! argvec[i] = temp; ! } ! return (const char* const*) argvec; } *************** *** 2133,2137 **** #define FIX_ARGV(a) a ! #endif /* OS2 or WINNT */ static int --- 2159,2163 ---- #define FIX_ARGV(a) a ! #endif static int *************** *** 2144,2148 **** return (search_flag ? spawnv : spawnvp) (1, program, FIX_ARGV (argv)); } ! #endif /* OS2 or WINNT */ --- 2170,2174 ---- return (search_flag ? spawnv : spawnvp) (1, program, FIX_ARGV (argv)); } ! #endif /* OS2 or _WIN32 */ *************** *** 2252,2270 **** /* Wait for all the subprocesses to finish. We don't care what order they finish in; ! we know that N_COMMANDS waits will get them all. */ { int ret_code = 0; ! for (i = 0; i < n_commands; i++) { int status; int pid; - char *prog = "unknown"; #ifdef __MSDOS__ status = pid = commands[i].pid; #else ! #ifdef WINNT pid = cwait (&status, commands[i].pid, WAIT_CHILD); #else --- 2278,2298 ---- /* Wait for all the subprocesses to finish. We don't care what order they finish in; ! we know that N_COMMANDS waits will get them all. ! Ignore subprocesses that we don't know about, ! since they can be spawned by the process that exec'ed us. */ { int ret_code = 0; ! for (i = 0; i < n_commands; ) { + int j; int status; int pid; #ifdef __MSDOS__ status = pid = commands[i].pid; #else ! #ifdef _WIN32 pid = cwait (&status, commands[i].pid, WAIT_CHILD); #else *************** *** 2275,2296 **** abort (); ! if (status != 0) ! { ! int j; ! for (j = 0; j < n_commands; j++) ! if (commands[j].pid == pid) ! prog = commands[j].prog; ! ! if (WIFSIGNALED (status)) ! { ! fatal ("Internal compiler error: program %s got fatal signal %d", ! prog, WTERMSIG (status)); ! signal_count++; ! ret_code = -1; ! } ! else if (WIFEXITED (status) ! && WEXITSTATUS (status) >= MIN_FATAL_STATUS) ! ret_code = -1; ! } } return ret_code; --- 2303,2325 ---- abort (); ! for (j = 0; j < n_commands; j++) ! if (commands[j].pid == pid) ! { ! i++; ! if (status != 0) ! { ! if (WIFSIGNALED (status)) ! { ! fatal ("Internal compiler error: program %s got fatal signal %d", ! commands[j].prog, WTERMSIG (status)); ! signal_count++; ! ret_code = -1; ! } ! else if (WIFEXITED (status) ! && WEXITSTATUS (status) >= MIN_FATAL_STATUS) ! ret_code = -1; ! } ! break; ! } } return ret_code; *************** *** 2491,2494 **** --- 2520,2524 ---- printf ("*link:\n%s\n\n", link_spec); printf ("*lib:\n%s\n\n", lib_spec); + printf ("*libgcc:\n%s\n\n", libgcc_spec); printf ("*startfile:\n%s\n\n", startfile_spec); printf ("*switches_need_spaces:\n%s\n\n", switches_need_spaces); *************** *** 2510,2519 **** exit (0); } else if (! strcmp (argv[i], "-print-libgcc-file-name")) ! print_file_name = "libgcc.a"; else if (! strncmp (argv[i], "-print-file-name=", 17)) ! print_file_name = argv[i] + 17; else if (! strncmp (argv[i], "-print-prog-name=", 17)) ! print_prog_name = argv[i] + 17; else if (! strcmp (argv[i], "-print-multi-lib")) print_multi_lib = 1; --- 2540,2551 ---- exit (0); } + else if (! strcmp (argv[i], "-print-search-dirs")) + print_search_dirs = 1; else if (! strcmp (argv[i], "-print-libgcc-file-name")) ! print_file_name = "libgcc.a"; else if (! strncmp (argv[i], "-print-file-name=", 17)) ! print_file_name = argv[i] + 17; else if (! strncmp (argv[i], "-print-prog-name=", 17)) ! print_prog_name = argv[i] + 17; else if (! strcmp (argv[i], "-print-multi-lib")) print_multi_lib = 1; *************** *** 2775,2778 **** --- 2807,2812 ---- else if (! strncmp (argv[i], "-Wp,", 4)) ; + else if (! strcmp (argv[i], "-print-search-dirs")) + ; else if (! strcmp (argv[i], "-print-libgcc-file-name")) ; *************** *** 2806,2810 **** if (argv[i][j] == ',') { ! infiles[n_infiles].language = spec_lang; infiles[n_infiles++].name = save_string (argv[i] + prev, j - prev); --- 2840,2844 ---- if (argv[i][j] == ',') { ! infiles[n_infiles].language = 0; infiles[n_infiles++].name = save_string (argv[i] + prev, j - prev); *************** *** 2812,2826 **** } /* Record the part after the last comma. */ ! infiles[n_infiles].language = spec_lang; infiles[n_infiles++].name = argv[i] + prev; } else if (strcmp (argv[i], "-Xlinker") == 0) { ! infiles[n_infiles].language = spec_lang; infiles[n_infiles++].name = argv[++i]; } else if (strncmp (argv[i], "-l", 2) == 0) { ! infiles[n_infiles].language = spec_lang; infiles[n_infiles++].name = argv[i]; } --- 2846,2860 ---- } /* Record the part after the last comma. */ ! infiles[n_infiles].language = 0; infiles[n_infiles++].name = argv[i] + prev; } else if (strcmp (argv[i], "-Xlinker") == 0) { ! infiles[n_infiles].language = 0; infiles[n_infiles++].name = argv[++i]; } else if (strncmp (argv[i], "-l", 2) == 0) { ! infiles[n_infiles].language = 0; infiles[n_infiles++].name = argv[i]; } *************** *** 2846,2852 **** spec_lang = p + 1; if (! strcmp (spec_lang, "none")) ! /* Suppress the warning if -xnone comes after the last input file, ! because alternate command interfaces like g++ might find it ! useful to place -xnone after each input file. */ spec_lang = 0; else --- 2880,2886 ---- spec_lang = p + 1; if (! strcmp (spec_lang, "none")) ! /* Suppress the warning if -xnone comes after the last input ! file, because alternate command interfaces like g++ might ! find it useful to place -xnone after each input file. */ spec_lang = 0; else *************** *** 2898,2901 **** --- 2932,2952 ---- else { + #ifdef HAVE_OBJECT_SUFFIX + /* Convert x.o to x.obj if OBJECT_SUFFIX is ".obj". */ + if (strlen (argv[i]) > 2 + && argv[i][strlen (argv[i]) - 2] == '.' + && argv[i][strlen (argv[i]) - 1] == 'o') + { + int j; + + for (j = 0; j < strlen (argv[i]) - 2; j++) + obstack_1grow (&obstack, argv[i][j]); + + obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX)); + obstack_1grow (&obstack, 0); + argv[i] = obstack_finish (&obstack); + } + #endif + if (strcmp (argv[i], "-") != 0 && access (argv[i], R_OK) < 0) { *************** *** 2916,2932 **** switches[n_switches].part1 = 0; infiles[n_infiles].name = 0; - - /* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */ - if (gcc_exec_prefix) - { - temp = (char *) xmalloc (strlen (gcc_exec_prefix) + strlen (spec_version) - + strlen (spec_machine) + 3); - strcpy (temp, gcc_exec_prefix); - strcat (temp, spec_machine); - strcat (temp, dir_separator_str); - strcat (temp, spec_version); - strcat (temp, dir_separator_str); - gcc_exec_prefix = temp; - } } --- 2967,2970 ---- *************** *** 3047,3051 **** if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|")) { - int i; for (i = 0; i < n_switches; i++) if (!strcmp (switches[i].part1, "pipe")) --- 3085,3088 ---- *************** *** 3275,3279 **** struct temp_name *t; char *suffix = p; ! while (*p == '.' || isalpha (*p)) p++; --- 3312,3317 ---- struct temp_name *t; char *suffix = p; ! while (*p == '.' || isalpha (*p) ! || (p[0] == '%' && p[1] == 'O')) p++; *************** *** 3352,3360 **** case 'o': ! { ! register int f; ! for (f = 0; f < n_infiles; f++) ! store_arg (outfiles[f], 0, 0); ! } break; --- 3390,3400 ---- case 'o': ! for (i = 0; i < n_infiles; i++) ! store_arg (outfiles[i], 0, 0); ! break; ! ! case 'O': ! obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX)); ! arg_going = 1; break; *************** *** 3505,3508 **** --- 3545,3554 ---- break; + case 'G': + value = do_spec_1 (libgcc_spec, 0, NULL_PTR); + if (value != 0) + return value; + break; + case 'p': { *************** *** 4227,4230 **** --- 4273,4281 ---- putenv (obstack_finish (&collect_obstack)); + #ifdef INIT_ENVIRONMENT + /* Set up any other necessary machine specific environment variables. */ + putenv (INIT_ENVIRONMENT); + #endif + /* Choose directory for temp files. */ *************** *** 4304,4307 **** --- 4355,4379 ---- #endif } + else + { + if (*standard_startfile_prefix != DIR_SEPARATOR && gcc_exec_prefix) + add_prefix (&startfile_prefixes, + concat (gcc_exec_prefix, standard_startfile_prefix), + 0, 0, NULL_PTR); + } + + /* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */ + if (gcc_exec_prefix) + { + char * temp = (char *) xmalloc (strlen (gcc_exec_prefix) + + strlen (spec_version) + + strlen (spec_machine) + 3); + strcpy (temp, gcc_exec_prefix); + strcat (temp, spec_machine); + strcat (temp, dir_separator_str); + strcat (temp, spec_version); + strcat (temp, dir_separator_str); + gcc_exec_prefix = temp; + } /* Now we have the specs. *************** *** 4322,4325 **** --- 4394,4405 ---- /* Obey some of the options. */ + if (print_search_dirs) + { + printf ("install: %s%s\n", standard_exec_prefix, machine_suffix); + printf ("programs: %s\n", build_search_list (&exec_prefixes, "", 0)); + printf ("libraries: %s\n", build_search_list (&startfile_prefixes, "", 0)); + exit (0); + } + if (print_file_name) { *************** *** 4352,4356 **** if (verbose_flag) { ! fprintf (stderr, "gcc version %s\n", version_string); if (n_infiles == 0) exit (0); --- 4432,4441 ---- if (verbose_flag) { ! if (! strcmp (version_string, compiler_version)) ! fprintf (stderr, "gcc version %s\n", version_string); ! else ! fprintf (stderr, "gcc driver version %s executing gcc version %s\n", ! version_string, compiler_version); ! if (n_infiles == 0) exit (0); *************** *** 4670,4674 **** if (errno < sys_nerr) ! s = concat ("%s: ", sys_errlist[errno]); else s = "cannot open %s"; --- 4755,4759 ---- if (errno < sys_nerr) ! s = concat ("%s: ", my_strerror( errno )); else s = "cannot open %s"; *************** *** 4683,4687 **** if (errno < sys_nerr) ! s = concat ("%s: ", sys_errlist[errno]); else s = "cannot open %s"; --- 4768,4772 ---- if (errno < sys_nerr) ! s = concat ("%s: ", my_strerror( errno )); else s = "cannot open %s"; *************** *** 4696,4700 **** if (errno < sys_nerr) ! s = concat ("installation problem, cannot exec %s: ", sys_errlist[errno]); else s = "installation problem, cannot exec %s"; --- 4781,4785 ---- if (errno < sys_nerr) ! s = concat ("installation problem, cannot exec %s: ", my_strerror( errno )); else s = "installation problem, cannot exec %s"; *************** *** 4868,4871 **** --- 4953,4962 ---- validate_switches (p + 1); + p = libgcc_spec; + while (c = *p++) + if (c == '%' && *p == '{') + /* We have a switch spec. */ + validate_switches (p + 1); + p = startfile_spec; while (c = *p++) *************** *** 5032,5037 **** { char *p = multilib_select; ! char *last_path, *this_path; ! int last_path_len, skip, use_arg; while (*p != '\0') --- 5123,5129 ---- { char *p = multilib_select; ! char *last_path = 0, *this_path; ! int skip, use_arg; ! int last_path_len = 0; while (*p != '\0') *************** *** 5054,5058 **** /* If this is a duplicate, skip it. */ ! skip = (p - this_path == last_path_len && ! strncmp (last_path, this_path, last_path_len)); --- 5146,5150 ---- /* If this is a duplicate, skip it. */ ! skip = (last_path != 0 && p - this_path == last_path_len && ! strncmp (last_path, this_path, last_path_len)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gcc.texi gcc-2.7.0/gcc.texi *** gcc-2.6.3/gcc.texi Thu Nov 3 19:28:10 1994 --- gcc-2.7.0/gcc.texi Thu Jun 15 17:33:52 1995 *************** *** 37,41 **** @c -item/itemx, text after all (sub/sub)section titles, etc.. @c -consider putting the lists of options on pp 17--> etc in columns or ! @c somesuch. @c -spellcheck @c -continuity of phrasing; ie, bit-field vs bitfield in rtl.texi --- 37,41 ---- @c -item/itemx, text after all (sub/sub)section titles, etc.. @c -consider putting the lists of options on pp 17--> etc in columns or ! @c some such. @c -spellcheck @c -continuity of phrasing; ie, bit-field vs bitfield in rtl.texi *************** *** 97,104 **** Published by the Free Software Foundation ! 675 Massachusetts Avenue ! Cambridge, MA 02139 USA ! Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 97,104 ---- Published by the Free Software Foundation ! 59 Temple Place - Suite 330 ! Boston, MA 02111-1307 USA ! Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 148,164 **** @center Richard M. Stallman @sp 3 ! @center Last updated 19 September 1994 @sp 1 @c The version number appears twice more in this file. ! @center for version 2.6 @c @center (preliminary draft, which will change) @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1988, 89, 92, 93, 1994 Free Software Foundation, Inc. @sp 2 ! For GCC Version 2.6.@* @c Printed November, 1994.@* - @c ISBN 1-882114-35-3 @sp 1 --- 148,163 ---- @center Richard M. Stallman @sp 3 ! @center Last updated 14 June 1995 @sp 1 @c The version number appears twice more in this file. ! @center for version 2.7 @c @center (preliminary draft, which will change) @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1988, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. @sp 2 ! For GCC Version 2.7.@* @c Printed November, 1994.@* @c ISBN 1-882114-35-3 @sp 1 *************** *** 199,203 **** This manual documents how to run, install and port the GNU compiler, as well as its new features and incompatibilities, and how to ! report bugs. It corresponds to GNU CC version 2.6. @end ifset @end ifset --- 198,202 ---- This manual documents how to run, install and port the GNU compiler, as well as its new features and incompatibilities, and how to ! report bugs. It corresponds to GNU CC version 2.7. @end ifset @end ifset *************** *** 206,215 **** This manual documents how to run and install the GNU compiler, as well as its new features and incompatibilities, and how to report ! bugs. It corresponds to GNU CC version 2.6. @end ifclear @ifclear USING This manual documents how to port the GNU compiler, as well as its new features and incompatibilities, and how to report ! bugs. It corresponds to GNU CC version 2.6. @end ifclear --- 205,214 ---- This manual documents how to run and install the GNU compiler, as well as its new features and incompatibilities, and how to report ! bugs. It corresponds to GNU CC version 2.7. @end ifclear @ifclear USING This manual documents how to port the GNU compiler, as well as its new features and incompatibilities, and how to report ! bugs. It corresponds to GNU CC version 2.7. @end ifclear *************** *** 694,698 **** @item ! David Kashtan of SRI adapted GNU CC to the Vomit-Making System (VMS). @item --- 693,697 ---- @item ! David Kashtan of SRI adapted GNU CC to VMS. @item *************** *** 1114,1117 **** --- 1113,1118 ---- * Fixed Headers:: GNU C uses corrected versions of system header files. This is necessary, but doesn't always work smoothly. + * Standard Libraries:: GNU C uses the system C library, which might not be + compliant with the ISO/ANSI C standard. * Disappointments:: Regrettable things we can't change, but not quite bugs. * C++ Misunderstandings:: Common misunderstandings with GNU C++. *************** *** 1727,1737 **** The 128-bit long double format that the Sparc port supports currently works by using the architecturally defined quad-word floating point ! instructions. Since there is no hardware that supports these instructions ! they must be emulated by the operating system. Long doubles do not work ! in Sun OS versions 4.0.3 and earlier, because the kernel eumulator uses an ! obsolete and incompatible format. Long doubles do not work in Sun OS ! versions 4.1.1 to 4.1.3 because of emululator bugs that cause random ! unpredicatable failures. Long doubles appear to work in Sun OS 5.x ! (Solaris 2.x). @item --- 1728,1739 ---- The 128-bit long double format that the Sparc port supports currently works by using the architecturally defined quad-word floating point ! instructions. Since there is no hardware that supports these ! instructions they must be emulated by the operating system. Long ! doubles do not work in Sun OS versions 4.0.3 and earlier, because the ! kernel eumulator uses an obsolete and incompatible format. Long doubles ! do not work in Sun OS version 4.1.1 due to a problem in a Sun library. ! Long doubles do work on Sun OS versions 4.1.2 and higher, but GNU CC ! does not enable them by default. Long doubles appear to work in Sun OS ! 5.x (Solaris 2.x). @item *************** *** 1763,1772 **** @item ! For some very large functions you may receive errors from the HP linker ! complaining about an out of bounds unconditional branch offset. Fixing ! this problem correctly requires fixing problems in GNU CC and GAS. We ! hope to fix this in time for GNU CC 2.6. Until then you can work around ! by making your function smaller, and if you are using GAS, splitting the ! function into multiple source files may be necessary. @item --- 1765,1773 ---- @item ! In extremely rare cases involvving some very large functions you may ! receive errors from the HP linker complaining about an out of bounds ! unconditional branch offset. This used to occur more often in previous ! versions of GNU CC, but is now exceptionally rare. If you should run ! into it, you can work around by making your function smaller. @item *************** *** 1898,1907 **** @item On the WE32k, you may find that programs compiled with GNU CC do not ! work with the standard shared C ilbrary. You may need to link with the ordinary C compiler. If you do so, you must specify the following options: @smallexample ! -L/usr/local/lib/gcc-lib/we32k-att-sysv/2.6.0 -lgcc -lc_s @end smallexample --- 1899,1908 ---- @item On the WE32k, you may find that programs compiled with GNU CC do not ! work with the standard shared C library. You may need to link with the ordinary C compiler. If you do so, you must specify the following options: @smallexample ! -L/usr/local/lib/gcc-lib/we32k-att-sysv/2.7.0 -lgcc -lc_s @end smallexample *************** *** 2097,2101 **** @item ! Programs that use preprocessor directives in the middle of macro arguments do not work with GNU CC. For example, a program like this will not work: --- 2098,2102 ---- @item ! Programs that use preprocessing directives in the middle of macro arguments do not work with GNU CC. For example, a program like this will not work: *************** *** 2155,2159 **** @item GNU CC complains about unterminated character constants inside of ! preprocessor conditionals that fail. Some programs have English comments enclosed in conditionals that are guaranteed to fail; if these comments contain apostrophes, GNU CC will probably report an error. For --- 2156,2160 ---- @item GNU CC complains about unterminated character constants inside of ! preprocessing conditionals that fail. Some programs have English comments enclosed in conditionals that are guaranteed to fail; if these comments contain apostrophes, GNU CC will probably report an error. For *************** *** 2288,2291 **** --- 2289,2316 ---- @end itemize + @node Standard Libraries + @section Standard Libraries + + GNU CC by itself attempts to be what the ISO/ANSI C standard calls a + @dfn{conforming freestanding implementation}. This means all ANSI + C language features are available, as well as the contents of + @file{float.h}, @file{limits.h}, @file{stdarg.h}, and + @file{stddef.h}. The rest of the C library is supplied by the + vendor of the operating system. If that C library doesn't conform to + the C standards, then your programs might get warnings (especially when + using @samp{-Wall}) that you don't expect. + + For example, the @code{sprintf} function on SunOS 4.1.3 returns + @code{char *} while the C standard says that @code{sprintf} returns an + @code{int}. The @code{fixincludes} program could make the prototype for + this function match the Standard, but that would be wrong, since the + function will still return @code{char *}. + + If you need a Standard compliant library, then you need to find one, as + GNU CC does not provide one. The GNU C library (called @code{glibc}) + has been ported to a number of operating systems, and provides ANSI/ISO, + POSIX, BSD and SystemV compatibility. You could also ask your operating + system vendor if newer libraries are available. + @node Disappointments @section Disappointments and Misunderstandings *************** *** 2540,2544 **** @item @code{protoize} cannot get the argument types for a function whose ! definition was not actually compiled due to preprocessor conditionals. When this happens, @code{protoize} changes nothing in regard to such a function. @code{protoize} tries to detect such instances and warn --- 2565,2569 ---- @item @code{protoize} cannot get the argument types for a function whose ! definition was not actually compiled due to preprocessing conditionals. When this happens, @code{protoize} changes nothing in regard to such a function. @code{protoize} tries to detect such instances and warn *************** *** 2772,2776 **** definitions) that the increments will be evaluated in any particular order. Either increment might happen first. @code{func} might get the ! arguments @samp{3, 4}, or it might get @samp{4, 3}, or even @samp{3, 3}. @item --- 2797,2801 ---- definitions) that the increments will be evaluated in any particular order. Either increment might happen first. @code{func} might get the ! arguments @samp{2, 3}, or it might get @samp{3, 2}, or even @samp{2, 2}. @item *************** *** 2814,2818 **** GNU CC always tries to compile your program if possible; it never ! gratuituously rejects a program whose meaning is clear merely because (for instance) it fails to conform to a standard. In some cases, however, the C and C++ standards specify that certain extensions are --- 2839,2843 ---- GNU CC always tries to compile your program if possible; it never ! gratuitously rejects a program whose meaning is clear merely because (for instance) it fails to conform to a standard. In some cases, however, the C and C++ standards specify that certain extensions are *************** *** 3000,3003 **** --- 3025,3034 ---- to the appropriate maintainer. + Do not compress and encode any part of your bug report using programs + such as @file{uuencode}. If you do so it will slow down the processing + of your bug. If you must submit multiple large files, use @file{shar}, + which allows us to read your message without having to run any + decompression programs. + To enable someone to investigate the bug, you should include all these things: *************** *** 3225,3232 **** If you would like to write bug fixes or improvements for the GNU C ! compiler, that is very helpful. When you send your changes, please ! follow these guidelines to avoid causing extra work for us in studying ! the patches. If you don't follow these guidelines, your information might still be useful, but using it will take extra work. Maintaining GNU C is a lot --- 3256,3263 ---- If you would like to write bug fixes or improvements for the GNU C ! compiler, that is very helpful. Send suggested fixes to the bug report ! mailing list, @code{bug-gcc@@prep.ai.mit.edu}. + Please follow these guidelines so we can study your patches efficiently. If you don't follow these guidelines, your information might still be useful, but using it will take extra work. Maintaining GNU C is a lot *************** *** 4311,4316 **** Define this macro if the host system is VMS. ! @findex FAILURE_EXIT_CODE ! @item FAILURE_EXIT_CODE A C expression for the status code to be returned when the compiler exits after serious errors. --- 4342,4347 ---- Define this macro if the host system is VMS. ! @findex FATAL_EXIT_CODE ! @item FATAL_EXIT_CODE A C expression for the status code to be returned when the compiler exits after serious errors. *************** *** 4369,4379 **** @code{enum}, as do most C compilers. - @findex EXECUTABLE_SUFFIX - @item EXECUTABLE_SUFFIX - Define this macro if the host system uses a naming convention for - executable files that involves a common suffix (such as, in some - systems, @samp{.exe}) that must be mentioned explicitly when you run - the program. - @findex OBSTACK_CHUNK_SIZE @item OBSTACK_CHUNK_SIZE --- 4400,4403 ---- *************** *** 4438,4441 **** --- 4462,4469 ---- system. + @findex POSIX + @item POSIX + Define this if your system is POSIX.1 compliant. + @findex NO_SYS_SIGLIST @item NO_SYS_SIGLIST *************** *** 4501,4504 **** --- 4529,4552 ---- names, the character you specify will be used. GNU CC will test for both slash and the character you specify when parsing filenames. + + @findex OBJECT_SUFFIX + @item OBJECT_SUFFIX + Define this macro to be a C string representing the suffix for object + files on your machine. If you do not define this macro, GNU CC will use + @samp{.o} as the suffix for object files. + + @findex EXECUTABLE_SUFFIX + @item EXECUTABLE_SUFFIX + Define this macro to be a C string representing the suffix for executable + files on your machine. If you do not define this macro, GNU CC will use + the null string as the suffix for object files. + + @findex COLLECT_EXPORT_LIST + @item COLLECT_EXPORT_LIST + If defined, @code{collect2} will scan the individual object files + specified on its command line and create an export list for the linker. + Define this macro for systems like AIX, where the linker discards + object files that are not referenced from @code{main} and uses export + lists. @end table diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gen-protos.c gcc-2.7.0/gen-protos.c *** gcc-2.6.3/gen-protos.c Mon Feb 14 19:18:07 1994 --- gcc-2.7.0/gen-protos.c Thu Jun 15 07:38:34 1995 *************** *** 1,4 **** /* gen-protos.c - massages a list of prototypes, for use by fixproto. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it --- 1,4 ---- /* gen-protos.c - massages a list of prototypes, for use by fixproto. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it *************** *** 14,18 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include --- 14,18 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include *************** *** 20,26 **** --- 20,42 ---- #include "hconfig.h" #include "scan.h" + #include "cpplib.h" + #include "cpphash.h" #define HASH_SIZE 2503 /* a prime */ + int + hashf (name, len, hashsize) + register U_CHAR *name; + register int len; + int hashsize; + { + register int r = 0; + + while (len--) + r = HASHSTEP (r, *name++); + + return MAKE_POS (r) % hashsize; + } + int hash_tab[HASH_SIZE]; int verbose = 0; *************** *** 120,124 **** /* NOTE: If you edit this, also edit lookup_std_proto in fix-header.c !! */ ! i = hash (name_start) % HASH_SIZE; i0 = i; if (hash_tab[i] != 0) --- 136,140 ---- /* NOTE: If you edit this, also edit lookup_std_proto in fix-header.c !! */ ! i = hashf (name_start, name_end - name_start, HASH_SIZE); i0 = i; if (hash_tab[i] != 0) *************** *** 153,155 **** --- 169,179 ---- return 0; + } + + void + fatal (s) + char *s; + { + fprintf (stderr, "%s: %s\n", "gen-protos", s); + exit (FATAL_EXIT_CODE); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genattr.c gcc-2.7.0/genattr.c *** gcc-2.6.3/genattr.c Fri Sep 30 17:23:46 1994 --- gcc-2.7.0/genattr.c Thu Jun 15 07:38:53 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genattrtab.c gcc-2.7.0/genattrtab.c *** gcc-2.6.3/genattrtab.c Thu Oct 13 10:44:20 1994 --- gcc-2.7.0/genattrtab.c Thu Jun 15 07:39:24 1995 *************** *** 1,4 **** /* Generate code from machine description to compute values of attributes. ! Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) --- 1,4 ---- /* Generate code from machine description to compute values of attributes. ! Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) *************** *** 17,21 **** 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 program handles insn attributes and the DEFINE_DELAY and --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This program handles insn attributes and the DEFINE_DELAY and *************** *** 1155,1159 **** default: ! fatal ("Illegal operation `%s' for attribute value", GET_RTX_NAME (GET_CODE (exp))); } --- 1156,1160 ---- default: ! fatal ("Invalid operation `%s' for attribute value", GET_RTX_NAME (GET_CODE (exp))); } *************** *** 3086,3090 **** i = compute_alternative_mask (exp, AND); if (i & ~insn_alternatives[insn_code]) ! fatal ("Illegal alternative specified for pattern number %d", insn_index); --- 3087,3091 ---- i = compute_alternative_mask (exp, AND); if (i & ~insn_alternatives[insn_code]) ! fatal ("Invalid alternative specified for pattern number %d", insn_index); *************** *** 3179,3183 **** i = compute_alternative_mask (exp, IOR); if (i & ~insn_alternatives[insn_code]) ! fatal ("Illegal alternative specified for pattern number %d", insn_index); --- 3180,3184 ---- i = compute_alternative_mask (exp, IOR); if (i & ~insn_alternatives[insn_code]) ! fatal ("Invalid alternative specified for pattern number %d", insn_index); *************** *** 4488,4492 **** /* The address of the branch target. */ case MATCH_DUP: ! printf ("insn_addresses[INSN_UID (JUMP_LABEL (insn))]"); break; --- 4489,4493 ---- /* The address of the branch target. */ case MATCH_DUP: ! printf ("insn_addresses[INSN_UID (operands[%d])]", XINT (exp, 0)); break; *************** *** 4593,4596 **** --- 4594,4601 ---- case MATCH_DUP: + must_extract = 1; + address_used = 1; + return; + case PC: address_used = 1; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gencodes.c gcc-2.7.0/gencodes.c *** gcc-2.6.3/gencodes.c Tue Oct 13 00:11:44 1992 --- gcc-2.7.0/gencodes.c Thu Jun 15 07:39:49 1995 *************** *** 3,7 **** - some macros CODE_FOR_... giving the insn_code_number value for each of the defined standard insn names. ! Copyright (C) 1987, 1991 Free Software Foundation, Inc. This file is part of GNU CC. --- 3,7 ---- - some macros CODE_FOR_... giving the insn_code_number value for each of the defined standard insn names. ! Copyright (C) 1987, 1991, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 19,23 **** 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. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 46,52 **** rtx insn; { ! /* Don't mention instructions whose names are the null string. ! They are in the machine description just to be recognized. */ ! if (strlen (XSTR (insn, 0)) != 0) printf (" CODE_FOR_%s = %d,\n", XSTR (insn, 0), insn_code_number); --- 47,54 ---- rtx insn; { ! /* Don't mention instructions whose names are the null string ! or begin with '*'. They are in the machine description just ! to be recognized. */ ! if (XSTR (insn, 0)[0] != 0 && XSTR (insn, 0)[0] != '*') printf (" CODE_FOR_%s = %d,\n", XSTR (insn, 0), insn_code_number); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genconfig.c gcc-2.7.0/genconfig.c *** gcc-2.6.3/genconfig.c Wed Jun 15 03:37:01 1994 --- gcc-2.7.0/genconfig.c Thu Jun 15 07:40:18 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 344,356 **** if (have_cmove_flag) ! { ! /* ??? The #ifndef/#endif is a hack for targets like sparc where ! conditional moves don't exist for all versions of the ! architecture. This won't be needed after conditional move support ! has been clean up. */ ! printf ("#ifndef HAVE_conditional_move\n"); ! printf ("#define HAVE_conditional_move 1\n"); ! printf ("#endif\n"); ! } if (have_lo_sum_flag) --- 345,349 ---- if (have_cmove_flag) ! printf ("#define HAVE_conditional_move\n"); if (have_lo_sum_flag) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genemit.c gcc-2.7.0/genemit.c *** gcc-2.6.3/genemit.c Sat Mar 12 07:37:41 1994 --- gcc-2.7.0/genemit.c Thu Jun 15 07:40:43 1995 *************** *** 1,4 **** /* Generate code from machine description to emit insns as rtl. ! Copyright (C) 1987, 1988, 1991, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Generate code from machine description to emit insns as rtl. ! Copyright (C) 1987, 1988, 1991, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 336,342 **** } ! /* Don't mention instructions whose names are the null string. ! They are in the machine description just to be recognized. */ ! if (strlen (XSTR (insn, 0)) == 0) return; --- 337,344 ---- } ! /* Don't mention instructions whose names are the null string ! or begin with '*'. They are in the machine description just ! to be recognized. */ ! if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*') return; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genextract.c gcc-2.7.0/genextract.c *** gcc-2.6.3/genextract.c Thu Sep 1 22:13:37 1994 --- gcc-2.7.0/genextract.c Thu Jun 15 07:41:25 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genflags.c gcc-2.7.0/genflags.c *** gcc-2.6.3/genflags.c Tue Oct 13 00:12:01 1992 --- gcc-2.7.0/genflags.c Thu Jun 15 07:42:05 1995 *************** *** 3,7 **** - some flags HAVE_... saying which simple standard instructions are available for this machine. ! Copyright (C) 1987, 1991 Free Software Foundation, Inc. This file is part of GNU CC. --- 3,7 ---- - some flags HAVE_... saying which simple standard instructions are available for this machine. ! Copyright (C) 1987, 1991, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 19,23 **** 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. */ --- 19,24 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 124,132 **** int len; ! /* Don't mention instructions whose names are the null string. ! They are in the machine description just to be recognized. */ ! len = strlen (name); ! if (len == 0) return; if (len > max_id_len) --- 125,135 ---- int len; ! /* Don't mention instructions whose names are the null string ! or begin with '*'. They are in the machine description just ! to be recognized. */ ! if (name[0] == 0 || name[0] == '*') return; + + len = strlen (name); if (len > max_id_len) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genmultilib gcc-2.7.0/genmultilib *** gcc-2.6.3/genmultilib Wed Jun 15 03:59:59 1994 --- gcc-2.7.0/genmultilib Thu Jun 15 17:05:25 1995 *************** *** 17,21 **** #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 shell script produces a header file which the gcc driver --- 17,22 ---- #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, 59 Temple Place - Suite 330, ! #Boston, MA 02111-1307, USA. # This shell script produces a header file which the gcc driver *************** *** 40,44 **** # element must be of the form OPTION=OPTION. The first OPTION should # appear in the first argument, and the second should be a synonym for ! # it. # The output looks like --- 41,45 ---- # element must be of the form OPTION=OPTION. The first OPTION should # appear in the first argument, and the second should be a synonym for ! # it. Question marks are replaced with equal signs in both options. # The output looks like *************** *** 133,138 **** matchnegations= for i in ${matches}; do ! l=`echo $i | sed -e 's/=.*$//'` ! r=`echo $i | sed -e 's/^.*=//'` matchnegations="${matchnegations} -e s/;!${l};/;!${l};!${r};/" done --- 134,139 ---- matchnegations= for i in ${matches}; do ! l=`echo $i | sed -e 's/=.*$//' -e 's/?/=/g'` ! r=`echo $i | sed -e 's/^.*=//' -e 's/?/=/g'` matchnegations="${matchnegations} -e s/;!${l};/;!${l};!${r};/" done *************** *** 159,164 **** shift dirout="${dirout}" optout="${optout}" ./tmpmultilib2 $@ ! l=`echo ${first} | sed -e 's/=.*$//'` ! r=`echo ${first} | sed -e 's/^.*=//'` case " ${optout} " in *" ${l} "*) --- 160,165 ---- shift dirout="${dirout}" optout="${optout}" ./tmpmultilib2 $@ ! l=`echo ${first} | sed -e 's/=.*$//' -e 's/?/=/g'` ! r=`echo ${first} | sed -e 's/^.*=//' -e 's/?/=/g'` case " ${optout} " in *" ${l} "*) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genopinit.c gcc-2.7.0/genopinit.c *** gcc-2.6.3/genopinit.c Tue Jun 28 20:15:33 1994 --- gcc-2.7.0/genopinit.c Thu Jun 15 07:42:51 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 119,122 **** --- 120,124 ---- "bcc_gen_fctn[(int) %C] = gen_%(b%c%)", "setcc_gen_code[(int) %C] = CODE_FOR_%(s%c%)", + "movcc_gen_code[(int) %A] = CODE_FOR_%(mov%acc%)", "reload_in_optab[(int) %A] = CODE_FOR_%(reload_in%a%)", "reload_out_optab[(int) %A] = CODE_FOR_%(reload_out%a%)", *************** *** 226,230 **** if (matches && pp[0] == '%' && pp[1] == ')' && *np == 0 ! && (! force_consec || (int) mode_wider_mode[m1] == m2)) break; } --- 228,232 ---- if (matches && pp[0] == '%' && pp[1] == ')' && *np == 0 ! && (! force_consec || (int) GET_MODE_WIDER_MODE(m1) == m2)) break; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genoutput.c gcc-2.7.0/genoutput.c *** gcc-2.6.3/genoutput.c Tue Sep 27 18:27:28 1994 --- gcc-2.7.0/genoutput.c Thu Jun 15 07:43:06 1995 *************** *** 1,4 **** /* Generate code from to output assembler insns as recognized from rtl. ! Copyright (C) 1987, 1988, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Generate code from to output assembler insns as recognized from rtl. ! Copyright (C) 1987, 1988, 1992, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 223,227 **** for (d = insn_data; d; d = d->next) { ! if (d->name) printf (" gen_%s,\n", d->name); else --- 224,228 ---- for (d = insn_data; d; d = d->next) { ! if (d->name && d->name[0] != '*') printf (" gen_%s,\n", d->name); else diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genpeep.c gcc-2.7.0/genpeep.c *** gcc-2.6.3/genpeep.c Tue Oct 13 00:12:10 1992 --- gcc-2.7.0/genpeep.c Thu Jun 15 07:43:30 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/genrecog.c gcc-2.7.0/genrecog.c *** gcc-2.6.3/genrecog.c Fri Mar 25 14:10:42 1994 --- gcc-2.7.0/genrecog.c Thu Jun 15 07:43:46 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 373,377 **** Finally, if we know that the predicate does not allow CONST_INT, we know that the only way the predicate can match is if the modes match ! (here we use the kluge of relying on the fact that "address_operand" accepts CONST_INT; otherwise, it would have to be a special case), so we can test the mode (but we need not). This fact should --- 374,378 ---- Finally, if we know that the predicate does not allow CONST_INT, we know that the only way the predicate can match is if the modes match ! (here we use the kludge of relying on the fact that "address_operand" accepts CONST_INT; otherwise, it would have to be a special case), so we can test the mode (but we need not). This fact should diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/getopt.c gcc-2.7.0/getopt.c *** gcc-2.6.3/getopt.c Mon Nov 14 18:17:22 1994 --- gcc-2.7.0/getopt.c Thu Jun 15 18:11:54 1995 *************** *** 4,8 **** before changing it! ! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. --- 4,8 ---- before changing it! ! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc. *************** *** 60,63 **** --- 60,71 ---- #endif /* GNU C library. */ + /* This is for other GNU distributions with internationalized messages. + The GNU C Library itself does not yet support such messages. */ + #if HAVE_LIBINTL_H + # include + #else + # define gettext(msgid) (msgid) + #endif + /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user *************** *** 376,380 **** if (optind == 0) ! optstring = _getopt_initialize (optstring); if (nextchar == NULL || *nextchar == '\0') --- 384,391 ---- if (optind == 0) ! { ! optstring = _getopt_initialize (optstring); ! optind = 1; /* Don't scan ARGV[0], the program name. */ ! } if (nextchar == NULL || *nextchar == '\0') *************** *** 506,510 **** { if (opterr) ! fprintf (stderr, "%s: option `%s' is ambiguous\n", argv[0], argv[optind]); nextchar += strlen (nextchar); --- 517,521 ---- { if (opterr) ! fprintf (stderr, gettext ("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); *************** *** 526,541 **** { if (opterr) ! { ! if (argv[optind - 1][1] == '-') ! /* --option */ ! fprintf (stderr, ! "%s: option `--%s' doesn't allow an argument\n", ! argv[0], pfound->name); ! else ! /* +option or -option */ ! fprintf (stderr, ! "%s: option `%c%s' doesn't allow an argument\n", ! argv[0], argv[optind - 1][0], pfound->name); ! } nextchar += strlen (nextchar); return '?'; --- 537,551 ---- { if (opterr) ! if (argv[optind - 1][1] == '-') ! /* --option */ ! fprintf (stderr, ! gettext ("%s: option `--%s' doesn't allow an argument\n"), ! argv[0], pfound->name); ! else ! /* +option or -option */ ! fprintf (stderr, ! gettext ("%s: option `%c%s' doesn't allow an argument\n"), ! argv[0], argv[optind - 1][0], pfound->name); ! nextchar += strlen (nextchar); return '?'; *************** *** 549,554 **** { if (opterr) ! fprintf (stderr, "%s: option `%s' requires an argument\n", ! argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; --- 559,565 ---- { if (opterr) ! fprintf (stderr, ! gettext ("%s: option `%s' requires an argument\n"), ! argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; *************** *** 577,585 **** if (argv[optind][1] == '-') /* --option */ ! fprintf (stderr, "%s: unrecognized option `--%s'\n", argv[0], nextchar); else /* +option or -option */ ! fprintf (stderr, "%s: unrecognized option `%c%s'\n", argv[0], argv[optind][0], nextchar); } --- 588,596 ---- if (argv[optind][1] == '-') /* --option */ ! fprintf (stderr, gettext ("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ ! fprintf (stderr, gettext ("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } *************** *** 606,612 **** if (posixly_correct) /* 1003.2 specifies the format of this message. */ ! fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); else ! fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c); } optopt = c; --- 617,625 ---- if (posixly_correct) /* 1003.2 specifies the format of this message. */ ! fprintf (stderr, gettext ("%s: illegal option -- %c\n"), ! argv[0], c); else ! fprintf (stderr, gettext ("%s: invalid option -- %c\n"), ! argv[0], c); } optopt = c; *************** *** 642,647 **** { /* 1003.2 specifies the format of this message. */ ! fprintf (stderr, "%s: option requires an argument -- %c\n", ! argv[0], c); } optopt = c; --- 655,661 ---- { /* 1003.2 specifies the format of this message. */ ! fprintf (stderr, ! gettext ("%s: option requires an argument -- %c\n"), ! argv[0], c); } optopt = c; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/getpwd.c gcc-2.7.0/getpwd.c *** gcc-2.6.3/getpwd.c Fri Oct 14 10:29:12 1994 --- gcc-2.7.0/getpwd.c Tue May 16 18:25:04 1995 *************** *** 29,33 **** #define GUESSPATHLEN 100 #endif /* (defined (USG) || defined (VMS)) */ ! #ifdef WINNT #include #endif --- 29,33 ---- #define GUESSPATHLEN 100 #endif /* (defined (USG) || defined (VMS)) */ ! #ifdef _WIN32 #include #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/iso646.h gcc-2.7.0/ginclude/iso646.h *** gcc-2.6.3/ginclude/iso646.h --- gcc-2.7.0/ginclude/iso646.h Wed Jun 14 22:14:09 1995 *************** *** 0 **** --- 1,15 ---- + /* Macros for C programs written in national variants of ISO 646. */ + + #ifndef __cplusplus + #define and && + #define and_eq &= + #define bitand & + #define bitor | + #define compl ~ + #define not ! + #define not_eq != + #define or || + #define or_eq |= + #define xor ^ + #define xor_eq ^= + #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/math-68881.h gcc-2.7.0/ginclude/math-68881.h *** gcc-2.6.3/ginclude/math-68881.h Mon Sep 5 17:23:52 1994 --- gcc-2.7.0/ginclude/math-68881.h Tue Dec 20 19:51:32 1994 *************** *** 37,40 **** --- 37,43 ---- September 1993, Use #undef before HUGE_VAL instead of #ifdef/#endif. */ + /* Changed by Ian Lance Taylor: + September 1994, use extern inline instead of static inline. */ + #ifndef __math_68881 #define __math_68881 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/stdarg.h gcc-2.7.0/ginclude/stdarg.h *** gcc-2.6.3/ginclude/stdarg.h Fri Jul 8 22:04:27 1994 --- gcc-2.7.0/ginclude/stdarg.h Sun Apr 30 08:10:28 1995 *************** *** 71,75 **** #undef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ ! #define va_end(AP) /* We cast to void * and then to TYPE * because this avoids --- 71,75 ---- #undef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ ! #define va_end(AP) ((void)0) /* We cast to void * and then to TYPE * because this avoids *************** *** 85,91 **** #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ ! *((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4 \ ! ? sizeof (TYPE) \ ! : __va_rounded_size (TYPE)))))) #endif /* big-endian */ #endif /* _STDARG_H */ --- 85,91 ---- #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ ! *((TYPE *) (void *) ((char *) (AP) \ ! - ((sizeof (TYPE) < __va_rounded_size (char) \ ! ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) #endif /* big-endian */ #endif /* _STDARG_H */ *************** *** 137,154 **** (Note that the comments in NET 2's ansi.h are incorrect for _VA_LIST_--see stdio.h!) */ ! #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__FreeBSD__) /* The macro _VA_LIST is used in SCO Unix 3.2. */ #ifndef _VA_LIST /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ #ifndef _VA_LIST_T_H - #define _VA_LIST_T_H - #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__FreeBSD__)) - #define _VA_LIST_ - #endif - #define _VA_LIST typedef __gnuc_va_list va_list; #endif /* not _VA_LIST_T_H */ #endif /* not _VA_LIST */ ! #endif /* not _VA_LIST_ */ #endif /* not __svr4__ */ --- 137,165 ---- (Note that the comments in NET 2's ansi.h are incorrect for _VA_LIST_--see stdio.h!) */ ! #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) ! /* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ ! #ifndef _VA_LIST_DEFINED /* The macro _VA_LIST is used in SCO Unix 3.2. */ #ifndef _VA_LIST /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ #ifndef _VA_LIST_T_H typedef __gnuc_va_list va_list; #endif /* not _VA_LIST_T_H */ #endif /* not _VA_LIST */ ! #endif /* not _VA_LIST_DEFINED */ ! #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) ! #define _VA_LIST_ ! #endif ! #ifndef _VA_LIST ! #define _VA_LIST ! #endif ! #ifndef _VA_LIST_DEFINED ! #define _VA_LIST_DEFINED ! #endif ! #ifndef _VA_LIST_T_H ! #define _VA_LIST_T_H ! #endif ! ! #endif /* not _VA_LIST_, except on certain systems */ #endif /* not __svr4__ */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/stddef.h gcc-2.7.0/ginclude/stddef.h *** gcc-2.6.3/ginclude/stddef.h Thu Nov 17 17:26:41 1994 --- gcc-2.7.0/ginclude/stddef.h Tue May 30 19:02:59 1995 *************** *** 28,33 **** /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are ! defined if the corresponding type is *not* defined. */ ! #ifdef _ANSI_H_ #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_) #define _SIZE_T --- 28,34 ---- /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are ! defined if the corresponding type is *not* defined. ! FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */ ! #if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_) #define _SIZE_T *************** *** 56,60 **** #undef _BSD_WCHAR_T_ #endif ! #endif /* _ANSI_H_ */ /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. --- 57,61 ---- #undef _BSD_WCHAR_T_ #endif ! #endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */ /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. *************** *** 64,67 **** --- 65,87 ---- #endif + /* On VxWorks, may have defined macros like + _TYPE_size_t which will typedef size_t. fixincludes patched the + vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is + not defined, and so that defining this macro defines _GCC_SIZE_T. + If we find that the macros are still defined at this point, we must + invoke them so that the type is defined as expected. */ + #if defined (TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_)) + _TYPE_ptrdiff_t; + #undef _TYPE_ptrdiff_t + #endif + #if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_)) + _TYPE_size_t; + #undef _TYPE_size_t + #endif + #if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_)) + _TYPE_wchar_t; + #undef _TYPE_wchar_t + #endif + /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and *************** *** 122,125 **** --- 142,146 ---- #ifndef _BSD_SIZE_T_ #ifndef _SIZE_T_DEFINED_ + #ifndef _SIZE_T_DEFINED #ifndef ___int_size_t_h #ifndef _GCC_SIZE_T *************** *** 134,137 **** --- 155,159 ---- #define _BSD_SIZE_T_ #define _SIZE_T_DEFINED_ + #define _SIZE_T_DEFINED #define ___int_size_t_h #define _GCC_SIZE_T *************** *** 148,151 **** --- 170,174 ---- #endif /* _GCC_SIZE_T */ #endif /* ___int_size_t_h */ + #endif /* _SIZE_T_DEFINED */ #endif /* _SIZE_T_DEFINED_ */ #endif /* _BSD_SIZE_T_ */ *************** *** 175,178 **** --- 198,202 ---- #ifndef _BSD_WCHAR_T_ #ifndef _WCHAR_T_DEFINED_ + #ifndef _WCHAR_T_DEFINED #ifndef _WCHAR_T_H #ifndef ___int_wchar_t_h *************** *** 186,189 **** --- 210,214 ---- #define _BSD_WCHAR_T_ #define _WCHAR_T_DEFINED_ + #define _WCHAR_T_DEFINED #define _WCHAR_T_H #define ___int_wchar_t_h *************** *** 225,228 **** --- 250,254 ---- #endif #endif + #endif #undef __need_wchar_t #endif /* _STDDEF_H or __need_wchar_t. */ *************** *** 232,236 **** #ifdef _ANSI_H_ /* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_ ! are probably typos and should be removed before 2.7 is released. */ #ifdef _GCC_PTRDIFF_T_ #undef _PTRDIFF_T_ --- 258,262 ---- #ifdef _ANSI_H_ /* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_ ! are probably typos and should be removed before 2.8 is released. */ #ifdef _GCC_PTRDIFF_T_ #undef _PTRDIFF_T_ *************** *** 248,257 **** --- 274,286 ---- #ifdef _GCC_PTRDIFF_T #undef _PTRDIFF_T_ + #undef _BSD_PTRDIFF_T_ #endif #ifdef _GCC_SIZE_T #undef _SIZE_T_ + #undef _BSD_SIZE_T_ #endif #ifdef _GCC_WCHAR_T #undef _WCHAR_T_ + #undef _BSD_WCHAR_T_ #endif #endif /* _ANSI_H_ */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-alpha.h gcc-2.7.0/ginclude/va-alpha.h *** gcc-2.6.3/ginclude/va-alpha.h Thu Nov 10 17:54:44 1994 --- gcc-2.7.0/ginclude/va-alpha.h Fri Jun 16 06:57:21 1995 *************** *** 46,50 **** #ifndef va_end ! #define va_end(__va) /* Values returned by __builtin_classify_type. */ --- 46,50 ---- #ifndef va_end ! #define va_end(__va) ((void) 0) /* Values returned by __builtin_classify_type. */ *************** *** 87,91 **** #define __va_tsize(__type) \ ! (((sizeof (__type) + sizeof (long) - 1) / sizeof (long)) * sizeof (long)) #define va_arg(__va, __type) \ --- 87,92 ---- #define __va_tsize(__type) \ ! (((sizeof (__type) + sizeof (long long) - 1) \ ! / sizeof (long long)) * sizeof (long long)) #define va_arg(__va, __type) \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-clipper.h gcc-2.7.0/ginclude/va-clipper.h *** gcc-2.6.3/ginclude/va-clipper.h Wed Mar 23 17:07:09 1994 --- gcc-2.7.0/ginclude/va-clipper.h Fri Apr 14 19:42:57 1995 *************** *** 40,58 **** #endif /* _STDARG_H */ ! #define __va_rounded_size(TYPE) \ ! (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) ! #define __va_round(AP,TYPE) \ ((AP).__va_ap = ((AP).__va_ap + __alignof__ (TYPE) - 1 ) & \ ! ~(__alignof__ (TYPE) - 1)) #define va_arg(AP, TYPE) \ ! ((AP).__va_num < 2 && __builtin_classify_type (* (TYPE *)0) < 12 \ ? (__builtin_classify_type (* (TYPE *)0) == 8 \ ! ? (*(TYPE *)(AP).__va_reg[2 * (AP).__va_num++ + 1]) \ ! : (*(TYPE *)(AP).__va_reg[2 * (AP).__va_num++ ])) \ ! : ((AP).__va_num++, __va_round (AP,TYPE), *((TYPE *)((AP).__va_ap))++)) ! #define va_end(AP) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ --- 40,57 ---- #endif /* _STDARG_H */ ! /* round to alignment of `type' but keep a least integer alignment */ #define __va_round(AP,TYPE) \ ((AP).__va_ap = ((AP).__va_ap + __alignof__ (TYPE) - 1 ) & \ ! ~(__alignof__ (TYPE) - 1), \ ! ((AP).__va_ap = ((AP).__va_ap + sizeof (int) - 1) & ~(sizeof (int) - 1))) #define va_arg(AP, TYPE) \ ! (*((AP).__va_num < 2 && __builtin_classify_type (* (TYPE *)0) < 12 \ ? (__builtin_classify_type (* (TYPE *)0) == 8 \ ! ? ((TYPE *)(AP).__va_reg[2 * (AP).__va_num++ + 1]) \ ! : ((TYPE *)(AP).__va_reg[2 * (AP).__va_num++ ])) \ ! : ((AP).__va_num++, __va_round (AP,TYPE), ((TYPE *)((AP).__va_ap))++))) ! #define va_end(AP) ((void) 0) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-h8300.h gcc-2.7.0/ginclude/va-h8300.h *** gcc-2.6.3/ginclude/va-h8300.h Wed Mar 23 17:07:13 1994 --- gcc-2.7.0/ginclude/va-h8300.h Fri Feb 24 21:28:22 1995 *************** *** 49,53 **** : __va_rounded_size (TYPE)))))) ! #define va_end(AP) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ --- 49,53 ---- : __va_rounded_size (TYPE)))))) ! #define va_end(AP) ((void) 0) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-i860.h gcc-2.7.0/ginclude/va-i860.h *** gcc-2.6.3/ginclude/va-i860.h Wed Mar 23 17:07:17 1994 --- gcc-2.7.0/ginclude/va-i860.h Fri Feb 24 21:28:25 1995 *************** *** 94,98 **** void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(__va) #define __NUM_PARM_FREGS 8 --- 94,98 ---- void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(__va) ((void) 0) #define __NUM_PARM_FREGS 8 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-i960.h gcc-2.7.0/ginclude/va-i960.h *** gcc-2.6.3/ginclude/va-i960.h Thu Oct 20 16:09:44 1994 --- gcc-2.7.0/ginclude/va-i960.h Wed Mar 22 21:40:27 1995 *************** *** 37,43 **** #ifdef _STDARG_H #define va_start(AP, LASTARG) \ __extension__ \ ! ({ __asm__ ("st g14,%0" : "=m" (*(AP))); \ (AP)[1] = (__builtin_args_info (0) + __builtin_args_info (1)) * 4; }) --- 37,46 ---- #ifdef _STDARG_H + /* Call __builtin_next_arg even though we aren't using its value, so that + we can verify that firstarg is correct. */ #define va_start(AP, LASTARG) \ __extension__ \ ! ({ __builtin_next_arg (LASTARG); \ ! __asm__ ("st g14,%0" : "=m" (*(AP))); \ (AP)[1] = (__builtin_args_info (0) + __builtin_args_info (1)) * 4; }) *************** *** 46,50 **** #define va_alist __builtin_va_alist #define va_dcl char *__builtin_va_alist; __va_ellipsis ! #define va_start(AP) ((AP)[1] = 0, *(AP) = (unsigned) &va_alist) #endif --- 49,56 ---- #define va_alist __builtin_va_alist #define va_dcl char *__builtin_va_alist; __va_ellipsis ! #define va_start(AP) \ ! __extension__ \ ! ({ __asm__ ("st g14,%0" : "=m" (*(AP))); \ ! (AP)[1] = (__builtin_args_info (0) + __builtin_args_info (1)) * 4; }) #endif *************** *** 65,69 **** void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(AP) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ --- 71,75 ---- void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(AP) ((void *)0) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-m88k.h gcc-2.7.0/ginclude/va-m88k.h *** gcc-2.6.3/ginclude/va-m88k.h Wed Apr 6 07:45:04 1994 --- gcc-2.7.0/ginclude/va-m88k.h Fri Feb 24 21:28:31 1995 *************** *** 80,84 **** + ((AP).__va_arg - __va_size(TYPE))))) ! #define va_end(AP) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ --- 80,84 ---- + ((AP).__va_arg - __va_size(TYPE))))) ! #define va_end(AP) ((void)0) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-mips.h gcc-2.7.0/ginclude/va-mips.h *** gcc-2.6.3/ginclude/va-mips.h Mon Oct 17 19:28:32 1994 --- gcc-2.7.0/ginclude/va-mips.h Fri Feb 24 21:28:34 1995 *************** *** 30,34 **** #endif ! #if __mips==3 #define __va_rounded_size(__TYPE) \ (((sizeof (__TYPE) + 8 - 1) / 8) * 8) --- 30,34 ---- #endif ! #if __mips>=3 #define __va_rounded_size(__TYPE) \ (((sizeof (__TYPE) + 8 - 1) / 8) * 8) *************** *** 38,48 **** #endif #ifdef _STDARG_H #define va_start(__AP, __LASTARG) \ (__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG)) #else #define va_alist __builtin_va_alist ! #if __mips==3 /* This assumes that `long long int' is always a 64 bit type. */ #define va_dcl long long int __builtin_va_alist; __va_ellipsis --- 38,59 ---- #endif + /* Get definitions for _MIPS_SIM_ABI64 etc. */ + #ifdef _MIPS_SIM + #include + #endif + #ifdef _STDARG_H + #if defined(_MIPS_SIM) && (_MIPS_SIM == _MIPS_SIM_ABI64) + #define va_start(__AP, __LASTARG) \ + (__AP = __builtin_next_arg (__LASTARG) - 64 \ + + (__builtin_args_info (2) > 8 ? 64 : __builtin_args_info(2) * 8)) + #else #define va_start(__AP, __LASTARG) \ (__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG)) + #endif #else #define va_alist __builtin_va_alist ! #if __mips>=3 /* This assumes that `long long int' is always a 64 bit type. */ #define va_dcl long long int __builtin_va_alist; __va_ellipsis *************** *** 50,80 **** #define va_dcl int __builtin_va_alist; __va_ellipsis #endif #define va_start(__AP) __AP = (char *) &__builtin_va_alist #endif #ifndef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(__AP) /* We cast to void * and then to TYPE * because this avoids a warning about increasing the alignment requirement. */ ! /* The __mips==3 cases are reversed from the 32 bit cases, because the standard 32 bit calling convention left-aligns all parameters smaller than a word, ! whereas the __mips==3 calling convention does not (and hence they are right aligned). */ ! #if __mips==3 #ifdef __MIPSEB__ #define va_arg(__AP, __type) \ ! ((__type *) (void *) (__AP = (char *) ((((int)__AP + 8 - 1) & -8) \ + __va_rounded_size (__type))))[-1] #else #define va_arg(__AP, __type) \ ! ((__AP = (char *) ((((int)__AP + 8 - 1) & -8) \ + __va_rounded_size (__type))), \ *(__type *) (void *) (__AP - __va_rounded_size (__type))) #endif ! #else /* not __mips==3 */ #ifdef __MIPSEB__ --- 61,99 ---- #define va_dcl int __builtin_va_alist; __va_ellipsis #endif + /* Need alternate code for _MIPS_SIM_ABI64, but don't use that symbol + because it may not be defined. */ + #if defined(_MIPS_SIM) && (_MIPS_SIM == _MIPS_SIM_ABI64) + #define va_start(__AP) \ + (__AP = __builtin_next_arg () - 64 \ + + (__builtin_args_info (2) > 8 ? 64 : __builtin_args_info(2) * 8)) + #else #define va_start(__AP) __AP = (char *) &__builtin_va_alist #endif + #endif #ifndef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(__AP) ((void)0) /* We cast to void * and then to TYPE * because this avoids a warning about increasing the alignment requirement. */ ! /* The __mips>=3 cases are reversed from the 32 bit cases, because the standard 32 bit calling convention left-aligns all parameters smaller than a word, ! whereas the __mips>=3 calling convention does not (and hence they are right aligned). */ ! #if __mips>=3 #ifdef __MIPSEB__ #define va_arg(__AP, __type) \ ! ((__type *) (void *) (__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ + __va_rounded_size (__type))))[-1] #else #define va_arg(__AP, __type) \ ! ((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ + __va_rounded_size (__type))), \ *(__type *) (void *) (__AP - __va_rounded_size (__type))) #endif ! #else /* not __mips>=3 */ #ifdef __MIPSEB__ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-pa.h gcc-2.7.0/ginclude/va-pa.h *** gcc-2.6.3/ginclude/va-pa.h Wed Mar 23 17:07:35 1994 --- gcc-2.7.0/ginclude/va-pa.h Fri Apr 14 19:43:01 1995 *************** *** 34,49 **** #define va_arg(AP,TYPE) \ ! (sizeof(TYPE) > 8 ? \ ((AP = (__gnuc_va_list) ((char *)AP - sizeof (int))), \ ! (*((TYPE *) (void *) (*((int *) (AP)))))) \ :((AP = \ (__gnuc_va_list) ((long)((char *)AP - sizeof (TYPE)) \ & (sizeof(TYPE) > 4 ? ~0x7 : ~0x3))), \ ! (*((TYPE *) (void *) ((char *)AP + ((8 - sizeof(TYPE)) % 4)))))) #ifndef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(AP) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ --- 34,49 ---- #define va_arg(AP,TYPE) \ ! (*(sizeof(TYPE) > 8 ? \ ((AP = (__gnuc_va_list) ((char *)AP - sizeof (int))), \ ! (((TYPE *) (void *) (*((int *) (AP)))))) \ :((AP = \ (__gnuc_va_list) ((long)((char *)AP - sizeof (TYPE)) \ & (sizeof(TYPE) > 4 ? ~0x7 : ~0x3))), \ ! (((TYPE *) (void *) ((char *)AP + ((8 - sizeof(TYPE)) % 4))))))) #ifndef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #endif ! #define va_end(AP) ((void)0) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-pyr.h gcc-2.7.0/ginclude/va-pyr.h *** gcc-2.6.3/ginclude/va-pyr.h Mon Dec 20 19:31:05 1993 --- gcc-2.7.0/ginclude/va-pyr.h Fri Apr 14 19:43:07 1995 *************** *** 112,116 **** #define va_arg(_AP, _MODE) \ __extension__ \ ! ({__voidptr *__ap = (__voidptr*)&_AP; \ register int __size = sizeof (_MODE); \ register int __onstack = \ --- 112,116 ---- #define va_arg(_AP, _MODE) \ __extension__ \ ! (*({__voidptr *__ap = (__voidptr*)&_AP; \ register int __size = sizeof (_MODE); \ register int __onstack = \ *************** *** 122,130 **** if (__onstack==0 || (int)(__ap[2])==11) \ __ap[2]+= (__size >> 2); \ ! *(( _MODE *) (void *) __param_addr); \ ! }) void va_end (__gnuc_va_list); /* Defined in libgcc.a */ ! #define va_end(_X) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ --- 122,130 ---- if (__onstack==0 || (int)(__ap[2])==11) \ __ap[2]+= (__size >> 2); \ ! (( _MODE *) (void *) __param_addr); \ ! })) void va_end (__gnuc_va_list); /* Defined in libgcc.a */ ! #define va_end(_X) ((void)0) #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-sparc.h gcc-2.7.0/ginclude/va-sparc.h *** gcc-2.6.3/ginclude/va-sparc.h Wed Aug 3 21:32:54 1994 --- gcc-2.7.0/ginclude/va-sparc.h Fri Apr 14 19:43:11 1995 *************** *** 117,121 **** #endif ! #define va_end(pvar) /* Avoid errors if compiling GCC v2 with GCC v1. */ --- 117,121 ---- #endif ! #define va_end(pvar) ((void)0) /* Avoid errors if compiling GCC v2 with GCC v1. */ *************** *** 133,137 **** #define va_arg(pvar,TYPE) \ __extension__ \ ! ({int __type = __builtin_classify_type (* (TYPE *) 0); \ void * __result; \ if (__type == __real_type_class) /* float? */ \ --- 133,137 ---- #define va_arg(pvar,TYPE) \ __extension__ \ ! (*({int __type = __builtin_classify_type (* (TYPE *) 0); \ void * __result; \ if (__type == __real_type_class) /* float? */ \ *************** *** 171,175 **** __result = *__r; \ } \ ! *(TYPE *) __result;}) #else /* not __sparc_v9__ */ --- 171,175 ---- __result = *__r; \ } \ ! (TYPE *) __result;})) #else /* not __sparc_v9__ */ *************** *** 185,192 **** #define va_arg(pvar,TYPE) \ __extension__ \ ! ({ TYPE __va_temp; \ ! ((__builtin_classify_type (__va_temp) >= __record_type_class) \ ? ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE *), \ ! **(TYPE **) (void *) ((char *)(pvar) - __va_rounded_size (TYPE *))) \ : __va_rounded_size (TYPE) == 8 \ ? ({ union {char __d[sizeof (TYPE)]; int __i[2];} __u; \ --- 185,191 ---- #define va_arg(pvar,TYPE) \ __extension__ \ ! (*({((__builtin_classify_type (*(TYPE*) 0) >= __record_type_class) \ ? ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE *), \ ! *(TYPE **) (void *) ((char *)(pvar) - __va_rounded_size (TYPE *))) \ : __va_rounded_size (TYPE) == 8 \ ? ({ union {char __d[sizeof (TYPE)]; int __i[2];} __u; \ *************** *** 194,200 **** __u.__i[1] = ((int *) (void *) (pvar))[1]; \ (pvar) = (char *)(pvar) + 8; \ ! *(TYPE *) (void *) __u.__d; }) \ : ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE), \ ! *((TYPE *) (void *) ((char *)(pvar) - __va_rounded_size (TYPE)))));}) #endif /* not __sparc_v9__ */ --- 193,199 ---- __u.__i[1] = ((int *) (void *) (pvar))[1]; \ (pvar) = (char *)(pvar) + 8; \ ! (TYPE *) (void *) __u.__d; }) \ : ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE), \ ! ((TYPE *) (void *) ((char *)(pvar) - __va_rounded_size (TYPE)))));})) #endif /* not __sparc_v9__ */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/va-spur.h gcc-2.7.0/ginclude/va-spur.h *** gcc-2.6.3/ginclude/va-spur.h Mon Dec 20 19:31:10 1993 --- gcc-2.7.0/ginclude/va-spur.h Fri Apr 14 19:43:14 1995 *************** *** 30,34 **** ((pvar).__pnt = 0, (pvar).__regs = __va_regs.__regs, \ (pvar).__stack = (char *) &__va_stack) ! #define va_end(pvar) /* Avoid errors if compiling GCC v2 with GCC v1. */ --- 30,34 ---- ((pvar).__pnt = 0, (pvar).__regs = __va_regs.__regs, \ (pvar).__stack = (char *) &__va_stack) ! #define va_end(pvar) ((void)0) /* Avoid errors if compiling GCC v2 with GCC v1. */ *************** *** 39,49 **** #define va_arg(pvar,type) \ __extension__ \ ! ({ type __va_result; \ if ((pvar).__pnt >= 20) { \ ! __va_result = *( (type *) ((pvar).__stack + (pvar).__pnt - 20)); \ (pvar).__pnt += (sizeof(type) + 7) & ~7; \ } \ else if ((pvar).__pnt + sizeof(type) > 20) { \ ! __va_result = * (type *) (pvar).__stack; \ (pvar).__pnt = 20 + ( (sizeof(type) + 7) & ~7); \ } \ --- 39,49 ---- #define va_arg(pvar,type) \ __extension__ \ ! (*({ type *__va_result; \ if ((pvar).__pnt >= 20) { \ ! __va_result = ( (type *) ((pvar).__stack + (pvar).__pnt - 20)); \ (pvar).__pnt += (sizeof(type) + 7) & ~7; \ } \ else if ((pvar).__pnt + sizeof(type) > 20) { \ ! __va_result = (type *) (pvar).__stack; \ (pvar).__pnt = 20 + ( (sizeof(type) + 7) & ~7); \ } \ *************** *** 52,61 **** __u.i[0] = *(int *) ((pvar).__regs + (pvar).__pnt); \ __u.i[1] = *(int *) ((pvar).__regs + (pvar).__pnt + 4); \ ! __va_result = * (type *) &__u; \ (pvar).__pnt += 8; \ } \ else { \ ! __va_result = * (type *) ((pvar).__regs + (pvar).__pnt); \ (pvar).__pnt += (sizeof(type) + 3) & ~3; \ } \ ! __va_result; }) --- 52,61 ---- __u.i[0] = *(int *) ((pvar).__regs + (pvar).__pnt); \ __u.i[1] = *(int *) ((pvar).__regs + (pvar).__pnt + 4); \ ! __va_result = (type *) &__u; \ (pvar).__pnt += 8; \ } \ else { \ ! __va_result = (type *) ((pvar).__regs + (pvar).__pnt); \ (pvar).__pnt += (sizeof(type) + 3) & ~3; \ } \ ! __va_result; })) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/ginclude/varargs.h gcc-2.7.0/ginclude/varargs.h *** gcc-2.6.3/ginclude/varargs.h Fri Jul 8 22:04:32 1994 --- gcc-2.7.0/ginclude/varargs.h Sun Apr 30 08:10:30 1995 *************** *** 85,89 **** #define va_start(AP) AP=(char *) &__builtin_va_alist ! #define va_end(AP) #if defined(sysV68) --- 85,89 ---- #define va_start(AP) AP=(char *) &__builtin_va_alist ! #define va_end(AP) ((void)0) #if defined(sysV68) *************** *** 104,110 **** #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ ! *((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4 \ ! ? sizeof (TYPE) \ ! : __va_rounded_size (TYPE)))))) #endif /* big-endian */ --- 104,110 ---- #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ ! *((TYPE *) (void *) ((char *) (AP) \ ! - ((sizeof (TYPE) < __va_rounded_size (char) \ ! ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) #endif /* big-endian */ *************** *** 152,168 **** Sequent defines _VA_LIST_ in to be the type to use for va_list (``typedef _VA_LIST_ va_list'') */ ! #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) /* The macro _VA_LIST is used in SCO Unix 3.2. */ #ifndef _VA_LIST /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ #ifndef _VA_LIST_T_H ! #define _VA_LIST_T_H #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) #define _VA_LIST_ #endif #define _VA_LIST ! typedef __gnuc_va_list va_list; ! #endif /* not _VA_LIST_T_H */ ! #endif /* not _VA_LIST */ #endif /* not _VA_LIST_, except on certain systems */ --- 152,179 ---- Sequent defines _VA_LIST_ in to be the type to use for va_list (``typedef _VA_LIST_ va_list'') */ ! #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) ! /* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ ! #ifndef _VA_LIST_DEFINED /* The macro _VA_LIST is used in SCO Unix 3.2. */ #ifndef _VA_LIST /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ #ifndef _VA_LIST_T_H ! typedef __gnuc_va_list va_list; ! #endif /* not _VA_LIST_T_H */ ! #endif /* not _VA_LIST */ ! #endif /* not _VA_LIST_DEFINED */ #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) #define _VA_LIST_ #endif + #ifndef _VA_LIST #define _VA_LIST ! #endif ! #ifndef _VA_LIST_DEFINED ! #define _VA_LIST_DEFINED ! #endif ! #ifndef _VA_LIST_T_H ! #define _VA_LIST_T_H ! #endif ! #endif /* not _VA_LIST_, except on certain systems */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/global.c gcc-2.7.0/global.c *** gcc-2.6.3/global.c Fri Sep 16 19:21:08 1994 --- gcc-2.7.0/global.c Thu Jun 15 07:44:32 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/gsyslimits.h gcc-2.7.0/gsyslimits.h *** gcc-2.6.3/gsyslimits.h Thu Sep 24 02:58:53 1992 --- gcc-2.7.0/gsyslimits.h Thu Dec 22 12:50:12 1994 *************** *** 4,6 **** --- 4,8 ---- instead of this text. */ + #define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */ #include_next + #undef _GCC_NEXT_LIMITS_H diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/halfpic.c gcc-2.7.0/halfpic.c *** gcc-2.6.3/halfpic.c Fri Oct 8 15:16:47 1993 --- gcc-2.7.0/halfpic.c Thu Jun 15 07:44:57 1995 *************** *** 16,20 **** 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. */ /* The OSF/rose half-pic model assumes that the non-library code does --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* The OSF/rose half-pic model assumes that the non-library code does diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/halfpic.h gcc-2.7.0/halfpic.h *** gcc-2.6.3/halfpic.h Tue Apr 12 21:39:58 1994 --- gcc-2.7.0/halfpic.h Thu Jun 15 07:45:09 1995 *************** *** 16,20 **** 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. */ #ifndef NO_HALF_PIC --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef NO_HALF_PIC diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/hard-reg-set.h gcc-2.7.0/hard-reg-set.h *** gcc-2.6.3/hard-reg-set.h Sat May 14 21:16:56 1994 --- gcc-2.7.0/hard-reg-set.h Thu Jun 15 07:45:29 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/input.h gcc-2.7.0/input.h *** gcc-2.6.3/input.h Fri Mar 26 19:18:21 1993 --- gcc-2.7.0/input.h Thu Jun 15 07:45:48 1995 *************** *** 18,22 **** 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. */ /* Source file current line is coming from. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Source file current line is coming from. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/install.sh gcc-2.7.0/install.sh *** gcc-2.6.3/install.sh Mon Nov 14 18:17:27 1994 --- gcc-2.7.0/install.sh Mon May 15 23:05:05 1995 *************** *** 1,3 **** ! #!/bin/sh # # install - install a program, script, or datafile --- 1,3 ---- ! #! /bin/sh # # install - install a program, script, or datafile *************** *** 30,34 **** mkdirprog="${MKDIRPROG-mkdir}" ! tranformbasename="" transform_arg="" instcmd="$mvprog" --- 30,34 ---- mkdirprog="${MKDIRPROG-mkdir}" ! transformbasename="" transform_arg="" instcmd="$mvprog" diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/install.texi gcc-2.7.0/install.texi *** gcc-2.6.3/install.texi Mon Nov 28 18:32:22 1994 --- gcc-2.7.0/install.texi Fri Jun 16 15:42:32 1995 *************** *** 1,3 **** ! @c Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,3 ---- ! @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 71,75 **** Here is an example: ! @smallexample ./configure --build=sparc-sun-sunos4.1 @end smallexample --- 71,78 ---- Here is an example: ! from an MSDOS console window or from the program manager dialog box. ! Configure.bat assumes that you have already installed and in your path a ! Unix-like sed program which is used to modify Makefile.in to create a ! working Makefile.@smallexample ./configure --build=sparc-sun-sunos4.1 @end smallexample *************** *** 97,101 **** See @ref{Configurations}, for a list of supported configuration names and notes on many of the configurations. You should check the notes in that ! section before proceding any further with the installation of GNU CC. There are four additional options you can specify independently to --- 100,104 ---- See @ref{Configurations}, for a list of supported configuration names and notes on many of the configurations. You should check the notes in that ! section before proceeding any further with the installation of GNU CC. There are four additional options you can specify independently to *************** *** 126,131 **** @samp{m68k-sony-bsd},@* @samp{m68k-altos-sysv}, @samp{m68000-hp-hpux}, @samp{m68000-att-sysv}, ! and @samp{mips-@var{any}}). On any other system, @samp{--with-gnu-as} ! has no effect. On the systems listed above (except for the HP-PA, for ISC on the --- 129,134 ---- @samp{m68k-sony-bsd},@* @samp{m68k-altos-sysv}, @samp{m68000-hp-hpux}, @samp{m68000-att-sysv}, ! @samp{@var{any}-lynx-lynxos}, and @samp{mips-@var{any}}). ! On any other system, @samp{--with-gnu-as} has no effect. On the systems listed above (except for the HP-PA, for ISC on the *************** *** 395,399 **** @smallexample make stage2 ! make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" @end smallexample --- 398,402 ---- @smallexample make stage2 ! make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" @end smallexample *************** *** 536,542 **** @c gmicro, alliant, spur and tahoe omitted since they don't work. 1750a, a29k, alpha, arm, c@var{n}, clipper, dsp16xx, elxsi, h8300, ! hppa1.0, hppa1.1, i370, i386, i486, i860, i960, m68000, m68k, m88k, ! mips, ns32k, powerpc, pyramid, romp, rs6000, sh, sparc, sparclite, ! sparc64, vax, we32k. @end quotation --- 539,545 ---- @c gmicro, alliant, spur and tahoe omitted since they don't work. 1750a, a29k, alpha, arm, c@var{n}, clipper, dsp16xx, elxsi, h8300, ! hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m68000, m68k, ! m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, powerpcle, ! pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, vax, we32k. @end quotation *************** *** 550,554 **** elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus, ! sequent, sgi, sony, sun, tti, unicom. @end quotation --- 553,557 ---- elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus, ! sequent, sgi, sony, sun, tti, unicom, wrs. @end quotation *************** *** 561,570 **** @quotation ! 386bsd, aix, acis, amigados, aos, aout, bosx, bsd, clix, ctix, cxux, ! dgux, dynix, ebmon, elf, esix, freebsd, hms, genix, gnu, gnu/linux, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs, ! netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, ! solaris, sunos, sym, sysv, ultrix, unicos, uniplus, unos, vms, vxworks, ! xenix. @end quotation --- 564,573 ---- @quotation ! 386bsd, aix, acis, amigados, aos, aout, bosx, bsd, clix, coff, ctix, cxux, ! dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, gnu/linux, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs, ! netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, sim, ! solaris, sunos, sym, sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta, ! vxworks, winnt, xenix. @end quotation *************** *** 602,606 **** m3230, magnum, merlin, miniframe, mmax, news-3600, news800, news, next, ! pbd, pc532, pmax, powerpc, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3, sun4, symmetry, tower-32, tower. --- 605,609 ---- m3230, magnum, merlin, miniframe, mmax, news-3600, news800, news, next, ! pbd, pc532, pmax, powerpc, powerpcle, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3, sun4, symmetry, tower-32, tower. *************** *** 879,886 **** have a higher-quality port for this machine soon. ! @item i386-*-gnu/linux ! Bash-1.12 has a bug that causes configure to fail. The symptom is that ! the c++ subdirectory, @file{cp}, is not configured. Bash-1.14 and later ! work fine. @item i386-*-sco --- 882,898 ---- have a higher-quality port for this machine soon. ! @item i386-*-linuxoldld ! Use this configuration to generate a.out binaries on Linux if you do not ! have gas/binutils version 2.5.2 or later installed. This is an obsolete ! configuration. ! ! @item i386-*-linuxaout ! Use this configuration to generate a.out binaries on Linux. This is an ! obsolete configuration. You must use gas/binutils version 2.5.2 or ! later. ! ! @item i386-*-linux ! Use this configuration to generate ELF binaries on Linux. You must ! use gas/binutils version 2.5.2 or later. @item i386-*-sco *************** *** 888,892 **** link with GNU malloc instead of the malloc that comes with the system. ! @item i386-*-sco3.2.4 Use this configuration for SCO release 3.2 version 4. --- 900,904 ---- link with GNU malloc instead of the malloc that comes with the system. ! @item i386-*-sco3.2v4 Use this configuration for SCO release 3.2 version 4. *************** *** 927,930 **** --- 939,988 ---- systems. + @item i[345]86-*-winnt3.5 + This version requires a GAS that has not let been released. Until it + is, you can get a prebuilt binary version via anonymous ftp from + @file{cs.washington.edu:pub/gnat} or @file{cs.nyu.edu:pub/gnat}. You + must also use the Microsoft header files from the Windows NT 3.5 SDK. + Find these on the CDROM in the @file{/mstools/h} directory dated 9/4/94. You + must use a fixed version of Microsoft linker made especially for NT 3.5, + which is also is available on the NT 3.5 SDK CDROM. If you do not have + this linker, can you also use the linker from Visual C/C++ 1.0 or 2.0. + + Installing GNU CC for NT builds a wrapper linker, called @file{ld.exe}, + which mimics the behaviour of Unix @file{ld} in the specification of + libraries (@samp{-L} and @samp{-l}). @file{ld.exe} looks for both Unix + and Microsoft named libraries. For example, if you specify + @samp{-lfoo}, @file{ld.exe} will look first for @file{libfoo.a} + and then for @file{foo.lib}. + + You may install GNU CC for Windows NT in one of two ways, depending on + whether or not you have a Unix-like shell and various Unix-like + utilities. + + @enumerate + @item + If you do not have a Unix-like shell and few Unix-like utilities, you + will use a DOS style batch script called @file{configure.bat}. Invoke + it as @code{configure winnt} from an MSDOS console window or from the + program manager dialog box. @file{configure.bat} assumes you have + already installed and have in your path a Unix-like @file{sed} program + which is used to create a working @file{Makefile} from @file{Makefile.in}. + + @file{Makefile} uses the Microsoft Nmake program maintenance utility and + the Visual C/C++ V8.00 compiler to build GNU CC. You need only have the + utilities @file{sed} and @file{touch} to use this installation method, + which only automatically builds the compiler itself. You must then + examine what @file{fixinc.winnt} does, edit the header files by hand and + build @file{libgcc.a} manually. + + @item + The second type of installation assumes you are running a Unix-like + shell, have a complete suite of Unix-like utilities in your path, and + have a previous version of GNU CC already installed, either through + building it via the above installation method or acquiring a pre-built + binary. In this case, use the @file{configure} script in the normal + fashion. + @end enumerate + @item i860-intel-osf1 This is the Paragon. *************** *** 941,944 **** --- 999,1010 ---- @end ifclear + @item *-lynx-lynxos + LynxOS 2.2 and earlier comes with GNU CC 1.x already installed as + @file{/bin/gcc}. You should compile with this instead of @file{/bin/cc}. + You can tell GNU CC to use the GNU assembler and linker, by specifying + @samp{--with-gnu-as --with-gnu-ld} when configuring. These will produce + COFF format object files and executables; otherwise GNU CC will use the + installed tools, which produce a.out format executables. + @item m68000-hp-bsd HP 9000 series 200 running BSD. Note that the C compiler that comes *************** *** 1154,1157 **** --- 1220,1227 ---- This is found on the 2nd CD in release 4.0.1. + In order to compile GCC on an SGI running IRIX 5, the "compiler_dev.hdr" + subsystem must be installed from the IDO CD-ROM supplied by Silicon + Graphics. + @code{make compare} may fail on version 5 of IRIX unless you add @samp{-save-temps} to @code{CFLAGS}. On these systems, the name of the *************** *** 1191,1195 **** To enable debugging under Irix 5, you must use GNU as 2.5 or later, ! and use the --with-gnu-as configure option when configuring gcc. GNU as is distributed as part of the binutils package. --- 1261,1265 ---- To enable debugging under Irix 5, you must use GNU as 2.5 or later, ! and use the @samp{--with-gnu-as} configure option when configuring gcc. GNU as is distributed as part of the binutils package. *************** *** 1256,1259 **** --- 1326,1347 ---- "C" or "En_US". + @item powerpc-*-elf + @itemx powerpc-*-sysv4 + PowerPC system in big endian mode, running System V.4. This system is + currently under development. + + @item powerpc-*-eabi + Embedded PowerPC system in big endian mode. This system is currently + under development. + + @item powerpcle-*-elf + @itemx powerpcle-*-eabi + PowerPC system in little endian mode, running System V.4. This system + is currently under development. + + @itemx powerpcle-*-sysv4 + Embedded PowerPC system in little endian mode. This system is currently + under development. + @item vax-dec-ultrix Don't try compiling with Vax C (@code{vcc}). It produces incorrect code *************** *** 1553,1557 **** To compile @file{libgcc1.c} with the cross-compiler itself does not work. The functions in this file are supposed to implement arithmetic ! operations that GNU CC does not know how to open code, for your target machine. If these functions are compiled with GNU CC itself, they will compile into infinite recursion. --- 1641,1645 ---- To compile @file{libgcc1.c} with the cross-compiler itself does not work. The functions in this file are supposed to implement arithmetic ! operations that GNU CC does not know how to open code for your target machine. If these functions are compiled with GNU CC itself, they will compile into infinite recursion. *************** *** 1579,1582 **** --- 1667,1677 ---- conveniently. That depends on whether someone wants to implement it. + Some embedded targets come with all the necessary @file{libgcc1.a} + routines written in C or assembler. These targets build + @file{libgcc1.a} automatically and you do not need to do anything + special for them. Other embedded targets do not need any + @file{libgcc1.a} routines since all the necessary operations are + supported by the hardware. + If your target system has another C compiler, you can configure GNU CC as a native compiler on that machine, build just @file{libgcc1.a} with *************** *** 1675,1691 **** where it needs that file, printing a suitable error message. If you do provide @file{libgcc1.a}, then building the compiler will automatically ! compile and link a test program called @file{cross-test}; if you get errors in the linking, it means that not all of the necessary routines in @file{libgcc1.a} are available. ! If you are making a cross-compiler for an embedded system, and there is ! no @file{stdio.h} header for it, then the compilation of @file{enquire} ! will probably fail. The job of @file{enquire} is to run on the target ! machine and figure out by experiment the nature of its floating point ! representation. @file{enquire} records its findings in the header file ! @file{float.h}. If you can't produce this file by running ! @file{enquire} on the target machine, then you will need to come up with ! a suitable @file{float.h} in some other way (or else, avoid using it in ! your programs). Do not try to build stage 2 for a cross-compiler. It doesn't work to --- 1770,1785 ---- where it needs that file, printing a suitable error message. If you do provide @file{libgcc1.a}, then building the compiler will automatically ! compile and link a test program called @file{libgcc1-test}; if you get errors in the linking, it means that not all of the necessary routines in @file{libgcc1.a} are available. ! You must provide the header file @file{float.h}. One way to do this is ! to compile @file{enquire} and run it on your target machine. The job of ! @file{enquire} is to run on the target machine and figure out by ! experiment the nature of its floating point representation. ! @file{enquire} records its findings in the header file @file{float.h}. ! If you can't produce this file by running @file{enquire} on the target ! machine, then you will need to come up with a suitable @file{float.h} in ! some other way (or else, avoid using it in your programs). Do not try to build stage 2 for a cross-compiler. It doesn't work to diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/integrate.c gcc-2.7.0/integrate.c *** gcc-2.6.3/integrate.c Fri Aug 19 17:30:19 1994 --- gcc-2.7.0/integrate.c Thu Jun 15 07:46:08 1995 *************** *** 1,4 **** /* Procedure integration for GNU CC. ! Copyright (C) 1988, 1991, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Procedure integration for GNU CC. ! Copyright (C) 1988, 1991, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 131,134 **** --- 132,140 ---- return "inline functions not supported for this return value type"; + /* We can't inline functions that return BLKmode structures in registers. */ + if (TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))) == BLKmode + && ! aggregate_value_p (TREE_TYPE (TREE_TYPE (fndecl)))) + return "inline functions not supported for this return value type"; + /* We can't inline functions that return structures of varying size. */ if (int_size_in_bytes (TREE_TYPE (TREE_TYPE (fndecl))) < 0) *************** *** 320,324 **** current_function_args_size, current_function_pops_args, ! stack_slot_list, function_flags, current_function_outgoing_args_size, arg_vector, (rtx) DECL_INITIAL (fndecl)); --- 326,330 ---- current_function_args_size, current_function_pops_args, ! stack_slot_list, forced_labels, function_flags, current_function_outgoing_args_size, arg_vector, (rtx) DECL_INITIAL (fndecl)); *************** *** 338,342 **** DECL_SAVED_INSNS (fndecl) = head; DECL_FRAME_SIZE (fndecl) = get_frame_size (); - DECL_INLINE (fndecl) = 1; } --- 344,347 ---- *************** *** 376,379 **** --- 381,389 ---- DECL_INITIAL and DECL_ARGUMENTS; here we copy them. */ + /* ??? The nonlocal_label list should be adjusted also. However, since + a function that contains a nested function never gets inlined currently, + the nonlocal_label list will always be empty, so we don't worry about + it for now. */ + void save_for_inline_copying (fndecl) *************** *** 1163,1166 **** --- 1173,1177 ---- rtx local_return_label = 0; rtx loc; + rtx stack_save = 0; rtx temp; struct inline_remap *map; *************** *** 1217,1228 **** pushlevel (0); expand_start_bindings (0); - if (GET_CODE (parm_insns) == NOTE - && NOTE_LINE_NUMBER (parm_insns) > 0) - { - rtx note = emit_note (NOTE_SOURCE_FILE (parm_insns), - NOTE_LINE_NUMBER (parm_insns)); - if (note) - RTX_INTEGRATED_P (note) = 1; - } /* Expand the function arguments. Do this first so that any --- 1228,1231 ---- *************** *** 1243,1256 **** int invisiref = 0; - /* Make sure this formal has some correspondence in the users code - * before emitting any line notes for it. */ - if (DECL_SOURCE_LINE (formal)) - { - rtx note = emit_note (DECL_SOURCE_FILE (formal), - DECL_SOURCE_LINE (formal)); - if (note) - RTX_INTEGRATED_P (note) = 1; - } - arg_trees[i] = arg; loc = RTVEC_ELT (arg_vector, i); --- 1246,1249 ---- *************** *** 1266,1269 **** --- 1259,1263 ---- = assign_stack_temp (TYPE_MODE (TREE_TYPE (arg)), int_size_in_bytes (TREE_TYPE (arg)), 1); + MEM_IN_STRUCT_P (stack_slot) = AGGREGATE_TYPE_P (TREE_TYPE (arg)); store_expr (arg, stack_slot, 0); *************** *** 1374,1377 **** --- 1368,1380 ---- static_chain_value = lookup_static_chain (fndecl); + if (GET_CODE (parm_insns) == NOTE + && NOTE_LINE_NUMBER (parm_insns) > 0) + { + rtx note = emit_note (NOTE_SOURCE_FILE (parm_insns), + NOTE_LINE_NUMBER (parm_insns)); + if (note) + RTX_INTEGRATED_P (note) = 1; + } + /* Process each argument. For each, set up things so that the function's reference to the argument will refer to the argument being passed. *************** *** 1644,1647 **** --- 1647,1657 ---- global_const_equiv_map_size = map->const_equiv_map_size; + /* If the called function does an alloca, save and restore the + stack pointer around the call. This saves stack space, but + also is required if this inline is being done between two + pushes. */ + if (FUNCTION_FLAGS (header) & FUNCTION_FLAGS_CALLS_ALLOCA) + emit_stack_save (SAVE_BLOCK, &stack_save, NULL_RTX); + /* Now copy the insns one by one. Do this in two passes, first the insns and then their REG_NOTES, just like save_for_inline. */ *************** *** 1864,1867 **** --- 1874,1881 ---- emit_label (local_return_label); + /* Restore the stack pointer if we saved it above. */ + if (FUNCTION_FLAGS (header) & FUNCTION_FLAGS_CALLS_ALLOCA) + emit_stack_restore (SAVE_BLOCK, stack_save, NULL_RTX); + /* Make copies of the decls of the symbols in the inline function, so that the copies of the variables get declared in the current function. Set *************** *** 2178,2182 **** /* If we have made a nonlocal label local, it means that this ! inlined call will be refering to our nonlocal goto handler. So make sure we create one for this block; we normally would not since this is not otherwise considered a "call". */ --- 2192,2196 ---- /* If we have made a nonlocal label local, it means that this ! inlined call will be referring to our nonlocal goto handler. So make sure we create one for this block; we normally would not since this is not otherwise considered a "call". */ *************** *** 2253,2259 **** The only ADDRESS rtx's that can reach here are ones created by ! save_constants. Hence the operand of the ADDRESS is always legal in this position of the instruction, since the original rtx without ! the ADDRESS was legal. The reason we don't legitimize the address here is that on the --- 2267,2273 ---- The only ADDRESS rtx's that can reach here are ones created by ! save_constants. Hence the operand of the ADDRESS is always valid in this position of the instruction, since the original rtx without ! the ADDRESS was valid. The reason we don't legitimize the address here is that on the *************** *** 2612,2621 **** && (CONSTANT_P (src) || (GET_CODE (src) == REG ! && REGNO (src) >= FIRST_VIRTUAL_REGISTER ! && REGNO (src) <= LAST_VIRTUAL_REGISTER) || (GET_CODE (src) == PLUS && GET_CODE (XEXP (src, 0)) == REG ! && REGNO (XEXP (src, 0)) >= FIRST_VIRTUAL_REGISTER ! && REGNO (XEXP (src, 0)) <= LAST_VIRTUAL_REGISTER && CONSTANT_P (XEXP (src, 1))) || GET_CODE (src) == COMPARE --- 2626,2635 ---- && (CONSTANT_P (src) || (GET_CODE (src) == REG ! && (REGNO (src) == VIRTUAL_INCOMING_ARGS_REGNUM ! || REGNO (src) == VIRTUAL_STACK_VARS_REGNUM)) || (GET_CODE (src) == PLUS && GET_CODE (XEXP (src, 0)) == REG ! && (REGNO (XEXP (src, 0)) == VIRTUAL_INCOMING_ARGS_REGNUM ! || REGNO (XEXP (src, 0)) == VIRTUAL_STACK_VARS_REGNUM) && CONSTANT_P (XEXP (src, 1))) || GET_CODE (src) == COMPARE *************** *** 2990,2993 **** --- 3004,3008 ---- stack_slot_list = STACK_SLOT_LIST (head); + forced_labels = FORCED_LABELS (head); if (FUNCTION_FLAGS (head) & FUNCTION_FLAGS_CALLS_ALLOCA) *************** *** 3024,3031 **** current_function_pops_args = POPS_ARGS (head); ! /* There is no need to output a return label again. */ ! return_label = 0; ! ! expand_function_end (DECL_SOURCE_FILE (fndecl), DECL_SOURCE_LINE (fndecl), 0); /* Find last insn and rebuild the constant pool. */ --- 3039,3045 ---- current_function_pops_args = POPS_ARGS (head); ! /* This is the only thing the expand_function_end call that uses to be here ! actually does and that call can cause problems. */ ! immediate_size_expand--; /* Find last insn and rebuild the constant pool. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/integrate.h gcc-2.7.0/integrate.h *** gcc-2.6.3/integrate.h Thu Nov 11 00:12:05 1993 --- gcc-2.7.0/integrate.h Thu Jun 15 07:46:29 1995 *************** *** 16,20 **** 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 structure is used to remap objects in the function being inlined to --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This structure is used to remap objects in the function being inlined to diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/invoke.texi gcc-2.7.0/invoke.texi *** gcc-2.6.3/invoke.texi Thu Nov 3 17:52:15 1994 --- gcc-2.7.0/invoke.texi Thu Jun 15 17:27:11 1995 *************** *** 1,3 **** ! @c Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,3 ---- ! @c Copyright (C) 1988, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 105,111 **** -fall-virtual -fdollars-in-identifiers -felide-constructors -fenum-int-equiv -fexternal-templates -fhandle-signatures ! -fmemoize-lookups -fno-default-inline -fno-strict-prototype ! -fnonnull-objects -fthis-is-variable -nostdinc++ ! -traditional +e@var{n} @end smallexample --- 105,111 ---- -fall-virtual -fdollars-in-identifiers -felide-constructors -fenum-int-equiv -fexternal-templates -fhandle-signatures ! -fmemoize-lookups -fno-default-inline -fno-gnu-keywords ! -fnonnull-objects -foperator-names -fstrict-prototype ! -fthis-is-variable -nostdinc++ -traditional +e@var{n} @end smallexample *************** *** 134,138 **** -ggdb -gstabs -gstabs+ -gxcoff -gxcoff+ -p -pg -print-file-name=@var{library} -print-libgcc-file-name ! -print-prog-name=@var{program} -save-temps @end smallexample --- 134,138 ---- -ggdb -gstabs -gstabs+ -gxcoff -gxcoff+ -p -pg -print-file-name=@var{library} -print-libgcc-file-name ! -print-prog-name=@var{program} -print-search-dirs -save-temps @end smallexample *************** *** 174,179 **** @xref{Link Options,,Options for Linking}. @smallexample ! @var{object-file-name} ! -l@var{library} -nostartfiles -nostdlib -s -static -shared -symbolic -Wl,@var{option} -Xlinker @var{option} --- 174,179 ---- @xref{Link Options,,Options for Linking}. @smallexample ! @var{object-file-name} -l@var{library} ! -nostartfiles -nodefaultlibs -nostdlib -s -static -shared -symbolic -Wl,@var{option} -Xlinker @var{option} *************** *** 248,259 **** -mversion-03.00 -mwarn-passed-structs ! @emph{RS/6000 Options and PowerPC} ! -mcpu=@var{cpu type} ! -mpower -mno-power -mpower2 -pno-power2 ! -mpowerpc -mno-powerpc ! -mpowerpc-gpopt -mno-powerpc-gpopt ! -mpowerpc-gfxopt -mno-powerpc-gfxopt ! -mnew-mnemonics -mno-new-mnemonics -mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc @emph{RT Options} --- 248,264 ---- -mversion-03.00 -mwarn-passed-structs ! @emph{RS/6000 and PowerPC Options} ! -mcpu=@var{cpu type} ! -mpower -mno-power -mpower2 -mno-power2 ! -mpowerpc -mno-powerpc ! -mpowerpc-gpopt -mno-powerpc-gpopt ! -mpowerpc-gfxopt -mno-powerpc-gfxopt ! -mnew-mnemonics -mno-new-mnemonics -mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc + -msoft-float -mhard-float -mmultiple -mno-multiple + -mstring -mno-string -mbit-align -mno-bit-align + -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable + -mtoc -mno-toc -mtraceback -mno-traceback + -mlittle -mlittle-endian -mbig -mbig-endian @emph{RT Options} *************** *** 272,288 **** -mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats -mrnames -msoft-float ! -mstats -G @var{num} -nocpp @emph{i386 Options} ! -m486 -mieee-fp -mno-486 -mno-fancy-math-387 -mno-fp-ret-in-387 -msoft-float -msvr3-shlib ! -mno-wide-multiply -mreg-alloc=@var{list} @emph{HPPA Options} ! -mdisable-fpregs -mdisable-indexing -mjump-in-delay ! -mgas -mlong-calls -mno-disable-fpregs -mno-disable-indexing ! -mno-gas -mno-jump-in-delay ! -mno-long-calls -mno-portable-runtime ! -mpa-risc-1-0 -mpa-risc-1-1 -mportable-runtime @emph{Intel 960 Options} --- 277,298 ---- -mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats -mrnames -msoft-float ! -m4650 -msingle-float -mmad ! -mstats -EL -EB -G @var{num} -nocpp @emph{i386 Options} ! -m486 -m386 -mieee-fp -mno-fancy-math-387 -mno-fp-ret-in-387 -msoft-float -msvr3-shlib ! -mno-wide-multiply -mrtd -malign-double ! -mreg-alloc=@var{list} -mregparm=@var{num} ! -malign-jumps=@var{num} -malign-loops=@var{num} ! -malign-functions=@var{num} @emph{HPPA Options} ! -mdisable-fpregs -mdisable-indexing -mfast-indirect-calls ! -mgas -mjump-in-delay -mlong-millicode-calls -mno-disable-fpregs ! -mno-disable-indexing -mno-fast-indirect-calls -mno-gas ! -mno-jump-in-delay -mno-millicode-long-calls ! -mno-portable-runtime -mno-soft-float -msoft-float ! -mpa-risc-1-0 -mpa-risc-1-1 -mportable-runtime -mschedule=@var{list} @emph{Intel 960 Options} *************** *** 319,323 **** -freg-struct-return -fshared-data -fshort-enums -fshort-double -fvolatile -fvolatile-global ! -fverbose-asm +e0 +e1 @end smallexample @end table --- 329,333 ---- -freg-struct-return -fshared-data -fshort-enums -fshort-double -fvolatile -fvolatile-global ! -fverbose-asm -fpack-struct +e0 +e1 @end smallexample @end table *************** *** 558,565 **** @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 the ! keywords @code{__asm__}, @code{__inline__} and @code{__typeof__} instead. @samp{-ansi} implies @samp{-fno-asm}. @item -fno-builtin @cindex builtin functions --- 568,580 ---- @item -fno-asm Do not recognize @code{asm}, @code{inline} or @code{typeof} as a ! keyword, so that code can use these words as identifiers. You can use ! the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__} instead. @samp{-ansi} implies @samp{-fno-asm}. + In C++, this switch only affects the @code{typeof} keyword, since + @code{asm} and @code{inline} are standard keywords. You may want to + use the @samp{-fno-gnu-keywords} flag instead, as it also disables the + other, C++-specific, extension keywords such as @code{headof}. + @item -fno-builtin @cindex builtin functions *************** *** 674,678 **** @item ! In preprocessor directive, the @samp{#} symbol must appear as the first character of a line. --- 689,693 ---- @item ! In preprocessing directive, the @samp{#} symbol must appear as the first character of a line. *************** *** 693,699 **** testing both of these predefined macros you can distinguish four situations: GNU C, traditional GNU C, other ANSI C compilers, and other ! old C compilers. @xref{Standard Predefined,,Standard Predefined ! Macros,cpp.info,The C Preprocessor}, for more discussion of these and other ! predefined macros. @item --- 708,715 ---- testing both of these predefined macros you can distinguish four situations: GNU C, traditional GNU C, other ANSI C compilers, and other ! old C compilers. The predefined macro @code{__STDC_VERSION__} is also ! not defined when you use @samp{-traditional}. @xref{Standard ! Predefined,,Standard Predefined Macros,cpp.info,The C Preprocessor}, ! for more discussion of these and other predefined macros. @item *************** *** 812,821 **** any case. @item -fconserve-space Put uninitialized or runtime-initialized global variables into the common segment, as C does. This saves space in the executable at the ! cost of not diagnosing duplicate definitions. If your program ! mysteriously crashes after @code{main()} has completed, you may have an ! object that is being destroyed twice because two definitions were merged. @item -fdollars-in-identifiers --- 828,844 ---- any case. + @item -fcheck-new + Check that the pointer returned by @code{operator new} is non-null + before attempting to modify the storage allocated. The current Working + Paper requires that @code{operator new} never return a null pointer, so + this check is normally unnecessary. + @item -fconserve-space Put uninitialized or runtime-initialized global variables into the common segment, as C does. This saves space in the executable at the ! cost of not diagnosing duplicate definitions. If you compile with this ! flag and your program mysteriously crashes after @code{main()} has ! completed, you may have an object that is being destroyed twice because ! two definitions were merged. @item -fdollars-in-identifiers *************** *** 827,833 **** @item -fenum-int-equiv ! Permit implicit conversion of @code{int} to enumeration types. Normally ! GNU C++ allows conversion of @code{enum} to @code{int}, but not the ! other way around. @item -fexternal-templates --- 850,856 ---- @item -fenum-int-equiv ! Anachronistically permit implicit conversion of @code{int} to ! enumeration types. Current C++ allows conversion of @code{enum} to ! @code{int}, but not the other way around. @item -fexternal-templates *************** *** 842,845 **** --- 865,876 ---- @xref{Template Instantiation}, for more information. + @item -fno-gnu-keywords + Do not recognize @code{classof}, @code{headof}, @code{signature}, + @code{sigof} or @code{typeof} as a keyword, so that code can use these + words as identifiers. You can use the keywords @code{__classof__}, + @code{__headof__}, @code{__signature__}, @code{__sigof__}, and + @code{__typeof__} instead. @samp{-ansi} implies + @samp{-fno-gnu-keywords}. + @item -fno-implicit-templates Never emit code for templates which are instantiated implicitly (i.e. by *************** *** 906,937 **** every other, and the cache need not be flushed. ! @item -fno-strict-prototype ! Treat a function declaration with no arguments, such as @samp{int foo ! ();}, as C would treat it---as saying nothing about the number of ! arguments or their types. Normally, such a declaration in C++ means ! that the function @code{foo} takes no arguments. ! ! This option does not work with operator overloading, which places ! constraints on the parameter types. ! ! @item -fnonnull-objects ! Assume that objects reached through references are not null. ! ! Normally, GNU C++ makes conservative assumptions about objects reached ! through references. For example, the compiler must check that @code{a} ! is not null in code like the following: ! ! @example ! obj &a = g (); ! a.f (2); ! @end example ! Checking that references of this sort have non-null values requires ! extra code, however, and it is unnecessary for many programs. You can ! use @w{@samp{-fnonnull-objects}} to omit the checks for null, if your ! program doesn't require checking. - This checking is currently only done for conversions to virtual base classes. - @item -fthis-is-variable Permit assignment to @code{this}. The incorporation of user-defined --- 937,968 ---- every other, and the cache need not be flushed. ! The code that implements these flags has rotted; you should probably ! avoid using them. ! @item -fstrict-prototype ! Within an @samp{extern "C"} linkage specification, treat a function ! declaration with no arguments, such as @samp{int foo ();}, as declaring ! the function to take no arguments. Normally, such a declaration means ! that the function @code{foo} can take any combination of arguments, as ! in C. @samp{-pedantic} implies @samp{-fstrict-prototype} unless ! overridden with @samp{-fno-strict-prototype}. ! ! This flag no longer affects declarations with C++ linkage. ! ! @item -fno-nonnull-objects ! Don't assume that a reference is initialized to refer to a valid object. ! Although the current C++ Working Paper prohibits null references, some ! old code may rely on them, and you can use @samp{-fno-nonnull-objects} ! to turn on checking. ! ! At the moment, the compiler only does this checking for conversions to ! virtual base classes. ! ! @item -foperator-names ! Recognize the operator name keywords @code{and}, @code{bitand}, ! @code{bitor}, @code{compl}, @code{not}, @code{or} and @code{xor} as ! synonyms for the symbols they refer to. @samp{-ansi} implies ! @samp{-foperator-names}. @item -fthis-is-variable Permit assignment to @code{this}. The incorporation of user-defined *************** *** 1013,1022 **** Check the code for syntax errors, but don't do anything beyond that. - @item -w - Inhibit all warning messages. - - @item -Wno-import - Inhibit warning messages about the use of @samp{#import}. - @item -pedantic Issue all the warnings demanded by strict ANSI standard C; reject --- 1044,1047 ---- *************** *** 1056,1121 **** warnings. ! @item -W ! Print extra warning messages for these events: ! ! @itemize @bullet ! @cindex @code{longjmp} warnings ! @item ! A nonvolatile automatic variable might be changed by a call to ! @code{longjmp}. These warnings as well are possible only in ! optimizing compilation. ! ! The compiler sees only the calls to @code{setjmp}. It cannot know ! where @code{longjmp} will be called; in fact, a signal handler could ! call it at any point in the code. As a result, you may get a warning ! even when there is in fact no problem because @code{longjmp} cannot ! in fact be called at the place which would cause a problem. ! ! @item ! A function can return either with or without a value. (Falling ! off the end of the function body is considered returning without ! a value.) For example, this function would evoke such a ! warning: ! ! @smallexample ! @group ! foo (a) ! @{ ! if (a > 0) ! return a; ! @} ! @end group ! @end smallexample ! ! @item ! An expression-statement contains no side effects. ! ! @item ! An unsigned value is compared against zero with @samp{<} or @samp{<=}. ! @item ! A comparison like @samp{x<=y<=z} appears; this is equivalent to ! @samp{(x<=y ? 1 : 0) <= z}, which is a different interpretation from ! that of ordinary mathematical notation. ! @item ! Storage-class specifiers like @code{static} are not the first things in ! a declaration. According to the C Standard, this usage is obsolescent. ! @item ! An aggregate has a partly bracketed initializer. ! For example, the following code would evoke such a warning, ! because braces are missing around the initializer for @code{x.h}: ! @smallexample ! struct s @{ int f, g; @}; ! struct t @{ struct s h; int i; @}; ! struct t x = @{ 1, 2, 3 @}; ! @end smallexample ! @end itemize @item -Wimplicit Warn whenever a function or parameter is implicitly declared. @item -Wreturn-type Warn whenever a function is defined with a return-type that defaults --- 1081,1112 ---- warnings. ! @item -w ! Inhibit all warning messages. ! @item -Wno-import ! Inhibit warning messages about the use of @samp{#import}. ! @item -Wchar-subscripts ! Warn if an array subscript has type @code{char}. This is a common cause ! of error, as programmers often forget that this type is signed on some ! machines. ! @item -Wcomment ! Warn whenever a comment-start sequence @samp{/*} appears in a comment. ! @item -Wformat ! Check calls to @code{printf} and @code{scanf}, etc., to make sure that ! the arguments supplied have types appropriate to the format string ! specified. @item -Wimplicit Warn whenever a function or parameter is implicitly declared. + @item -Wparentheses + Warn if parentheses are omitted in certain contexts, such + as when there is an assignment in a context where a truth value + is expected, or when operators are nested whose precedence people + often get confused about. + @item -Wreturn-type Warn whenever a function is defined with a return-type that defaults *************** *** 1123,1144 **** return-value in a function whose return-type is not @code{void}. - @item -Wunused - Warn whenever a variable is unused aside from its declaration, - whenever a function is declared static but never defined, whenever a - label is declared but not used, and whenever a statement computes a - result that is explicitly not used. - - To suppress this warning for a local variable or expression, simply cast - it to void. This will also work for file-scope variables, but if you - want to mark them used at the point of definition, you can use this - macro: - - @smallexample - #define USE(var) \ - static void *const use_##var = (&use_##var, &var, 0) - - USE (string); - @end smallexample - @item -Wswitch Warn whenever a @code{switch} statement has an index of enumeral type --- 1114,1117 ---- *************** *** 1148,1166 **** 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 -Wformat ! Check calls to @code{printf} and @code{scanf}, etc., to make sure that ! the arguments supplied have types appropriate to the format string ! specified. ! @item -Wchar-subscripts ! Warn if an array subscript has type @code{char}. This is a common cause ! of error, as programmers often forget that this type is signed on some ! machines. @item -Wuninitialized --- 1121,1136 ---- provoke warnings when this option is used. @item -Wtrigraphs Warn if any trigraphs are encountered (assuming they are enabled). ! @item -Wunused ! Warn whenever a variable is unused aside from its declaration, ! whenever a function is declared static but never defined, whenever a ! label is declared but not used, and whenever a statement computes a ! result that is explicitly not used. ! To suppress this warning for an expression, simply cast it to void. For ! unused variables and parameters, use the @samp{unused} attribute ! (@pxref{Variable Attributes}). @item -Wuninitialized *************** *** 1224,1233 **** Attributes}. - @item -Wparentheses - Warn if parentheses are omitted in certain contexts, such - as when there is an assignment in a context where a truth value - is expected, or when operators are nested whose precedence people - often get confused about. - @item -Wenum-clash @cindex enumeration clash warnings --- 1194,1197 ---- *************** *** 1236,1244 **** (C++ only). - @item -Wtemplate-debugging - @cindex template debugging - When using templates in a C++ program, warn if debugging is not yet - fully available (C++ only). - @item -Wreorder (C++ only) @cindex reordering, warning --- 1200,1203 ---- *************** *** 1259,1262 **** --- 1218,1226 ---- members. + @item -Wtemplate-debugging + @cindex template debugging + When using templates in a C++ program, warn if debugging is not yet + fully available (C++ only). + @item -Wall All of the above @samp{-W} options combined. These are all the *************** *** 1270,1273 **** --- 1234,1300 ---- @table @code + @item -W + Print extra warning messages for these events: + + @itemize @bullet + @cindex @code{longjmp} warnings + @item + A nonvolatile automatic variable might be changed by a call to + @code{longjmp}. These warnings as well are possible only in + optimizing compilation. + + The compiler sees only the calls to @code{setjmp}. It cannot know + where @code{longjmp} will be called; in fact, a signal handler could + call it at any point in the code. As a result, you may get a warning + even when there is in fact no problem because @code{longjmp} cannot + in fact be called at the place which would cause a problem. + + @item + A function can return either with or without a value. (Falling + off the end of the function body is considered returning without + a value.) For example, this function would evoke such a + warning: + + @smallexample + @group + foo (a) + @{ + if (a > 0) + return a; + @} + @end group + @end smallexample + + @item + An expression-statement contains no side effects. + + @item + An unsigned value is compared against zero with @samp{<} or @samp{<=}. + + @item + A comparison like @samp{x<=y<=z} appears; this is equivalent to + @samp{(x<=y ? 1 : 0) <= z}, which is a different interpretation from + that of ordinary mathematical notation. + + @item + Storage-class specifiers like @code{static} are not the first things in + a declaration. According to the C Standard, this usage is obsolescent. + + @item + If @samp{-Wall} or @samp{-Wunused} is also specified, warn about unused + arguments. + + @item + An aggregate has a partly bracketed initializer. + For example, the following code would evoke such a warning, + because braces are missing around the initializer for @code{x.h}: + + @smallexample + struct s @{ int f, g; @}; + struct t @{ struct s h; int i; @}; + struct t x = @{ 1, 2, 3 @}; + @end smallexample + @end itemize + @item -Wtraditional Warn about certain constructs that behave differently in traditional and *************** *** 1479,1483 **** using GNU extensions understood only by the GNU debugger (GDB). The use of these extensions is likely to make other debuggers crash or ! refuse to read the program. @item -gdwarf --- 1506,1511 ---- using GNU extensions understood only by the GNU debugger (GDB). The use of these extensions is likely to make other debuggers crash or ! refuse to read the program, and may cause assemblers other than the GNU ! assembler (GAS) to fail with an error. @item -gdwarf *************** *** 1627,1636 **** Same as @samp{-print-file-name=libgcc.a}. ! This is useful when you use @samp{-nostdlib} but you do want to link ! with @file{libgcc.a}. You can do @example gcc -nostdlib @var{files}@dots{} `gcc -print-libgcc-file-name` @end example @end table --- 1655,1676 ---- Same as @samp{-print-file-name=libgcc.a}. ! This is useful when you use @samp{-nostdlib} or @samp{-nodefaultlibs} ! but you do want to link with @file{libgcc.a}. You can do @example gcc -nostdlib @var{files}@dots{} `gcc -print-libgcc-file-name` @end example + + @item -print-search-dirs + Print the name of the configured installation directory and a list of + program and library directories gcc will search---and don't do anything else. + + This is useful when gcc prints the error message + @samp{installation problem, cannot exec cpp: No such file or directory}. + To resolve this you either need to put @file{cpp} and the other compiler + components where gcc expects to find them, or you can set the environment + variable @code{GCC_EXEC_PREFIX} to the directory where you installed them. + Don't forget the trailing '/'. + @xref{Environment Variables}. @end table *************** *** 1678,1682 **** @samp{-O2} turns on all optional optimizations except for loop unrolling and function inlining. It also turns on frame pointer elimination on ! machines where doing so does not interfer with debugging. @item -O3 --- 1718,1722 ---- @samp{-O2} turns on all optional optimizations except for loop unrolling and function inlining. It also turns on frame pointer elimination on ! machines where doing so does not interfere with debugging. @item -O3 *************** *** 1971,1975 **** @item -P ! Tell the preprocessor not to generate @samp{#line} commands. Used with the @samp{-E} option. --- 2011,2015 ---- @item -P ! Tell the preprocessor not to generate @samp{#line} directives. Used with the @samp{-E} option. *************** *** 2022,2026 **** @item -A@var{question}(@var{answer}) Assert the answer @var{answer} for @var{question}, in case it is tested ! with a preprocessor conditional such as @samp{#if #@var{question}(@var{answer})}. @samp{-A-} disables the standard assertions that normally describe the target machine. --- 2062,2066 ---- @item -A@var{question}(@var{answer}) Assert the answer @var{answer} for @var{question}, in case it is tested ! with a preprocessing conditional such as @samp{#if #@var{question}(@var{answer})}. @samp{-A-} disables the standard assertions that normally describe the target machine. *************** *** 2128,2144 **** @item -nostartfiles Do not use the standard system startup files when linking. ! The standard libraries are used normally. @item -nostdlib ! Do not use the standard system libraries and startup files when linking. ! Only the files you specify will be passed to the linker. @cindex @code{-lgcc}, use with @code{-nostdlib} @cindex @code{-nostdlib} and unresolved references @cindex unresolved references and @code{-nostdlib} ! One of the standard libraries bypassed by @samp{-nostdlib} is ! @file{libgcc.a}, a library of internal subroutines that GNU CC uses to ! overcome shortcomings of particular machines, or special needs for some ! languages. @ifset INTERNALS (@xref{Interface,,Interfacing to GNU CC Output}, for more discussion of --- 2168,2195 ---- @item -nostartfiles Do not use the standard system startup files when linking. ! The standard system libraries are used normally, unless @code{-nostdlib} ! or @code{-nodefaultlibs} is used. + @item -nodefaultlibs + Do not use the standard system libraries when linking. + Only the libraries you specify will be passed to the linker. + The standard startup files are used normally, unless @code{-nostartfiles} + is used. + @item -nostdlib ! Do not use the standard system startup files or libraries when linking. ! No startup files and only the libraries you specify will be passed to ! the linker. @cindex @code{-lgcc}, use with @code{-nostdlib} @cindex @code{-nostdlib} and unresolved references @cindex unresolved references and @code{-nostdlib} ! @cindex @code{-lgcc}, use with @code{-nodefaultlibs} ! @cindex @code{-nodefaultlibs} and unresolved references ! @cindex unresolved references and @code{-nodefaultlibs} ! One of the standard libraries bypassed by @samp{-nostdlib} and ! @samp{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines ! that GNU CC uses to overcome shortcomings of particular machines, or special ! needs for some languages. @ifset INTERNALS (@xref{Interface,,Interfacing to GNU CC Output}, for more discussion of *************** *** 2150,2156 **** @end ifclear In most cases, you need @file{libgcc.a} even when you want to avoid ! other standard libraries. In other words, when you specify ! @samp{-nostdlib} you should usually specify @samp{-lgcc} as well. This ! ensures that you have no unresolved references to internal GNU CC library subroutines. (For example, @samp{__main}, used to ensure C++ constructors will be called; @pxref{Collect2,,@code{collect2}}.) --- 2201,2207 ---- @end ifclear In most cases, you need @file{libgcc.a} even when you want to avoid ! other standard libraries. In other words, when you specify @samp{-nostdlib} ! or @samp{-nodefaultlibs} you should usually specify @samp{-lgcc} as well. ! This ensures that you have no unresolved references to internal GNU CC library subroutines. (For example, @samp{__main}, used to ensure C++ constructors will be called; @pxref{Collect2,,@code{collect2}}.) *************** *** 2161,2166 **** @item -static On systems that support dynamic linking, this prevents linking with the shared ! libraries. On other systems, this ! option has no effect. @item -shared --- 2212,2216 ---- @item -static On systems that support dynamic linking, this prevents linking with the shared ! libraries. On other systems, this option has no effect. @item -shared *************** *** 2207,2212 **** @table @code @item -I@var{dir} ! Append directory @var{dir} to the list of directories searched for ! include files. @item -I- --- 2257,2266 ---- @table @code @item -I@var{dir} ! Add the directory @var{directory} to the head of the list of directories ! to be searched for header files. This can be used to override a system ! header file, substituting your own version, since these directories are ! searched before the system header file directories. If you use more ! than one @samp{-I} option, the directories are scanned in left-to-right ! order; the standard system directories come after. @item -I- *************** *** 2309,2315 **** @var{version} might be @samp{2.0}, meaning to run GNU CC version 2.0. ! The default version, when you do not specify @samp{-V}, is controlled ! by the way GNU CC is installed. Normally, it will be a version that ! is recommended for general use. @end table --- 2363,2368 ---- @var{version} might be @samp{2.0}, meaning to run GNU CC version 2.0. ! The default version, when you do not specify @samp{-V}, is the last ! version of GNU CC that you installed. @end table *************** *** 2447,2455 **** @item -msoft-float Generate output containing library calls for floating point. ! @strong{Warning:} the requisite libraries are not part of GNU CC. ! Normally the facilities of the machine's usual C compiler are used, but ! this can't be done directly in cross-compilation. You must make your ! own arrangements to provide suitable library functions for ! cross-compilation. @item -mshort --- 2500,2509 ---- @item -msoft-float Generate output containing library calls for floating point. ! @strong{Warning:} the requisite libraries are not available for all m68k ! targets. Normally the facilities of the machine's usual C compiler are ! used, but this can't be done directly in cross-compilation. You must ! make your own arrangements to provide suitable library functions for ! cross-compilation. The embedded targets @samp{m68k-*-aout} and ! @samp{m68k-*-coff} do provide software floating point support. @item -mshort *************** *** 2534,2542 **** @itemx -msoft-float Generate output containing library calls for floating point. ! @strong{Warning:} there is no GNU floating-point library for SPARC. ! Normally the facilities of the machine's usual C compiler are used, but ! this cannot be done directly in cross-compilation. You must make your ! own arrangements to provide suitable library functions for ! cross-compilation. @samp{-msoft-float} changes the calling convention in the output file; --- 2588,2597 ---- @itemx -msoft-float Generate output containing library calls for floating point. ! @strong{Warning:} the requisite libraries are not available for all SPARC ! targets. Normally the facilities of the machine's usual C compiler are ! used, but this cannot be done directly in cross-compilation. You must make ! your own arrangements to provide suitable library functions for ! cross-compilation. The embedded targets @samp{sparc-*-aout} and ! @samp{sparclite-*-*} do provide software floating point support. @samp{-msoft-float} changes the calling convention in the output file; *************** *** 2617,2621 **** With @samp{-mcypress} (the default), the compiler optimizes code for the Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx series. ! This is also apropriate for the older SparcStation 1, 2, IPX etc. With @samp{-msupersparc} the compiler optimizes code for the SuperSparc cpu, as --- 2672,2676 ---- With @samp{-mcypress} (the default), the compiler optimizes code for the Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx series. ! This is also appropriate for the older SparcStation 1, 2, IPX etc. With @samp{-msupersparc} the compiler optimizes code for the SuperSparc cpu, as *************** *** 2850,2854 **** @item -mapcs @kindex -mapcs ! Generate a stack frame that is compliant with the ARM Proceedure Call Standard for all functions, even if this is not strictly necessary for correct execution of the code. --- 2905,2909 ---- @item -mapcs @kindex -mapcs ! Generate a stack frame that is compliant with the ARM Procedure Call Standard for all functions, even if this is not strictly necessary for correct execution of the code. *************** *** 3180,3184 **** The default value of these options depends on how GNU CC was configured. ! Specifing @samp{-mcpu=@var{cpu_type}} sometimes overrides the value of these option. Unless you are building a cross-compiler, you should normally not specify either @samp{-mnew-mnemonics} or --- 3235,3239 ---- The default value of these options depends on how GNU CC was configured. ! Specifying @samp{-mcpu=@var{cpu_type}} sometimes overrides the value of these option. Unless you are building a cross-compiler, you should normally not specify either @samp{-mnew-mnemonics} or *************** *** 3186,3206 **** @item -mcpu=@var{cpu_type} ! Set architecture type, register usage, choice of mnemonics, and ! instruction scheduling parameters for machine type @var{cpu_type}. By ! default, @var{cpu_type} is the target system defined when GNU CC was ! configured. Supported values for @var{cpu_type} are @samp{rios1}, ! @samp{rios2}, @samp{rsc}, @samp{601}, @samp{603}, @samp{604}, ! @samp{power}, @samp{powerpc}, and @samp{common}. @samp{-mcpu=power} and ! @samp{-mcpu=powerpc} specify generic POWER and pure PowerPC (i.e., not ! MPC601) architecture machine types, with an appropriate, generic ! processor model assumed for scheduling purposes.@refill Specifying @samp{-mcpu=rios1}, @samp{-mcpu=rios2}, @samp{-mcpu=rsc}, or @samp{-mcpu=power} enables the @samp{-mpower} option and disables the ! @samp{-mpowerpc} option; @samp{-mcpu=601} enables both the ! @samp{-mpower} and @samp{-mpowerpc} options; @samp{-mcpu=603}, ! @samp{-mcpu=604}, and @samp{-mcpu=powerpc} enable the @samp{-mpowerpc} ! option and disable the @samp{-mpower} option; @samp{-mcpu=common} ! disables both the @samp{-mpower} and @samp{-mpowerpc} options.@refill To generate code that will operate on all members of the RS/6000 and --- 3241,3260 ---- @item -mcpu=@var{cpu_type} ! Set architecture type, register usage, choice of mnemonics, and instruction ! scheduling parameters for machine type @var{cpu_type}. By default, ! @var{cpu_type} is the target system defined when GNU CC was configured. ! Supported values for @var{cpu_type} are @samp{rios1}, @samp{rios2}, @samp{rsc}, ! @samp{601}, @samp{603}, @samp{604}, @samp{power}, @samp{powerpc}, @samp{403}, ! and @samp{common}. @samp{-mcpu=power} and @samp{-mcpu=powerpc} specify generic ! POWER and pure PowerPC (i.e., not MPC601) architecture machine types, with an ! appropriate, generic processor model assumed for scheduling purposes.@refill Specifying @samp{-mcpu=rios1}, @samp{-mcpu=rios2}, @samp{-mcpu=rsc}, or @samp{-mcpu=power} enables the @samp{-mpower} option and disables the ! @samp{-mpowerpc} option; @samp{-mcpu=601} enables both the @samp{-mpower} and ! @samp{-mpowerpc} options; @samp{-mcpu=603}, @samp{-mcpu=604}, @samp{-mcpu=403}, ! and @samp{-mcpu=powerpc} enable the @samp{-mpowerpc} option and disable the ! @samp{-mpower} option; @samp{-mcpu=common} disables both the @samp{-mpower} and ! @samp{-mpowerpc} options.@refill To generate code that will operate on all members of the RS/6000 and *************** *** 3213,3218 **** Specifying @samp{-mcpu=rios1}, @samp{-mcpu=rios2}, @samp{-mcpu=rsc}, or @samp{-mcpu=power} also disables the @samp{new-mnemonics} option. ! Specifying @samp{-mcpu=601}, @samp{-mcpu=603}, @samp{-mcpu=604}, or ! @samp{-mcpu=powerpc} also enables the @samp{new-mnemonics} option.@refill --- 3267,3272 ---- Specifying @samp{-mcpu=rios1}, @samp{-mcpu=rios2}, @samp{-mcpu=rsc}, or @samp{-mcpu=power} also disables the @samp{new-mnemonics} option. ! Specifying @samp{-mcpu=601}, @samp{-mcpu=603}, @samp{-mcpu=604}, ! @samp{403}, or @samp{-mcpu=powerpc} also enables the @samp{new-mnemonics} option.@refill *************** *** 3244,3247 **** --- 3298,3372 ---- uses extremely little TOC space. You may wish to use this option only on files that contain less frequently executed code. @refill + + @item -msoft-float + @itemx -mhard-float + Generate code that does not use (uses) the floating-point register set. + Software floating point emulation is provided if you use the + @samp{-msoft-float} option, and pass the option to GNU CC when linking. + + @item -mmultiple + @itemx -mno-multiple + Generate code that uses (does not use) the load multiple word + instructions and the store multiple word instructions. These + instructions are generated by default on POWER systems, and not + generated on PowerPC systems. Do not use @samp{-mmultiple} on little + endian PowerPC systems, since those instructions do not work when the + processor is in little endian mode. + + @item -mstring + @itemx -mno-string + Generate code that uses (does not use) the load string instructions and the + store string word instructions to save multiple registers and do small block + moves. These instructions are generated by default on POWER systems, anod not + generated on PowerPC systems. Do not use @samp{-mstring} on little endian + PowerPC systems, since those instructions do not work when the processor is in + little endian mode. + + @item -mno-bit-align + @itemx -mbit-align + On System V.4 and embedded PowerPC systems do not (do) force structures + and unions that contain bit fields to be aligned to the base type of the + bit field. + + For example, by default a structure containing nothing but 8 + @code{unsigned} bitfields of length 1 would be aligned to a 4 byte + boundary and have a size of 4 bytes. By using @samp{-mno-bit-align}, + the structure would be aligned to a 1 byte boundary and be one byte in + size. + + @item -mno-strict-align + @itemx -mstrict-align + On System V.4 and embedded PowerPC systems do not (do) assume that + unaligned memory references will be handled by the system. + + @item -mrelocatable + @itemx -mno-relocatable + On embedded PowerPC systems generate code that allows (does not allow) + the program to be relocated to a different address at runtime. + + @item -mno-toc + @itemx -mtoc + On System V.4 and embedded PowerPC systems do not (do) assume that + register 2 contains a pointer to a global area pointing to the addresses + used in the program. + + @item -mno-traceback + @itemx -mtraceback + On embedded PowerPC systems do not (do) generate a traceback tag before + the start of the function. This tag can be used by the debugger to + identify where the start of a function is. + + @item -mlittle + @itemx -mlittle-endian + On System V.4 and embedded PowerPC systems compile code for the + processor in little endian mode. The @samp{-mlittle-endian} option is + the same as @samp{-mlittle}. + + @item -mbig + @itemx -mbig-endian + On System V.4 and embedded PowerPC systems compile code for the + processor in big endian mode. The @samp{-mbig-endian} option is + the same as @samp{-mbig}. + @end table @node RT Options *************** *** 3444,3447 **** --- 3569,3596 ---- when executing, and thus may be preferred for some embedded systems. + @item -msingle-float + @itemx -mdouble-float + The @samp{-msingle-float} switch tells gcc to assume that the floating + point coprocessor only supports single precision operations, as on the + @samp{r4650} chip. The @samp{-mdouble-float} switch permits gcc to use + double precision operations. This is the default. + + @item -mmad + @itemx -mno-mad + Permit use of the @samp{mad}, @samp{madu} and @samp{mul} instructions, + as on the @samp{r4650} chip. + + @item -m4650 + Turns on @samp{-msingle-float}, @samp{-mmad}, and, at least for now, + @samp{-mcpu=r4650}. + + @item -EL + Compile code for the processor in little endian mode. + The requisite libraries are assumed to exist. + + @item -EB + Compile code for the processor in big endian mode. + The requisite libraries are assumed to exist. + @item -G @var{num} @cindex smaller data references (MIPS) *************** *** 3478,3487 **** @table @code @item -m486 ! @itemx -mno-486 Control whether or not code is optimized for a 486 instead of an 386. Code generated for an 486 will run on a 386 and vice versa. @item -mieee-fp ! @itemx -m-no-ieee-fp Control whether or not the compiler uses IEEE floating point comparisons. These handle correctly the case where the result of a --- 3627,3636 ---- @table @code @item -m486 ! @itemx -m386 Control whether or not code is optimized for a 486 instead of an 386. Code generated for an 486 will run on a 386 and vice versa. @item -mieee-fp ! @itemx -mno-ieee-fp Control whether or not the compiler uses IEEE floating point comparisons. These handle correctly the case where the result of a *************** *** 3518,3521 **** --- 3667,3682 ---- also use the @samp{-ffast-math} switch. + @item -malign-double + @itemx -mno-align-double + Control whether GNU CC aligns @code{double}, @code{long double}, and + @code{long long} variables on a two word boundary or a one word + boundary. Aligning @code{double} variables on a two word boundary will + produce code that runs somewhat faster on a @samp{Pentium} at the + expense of more memory. + + @strong{Warning:} if you use the @samp{-malign-double} switch, + structures containing the above types will be aligned differently than + the published application binary interface specifications for the 386. + @item -msvr3-shlib @itemx -mno-svr3-shlib *************** *** 3530,3539 **** long} multiplies and 32-bit division by constants. @item -mreg-alloc=@var{regs} Control the default allocation order of integer registers. The ! string @var{regs} is a series of letters specifing a register. The supported letters are: @code{a} allocate EAX; @code{b} allocate EBX; @code{c} allocate ECX; @code{d} allocate EDX; @code{S} allocate ESI; @code{D} allocate EDI; @code{B} allocate EBP. @end table --- 3691,3750 ---- long} multiplies and 32-bit division by constants. + @item -mrtd + Use a different function-calling convention, in which functions that + take a fixed number of arguments return with the @code{ret} @var{num} + instruction, which pops their arguments while returning. This saves one + instruction in the caller since there is no need to pop the arguments + there. + + You can specify that an individual function is called with this calling + sequence with the function attribute @samp{stdcall}. You can also + override the @samp{-mrtd} option by using the function attribute + @samp{cdecl}. @xref{Function Attributes} + + @strong{Warning:} this calling convention is incompatible with the one + normally used on Unix, so you cannot use it if you need to call + libraries compiled with the Unix compiler. + + Also, you must provide function prototypes for all functions that + take variable numbers of arguments (including @code{printf}); + otherwise incorrect code will be generated for calls to those + functions. + + In addition, seriously incorrect code will result if you call a + function with too many arguments. (Normally, extra arguments are + harmlessly ignored.) + @item -mreg-alloc=@var{regs} Control the default allocation order of integer registers. The ! string @var{regs} is a series of letters specifying a register. The supported letters are: @code{a} allocate EAX; @code{b} allocate EBX; @code{c} allocate ECX; @code{d} allocate EDX; @code{S} allocate ESI; @code{D} allocate EDI; @code{B} allocate EBP. + + @item -mregparm=@var{num} + Control how many registers are used to pass integer arguments. By + default, no registers are used to pass arguments, and at most 3 + registers can be used. You can control this behavior for a specific + function by using the function attribute @samp{regparm}. @xref{Function Attributes} + + @strong{Warning:} if you use this switch, and + @var{num} is nonzero, then you must build all modules with the same + value, including any libraries. This includes the system libraries and + startup modules. + + @item -malign-loops=@var{num} + Align loops to a 2 raised to a @var{num} byte boundary. If + @samp{-malign-loops} is not specified, the default is 2. + + @item -malign-jumps=@var{num} + Align instructions that are only jumped to to a 2 raised to a @var{num} + byte boundary. If @samp{-malign-jumps} is not specified, the default is + 2 if optimizing for a 386, and 4 if optimizing for a 486. + + @item -malign-functions=@var{num} + Align the start of functions to a 2 raised to @var{num} byte boundary. + If @samp{-malign-jumps} is not specified, the default is 2 if optimizing + for a 386, and 4 if optimizing for a 486. @end table *************** *** 3556,3564 **** of the conditional jump. ! @item -mlong-calls ! Generate code which allows calls to functions greater than 256k away from ! the caller when the caller and callee are in the same source file. Do ! not turn this option on unless code refuses to link with "branch out of ! range errors" from the linker. @item -mdisable-fpregs --- 3767,3776 ---- of the conditional jump. ! @item -mmillicode-long-calls ! Generate code which assumes millicode routines can not be reached ! by the standard millicode call sequence, linker-generated long-calls, ! or linker-modified millicode calls. In practice this should only be ! needed for dynamicly linked executables with extremely large SHLIB_INFO ! sections. @item -mdisable-fpregs *************** *** 3572,3581 **** rather obscure problems when compiling MIG generated code under MACH. @item -mportable-runtime ! Use the portable calling conventions proposed by HP for ELF systems. Note ! this option also enables @samp{-mlong-calls}. @item -mgas Enable the use of assembler directives only GAS understands. @end table --- 3784,3823 ---- rather obscure problems when compiling MIG generated code under MACH. + @item -mfast-indirect-calls + Generate code which performs faster indirect calls. Such code is suitable + for kernels and for static linking. The fast indirect call code will fail + miserably if it's part of a dynamically linked executable and in the presense + of nested functions. + @item -mportable-runtime ! Use the portable calling conventions proposed by HP for ELF systems. @item -mgas Enable the use of assembler directives only GAS understands. + + @item -mschedule=@var{cpu type} + Schedule code according to the constraints for the machine type + @var{cpu type}. The choices for @var{cpu type} are @samp{700} for + 7@var{n}0 machines, @samp{7100} for 7@var{n}5 machines, and @samp{7100} + for 7@var{n}2 machines. @samp{700} is the default for @var{cpu type}. + + Note the @samp{7100LC} scheduling information is incomplete and using + @samp{7100LC} often leads to bad schedules. For now it's probably best + to use @samp{7100} instead of @samp{7100LC} for the 7@var{n}2 machines. + + @item -msoft-float + Generate output containing library calls for floating point. + @strong{Warning:} the requisite libraries are not available for all HPPA + targets. Normally the facilities of the machine's usual C compiler are + used, but this cannot be done directly in cross-compilation. You must make + your own arrangements to provide suitable library functions for + cross-compilation. The embedded target @samp{hppa1.1-*-pro} + does provide software floating point support. + + @samp{-msoft-float} changes the calling convention in the output file; + therefore, it is only useful if you compile @emph{all} of a program with + this option. In particular, you need to compile @file{libgcc.a}, the + library that comes with GNU CC, with @samp{-msoft-float} in order for + this to work. @end table *************** *** 3702,3706 **** @itemx -mc400 ! Produce code for a C400 Clipper processor i.e. use floting point registers f8..f15. @end table --- 3944,3948 ---- @itemx -mc400 ! Produce code for a C400 Clipper processor i.e. use floating point registers f8..f15. @end table *************** *** 3926,3929 **** --- 4168,4176 ---- three-way choice. + @item -fpack-struct + Pack all structure members together without holes. Usually you would + not want to use this option, since it makes the code suboptimal, and + the offsets of structure members won't agree with system libraries. + @item +e0 @itemx +e1 *************** *** 3988,3995 **** The default value of @code{GCC_EXEC_PREFIX} is ! @file{@var{prefix}/lib/gcc-lib/@var{machine}/@var{version}/} where ! @var{prefix} is the value of @code{prefix} when you ran the ! @file{configure} script and @var{machine} and @var{version} are the ! configuration name and version number of GNU CC, respectively. Other prefixes specified with @samp{-B} take precedence over this prefix. --- 4235,4240 ---- The default value of @code{GCC_EXEC_PREFIX} is ! @file{@var{prefix}/lib/gcc-lib/} where @var{prefix} is the value ! of @code{prefix} when you ran the @file{configure} script. Other prefixes specified with @samp{-B} take precedence over this prefix. *************** *** 4018,4026 **** @findex LIBRARY_PATH The value of @code{LIBRARY_PATH} is a colon-separated list of ! directories, much like @code{PATH}. GNU CC tries the directories thus ! specified when searching for special linker files, if it can't find them ! using @code{GCC_EXEC_PREFIX}. Linking using GNU CC also uses these ! directories when searching for ordinary libraries for the @samp{-l} ! option (but directories specified with @samp{-L} come first). @item C_INCLUDE_PATH --- 4263,4272 ---- @findex LIBRARY_PATH The value of @code{LIBRARY_PATH} is a colon-separated list of ! directories, much like @code{PATH}. When configured as a native compiler, ! GNU CC tries the directories thus specified when searching for special ! linker files, if it can't find them using @code{GCC_EXEC_PREFIX}. Linking ! using GNU CC also uses these directories when searching for ordinary ! libraries for the @samp{-l} option (but directories specified with ! @samp{-L} come first). @item C_INCLUDE_PATH diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/jump.c gcc-2.7.0/jump.c *** gcc-2.6.3/jump.c Sat Oct 1 20:34:13 1994 --- gcc-2.7.0/jump.c Thu Jun 15 07:47:02 1995 *************** *** 1,4 **** /* Optimize jump instructions, for GNU compiler. ! Copyright (C) 1987, 88, 89, 91, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Optimize jump instructions, for GNU compiler. ! Copyright (C) 1987, 88, 89, 91-94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 56,62 **** #include "hard-reg-set.h" #include "regs.h" - #include "expr.h" #include "insn-config.h" #include "insn-flags.h" #include "real.h" --- 57,63 ---- #include "hard-reg-set.h" #include "regs.h" #include "insn-config.h" #include "insn-flags.h" + #include "expr.h" #include "real.h" *************** *** 266,269 **** --- 267,272 ---- || (GET_CODE (insn) == JUMP_INSN && GET_CODE (PATTERN (insn)) == RETURN) + /* A barrier can follow the return insn. */ + || GET_CODE (insn) == BARRIER /* Other kinds of notes can follow also. */ || (GET_CODE (insn) == NOTE *************** *** 517,524 **** delete_insn (insn); } - #if !BYTES_BIG_ENDIAN /* Not worth the hair to detect this - in the big-endian case. */ /* Also delete insns to store bit fields if they are no-ops. */ ! else if (GET_CODE (body) == SET && GET_CODE (SET_DEST (body)) == ZERO_EXTRACT && XEXP (SET_DEST (body), 2) == const0_rtx --- 520,527 ---- delete_insn (insn); } /* Also delete insns to store bit fields if they are no-ops. */ ! /* Not worth the hair to detect this in the big-endian case. */ ! else if (! BYTES_BIG_ENDIAN ! && GET_CODE (body) == SET && GET_CODE (SET_DEST (body)) == ZERO_EXTRACT && XEXP (SET_DEST (body), 2) == const0_rtx *************** *** 527,531 **** && MEM_VOLATILE_P (SET_SRC (body)))) delete_insn (insn); - #endif /* not BYTES_BIG_ENDIAN */ } insn = next; --- 530,533 ---- *************** *** 989,1012 **** #endif /* HAVE_cc0 */ ! /* We deal with four cases: ! 1) x = a; if (...) x = b; and either A or B is zero, ! 2) if (...) x = 0; and jumps are expensive, ! 3) x = a; if (...) x = b; and A and B are constants where all the ! set bits in A are also set in B and jumps are expensive, and ! 4) x = a; if (...) x = b; and A and B non-zero, and jumps are ! more expensive. ! 5) if (...) x = b; if jumps are even more expensive. ! ! In each of these try to use a store-flag insn to avoid the jump. ! (If the jump would be faster, the machine should not have ! defined the scc insns!). These cases are often made by the previous optimization. INSN here is the jump around the store. We set: TEMP to the "x = b;" insn. TEMP1 to X. ! TEMP2 to B (const0_rtx in the second case). TEMP3 to A (X in the second case). TEMP4 to the condition being tested. --- 991,1011 ---- #endif /* HAVE_cc0 */ ! /* Try to use a conditional move (if the target has them), or a ! store-flag insn. The general case is: ! 1) x = a; if (...) x = b; and ! 2) if (...) x = b; ! ! If the jump would be faster, the machine should not have defined ! the movcc or scc insns!. These cases are often made by the previous optimization. + The second case is treated as x = x; if (...) x = b;. + INSN here is the jump around the store. We set: TEMP to the "x = b;" insn. TEMP1 to X. ! TEMP2 to B. TEMP3 to A (X in the second case). TEMP4 to the condition being tested. *************** *** 1024,1030 **** && REGNO (temp1) >= FIRST_PSEUDO_REGISTER #endif - && GET_MODE_CLASS (GET_MODE (temp1)) == MODE_INT && (GET_CODE (temp2 = SET_SRC (PATTERN (temp))) == REG || GET_CODE (temp2) == SUBREG || GET_CODE (temp2) == CONST_INT) /* Allow either form, but prefer the former if both apply. --- 1023,1029 ---- && REGNO (temp1) >= FIRST_PSEUDO_REGISTER #endif && (GET_CODE (temp2 = SET_SRC (PATTERN (temp))) == REG || GET_CODE (temp2) == SUBREG + /* ??? How about floating point constants? */ || GET_CODE (temp2) == CONST_INT) /* Allow either form, but prefer the former if both apply. *************** *** 1033,1046 **** lose if the old value were a hard register since CSE won't replace hard registers. */ ! && (((temp3 = reg_set_last (temp1, insn)) != 0 ! && GET_CODE (temp3) == CONST_INT) ! /* Make the latter case look like x = x; if (...) x = 0; */ ! || (temp3 = temp1, ! ((BRANCH_COST >= 2 ! && temp2 == const0_rtx) ! #ifdef HAVE_conditional_move ! || HAVE_conditional_move ! #endif ! || BRANCH_COST >= 3))) /* INSN must either branch to the insn after TEMP or the insn after TEMP must branch to the same place as INSN. */ --- 1032,1038 ---- lose if the old value were a hard register since CSE won't replace hard registers. */ ! && (((temp3 = reg_set_last (temp1, insn)) != 0) ! /* Make the latter case look like x = x; if (...) x = b; */ ! || (temp3 = temp1, 1)) /* INSN must either branch to the insn after TEMP or the insn after TEMP must branch to the same place as INSN. */ *************** *** 1054,1076 **** and (2) we could find the size reliably. */ && GET_MODE (XEXP (temp4, 0)) != BLKmode ! ! /* If B is zero, OK; if A is zero, can only do (1) if we ! can reverse the condition. See if (3) applies possibly ! by reversing the condition. Prefer reversing to (4) when ! branches are very expensive. */ ! && ((reversep = 0, temp2 == const0_rtx) ! || (temp3 == const0_rtx ! && (reversep = can_reverse_comparison_p (temp4, insn))) ! || (BRANCH_COST >= 2 ! && GET_CODE (temp2) == CONST_INT ! && GET_CODE (temp3) == CONST_INT ! && ((INTVAL (temp2) & INTVAL (temp3)) == INTVAL (temp2) ! || ((INTVAL (temp2) & INTVAL (temp3)) == INTVAL (temp3) ! && (reversep = can_reverse_comparison_p (temp4, ! insn))))) #ifdef HAVE_conditional_move ! || HAVE_conditional_move #endif ! || BRANCH_COST >= 3) #ifdef HAVE_cc0 /* If the previous insn sets CC0 and something else, we can't --- 1046,1056 ---- and (2) we could find the size reliably. */ && GET_MODE (XEXP (temp4, 0)) != BLKmode ! /* No point in doing any of this if branches are cheap or we ! don't have conditional moves. */ ! && (BRANCH_COST >= 2 #ifdef HAVE_conditional_move ! || 1 #endif ! ) #ifdef HAVE_cc0 /* If the previous insn sets CC0 and something else, we can't *************** *** 1085,1221 **** ) { ! enum rtx_code code = GET_CODE (temp4); ! rtx uval, cval, var = temp1; ! int normalizep; ! rtx target; ! ! /* If necessary, reverse the condition. */ ! if (reversep) ! code = reverse_condition (code), uval = temp2, cval = temp3; ! else ! uval = temp3, cval = temp2; ! /* See if we can do this with a store-flag insn. */ ! start_sequence (); ! /* If CVAL is non-zero, normalize to -1. Otherwise, ! if UVAL is the constant 1, it is best to just compute ! the result directly. If UVAL is constant and STORE_FLAG_VALUE ! includes all of its bits, it is best to compute the flag ! value unnormalized and `and' it with UVAL. Otherwise, ! normalize to -1 and `and' with UVAL. */ ! normalizep = (cval != const0_rtx ? -1 ! : (uval == const1_rtx ? 1 ! : (GET_CODE (uval) == CONST_INT ! && (INTVAL (uval) & ~STORE_FLAG_VALUE) == 0) ! ? 0 : -1)); ! ! /* We will be putting the store-flag insn immediately in ! front of the comparison that was originally being done, ! so we know all the variables in TEMP4 will be valid. ! However, this might be in front of the assignment of ! A to VAR. If it is, it would clobber the store-flag ! we will be emitting. ! ! Therefore, emit into a temporary which will be copied to ! VAR immediately after TEMP. */ ! ! target = emit_store_flag (gen_reg_rtx (GET_MODE (var)), code, ! XEXP (temp4, 0), XEXP (temp4, 1), ! VOIDmode, ! (code == LTU || code == LEU ! || code == GEU || code == GTU), ! normalizep); ! if (target) ! { ! rtx before = insn; ! rtx seq; ! /* Put the store-flag insns in front of the first insn ! used to compute the condition to ensure that we ! use the same values of them as the current ! comparison. However, the remainder of the insns we ! generate will be placed directly in front of the ! jump insn, in case any of the pseudos we use ! are modified earlier. */ ! seq = get_insns (); end_sequence (); ! emit_insns_before (seq, temp5); ! start_sequence (); ! /* Both CVAL and UVAL are non-zero. */ ! if (cval != const0_rtx && uval != const0_rtx) ! { ! rtx tem1, tem2; ! tem1 = expand_and (uval, target, NULL_RTX); ! if (GET_CODE (cval) == CONST_INT ! && GET_CODE (uval) == CONST_INT ! && (INTVAL (cval) & INTVAL (uval)) == INTVAL (cval)) ! tem2 = cval; ! else ! { ! tem2 = expand_unop (GET_MODE (var), one_cmpl_optab, ! target, NULL_RTX, 0); ! tem2 = expand_and (cval, tem2, ! (GET_CODE (tem2) == REG ! ? tem2 : 0)); ! } ! /* If we usually make new pseudos, do so here. This ! turns out to help machines that have conditional ! move insns. */ ! ! if (flag_expensive_optimizations) ! target = 0; ! ! target = expand_binop (GET_MODE (var), ior_optab, ! tem1, tem2, target, ! 1, OPTAB_WIDEN); ! } ! else if (normalizep != 1) { ! /* We know that either CVAL or UVAL is zero. If ! UVAL is zero, negate TARGET and `and' with CVAL. ! Otherwise, `and' with UVAL. */ ! if (uval == const0_rtx) ! { ! target = expand_unop (GET_MODE (var), one_cmpl_optab, ! target, NULL_RTX, 0); ! uval = cval; ! } ! target = expand_and (uval, target, ! (GET_CODE (target) == REG ! && ! preserve_subexpressions_p () ! ? target : NULL_RTX)); ! } ! ! emit_move_insn (var, target); ! seq = get_insns (); ! end_sequence (); ! #ifdef HAVE_cc0 ! /* If INSN uses CC0, we must not separate it from the ! insn that sets cc0. */ ! if (reg_mentioned_p (cc0_rtx, PATTERN (before))) ! before = prev_nonnote_insn (before); ! #endif ! emit_insns_before (seq, before); ! delete_insn (temp); ! next = NEXT_INSN (insn); ! delete_jump (insn); ! changed = 1; ! continue; } - else - end_sequence (); } --- 1065,1307 ---- ) { ! #ifdef HAVE_conditional_move ! /* First try a conditional move. */ ! { ! enum rtx_code code = GET_CODE (temp4); ! rtx var = temp1; ! rtx cond0, cond1, aval, bval; ! rtx target; ! ! /* Copy the compared variables into cond0 and cond1, so that ! any side effects performed in or after the old comparison, ! will not affect our compare which will come later. */ ! /* ??? Is it possible to just use the comparison in the jump ! insn? After all, we're going to delete it. We'd have ! to modify emit_conditional_move to take a comparison rtx ! instead or write a new function. */ ! cond0 = gen_reg_rtx (GET_MODE (XEXP (temp4, 0))); ! /* We want the target to be able to simplify comparisons with ! zero (and maybe other constants as well), so don't create ! pseudos for them. There's no need to either. */ ! if (GET_CODE (XEXP (temp4, 1)) == CONST_INT ! || GET_CODE (XEXP (temp4, 1)) == CONST_DOUBLE) ! cond1 = XEXP (temp4, 1); ! else ! cond1 = gen_reg_rtx (GET_MODE (XEXP (temp4, 1))); ! aval = temp3; ! bval = temp2; ! start_sequence (); ! target = emit_conditional_move (var, code, ! cond0, cond1, VOIDmode, ! aval, bval, GET_MODE (var), ! (code == LTU || code == GEU ! || code == LEU || code == GTU)); ! if (target) ! { ! rtx seq1,seq2; ! /* Save the conditional move sequence but don't emit it ! yet. On some machines, like the alpha, it is possible ! that temp5 == insn, so next generate the sequence that ! saves the compared values and then emit both ! sequences ensuring seq1 occurs before seq2. */ ! seq2 = get_insns (); ! end_sequence (); ! ! /* Now that we can't fail, generate the copy insns that ! preserve the compared values. */ ! start_sequence (); ! emit_move_insn (cond0, XEXP (temp4, 0)); ! if (cond1 != XEXP (temp4, 1)) ! emit_move_insn (cond1, XEXP (temp4, 1)); ! seq1 = get_insns (); ! end_sequence (); ! ! emit_insns_before (seq1, temp5); ! emit_insns_before (seq2, insn); ! ! /* ??? We can also delete the insn that sets X to A. ! Flow will do it too though. */ ! delete_insn (temp); ! next = NEXT_INSN (insn); ! delete_jump (insn); ! changed = 1; ! continue; ! } ! else end_sequence (); + } + #endif ! /* That didn't work, try a store-flag insn. ! We further divide the cases into: ! 1) x = a; if (...) x = b; and either A or B is zero, ! 2) if (...) x = 0; and jumps are expensive, ! 3) x = a; if (...) x = b; and A and B are constants where all ! the set bits in A are also set in B and jumps are expensive, ! 4) x = a; if (...) x = b; and A and B non-zero, and jumps are ! more expensive, and ! 5) if (...) x = b; if jumps are even more expensive. */ ! ! if (GET_MODE_CLASS (GET_MODE (temp1)) == MODE_INT ! && ((GET_CODE (temp3) == CONST_INT) ! /* Make the latter case look like ! x = x; if (...) x = 0; */ ! || (temp3 = temp1, ! ((BRANCH_COST >= 2 ! && temp2 == const0_rtx) ! || BRANCH_COST >= 3))) ! /* If B is zero, OK; if A is zero, can only do (1) if we ! can reverse the condition. See if (3) applies possibly ! by reversing the condition. Prefer reversing to (4) when ! branches are very expensive. */ ! && ((reversep = 0, temp2 == const0_rtx) ! || (temp3 == const0_rtx ! && (reversep = can_reverse_comparison_p (temp4, insn))) ! || (BRANCH_COST >= 2 ! && GET_CODE (temp2) == CONST_INT ! && GET_CODE (temp3) == CONST_INT ! && ((INTVAL (temp2) & INTVAL (temp3)) == INTVAL (temp2) ! || ((INTVAL (temp2) & INTVAL (temp3)) == INTVAL (temp3) ! && (reversep = can_reverse_comparison_p (temp4, ! insn))))) ! || BRANCH_COST >= 3) ! ) ! { ! enum rtx_code code = GET_CODE (temp4); ! rtx uval, cval, var = temp1; ! int normalizep; ! rtx target; ! /* If necessary, reverse the condition. */ ! if (reversep) ! code = reverse_condition (code), uval = temp2, cval = temp3; ! else ! uval = temp3, cval = temp2; ! /* If CVAL is non-zero, normalize to -1. Otherwise, if UVAL ! is the constant 1, it is best to just compute the result ! directly. If UVAL is constant and STORE_FLAG_VALUE ! includes all of its bits, it is best to compute the flag ! value unnormalized and `and' it with UVAL. Otherwise, ! normalize to -1 and `and' with UVAL. */ ! normalizep = (cval != const0_rtx ? -1 ! : (uval == const1_rtx ? 1 ! : (GET_CODE (uval) == CONST_INT ! && (INTVAL (uval) & ~STORE_FLAG_VALUE) == 0) ! ? 0 : -1)); ! ! /* We will be putting the store-flag insn immediately in ! front of the comparison that was originally being done, ! so we know all the variables in TEMP4 will be valid. ! However, this might be in front of the assignment of ! A to VAR. If it is, it would clobber the store-flag ! we will be emitting. ! ! Therefore, emit into a temporary which will be copied to ! VAR immediately after TEMP. */ ! ! start_sequence (); ! target = emit_store_flag (gen_reg_rtx (GET_MODE (var)), code, ! XEXP (temp4, 0), XEXP (temp4, 1), ! VOIDmode, ! (code == LTU || code == LEU ! || code == GEU || code == GTU), ! normalizep); ! if (target) { ! rtx seq; ! rtx before = insn; ! seq = get_insns (); ! end_sequence (); ! /* Put the store-flag insns in front of the first insn ! used to compute the condition to ensure that we ! use the same values of them as the current ! comparison. However, the remainder of the insns we ! generate will be placed directly in front of the ! jump insn, in case any of the pseudos we use ! are modified earlier. */ ! emit_insns_before (seq, temp5); ! start_sequence (); ! /* Both CVAL and UVAL are non-zero. */ ! if (cval != const0_rtx && uval != const0_rtx) ! { ! rtx tem1, tem2; ! tem1 = expand_and (uval, target, NULL_RTX); ! if (GET_CODE (cval) == CONST_INT ! && GET_CODE (uval) == CONST_INT ! && (INTVAL (cval) & INTVAL (uval)) == INTVAL (cval)) ! tem2 = cval; ! else ! { ! tem2 = expand_unop (GET_MODE (var), one_cmpl_optab, ! target, NULL_RTX, 0); ! tem2 = expand_and (cval, tem2, ! (GET_CODE (tem2) == REG ! ? tem2 : 0)); ! } ! ! /* If we usually make new pseudos, do so here. This ! turns out to help machines that have conditional ! move insns. */ ! /* ??? Conditional moves have already been handled. ! This may be obsolete. */ ! ! if (flag_expensive_optimizations) ! target = 0; ! ! target = expand_binop (GET_MODE (var), ior_optab, ! tem1, tem2, target, ! 1, OPTAB_WIDEN); ! } ! else if (normalizep != 1) ! { ! /* We know that either CVAL or UVAL is zero. If ! UVAL is zero, negate TARGET and `and' with CVAL. ! Otherwise, `and' with UVAL. */ ! if (uval == const0_rtx) ! { ! target = expand_unop (GET_MODE (var), one_cmpl_optab, ! target, NULL_RTX, 0); ! uval = cval; ! } ! ! target = expand_and (uval, target, ! (GET_CODE (target) == REG ! && ! preserve_subexpressions_p () ! ? target : NULL_RTX)); ! } ! ! emit_move_insn (var, target); ! seq = get_insns (); ! end_sequence (); ! #ifdef HAVE_cc0 ! /* If INSN uses CC0, we must not separate it from the ! insn that sets cc0. */ ! if (reg_mentioned_p (cc0_rtx, PATTERN (before))) ! before = prev_nonnote_insn (before); ! #endif ! emit_insns_before (seq, before); ! ! delete_insn (temp); ! next = NEXT_INSN (insn); ! delete_jump (insn); ! changed = 1; ! continue; ! } ! else ! end_sequence (); } } *************** *** 1796,1817 **** We must move the LOOP_END note to where the loop really ends now, or we will confuse loop ! optimization. */ for (;range2after != label2; range2after = rangenext) { rangenext = NEXT_INSN (range2after); ! if (GET_CODE (range2after) == NOTE ! && (NOTE_LINE_NUMBER (range2after) ! == NOTE_INSN_LOOP_END)) { ! NEXT_INSN (PREV_INSN (range2after)) ! = rangenext; ! PREV_INSN (rangenext) ! = PREV_INSN (range2after); ! PREV_INSN (range2after) ! = PREV_INSN (range1beg); ! NEXT_INSN (range2after) = range1beg; ! NEXT_INSN (PREV_INSN (range1beg)) ! = range2after; ! PREV_INSN (range1beg) = range2after; } } --- 1882,1910 ---- We must move the LOOP_END note to where the loop really ends now, or we will confuse loop ! optimization. Stop if we find a LOOP_BEG note ! first, since we don't want to move the LOOP_END ! note in that case. */ for (;range2after != label2; range2after = rangenext) { rangenext = NEXT_INSN (range2after); ! if (GET_CODE (range2after) == NOTE) { ! if (NOTE_LINE_NUMBER (range2after) ! == NOTE_INSN_LOOP_END) ! { ! NEXT_INSN (PREV_INSN (range2after)) ! = rangenext; ! PREV_INSN (rangenext) ! = PREV_INSN (range2after); ! PREV_INSN (range2after) ! = PREV_INSN (range1beg); ! NEXT_INSN (range2after) = range1beg; ! NEXT_INSN (PREV_INSN (range1beg)) ! = range2after; ! PREV_INSN (range1beg) = range2after; ! } ! else if (NOTE_LINE_NUMBER (range2after) ! == NOTE_INSN_LOOP_BEG) ! break; } } *************** *** 2004,2007 **** --- 2097,2102 ---- || (GET_CODE (insn) == JUMP_INSN && GET_CODE (PATTERN (insn)) == RETURN) + /* A barrier can follow the return insn. */ + || GET_CODE (insn) == BARRIER /* Other kinds of notes can follow also. */ || (GET_CODE (insn) == NOTE *************** *** 3376,3379 **** --- 3471,3492 ---- } + /* Likewise if we're deleting a dispatch table. */ + + if (GET_CODE (insn) == JUMP_INSN + && (GET_CODE (PATTERN (insn)) == ADDR_VEC + || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)) + { + rtx pat = PATTERN (insn); + int i, diff_vec_p = GET_CODE (pat) == ADDR_DIFF_VEC; + int len = XVECLEN (pat, diff_vec_p); + + for (i = 0; i < len; i++) + if (--LABEL_NUSES (XEXP (XVECEXP (pat, diff_vec_p, i), 0)) == 0) + delete_insn (XEXP (XVECEXP (pat, diff_vec_p, i), 0)); + while (next && INSN_DELETED_P (next)) + next = NEXT_INSN (next); + return next; + } + while (prev && (INSN_DELETED_P (prev) || GET_CODE (prev) == NOTE)) prev = PREV_INSN (prev); *************** *** 3397,3401 **** while (next != 0 && (GET_RTX_CLASS (code = GET_CODE (next)) == 'i' ! || code == NOTE || (code == CODE_LABEL && INSN_DELETED_P (next)))) { --- 3510,3514 ---- while (next != 0 && (GET_RTX_CLASS (code = GET_CODE (next)) == 'i' ! || code == NOTE || code == BARRIER || (code == CODE_LABEL && INSN_DELETED_P (next)))) { diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/libgcc1-test.c gcc-2.7.0/libgcc1-test.c *** gcc-2.6.3/libgcc1-test.c --- gcc-2.7.0/libgcc1-test.c Wed May 24 12:53:15 1995 *************** *** 0 **** --- 1,100 ---- + /* This small function uses all the arithmetic operators that + libgcc1.c can handle. If you can link it, then + you have provided replacements for all the libgcc1.c functions that + your target machine needs. */ + + int foo (); + double dfoo (); + + /* We don't want __main here because that can drag in atexit (among other + things) which won't necessarily exist yet. */ + + main_without__main () + { + int a = foo (), b = foo (); + unsigned int au = foo (), bu = foo (); + float af = dfoo (), bf = dfoo (); + double ad = dfoo (), bd = dfoo (); + + discard (a * b); + discard (a / b); + discard (a % b); + + discard (au / bu); + discard (au % bu); + + discard (a >> b); + discard (a << b); + + discard (au >> bu); + discard (au << bu); + + ddiscard (ad + bd); + ddiscard (ad - bd); + ddiscard (ad * bd); + ddiscard (ad / bd); + ddiscard (-ad); + + ddiscard (af + bf); + ddiscard (af - bf); + ddiscard (af * bf); + ddiscard (af / bf); + ddiscard (-af); + + discard ((int) ad); + discard ((int) af); + + ddiscard ((double) a); + ddiscard ((float) a); + ddiscard ((float) ad); + + discard (ad == bd); + discard (ad < bd); + discard (ad > bd); + discard (ad != bd); + discard (ad <= bd); + discard (ad >= bd); + + discard (af == bf); + discard (af < bf); + discard (af > bf); + discard (af != bf); + discard (af <= bf); + discard (af >= bf); + + return 0; + } + + discard (x) + int x; + {} + + ddiscard (x) + double x; + {} + + foo () + { + static int table[] = {20, 69, 4, 12}; + static int idx; + + return table[idx++]; + } + + double + dfoo () + { + static double table[] = {20.4, 69.96, 4.4, 202.202}; + static int idx; + + return table[idx++]; + } + + /* Provide functions that some versions of the linker use to default + the start address if -e symbol is not used, to avoid the warning + message saying the start address is defaulted. */ + extern void start() __asm__("start"); + extern void _start() __asm__("_start"); + + void start() {} + void _start() {} diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/libgcc1.c gcc-2.7.0/libgcc1.c *** gcc-2.6.3/libgcc1.c Thu Apr 28 18:28:37 1994 --- gcc-2.7.0/libgcc1.c Thu Jun 15 07:47:41 1995 *************** *** 1,5 **** /* Subroutines needed by GCC output code on some machines. */ /* Compile this file with the Unix C compiler! */ ! /* Copyright (C) 1987, 1988, 1992, 1994 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it --- 1,5 ---- /* Subroutines needed by GCC output code on some machines. */ /* Compile this file with the Unix C compiler! */ ! /* Copyright (C) 1987, 1988, 1992, 1994, 1995 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it *************** *** 23,27 **** You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, if you link this library with other files, --- 23,28 ---- You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with other files, *************** *** 77,84 **** #endif - #ifndef perform_lshlsi3 - #define perform_lshlsi3(a, b) return a << b - #endif - #ifndef perform_ashrsi3 #define perform_ashrsi3(a, b) return a >> b --- 78,81 ---- *************** *** 294,306 **** { perform_lshrsi3 (a, b); - } - #endif - - #ifdef L_lshlsi3 - nongcc_SI_type - __lshlsi3 (a, b) - unsigned nongcc_SI_type a, b; - { - perform_lshlsi3 (a, b); } #endif --- 291,294 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/libgcc2.c gcc-2.7.0/libgcc2.c *** gcc-2.6.3/libgcc2.c Fri Oct 21 15:13:56 1994 --- gcc-2.7.0/libgcc2.c Thu Jun 15 07:48:01 1995 *************** *** 1,5 **** /* More subroutines needed by GCC output code on some machines. */ /* Compile this one with gcc. */ ! /* Copyright (C) 1989, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* More subroutines needed by GCC output code on some machines. */ /* Compile this one with gcc. */ ! /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,21 **** 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. */ /* As a special exception, if you link this library with other files, --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with other files, *************** *** 32,35 **** --- 33,37 ---- #include "tconfig.h" #include "machmode.h" + #include "defaults.h" #ifndef L_trampoline #include *************** *** 41,44 **** --- 43,58 ---- #endif + #if (SUPPORTS_WEAK == 1) && defined (ASM_OUTPUT_DEF) + #define WEAK_ALIAS + #endif + + /* Permit the tm.h file to select the endianness to use just for this + file. This is used when the endianness is determined when the + compiler is run. */ + + #ifndef LIBGCC2_WORDS_BIG_ENDIAN + #define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN + #endif + /* In the first part of this file, we are interfacing to calls generated by the compiler itself. These calls pass values into these routines *************** *** 55,60 **** --- 69,76 ---- typedef int DItype __attribute__ ((mode (DI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); + typedef float SFtype __attribute__ ((mode (SF))); typedef float DFtype __attribute__ ((mode (DF))); + #if LONG_DOUBLE_TYPE_SIZE == 96 typedef float XFtype __attribute__ ((mode (XF))); *************** *** 64,76 **** #endif ! #if BITS_PER_WORD==16 ! typedef int word_type __attribute__ ((mode (HI))); ! #endif ! #if BITS_PER_WORD==32 ! typedef int word_type __attribute__ ((mode (SI))); ! #endif ! #if BITS_PER_WORD==64 ! typedef int word_type __attribute__ ((mode (DI))); ! #endif /* Make sure that we don't accidentally use any normal C language built-in --- 80,84 ---- #endif ! typedef int word_type __attribute__ ((mode (__word__))); /* Make sure that we don't accidentally use any normal C language built-in *************** *** 91,97 **** /* DIstructs are pairs of SItype values in the order determined by ! WORDS_BIG_ENDIAN. */ ! #if WORDS_BIG_ENDIAN struct DIstruct {SItype high, low;}; #else --- 99,105 ---- /* DIstructs are pairs of SItype values in the order determined by ! LIBGCC2_WORDS_BIG_ENDIAN. */ ! #if LIBGCC2_WORDS_BIG_ENDIAN struct DIstruct {SItype high, low;}; #else *************** *** 144,187 **** #endif - #ifdef L_lshldi3 - DItype - __lshldi3 (u, b) - DItype u; - SItype b; - { - DIunion w; - SItype bm; - DIunion uu; - - if (b == 0) - return u; - - uu.ll = u; - - bm = (sizeof (SItype) * BITS_PER_UNIT) - b; - if (bm <= 0) - { - w.s.low = 0; - w.s.high = (USItype)uu.s.low << -bm; - } - else - { - USItype carries = (USItype)uu.s.low >> bm; - w.s.low = (USItype)uu.s.low << b; - w.s.high = ((USItype)uu.s.high << b) | carries; - } - - return w.ll; - } - #endif - #ifdef L_lshrdi3 DItype __lshrdi3 (u, b) DItype u; ! SItype b; { DIunion w; ! SItype bm; DIunion uu; --- 152,163 ---- #endif #ifdef L_lshrdi3 DItype __lshrdi3 (u, b) DItype u; ! word_type b; { DIunion w; ! word_type bm; DIunion uu; *************** *** 212,219 **** __ashldi3 (u, b) DItype u; ! SItype b; { DIunion w; ! SItype bm; DIunion uu; --- 188,195 ---- __ashldi3 (u, b) DItype u; ! word_type b; { DIunion w; ! word_type bm; DIunion uu; *************** *** 244,251 **** __ashrdi3 (u, b) DItype u; ! SItype b; { DIunion w; ! SItype bm; DIunion uu; --- 220,227 ---- __ashrdi3 (u, b) DItype u; ! word_type b; { DIunion w; ! word_type bm; DIunion uu; *************** *** 653,657 **** DItype u, v; { ! SItype c = 0; DIunion uu, vv; DItype w; --- 629,633 ---- DItype u, v; { ! word_type c = 0; DIunion uu, vv; DItype w; *************** *** 681,685 **** DItype u, v; { ! SItype c = 0; DIunion uu, vv; DItype w; --- 657,661 ---- DItype u, v; { ! word_type c = 0; DIunion uu, vv; DItype w; *************** *** 1023,1045 **** #define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE) #define DI_SIZE (sizeof (DItype) * BITS_PER_UNIT) ! #if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT #define DF_SIZE 53 #define SF_SIZE 24 ! #else ! #if TARGET_FLOAT_FORMAT == IBM_FLOAT_FORMAT #define DF_SIZE 56 #define SF_SIZE 24 ! #else ! #if TARGET_FLOAT_FORMAT == VAX_FLOAT_FORMAT #define DF_SIZE 56 #define SF_SIZE 24 - #else - #define DF_SIZE 0 - #define SF_SIZE 0 #endif - #endif - #endif - SFtype __floatdisf (u) --- 999,1031 ---- #define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE) #define DI_SIZE (sizeof (DItype) * BITS_PER_UNIT) ! ! /* Define codes for all the float formats that we know of. Note ! that this is copied from real.h. */ ! ! #define UNKNOWN_FLOAT_FORMAT 0 ! #define IEEE_FLOAT_FORMAT 1 ! #define VAX_FLOAT_FORMAT 2 ! #define IBM_FLOAT_FORMAT 3 ! ! /* Default to IEEE float if not specified. Nearly all machines use it. */ ! #ifndef HOST_FLOAT_FORMAT ! #define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT ! #endif ! ! #if HOST_FLOAT_FORMAT == IEEE_FLOAT_FORMAT #define DF_SIZE 53 #define SF_SIZE 24 ! #endif ! ! #if HOST_FLOAT_FORMAT == IBM_FLOAT_FORMAT #define DF_SIZE 56 #define SF_SIZE 24 ! #endif ! ! #if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT #define DF_SIZE 56 #define SF_SIZE 24 #endif SFtype __floatdisf (u) *************** *** 1081,1085 **** #if defined(L_fixunsxfsi) && LONG_DOUBLE_TYPE_SIZE == 96 ! #include "glimits.h" USItype --- 1067,1079 ---- #if defined(L_fixunsxfsi) && LONG_DOUBLE_TYPE_SIZE == 96 ! /* Reenable the normal types, in case limits.h needs them. */ ! #undef char ! #undef short ! #undef int ! #undef long ! #undef unsigned ! #undef float ! #undef double ! #include USItype *************** *** 1094,1098 **** #ifdef L_fixunsdfsi ! #include "glimits.h" USItype --- 1088,1100 ---- #ifdef L_fixunsdfsi ! /* Reenable the normal types, in case limits.h needs them. */ ! #undef char ! #undef short ! #undef int ! #undef long ! #undef unsigned ! #undef float ! #undef double ! #include USItype *************** *** 1107,1111 **** #ifdef L_fixunssfsi ! #include "glimits.h" USItype --- 1109,1121 ---- #ifdef L_fixunssfsi ! /* Reenable the normal types, in case limits.h needs them. */ ! #undef char ! #undef short ! #undef int ! #undef long ! #undef unsigned ! #undef float ! #undef double ! #include USItype *************** *** 1138,1142 **** /* Like bcmp except the sign is meaningful. ! Reult is negative if S1 is less than S2, positive if S1 is greater, 0 if S1 and S2 are equal. */ --- 1148,1152 ---- /* Like bcmp except the sign is meaningful. ! Result is negative if S1 is less than S2, positive if S1 is greater, 0 if S1 and S2 are equal. */ *************** *** 1424,1428 **** /* Simple minded basic block profiling output dumper for ! systems that don't provde tcov support. At present, it requires atexit and stdio. */ --- 1434,1438 ---- /* Simple minded basic block profiling output dumper for ! systems that don't provide tcov support. At present, it requires atexit and stdio. */ *************** *** 1432,1436 **** --- 1442,1450 ---- #ifdef HAVE_ATEXIT + #ifdef WINNT + extern int atexit (void (*) (void)); + #else extern void atexit (void (*) (void)); + #endif #define ON_EXIT(FUNC,ARG) atexit ((FUNC)) #else *************** *** 1441,1445 **** #endif ! static struct bb *bb_head = (struct bb *)0; /* Return the number of digits needed to print a value */ --- 1455,1459 ---- #endif ! static struct bb *bb_head; /* Return the number of digits needed to print a value */ *************** *** 1607,1615 **** --- 1621,1638 ---- typedef void (*vfp)(void); extern vfp __new_handler; + extern void __default_new_handler (void); + #ifdef WEAK_ALIAS + void * __builtin_new (size_t sz) + __attribute__ ((weak, alias ("___builtin_new"))); + void * + ___builtin_new (size_t sz) + #else void * __builtin_new (size_t sz) + #endif { void *p; + vfp handler = (__new_handler) ? __new_handler : __default_new_handler; /* malloc (0) is unpredictable; avoid it. */ *************** *** 1619,1623 **** while (p == 0) { ! (*__new_handler) (); p = (void *) malloc (sz); } --- 1642,1646 ---- while (p == 0) { ! (*handler) (); p = (void *) malloc (sz); } *************** *** 1633,1638 **** --- 1656,1668 ---- extern void * __builtin_new (size_t); + #ifdef WEAK_ALIAS + void * __builtin_vec_new (size_t sz) + __attribute__ ((weak, alias ("___builtin_vec_new"))); + void * + ___builtin_vec_new (size_t sz) + #else void * __builtin_vec_new (size_t sz) + #endif { return __builtin_new (sz); *************** *** 1660,1664 **** void __default_new_handler (void); ! vfp __new_handler = __default_new_handler; vfp --- 1690,1694 ---- void __default_new_handler (void); ! vfp __new_handler = (vfp)0; vfp *************** *** 1678,1685 **** --- 1708,1717 ---- __default_new_handler () { + #ifndef inhibit_libc /* don't use fprintf (stderr, ...) because it may need to call malloc. */ /* This should really print the name of the program, but that is hard to do. We need a standard, clean way to get at the name. */ write (2, MESSAGE, sizeof (MESSAGE)); + #endif /* don't call exit () because that may call global destructors which may cause a loop. */ *************** *** 1693,1698 **** --- 1725,1737 ---- as a single object. */ + #ifdef WEAK_ALIAS + void __builtin_delete (void *ptr) + __attribute__ ((weak, alias ("___builtin_delete"))); + void + ___builtin_delete (void *ptr) + #else void __builtin_delete (void *ptr) + #endif { if (ptr) *************** *** 1708,1713 **** --- 1747,1759 ---- extern void __builtin_delete (void *); + #ifdef WEAK_ALIAS + void __builtin_vec_delete (void *ptr) + __attribute__ ((weak, alias ("___builtin_vec_delete"))); + void + ___builtin_vec_delete (void *ptr) + #else void __builtin_vec_delete (void *ptr) + #endif { __builtin_delete (ptr); *************** *** 1744,1748 **** #ifdef INSN_CACHE_SIZE static char array[INSN_CACHE_SIZE + INSN_CACHE_PLANE_SIZE + INSN_CACHE_LINE_WIDTH]; ! static int initialized = 0; int offset; void *start_addr --- 1790,1794 ---- #ifdef INSN_CACHE_SIZE static char array[INSN_CACHE_SIZE + INSN_CACHE_PLANE_SIZE + INSN_CACHE_LINE_WIDTH]; ! static int initialized; int offset; void *start_addr *************** *** 1983,1987 **** cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or niether. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" --- 2029,2033 ---- cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You ! must define both, or neither. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" *************** *** 1989,1992 **** --- 2035,2039 ---- #endif + #if !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF) /* Run all the global destructors on exit from the program. */ *************** *** 2002,2005 **** --- 2049,2053 ---- #endif } + #endif #ifndef INIT_SECTION_ASM_OP *************** *** 2038,2042 **** { /* Support recursive calls to `main': run initializers just once. */ ! static int initialized = 0; if (! initialized) { --- 2086,2090 ---- { /* Support recursive calls to `main': run initializers just once. */ ! static int initialized; if (! initialized) { *************** *** 2090,2094 **** --- 2138,2144 ---- int status; { + #if !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF) __do_global_dtors (); + #endif #ifdef EXIT_BODY EXIT_BODY; *************** *** 2105,2143 **** #endif /* L_exit */ - /* In a.out systems, we need to have these dummy constructor and destructor - lists in the library. - - When using `collect', the first link will resolve __CTOR_LIST__ - and __DTOR_LIST__ to these symbols. We will then run "nm" on the - result, build the correct __CTOR_LIST__ and __DTOR_LIST__, and relink. - Since we don't do the second link if no constructors existed, these - dummies must be fully functional empty lists. - - When using `gnu ld', these symbols will be used if there are no - constructors. If there are constructors, the N_SETV symbol defined - by the linker from the N_SETT's in input files will define __CTOR_LIST__ - and __DTOR_LIST__ rather than its being allocated as common storage - by the definitions below. - - When using a linker that supports constructor and destructor segments, - these definitions will not be used, since crtbegin.o and crtend.o - (from crtstuff.c) will have already defined __CTOR_LIST__ and - __DTOR_LIST__. The crt*.o files are passed directly to the linker - on its command line, by gcc. */ - - /* The list needs two elements: one is ignored (the old count); the - second is the terminating zero. Since both values are zero, this - declaration is not initialized, and it becomes `common'. */ - - #ifdef L_ctor_list - #include "gbl-ctors.h" - func_ptr __CTOR_LIST__[2]; - #endif - - #ifdef L_dtor_list - #include "gbl-ctors.h" - func_ptr __DTOR_LIST__[2]; - #endif - #ifdef L_eh typedef struct { --- 2155,2158 ---- *************** *** 2154,2160 **** }; ! static int except_table_pos = 0; ! static void *except_pc = (void *)0; ! static struct exception_table_node *exception_table_list = 0; static exception_table * --- 2169,2175 ---- }; ! static int except_table_pos; ! static void *except_pc; ! static struct exception_table_node *exception_table_list; static exception_table * *************** *** 2254,2259 **** } ! int ! __throw_type_match (const char *catch_type, const char *throw_type) { #if 0 --- 2269,2274 ---- } ! void * ! __throw_type_match (void *catch_type, void *throw_type, void* obj) { #if 0 *************** *** 2261,2265 **** catch_type, throw_type); #endif ! return strcmp (catch_type, throw_type); } --- 2276,2282 ---- catch_type, throw_type); #endif ! if (strcmp ((const char *)catch_type, (const char *)throw_type) == 0) ! return obj; ! return 0; } *************** *** 2267,2273 **** __register_exceptions (exception_table *table) { ! struct exception_table_node *node = (struct exception_table_node*) ! malloc (sizeof (struct exception_table_node)); exception_table *range = table + 1; node->table = table; --- 2284,2295 ---- __register_exceptions (exception_table *table) { ! struct exception_table_node *node; exception_table *range = table + 1; + + if (range->start == (void*)-1) + return; + + node = (struct exception_table_node*) + malloc (sizeof (struct exception_table_node)); node->table = table; *************** *** 2280,2284 **** if (range->start < node->start) node->start = range->start; ! if (range->end < node->end) node->end = range->end; } --- 2302,2306 ---- if (range->start < node->start) node->start = range->start; ! if (range->end > node->end) node->end = range->end; } *************** *** 2287,2298 **** --- 2309,2397 ---- exception_table_list = node; } + + #if #machine(i386) + void + __unwind_function(void *ptr) + { + asm("movl 8(%esp),%ecx"); + /* Undo current frame */ + asm("movl %ebp,%esp"); + asm("popl %ebp"); + /* like ret, but stay here */ + asm("addl $4,%esp"); + + /* Now, undo previous frame. */ + /* This is a test routine, as we have to dynamically probe to find out + what to pop for certain, this is just a guess. */ + asm("leal -16(%ebp),%esp"); + asm("pop %eax"); /* really for popl %ebx */ + asm("pop %eax"); /* really for popl %esi */ + asm("pop %eax"); /* really for popl %edi */ + asm("movl %ebp,%esp"); + asm("popl %ebp"); + + asm("movl %ecx,0(%esp)"); + asm("ret"); + } + #endif + + #if #machine(rs6000) + __unwind_function(void *ptr) + { + asm("mr 31,1"); + asm("l 1,0(1)"); + asm("l 31,-4(1)"); + asm("# br"); + + asm("mr 31,1"); + asm("l 1,0(1)"); + /* use 31 as a scratch register to restore the link register. */ + asm("l 31, 8(1);mtlr 31 # l lr,8(1)"); + asm("l 31,-4(1)"); + asm("# br"); + asm("mtctr 3;bctr # b 3"); + } + #endif /* rs6000 */ + + #if #machine(powerpc) + __unwind_function(void *ptr) + { + asm("mr 31,1"); + asm("lwz 1,0(1)"); + asm("lwz 31,-4(1)"); + asm("# br"); + + asm("mr 31,1"); + asm("lwz 1,0(1)"); + /* use 31 as a scratch register to restore the link register. */ + asm("lwz 31, 8(1);mtlr 31 # l lr,8(1)"); + asm("lwz 31,-4(1)"); + asm("# br"); + asm("mtctr 3;bctr # b 3"); + } + #endif /* powerpc */ #endif /* L_eh */ #ifdef L_pure + #ifndef inhibit_libc + /* This gets us __GNU_LIBRARY__. */ + #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */ + #include + + #ifdef __GNU_LIBRARY__ + /* Avoid forcing the library's meaning of `write' on the user program + by using the "internal" name (for use within the library) */ + #define write(fd, buf, n) __write((fd), (buf), (n)) + #endif + #endif /* inhibit_libc */ + #define MESSAGE "pure virtual method called\n" + void __pure_virtual () { + #ifndef inhibit_libc write (2, MESSAGE, sizeof (MESSAGE) - 1); + #endif _exit (-1); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/limitx.h gcc-2.7.0/limitx.h *** gcc-2.6.3/limitx.h Mon Nov 30 18:08:05 1992 --- gcc-2.7.0/limitx.h Thu Dec 22 12:50:10 1994 *************** *** 8,12 **** #ifndef _LIBC_LIMITS_H_ ! /* Use <...> so that we find syslimits.h only in system include dirs. */ ! #include #endif --- 8,12 ---- #ifndef _LIBC_LIMITS_H_ ! /* Use "..." so that we find syslimits.h only in this same directory. */ ! #include "syslimits.h" #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/limity.h gcc-2.7.0/limity.h *** gcc-2.6.3/limity.h Mon Nov 30 18:08:49 1992 --- gcc-2.7.0/limity.h Thu Dec 22 12:50:11 1994 *************** *** 2,4 **** --- 2,10 ---- if the system has its own version of limits.h. */ + #else /* not _GCC_LIMITS_H_ */ + + #ifdef _GCC_NEXT_LIMITS_H + #include_next /* recurse down to the real one */ + #endif + #endif /* not _GCC_LIMITS_H_ */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/local-alloc.c gcc-2.7.0/local-alloc.c *** gcc-2.6.3/local-alloc.c Mon Aug 8 16:14:13 1994 --- gcc-2.7.0/local-alloc.c Thu Jun 15 07:48:26 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 1295,1298 **** --- 1296,1301 ---- insn_number, insn, 0); } + if (win) + break; } } *************** *** 1624,1628 **** goes to quantities that have copy preferences, then to those that have normal preferences. Within those groups, quantities with the lower ! number of preferenes have the highest priority. Of those, we use the same algorithm as above. */ --- 1627,1631 ---- goes to quantities that have copy preferences, then to those that have normal preferences. Within those groups, quantities with the lower ! number of preferences have the highest priority. Of those, we use the same algorithm as above. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/longlong.h gcc-2.7.0/longlong.h *** gcc-2.6.3/longlong.h Wed Jul 6 23:41:45 1994 --- gcc-2.7.0/longlong.h Thu Jun 15 07:48:52 1995 *************** *** 14,18 **** 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. */ #ifndef SI_TYPE_SIZE --- 14,19 ---- 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., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef SI_TYPE_SIZE *************** *** 453,457 **** : "od" ((USItype)(x)), "n" (0)) #else /* not mc68020 */ ! /* %/ inserts REGISTER_PREFIX. */ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("| Inlined umul_ppmm --- 454,458 ---- : "od" ((USItype)(x)), "n" (0)) #else /* not mc68020 */ ! /* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("| Inlined umul_ppmm *************** *** 473,479 **** add%.l %/d3,%/d2 jcc 1f ! add%.l #65536,%/d1 1: swap %/d2 ! moveq #0,%/d0 move%.w %/d2,%/d0 move%.w %/d4,%/d2 --- 474,480 ---- add%.l %/d3,%/d2 jcc 1f ! add%.l %#65536,%/d1 1: swap %/d2 ! moveq %#0,%/d0 move%.w %/d2,%/d0 move%.w %/d4,%/d2 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/loop.c gcc-2.7.0/loop.c *** gcc-2.6.3/loop.c Wed Nov 16 19:29:26 1994 --- gcc-2.7.0/loop.c Thu Jun 15 07:49:22 1995 *************** *** 1,4 **** /* Move constant computations out of loops. ! Copyright (C) 1987, 88, 89, 91, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Move constant computations out of loops. ! Copyright (C) 1987, 88, 89, 91-4, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 747,754 **** reg_single_usage[regno])) { ! /* Replace any usage in a REG_EQUAL note. */ REG_NOTES (reg_single_usage[regno]) = replace_rtx (REG_NOTES (reg_single_usage[regno]), ! SET_DEST (set), SET_SRC (set)); PUT_CODE (p, NOTE); --- 748,757 ---- reg_single_usage[regno])) { ! /* Replace any usage in a REG_EQUAL note. Must copy the ! new source, so that we don't get rtx sharing between the ! SET_SOURCE and REG_NOTES of insn p. */ REG_NOTES (reg_single_usage[regno]) = replace_rtx (REG_NOTES (reg_single_usage[regno]), ! SET_DEST (set), copy_rtx (SET_SRC (set))); PUT_CODE (p, NOTE); *************** *** 2567,2575 **** if (loop_num != -1) ! { ! LABEL_OUTSIDE_LOOP_P (x) = 1; ! LABEL_NEXTREF (x) = loop_number_exit_labels[loop_num]; ! loop_number_exit_labels[loop_num] = x; ! } return; --- 2570,2574 ---- if (loop_num != -1) ! loop_number_exit_labels[loop_num] = x; return; *************** *** 2700,2703 **** --- 2699,2708 ---- case MEM: + /* Volatile memory references must be rejected. Do this before + checking for read-only items, so that volatile read-only items + will be rejected also. */ + if (MEM_VOLATILE_P (x)) + return 0; + /* Read-only items (such as constants in a constant pool) are invariant if their address is. */ *************** *** 2707,2713 **** /* If we filled the table (or had a subroutine call), any location in memory could have been clobbered. */ ! if (unknown_address_altered ! /* Don't mess with volatile memory references. */ ! || MEM_VOLATILE_P (x)) return 0; --- 2712,2716 ---- /* If we filled the table (or had a subroutine call), any location in memory could have been clobbered. */ ! if (unknown_address_altered) return 0; *************** *** 4311,4314 **** --- 4314,4318 ---- v->new_reg = 0; v->final_value = 0; + v->same_insn = 0; /* The v->always_computable field is used in update_giv_derive, to *************** *** 4416,4459 **** } ! /* Check each insn between the first and last use of the giv, ! and fail if any of them are branches that jump to a named label ! outside this range, but still inside the loop. This catches ! cases of spaghetti code where the execution order of insns ! is not linear, and hence the above test fails. For example, ! in the following code, j is not replaceable: ! for (i = 0; i < 100; ) { ! L0: j = 4*i; goto L1; ! L2: k = j; goto L3; ! L1: i++; goto L2; ! L3: ; } ! printf ("k = %d\n", k); } ! This test is conservative, but this test succeeds rarely enough ! that it isn't a problem. See also check_final_value below. */ ! if (v->replaceable) ! for (p = insn; ! INSN_UID (p) >= max_uid_for_loop ! || INSN_LUID (p) < uid_luid[regno_last_uid[REGNO (dest_reg)]]; ! p = NEXT_INSN (p)) ! { ! if (GET_CODE (p) == JUMP_INSN && JUMP_LABEL (p) ! && LABEL_NAME (JUMP_LABEL (p)) ! && ((INSN_LUID (JUMP_LABEL (p)) > INSN_LUID (loop_start) ! && (INSN_LUID (JUMP_LABEL (p)) ! < uid_luid[regno_first_uid[REGNO (dest_reg)]])) ! || (INSN_LUID (JUMP_LABEL (p)) < INSN_LUID (loop_end) ! && (INSN_LUID (JUMP_LABEL (p)) ! > uid_luid[regno_last_uid[REGNO (dest_reg)]])))) ! { ! v->replaceable = 0; ! v->not_replaceable = 1; ! ! if (loop_dump_stream) ! fprintf (loop_dump_stream, ! "Found branch outside giv lifetime.\n"); ! ! break; ! } ! } } else --- 4420,4433 ---- } ! /* If there are any backwards branches that go from after the ! biv update to before it, then this giv is not replaceable. */ if (v->replaceable) ! for (b = bl->biv; b; b = b->next_iv) ! if (back_branch_in_range_p (b->insn, loop_start, loop_end)) ! { ! v->replaceable = 0; ! v->not_replaceable = 1; ! break; ! } } else *************** *** 5722,5725 **** --- 5696,5704 ---- (obviously true if only one write) allow 2 insns for the compare/jump at the end of the loop. */ + /* Also, we must avoid any instructions which use both the reversed + biv and another biv. Such instructions will fail if the loop is + reversed. We meet this condition by requiring that either + no_use_except_counting is true, or else that there is only + one biv. */ int num_nonfixed_reads = 0; /* 1 if the iteration var is used only to count iterations. */ *************** *** 5786,5791 **** && reversible_mem_store && (no_use_except_counting ! || (bl->giv_count + bl->biv_count + num_mem_sets ! + num_movables + 2 == insn_count))) { rtx tem; --- 5765,5771 ---- && reversible_mem_store && (no_use_except_counting ! || ((bl->giv_count + bl->biv_count + num_mem_sets ! + num_movables + 2 == insn_count) ! && (bl == loop_iv_list && bl->next == 0)))) { rtx tem; *************** *** 6394,6398 **** in cse.c */ ! while (GET_RTX_CLASS (code) == '<' && op1 == const0_rtx) { /* Set non-zero when we find something of interest. */ --- 6374,6378 ---- in cse.c */ ! while (GET_RTX_CLASS (code) == '<' && op1 == CONST0_RTX (GET_MODE (op0))) { /* Set non-zero when we find something of interest. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/loop.h gcc-2.7.0/loop.h *** gcc-2.6.3/loop.h Fri Mar 19 21:10:47 1993 --- gcc-2.7.0/loop.h Thu Jun 15 07:49:51 1995 *************** *** 16,20 **** 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. */ /* Get the luid of an insn. Catch the error of trying to reference the LUID --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Get the luid of an insn. Catch the error of trying to reference the LUID *************** *** 105,108 **** --- 106,113 ---- the address, the -constant is stored here for later use. */ + struct induction *same_insn; /* If there are multiple identical givs in + the same insn, then all but one have this + field set, and they all point to the giv + that doesn't have this field set. */ }; *************** *** 168,169 **** --- 173,175 ---- rtx final_giv_value PROTO((struct induction *, rtx, rtx)); void emit_unrolled_add PROTO((rtx, rtx, rtx)); + int back_branch_in_range_p PROTO((rtx, rtx, rtx)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/machmode.def gcc-2.7.0/machmode.def *** gcc-2.6.3/machmode.def Wed Sep 28 19:31:23 1994 --- gcc-2.7.0/machmode.def Thu Jun 15 07:50:40 1995 *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/machmode.h gcc-2.7.0/machmode.h *** gcc-2.6.3/machmode.h Tue Jun 14 22:14:10 1994 --- gcc-2.7.0/machmode.h Thu Jun 15 07:50:51 1995 *************** *** 1,4 **** /* Machine mode definitions for GNU C-Compiler; included by rtl.h and tree.h. ! Copyright (C) 1991, 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Machine mode definitions for GNU C-Compiler; included by rtl.h and tree.h. ! Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 161,169 **** #define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[(int)(CLASS)] ! /* Define the integer modes whose sizes are BITS_PER_UNIT ! and BITS_PER_WORD. */ extern enum machine_mode byte_mode; extern enum machine_mode word_mode; #endif /* not HAVE_MACHINE_MODES */ --- 162,171 ---- #define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[(int)(CLASS)] ! /* Define the integer modes whose sizes are BITS_PER_UNIT and BITS_PER_WORD ! and the mode whose class is Pmode and whose size is POINTER_SIZE. */ extern enum machine_mode byte_mode; extern enum machine_mode word_mode; + extern enum machine_mode ptr_mode; #endif /* not HAVE_MACHINE_MODES */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/make-cc1.com gcc-2.7.0/make-cc1.com *** gcc-2.6.3/make-cc1.com Mon Jul 11 15:28:56 1994 --- gcc-2.7.0/make-cc1.com Fri May 19 06:57:07 1995 *************** *** 25,28 **** --- 25,29 ---- $ EDIT = "edit" $ SEARCH= "search" + $ ABORT = "exit %x002C" $ echo = "write sys$output" $! *************** *** 85,89 **** $! Now figure out what we have been requested to do. $p1 = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7 ! $p1 = f$edit(p1,"COMPRESS") $i=0 $DO_ALL = 0 --- 86,90 ---- $! Now figure out what we have been requested to do. $p1 = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7 ! $p1 = f$edit(p1,"COMPRESS,TRIM") $i=0 $DO_ALL = 0 *************** *** 91,94 **** --- 92,97 ---- $DO_DEBUG = 0 $DO_CC1PLUS = 0 + $DO_CC1OBJ = 0 + $DO_OBJCLIB = 0 $if f$trnlnm("cfile$").nes."" then close/noLog cfile$ $open cfile$ compilers.list *************** *** 106,109 **** --- 109,117 ---- $if string.eqs."CC1PLUS" then DO_DEFAULT = 0 $if string.eqs."CC1OBJ" then DO_DEFAULT = 0 + $if string.eqs."OBJCLIB" + $then DO_DEFAULT = 0 + $ DO_INDEPENDENT = DO_CC1OBJ + $ DO_BC = DO_CC1OBJ + $endif $if f$extract(0,2,string).nes."NO" then goto parse_option $ string=f$extract(2,f$length(string)-2,string) *************** *** 124,127 **** --- 132,136 ---- $if DO_INDEPENDENT.eq.1 then echo " Compile language independent object modules." $if DO_BC.eq.1 then echo " Compile byte compiler object modules." + $if DO_OBJCLIB.eq.1 then echo " Create Objective-C run-time library." $link_only: $if DO_CC1.eq.1 then echo " Link C compiler (gcc-cc1.exe)." *************** *** 188,198 **** $ THEN $ call compile bi_all.opt "" ! $ open ifile$ bc_all.opt $ read ifile$ bc_line $ close ifile$ $ bc_index = 0 $bc_loop: ! $ tfile = f$element(bc_index, " ", bc_line) ! $ if tfile.eqs." " then goto bc_done $ call bc_generate 'tfile' "bi_all.opt/opt," $ bc_index = bc_index + 1 --- 197,208 ---- $ THEN $ call compile bi_all.opt "" ! $ if f$trnlnm("ifile$").nes."" then close/noLog ifile$ ! $ open ifile$ bc_all.list $ read ifile$ bc_line $ close ifile$ $ bc_index = 0 $bc_loop: ! $ tfile = f$element(bc_index, ",", bc_line) ! $ if tfile.eqs."," then goto bc_done $ call bc_generate 'tfile' "bi_all.opt/opt," $ bc_index = bc_index + 1 *************** *** 310,313 **** --- 320,354 ---- $cdone: close cfile$ $! + $ if DO_OBJCLIB + $ then set default [.objc] !push + $ save_cflags = CFLAGS + $ CFLAGS = CFLAGS - CINCL1 - CINCL2 + CINCL_SUB + $ MFLAGS = "/Lang=ObjC" + CFLAGS + $ library/Obj [-]objclib.olb/Create + $ if f$trnlnm("IFILE$").nes."" then close/noLog ifile$ + $ open/Read ifile$ [-]objc-objs.opt + $ocl1: read/End=ocl3 ifile$ line + $ i = 0 + $ocl2: o = f$element(i,",",line) + $ if o.eqs."," then goto ocl1 + $ n = o - ".o" + $ if f$search(n + ".m").nes."" + $ then f = n + ".m" + $ flags = MFLAGS + $ else f = n + ".c" + $ flags = CFLAGS + $ endif + $ set verify + $ 'CC' 'flags' 'f' + $!'f$verify(0)' + $ library/Obj [-]objclib.olb 'n'.obj/Insert + $ delete/noConfirm/noLog 'n'.obj;* + $ i = i + 1 + $ goto ocl2 + $ocl3: close ifile$ + $ CFLAGS = save_cflags + $ set default [-] !pop + $ endif !DO_OBJCLIB + $! $! Done $! *************** *** 342,348 **** $prfx = "" $k = f$locate("]",flnm) ! $if k.eq.1 then goto loop1 ![]c-common for [.cp] ! $if k.lt.f$length(flnm) then prfx = f$extract(2,k-2,flnm) ! $if k.lt.f$length(flnm) then flnm = f$extract(k+1,99,flnm) $ if prfx.nes."" $ then set default [.'prfx'] !push --- 383,395 ---- $prfx = "" $k = f$locate("]",flnm) ! $if k.eq.1 ![]c-common for [.cp] ! $then ! $ if f$search(f$parse(".obj",flnm)).nes."" then goto loop1 ! $ flnm = f$extract(2,999,flnm) ! $else if k.lt.f$length(flnm) ! $ then prfx = f$extract(2,k-2,flnm) ! $ flnm = f$extract(k+1,99,flnm) ! $ endif ! $endif $ if prfx.nes."" $ then set default [.'prfx'] !push *************** *** 390,394 **** $c_err: !'f$verify(0) $close ifile$ ! $exit %x2c $! $c_done: --- 437,441 ---- $c_err: !'f$verify(0) $close ifile$ ! $ABORT $! $c_done: *************** *** 406,410 **** $ then $ write sys$error "Unknown file passed to generate." ! $ exit 1 $ endif $root1=f$parse(f$extract(5,255,p1),,,"NAME") --- 453,457 ---- $ then $ write sys$error "Unknown file passed to generate." ! $ ABORT $ endif $root1=f$parse(f$extract(5,255,p1),,,"NAME") *************** *** 417,421 **** $set verify $ assign/user 'p1' sys$output: ! $ mcr sys$disk:[]GEN'root1' md $!'f$verify(0) $endsubroutine --- 464,468 ---- $set verify $ assign/user 'p1' sys$output: ! $ mcr sys$disk:[]GEN'root1' vax.md $!'f$verify(0) $endsubroutine *************** *** 430,435 **** $if f$extract(0,3,p1).nes."BC-" $ then ! $ write sys$error "Unknown file passed to generate." ! $ exit 1 $ endif $root1=f$parse(f$extract(3,255,p1),,,"NAME") --- 477,482 ---- $if f$extract(0,3,p1).nes."BC-" $ then ! $ write sys$error "Unknown file passed to bc_generate." ! $ ABORT $ endif $root1=f$parse(f$extract(3,255,p1),,,"NAME") diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/make-gcc.com gcc-2.7.0/make-gcc.com *** gcc-2.6.3/make-gcc.com Sat Aug 1 23:24:04 1992 --- gcc-2.7.0/make-gcc.com Tue Dec 6 18:41:01 1994 *************** *** 6,10 **** $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")' $! - $set symbol/scope=(nolocal,noglobal) $! $! First, build the preprocessor. --- 6,9 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/md.texi gcc-2.7.0/md.texi *** gcc-2.6.3/md.texi Thu Nov 3 17:52:06 1994 --- gcc-2.7.0/md.texi Thu Jun 15 17:27:19 1995 *************** *** 1804,1807 **** --- 1804,1817 ---- multiplication. + @cindex @code{smul@var{m}3_highpart} instruction pattern + @item @samp{mul@var{m}3_highpart} + Perform a signed multiplication of operands 1 and 2, which have mode + @var{m}, and store the most significant half of the product in operand 0. + The least significant half of the product is discarded. + + @cindex @code{umul@var{m}3_highpart} instruction pattern + @item @samp{umul@var{m}3_highpart} + Similar, but the multiplication is unsigned. + @cindex @code{divmod@var{m}4} instruction pattern @item @samp{divmod@var{m}4} *************** *** 2017,2020 **** --- 2027,2044 ---- for operands 1 and 2. + @cindex @code{mov@var{mode}cc} instruction pattern + @item @samp{mov@var{mode}cc} + Conditionally move operand 2 or operand 3 into operand 0 according to the + comparison in operand 1. If the comparison is true, operand 2 is moved + into operand 0, otherwise operand 3 is moved. + + The mode of the operands being compared need not be the same as the operands + being moved. Some machines, sparc64 for example, have instructions that + conditionally move an integer value based on the floating point condition + codes and vice versa. + + If the machine does not have conditional move instructions, do not + define these patterns. + @cindex @code{s@var{cond}} instruction pattern @item @samp{s@var{cond}} *************** *** 2067,2071 **** tested, should also use the above mechanism. @xref{Jump Patterns} ! The above discussion also applies to @samp{s@var{cond}} patterns. @cindex @code{call} instruction pattern --- 2091,2096 ---- tested, should also use the above mechanism. @xref{Jump Patterns} ! The above discussion also applies to the @samp{mov@var{mode}cc} and ! @samp{s@var{cond}} patterns. @cindex @code{call} instruction pattern *************** *** 2405,2417 **** If a constraint in a pattern allows a constant, the reload pass may replace a register with a constant permitted by the constraint in some ! cases. Similarly for memory references. You must ensure that the ! predicate permits all objects allowed by the constraints to prevent the ! compiler from crashing. ! ! Because of this substitution, you should not provide separate patterns ! for increment and decrement instructions. Instead, they should be ! generated from the same pattern that supports register-register add ! insns by examining the operands and generating the appropriate machine ! instruction. @node Jump Patterns --- 2430,2438 ---- If a constraint in a pattern allows a constant, the reload pass may replace a register with a constant permitted by the constraint in some ! cases. Similarly for memory references. Because of this substitution, ! you should not provide separate patterns for increment and decrement ! instructions. Instead, they should be generated from the same pattern ! that supports register-register add insns by examining the operands and ! generating the appropriate machine instruction. @node Jump Patterns *************** *** 2881,2887 **** The condition, a string containing a C expression. This expression is used to express how the availability of this pattern depends on ! subclasses of target machine, selected by command-line options when ! GNU CC is run. This is just like the condition of a ! @code{define_insn} that has a standard name. @item --- 2902,2912 ---- The condition, a string containing a C expression. This expression is used to express how the availability of this pattern depends on ! subclasses of target machine, selected by command-line options when GNU ! CC is run. This is just like the condition of a @code{define_insn} that ! has a standard name. Therefore, the condition (if present) may not ! depend on the data in the insn being matched, but only the ! target-machine-type flags. The compiler needs to test these conditions ! during initialization in order to learn exactly which named instructions ! are available in a particular run. @item diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/mips-tdump.c gcc-2.7.0/mips-tdump.c *** gcc-2.6.3/mips-tdump.c Fri Nov 11 16:37:25 1994 --- gcc-2.7.0/mips-tdump.c Thu Jun 15 07:51:19 1995 *************** *** 18,22 **** 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 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 595,599 **** case bt_Indirect: /* forward or unnamed typedef */ ! strcpy (p1, "forward/unamed typedef"); break; --- 596,600 ---- case bt_Indirect: /* forward or unnamed typedef */ ! strcpy (p1, "forward/unnamed typedef"); break; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/mips-tfile.c gcc-2.7.0/mips-tfile.c *** gcc-2.6.3/mips-tfile.c Mon Apr 11 05:49:27 1994 --- gcc-2.7.0/mips-tfile.c Thu Jun 15 07:51:47 1995 *************** *** 3,7 **** in the form of comments (the mips assembler does not support assembly access to debug information). ! Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Meissner, meissner@osf.org --- 3,7 ---- in the form of comments (the mips assembler does not support assembly access to debug information). ! Copyright (C) 1991, 1993, 1994. 1995 Free Software Foundation, Inc. Contributed by Michael Meissner, meissner@osf.org *************** *** 20,24 **** 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. */ --- 20,25 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 672,677 **** #ifdef HAVE_VPRINTF ! extern void fatal PVPROTO((char *format, ...)); ! extern void error PVPROTO((char *format, ...)); #else /* We must not provide any prototype here, even if ANSI C. */ --- 673,678 ---- #ifdef HAVE_VPRINTF ! extern void fatal PVPROTO((const char *format, ...)); ! extern void error PVPROTO((const char *format, ...)); #else /* We must not provide any prototype here, even if ANSI C. */ *************** *** 1160,1164 **** 1, /* fMerge: whether this file can be merged */ 0, /* fReadin: true if read in (not just created) */ ! #if BYTES_BIG_ENDIAN 1, /* fBigendian: if 1, compiled on big endian machine */ #else --- 1161,1165 ---- 1, /* fMerge: whether this file can be merged */ 0, /* fReadin: true if read in (not just created) */ ! #ifdef HOST_WORDS_BIG_ENDIAN 1, /* fBigendian: if 1, compiled on big endian machine */ #else *************** *** 2360,2364 **** }; ! /* NOTE: Mips documentation claism that the bitfield width goes here. But it needs to be emitted earlier. */ --- 2361,2365 ---- }; ! /* NOTE: Mips documentation claims that the bitfield width goes here. But it needs to be emitted earlier. */ *************** *** 3333,3337 **** else if (symbol_type == st_Member && t.num_sizes - t.extra_sizes == 1) ! { /* Is this a bitfield? This is indicated by a structure memeber having a size field that isn't an array. */ --- 3334,3338 ---- else if (symbol_type == st_Member && t.num_sizes - t.extra_sizes == 1) ! { /* Is this a bitfield? This is indicated by a structure member having a size field that isn't an array. */ *************** *** 3633,3637 **** if (!stabs_seen) { ! /* Add a dummy @stabs dymbol. */ stabs_seen = 1; (void) add_local_symbol (stabs_symbol, --- 3634,3638 ---- if (!stabs_seen) { ! /* Add a dummy @stabs symbol. */ stabs_seen = 1; (void) add_local_symbol (stabs_symbol, *************** *** 5607,5611 **** /*VARARGS*/ void ! fatal VPROTO((char *format, ...)) { #ifndef __STDC__ --- 5608,5612 ---- /*VARARGS*/ void ! fatal VPROTO((const char *format, ...)) { #ifndef __STDC__ *************** *** 5637,5641 **** /*VARARGS*/ void ! error VPROTO((char *format, ...)) { #ifndef __STDC__ --- 5638,5642 ---- /*VARARGS*/ void ! error VPROTO((const char *format, ...)) { #ifndef __STDC__ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/modemap.def gcc-2.7.0/modemap.def *** gcc-2.6.3/modemap.def Wed Sep 22 13:56:31 1993 --- gcc-2.7.0/modemap.def Thu Jun 15 07:52:34 1995 *************** *** 16,20 **** 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. */ /* Map mode to signed, unsigned typecodes, bytecode to push const, --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Map mode to signed, unsigned typecodes, bytecode to push const, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/Makefile gcc-2.7.0/objc/Makefile *** gcc-2.6.3/objc/Makefile Mon Nov 7 21:51:25 1994 --- gcc-2.7.0/objc/Makefile Thu Jun 15 17:07:09 1995 *************** *** 1,4 **** # GNU Objective C Runtime Makefile ! # Copyright (C) 1993 Free Software Foundation, Inc. # # This file is part of GNU CC. --- 1,4 ---- # GNU Objective C Runtime Makefile ! # Copyright (C) 1993, 1995 Free Software Foundation, Inc. # # This file is part of GNU CC. *************** *** 15,19 **** # 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 makefile is run by the parent dir's makefile. --- 15,20 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # This makefile is run by the parent dir's makefile. *************** *** 27,30 **** --- 28,33 ---- # Two targets are used by ../Makefile: `all' and `mostlyclean'. + SHELL=/bin/sh + .SUFFIXES: .m *************** *** 54,58 **** OBJC_O = hash.o sarray.o class.o sendmsg.o init.o archive.o encoding.o \ ! selector.o objects.o misc.o Object.o Protocol.o libobjc.a: $(OBJC_O) --- 57,61 ---- OBJC_O = hash.o sarray.o class.o sendmsg.o init.o archive.o encoding.o \ ! selector.o objects.o misc.o NXConstStr.o Object.o Protocol.o libobjc.a: $(OBJC_O) *************** *** 63,67 **** OBJC_H = hash.h list.h sarray.h objc.h \ objc-api.h \ ! Object.h Protocol.h encoding.h typedstream.h # copy objc headers to installation include directory --- 66,70 ---- OBJC_H = hash.h list.h sarray.h objc.h \ objc-api.h \ ! NXConstStr.h Object.h Protocol.h encoding.h typedstream.h # copy objc headers to installation include directory *************** *** 70,76 **** -mkdir $(incinstalldir)/objc for file in $(OBJC_H); do \ ! realfile=$(srcdir)/objc/$$file; \ ! cp $$realfile $(incinstalldir)/objc; \ ! chmod a+r $(incinstalldir)/objc/$$file; \ done --- 73,79 ---- -mkdir $(incinstalldir)/objc for file in $(OBJC_H); do \ ! realfile=$(srcdir)/objc/$${file}; \ ! cp $${realfile} $(incinstalldir)/objc; \ ! chmod a+r $(incinstalldir)/objc/$${file}; \ done *************** *** 93,96 **** --- 96,100 ---- objects.o: objects.c misc.o: misc.c + NXConstStr.o: NXConstStr.m Object.o: Object.m Protocol.o: Protocol.m diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/NXConstStr.h gcc-2.7.0/objc/NXConstStr.h *** gcc-2.6.3/objc/NXConstStr.h --- gcc-2.7.0/objc/NXConstStr.h Thu Jun 15 08:34:08 1995 *************** *** 0 **** --- 1,38 ---- + /* Interface for the NXConstantString class for Objective-C. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Pieter J. Schoenmakers + + 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 2, 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 + 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef __nxconstantstring_INCLUDE_GNU + #define __nxconstantstring_INCLUDE_GNU + + #include "objc/Object.h" + + @interface NXConstantString: Object + { + char *c_string; + unsigned int len; + } + + -(const char *) cString; + -(unsigned int) length; + + @end + + #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/NXConstStr.m gcc-2.7.0/objc/NXConstStr.m *** gcc-2.6.3/objc/NXConstStr.m --- gcc-2.7.0/objc/NXConstStr.m Thu Jun 15 08:34:30 1995 *************** *** 0 **** --- 1,36 ---- + /* Implementation of the NXConstantString class for Objective-C. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Pieter J. Schoenmakers + + 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 2, 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 + 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "objc/NXConstStr.h" + + @implementation NXConstantString + + -(const char *) cString + { + return (c_string); + } /* -cString */ + + -(unsigned int) length + { + return (len); + } /* -length */ + + @end diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/Object.h gcc-2.7.0/objc/Object.h *** gcc-2.6.3/objc/Object.h Mon Jul 11 14:02:02 1994 --- gcc-2.7.0/objc/Object.h Thu Jun 15 08:34:59 1995 *************** *** 1,4 **** /* Interface for the Object class for Objective-C. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Interface for the Object class for Objective-C. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files compiled --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled *************** *** 36,40 **** @interface Object { ! Class* isa; /* A pointer to the instance's class structure */ } --- 37,41 ---- @interface Object { ! Class isa; /* A pointer to the instance's class structure */ } *************** *** 53,59 **** /* Identifying classes */ ! - (Class*)class; ! - (Class*)superClass; ! - (MetaClass*)metaClass; - (const char *)name; --- 54,60 ---- /* Identifying classes */ ! - (Class)class; ! - (Class)superClass; ! - (MetaClass)metaClass; - (const char *)name; *************** *** 70,75 **** /* Testing inheritance relationships */ ! - (BOOL)isKindOf:(Class*)aClassObject; ! - (BOOL)isMemberOf:(Class*)aClassObject; - (BOOL)isKindOfClassNamed:(const char *)aClassName; - (BOOL)isMemberOfClassNamed:(const char *)aClassName; --- 71,76 ---- /* Testing inheritance relationships */ ! - (BOOL)isKindOf:(Class)aClassObject; ! - (BOOL)isMemberOf:(Class)aClassObject; - (BOOL)isKindOfClassNamed:(const char *)aClassName; - (BOOL)isMemberOfClassNamed:(const char *)aClassName; *************** *** 98,103 **** /* Posing */ ! + poseAs:(Class*)aClassObject; ! - (Class*)transmuteClassTo:(Class*)aClassObject; /* Enforcing intentions */ --- 99,104 ---- /* Posing */ ! + poseAs:(Class)aClassObject; ! - (Class)transmuteClassTo:(Class)aClassObject; /* Enforcing intentions */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/Object.m gcc-2.7.0/objc/Object.m *** gcc-2.6.3/objc/Object.m Wed Sep 7 11:30:36 1994 --- gcc-2.7.0/objc/Object.m Thu Jun 15 08:35:28 1995 *************** *** 1,4 **** /* The implementation of class Object for Objective-C. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* The implementation of class Object for Objective-C. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files compiled --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled *************** *** 82,96 **** } ! - (Class*)class { return object_get_class(self); } ! - (Class*)superClass { return object_get_super_class(self); } ! - (MetaClass*)metaClass { return object_get_meta_class(self); --- 83,97 ---- } ! - (Class)class { return object_get_class(self); } ! - (Class)superClass { return object_get_super_class(self); } ! - (MetaClass)metaClass { return object_get_meta_class(self); *************** *** 144,150 **** } ! - (BOOL)isKindOf:(Class*)aClassObject { ! Class* class; for (class = self->isa; class!=Nil; class = class_get_super_class(class)) --- 145,151 ---- } ! - (BOOL)isKindOf:(Class)aClassObject { ! Class class; for (class = self->isa; class!=Nil; class = class_get_super_class(class)) *************** *** 154,158 **** } ! - (BOOL)isMemberOf:(Class*)aClassObject { return self->isa==aClassObject; --- 155,159 ---- } ! - (BOOL)isMemberOf:(Class)aClassObject { return self->isa==aClassObject; *************** *** 161,165 **** - (BOOL)isKindOfClassNamed:(const char *)aClassName { ! Class* class; if (aClassName!=NULL) --- 162,166 ---- - (BOOL)isKindOfClassNamed:(const char *)aClassName { ! Class class; if (aClassName!=NULL) *************** *** 205,209 **** id parent; ! for (proto_list = ((Class*)self)->protocols; proto_list; proto_list = proto_list->next) { --- 206,210 ---- id parent; ! for (proto_list = ((Class)self)->protocols; proto_list; proto_list = proto_list->next) { *************** *** 281,290 **** } ! + poseAs:(Class*)aClassObject { return class_pose_as(self, aClassObject); } ! - (Class*)transmuteClassTo:(Class*)aClassObject { if (object_is_instance(self)) --- 282,291 ---- } ! + poseAs:(Class)aClassObject { return class_pose_as(self, aClassObject); } ! - (Class)transmuteClassTo:(Class)aClassObject { if (object_is_instance(self)) *************** *** 293,297 **** if ([self isKindOf:aClassObject]) { ! Class* old_isa = isa; isa = aClassObject; return old_isa; --- 294,298 ---- if ([self isKindOf:aClassObject]) { ! Class old_isa = isa; isa = aClassObject; return old_isa; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/Protocol.h gcc-2.7.0/objc/Protocol.h *** gcc-2.6.3/objc/Protocol.h Mon Jul 11 14:02:03 1994 --- gcc-2.7.0/objc/Protocol.h Thu Jun 15 08:36:03 1995 *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/Protocol.m gcc-2.7.0/objc/Protocol.m *** gcc-2.6.3/objc/Protocol.m Mon Jul 11 14:02:04 1994 --- gcc-2.7.0/objc/Protocol.m Thu Jun 15 08:36:35 1995 *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/README gcc-2.7.0/objc/README *** gcc-2.6.3/objc/README Fri Sep 16 11:51:24 1994 --- gcc-2.7.0/objc/README Mon May 15 23:12:15 1995 *************** *** 16,21 **** ===================== ! The runtime is moddeled after the NeXT Objective C runtime. That is, ! most functions have semanthics as it is known from the NeXT. The names, however, have changed. All runtime API functions have names of lowercase letters and and underscores as opposed to the --- 16,21 ---- ===================== ! The runtime is modeled after the NeXT Objective C runtime. That is, ! most functions have semantics as it is known from the NeXT. The names, however, have changed. All runtime API functions have names of lowercase letters and and underscores as opposed to the *************** *** 24,29 **** Someone offered to write it, and did it, but we were not allowed to use it by his university (Very sad story). We have started writing ! the documentation over again. This will be announced appropriate ! places when it becomes avilable. --- 24,29 ---- Someone offered to write it, and did it, but we were not allowed to use it by his university (Very sad story). We have started writing ! the documentation over again. This will be announced in appropriate ! places when it becomes available. *************** *** 31,35 **** ========= ! Protocols are now fully supported. The semanthics is exactly as on the NeXT. There is a flag to specify how protocols should be typechecked when adopted to classes. The normal typechecker requires that all --- 31,35 ---- ========= ! Protocols are now fully supported. The semantics is exactly as on the NeXT. There is a flag to specify how protocols should be typechecked when adopted to classes. The normal typechecker requires that all *************** *** 51,55 **** for each category. The order in which these (multiple methods) are called is not well defined. I am not completely certain what the ! semathics of this method is for other implementations, but this is how it works for GNU Objective C. --- 51,55 ---- for each category. The order in which these (multiple methods) are called is not well defined. I am not completely certain what the ! semantics of this method is for other implementations, but this is how it works for GNU Objective C. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/archive.c gcc-2.7.0/objc/archive.c *** gcc-2.6.3/objc/archive.c Mon Oct 10 11:22:17 1994 --- gcc-2.7.0/objc/archive.c Thu Jun 15 08:36:59 1995 *************** *** 1,21 **** /* GNU Objective C Runtime archiving ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,21 ---- /* GNU Objective C Runtime archiving ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup 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 2, 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 46,50 **** static int ! objc_read_class (struct objc_typed_stream* stream, Class** class); int objc_sizeof_type(const char* type); --- 46,50 ---- static int ! objc_read_class (struct objc_typed_stream* stream, Class* class); int objc_sizeof_type(const char* type); *************** *** 439,443 **** objc_write_string_atomic(stream, (char*)class->name, strlen((char*)class->name)); ! return objc_write_unsigned_long (stream, CLS_GETNUMBER(class)); } --- 439,443 ---- objc_write_string_atomic(stream, (char*)class->name, strlen((char*)class->name)); ! return objc_write_unsigned_long (stream, class->version); } *************** *** 464,469 **** __objc_write_selector (struct objc_typed_stream* stream, SEL selector) { ! const char* sel_name = sel_get_name (selector); __objc_write_extension (stream, _BX_SEL); return objc_write_string (stream, sel_name, strlen ((char*)sel_name)); } --- 464,473 ---- __objc_write_selector (struct objc_typed_stream* stream, SEL selector) { ! const char* sel_name; __objc_write_extension (stream, _BX_SEL); + /* to handle NULL selectors */ + if ((SEL)0 == selector) + return objc_write_string (stream, "", 0); + sel_name = sel_get_name (selector); return objc_write_string (stream, sel_name, strlen ((char*)sel_name)); } *************** *** 472,477 **** objc_write_selector (struct objc_typed_stream* stream, SEL selector) { ! const char* sel_name = sel_get_name (selector); unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, sel_name)))) return objc_write_use_common (stream, key); --- 476,487 ---- objc_write_selector (struct objc_typed_stream* stream, SEL selector) { ! const char* sel_name; unsigned long key; + + /* to handle NULL selectors */ + if ((SEL)0 == selector) + return __objc_write_selector (stream, selector); + + sel_name = sel_get_name (selector); if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, sel_name)))) return objc_write_use_common (stream, key); *************** *** 797,801 **** if (buf[0] == (_B_EXT | _BX_OBJECT)) { ! Class* class; /* get class */ --- 807,811 ---- if (buf[0] == (_B_EXT | _BX_OBJECT)) { ! Class class; /* get class */ *************** *** 850,854 **** static int ! objc_read_class (struct objc_typed_stream* stream, Class** class) { unsigned char buf[sizeof (unsigned int)]; --- 860,864 ---- static int ! objc_read_class (struct objc_typed_stream* stream, Class* class) { unsigned char buf[sizeof (unsigned int)]; *************** *** 919,923 **** /* get selector */ len = objc_read_string (stream, &selector_name); ! (*selector) = sel_get_any_uid(selector_name); free (selector_name); --- 929,940 ---- /* get selector */ len = objc_read_string (stream, &selector_name); ! /* To handle NULL selectors */ ! if (0 == strlen(selector_name)) ! { ! (*selector) = (SEL)0; ! return 0; ! } ! else ! (*selector) = sel_get_any_uid(selector_name); free (selector_name); *************** *** 959,963 **** case _C_CLASS: ! return objc_write_class (stream, *(Class**)data); break; --- 976,980 ---- case _C_CLASS: ! return objc_write_class (stream, *(Class*)data); break; *************** *** 1053,1057 **** case _C_CLASS: ! return objc_read_class (stream, (Class**)data); break; --- 1070,1074 ---- case _C_CLASS: ! return objc_read_class (stream, (Class*)data); break; *************** *** 1154,1158 **** case _C_CLASS: ! res = objc_write_class (stream, *va_arg(args, Class**)); break; --- 1171,1175 ---- case _C_CLASS: ! res = objc_write_class (stream, *va_arg(args, Class*)); break; *************** *** 1253,1257 **** case _C_CLASS: ! res = objc_read_class(stream, va_arg(args, Class**)); break; --- 1270,1274 ---- case _C_CLASS: ! res = objc_read_class(stream, va_arg(args, Class*)); break; *************** *** 1590,1594 **** long ! objc_get_stream_class_version (TypedStream* stream, Class* class) { if (stream->class_table) --- 1607,1611 ---- long ! objc_get_stream_class_version (TypedStream* stream, Class class) { if (stream->class_table) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/class.c gcc-2.7.0/objc/class.c *** gcc-2.6.3/objc/class.c Mon Aug 29 19:01:25 1994 --- gcc-2.7.0/objc/class.c Thu Jun 15 08:37:45 1995 *************** *** 1,21 **** /* GNU Objective C Runtime class related functions ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup, Dennis Glatting - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,20 ---- /* GNU Objective C Runtime class related functions ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup and Dennis Glatting. 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 34,38 **** objc_lookup_class if the runtime is not able to find the class. This may e.g. try to load in the class using dynamic loading */ ! Class* (*_objc_lookup_class)(const char* name) = 0; --- 33,37 ---- objc_lookup_class if the runtime is not able to find the class. This may e.g. try to load in the class using dynamic loading */ ! Class (*_objc_lookup_class)(const char* name) = 0; *************** *** 60,66 **** class a number, unless it's already known */ void ! __objc_add_class_to_hash(Class* class) { ! Class* h_class; /* make sure the table is there */ --- 59,65 ---- class a number, unless it's already known */ void ! __objc_add_class_to_hash(Class class) { ! Class h_class; /* make sure the table is there */ *************** *** 89,95 **** identify a known class, the hook _objc_lookup_class is called. If this fails, nil is returned */ ! Class* objc_lookup_class (const char* name) { ! Class* class; /* Make sure the class hash table exists. */ --- 88,94 ---- identify a known class, the hook _objc_lookup_class is called. If this fails, nil is returned */ ! Class objc_lookup_class (const char* name) { ! Class class; /* Make sure the class hash table exists. */ *************** *** 110,117 **** identify a known class, the hook _objc_lookup_class is called. If this fails, an error message is issued and the system aborts */ ! Class* objc_get_class (const char *name) { ! Class* class; /* Make sure the class hash table exists. */ --- 109,116 ---- identify a known class, the hook _objc_lookup_class is called. If this fails, an error message is issued and the system aborts */ ! Class objc_get_class (const char *name) { ! Class class; /* Make sure the class hash table exists. */ *************** *** 133,137 **** } ! MetaClass* objc_get_meta_class(const char *name) { --- 132,136 ---- } ! MetaClass objc_get_meta_class(const char *name) { *************** *** 148,152 **** ... do something with class; */ ! Class* objc_next_class(void **enum_state) { --- 147,151 ---- ... do something with class; */ ! Class objc_next_class(void **enum_state) { *************** *** 158,162 **** if (*(node_ptr*)enum_state) return (*(node_ptr*)enum_state)->value; ! return (Class*)0; } --- 157,161 ---- if (*(node_ptr*)enum_state) return (*(node_ptr*)enum_state)->value; ! return (Class)0; } *************** *** 167,171 **** { node_ptr node; ! Class* object_class = objc_get_class ("Object"); assert(object_class); --- 166,170 ---- { node_ptr node; ! Class object_class = objc_get_class ("Object"); assert(object_class); *************** *** 175,179 **** node = hash_next (__objc_class_hash, node)) { ! Class* class1 = node->value; /* Make sure we have what we think we have. */ --- 174,178 ---- node = hash_next (__objc_class_hash, node)) { ! Class class1 = node->value; /* Make sure we have what we think we have. */ *************** *** 191,195 **** if(class1->super_class) { ! Class* a_super_class = objc_get_class ((char *) class1->super_class); --- 190,194 ---- if(class1->super_class) { ! Class a_super_class = objc_get_class ((char *) class1->super_class); *************** *** 226,231 **** node = hash_next (__objc_class_hash, node)) { ! Class* class1 = node->value; ! Class* sub_class; for (sub_class = class1->subclass_list; sub_class; sub_class = sub_class->sibling_class) --- 225,230 ---- node = hash_next (__objc_class_hash, node)) { ! Class class1 = node->value; ! Class sub_class; for (sub_class = class1->subclass_list; sub_class; sub_class = sub_class->sibling_class) *************** *** 242,250 **** #define CLASSOF(c) ((c)->class_pointer) ! Class* ! class_pose_as (Class* impostor, Class* super_class) { node_ptr node; ! Class* class1; if (!CLS_ISRESOLV (impostor)) --- 241,249 ---- #define CLASSOF(c) ((c)->class_pointer) ! Class ! class_pose_as (Class impostor, Class super_class) { node_ptr node; ! Class class1; if (!CLS_ISRESOLV (impostor)) *************** *** 260,273 **** { ! Class **subclass = &(super_class->subclass_list); /* move subclasses of super_class to impostor */ while (*subclass) { ! Class *nextSub = (*subclass)->sibling_class; if (*subclass != impostor) { ! Class *sub = *subclass; /* classes */ --- 259,272 ---- { ! Class *subclass = &(super_class->subclass_list); /* move subclasses of super_class to impostor */ while (*subclass) { ! Class nextSub = (*subclass)->sibling_class; if (*subclass != impostor) { ! Class sub = *subclass; /* classes */ *************** *** 277,283 **** /* It will happen that SUB is not a class object if it is ! the top of the meta class hierachy chain. (root ! meta-class objects inherit theit class object) If that is ! the case... dont mess with the meta-meta class. */ if (CLS_ISCLASS (sub)) { --- 276,282 ---- /* It will happen that SUB is not a class object if it is ! the top of the meta class hierarchy chain. (root ! meta-class objects inherit their class object) If that is ! the case... don't mess with the meta-meta class. */ if (CLS_ISCLASS (sub)) { *************** *** 307,316 **** /* This is how to update the lookup table. Regardless of what the keys of the hashtable is, change all values that are ! suprecalss into impostor. */ for (node = hash_next (__objc_class_hash, NULL); node; node = hash_next (__objc_class_hash, node)) { ! class1 = (Class*)node->value; if (class1 == super_class) { --- 306,315 ---- /* This is how to update the lookup table. Regardless of what the keys of the hashtable is, change all values that are ! superclass into impostor. */ for (node = hash_next (__objc_class_hash, NULL); node; node = hash_next (__objc_class_hash, node)) { ! class1 = (Class)node->value; if (class1 == super_class) { diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/encoding.c gcc-2.7.0/objc/encoding.c *** gcc-2.6.3/objc/encoding.c Mon Aug 15 12:04:21 1994 --- gcc-2.7.0/objc/encoding.c Thu Jun 15 08:38:11 1995 *************** *** 1,7 **** /* Encoding of types for Objective C. ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - This file is part of GNU CC. --- 1,6 ---- /* Encoding of types for Objective C. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** *** 18,22 **** 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. */ /* As a special exception, if you link this library with files --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files *************** *** 65,69 **** case _C_CLASS: ! return sizeof(Class*); break; --- 65,69 ---- case _C_CLASS: ! return sizeof(Class); break; *************** *** 172,176 **** case _C_CLASS: ! return __alignof__(Class*); break; --- 172,176 ---- case _C_CLASS: ! return __alignof__(Class); break; *************** *** 283,287 **** /* Skip type qualifiers. These may eventually precede typespecs ! occuring in method prototype encodings. */ --- 283,287 ---- /* Skip type qualifiers. These may eventually precede typespecs ! occurring in method prototype encodings. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/encoding.h gcc-2.7.0/objc/encoding.h *** gcc-2.6.3/objc/encoding.h Mon Jul 11 14:02:07 1994 --- gcc-2.7.0/objc/encoding.h Thu Jun 15 08:38:49 1995 *************** *** 18,22 **** 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. */ /* As a special exception, if you link this library with files --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/hash.c gcc-2.7.0/objc/hash.c *** gcc-2.6.3/objc/hash.c Mon Jul 11 14:02:08 1994 --- gcc-2.7.0/objc/hash.c Thu Jun 15 08:39:14 1995 *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/hash.h gcc-2.7.0/objc/hash.h *** gcc-2.6.3/objc/hash.h Mon Jul 11 14:02:09 1994 --- gcc-2.7.0/objc/hash.h Thu Jun 15 08:39:29 1995 *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files *************** *** 114,118 **** /* Add the key/value pair to the hash table. If the ! hash table reaches a level of fullnes then it will be resized. assert if the key is already in the hash. */ --- 115,119 ---- /* Add the key/value pair to the hash table. If the ! hash table reaches a level of fullness then it will be resized. assert if the key is already in the hash. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/init.c gcc-2.7.0/objc/init.c *** gcc-2.6.3/objc/init.c Wed Sep 7 11:30:34 1994 --- gcc-2.7.0/objc/init.c Thu Jun 15 08:40:12 1995 *************** *** 1,21 **** /* GNU Objective C Runtime initialization ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,20 ---- /* GNU Objective C Runtime initialization ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 29,33 **** /* The version number of this runtime. This must match the number defined in gcc (objc-act.c) */ ! #define OBJC_VERSION 6 #define PROTOCOL_VERSION 2 --- 28,32 ---- /* The version number of this runtime. This must match the number defined in gcc (objc-act.c) */ ! #define OBJC_VERSION 7 #define PROTOCOL_VERSION 2 *************** *** 38,43 **** static struct objc_list* unclaimed_proto_list = 0; /* Check compiler vs runtime version */ ! static void init_check_module_version(Module_t); /* Assign isa links to protos */ --- 37,45 ---- static struct objc_list* unclaimed_proto_list = 0; + /* List of unresolved static instances. */ + static struct objc_list *uninitialized_statics; + /* Check compiler vs runtime version */ ! static void init_check_module_version (Module_t); /* Assign isa links to protos */ *************** *** 45,49 **** /* Add protocol to class */ ! static void __objc_class_add_protocols (Class*, struct objc_protocol_list*); /* Is all categories/classes resolved? */ --- 47,57 ---- /* Add protocol to class */ ! static void __objc_class_add_protocols (Class, struct objc_protocol_list*); ! ! /* This is a hook which is called by __objc_exec_class every time a class ! or a category is loaded into the runtime. This may e.g. help a ! dynamic loader determine the classes that have been loaded when ! an object file is dynamically linked in */ ! void (*_objc_load_callback)(Class class, Category* category) = 0; /* Is all categories/classes resolved? */ *************** *** 54,57 **** --- 62,119 ---- struct objc_selector *orig); + /* Run through the statics list, removing modules as soon as all its statics + have been initialized. */ + static void + objc_init_statics () + { + struct objc_list **cell = &uninitialized_statics; + struct objc_static_instances **statics_in_module; + + while (*cell) + { + int module_initialized = 1; + + for (statics_in_module = (*cell)->head; + *statics_in_module; statics_in_module++) + { + struct objc_static_instances *statics = *statics_in_module; + Class class = objc_lookup_class (statics->class_name); + + if (!class) + module_initialized = 0; + /* Actually, the static's class_pointer will be NULL when we + haven't been here before. However, the comparison is to be + reminded of taking into account class posing and to think about + possible semantics... */ + else if (class != statics->instances[0]->class_pointer) + { + id *inst; + + for (inst = &statics->instances[0]; *inst; inst++) + { + (*inst)->class_pointer = class; + + /* ??? Make sure the object will not be freed. With + refcounting, invoke `-retain'. Without refcounting, do + nothing and hope that `-free' will never be invoked. */ + + /* ??? Send the object an `-initStatic' or something to + that effect now or later on? What are the semantics of + statically allocated instances, besides the trivial + NXConstantString, anyway? */ + } + } + } + if (module_initialized) + { + /* Remove this module from the uninitialized list. */ + struct objc_list *this = *cell; + *cell = this->tail; + free (this); + } + else + cell = &(*cell)->tail; + } + } /* objc_init_statics */ /* This function is called by constructor functions generated for each *************** *** 63,73 **** __objc_exec_class (Module_t module) { ! /* Has we processed any constructors previously? This flag used to ! indicate that some global data structures need to be built. */ static BOOL previous_constructors = 0; static struct objc_list* unclaimed_categories = 0; ! /* The symbol table (defined in objc.h) generated by gcc */ Symtab_t symtab = module->symtab; --- 125,135 ---- __objc_exec_class (Module_t module) { ! /* Have we processed any constructors previously? This flag is used to ! indicate that some global data structures need to be built. */ static BOOL previous_constructors = 0; static struct objc_list* unclaimed_categories = 0; ! /* The symbol table (defined in objc-api.h) generated by gcc */ Symtab_t symtab = module->symtab; *************** *** 82,85 **** --- 144,148 ---- DEBUG_PRINTF ("received module: %s\n", module->name); + /* check gcc version */ init_check_module_version(module); *************** *** 114,118 **** for (i = 0; i < symtab->cls_def_cnt; ++i) { ! Class* class = (Class*) symtab->defs[i]; /* Make sure we have what we think. */ --- 177,181 ---- for (i = 0; i < symtab->cls_def_cnt; ++i) { ! Class class = (Class) symtab->defs[i]; /* Make sure we have what we think. */ *************** *** 126,130 **** /* Register all of the selectors in the class and meta class. */ __objc_register_selectors_from_class (class); ! __objc_register_selectors_from_class ((Class*) class->class_pointer); /* Install the fake dispatch tables */ --- 189,193 ---- /* Register all of the selectors in the class and meta class. */ __objc_register_selectors_from_class (class); ! __objc_register_selectors_from_class ((Class) class->class_pointer); /* Install the fake dispatch tables */ *************** *** 134,137 **** --- 197,203 ---- if (class->protocols) __objc_init_protocols (class->protocols); + + if (_objc_load_callback) + _objc_load_callback(class, 0); } *************** *** 140,144 **** { Category_t category = symtab->defs[i + symtab->cls_def_cnt]; ! Class* class = objc_lookup_class (category->class_name); /* If the class for the category exists then append its methods. */ --- 206,210 ---- { Category_t category = symtab->defs[i + symtab->cls_def_cnt]; ! Class class = objc_lookup_class (category->class_name); /* If the class for the category exists then append its methods. */ *************** *** 156,160 **** /* Do class methods. */ if (category->class_methods) ! class_add_method_list ((Class*) class->class_pointer, category->class_methods); --- 222,226 ---- /* Do class methods. */ if (category->class_methods) ! class_add_method_list ((Class) class->class_pointer, category->class_methods); *************** *** 165,168 **** --- 231,236 ---- } + if (_objc_load_callback) + _objc_load_callback(class, category); } else *************** *** 174,177 **** --- 242,250 ---- } + if (module->statics) + uninitialized_statics = list_cons (module->statics, uninitialized_statics); + if (uninitialized_statics) + objc_init_statics (); + /* Scan the unclaimed category hash. Attempt to attach any unclaimed categories to objects. */ *************** *** 181,185 **** { Category_t category = (*cell)->head; ! Class* class = objc_lookup_class (category->class_name); if (class) --- 254,258 ---- { Category_t category = (*cell)->head; ! Class class = objc_lookup_class (category->class_name); if (class) *************** *** 194,198 **** if (category->class_methods) ! class_add_method_list ((Class*) class->class_pointer, category->class_methods); --- 267,271 ---- if (category->class_methods) ! class_add_method_list ((Class) class->class_pointer, category->class_methods); *************** *** 203,206 **** --- 276,281 ---- } + if (_objc_load_callback) + _objc_load_callback(class, category); } } *************** *** 236,240 **** { int i; ! static Class* proto_class = 0; if (! protos) --- 311,315 ---- { int i; ! static Class proto_class = 0; if (! protos) *************** *** 276,280 **** } ! static void __objc_class_add_protocols (Class* class, struct objc_protocol_list* protos) { --- 351,355 ---- } ! static void __objc_class_add_protocols (Class class, struct objc_protocol_list* protos) { diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/list.h gcc-2.7.0/objc/list.h *** gcc-2.6.3/objc/list.h Thu Nov 10 18:50:35 1994 --- gcc-2.7.0/objc/list.h Thu Jun 15 08:40:27 1995 *************** *** 18,22 **** 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. */ /* As a special exception, if you link this library with files compiled with --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/makefile.dos gcc-2.7.0/objc/makefile.dos *** gcc-2.6.3/objc/makefile.dos Mon Jul 11 14:02:12 1994 --- gcc-2.7.0/objc/makefile.dos Thu Jun 15 17:07:28 1995 *************** *** 15,19 **** # 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 Makefile is configured for GnuMAKE --- 15,20 ---- # 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, 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # This Makefile is configured for GnuMAKE diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/misc.c gcc-2.7.0/objc/misc.c *** gcc-2.6.3/objc/misc.c Fri Oct 28 19:12:54 1994 --- gcc-2.7.0/objc/misc.c Thu Jun 15 08:40:48 1995 *************** *** 1,4 **** ! /* GNU Objective C Runtime Miscellanious ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup --- 1,4 ---- ! /* GNU Objective C Runtime Miscellaneous ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Author: Kresten Krab Thorup *************** *** 6,21 **** 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 6,23 ---- 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 2, 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 25,34 **** covered by the GNU General Public License. */ - #include "runtime.h" - - void objc_error(id object, const char* fmt, va_list); - - void (*_objc_error)(id, const char*, va_list) = objc_error; - #ifdef __alpha__ #include --- 27,30 ---- *************** *** 36,39 **** --- 32,41 ---- extern size_t strlen (const char*); #endif + + #include "runtime.h" + + void objc_error(id object, const char* fmt, va_list); + + void (*_objc_error)(id, const char*, va_list) = objc_error; void diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/objc-api.h gcc-2.7.0/objc/objc-api.h *** gcc-2.6.3/objc/objc-api.h Mon Jul 11 14:02:14 1994 --- gcc-2.7.0/objc/objc-api.h Thu Jun 15 08:41:19 1995 *************** *** 1,4 **** /* GNU Objective-C Runtime API. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* GNU Objective-C Runtime API. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files compiled --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled *************** *** 98,102 **** module. */ void *defs[1]; /* Variable array of pointers. ! cls_def_cnt of type Class* followed by cat_def_cnt of type Category_t. */ --- 99,103 ---- module. */ void *defs[1]; /* Variable array of pointers. ! cls_def_cnt of type Class followed by cat_def_cnt of type Category_t. */ *************** *** 104,107 **** --- 105,118 ---- + /* For every class which happens to have statically allocated instances in + this module, one OBJC_STATIC_INSTANCES is allocated by the compiler. + INSTANCES is NULL terminated and points to all statically allocated + instances of this class. */ + struct objc_static_instances + { + char *class_name; + id instances[0]; + }; + /* ** The compiler generates one of these structures for each module that *************** *** 119,122 **** --- 130,137 ---- module was generated. The name includes the path. */ + + /* Pointer to a NULL terminated array of objc_static_instances. */ + struct objc_static_instances **statics; + Symtab_t symtab; /* Pointer to the Symtab of the module. The Symtab *************** *** 204,213 **** #define __CLS_SETINFO(cls, mask) (__CLS_INFO(cls) |= mask) ! /* The structure is of type MetaClass* */ #define _CLS_META 0x2L #define CLS_ISMETA(cls) ((cls)&&__CLS_ISINFO(cls, _CLS_META)) ! /* The structure is of type Class* */ #define _CLS_CLASS 0x1L #define CLS_ISCLASS(cls) ((cls)&&__CLS_ISINFO(cls, _CLS_CLASS)) --- 219,228 ---- #define __CLS_SETINFO(cls, mask) (__CLS_INFO(cls) |= mask) ! /* The structure is of type MetaClass */ #define _CLS_META 0x2L #define CLS_ISMETA(cls) ((cls)&&__CLS_ISINFO(cls, _CLS_META)) ! /* The structure is of type Class */ #define _CLS_CLASS 0x1L #define CLS_ISCLASS(cls) ((cls)&&__CLS_ISINFO(cls, _CLS_CLASS)) *************** *** 269,273 **** id self; /* Id of the object sending the message. */ ! Class* class; /* Object's super class. */ } Super, *Super_t; --- 284,288 ---- id self; /* Id of the object sending the message. */ ! Class class; /* Object's super class. */ } Super, *Super_t; *************** *** 284,290 **** ** The function is guaranteed to be passed a non-NULL name string. */ ! extern Class* (*_objc_lookup_class)(const char *name); ! extern id (*_objc_object_alloc)(Class* class); extern id (*_objc_object_copy)(id object); --- 299,313 ---- ** The function is guaranteed to be passed a non-NULL name string. */ ! extern Class (*_objc_lookup_class)(const char *name); ! ! /* ! ** This is a hook which is called by __objc_exec_class every time a class ! ** or a category is loaded into the runtime. This may e.g. help a ! ** dynamic loader determine the classes that have been loaded when ! ** an object file is dynamically linked in. ! */ ! extern void (*_objc_load_callback)(Class class, Category* category); ! extern id (*_objc_object_alloc)(Class class); extern id (*_objc_object_copy)(id object); *************** *** 292,306 **** extern id (*_objc_object_dispose)(id object); ! Method_t class_get_class_method(MetaClass* class, SEL aSel); ! Method_t class_get_instance_method(Class* class, SEL aSel); ! Class* class_pose_as(Class* impostor, Class* superclass); ! Class* objc_get_class(const char *name); ! Class* objc_lookup_class(const char *name); ! Class* objc_next_class(void **enum_state); const char *sel_get_name(SEL selector); --- 315,329 ---- extern id (*_objc_object_dispose)(id object); ! Method_t class_get_class_method(MetaClass class, SEL aSel); ! Method_t class_get_instance_method(Class class, SEL aSel); ! Class class_pose_as(Class impostor, Class superclass); ! Class objc_get_class(const char *name); ! Class objc_lookup_class(const char *name); ! Class objc_next_class(void **enum_state); const char *sel_get_name(SEL selector); *************** *** 321,328 **** BOOL sel_is_mapped (SEL aSel); ! extern id class_create_instance(Class* class); static inline const char * ! class_get_class_name(Class* class) { return CLS_ISCLASS(class)?class->name:((class==Nil)?"Nil":0); --- 344,351 ---- BOOL sel_is_mapped (SEL aSel); ! extern id class_create_instance(Class class); static inline const char * ! class_get_class_name(Class class) { return CLS_ISCLASS(class)?class->name:((class==Nil)?"Nil":0); *************** *** 330,346 **** static inline long ! class_get_instance_size(Class* class) { return CLS_ISCLASS(class)?class->instance_size:0; } ! static inline MetaClass* ! class_get_meta_class(Class* class) { return CLS_ISCLASS(class)?class->class_pointer:Nil; } ! static inline Class* ! class_get_super_class(Class* class) { return CLS_ISCLASS(class)?class->super_class:Nil; --- 353,369 ---- static inline long ! class_get_instance_size(Class class) { return CLS_ISCLASS(class)?class->instance_size:0; } ! static inline MetaClass ! class_get_meta_class(Class class) { return CLS_ISCLASS(class)?class->class_pointer:Nil; } ! static inline Class ! class_get_super_class(Class class) { return CLS_ISCLASS(class)?class->super_class:Nil; *************** *** 348,352 **** static inline int ! class_get_version(Class* class) { return CLS_ISCLASS(class)?class->version:-1; --- 371,375 ---- static inline int ! class_get_version(Class class) { return CLS_ISCLASS(class)?class->version:-1; *************** *** 354,358 **** static inline BOOL ! class_is_class(Class* class) { return CLS_ISCLASS(class); --- 377,381 ---- static inline BOOL ! class_is_class(Class class) { return CLS_ISCLASS(class); *************** *** 360,364 **** static inline BOOL ! class_is_meta_class(Class* class) { return CLS_ISMETA(class); --- 383,387 ---- static inline BOOL ! class_is_meta_class(Class class) { return CLS_ISMETA(class); *************** *** 367,371 **** static inline void ! class_set_version(Class* class, long version) { if (CLS_ISCLASS(class)) --- 390,394 ---- static inline void ! class_set_version(Class class, long version) { if (CLS_ISCLASS(class)) *************** *** 379,383 **** } ! IMP get_imp (Class* class, SEL sel); id object_copy(id object); --- 402,406 ---- } ! IMP get_imp (Class class, SEL sel); id object_copy(id object); *************** *** 385,389 **** id object_dispose(id object); ! static inline Class* object_get_class(id object) { --- 408,412 ---- id object_dispose(id object); ! static inline Class object_get_class(id object) { *************** *** 392,396 **** ? object->class_pointer : (CLS_ISMETA(object->class_pointer) ! ? (Class*)object : Nil)) : Nil); --- 415,419 ---- ? object->class_pointer : (CLS_ISMETA(object->class_pointer) ! ? (Class)object : Nil)) : Nil); *************** *** 402,410 **** return ((object!=nil)?(CLS_ISCLASS(object->class_pointer) ?object->class_pointer->name ! :((Class*)object)->name) :"Nil"); } ! static inline MetaClass* object_get_meta_class(id object) { --- 425,433 ---- return ((object!=nil)?(CLS_ISCLASS(object->class_pointer) ?object->class_pointer->name ! :((Class)object)->name) :"Nil"); } ! static inline MetaClass object_get_meta_class(id object) { *************** *** 417,421 **** } ! static inline Class* object_get_super_class (id object) --- 440,444 ---- } ! static inline Class object_get_super_class (id object) *************** *** 424,428 **** ?object->class_pointer->super_class :(CLS_ISMETA(object->class_pointer) ! ?((Class*)object)->super_class :Nil)) :Nil); --- 447,451 ---- ?object->class_pointer->super_class :(CLS_ISMETA(object->class_pointer) ! ?((Class)object)->super_class :Nil)) :Nil); *************** *** 432,436 **** object_is_class(id object) { ! return CLS_ISCLASS((Class*)object); } --- 455,459 ---- object_is_class(id object) { ! return CLS_ISCLASS((Class)object); } *************** *** 444,448 **** object_is_meta_class(id object) { ! return CLS_ISMETA((Class*)object); } --- 467,471 ---- object_is_meta_class(id object) { ! return CLS_ISMETA((Class)object); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/objc.h gcc-2.7.0/objc/objc.h *** gcc-2.6.3/objc/objc.h Thu Oct 6 12:24:32 1994 --- gcc-2.7.0/objc/objc.h Thu Jun 15 08:41:59 1995 *************** *** 1,4 **** /* Basic data types for Objective C. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Basic data types for Objective C. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files *************** *** 77,81 **** */ #define nil (id)0 /* id of Nil instance */ ! #define Nil (Class*)0 /* id of Nil class */ typedef char *STR; /* String alias */ --- 78,82 ---- */ #define nil (id)0 /* id of Nil instance */ ! #define Nil (Class)0 /* id of Nil class */ typedef char *STR; /* String alias */ *************** *** 90,97 **** ** the following member variables: super_class. */ ! typedef struct objc_class MetaClass; ! typedef struct objc_class Class; struct objc_class { ! MetaClass* class_pointer; /* Pointer to the class's meta class. */ struct objc_class* super_class; /* Pointer to the super --- 91,98 ---- ** the following member variables: super_class. */ ! typedef struct objc_class *MetaClass; ! typedef struct objc_class *Class; struct objc_class { ! MetaClass class_pointer; /* Pointer to the class's meta class. */ struct objc_class* super_class; /* Pointer to the super diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/objects.c gcc-2.7.0/objc/objects.c *** gcc-2.6.3/objc/objects.c Fri Nov 18 19:10:56 1994 --- gcc-2.7.0/objc/objects.c Thu Jun 15 08:42:21 1995 *************** *** 1,21 **** /* GNU Objective C Runtime class related functions ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,21 ---- /* GNU Objective C Runtime class related functions ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup 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 2, 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 28,41 **** #include "runtime.h" /* the kitchen sink */ ! id __objc_object_alloc(Class*); id __objc_object_dispose(id); id __objc_object_copy(id); ! id (*_objc_object_alloc)(Class*) = __objc_object_alloc; id (*_objc_object_dispose)(id) = __objc_object_dispose; id (*_objc_object_copy)(id) = __objc_object_copy; id ! class_create_instance(Class* class) { id new = nil; --- 28,41 ---- #include "runtime.h" /* the kitchen sink */ ! id __objc_object_alloc(Class); id __objc_object_dispose(id); id __objc_object_copy(id); ! id (*_objc_object_alloc)(Class) = __objc_object_alloc; id (*_objc_object_dispose)(id) = __objc_object_dispose; id (*_objc_object_copy)(id) = __objc_object_copy; id ! class_create_instance(Class class) { id new = nil; *************** *** 72,76 **** } ! id __objc_object_alloc(Class* class) { return (id)__objc_xmalloc(class->instance_size); --- 72,76 ---- } ! id __objc_object_alloc(Class class) { return (id)__objc_xmalloc(class->instance_size); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/runtime.h gcc-2.7.0/objc/runtime.h *** gcc-2.6.3/objc/runtime.h Mon Jul 11 14:02:16 1994 --- gcc-2.7.0/objc/runtime.h Thu Jun 15 08:42:53 1995 *************** *** 1,21 **** /* GNU Objective C Runtime internal declarations ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,20 ---- /* GNU Objective C Runtime internal declarations ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 42,54 **** #include "objc/list.h" /* linear lists */ ! extern void __objc_add_class_to_hash(Class*); /* (objc-class.c) */ extern void __objc_init_selector_tables(); /* (objc-sel.c) */ ! extern void __objc_init_class_tables(); /* (objc-class.c) */ extern void __objc_init_dispatch_tables(); /* (objc-dispatch.c) */ ! extern void __objc_install_premature_dtable(Class*); /* (objc-dispatch.c) */ ! extern void __objc_resolve_class_links(); /* (objc-class.c) */ ! extern void __objc_register_selectors_from_class(Class*); /* (objc-sel.c) */ ! extern void __objc_update_dispatch_table_for_class (Class*);/* (objc-msg.c) */ ! extern void class_add_method_list(Class*, MethodList_t); extern void objc_error(id object, const char* fmt, va_list); --- 41,53 ---- #include "objc/list.h" /* linear lists */ ! extern void __objc_add_class_to_hash(Class); /* (objc-class.c) */ extern void __objc_init_selector_tables(); /* (objc-sel.c) */ ! extern void __objc_init_class_tables(); /* (objc-class.c) */ extern void __objc_init_dispatch_tables(); /* (objc-dispatch.c) */ ! extern void __objc_install_premature_dtable(Class); /* (objc-dispatch.c) */ ! extern void __objc_resolve_class_links(); /* (objc-class.c) */ ! extern void __objc_register_selectors_from_class(Class); /* (objc-sel.c) */ ! extern void __objc_update_dispatch_table_for_class (Class);/* (objc-msg.c) */ ! extern void class_add_method_list(Class, MethodList_t); extern void objc_error(id object, const char* fmt, va_list); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/sarray.c gcc-2.7.0/objc/sarray.c *** gcc-2.6.3/objc/sarray.c Mon Jul 11 14:02:17 1994 --- gcc-2.7.0/objc/sarray.c Thu Jun 15 08:43:07 1995 *************** *** 1,4 **** /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files *************** *** 219,230 **** { #ifdef OBJC_SPARSE3 ! int old_max_index = (array->capacity-1)/INDEX_CAPACITY; ! int new_max_index = ((newsize-1)/INDEX_CAPACITY); ! int rounded_size = (new_max_index+1)*INDEX_CAPACITY; #else /* OBJC_SPARSE2 */ ! int old_max_index = (array->capacity-1)/BUCKET_SIZE; ! int new_max_index = ((newsize-1)/BUCKET_SIZE); ! int rounded_size = (new_max_index+1)*BUCKET_SIZE; #endif --- 220,231 ---- { #ifdef OBJC_SPARSE3 ! size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY; ! size_t new_max_index = ((newsize-1)/INDEX_CAPACITY); ! size_t rounded_size = (new_max_index+1)*INDEX_CAPACITY; #else /* OBJC_SPARSE2 */ ! size_t old_max_index = (array->capacity-1)/BUCKET_SIZE; ! size_t new_max_index = ((newsize-1)/BUCKET_SIZE); ! size_t rounded_size = (new_max_index+1)*BUCKET_SIZE; #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/sarray.h gcc-2.7.0/objc/sarray.h *** gcc-2.6.3/objc/sarray.h Mon Jul 11 14:02:19 1994 --- gcc-2.7.0/objc/sarray.h Thu Jun 15 08:43:28 1995 *************** *** 1,4 **** /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993 Free Software Foundation, Inc. Author: Kresten Krab Thorup --- 1,4 ---- /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. Author: Kresten Krab Thorup *************** *** 18,22 **** 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. */ /* As a special exception, if you link this library with files --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files *************** *** 52,56 **** #define SIZET_BITS (sizeof(size_t)*8) ! #if defined(sparc) || defined(OBJC_SPARSE2) #define PRECOMPUTE_SELECTORS #endif --- 53,57 ---- #define SIZET_BITS (sizeof(size_t)*8) ! #if defined(__sparc__) || defined(OBJC_SPARSE2) #define PRECOMPUTE_SELECTORS #endif *************** *** 90,94 **** unsigned int ioffset : SIZET_BITS/4; #else /* OBJC_SPARSE2 */ ! #ifdef sparc unsigned int boffset : (SIZET_BITS - 2) - BUCKET_BITS; unsigned int eoffset : BUCKET_BITS; --- 91,95 ---- unsigned int ioffset : SIZET_BITS/4; #else /* OBJC_SPARSE2 */ ! #ifdef __sparc__ unsigned int boffset : (SIZET_BITS - 2) - BUCKET_BITS; unsigned int eoffset : BUCKET_BITS; *************** *** 136,140 **** short ref_count; struct sarray* is_copy_of; ! int capacity; }; --- 137,141 ---- short ref_count; struct sarray* is_copy_of; ! size_t capacity; }; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/selector.c gcc-2.7.0/objc/selector.c *** gcc-2.6.3/objc/selector.c Mon Aug 15 11:52:00 1994 --- gcc-2.7.0/objc/selector.c Thu Jun 15 08:44:43 1995 *************** *** 1,21 **** /* GNU Objective C Runtime selector related functions ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,20 ---- /* GNU Objective C Runtime selector related functions ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup 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 2, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 29,33 **** #include "encoding.h" ! /* Initial selector hash table size. Value doesnt matter much */ #define SELECTOR_HASH_SIZE 128 --- 28,32 ---- #include "encoding.h" ! /* Initial selector hash table size. Value doesn't matter much */ #define SELECTOR_HASH_SIZE 128 *************** *** 55,59 **** structure in the record table. */ void ! __objc_register_selectors_from_class (Class* class) { MethodList_t method_list; --- 54,58 ---- structure in the record table. */ void ! __objc_register_selectors_from_class (Class class) { MethodList_t method_list; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/sendmsg.c gcc-2.7.0/objc/sendmsg.c *** gcc-2.6.3/objc/sendmsg.c Tue Sep 20 14:37:57 1994 --- gcc-2.7.0/objc/sendmsg.c Thu Jun 15 08:45:10 1995 *************** *** 1,21 **** /* GNU Objective C Runtime message lookup ! Copyright (C) 1993 Free Software Foundation, Inc. - Author: Kresten Krab Thorup - 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 2, 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. */ /* As a special exception, if you link this library with files compiled with --- 1,21 ---- /* GNU Objective C Runtime message lookup ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. ! Contributed by Kresten Krab Thorup 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 2, 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with *************** *** 44,50 **** /* Send +initialize to class */ ! static void __objc_send_initialize(Class*); ! static void __objc_install_dispatch_table_for_class (Class*); /* Forward declare some functions */ --- 44,50 ---- /* Send +initialize to class */ ! static void __objc_send_initialize(Class); ! static void __objc_install_dispatch_table_for_class (Class); /* Forward declare some functions */ *************** *** 58,62 **** #endif __objc_block_forward(id, SEL, ...); ! static Method_t search_for_method_in_hierarchy (Class* class, SEL sel); static Method_t search_for_method_in_list(MethodList_t list, SEL op); id nil_method(id, SEL, ...); --- 58,62 ---- #endif __objc_block_forward(id, SEL, ...); ! static Method_t search_for_method_in_hierarchy (Class class, SEL sel); static Method_t search_for_method_in_list(MethodList_t list, SEL op); id nil_method(id, SEL, ...); *************** *** 71,75 **** __inline__ IMP ! get_imp (Class* class, SEL sel) { IMP impl; --- 71,75 ---- __inline__ IMP ! get_imp (Class class, SEL sel) { IMP impl; *************** *** 163,167 **** static void __objc_init_install_dtable(id receiver, SEL op) { ! __label__ allready_initialized; IMP imp; void* args; --- 163,167 ---- static void __objc_init_install_dtable(id receiver, SEL op) { ! __label__ already_initialized; IMP imp; void* args; *************** *** 171,175 **** method before the dtable was initialized... too bad for him! */ if(receiver->class_pointer->dtable != __objc_uninstalled_dtable) ! goto allready_initialized; if(CLS_ISCLASS(receiver->class_pointer)) --- 171,175 ---- method before the dtable was initialized... too bad for him! */ if(receiver->class_pointer->dtable != __objc_uninstalled_dtable) ! goto already_initialized; if(CLS_ISCLASS(receiver->class_pointer)) *************** *** 188,192 **** { /* receiver is a class object */ ! assert(CLS_ISCLASS((Class*)receiver)); assert(CLS_ISMETA(receiver->class_pointer)); --- 188,192 ---- { /* receiver is a class object */ ! assert(CLS_ISCLASS((Class)receiver)); assert(CLS_ISMETA(receiver->class_pointer)); *************** *** 195,204 **** if (strcmp (sel_get_name (op), "initialize")) ! __objc_send_initialize((Class*)receiver); else ! CLS_SETINITIALIZED((Class*)receiver); } ! allready_initialized: /* Get real method for this in newly installed dtable */ --- 195,204 ---- if (strcmp (sel_get_name (op), "initialize")) ! __objc_send_initialize((Class)receiver); else ! CLS_SETINITIALIZED((Class)receiver); } ! already_initialized: /* Get real method for this in newly installed dtable */ *************** *** 216,220 **** /* Install dummy table for class which causes the first message to that class (or instances hereof) to be initialized properly */ ! void __objc_install_premature_dtable(Class* class) { assert(__objc_uninstalled_dtable); --- 216,220 ---- /* Install dummy table for class which causes the first message to that class (or instances hereof) to be initialized properly */ ! void __objc_install_premature_dtable(Class class) { assert(__objc_uninstalled_dtable); *************** *** 223,227 **** /* Send +initialize to class if not already done */ ! static void __objc_send_initialize(Class* class) { /* This *must* be a class object */ --- 223,227 ---- /* Send +initialize to class if not already done */ ! static void __objc_send_initialize(Class class) { /* This *must* be a class object */ *************** *** 238,263 **** { ! MethodList_t method_list = class->class_pointer->methods; ! SEL op = sel_register_name ("initialize"); ! /* If not found then we'll search the list. */ ! while (method_list) ! { int i; ! /* Search the method list. */ ! for (i = 0; i < method_list->method_count; ++i) ! { ! Method_t method = &method_list->method_list[i]; ! ! ! if (method->method_name->sel_id == op->sel_id) ! (*method->method_imp)((id) class, op); } - /* The method wasn't found. Follow the link to the next list of - methods. */ method_list = method_list->method_next; } } } --- 238,269 ---- { ! SEL op = sel_register_name ("initialize"); ! Class tmpclass = class; ! IMP imp = 0; ! ! while (!imp && tmpclass) { ! MethodList_t method_list = tmpclass->class_pointer->methods; ! while(!imp && method_list) { int i; + Method_t method; ! for (i=0;imethod_count;i++) { ! method = &(method_list->method_list[i]); ! if (method->method_name->sel_id == op->sel_id) { ! imp = method->method_imp; ! break; } + } method_list = method_list->method_next; + } + + tmpclass = tmpclass->super_class; + } + if (imp) + (*imp)((id)class, op); + } } *************** *** 265,271 **** static void ! __objc_install_dispatch_table_for_class (Class* class) { ! Class* super; MethodList_t mlist; int counter; --- 271,277 ---- static void ! __objc_install_dispatch_table_for_class (Class class) { ! Class super; MethodList_t mlist; int counter; *************** *** 281,285 **** __objc_install_dispatch_table_for_class (super); ! /* Allocate dtable if nessecary */ if (super == 0) { --- 287,291 ---- __objc_install_dispatch_table_for_class (super); ! /* Allocate dtable if necessary */ if (super == 0) { *************** *** 303,309 **** } ! void __objc_update_dispatch_table_for_class (Class* class) { ! Class* next; /* not yet installed -- skip it */ --- 309,315 ---- } ! void __objc_update_dispatch_table_for_class (Class class) { ! Class next; /* not yet installed -- skip it */ *************** *** 327,334 **** This one is only called for categories. Class objects have their ! methods installed rightaway, and their selectors are made into SEL's by the function __objc_register_selectors_from_class. */ void ! class_add_method_list (Class* class, MethodList_t list) { int i; --- 333,340 ---- This one is only called for categories. Class objects have their ! methods installed right away, and their selectors are made into SEL's by the function __objc_register_selectors_from_class. */ void ! class_add_method_list (Class class, MethodList_t list) { int i; *************** *** 347,351 **** if (method->method_name) /* Sometimes these are NULL */ { ! /* This is where selector names are transmogriffed to SEL's */ method->method_name = sel_register_typed_name ((const char*)method->method_name, --- 353,357 ---- if (method->method_name) /* Sometimes these are NULL */ { ! /* This is where selector names are transmogrified to SEL's */ method->method_name = sel_register_typed_name ((const char*)method->method_name, *************** *** 371,375 **** Method_t ! class_get_instance_method(Class* class, SEL op) { return search_for_method_in_hierarchy(class, op); --- 377,381 ---- Method_t ! class_get_instance_method(Class class, SEL op) { return search_for_method_in_hierarchy(class, op); *************** *** 377,381 **** Method_t ! class_get_class_method(MetaClass* class, SEL op) { return search_for_method_in_hierarchy(class, op); --- 383,387 ---- Method_t ! class_get_class_method(MetaClass class, SEL op) { return search_for_method_in_hierarchy(class, op); *************** *** 388,395 **** static Method_t ! search_for_method_in_hierarchy (Class* cls, SEL sel) { Method_t method = NULL; ! Class* class; if (! sel_is_mapped (sel)) --- 394,401 ---- static Method_t ! search_for_method_in_hierarchy (Class cls, SEL sel) { Method_t method = NULL; ! Class class; if (! sel_is_mapped (sel)) *************** *** 471,475 **** ! /* This fuction is installed in the dispatch table for all methods which are not implemented. Thus, it is called when a selector is not recognized. */ static retval_t --- 477,481 ---- ! /* This function is installed in the dispatch table for all methods which are not implemented. Thus, it is called when a selector is not recognized. */ static retval_t diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc/typedstream.h gcc-2.7.0/objc/typedstream.h *** gcc-2.6.3/objc/typedstream.h Mon Jul 11 14:02:21 1994 --- gcc-2.7.0/objc/typedstream.h Thu Jun 15 08:45:33 1995 *************** *** 1,4 **** /* GNU Objective-C Typed Streams interface. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* GNU Objective-C Typed Streams interface. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* As a special exception, if you link this library with files compiled --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled *************** *** 99,107 **** int objc_write_root_object (TypedStream* stream, id object); ! long objc_get_stream_class_version (TypedStream* stream, Class* class); /* ! ** Convenience funtions */ --- 100,108 ---- int objc_write_root_object (TypedStream* stream, id object); ! long objc_get_stream_class_version (TypedStream* stream, Class class); /* ! ** Convenience functions */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc-act.c gcc-2.7.0/objc-act.c *** gcc-2.6.3/objc-act.c Thu Nov 10 15:06:22 1994 --- gcc-2.7.0/objc-act.c Thu Jun 15 07:53:28 1995 *************** *** 1,5 **** /* Implement classes and message passing for Objective C. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. ! Author: Steve Naroff. This file is part of GNU CC. --- 1,5 ---- /* Implement classes and message passing for Objective C. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ! Contributed by Steve Naroff. This file is part of GNU CC. *************** *** 17,21 **** 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. */ /* Purpose: This module implements the Objective-C 4.0 language. --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Purpose: This module implements the Objective-C 4.0 language. *************** *** 125,137 **** char *util_firstobj; /* for encode_method_def */ #include "rtl.h" #include "c-parse.h" ! #define OBJC_VERSION (flag_next_runtime ? 5 : 6) #define PROTOCOL_VERSION 2 - #define NULLT (tree) 0 - #define OBJC_ENCODE_INLINE_DEFS 0 #define OBJC_ENCODE_DONT_INLINE_DEFS 1 --- 126,142 ---- char *util_firstobj; + /* List of classes with list of their static instances. */ + static tree objc_static_instances; + + /* The declaration of the array administrating the static instances. */ + static tree static_instances_decl; + /* for encode_method_def */ #include "rtl.h" #include "c-parse.h" ! #define OBJC_VERSION (flag_next_runtime ? 5 : 7) #define PROTOCOL_VERSION 2 #define OBJC_ENCODE_INLINE_DEFS 0 #define OBJC_ENCODE_DONT_INLINE_DEFS 1 *************** *** 139,148 **** /*** Private Interface (procedures) ***/ ! /* used by compile_file */ static void init_objc PROTO((void)); static void finish_objc PROTO((void)); ! /* code generation */ static void synth_module_prologue PROTO((void)); --- 144,153 ---- /*** Private Interface (procedures) ***/ ! /* Used by compile_file. */ static void init_objc PROTO((void)); static void finish_objc PROTO((void)); ! /* Code generation. */ static void synth_module_prologue PROTO((void)); *************** *** 150,154 **** static char *build_module_descriptor PROTO((void)); static tree init_module_descriptor PROTO((tree)); ! static tree build_objc_method_call PROTO((int, tree, tree, tree, tree, tree)); static void generate_strings PROTO((void)); static tree get_proto_encoding PROTO((tree)); --- 155,160 ---- static char *build_module_descriptor PROTO((void)); static tree init_module_descriptor PROTO((tree)); ! static tree build_objc_method_call PROTO((int, tree, tree, ! tree, tree, tree)); static void generate_strings PROTO((void)); static tree get_proto_encoding PROTO((tree)); *************** *** 156,159 **** --- 162,167 ---- static tree build_ivar_chain PROTO((tree, int)); + static tree objc_add_static_instance PROTO((tree, tree)); + static tree build_ivar_template PROTO((void)); static tree build_method_template PROTO((void)); *************** *** 163,168 **** static void build_category_template PROTO((void)); static tree build_super_template PROTO((void)); ! static tree build_category_initializer PROTO((tree, tree, tree, tree, tree, tree)); ! static tree build_protocol_initializer PROTO((tree, tree, tree, tree, tree)); static void synth_forward_declarations PROTO((void)); --- 171,178 ---- static void build_category_template PROTO((void)); static tree build_super_template PROTO((void)); ! static tree build_category_initializer PROTO((tree, tree, tree, ! tree, tree, tree)); ! static tree build_protocol_initializer PROTO((tree, tree, tree, ! tree, tree)); static void synth_forward_declarations PROTO((void)); *************** *** 178,185 **** static tree synth_id_with_class_suffix PROTO((char *, tree)); ! /* from expr.c */ extern int apply_args_register_offset PROTO((int)); ! /* misc. bookkeeping */ typedef struct hashed_entry *hash; --- 188,195 ---- static tree synth_id_with_class_suffix PROTO((char *, tree)); ! /* From expr.c */ extern int apply_args_register_offset PROTO((int)); ! /* Misc. bookkeeping */ typedef struct hashed_entry *hash; *************** *** 215,223 **** }; ! static tree add_objc_string PROTO((tree, enum string_section)); ! static tree build_objc_string_decl PROTO((tree, enum string_section)); static tree build_selector_reference_decl PROTO((tree)); ! /* protocol additions */ static tree add_protocol PROTO((tree)); --- 225,235 ---- }; ! static tree add_objc_string PROTO((tree, ! enum string_section)); ! static tree build_objc_string_decl PROTO((tree, ! enum string_section)); static tree build_selector_reference_decl PROTO((tree)); ! /* Protocol additions. */ static tree add_protocol PROTO((tree)); *************** *** 225,229 **** static tree lookup_and_install_protocols PROTO((tree)); ! /* type encoding */ static void encode_type_qualifiers PROTO((tree)); --- 237,241 ---- static tree lookup_and_install_protocols PROTO((tree)); ! /* Type encoding. */ static void encode_type_qualifiers PROTO((tree)); *************** *** 241,245 **** static tree expr_last PROTO((tree)); ! /* utilities for debugging and error diagnostics: */ static void warn_with_method PROTO((char *, int, tree)); --- 253,257 ---- static tree expr_last PROTO((tree)); ! /* Utilities for debugging and error diagnostics. */ static void warn_with_method PROTO((char *, int, tree)); *************** *** 252,256 **** static void dump_interface PROTO((FILE *, tree)); ! /* everything else. */ static void objc_fatal PROTO((void)); --- 264,268 ---- static void dump_interface PROTO((FILE *, tree)); ! /* Everything else. */ static void objc_fatal PROTO((void)); *************** *** 258,262 **** static tree lookup_method_in_protocol_list PROTO((tree, tree, int)); static tree lookup_protocol_in_reflist PROTO((tree, tree)); ! static tree create_builtin_decl PROTO((enum tree_code, tree, char *)); static tree my_build_string PROTO((int, char *)); static void build_objc_symtab_template PROTO((void)); --- 270,275 ---- static tree lookup_method_in_protocol_list PROTO((tree, tree, int)); static tree lookup_protocol_in_reflist PROTO((tree, tree)); ! static tree create_builtin_decl PROTO((enum tree_code, ! tree, char *)); static tree my_build_string PROTO((int, char *)); static void build_objc_symtab_template PROTO((void)); *************** *** 288,295 **** static tree build_method_list_template PROTO((tree, int)); static tree build_ivar_list_initializer PROTO((tree, tree)); ! static tree generate_ivars_list PROTO((tree, char *, int, tree)); static tree build_dispatch_table_initializer PROTO((tree, tree)); ! static tree generate_dispatch_table PROTO((tree, char *, int, tree)); ! static tree build_shared_structure_initializer PROTO((tree, tree, tree, tree, tree, int, tree, tree, tree)); static void generate_category PROTO((tree)); static int is_objc_type_qualifier PROTO((tree)); --- 301,312 ---- static tree build_method_list_template PROTO((tree, int)); static tree build_ivar_list_initializer PROTO((tree, tree)); ! static tree generate_ivars_list PROTO((tree, char *, ! int, tree)); static tree build_dispatch_table_initializer PROTO((tree, tree)); ! static tree generate_dispatch_table PROTO((tree, char *, ! int, tree)); ! static tree build_shared_structure_initializer PROTO((tree, tree, tree, tree, ! tree, int, tree, tree, ! tree)); static void generate_category PROTO((tree)); static int is_objc_type_qualifier PROTO((tree)); *************** *** 307,311 **** /*** Private Interface (data) ***/ ! /* reserved tag definitions: */ #define TYPE_ID "id" --- 324,328 ---- /*** Private Interface (data) ***/ ! /* Reserved tag definitions. */ #define TYPE_ID "id" *************** *** 322,325 **** --- 339,343 ---- #define UTAG_CATEGORY "_objc_category" #define UTAG_MODULE "_objc_module" + #define UTAG_STATICS "_objc_statics" #define UTAG_SYMTAB "_objc_symtab" #define UTAG_SUPER "_objc_super" *************** *** 334,342 **** #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" ! static char* TAG_GETCLASS; ! static char* TAG_GETMETACLASS; ! static char* TAG_MSGSEND; ! static char* TAG_MSGSENDSUPER; ! static char* TAG_EXECCLASS; /* Set by `continue_class' and checked by `is_public'. */ --- 352,360 ---- #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" ! static char *TAG_GETCLASS; ! static char *TAG_GETMETACLASS; ! static char *TAG_MSGSEND; ! static char *TAG_MSGSENDSUPER; ! static char *TAG_EXECCLASS; /* Set by `continue_class' and checked by `is_public'. */ *************** *** 349,352 **** --- 367,371 ---- static tree self_id, ucmd_id; + static tree unused_list; static tree self_decl, umsg_decl, umsg_super_decl; *************** *** 365,390 **** (super_type && TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (super_type)) ! static tree class_chain = NULLT; ! static tree alias_chain = NULLT; ! static tree interface_chain = NULLT; ! static tree protocol_chain = NULLT; ! /* chains to manage selectors that are referenced and defined in the module */ ! static tree cls_ref_chain = NULLT; /* classes referenced */ ! static tree sel_ref_chain = NULLT; /* selectors referenced */ ! /* chains to manage uniquing of strings */ ! static tree class_names_chain = NULLT; ! static tree meth_var_names_chain = NULLT; ! static tree meth_var_types_chain = NULLT; ! /* hash tables to manage the global pool of method prototypes */ static hash *nst_method_hash_list = 0; static hash *cls_method_hash_list = 0; ! /* backend data declarations */ static tree UOBJC_SYMBOLS_decl; --- 384,409 ---- (super_type && TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (super_type)) ! static tree class_chain = NULL_TREE; ! static tree alias_chain = NULL_TREE; ! static tree interface_chain = NULL_TREE; ! static tree protocol_chain = NULL_TREE; ! /* Chains to manage selectors that are referenced and defined in the module. */ ! static tree cls_ref_chain = NULL_TREE; /* Classes referenced. */ ! static tree sel_ref_chain = NULL_TREE; /* Selectors referenced. */ ! /* Chains to manage uniquing of strings. */ ! static tree class_names_chain = NULL_TREE; ! static tree meth_var_names_chain = NULL_TREE; ! static tree meth_var_types_chain = NULL_TREE; ! /* Hash tables to manage the global pool of method prototypes. */ static hash *nst_method_hash_list = 0; static hash *cls_method_hash_list = 0; ! /* Backend data declarations. */ static tree UOBJC_SYMBOLS_decl; *************** *** 401,406 **** set in start_class. */ ! static tree implementation_context = NULLT, ! implementation_template = NULLT; struct imp_entry --- 420,425 ---- set in start_class. */ ! static tree implementation_context = NULL_TREE; ! static tree implementation_template = NULL_TREE; struct imp_entry *************** *** 432,448 **** static tree UOBJC_SUPER_decl; ! static tree method_context = NULLT; ! static int method_slot = 0; /* used by start_method_def */ #define BUFSIZE 1024 ! static char *errbuf; /* a buffer for error diagnostics */ ! /* data imported from tree.c */ - extern struct obstack permanent_obstack, *current_obstack, *rtl_obstack; extern enum debug_info_type write_symbols; ! /* data imported from toplev.c */ extern char *dump_base_name; --- 451,466 ---- static tree UOBJC_SUPER_decl; ! static tree method_context = NULL_TREE; ! static int method_slot = 0; /* Used by start_method_def, */ #define BUFSIZE 1024 ! static char *errbuf; /* Buffer for error diagnostics */ ! /* Data imported from tree.c. */ extern enum debug_info_type write_symbols; ! /* Data imported from toplev.c. */ extern char *dump_base_name; *************** *** 475,479 **** int flag_warn_protocol = 1; ! /* tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information --- 493,497 ---- int flag_warn_protocol = 1; ! /* Tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information *************** *** 486,491 **** lang_init () { ! /* the beginning of the file is a new line; check for # */ ! /* With luck, we discover the real source file's name from that and put it in input_filename. */ ungetc (check_newline (), finput); --- 504,509 ---- lang_init () { ! /* The beginning of the file is a new line; check for #. ! With luck, we discover the real source file's name from that and put it in input_filename. */ ungetc (check_newline (), finput); *************** *** 538,542 **** void ! objc_finish () { if (doing_objc_thang) --- 556,560 ---- void ! finish_file () { if (doing_objc_thang) *************** *** 593,598 **** tree declspecs; { ! tree decl = start_decl (declarator, declspecs, 0); ! finish_decl (decl, NULLT, NULLT); return decl; } --- 611,616 ---- tree declspecs; { ! tree decl = start_decl (declarator, declspecs, 0, NULL_TREE, NULL_TREE); ! finish_decl (decl, NULL_TREE, NULL_TREE); return decl; } *************** *** 635,651 **** if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { ! if ((fnd = lookup_method (class_meth ! ? PROTOCOL_CLS_METHODS (p) ! : PROTOCOL_NST_METHODS (p), sel_name))) ! ; ! else if (PROTOCOL_LIST (p)) ! fnd = lookup_method_in_protocol_list (PROTOCOL_LIST (p), sel_name, class_meth); } else ! ; /* an identifier...if we could not find a protocol. */ if (fnd) return fnd; } return 0; } --- 653,671 ---- if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { ! if ((fnd = lookup_method (class_meth ! ? PROTOCOL_CLS_METHODS (p) ! : PROTOCOL_NST_METHODS (p), sel_name))) ! ; ! else if (PROTOCOL_LIST (p)) ! fnd = lookup_method_in_protocol_list (PROTOCOL_LIST (p), ! sel_name, class_meth); } else ! ; /* An identifier...if we could not find a protocol. */ if (fnd) return fnd; } + return 0; } *************** *** 658,684 **** tree rproto, p; ! /* make sure the protocol is support by the object on the rhs */ if (TREE_CODE (lproto) == PROTOCOL_INTERFACE_TYPE) { ! tree fnd = 0; ! for (rproto = rproto_list; rproto; rproto = TREE_CHAIN (rproto)) ! { ! p = TREE_VALUE (rproto); ! if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) ! { ! if (lproto == p) ! fnd = lproto; ! else if (PROTOCOL_LIST (p)) ! fnd = lookup_protocol_in_reflist (PROTOCOL_LIST (p), lproto); ! } ! if (fnd) ! return fnd; ! } } else ! ; /* an identifier...if we could not find a protocol. */ return 0; --- 678,704 ---- tree rproto, p; ! /* Make sure the protocol is support by the object on the rhs. */ if (TREE_CODE (lproto) == PROTOCOL_INTERFACE_TYPE) { ! tree fnd = 0; ! for (rproto = rproto_list; rproto; rproto = TREE_CHAIN (rproto)) ! { ! p = TREE_VALUE (rproto); ! if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) ! { ! if (lproto == p) ! fnd = lproto; ! else if (PROTOCOL_LIST (p)) ! fnd = lookup_protocol_in_reflist (PROTOCOL_LIST (p), lproto); ! } ! if (fnd) ! return fnd; ! } } else ! ; /* An identifier...if we could not find a protocol. */ return 0; *************** *** 696,700 **** int reflexive; { ! /* new clause for protocols */ if (TREE_CODE (lhs) == POINTER_TYPE --- 716,720 ---- int reflexive; { ! /* New clause for protocols. */ if (TREE_CODE (lhs) == POINTER_TYPE *************** *** 748,752 **** rproto = lookup_protocol_in_reflist (rproto_list, p); - /* NEW!!! */ /* Check for protocols adopted by categories. */ cat = CLASS_CATEGORY_LIST (rinter); --- 768,771 ---- *************** *** 761,764 **** --- 780,784 ---- rinter = lookup_interface (CLASS_SUPER_NAME (rinter)); } + if (!rproto) warning ("class `%s' does not implement the `%s' protocol", *************** *** 768,792 **** } ! return 1; /* may change...based on whether there was any mismatch */ } else if (rhs_is_proto) ! { ! /* lhs is not a protocol...warn if it is statically typed */ - if (TYPED_OBJECT (TREE_TYPE (lhs))) - return 0; - else - return 1; /* one of the types is a protocol */ - } else ! return -1; /* defer to comptypes */ } else if (TREE_CODE (lhs) == RECORD_TYPE && TREE_CODE (rhs) == RECORD_TYPE) ! ; /* fall thru...this is the case we have been handling all along */ else ! return -1; /* defer to comptypes */ - /* End of new protocol support. */ - /* `id' = ` *', ` *' = `id' */ --- 788,809 ---- } ! /* May change...based on whether there was any mismatch */ ! return 1; } else if (rhs_is_proto) ! /* Lhs is not a protocol...warn if it is statically typed */ ! return (TYPED_OBJECT (TREE_TYPE (lhs)) != 0); else ! /* Defer to comptypes .*/ ! return -1; } + else if (TREE_CODE (lhs) == RECORD_TYPE && TREE_CODE (rhs) == RECORD_TYPE) ! ; /* Fall thru. This is the case we have been handling all along */ else ! /* Defer to comptypes. */ ! return -1; /* `id' = ` *', ` *' = `id' */ *************** *** 831,835 **** } else ! return -1; /* defer to comptypes */ } --- 848,853 ---- } else ! /* Defer to comptypes. */ ! return -1; } *************** *** 871,879 **** { tree t, m = TYPE_MAIN_VARIANT (type); - struct obstack *ambient_obstack = current_obstack; ! current_obstack = &permanent_obstack; t = copy_node (type); TYPE_BINFO (t) = make_tree_vec (2); /* Add this type to the chain of variants of TYPE. */ --- 889,898 ---- { tree t, m = TYPE_MAIN_VARIANT (type); ! push_obstacks_nochange (); ! end_temporary_allocation (); t = copy_node (type); TYPE_BINFO (t) = make_tree_vec (2); + pop_obstacks (); /* Add this type to the chain of variants of TYPE. */ *************** *** 881,886 **** TYPE_NEXT_VARIANT (m) = t; - current_obstack = ambient_obstack; - /* Look up protocols and install in lang specific list. */ TYPE_PROTOCOL_LIST (t) = lookup_and_install_protocols (protocols); --- 900,903 ---- *************** *** 890,894 **** we just created will actually be used...what a hack! */ if (TYPE_POINTER_TO (t)) ! TYPE_POINTER_TO (t) = NULL; type = t; --- 907,911 ---- we just created will actually be used...what a hack! */ if (TYPE_POINTER_TO (t)) ! TYPE_POINTER_TO (t) = 0; type = t; *************** *** 913,931 **** } else ! { ! fatal ("Undefined type `id', please import "); ! } /* This clause creates a new pointer type that is qualified with the protocol specification...this info is used later to do more elaborate type checking. */ if (protocols) { tree t, m = TYPE_MAIN_VARIANT (type); - struct obstack *ambient_obstack = current_obstack; ! current_obstack = &permanent_obstack; t = copy_node (type); TYPE_BINFO (t) = make_tree_vec (2); /* Add this type to the chain of variants of TYPE. */ --- 930,948 ---- } else ! fatal ("Undefined type `id', please import "); /* This clause creates a new pointer type that is qualified with the protocol specification...this info is used later to do more elaborate type checking. */ + if (protocols) { tree t, m = TYPE_MAIN_VARIANT (type); ! push_obstacks_nochange (); ! end_temporary_allocation (); t = copy_node (type); TYPE_BINFO (t) = make_tree_vec (2); + pop_obstacks (); /* Add this type to the chain of variants of TYPE. */ *************** *** 933,939 **** TYPE_NEXT_VARIANT (m) = t; ! current_obstack = ambient_obstack; ! ! /* look up protocols...and install in lang specific list */ TYPE_PROTOCOL_LIST (t) = lookup_and_install_protocols (protocols); --- 950,954 ---- TYPE_NEXT_VARIANT (m) = t; ! /* Look up protocols...and install in lang specific list */ TYPE_PROTOCOL_LIST (t) = lookup_and_install_protocols (protocols); *************** *** 973,981 **** else { ! /* replace identifier with actual protocol node */ TREE_VALUE (proto) = p; prev = proto; } } return return_value; } --- 988,997 ---- else { ! /* Replace identifier with actual protocol node. */ TREE_VALUE (proto) = p; prev = proto; } } + return return_value; } *************** *** 992,995 **** --- 1008,1012 ---- { tree decl = build_decl (code, get_identifier (name), type); + if (code == VAR_DECL) { *************** *** 998,1008 **** pushdecl (decl); } return decl; } ! /* purpose: "play" parser, creating/installing representations of the declarations that are required by Objective-C. ! model: type_spec--------->sc_spec --- 1015,1027 ---- pushdecl (decl); } + + DECL_ARTIFICIAL (decl) = 1; return decl; } ! /* Purpose: "play" parser, creating/installing representations of the declarations that are required by Objective-C. ! Model: type_spec--------->sc_spec *************** *** 1018,1022 **** tree super_p; ! /* defined in `objc.h' */ objc_object_id = get_identifier (TAG_OBJECT); --- 1037,1041 ---- tree super_p; ! /* Defined in `objc.h' */ objc_object_id = get_identifier (TAG_OBJECT); *************** *** 1056,1060 **** = build_function_type (id_type, tree_cons (NULL_TREE, id_type, ! tree_cons (NULLT, selector_type, NULLT))); if (! flag_next_runtime) --- 1075,1080 ---- = build_function_type (id_type, tree_cons (NULL_TREE, id_type, ! tree_cons (NULL_TREE, selector_type, ! NULL_TREE))); if (! flag_next_runtime) *************** *** 1065,1068 **** --- 1085,1089 ---- TREE_PUBLIC (umsg_decl) = 1; DECL_INLINE (umsg_decl) = 1; + DECL_ARTIFICIAL (umsg_decl) = 1; if (flag_traditional && TAG_MSGSEND[0] != '_') *************** *** 1080,1084 **** = build_function_type (id_type, tree_cons (NULL_TREE, super_p, ! tree_cons (NULLT, selector_type, NULLT))); umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, --- 1101,1106 ---- = build_function_type (id_type, tree_cons (NULL_TREE, super_p, ! tree_cons (NULL_TREE, selector_type, ! NULL_TREE))); umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, *************** *** 1088,1094 **** temp_type = build_function_type (id_type, ! tree_cons (NULLT, const_string_type_node, ! tree_cons (NULLT, void_type_node, NULLT))); objc_get_class_decl --- 1110,1117 ---- temp_type = build_function_type (id_type, ! tree_cons (NULL_TREE, const_string_type_node, ! tree_cons (NULL_TREE, void_type_node, ! NULL_TREE))); objc_get_class_decl *************** *** 1106,1121 **** if (flag_typed_selectors) { ! /* supress outputting debug symbols, because ! dbxout_init hasn'r been called yet... */ enum debug_info_type save_write_symbols = write_symbols; write_symbols = NO_DEBUG; build_selector_template (); ! temp_type = build_array_type (objc_selector_template, NULLT); write_symbols = save_write_symbols; } else ! temp_type = build_array_type (selector_type, NULLT); layout_type (temp_type); --- 1129,1144 ---- if (flag_typed_selectors) { ! /* Suppress outputting debug symbols, because ! dbxout_init hasn'r been called yet. */ enum debug_info_type save_write_symbols = write_symbols; write_symbols = NO_DEBUG; build_selector_template (); ! temp_type = build_array_type (objc_selector_template, NULL_TREE); write_symbols = save_write_symbols; } else ! temp_type = build_array_type (selector_type, NULL_TREE); layout_type (temp_type); *************** *** 1123,1128 **** = create_builtin_decl (VAR_DECL, temp_type, "_OBJC_SELECTOR_TABLE"); - } generate_forward_declaration_to_string_table (); --- 1146,1153 ---- = create_builtin_decl (VAR_DECL, temp_type, "_OBJC_SELECTOR_TABLE"); + /* Avoid warning when not sending messages. */ + TREE_USED (UOBJC_SELECTOR_TABLE_decl) = 1; + } generate_forward_declaration_to_string_table (); *************** *** 1142,1154 **** int wide_flag = 0; tree a_string = build_string (len, str); /* Some code from combine_strings, which is local to c-parse.y. */ if (TREE_TYPE (a_string) == int_array_type_node) wide_flag = 1; ! TREE_TYPE (a_string) = ! build_array_type (wide_flag ? integer_type_node : char_type_node, ! build_index_type (build_int_2 (len - 1, 0))); ! TREE_CONSTANT (a_string) = 1; /* puts string in the ".text" segment */ TREE_STATIC (a_string) = 1; --- 1167,1180 ---- int wide_flag = 0; tree a_string = build_string (len, str); + /* Some code from combine_strings, which is local to c-parse.y. */ if (TREE_TYPE (a_string) == int_array_type_node) wide_flag = 1; ! TREE_TYPE (a_string) ! = build_array_type (wide_flag ? integer_type_node : char_type_node, ! build_index_type (build_int_2 (len - 1, 0))); ! TREE_CONSTANT (a_string) = 1; /* Puts string in the readonly segment */ TREE_STATIC (a_string) = 1; *************** *** 1172,1180 **** /* Given a chain of OBJC_STRING_CST's, build a static instance of ! NXConstantString which points at the concatenation of those strings. We place the string object in the __string_objects section of the __OBJC segment. The Objective-C runtime will initialize the isa ! pointers of the string objects to point at the NXConstantString ! class object. */ tree --- 1198,1206 ---- /* Given a chain of OBJC_STRING_CST's, build a static instance of ! NXConstanString which points at the concatenation of those strings. We place the string object in the __string_objects section of the __OBJC segment. The Objective-C runtime will initialize the isa ! pointers of the string objects to point at the NXConstandString class ! object. */ tree *************** *** 1188,1195 **** objc_fatal (); ! if (lookup_interface (constant_string_id) == NULLT) { error ("Cannot find interface declaration for `%s'", ! IDENTIFIER_POINTER (constant_string_id)); return error_mark_node; } --- 1214,1221 ---- objc_fatal (); ! if (lookup_interface (constant_string_id) == NULL_TREE) { error ("Cannot find interface declaration for `%s'", ! IDENTIFIER_POINTER (constant_string_id)); return error_mark_node; } *************** *** 1197,1215 **** add_class_reference (constant_string_id); ! /* combine_strings will work for OBJC_STRING_CST's too. */ string = combine_strings (strings); TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; /* & ((NXConstantString) {0, string, length}) */ ! initlist = build_tree_list (NULLT, build_int_2 (0, 0)); ! initlist = tree_cons (NULLT, build_unary_op (ADDR_EXPR, string, 1), ! initlist); ! initlist = tree_cons (NULLT, build_int_2 (length, 0), initlist); ! constructor = build_constructor (constant_string_type, ! nreverse (initlist)); ! return build_unary_op (ADDR_EXPR, constructor, 1); } --- 1223,1300 ---- add_class_reference (constant_string_id); ! /* Combine_strings will work for OBJC_STRING_CST's too. */ string = combine_strings (strings); TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; + if (! flag_next_runtime) + { + push_obstacks_nochange (); + end_temporary_allocation (); + if (! TREE_PERMANENT (strings)) + string = my_build_string (length + 1, + TREE_STRING_POINTER (string)); + } + /* & ((NXConstantString) {0, string, length}) */ ! initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); ! initlist ! = tree_cons (NULL_TREE, copy_node (build_unary_op (ADDR_EXPR, string, 1)), ! initlist); ! initlist = tree_cons (NULL_TREE, build_int_2 (length, 0), initlist); ! constructor = build_constructor (constant_string_type, nreverse (initlist)); ! ! if (!flag_next_runtime) ! { ! constructor ! = objc_add_static_instance (constructor, constant_string_type); ! pop_obstacks (); ! } ! ! return (build_unary_op (ADDR_EXPR, constructor, 1)); ! } ! ! /* Declare a static instance of CLASS_DECL initialized by CONSTRUCTOR. */ ! static tree ! objc_add_static_instance (constructor, class_decl) ! tree constructor, class_decl; ! { ! static int num_static_inst; ! tree *chain, decl, decl_spec, decl_expr; ! char buf[256]; ! ! push_obstacks_nochange (); ! end_temporary_allocation (); ! ! /* Find the list of static instances for the CLASS_DECL. Create one if ! not found. */ ! for (chain = &objc_static_instances; ! *chain && TREE_VALUE (*chain) != class_decl; ! chain = &TREE_CHAIN (*chain)); ! if (!*chain) ! { ! *chain = tree_cons (NULL_TREE, class_decl, NULL_TREE); ! add_objc_string (TYPE_NAME (class_decl), class_names); ! } ! ! sprintf (buf, "_OBJC_INSTANCE_%d", num_static_inst++); ! decl = build_decl (VAR_DECL, get_identifier (buf), class_decl); ! DECL_COMMON (decl) = 1; ! TREE_STATIC (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! pushdecl_top_level (decl); ! rest_of_decl_compilation (decl, 0, 1, 0); ! ! /* Do this here so it gets output later instead of possibly ! inside something else we are writing. */ ! DECL_INITIAL (decl) = constructor; ! ! /* Add the DECL to the head of this CLASS' list. */ ! TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, decl, TREE_PURPOSE (*chain)); ! ! pop_obstacks (); ! return decl; } *************** *** 1248,1252 **** tree field_decl, field_decl_chain, index; ! objc_symtab_template = start_struct (RECORD_TYPE, get_identifier (UTAG_SYMTAB)); /* long sel_ref_cnt; */ --- 1333,1338 ---- tree field_decl, field_decl_chain, index; ! objc_symtab_template ! = start_struct (RECORD_TYPE, get_identifier (UTAG_SYMTAB)); /* long sel_ref_cnt; */ *************** *** 1288,1292 **** chainon (field_decl_chain, field_decl); ! finish_struct (objc_symtab_template, field_decl_chain); } --- 1374,1378 ---- chainon (field_decl_chain, field_decl); ! finish_struct (objc_symtab_template, field_decl_chain, NULL_TREE); } *************** *** 1298,1302 **** tree type; { ! tree expr, initlist = NULLT; struct imp_entry *impent; --- 1384,1388 ---- tree type; { ! tree expr, initlist = NULL_TREE; struct imp_entry *impent; *************** *** 1307,1311 **** { expr = build_unary_op (ADDR_EXPR, impent->class_decl, 0); ! initlist = tree_cons (NULLT, expr, initlist); } } --- 1393,1397 ---- { expr = build_unary_op (ADDR_EXPR, impent->class_decl, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } } *************** *** 1317,1323 **** { expr = build_unary_op (ADDR_EXPR, impent->class_decl, 0); ! initlist = tree_cons (NULLT, expr, initlist); } } return build_constructor (type, nreverse (initlist)); } --- 1403,1410 ---- { expr = build_unary_op (ADDR_EXPR, impent->class_decl, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } } + return build_constructor (type, nreverse (initlist)); } *************** *** 1333,1344 **** /* sel_ref_cnt = { ..., 5, ... } */ ! initlist = build_tree_list (NULLT, build_int_2 (0, 0)); /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */ if (flag_next_runtime || ! sel_ref_chain) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else ! initlist = tree_cons (NULLT, build_unary_op (ADDR_EXPR, UOBJC_SELECTOR_TABLE_decl, 1), --- 1420,1431 ---- /* sel_ref_cnt = { ..., 5, ... } */ ! initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */ if (flag_next_runtime || ! sel_ref_chain) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else ! initlist = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, UOBJC_SELECTOR_TABLE_decl, 1), *************** *** 1347,1355 **** /* cls_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULLT, build_int_2 (imp_count, 0), initlist); /* cat_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULLT, build_int_2 (cat_count, 0), initlist); /* cls_def = { ..., { &Foo, &Bar, ...}, ... } */ --- 1434,1442 ---- /* cls_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULL_TREE, build_int_2 (imp_count, 0), initlist); /* cat_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULL_TREE, build_int_2 (cat_count, 0), initlist); /* cls_def = { ..., { &Foo, &Bar, ...}, ... } */ *************** *** 1360,1364 **** field = TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (field)))); ! initlist = tree_cons (NULLT, init_def_list (TREE_TYPE (field)), initlist); } --- 1447,1451 ---- field = TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (field)))); ! initlist = tree_cons (NULL_TREE, init_def_list (TREE_TYPE (field)), initlist); } *************** *** 1375,1378 **** --- 1462,1466 ---- struct imp_entry *impent; tree sav = implementation_context; + for (impent = imp_list; impent; impent = impent->next) { *************** *** 1407,1421 **** build_objc_symtab_template (); ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_STATIC]); UOBJC_SYMBOLS_decl = start_decl (get_identifier ("_OBJC_SYMBOLS"), ! tree_cons (NULLT, objc_symtab_template, sc_spec), 1); - end_temporary_allocation (); /* start_decl trying to be smart about inits */ TREE_USED (UOBJC_SYMBOLS_decl) = 1; DECL_IGNORED_P (UOBJC_SYMBOLS_decl) = 1; finish_decl (UOBJC_SYMBOLS_decl, init_objc_symtab (TREE_TYPE (UOBJC_SYMBOLS_decl)), ! NULLT); } --- 1495,1512 ---- build_objc_symtab_template (); ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); UOBJC_SYMBOLS_decl = start_decl (get_identifier ("_OBJC_SYMBOLS"), ! tree_cons (NULL_TREE, ! objc_symtab_template, sc_spec), ! 1, ! NULL_TREE, NULL_TREE); TREE_USED (UOBJC_SYMBOLS_decl) = 1; DECL_IGNORED_P (UOBJC_SYMBOLS_decl) = 1; + DECL_ARTIFICIAL (UOBJC_SYMBOLS_decl) = 1; finish_decl (UOBJC_SYMBOLS_decl, init_objc_symtab (TREE_TYPE (UOBJC_SYMBOLS_decl)), ! NULL_TREE); } *************** *** 1429,1444 **** expr = build_int_2 (OBJC_VERSION, 0); ! initlist = build_tree_list (NULLT, expr); /* size = { ..., sizeof (struct objc_module), ... } */ expr = size_in_bytes (objc_module_template); ! initlist = tree_cons (NULLT, expr, initlist); /* name = { ..., "foo.m", ... } */ expr = add_objc_string (get_identifier (input_filename), class_names); ! initlist = tree_cons (NULLT, expr, initlist); /* symtab = { ..., _OBJC_SYMBOLS, ... } */ --- 1520,1546 ---- expr = build_int_2 (OBJC_VERSION, 0); ! initlist = build_tree_list (NULL_TREE, expr); /* size = { ..., sizeof (struct objc_module), ... } */ expr = size_in_bytes (objc_module_template); ! initlist = tree_cons (NULL_TREE, expr, initlist); /* name = { ..., "foo.m", ... } */ expr = add_objc_string (get_identifier (input_filename), class_names); ! initlist = tree_cons (NULL_TREE, expr, initlist); ! + if (!flag_next_runtime) + { + /* statics = { ..., _OBJC_STATIC_INSTANCES, ... } */ + if (static_instances_decl) + expr = build_unary_op (ADDR_EXPR, static_instances_decl, 0); + else + expr = build_int_2 (0, 0); + initlist = tree_cons (NULL_TREE, expr, initlist); + } + /* symtab = { ..., _OBJC_SYMBOLS, ... } */ *************** *** 1447,1451 **** else expr = build_int_2 (0, 0); ! initlist = tree_cons (NULLT, expr, initlist); return build_constructor (type, nreverse (initlist)); --- 1549,1553 ---- else expr = build_int_2 (0, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); return build_constructor (type, nreverse (initlist)); *************** *** 1458,1464 **** also). ! struct objc_module { ... } _OBJC_MODULE = { ... }; ! ! */ static char * --- 1560,1564 ---- also). ! struct objc_module { ... } _OBJC_MODULE = { ... }; */ static char * *************** *** 1467,1516 **** tree decl_specs, field_decl, field_decl_chain; ! objc_module_template = start_struct (RECORD_TYPE, get_identifier (UTAG_MODULE)); ! /* long version; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("version"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* long size; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("size"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* char *name; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("name")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_symtab *symtab; */ decl_specs = get_identifier (UTAG_SYMTAB); ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, decl_specs)); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("symtab")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_module_template, field_decl_chain); ! /* create an instance of "objc_module" */ ! decl_specs = tree_cons (NULLT, objc_module_template, ! build_tree_list (NULLT, ridpointers[(int) RID_STATIC])); UOBJC_MODULES_decl = start_decl (get_identifier ("_OBJC_MODULES"), ! decl_specs, 1); ! end_temporary_allocation (); /* start_decl trying to be smart about inits */ DECL_IGNORED_P (UOBJC_MODULES_decl) = 1; finish_decl (UOBJC_MODULES_decl, init_module_descriptor (TREE_TYPE (UOBJC_MODULES_decl)), ! NULLT); /* Mark the decl to avoid "defined but not used" warning. */ --- 1567,1638 ---- tree decl_specs, field_decl, field_decl_chain; ! objc_module_template ! = start_struct (RECORD_TYPE, get_identifier (UTAG_MODULE)); ! /* Long version; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("version"); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* long size; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("size"); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* char *name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); + + if (!flag_next_runtime) + { + /* void *statics */ + + decl_specs = get_identifier (UTAG_STATICS); + decl_specs + = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs)); + field_decl + = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("statics")); + field_decl = grokfield (input_filename, lineno, field_decl, + decl_specs, NULL_TREE); + chainon (field_decl_chain, field_decl); + } + + /* struct objc_symtab *symtab; */ decl_specs = get_identifier (UTAG_SYMTAB); ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs)); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("symtab")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_module_template, field_decl_chain, NULL_TREE); ! /* Create an instance of "objc_module". */ ! decl_specs = tree_cons (NULL_TREE, objc_module_template, ! build_tree_list (NULL_TREE, ! ridpointers[(int) RID_STATIC])); UOBJC_MODULES_decl = start_decl (get_identifier ("_OBJC_MODULES"), ! decl_specs, 1, NULL_TREE, NULL_TREE); ! DECL_ARTIFICIAL (UOBJC_MODULES_decl) = 1; DECL_IGNORED_P (UOBJC_MODULES_decl) = 1; finish_decl (UOBJC_MODULES_decl, init_module_descriptor (TREE_TYPE (UOBJC_MODULES_decl)), ! NULL_TREE); /* Mark the decl to avoid "defined but not used" warning. */ *************** *** 1519,1523 **** /* Generate a constructor call for the module descriptor. This code was generated by reading the grammar rules ! of c-parse.y; Therefore, it may not be the most efficient way of generating the requisite code. */ --- 1641,1645 ---- /* Generate a constructor call for the module descriptor. This code was generated by reading the grammar rules ! of c-parse.in; Therefore, it may not be the most efficient way of generating the requisite code. */ *************** *** 1542,1545 **** --- 1664,1668 ---- function_type); DECL_EXTERNAL (function_decl) = 1; + DECL_ARTIFICIAL (function_decl) = 1; TREE_PUBLIC (function_decl) = 1; *************** *** 1548,1552 **** parms ! = build_tree_list (NULLT, build_unary_op (ADDR_EXPR, UOBJC_MODULES_decl, 0)); decelerator = build_function_call (function_decl, parms); --- 1671,1675 ---- parms ! = build_tree_list (NULL_TREE, build_unary_op (ADDR_EXPR, UOBJC_MODULES_decl, 0)); decelerator = build_function_call (function_decl, parms); *************** *** 1561,1565 **** void_list_node), NULL_TREE), ! 0); #if 0 /* This should be turned back on later for the systems where collect is not needed. */ --- 1684,1688 ---- void_list_node), NULL_TREE), ! NULL_TREE, NULL_TREE, 0); #if 0 /* This should be turned back on later for the systems where collect is not needed. */ *************** *** 1591,1602 **** tree sc_spec, decl_specs, expr_decl; ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_EXTERN], NULLT); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, get_identifier ("_OBJC_STRINGS"), NULLT); UOBJC_STRINGS_decl = define_decl (expr_decl, decl_specs); } /* Output all strings. */ --- 1714,1827 ---- tree sc_spec, decl_specs, expr_decl; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_EXTERN], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl ! = build_nt (ARRAY_REF, get_identifier ("_OBJC_STRINGS"), NULL_TREE); UOBJC_STRINGS_decl = define_decl (expr_decl, decl_specs); } + /* Return the DECL of the string IDENT in the SECTION. */ + + static tree + get_objc_string_decl (ident, section) + tree ident; + enum string_section section; + { + tree chain, decl; + + if (section == class_names) + chain = class_names_chain; + else if (section == meth_var_names) + chain = meth_var_names_chain; + else if (section == meth_var_types) + chain = meth_var_types_chain; + + for (; chain != 0; chain = TREE_VALUE (chain)) + if (TREE_VALUE (chain) == ident) + return (TREE_PURPOSE (chain)); + + abort (); + return NULL_TREE; + } + + /* Output references to all statically allocated objects. Return the DECL + for the array built. */ + + static tree + generate_static_references () + { + tree decls = NULL_TREE, ident, decl_spec, expr_decl, expr = NULL_TREE; + tree class_name, class, decl, instance, idecl, initlist; + tree cl_chain, in_chain, type; + int num_inst, num_class; + char buf[256]; + + if (flag_next_runtime) + abort (); + + for (cl_chain = objc_static_instances, num_class = 0; + cl_chain; cl_chain = TREE_CHAIN (cl_chain), num_class++) + { + for (num_inst = 0, in_chain = TREE_PURPOSE (cl_chain); + in_chain; num_inst++, in_chain = TREE_CHAIN (in_chain)); + + sprintf (buf, "_OBJC_STATIC_INSTANCES_%d", num_class); + ident = get_identifier (buf); + + expr_decl = build_nt (ARRAY_REF, ident, NULL_TREE); + decl_spec = tree_cons (NULL_TREE, build_pointer_type (void_type_node), + build_tree_list (NULL_TREE, + ridpointers[(int) RID_STATIC])); + decl = start_decl (expr_decl, decl_spec, 1, NULL_TREE, NULL_TREE); + DECL_CONTEXT (decl) = 0; + DECL_ARTIFICIAL (decl) = 1; + + /* Output {class_name, ...}. */ + class = TREE_VALUE (cl_chain); + class_name = get_objc_string_decl (TYPE_NAME (class), class_names); + initlist = build_tree_list (NULL_TREE, + build_unary_op (ADDR_EXPR, class_name, 1)); + + /* Output {..., instance, ...}. */ + for (in_chain = TREE_PURPOSE (cl_chain); + in_chain; in_chain = TREE_CHAIN (in_chain)) + { + expr = build_unary_op (ADDR_EXPR, TREE_VALUE (in_chain), 1); + initlist = tree_cons (NULL_TREE, expr, initlist); + } + + /* Output {..., NULL}. */ + initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + + expr = build_constructor (TREE_TYPE (decl), nreverse (initlist)); + finish_decl (decl, expr, NULL_TREE); + TREE_USED (decl) = 1; + + type = build_array_type (build_pointer_type (void_type_node), 0); + decl = build_decl (VAR_DECL, ident, type); + make_decl_rtl (decl, 0, 1); + TREE_USED (decl) = 1; + decls + = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, decl, 1), decls); + } + + decls = tree_cons (NULL_TREE, build_int_2 (0, 0), decls); + ident = get_identifier ("_OBJC_STATIC_INSTANCES"); + expr_decl = build_nt (ARRAY_REF, ident, NULL_TREE); + decl_spec = tree_cons (NULL_TREE, build_pointer_type (void_type_node), + build_tree_list (NULL_TREE, + ridpointers[(int) RID_STATIC])); + static_instances_decl + = start_decl (expr_decl, decl_spec, 1, NULL_TREE, NULL_TREE); + DECL_CONTEXT (static_instances_decl) = 0; + DECL_ARTIFICIAL (static_instances_decl) = 1; + end_temporary_allocation (); + expr = build_constructor (TREE_TYPE (static_instances_decl), + nreverse (decls)); + finish_decl (static_instances_decl, expr, NULL_TREE); + } + /* Output all strings. */ *************** *** 1612,1623 **** string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULLT); ! decl = start_decl (expr_decl, decl_specs, 1); end_temporary_allocation (); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, ! IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULLT); } --- 1837,1849 ---- string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec ! = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULL_TREE); ! decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE, NULL_TREE); end_temporary_allocation (); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, ! IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULL_TREE); } *************** *** 1626,1637 **** string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULLT); ! decl = start_decl (expr_decl, decl_specs, 1); ! end_temporary_allocation (); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, ! IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULLT); } --- 1852,1863 ---- string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec ! = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULL_TREE); ! decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE, NULL_TREE); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, ! IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULL_TREE); } *************** *** 1640,1651 **** string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULLT); ! decl = start_decl (expr_decl, decl_specs, 1); ! end_temporary_allocation (); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULLT); } } --- 1866,1877 ---- string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec ! = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULL_TREE); ! decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE, NULL_TREE); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULL_TREE); } } *************** *** 1657,1668 **** tree decl, ident; char buf[256]; - struct obstack *save_current_obstack = current_obstack; - struct obstack *save_rtl_obstack = rtl_obstack; static int idx = 0; sprintf (buf, "_OBJC_SELECTOR_REFERENCES_%d", idx++); ! /* new stuff */ ! rtl_obstack = current_obstack = &permanent_obstack; ident = get_identifier (buf); --- 1883,1893 ---- tree decl, ident; char buf[256]; static int idx = 0; sprintf (buf, "_OBJC_SELECTOR_REFERENCES_%d", idx++); ! push_obstacks_nochange (); ! end_temporary_allocation (); ! ident = get_identifier (buf); *************** *** 1672,1681 **** TREE_USED (decl) = 1; TREE_READONLY (decl) = 1; ! make_decl_rtl (decl, 0, 1); /* usually called from `rest_of_decl_compilation' */ ! pushdecl_top_level (decl); /* our `extended/custom' pushdecl in c-decl.c */ ! current_obstack = save_current_obstack; ! rtl_obstack = save_rtl_obstack; return decl; --- 1897,1907 ---- TREE_USED (decl) = 1; TREE_READONLY (decl) = 1; + DECL_ARTIFICIAL (decl) = 1; + DECL_CONTEXT (decl) = 0; ! make_decl_rtl (decl, 0, 1); ! pushdecl_top_level (decl); ! pop_obstacks (); return decl; *************** *** 1710,1715 **** expr = build_unary_op (ADDR_EXPR, expr, 0); ! cast = build_tree_list (build_tree_list (NULLT, ridpointers[(int) RID_CHAR]), ! build1 (INDIRECT_REF, NULLT, NULLT)); TREE_TYPE (expr) = groktypename (cast); return expr; --- 1936,1942 ---- expr = build_unary_op (ADDR_EXPR, expr, 0); ! cast = build_tree_list (build_tree_list (NULL_TREE, ! ridpointers[(int) RID_CHAR]), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)); TREE_TYPE (expr) = groktypename (cast); return expr; *************** *** 1721,1725 **** { tree expr = build_msg_pool_reference (offset); ! TREE_TYPE (expr) = selector_type; /* cast */ return expr; } --- 1948,1952 ---- { tree expr = build_msg_pool_reference (offset); ! TREE_TYPE (expr) = selector_type; return expr; } *************** *** 1729,1733 **** { tree sc_spec, decl_specs; ! tree chain, initlist = NULLT; int offset = 0; tree decl, var_decl, name; --- 1956,1960 ---- { tree sc_spec, decl_specs; ! tree chain, initlist = NULL_TREE; int offset = 0; tree decl, var_decl, name; *************** *** 1748,1761 **** name = DECL_NAME (TREE_PURPOSE (chain)); ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_STATIC]); /* static SEL _OBJC_SELECTOR_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULLT, selector_type, sc_spec); var_decl = name; ! /* the `decl' that is returned from start_decl is the one that we forward declared in `build_selector_reference' */ ! decl = start_decl (var_decl, decl_specs, 1); } --- 1975,1988 ---- name = DECL_NAME (TREE_PURPOSE (chain)); ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); /* static SEL _OBJC_SELECTOR_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULL_TREE, selector_type, sc_spec); var_decl = name; ! /* The `decl' that is returned from start_decl is the one that we forward declared in `build_selector_reference' */ ! decl = start_decl (var_decl, decl_specs, 1, NULL_TREE, NULL_TREE); } *************** *** 1764,1783 **** if (flag_next_runtime) ! { ! end_temporary_allocation (); ! finish_decl (decl, expr, NULLT); ! } else { if (flag_typed_selectors) { ! tree eltlist = NULLT; tree encoding = get_proto_encoding (TREE_PURPOSE (chain)); ! eltlist = tree_cons (NULLT, expr, NULLT); ! eltlist = tree_cons (NULLT, encoding, eltlist); expr = build_constructor (objc_selector_template, nreverse (eltlist)); } ! initlist = tree_cons (NULLT, expr, initlist); } --- 1991,2007 ---- if (flag_next_runtime) ! finish_decl (decl, expr, NULL_TREE); else { if (flag_typed_selectors) { ! tree eltlist = NULL_TREE; tree encoding = get_proto_encoding (TREE_PURPOSE (chain)); ! eltlist = tree_cons (NULL_TREE, expr, NULL_TREE); ! eltlist = tree_cons (NULL_TREE, encoding, eltlist); expr = build_constructor (objc_selector_template, nreverse (eltlist)); } ! initlist = tree_cons (NULL_TREE, expr, initlist); } *************** *** 1790,1803 **** TREE_STATIC (UOBJC_SELECTOR_TABLE_decl) = 1; /* NULL terminate the list and fix the decl for output. */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); DECL_INITIAL (UOBJC_SELECTOR_TABLE_decl) = (tree) 1; initlist = build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl), nreverse (initlist)); ! finish_decl (UOBJC_SELECTOR_TABLE_decl, initlist, NULLT); ! current_function_decl = NULLT; } } - static tree get_proto_encoding (proto) --- 2014,2026 ---- TREE_STATIC (UOBJC_SELECTOR_TABLE_decl) = 1; /* NULL terminate the list and fix the decl for output. */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); DECL_INITIAL (UOBJC_SELECTOR_TABLE_decl) = (tree) 1; initlist = build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl), nreverse (initlist)); ! finish_decl (UOBJC_SELECTOR_TABLE_decl, initlist, NULL_TREE); ! current_function_decl = NULL_TREE; } } static tree get_proto_encoding (proto) *************** *** 1840,1848 **** if (TREE_PURPOSE (*chain) == ident && TREE_VALUE (*chain) == proto) goto return_at_index; index++; chain = &TREE_CHAIN (*chain); } ! *chain = perm_tree_cons (proto, ident, NULLT); return_at_index: --- 2063,2072 ---- if (TREE_PURPOSE (*chain) == ident && TREE_VALUE (*chain) == proto) goto return_at_index; + index++; chain = &TREE_CHAIN (*chain); } ! *chain = perm_tree_cons (proto, ident, NULL_TREE); return_at_index: *************** *** 1876,1880 **** expr = build_selector_reference_decl (ident); ! *chain = perm_tree_cons (expr, ident, NULLT); return (flag_next_runtime --- 2100,2104 ---- expr = build_selector_reference_decl (ident); ! *chain = perm_tree_cons (expr, ident, NULL_TREE); return (flag_next_runtime *************** *** 1890,1901 **** tree decl, ident; char buf[256]; - struct obstack *save_current_obstack = current_obstack; - struct obstack *save_rtl_obstack = rtl_obstack; static int idx = 0; sprintf (buf, "_OBJC_CLASS_REFERENCES_%d", idx++); ! /* new stuff */ ! rtl_obstack = current_obstack = &permanent_obstack; ident = get_identifier (buf); --- 2114,2124 ---- tree decl, ident; char buf[256]; static int idx = 0; sprintf (buf, "_OBJC_CLASS_REFERENCES_%d", idx++); ! push_obstacks_nochange (); ! end_temporary_allocation (); ! ident = get_identifier (buf); *************** *** 1905,1914 **** TREE_USED (decl) = 1; TREE_READONLY (decl) = 1; ! make_decl_rtl (decl, 0, 1); /* usually called from `rest_of_decl_compilation' */ ! pushdecl_top_level (decl); /* our `extended/custom' pushdecl in c-decl.c */ ! current_obstack = save_current_obstack; ! rtl_obstack = save_rtl_obstack; return decl; --- 2128,2138 ---- TREE_USED (decl) = 1; TREE_READONLY (decl) = 1; + DECL_CONTEXT (decl) = 0; + DECL_ARTIFICIAL (decl) = 1; ! make_decl_rtl (decl, 0, 1); ! pushdecl_top_level (decl); ! pop_obstacks (); return decl; *************** *** 1937,1945 **** while (chain); ! /* append to the end of the list */ ! TREE_CHAIN (tail) = perm_tree_cons (NULLT, ident, NULLT); } else ! cls_ref_chain = perm_tree_cons (NULLT, ident, NULLT); } --- 2161,2169 ---- while (chain); ! /* Append to the end of the list */ ! TREE_CHAIN (tail) = perm_tree_cons (NULL_TREE, ident, NULL_TREE); } else ! cls_ref_chain = perm_tree_cons (NULL_TREE, ident, NULL_TREE); } *************** *** 1961,1969 **** if (! TREE_PURPOSE (*chain)) TREE_PURPOSE (*chain) = build_class_reference_decl (ident); return TREE_PURPOSE (*chain); } decl = build_class_reference_decl (ident); ! *chain = perm_tree_cons (decl, ident, NULLT); return decl; } --- 2185,2194 ---- if (! TREE_PURPOSE (*chain)) TREE_PURPOSE (*chain) = build_class_reference_decl (ident); + return TREE_PURPOSE (*chain); } decl = build_class_reference_decl (ident); ! *chain = perm_tree_cons (decl, ident, NULL_TREE); return decl; } *************** *** 1974,1978 **** add_class_reference (ident); ! params = build_tree_list (NULLT, my_build_string (IDENTIFIER_LENGTH (ident) + 1, IDENTIFIER_POINTER (ident))); --- 2199,2203 ---- add_class_reference (ident); ! params = build_tree_list (NULL_TREE, my_build_string (IDENTIFIER_LENGTH (ident) + 1, IDENTIFIER_POINTER (ident))); *************** *** 1983,1987 **** } ! /* sel_refdef_chain is a list whose "value" fields will be instances of identifier_node that represent the selector. It returns the offset of the selector from the beginning of the _OBJC_STRINGS --- 2208,2212 ---- } ! /* SEL_REFDEF_CHAIN is a list whose "value" fields will be instances of identifier_node that represent the selector. It returns the offset of the selector from the beginning of the _OBJC_STRINGS *************** *** 2016,2020 **** decl = build_objc_string_decl (ident, section); ! *chain = perm_tree_cons (decl, ident, NULLT); return build_unary_op (ADDR_EXPR, decl, 1); --- 2241,2245 ---- decl = build_objc_string_decl (ident, section); ! *chain = perm_tree_cons (decl, ident, NULL_TREE); return build_unary_op (ADDR_EXPR, decl, 1); *************** *** 2028,2033 **** tree decl, ident; char buf[256]; - struct obstack *save_current_obstack = current_obstack; - struct obstack *save_rtl_obstack = rtl_obstack; static int class_names_idx = 0; static int meth_var_names_idx = 0; --- 2253,2256 ---- *************** *** 2041,2045 **** sprintf (buf, "_OBJC_METH_VAR_TYPE_%d", meth_var_types_idx++); ! rtl_obstack = current_obstack = &permanent_obstack; ident = get_identifier (buf); --- 2264,2269 ---- sprintf (buf, "_OBJC_METH_VAR_TYPE_%d", meth_var_types_idx++); ! push_obstacks_nochange (); ! end_temporary_allocation (); ident = get_identifier (buf); *************** *** 2050,2059 **** TREE_READONLY (decl) = 1; TREE_CONSTANT (decl) = 1; ! ! make_decl_rtl (decl, 0, 1); /* usually called from `rest_of_decl_compilation */ ! pushdecl_top_level (decl); /* our `extended/custom' pushdecl in c-decl.c */ ! current_obstack = save_current_obstack; ! rtl_obstack = save_rtl_obstack; return decl; --- 2274,2284 ---- TREE_READONLY (decl) = 1; TREE_CONSTANT (decl) = 1; ! DECL_CONTEXT (decl) = 0; ! DECL_ARTIFICIAL (decl) = 1; ! ! make_decl_rtl (decl, 0, 1); ! pushdecl_top_level (decl); ! pop_obstacks (); return decl; *************** *** 2102,2106 **** tree record = xref_tag (RECORD_TYPE, ident); TREE_STATIC_TEMPLATE (record) = 1; ! class_chain = tree_cons (NULLT, ident, class_chain); } } --- 2327,2331 ---- tree record = xref_tag (RECORD_TYPE, ident); TREE_STATIC_TEMPLATE (record) = 1; ! class_chain = tree_cons (NULL_TREE, ident, class_chain); } } *************** *** 2142,2146 **** return chain; } ! return NULLT; } --- 2367,2371 ---- return chain; } ! return NULL_TREE; } *************** *** 2170,2173 **** --- 2395,2399 ---- list = TREE_CHAIN (list); } + *head = newlist; return tail; *************** *** 2206,2211 **** IDENTIFIER_POINTER (super_name), IDENTIFIER_POINTER (my_name)); ! exit (34); } if (super_interface == interface) { --- 2432,2438 ---- IDENTIFIER_POINTER (super_name), IDENTIFIER_POINTER (my_name)); ! exit (FATAL_EXIT_CODE); } + if (super_interface == interface) { *************** *** 2213,2216 **** --- 2440,2444 ---- IDENTIFIER_POINTER (super_name)); } + interface = super_interface; my_name = CLASS_NAME (interface); *************** *** 2253,2257 **** ivar_context = build_ivar_chain (class, 0); ! finish_struct (uprivate_record, ivar_context); CLASS_STATIC_TEMPLATE (class) = uprivate_record; --- 2481,2485 ---- ivar_context = build_ivar_chain (class, 0); ! finish_struct (uprivate_record, ivar_context, NULL_TREE); CLASS_STATIC_TEMPLATE (class) = uprivate_record; *************** *** 2260,2265 **** TREE_STATIC_TEMPLATE (uprivate_record) = 1; } ! instance_type = groktypename (build_tree_list (build_tree_list (NULLT, uprivate_record), ! build1 (INDIRECT_REF, NULLT, NULLT))); return ivar_context; } --- 2488,2498 ---- TREE_STATIC_TEMPLATE (uprivate_record) = 1; } ! ! instance_type ! = groktypename (build_tree_list (build_tree_list (NULL_TREE, ! uprivate_record), ! build1 (INDIRECT_REF, NULL_TREE, ! NULL_TREE))); ! return ivar_context; } *************** *** 2284,2325 **** /* struct objc_class *isa; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_CLASS))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("isa")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* char *protocol_name; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("protocol_name")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_protocol **protocol_list; */ ! decl_specs = build_tree_list (NULLT, template); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULLT, field_decl); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_method_list *instance_methods; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("instance_methods")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_method_list *class_methods; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("class_methods")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! return finish_struct (template, field_decl_chain); } --- 2517,2571 ---- /* struct objc_class *isa; */ ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_CLASS))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *protocol_name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_name")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_protocol **protocol_list; */ ! decl_specs = build_tree_list (NULL_TREE, template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *instance_methods; */ ! decl_specs ! = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *class_methods; */ ! decl_specs ! = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! return finish_struct (template, field_decl_chain, NULL_TREE); } *************** *** 2329,2342 **** tree entries; { ! tree initlist = NULLT; do { ! tree eltlist = NULLT; ! eltlist = tree_cons (NULLT, build_selector (METHOD_SEL_NAME (entries)), NULLT); ! eltlist = tree_cons (NULLT, add_objc_string (METHOD_ENCODING (entries), meth_var_types), eltlist); ! initlist = tree_cons (NULLT, build_constructor (type, nreverse (eltlist)), initlist); entries = TREE_CHAIN (entries); --- 2575,2596 ---- tree entries; { ! tree initlist = NULL_TREE; do { ! tree eltlist = NULL_TREE; ! eltlist ! = tree_cons (NULL_TREE, ! build_selector (METHOD_SEL_NAME (entries)), NULL_TREE); ! eltlist ! = tree_cons (NULL_TREE, ! add_objc_string (METHOD_ENCODING (entries), ! meth_var_types), ! eltlist); ! initlist ! = tree_cons (NULL_TREE, ! build_constructor (type, nreverse (eltlist)), initlist); entries = TREE_CHAIN (entries); *************** *** 2363,2388 **** tree decl_specs, field_decl, field_decl_chain; ! /* generate an unnamed struct definition */ ! objc_ivar_list_record = start_struct (RECORD_TYPE, NULLT); /* int method_count; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_INT]); field_decl = get_identifier ("method_count"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* struct objc_method method_list[]; */ ! decl_specs = build_tree_list (NULLT, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), build_int_2 (size, 0)); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_list_record, field_decl_chain); return objc_ivar_list_record; --- 2617,2644 ---- tree decl_specs, field_decl, field_decl_chain; ! /* Generate an unnamed struct definition. */ ! objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int method_count; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); field_decl = get_identifier ("method_count"); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* struct objc_method method_list[]; */ ! decl_specs = build_tree_list (NULL_TREE, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), build_int_2 (size, 0)); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); return objc_ivar_list_record; *************** *** 2395,2426 **** tree decl_specs, field_decl, field_decl_chain; ! proto_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD_PROTOTYPE)); #ifdef OBJC_INT_SELECTORS /* unsigned int _cmd; */ ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_UNSIGNED], NULLT); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); field_decl = get_identifier ("_cmd"); #else /* OBJC_INT_SELECTORS */ /* struct objc_selector *_cmd; */ ! decl_specs = tree_cons (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR)), NULLT); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("_cmd")); #endif /* OBJC_INT_SELECTORS */ ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_CHAR], NULLT); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("method_types")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (proto_record, field_decl_chain); return proto_record; } ! /* True if last call to forwarding_offset yielded a register offset */ static int offset_is_register; --- 2651,2687 ---- tree decl_specs, field_decl, field_decl_chain; ! proto_record ! = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD_PROTOTYPE)); #ifdef OBJC_INT_SELECTORS /* unsigned int _cmd; */ ! decl_specs ! = tree_cons (NULL_TREE, ridpointers[(int) RID_UNSIGNED], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_INT], decl_specs); field_decl = get_identifier ("_cmd"); #else /* OBJC_INT_SELECTORS */ /* struct objc_selector *_cmd; */ ! decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR)), NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd")); #endif /* OBJC_INT_SELECTORS */ ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_types")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (proto_record, field_decl_chain, NULL_TREE); return proto_record; } ! /* True if last call to forwarding_offset yielded a register offset. */ static int offset_is_register; *************** *** 2458,2471 **** /* This is the case where the parm is passed as an int or double ! and it is converted to a char, short or float and stored back ! in the parmlist. In this case, describe the parm ! with the variable's declared type, and adjust the address ! if the least significant bytes (which we are using) are not ! the first ones. */ ! #if BYTES_BIG_ENDIAN ! if (TREE_TYPE (parm) != DECL_ARG_TYPE (parm)) offset_in_bytes += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parm))) - GET_MODE_SIZE (GET_MODE (DECL_RTL (parm)))); - #endif return offset_in_bytes; --- 2719,2730 ---- /* This is the case where the parm is passed as an int or double ! and it is converted to a char, short or float and stored back ! in the parmlist. In this case, describe the parm ! with the variable's declared type, and adjust the address ! if the least significant bytes (which we are using) are not ! the first ones. */ ! if (BYTES_BIG_ENDIAN && TREE_TYPE (parm) != DECL_ARG_TYPE (parm)) offset_in_bytes += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parm))) - GET_MODE_SIZE (GET_MODE (DECL_RTL (parm)))); return offset_in_bytes; *************** *** 2484,2496 **** tree result; ! /* `oneway' and 'bycopy', for remote object are the only method qualifiers */ encode_type_qualifiers (TREE_PURPOSE (TREE_TYPE (method_decl))); ! /* C type */ encode_type (TREE_TYPE (TREE_TYPE (func_decl)), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* stack size */ for (parms = DECL_ARGUMENTS (func_decl); parms; parms = TREE_CHAIN (parms)) --- 2743,2755 ---- tree result; ! /* ONEWAY and BYCOPY, for remote object are the only method qualifiers. */ encode_type_qualifiers (TREE_PURPOSE (TREE_TYPE (method_decl))); ! /* C type. */ encode_type (TREE_TYPE (TREE_TYPE (func_decl)), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* Stack size. */ for (parms = DECL_ARGUMENTS (func_decl); parms; parms = TREE_CHAIN (parms)) *************** *** 2511,2519 **** user_args = METHOD_SEL_ARGS (method_decl); ! /* argument types */ for (parms = DECL_ARGUMENTS (func_decl), i = 0; parms; parms = TREE_CHAIN (parms), i++) { ! /* process argument qualifiers for user supplied arguments */ if (i > 1) { --- 2770,2778 ---- user_args = METHOD_SEL_ARGS (method_decl); ! /* Argument types. */ for (parms = DECL_ARGUMENTS (func_decl), i = 0; parms; parms = TREE_CHAIN (parms), i++) { ! /* Process argument qualifiers for user supplied arguments. */ if (i > 1) { *************** *** 2522,2534 **** } ! /* type */ encode_type (TREE_TYPE (parms), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* compute offset */ sprintf (buf, "%d", forwarding_offset (parms)); ! /* indicate register */ if (offset_is_register) obstack_1grow (&util_obstack, '+'); --- 2781,2793 ---- } ! /* Type. */ encode_type (TREE_TYPE (parms), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* Compute offset. */ sprintf (buf, "%d", forwarding_offset (parms)); ! /* Indicate registe.r */ if (offset_is_register) obstack_1grow (&util_obstack, '+'); *************** *** 2553,2568 **** tree sc_spec, decl_specs, decl, initlist; ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, proto), ! decl_specs, 1); ! end_temporary_allocation (); ! initlist = build_tree_list (NULLT, build_int_2 (size, 0)); ! initlist = tree_cons (NULLT, list, initlist); finish_decl (decl, build_constructor (type, nreverse (initlist)), ! NULLT); return decl; --- 2812,2826 ---- tree sc_spec, decl_specs, decl, initlist; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, proto), ! decl_specs, 1, NULL_TREE, NULL_TREE); ! initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); ! initlist = tree_cons (NULL_TREE, list, initlist); finish_decl (decl, build_constructor (type, nreverse (initlist)), ! NULL_TREE); return decl; *************** *** 2581,2586 **** objc_method_prototype_template = build_method_prototype_template (); ! cast = build_tree_list (build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))), NULLT); variable_length_type = groktypename (cast); --- 2839,2845 ---- objc_method_prototype_template = build_method_prototype_template (); ! cast = build_tree_list (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))), ! NULL_TREE); variable_length_type = groktypename (cast); *************** *** 2602,2606 **** "_OBJC_PROTOCOL_CLASS_METHODS", size, initlist, protocol); - /* cast! */ TREE_TYPE (UOBJC_CLASS_METHODS_decl) = variable_length_type; } --- 2861,2864 ---- *************** *** 2624,2628 **** "_OBJC_PROTOCOL_INSTANCE_METHODS", size, initlist, protocol); - /* cast! */ TREE_TYPE (UOBJC_INSTANCE_METHODS_decl) = variable_length_type; } --- 2882,2885 ---- *************** *** 2640,2659 **** /* struct objc_object *objc_xxx (id, SEL, ...); */ pushlevel (0); ! decl_specs = build_tree_list (NULLT, objc_object_reference); ! push_parm_decl (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULLT, NULLT))); ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); ! expr_decl = build1 (INDIRECT_REF, NULLT, NULLT); ! push_parm_decl (build_tree_list (decl_specs, expr_decl)); parms = get_parm_info (0); poplevel (0, 0, 0); ! decl_specs = build_tree_list (NULLT, objc_object_reference); sprintf (buffer, "__objc_tmp_%x", xxx++); ! expr_decl = build_nt (CALL_EXPR, get_identifier (buffer), parms, NULLT); ! expr_decl = build1 (INDIRECT_REF, NULLT, expr_decl); return define_decl (expr_decl, decl_specs); --- 2897,2920 ---- /* struct objc_object *objc_xxx (id, SEL, ...); */ pushlevel (0); ! decl_specs = build_tree_list (NULL_TREE, objc_object_reference); ! push_parm_decl (build_tree_list ! (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULL_TREE, ! NULL_TREE)), ! build_tree_list (NULL_TREE, NULL_TREE))); ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); ! expr_decl = build1 (INDIRECT_REF, NULL_TREE, NULL_TREE); ! push_parm_decl (build_tree_list (build_tree_list (decl_specs, expr_decl), ! build_tree_list (NULL_TREE, NULL_TREE))); parms = get_parm_info (0); poplevel (0, 0, 0); ! decl_specs = build_tree_list (NULL_TREE, objc_object_reference); sprintf (buffer, "__objc_tmp_%x", xxx++); ! expr_decl = build_nt (CALL_EXPR, get_identifier (buffer), parms, NULL_TREE); ! expr_decl = build1 (INDIRECT_REF, NULL_TREE, expr_decl); return define_decl (expr_decl, decl_specs); *************** *** 2666,2669 **** --- 2927,2931 ---- { tree parms; + tree parm; /* Hack to avoid problem with static typing of self arg. */ *************** *** 2694,2697 **** --- 2956,2962 ---- } + for (parm = DECL_ARGUMENTS (tmp_decl); parm; parm = TREE_CHAIN (parm)) + DECL_CONTEXT (parm) = tmp_decl; + init_function_start (tmp_decl, "objc-act", 0); *************** *** 2710,2714 **** tree lproto; ! /* forward declare protocols referenced */ for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) { --- 2975,2979 ---- tree lproto; ! /* Forward declare protocols referenced. */ for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) { *************** *** 2740,2744 **** objc_protocol_template = build_protocol_template (); ! /* if a protocol was directly referenced, pull in indirect references */ for (p = protocol_chain; p; p = TREE_CHAIN (p)) if (PROTOCOL_FORWARD_DECL (p) && PROTOCOL_LIST (p)) --- 3005,3009 ---- objc_protocol_template = build_protocol_template (); ! /* If a protocol was directly referenced, pull in indirect references. */ for (p = protocol_chain; p; p = TREE_CHAIN (p)) if (PROTOCOL_FORWARD_DECL (p) && PROTOCOL_LIST (p)) *************** *** 2750,2754 **** tree cls_methods = PROTOCOL_CLS_METHODS (p); ! /* if protocol wasn't referenced, don't generate any code */ if (! PROTOCOL_FORWARD_DECL (p)) continue; --- 3015,3019 ---- tree cls_methods = PROTOCOL_CLS_METHODS (p); ! /* If protocol wasn't referenced, don't generate any code. */ if (! PROTOCOL_FORWARD_DECL (p)) continue; *************** *** 2788,2797 **** /* static struct objc_protocol _OBJC_PROTOCOL_; */ ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, objc_protocol_template, sc_spec); decl = start_decl (synth_id_with_class_suffix ("_OBJC_PROTOCOL", p), ! decl_specs, 1); ! end_temporary_allocation (); protocol_name_expr = add_objc_string (PROTOCOL_NAME (p), class_names); --- 3053,3062 ---- /* static struct objc_protocol _OBJC_PROTOCOL_; */ ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], ! NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, objc_protocol_template, sc_spec); decl = start_decl (synth_id_with_class_suffix ("_OBJC_PROTOCOL", p), ! decl_specs, 1, NULL_TREE, NULL_TREE); protocol_name_expr = add_objc_string (PROTOCOL_NAME (p), class_names); *************** *** 2801,2807 **** if (!cast_type2) cast_type2 ! = groktypename (build_tree_list (build_tree_list (NULLT, objc_protocol_template), ! build1 (INDIRECT_REF, NULLT, ! build1 (INDIRECT_REF, NULLT, NULLT)))); refs_expr = build_unary_op (ADDR_EXPR, refs_decl, 0); --- 3066,3075 ---- if (!cast_type2) cast_type2 ! = groktypename ! (build_tree_list (build_tree_list (NULL_TREE, ! objc_protocol_template), ! build1 (INDIRECT_REF, NULL_TREE, ! build1 (INDIRECT_REF, NULL_TREE, ! NULL_TREE)))); refs_expr = build_unary_op (ADDR_EXPR, refs_decl, 0); *************** *** 2817,2821 **** UOBJC_INSTANCE_METHODS_decl, UOBJC_CLASS_METHODS_decl); ! finish_decl (decl, initlist, NULLT); /* Mark the decl as used to avoid "defined but not used" warning. */ --- 3085,3089 ---- UOBJC_INSTANCE_METHODS_decl, UOBJC_CLASS_METHODS_decl); ! finish_decl (decl, initlist, NULL_TREE); /* Mark the decl as used to avoid "defined but not used" warning. */ *************** *** 2833,2873 **** tree class_methods; { ! tree initlist = NULLT, expr; static tree cast_type = 0; if (!cast_type) cast_type ! = groktypename (build_tree_list ! (build_tree_list (NULLT, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_CLASS))), ! build1 (INDIRECT_REF, NULLT, NULLT))); ! /* filling the "isa" in with one allows the runtime system to ! detect that the version change...should remove before final release */ expr = build_int_2 (PROTOCOL_VERSION, 0); TREE_TYPE (expr) = cast_type; ! initlist = tree_cons (NULLT, expr, initlist); ! initlist = tree_cons (NULLT, protocol_name, initlist); ! initlist = tree_cons (NULLT, protocol_list, initlist); if (!instance_methods) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); ! initlist = tree_cons (NULLT, expr, initlist); } if (!class_methods) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); ! initlist = tree_cons (NULLT, expr, initlist); } return build_constructor (type, nreverse (initlist)); } - /* end code generation for protocols... */ /* struct objc_category { --- 3101,3143 ---- tree class_methods; { ! tree initlist = NULL_TREE, expr; static tree cast_type = 0; if (!cast_type) cast_type ! = groktypename ! (build_tree_list ! (build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_CLASS))), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE))); ! /* Filling the "isa" in with one allows the runtime system to ! detect that the version change...should remove before final release. */ expr = build_int_2 (PROTOCOL_VERSION, 0); TREE_TYPE (expr) = cast_type; ! initlist = tree_cons (NULL_TREE, expr, initlist); ! initlist = tree_cons (NULL_TREE, protocol_name, initlist); ! initlist = tree_cons (NULL_TREE, protocol_list, initlist); if (!instance_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } + if (!class_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } + return build_constructor (type, nreverse (initlist)); } /* struct objc_category { *************** *** 2888,2930 **** /* char *category_name; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("category_name")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* char *class_name; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("class_name")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_method_list *instance_methods; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("instance_methods")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_method_list *class_methods; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("class_methods")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_protocol **protocol_list; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULLT, field_decl); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT) ! ; chainon (field_decl_chain, field_decl); ! finish_struct (objc_category_template, field_decl_chain); } --- 3158,3211 ---- /* char *category_name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("category_name")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *class_name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_name")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *instance_methods; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *class_methods; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_protocol **protocol_list; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_category_template, field_decl_chain, NULL_TREE); } *************** *** 2945,2961 **** /* void *sel_id; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_VOID]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("sel_id")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* char *sel_type; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("sel_type")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_selector_template, field_decl_chain); } --- 3226,3244 ---- /* void *sel_id; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *sel_type; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_type")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_selector_template, field_decl_chain, NULL_TREE); } *************** *** 2984,3045 **** tree decl_specs, field_decl, field_decl_chain; ! objc_class_template = start_struct (RECORD_TYPE, get_identifier (UTAG_CLASS)); /* struct objc_class *isa; */ ! decl_specs = build_tree_list (NULLT, objc_class_template); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("isa")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* struct objc_class *super_class; */ ! decl_specs = build_tree_list (NULLT, objc_class_template); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("super_class")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* char *name; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("name")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* long version; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("version"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* long info; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("info"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* long instance_size; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("instance_size"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_ivar_list *ivars; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_IVAR_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("ivars")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_method_list *methods; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("methods")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); --- 3267,3340 ---- tree decl_specs, field_decl, field_decl_chain; ! objc_class_template ! = start_struct (RECORD_TYPE, get_identifier (UTAG_CLASS)); /* struct objc_class *isa; */ ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* struct objc_class *super_class; */ ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("super_class")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* char *name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* long version; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("version"); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* long info; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("info"); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* long instance_size; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); field_decl = get_identifier ("instance_size"); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_ivar_list *ivars; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_IVAR_LIST))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivars")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *methods; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("methods")); ! field_decl ! = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); *************** *** 3048,3055 **** /* struct objc_cache *cache; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier ("objc_cache"))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("cache")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); } --- 3343,3352 ---- /* struct objc_cache *cache; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier ("objc_cache"))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("cache")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); } *************** *** 3058,3079 **** /* struct sarray *dtable; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier ("sarray"))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("dtable")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_class *subclass_list; */ ! decl_specs = build_tree_list (NULLT, objc_class_template); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("subclass_list")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_class *sibling_class; */ ! decl_specs = build_tree_list (NULLT, objc_class_template); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("sibling_class")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); } --- 3355,3382 ---- /* struct sarray *dtable; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier ("sarray"))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("dtable")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_class *subclass_list; */ ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("subclass_list")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_class *sibling_class; */ ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sibling_class")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); } *************** *** 3081,3093 **** /* struct objc_protocol **protocol_list; */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULLT, field_decl); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_class_template, field_decl_chain); } --- 3384,3400 ---- /* struct objc_protocol **protocol_list; */ ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list")); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_class_template, field_decl_chain, NULL_TREE); } *************** *** 3103,3110 **** an_id = synth_id_with_class_suffix ("_OBJC_CLASS", implementation_context); ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_EXTERN]); ! decl_specs = tree_cons (NULLT, objc_class_template, sc_spec); UOBJC_CLASS_decl = define_decl (an_id, decl_specs); TREE_USED (UOBJC_CLASS_decl) = 1; /* extern struct objc_class _OBJC_METACLASS_; */ --- 3410,3418 ---- an_id = synth_id_with_class_suffix ("_OBJC_CLASS", implementation_context); ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_EXTERN]); ! decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); UOBJC_CLASS_decl = define_decl (an_id, decl_specs); TREE_USED (UOBJC_CLASS_decl) = 1; + DECL_ARTIFICIAL (UOBJC_CLASS_decl) = 1; /* extern struct objc_class _OBJC_METACLASS_; */ *************** *** 3115,3120 **** UOBJC_METACLASS_decl = define_decl (an_id, decl_specs); TREE_USED (UOBJC_METACLASS_decl) = 1; ! /* pre-build the following entities - for speed/convenience. */ an_id = get_identifier ("super_class"); --- 3423,3429 ---- UOBJC_METACLASS_decl = define_decl (an_id, decl_specs); TREE_USED (UOBJC_METACLASS_decl) = 1; + DECL_ARTIFICIAL(UOBJC_METACLASS_decl) = 1; ! /* Pre-build the following entities - for speed/convenience. */ an_id = get_identifier ("super_class"); *************** *** 3139,3145 **** } ! #define USERTYPE(t) (TREE_CODE (t) == RECORD_TYPE || \ ! TREE_CODE (t) == UNION_TYPE || \ ! TREE_CODE (t) == ENUMERAL_TYPE) static void --- 3448,3454 ---- } ! #define USERTYPE(t) \ ! (TREE_CODE (t) == RECORD_TYPE || TREE_CODE (t) == UNION_TYPE \ ! || TREE_CODE (t) == ENUMERAL_TYPE) static void *************** *** 3164,3167 **** --- 3473,3477 ---- break; } + t1 = TREE_TYPE (intdecls); t2 = TREE_TYPE (impdecls); *************** *** 3181,3184 **** --- 3491,3495 ---- } } + else if (DECL_NAME (intdecls) != DECL_NAME (impdecls)) { *************** *** 3188,3191 **** --- 3499,3503 ---- intdecls, rawintdecls); } + intdecls = TREE_CHAIN (intdecls); impdecls = TREE_CHAIN (impdecls); *************** *** 3208,3216 **** /* struct objc_object *self; */ ! decl_specs = build_tree_list (NULLT, objc_object_reference); field_decl = get_identifier ("self"); ! field_decl = build1 (INDIRECT_REF, NULLT, field_decl); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULLT); field_decl_chain = field_decl; --- 3520,3528 ---- /* struct objc_object *self; */ ! decl_specs = build_tree_list (NULL_TREE, objc_object_reference); field_decl = get_identifier ("self"); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; *************** *** 3218,3234 **** decl_specs = get_identifier (UTAG_CLASS); ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, decl_specs)); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("class")); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (record, field_decl_chain); /* `struct objc_super *' */ ! super_type = groktypename (build_tree_list (build_tree_list (NULLT, record), build1 (INDIRECT_REF, ! NULLT, NULLT))); return record; } --- 3530,3547 ---- decl_specs = get_identifier (UTAG_CLASS); ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs)); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class")); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (record, field_decl_chain, NULL_TREE); /* `struct objc_super *' */ ! super_type = groktypename (build_tree_list (build_tree_list (NULL_TREE, ! record), build1 (INDIRECT_REF, ! NULL_TREE, NULL_TREE))); return record; } *************** *** 3251,3280 **** /* char *ivar_name; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("ivar_name")); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULLT); field_decl_chain = field_decl; /* char *ivar_type; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("ivar_type")); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* int ivar_offset; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_INT]); field_decl = get_identifier ("ivar_offset"); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_record, field_decl_chain); return objc_ivar_record; --- 3564,3593 ---- /* char *ivar_name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_name")); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *ivar_type; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_type")); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* int ivar_offset; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); field_decl = get_identifier ("ivar_offset"); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_record, field_decl_chain, NULL_TREE); return objc_ivar_record; *************** *** 3294,3319 **** tree decl_specs, field_decl, field_decl_chain; ! objc_ivar_list_record = start_struct (RECORD_TYPE, NULLT); /* int ivar_count; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_INT]); field_decl = get_identifier ("ivar_count"); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULLT); field_decl_chain = field_decl; /* struct objc_ivar ivar_list[]; */ ! decl_specs = build_tree_list (NULLT, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("ivar_list"), build_int_2 (size, 0)); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_list_record, field_decl_chain); return objc_ivar_list_record; --- 3607,3632 ---- tree decl_specs, field_decl, field_decl_chain; ! objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int ivar_count; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); field_decl = get_identifier ("ivar_count"); field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); field_decl_chain = field_decl; /* struct objc_ivar ivar_list[]; */ ! decl_specs = build_tree_list (NULL_TREE, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("ivar_list"), build_int_2 (size, 0)); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); return objc_ivar_list_record; *************** *** 3334,3368 **** tree decl_specs, field_decl, field_decl_chain; ! objc_ivar_list_record = start_struct (RECORD_TYPE, NULLT); /* int method_next; */ ! decl_specs = build_tree_list (NULLT, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("method_next")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; /* int method_count; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_INT]); field_decl = get_identifier ("method_count"); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* struct objc_method method_list[]; */ ! decl_specs = build_tree_list (NULLT, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), build_int_2 (size, 0)); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_list_record, field_decl_chain); return objc_ivar_list_record; --- 3647,3685 ---- tree decl_specs, field_decl, field_decl_chain; ! objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int method_next; */ ! decl_specs ! = build_tree_list ! (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_next")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); field_decl_chain = field_decl; /* int method_count; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); field_decl = get_identifier ("method_count"); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method method_list[]; */ ! decl_specs = build_tree_list (NULL_TREE, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), build_int_2 (size, 0)); field_decl = grokfield (input_filename, lineno, ! field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); return objc_ivar_list_record; *************** *** 3374,3401 **** tree field_decl; { ! tree initlist = NULLT; do { ! tree ivar = NULLT; ! /* set name */ if (DECL_NAME (field_decl)) ! ivar = tree_cons (NULLT, add_objc_string (DECL_NAME (field_decl), meth_var_names), ivar); else ! /* unnamed bit-field ivar (yuck). */ ! ivar = tree_cons (NULLT, build_int_2 (0, 0), ivar); ! /* set type */ encode_field_decl (field_decl, obstack_object_size (&util_obstack), OBJC_ENCODE_DONT_INLINE_DEFS); ! obstack_1grow (&util_obstack, 0); /* null terminate string */ ivar = tree_cons ! (NULLT, add_objc_string (get_identifier (obstack_finish (&util_obstack)), meth_var_types), --- 3691,3720 ---- tree field_decl; { ! tree initlist = NULL_TREE; do { ! tree ivar = NULL_TREE; ! /* Set name. */ if (DECL_NAME (field_decl)) ! ivar = tree_cons (NULL_TREE, add_objc_string (DECL_NAME (field_decl), meth_var_names), ivar); else ! /* Unnamed bit-field ivar (yuck). */ ! ivar = tree_cons (NULL_TREE, build_int_2 (0, 0), ivar); ! /* Set type. */ encode_field_decl (field_decl, obstack_object_size (&util_obstack), OBJC_ENCODE_DONT_INLINE_DEFS); ! ! /* Null terminate string. */ ! obstack_1grow (&util_obstack, 0); ivar = tree_cons ! (NULL_TREE, add_objc_string (get_identifier (obstack_finish (&util_obstack)), meth_var_types), *************** *** 3406,3410 **** ivar = tree_cons ! (NULLT, build_int_2 ((TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field_decl)) / BITS_PER_UNIT), --- 3725,3729 ---- ivar = tree_cons ! (NULL_TREE, build_int_2 ((TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field_decl)) / BITS_PER_UNIT), *************** *** 3412,3416 **** ivar); ! initlist = tree_cons (NULLT, build_constructor (type, nreverse (ivar)), initlist); --- 3731,3735 ---- ivar); ! initlist = tree_cons (NULL_TREE, build_constructor (type, nreverse (ivar)), initlist); *************** *** 3432,3448 **** tree sc_spec, decl_specs, decl, initlist; ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, implementation_context), ! decl_specs, 1); ! end_temporary_allocation (); ! initlist = build_tree_list (NULLT, build_int_2 (size, 0)); ! initlist = tree_cons (NULLT, list, initlist); finish_decl (decl, build_constructor (TREE_TYPE (decl), nreverse (initlist)), ! NULLT); return decl; --- 3751,3766 ---- tree sc_spec, decl_specs, decl, initlist; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, implementation_context), ! decl_specs, 1, NULL_TREE, NULL_TREE); ! initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); ! initlist = tree_cons (NULL_TREE, list, initlist); finish_decl (decl, build_constructor (TREE_TYPE (decl), nreverse (initlist)), ! NULL_TREE); return decl; *************** *** 3463,3475 **** cast = build_tree_list ! (build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_IVAR_LIST))), ! NULLT); variable_length_type = groktypename (cast); ! /* only generate class variables for the root of the inheritance ! hierarchy since these will be the same for every class */ ! if (CLASS_SUPER_NAME (implementation_template) == NULLT && (chain = TYPE_FIELDS (objc_class_template))) { --- 3781,3793 ---- cast = build_tree_list ! (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_IVAR_LIST))), ! NULL_TREE); variable_length_type = groktypename (cast); ! /* Only generate class variables for the root of the inheritance ! hierarchy since these will be the same for every class. */ ! if (CLASS_SUPER_NAME (implementation_template) == NULL_TREE && (chain = TYPE_FIELDS (objc_class_template))) { *************** *** 3482,3486 **** = generate_ivars_list (ivar_list_template, "_OBJC_CLASS_VARIABLES", size, initlist); - /* cast! */ TREE_TYPE (UOBJC_CLASS_VARIABLES_decl) = variable_length_type; } --- 3800,3803 ---- *************** *** 3498,3502 **** = generate_ivars_list (ivar_list_template, "_OBJC_INSTANCE_VARIABLES", size, initlist); - /* cast! */ TREE_TYPE (UOBJC_INSTANCE_VARIABLES_decl) = variable_length_type; } --- 3815,3818 ---- *************** *** 3512,3533 **** tree entries; { ! tree initlist = NULLT; do { ! tree elemlist = NULLT; ! elemlist = tree_cons (NULLT, build_selector (METHOD_SEL_NAME (entries)), ! NULLT); ! ! elemlist = tree_cons (NULLT, add_objc_string (METHOD_ENCODING (entries), ! meth_var_types), elemlist); ! elemlist = tree_cons (NULLT, ! build_unary_op (ADDR_EXPR, METHOD_DEFINITION (entries), 1), elemlist); ! initlist = tree_cons (NULLT, build_constructor (type, nreverse (elemlist)), initlist); --- 3828,3852 ---- tree entries; { ! tree initlist = NULL_TREE; do { ! tree elemlist = NULL_TREE; ! elemlist = tree_cons (NULL_TREE, ! build_selector (METHOD_SEL_NAME (entries)), ! NULL_TREE); ! ! elemlist = tree_cons (NULL_TREE, ! add_objc_string (METHOD_ENCODING (entries), ! meth_var_types), elemlist); ! elemlist = tree_cons (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! METHOD_DEFINITION (entries), 1), elemlist); ! initlist = tree_cons (NULL_TREE, build_constructor (type, nreverse (elemlist)), initlist); *************** *** 3558,3589 **** #ifdef OBJC_INT_SELECTORS /* unsigned int _cmd; */ ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_UNSIGNED], NULLT); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); field_decl = get_identifier ("_cmd"); #else /* not OBJC_INT_SELECTORS */ /* struct objc_selector *_cmd; */ ! decl_specs = tree_cons (NULLT, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR)), ! NULLT); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("_cmd")); #endif /* not OBJC_INT_SELECTORS */ ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_CHAR], NULLT); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("method_types")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); /* void *_imp; */ ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_VOID], NULLT); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("_imp")); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); ! finish_struct (_SLT_record, field_decl_chain); return _SLT_record; --- 3877,3913 ---- #ifdef OBJC_INT_SELECTORS /* unsigned int _cmd; */ ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_UNSIGNED], ! NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_INT], decl_specs); field_decl = get_identifier ("_cmd"); #else /* not OBJC_INT_SELECTORS */ /* struct objc_selector *_cmd; */ ! decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR)), ! NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd")); #endif /* not OBJC_INT_SELECTORS */ ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); field_decl_chain = field_decl; ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, ! get_identifier ("method_types")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* void *_imp; */ ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_VOID], NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_imp")); ! field_decl = grokfield (input_filename, lineno, field_decl, ! decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! finish_struct (_SLT_record, field_decl_chain, NULL_TREE); return _SLT_record; *************** *** 3600,3617 **** tree sc_spec, decl_specs, decl, initlist; ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, implementation_context), ! decl_specs, 1); ! end_temporary_allocation (); ! initlist = build_tree_list (NULLT, build_int_2 (0, 0)); ! initlist = tree_cons (NULLT, build_int_2 (size, 0), initlist); ! initlist = tree_cons (NULLT, list, initlist); finish_decl (decl, build_constructor (TREE_TYPE (decl), nreverse (initlist)), ! NULLT); return decl; --- 3924,3940 ---- tree sc_spec, decl_specs, decl, initlist; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, implementation_context), ! decl_specs, 1, NULL_TREE, NULL_TREE); ! initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); ! initlist = tree_cons (NULL_TREE, build_int_2 (size, 0), initlist); ! initlist = tree_cons (NULL_TREE, list, initlist); finish_decl (decl, build_constructor (TREE_TYPE (decl), nreverse (initlist)), ! NULL_TREE); return decl; *************** *** 3630,3636 **** cast = build_tree_list ! (build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))), ! NULLT); variable_length_type = groktypename (cast); --- 3953,3961 ---- cast = build_tree_list ! (build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))), ! NULL_TREE); ! variable_length_type = groktypename (cast); *************** *** 3640,3645 **** size = list_length (chain); ! method_list_template = build_method_list_template (objc_method_template, size); ! initlist = build_dispatch_table_initializer (objc_method_template, chain); UOBJC_CLASS_METHODS_decl --- 3965,3972 ---- size = list_length (chain); ! method_list_template ! = build_method_list_template (objc_method_template, size); ! initlist ! = build_dispatch_table_initializer (objc_method_template, chain); UOBJC_CLASS_METHODS_decl *************** *** 3650,3654 **** : "_OBJC_CATEGORY_CLASS_METHODS"), size, initlist); - /* cast! */ TREE_TYPE (UOBJC_CLASS_METHODS_decl) = variable_length_type; } --- 3977,3980 ---- *************** *** 3661,3666 **** size = list_length (chain); ! method_list_template = build_method_list_template (objc_method_template, size); ! initlist = build_dispatch_table_initializer (objc_method_template, chain); if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) --- 3987,3994 ---- size = list_length (chain); ! method_list_template ! = build_method_list_template (objc_method_template, size); ! initlist ! = build_dispatch_table_initializer (objc_method_template, chain); if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) *************** *** 3670,3679 **** size, initlist); else ! /* we have a category */ UOBJC_INSTANCE_METHODS_decl = generate_dispatch_table (method_list_template, "_OBJC_CATEGORY_INSTANCE_METHODS", size, initlist); - /* cast! */ TREE_TYPE (UOBJC_INSTANCE_METHODS_decl) = variable_length_type; } --- 3998,4006 ---- size, initlist); else ! /* We have a category. */ UOBJC_INSTANCE_METHODS_decl = generate_dispatch_table (method_list_template, "_OBJC_CATEGORY_INSTANCE_METHODS", size, initlist); TREE_TYPE (UOBJC_INSTANCE_METHODS_decl) = variable_length_type; } *************** *** 3703,3712 **** = groktypename (build_tree_list ! (build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULLT, NULLT))); ! /* compute size */ for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) if (TREE_CODE (TREE_VALUE (lproto)) == PROTOCOL_INTERFACE_TYPE --- 4030,4039 ---- = groktypename (build_tree_list ! (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE))); ! /* Compute size. */ for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) if (TREE_CODE (TREE_VALUE (lproto)) == PROTOCOL_INTERFACE_TYPE *************** *** 3714,3723 **** size++; ! /* build initializer */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), NULLT); e = build_int_2 (size, 0); TREE_TYPE (e) = cast_type; ! initlist = tree_cons (NULLT, e, initlist); for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) --- 4041,4050 ---- size++; ! /* Build initializer. */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), NULL_TREE); e = build_int_2 (size, 0); TREE_TYPE (e) = cast_type; ! initlist = tree_cons (NULL_TREE, e, initlist); for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) *************** *** 3729,3733 **** { e = build_unary_op (ADDR_EXPR, PROTOCOL_FORWARD_DECL (pval), 0); ! initlist = tree_cons (NULLT, e, initlist); } } --- 4056,4060 ---- { e = build_unary_op (ADDR_EXPR, PROTOCOL_FORWARD_DECL (pval), 0); ! initlist = tree_cons (NULL_TREE, e, initlist); } } *************** *** 3735,3740 **** /* static struct objc_protocol *refs[n]; */ ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL)), sc_spec); --- 4062,4067 ---- /* static struct objc_protocol *refs[n]; */ ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL)), sc_spec); *************** *** 3751,3767 **** build_int_2 (size + 2, 0)); else if (TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) ! expr_decl = build_nt (ARRAY_REF, ! synth_id_with_class_suffix ("_OBJC_CATEGORY_PROTOCOLS", ! i_or_p), ! build_int_2 (size + 2, 0)); ! expr_decl = build1 (INDIRECT_REF, NULLT, expr_decl); ! refs_decl = start_decl (expr_decl, decl_specs, 1); ! end_temporary_allocation (); finish_decl (refs_decl, build_constructor (TREE_TYPE (refs_decl), nreverse (initlist)), ! NULLT); return refs_decl; --- 4078,4094 ---- build_int_2 (size + 2, 0)); else if (TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) ! expr_decl ! = build_nt (ARRAY_REF, ! synth_id_with_class_suffix ("_OBJC_CATEGORY_PROTOCOLS", ! i_or_p), ! build_int_2 (size + 2, 0)); ! expr_decl = build1 (INDIRECT_REF, NULL_TREE, expr_decl); ! refs_decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE, NULL_TREE); finish_decl (refs_decl, build_constructor (TREE_TYPE (refs_decl), nreverse (initlist)), ! NULL_TREE); return refs_decl; *************** *** 3778,3804 **** tree protocol_list; { ! tree initlist = NULLT, expr; ! initlist = tree_cons (NULLT, cat_name, initlist); ! initlist = tree_cons (NULLT, class_name, initlist); if (!instance_methods) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); ! initlist = tree_cons (NULLT, expr, initlist); } if (!class_methods) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); ! initlist = tree_cons (NULLT, expr, initlist); } /* protocol_list = */ if (!protocol_list) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { --- 4105,4131 ---- tree protocol_list; { ! tree initlist = NULL_TREE, expr; ! initlist = tree_cons (NULL_TREE, cat_name, initlist); ! initlist = tree_cons (NULL_TREE, class_name, initlist); if (!instance_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } if (!class_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } /* protocol_list = */ if (!protocol_list) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { *************** *** 3809,3821 **** = groktypename (build_tree_list ! (build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULLT, ! build1 (INDIRECT_REF, NULLT, NULLT)))); expr = build_unary_op (ADDR_EXPR, protocol_list, 0); TREE_TYPE (expr) = cast_type2; ! initlist = tree_cons (NULLT, expr, initlist); } --- 4136,4148 ---- = groktypename (build_tree_list ! (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULL_TREE, ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)))); expr = build_unary_op (ADDR_EXPR, protocol_list, 0); TREE_TYPE (expr) = cast_type2; ! initlist = tree_cons (NULL_TREE, expr, initlist); } *************** *** 3855,3914 **** tree protocol_list; { ! tree initlist = NULLT, expr; /* isa = */ ! initlist = tree_cons (NULLT, isa, initlist); /* super_class = */ ! initlist = tree_cons (NULLT, super, initlist); /* name = */ ! initlist = tree_cons (NULLT, default_conversion (name), initlist); /* version = */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); /* info = */ ! initlist = tree_cons (NULLT, build_int_2 (status, 0), initlist); /* instance_size = */ ! initlist = tree_cons (NULLT, size, initlist); /* objc_ivar_list = */ if (!ivar_list) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, ivar_list, 0); ! initlist = tree_cons (NULLT, expr, initlist); } /* objc_method_list = */ if (!dispatch_table) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, dispatch_table, 0); ! initlist = tree_cons (NULLT, expr, initlist); } if (flag_next_runtime) /* method_cache = */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { /* dtable = */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); /* subclass_list = */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); /* sibling_class = */ ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); } /* protocol_list = */ if (! protocol_list) ! initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist); else { --- 4182,4241 ---- tree protocol_list; { ! tree initlist = NULL_TREE, expr; /* isa = */ ! initlist = tree_cons (NULL_TREE, isa, initlist); /* super_class = */ ! initlist = tree_cons (NULL_TREE, super, initlist); /* name = */ ! initlist = tree_cons (NULL_TREE, default_conversion (name), initlist); /* version = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* info = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (status, 0), initlist); /* instance_size = */ ! initlist = tree_cons (NULL_TREE, size, initlist); /* objc_ivar_list = */ if (!ivar_list) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, ivar_list, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } /* objc_method_list = */ if (!dispatch_table) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, dispatch_table, 0); ! initlist = tree_cons (NULL_TREE, expr, initlist); } if (flag_next_runtime) /* method_cache = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { /* dtable = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* subclass_list = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* sibling_class = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); } /* protocol_list = */ if (! protocol_list) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { *************** *** 3919,3931 **** = groktypename (build_tree_list ! (build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULLT, ! build1 (INDIRECT_REF, NULLT, NULLT)))); expr = build_unary_op (ADDR_EXPR, protocol_list, 0); TREE_TYPE (expr) = cast_type2; ! initlist = tree_cons (NULLT, expr, initlist); } --- 4246,4258 ---- = groktypename (build_tree_list ! (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULL_TREE, ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)))); expr = build_unary_op (ADDR_EXPR, protocol_list, 0); TREE_TYPE (expr) = cast_type2; ! initlist = tree_cons (NULL_TREE, expr, initlist); } *************** *** 3965,3975 **** protocol_decl = 0; ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! decl_specs = tree_cons (NULLT, objc_category_template, sc_spec); decl = start_decl (synth_id_with_class_suffix ("_OBJC_CATEGORY", implementation_context), ! decl_specs, 1); ! end_temporary_allocation (); initlist = build_category_initializer (TREE_TYPE (decl), --- 4292,4301 ---- protocol_decl = 0; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, objc_category_template, sc_spec); decl = start_decl (synth_id_with_class_suffix ("_OBJC_CATEGORY", implementation_context), ! decl_specs, 1, NULL_TREE, NULL_TREE); initlist = build_category_initializer (TREE_TYPE (decl), *************** *** 3980,3984 **** TREE_USED (decl) = 1; ! finish_decl (decl, initlist, NULLT); } --- 4306,4310 ---- TREE_USED (decl) = 1; ! finish_decl (decl, initlist, NULL_TREE); } *************** *** 3991,3995 **** tree sc_spec, decl_specs, decl; tree name_expr, super_expr, root_expr; ! tree my_root_id = NULLT, my_super_id = NULLT; tree cast_type, initlist, protocol_decl; --- 4317,4321 ---- tree sc_spec, decl_specs, decl; tree name_expr, super_expr, root_expr; ! tree my_root_id = NULL_TREE, my_super_id = NULL_TREE; tree cast_type, initlist, protocol_decl; *************** *** 4014,4031 **** while (1); } ! else /* no super class */ ! { ! my_root_id = CLASS_NAME (implementation_template); ! } cast_type ! = groktypename (build_tree_list (build_tree_list (NULLT, objc_class_template), ! build1 (INDIRECT_REF, NULLT, NULLT))); name_expr = add_objc_string (CLASS_NAME (implementation_template), class_names); ! /* install class `isa' and `super' pointers at runtime */ if (my_super_id) { --- 4340,4357 ---- while (1); } ! else ! /* No super class. */ ! my_root_id = CLASS_NAME (implementation_template); cast_type ! = groktypename (build_tree_list (build_tree_list (NULL_TREE, objc_class_template), ! build1 (INDIRECT_REF, ! NULL_TREE, NULL_TREE))); name_expr = add_objc_string (CLASS_NAME (implementation_template), class_names); ! /* Install class `isa' and `super' pointers at runtime. */ if (my_super_id) { *************** *** 4041,4045 **** if (CLASS_PROTOCOL_LIST (implementation_template)) { ! generate_protocol_references (CLASS_PROTOCOL_LIST (implementation_template)); protocol_decl = generate_protocol_list (implementation_template); } --- 4367,4372 ---- if (CLASS_PROTOCOL_LIST (implementation_template)) { ! generate_protocol_references ! (CLASS_PROTOCOL_LIST (implementation_template)); protocol_decl = generate_protocol_list (implementation_template); } *************** *** 4049,4057 **** /* static struct objc_class _OBJC_METACLASS_Foo = { ... }; */ ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_STATIC]); ! decl_specs = tree_cons (NULLT, objc_class_template, sc_spec); ! decl = start_decl (DECL_NAME (UOBJC_METACLASS_decl), decl_specs, 1); ! end_temporary_allocation (); initlist --- 4376,4384 ---- /* static struct objc_class _OBJC_METACLASS_Foo = { ... }; */ ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); ! decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); ! decl = start_decl (DECL_NAME (UOBJC_METACLASS_decl), decl_specs, 1, ! NULL_TREE, NULL_TREE); initlist *************** *** 4067,4076 **** protocol_decl); ! finish_decl (decl, initlist, NULLT); /* static struct objc_class _OBJC_CLASS_Foo={ ... }; */ ! decl = start_decl (DECL_NAME (UOBJC_CLASS_decl), decl_specs, 1); ! end_temporary_allocation (); initlist --- 4394,4403 ---- protocol_decl); ! finish_decl (decl, initlist, NULL_TREE); /* static struct objc_class _OBJC_CLASS_Foo={ ... }; */ ! decl = start_decl (DECL_NAME (UOBJC_CLASS_decl), decl_specs, 1, ! NULL_TREE, NULL_TREE); initlist *************** *** 4079,4085 **** build_unary_op (ADDR_EXPR, UOBJC_METACLASS_decl, 0), super_expr, name_expr, ! build_int_2 ((TREE_INT_CST_LOW (TYPE_SIZE (CLASS_STATIC_TEMPLATE (implementation_template))) ! / BITS_PER_UNIT), ! 0), 1 /*CLS_FACTORY*/, UOBJC_INSTANCE_METHODS_decl, --- 4406,4414 ---- build_unary_op (ADDR_EXPR, UOBJC_METACLASS_decl, 0), super_expr, name_expr, ! build_int_2 ! ((TREE_INT_CST_LOW ! (TYPE_SIZE (CLASS_STATIC_TEMPLATE (implementation_template))) ! / BITS_PER_UNIT), ! 0), 1 /*CLS_FACTORY*/, UOBJC_INSTANCE_METHODS_decl, *************** *** 4087,4091 **** protocol_decl); ! finish_decl (decl, initlist, NULLT); } --- 4416,4420 ---- protocol_decl); ! finish_decl (decl, initlist, NULL_TREE); } *************** *** 4108,4112 **** || TREE_CODE (ctxt) == CATEGORY_INTERFACE_TYPE) { ! /* we have a category */ char *class_name = IDENTIFIER_POINTER (CLASS_NAME (implementation_context)); --- 4437,4441 ---- || TREE_CODE (ctxt) == CATEGORY_INTERFACE_TYPE) { ! /* We have a category. */ char *class_name = IDENTIFIER_POINTER (CLASS_NAME (implementation_context)); *************** *** 4122,4126 **** { char *protocol_name = IDENTIFIER_POINTER (PROTOCOL_NAME (ctxt)); ! string = (char *) alloca (strlen (preamble) + strlen (protocol_name) + 3); sprintf (string, "%s_%s", preamble, protocol_name); } --- 4451,4456 ---- { char *protocol_name = IDENTIFIER_POINTER (PROTOCOL_NAME (ctxt)); ! string ! = (char *) alloca (strlen (preamble) + strlen (protocol_name) + 3); sprintf (string, "%s_%s", preamble, protocol_name); } *************** *** 4152,4157 **** if (!type) ! return build_tree_list (build_tree_list (NULLT, objc_object_reference), ! build1 (INDIRECT_REF, NULLT, NULLT)); declspecs = TREE_PURPOSE (type); --- 4482,4487 ---- if (!type) ! return build_tree_list (build_tree_list (NULL_TREE, objc_object_reference), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)); declspecs = TREE_PURPOSE (type); *************** *** 4166,4190 **** } ! return build_tree_list (tree_cons (NULLT, objc_object_reference, declspecs), ! build1 (INDIRECT_REF, NULLT, NULLT)); } ! /* usage: keyworddecl: selector ':' '(' typename ')' identifier ! purpose: ! transform an Objective-C keyword argument into the C equivalent parameter declarator. ! in: key_name, an "identifier_node" (optional). arg_type, a "tree_list" (optional). arg_name, an "identifier_node". ! note: it would be really nice to strongly type the preceding ! arguments in the function prototype; however, then i could not use the "accessor" macros defined in "tree.h". ! out: an instance of "keyword_decl". */ tree --- 4496,4521 ---- } ! return build_tree_list (tree_cons (NULL_TREE, objc_object_reference, ! declspecs), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)); } ! /* Usage: keyworddecl: selector ':' '(' typename ')' identifier ! Purpose: ! Transform an Objective-C keyword argument into the C equivalent parameter declarator. ! In: key_name, an "identifier_node" (optional). arg_type, a "tree_list" (optional). arg_name, an "identifier_node". ! Note: It would be really nice to strongly type the preceding ! arguments in the function prototype; however, then I could not use the "accessor" macros defined in "tree.h". ! Out: an instance of "keyword_decl". */ tree *************** *** 4196,4200 **** tree keyword_decl; ! /* if no type is specified, default to "id" */ arg_type = adjust_type_for_id_default (arg_type); --- 4527,4531 ---- tree keyword_decl; ! /* If no type is specified, default to "id". */ arg_type = adjust_type_for_id_default (arg_type); *************** *** 4209,4212 **** --- 4540,4544 ---- /* Given a chain of keyword_decl's, synthesize the full keyword selector. */ + static tree build_keyword_selector (selector) *************** *** 4226,4232 **** if (key_name) len += IDENTIFIER_LENGTH (key_name) + 1; ! else /* just a ':' arg */ len++; } buf = (char *)alloca (len + 1); bzero (buf, len + 1); --- 4558,4566 ---- if (key_name) len += IDENTIFIER_LENGTH (key_name) + 1; ! else ! /* Just a ':' arg. */ len++; } + buf = (char *)alloca (len + 1); bzero (buf, len + 1); *************** *** 4243,4250 **** strcat (buf, ":"); } return get_identifier (buf); } ! /* used for declarations and definitions */ tree --- 4577,4585 ---- strcat (buf, ":"); } + return get_identifier (buf); } ! /* Used for declarations and definitions. */ tree *************** *** 4257,4261 **** tree method_decl; ! /* if no type is specified, default to "id" */ ret_type = adjust_type_for_id_default (ret_type); --- 4592,4596 ---- tree method_decl; ! /* If no type is specified, default to "id". */ ret_type = adjust_type_for_id_default (ret_type); *************** *** 4274,4279 **** { METHOD_SEL_NAME (method_decl) = selector; ! METHOD_SEL_ARGS (method_decl) = NULLT; ! METHOD_ADD_ARGS (method_decl) = NULLT; } --- 4609,4614 ---- { METHOD_SEL_NAME (method_decl) = selector; ! METHOD_SEL_ARGS (method_decl) = NULL_TREE; ! METHOD_ADD_ARGS (method_decl) = NULL_TREE; } *************** *** 4299,4318 **** tree arglist, akey; ! /* receiver type */ if (flag_next_runtime && superflag) ! arglist = build_tree_list (NULLT, super_type); else if (context == METHOD_DEF) ! arglist = build_tree_list (NULLT, TREE_TYPE (self_decl)); else ! arglist = build_tree_list (NULLT, id_type); ! /* selector type - will eventually change to `int' */ ! chainon (arglist, build_tree_list (NULLT, selector_type)); ! /* build a list of argument types */ for (akey = METHOD_SEL_ARGS (meth); akey; akey = TREE_CHAIN (akey)) { tree arg_decl = groktypename_in_parm_context (TREE_TYPE (akey)); ! chainon (arglist, build_tree_list (NULLT, TREE_TYPE (arg_decl))); } --- 4634,4653 ---- tree arglist, akey; ! /* Receiver type. */ if (flag_next_runtime && superflag) ! arglist = build_tree_list (NULL_TREE, super_type); else if (context == METHOD_DEF) ! arglist = build_tree_list (NULL_TREE, TREE_TYPE (self_decl)); else ! arglist = build_tree_list (NULL_TREE, id_type); ! /* Selector type - will eventually change to `int'. */ ! chainon (arglist, build_tree_list (NULL_TREE, selector_type)); ! /* Build a list of argument types. */ for (akey = METHOD_SEL_ARGS (meth); akey; akey = TREE_CHAIN (akey)) { tree arg_decl = groktypename_in_parm_context (TREE_TYPE (akey)); ! chainon (arglist, build_tree_list (NULL_TREE, TREE_TYPE (arg_decl))); } *************** *** 4329,4333 **** else /* finalize the arglist...simulate get_parm_info (1) */ ! chainon (arglist, build_tree_list (NULLT, void_type_node)); return arglist; --- 4664,4668 ---- else /* finalize the arglist...simulate get_parm_info (1) */ ! chainon (arglist, build_tree_list (NULL_TREE, void_type_node)); return arglist; *************** *** 4338,4342 **** hash hsh; { ! tree meth = NULLT; if (hsh) --- 4673,4677 ---- hash hsh; { ! tree meth = NULL_TREE; if (hsh) *************** *** 4346,4350 **** if (hsh->list) { ! /* we have two methods with the same name and different types */ attr loop; char type = (TREE_CODE (meth) == INSTANCE_METHOD_DECL) ? '-' : '+'; --- 4681,4685 ---- if (hsh->list) { ! /* We have two methods with the same name and different types. */ attr loop; char type = (TREE_CODE (meth) == INSTANCE_METHOD_DECL) ? '-' : '+'; *************** *** 4398,4402 **** && (arg = TREE_OPERAND (arg, 0)) && TREE_CODE (arg) == STRING_CST) ! /* finally, we have the class name */ return get_identifier (TREE_STRING_POINTER (arg)); } --- 4733,4737 ---- && (arg = TREE_OPERAND (arg, 0)) && TREE_CODE (arg) == STRING_CST) ! /* Finally, we have the class name. */ return get_identifier (TREE_STRING_POINTER (arg)); } *************** *** 4432,4437 **** tree rtype, sel_name; tree args = TREE_VALUE (mess); ! tree method_params = NULLT; ! tree method_prototype = NULLT; tree retval; int statically_typed = 0, statically_allocated = 0; --- 4767,4772 ---- tree rtype, sel_name; tree args = TREE_VALUE (mess); ! tree method_params = NULL_TREE; ! tree method_prototype = NULL_TREE; tree retval; int statically_typed = 0, statically_allocated = 0; *************** *** 4447,4451 **** return error_mark_node; ! /* determine receiver type */ rtype = TREE_TYPE (receiver); super = IS_SUPER (rtype); --- 4782,4786 ---- return error_mark_node; ! /* Determine receiver type. */ rtype = TREE_TYPE (receiver); super = IS_SUPER (rtype); *************** *** 4470,4473 **** --- 4805,4809 ---- gen_declaration (rtype, errbuf)); } + if (statically_allocated) receiver = build_unary_op (ADDR_EXPR, receiver, 0); *************** *** 4484,4488 **** if (TREE_CODE (args) == IDENTIFIER_NODE) ! /* a unary selector */ sel_name = args; else if (TREE_CODE (args) == TREE_LIST) --- 4820,4824 ---- if (TREE_CODE (args) == IDENTIFIER_NODE) ! /* A unary selector. */ sel_name = args; else if (TREE_CODE (args) == TREE_LIST) *************** *** 4491,4498 **** /* Build the parameter list to give to the method. */ ! method_params = NULLT; if (TREE_CODE (args) == TREE_LIST) { ! tree chain = args, prev = NULLT; /* We have a keyword selector--check for comma expressions. */ --- 4827,4834 ---- /* Build the parameter list to give to the method. */ ! method_params = NULL_TREE; if (TREE_CODE (args) == TREE_LIST) { ! tree chain = args, prev = NULL_TREE; /* We have a keyword selector--check for comma expressions. */ *************** *** 4523,4527 **** if (CLASS_SUPER_NAME (implementation_template)) { ! iface = lookup_interface (CLASS_SUPER_NAME (implementation_template)); if (TREE_CODE (method_context) == INSTANCE_METHOD_DECL) --- 4859,4864 ---- if (CLASS_SUPER_NAME (implementation_template)) { ! iface ! = lookup_interface (CLASS_SUPER_NAME (implementation_template)); if (TREE_CODE (method_context) == INSTANCE_METHOD_DECL) *************** *** 4551,4555 **** method_prototype = lookup_instance_method_static (iface, sel_name); - /* NEW!!! */ if (! method_prototype && TYPE_PROTOCOL_LIST (ctype)) method_prototype --- 4888,4891 ---- *************** *** 4566,4577 **** tree ctype = TREE_TYPE (rtype); ! /* `self' is now statically_typed...all methods should be visible ! within the context of the implementation... */ if (implementation_context && CLASS_NAME (implementation_context) == TYPE_NAME (ctype)) { ! method_prototype = lookup_instance_method_static (implementation_template, sel_name); - /* NEW!!! */ if (! method_prototype && TYPE_PROTOCOL_LIST (ctype)) method_prototype --- 4902,4914 ---- tree ctype = TREE_TYPE (rtype); ! /* `self' is now statically_typed. All methods should be visible ! within the context of the implementation. */ if (implementation_context && CLASS_NAME (implementation_context) == TYPE_NAME (ctype)) { ! method_prototype ! = lookup_instance_method_static (implementation_template, ! sel_name); if (! method_prototype && TYPE_PROTOCOL_LIST (ctype)) method_prototype *************** *** 4581,4585 **** if (! method_prototype && implementation_template != implementation_context) ! /* the method is not published in the interface...check locally */ method_prototype = lookup_method (CLASS_NST_METHODS (implementation_context), --- 4918,4922 ---- if (! method_prototype && implementation_template != implementation_context) ! /* The method is not published in the interface. Check locally. */ method_prototype = lookup_method (CLASS_NST_METHODS (implementation_context), *************** *** 4598,4602 **** if (protocol_list) method_prototype ! = lookup_method_in_protocol_list (protocol_list, sel_name, 0); } } --- 4935,4940 ---- if (protocol_list) method_prototype ! = lookup_method_in_protocol_list (protocol_list, ! sel_name, 0); } } *************** *** 4617,4621 **** if (!method_prototype && implementation_template != implementation_context) ! /* the method is not published in the interface...check locally */ method_prototype = lookup_method (CLASS_CLS_METHODS (implementation_context), --- 4955,4959 ---- if (!method_prototype && implementation_template != implementation_context) ! /* The method is not published in the interface. Check locally. */ method_prototype = lookup_method (CLASS_CLS_METHODS (implementation_context), *************** *** 4653,4657 **** IDENTIFIER_POINTER (sel_name)); ! /* try and find the method signiture in the global pools! */ if (!(hsh = hash_lookup (nst_method_hash_list, sel_name))) --- 4991,4995 ---- IDENTIFIER_POINTER (sel_name)); ! /* Try and find the method signature in the global pools. */ if (!(hsh = hash_lookup (nst_method_hash_list, sel_name))) *************** *** 4666,4674 **** hash hsh; ! /* we think we have an instance...loophole: extern id Object; */ hsh = hash_lookup (nst_method_hash_list, sel_name); if (!hsh) ! /* for various loopholes...like sending messages to self in a ! factory context... */ hsh = hash_lookup (cls_method_hash_list, sel_name); --- 5004,5012 ---- hash hsh; ! /* We think we have an instance...loophole: extern id Object; */ hsh = hash_lookup (nst_method_hash_list, sel_name); if (!hsh) ! /* For various loopholes, like sending messages to self in a ! factory context. */ hsh = hash_lookup (cls_method_hash_list, sel_name); *************** *** 4725,4730 **** if (! method_prototype) { ! method_params = tree_cons (NULLT, lookup_object, ! tree_cons (NULLT, selector, method_params)); assemble_external (sender); --- 5063,5068 ---- if (! method_prototype) { ! method_params = tree_cons (NULL_TREE, lookup_object, ! tree_cons (NULL_TREE, selector, method_params)); assemble_external (sender); *************** *** 4737,4741 **** all the arguments for this operation, and to return whatever this operation returns. */ ! tree arglist = NULLT; tree retval; --- 5075,5079 ---- all the arguments for this operation, and to return whatever this operation returns. */ ! tree arglist = NULL_TREE; tree retval; *************** *** 4755,4760 **** /* Call SENDER with all the parameters. This will do type checking using the arg types for this method. */ ! method_params = tree_cons (NULLT, lookup_object, ! tree_cons (NULLT, selector, method_params)); assemble_external (sender); --- 5093,5098 ---- /* Call SENDER with all the parameters. This will do type checking using the arg types for this method. */ ! method_params = tree_cons (NULL_TREE, lookup_object, ! tree_cons (NULL_TREE, selector, method_params)); assemble_external (sender); *************** *** 4778,4788 **** selector = save_expr (selector); ! lookup_object = build_c_cast (rcv_p, lookup_object); /* cast! */ assemble_external (sender); method = build_function_call (sender, ! tree_cons (NULLT, lookup_object, ! tree_cons (NULLT, selector, NULLT))); /* If we have a method prototype, construct the data type this --- 5116,5127 ---- selector = save_expr (selector); ! lookup_object = build_c_cast (rcv_p, lookup_object); assemble_external (sender); method = build_function_call (sender, ! tree_cons (NULL_TREE, lookup_object, ! tree_cons (NULL_TREE, selector, ! NULL_TREE))); /* If we have a method prototype, construct the data type this *************** *** 4799,4809 **** else TREE_TYPE (method) ! = build_pointer_type (build_function_type (ptr_type_node, NULLT)); /* Pass the object to the method. */ assemble_external (method); return build_function_call (method, ! tree_cons (NULLT, object, ! tree_cons (NULLT, selector, method_params))); } --- 5138,5148 ---- else TREE_TYPE (method) ! = build_pointer_type (build_function_type (ptr_type_node, NULL_TREE)); /* Pass the object to the method. */ assemble_external (method); return build_function_call (method, ! tree_cons (NULL_TREE, object, ! tree_cons (NULL_TREE, selector, method_params))); } *************** *** 4815,4822 **** { tree decl, ident, ptype; - struct obstack *save_current_obstack = current_obstack; - struct obstack *save_rtl_obstack = rtl_obstack; ! rtl_obstack = current_obstack = &permanent_obstack; /* extern struct objc_protocol _OBJC_PROTOCOL_; */ --- 5154,5160 ---- { tree decl, ident, ptype; ! push_obstacks_nochange (); ! end_temporary_allocation (); /* extern struct objc_protocol _OBJC_PROTOCOL_; */ *************** *** 4824,4830 **** ident = synth_id_with_class_suffix ("_OBJC_PROTOCOL", p); ptype ! = groktypename (build_tree_list (build_tree_list (NULLT, objc_protocol_template), ! NULLT)); if (IDENTIFIER_GLOBAL_VALUE (ident)) --- 5162,5168 ---- ident = synth_id_with_class_suffix ("_OBJC_PROTOCOL", p); ptype ! = groktypename (build_tree_list (build_tree_list (NULL_TREE, objc_protocol_template), ! NULL_TREE)); if (IDENTIFIER_GLOBAL_VALUE (ident)) *************** *** 4836,4849 **** TREE_PUBLIC (decl) = 1; TREE_USED (decl) = 1; - /* usually called from `rest_of_decl_compilation' */ make_decl_rtl (decl, 0, 1); - /* our `extended/custom' pushdecl in c-decl.c */ pushdecl_top_level (decl); } - current_obstack = save_current_obstack; - rtl_obstack = save_rtl_obstack; PROTOCOL_FORWARD_DECL (p) = decl; } --- 5174,5185 ---- TREE_PUBLIC (decl) = 1; TREE_USED (decl) = 1; + DECL_ARTIFICIAL (decl) = 1; make_decl_rtl (decl, 0, 1); pushdecl_top_level (decl); } PROTOCOL_FORWARD_DECL (p) = decl; + pop_obstacks (); } *************** *** 4886,4892 **** objc_fatal (); ! /* obtain the full selector name */ if (TREE_CODE (selnamelist) == IDENTIFIER_NODE) ! /* a unary selector */ selname = selnamelist; else if (TREE_CODE (selnamelist) == TREE_LIST) --- 5222,5228 ---- objc_fatal (); ! /* Obtain the full selector name. */ if (TREE_CODE (selnamelist) == IDENTIFIER_NODE) ! /* A unary selector. */ selname = selnamelist; else if (TREE_CODE (selnamelist) == TREE_LIST) *************** *** 4914,4918 **** string = obstack_finish (&util_obstack); ! /* synthesize a string that represents the encoded struct/union */ result = my_build_string (strlen (string) + 1, string); obstack_free (&util_obstack, util_firstobj); --- 5250,5254 ---- string = obstack_finish (&util_obstack); ! /* Synthesize a string that represents the encoded struct/union. */ result = my_build_string (strlen (string) + 1, string); obstack_free (&util_obstack, util_firstobj); *************** *** 5057,5061 **** mchain = TREE_CHAIN (mchain); } ! return NULLT; } --- 5393,5397 ---- mchain = TREE_CHAIN (mchain); } ! return NULL_TREE; } *************** *** 5067,5071 **** tree inter = interface; tree chain = CLASS_NST_METHODS (inter); ! tree meth = NULLT; do --- 5403,5407 ---- tree inter = interface; tree chain = CLASS_NST_METHODS (inter); ! tree meth = NULL_TREE; do *************** *** 5084,5088 **** return meth; - /* NEW!!! */ /* Check for instance methods in protocols in categories. */ if (CLASS_PROTOCOL_LIST (category)) --- 5420,5423 ---- *************** *** 5121,5126 **** tree inter = interface; tree chain = CLASS_CLS_METHODS (inter); ! tree meth = NULLT; ! tree root_inter = NULLT; do --- 5456,5461 ---- tree inter = interface; tree chain = CLASS_CLS_METHODS (inter); ! tree meth = NULL_TREE; ! tree root_inter = NULL_TREE; do *************** *** 5139,5143 **** return meth; - /* NEW!!! */ /* Check for class methods in protocols in categories. */ if (CLASS_PROTOCOL_LIST (category)) --- 5474,5477 ---- *************** *** 5154,5158 **** } - /* NEW!!! */ /* Check for class methods in protocols. */ if (CLASS_PROTOCOL_LIST (inter)) --- 5488,5491 ---- *************** *** 5169,5173 **** while (inter); - /* NEW!!! */ /* Simulate wrap around. */ return lookup_instance_method_static (root_inter, ident); --- 5502,5505 ---- *************** *** 5199,5203 **** else { ! /* check types, if different complain */ if (!comp_proto_with_proto (method, mth)) error ("duplicate declaration of class method `%s'.", --- 5531,5535 ---- else { ! /* Check types; if different, complain. */ if (!comp_proto_with_proto (method, mth)) error ("duplicate declaration of class method `%s'.", *************** *** 5208,5217 **** if (!(hsh = hash_lookup (cls_method_hash_list, METHOD_SEL_NAME (method)))) { ! /* install on a global chain */ hash_enter (cls_method_hash_list, method); } else { ! /* check types, if different add to a list */ if (!comp_proto_with_proto (method, hsh->key)) hash_add_attr (hsh, method); --- 5540,5549 ---- if (!(hsh = hash_lookup (cls_method_hash_list, METHOD_SEL_NAME (method)))) { ! /* Install on a global chain. */ hash_enter (cls_method_hash_list, method); } else { ! /* Check types; if different, add to a list. */ if (!comp_proto_with_proto (method, hsh->key)) hash_add_attr (hsh, method); *************** *** 5234,5238 **** if (!(mth = lookup_method (CLASS_NST_METHODS (class), method))) { ! /* put method on list in reverse order */ TREE_CHAIN (method) = CLASS_NST_METHODS (class); CLASS_NST_METHODS (class) = method; --- 5566,5570 ---- if (!(mth = lookup_method (CLASS_NST_METHODS (class), method))) { ! /* Put method on list in reverse order. */ TREE_CHAIN (method) = CLASS_NST_METHODS (class); CLASS_NST_METHODS (class) = method; *************** *** 5245,5249 **** else { ! /* check types, if different complain */ if (!comp_proto_with_proto (method, mth)) error ("duplicate declaration of instance method `%s'.", --- 5577,5581 ---- else { ! /* Check types; if different, complain. */ if (!comp_proto_with_proto (method, mth)) error ("duplicate declaration of instance method `%s'.", *************** *** 5254,5263 **** if (!(hsh = hash_lookup (nst_method_hash_list, METHOD_SEL_NAME (method)))) { ! /* install on a global chain */ hash_enter (nst_method_hash_list, method); } else { ! /* check types, if different add to a list */ if (!comp_proto_with_proto (method, hsh->key)) hash_add_attr (hsh, method); --- 5586,5595 ---- if (!(hsh = hash_lookup (nst_method_hash_list, METHOD_SEL_NAME (method)))) { ! /* Install on a global chain. */ hash_enter (nst_method_hash_list, method); } else { ! /* Check types; if different, add to a list. */ if (!comp_proto_with_proto (method, hsh->key)) hash_add_attr (hsh, method); *************** *** 5270,5274 **** tree class; { ! /* put interfaces on list in reverse order */ TREE_CHAIN (class) = interface_chain; interface_chain = class; --- 5602,5606 ---- tree class; { ! /* Put interfaces on list in reverse order. */ TREE_CHAIN (class) = interface_chain; interface_chain = class; *************** *** 5281,5287 **** tree category; { ! /* put categories on list in reverse order */ ! tree cat = CLASS_CATEGORY_LIST (class); while (cat) { --- 5613,5619 ---- tree category; { ! /* Put categories on list in reverse order. */ tree cat = CLASS_CATEGORY_LIST (class); + while (cat) { *************** *** 5312,5316 **** tree field_decl, raw_decl; ! raw_decl = build_tree_list (declspecs /*purpose*/, declarator/*value*/); if (CLASS_RAW_IVARS (class)) --- 5644,5648 ---- tree field_decl, raw_decl; ! raw_decl = build_tree_list (declspecs, declarator); if (CLASS_RAW_IVARS (class)) *************** *** 5322,5326 **** declarator, declspecs, width); ! /* overload the public attribute, it is not used for FIELD_DECL's */ switch (public) { --- 5654,5658 ---- declarator, declspecs, width); ! /* Overload the public attribute, it is not used for FIELD_DECLs. */ switch (public) { *************** *** 5381,5385 **** } ! /* we have an instance variable reference, check to see if it is public...*/ int --- 5713,5717 ---- } ! /* We have an instance variable reference;, check to see if it is public. */ int *************** *** 5408,5412 **** return 1; ! /* important difference between the Stepstone translator: all instance variables should be public within the context of the implementation. */ --- 5740,5744 ---- return 1; ! /* Important difference between the Stepstone translator: all instance variables should be public within the context of the implementation. */ *************** *** 5426,5429 **** --- 5758,5762 ---- } } + else if (implementation_context && (basetype == objc_object_reference)) { *************** *** 5432,5439 **** } } return 1; } ! /* implement @defs () within struct bodies. */ tree --- 5765,5773 ---- } } + return 1; } ! /* Implement @defs () within struct bodies. */ tree *************** *** 5447,5451 **** } ! /* make sure all entries in "chain" are also in "list" */ static int --- 5781,5785 ---- } ! /* Make sure all entries in CHAIN are also in LIST. */ static int *************** *** 5463,5479 **** if (first) { ! if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) warning ("incomplete implementation of class `%s'", IDENTIFIER_POINTER (CLASS_NAME (implementation_context))); ! else if (TREE_CODE (implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) warning ("incomplete implementation of category `%s'", IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); first = 0; } warning ("method definition for `%c%s' not found", mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain))); } chain = TREE_CHAIN (chain); } return first; } --- 5797,5818 ---- if (first) { ! if (TREE_CODE (implementation_context) ! == CLASS_IMPLEMENTATION_TYPE) warning ("incomplete implementation of class `%s'", IDENTIFIER_POINTER (CLASS_NAME (implementation_context))); ! else if (TREE_CODE (implementation_context) ! == CATEGORY_IMPLEMENTATION_TYPE) warning ("incomplete implementation of category `%s'", IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); first = 0; } + warning ("method definition for `%c%s' not found", mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain))); } + chain = TREE_CHAIN (chain); } + return first; } *************** *** 5481,5492 **** static int conforms_to_protocol (class, protocol) ! tree class; ! tree protocol; { while (protocol) { tree p = CLASS_PROTOCOL_LIST (class); while (p && TREE_VALUE (p) != TREE_VALUE (protocol)) p = TREE_CHAIN (p); if (!p) { --- 5820,5833 ---- static int conforms_to_protocol (class, protocol) ! tree class; ! tree protocol; { while (protocol) { tree p = CLASS_PROTOCOL_LIST (class); + while (p && TREE_VALUE (p) != TREE_VALUE (protocol)) p = TREE_CHAIN (p); + if (!p) { *************** *** 5498,5514 **** return 0; } protocol = TREE_CHAIN (protocol); } return 1; } /* Make sure all methods in CHAIN are accessible as MTYPE methods in ! CONTEXT. This is one of two mechanisms to check protocol integrity ! */ static int check_methods_accessible (chain, context, mtype) tree chain; ! tree context; /* implementation_context */ int mtype; { --- 5839,5856 ---- return 0; } + protocol = TREE_CHAIN (protocol); } + return 1; } /* Make sure all methods in CHAIN are accessible as MTYPE methods in ! CONTEXT. This is one of two mechanisms to check protocol integrity. */ static int check_methods_accessible (chain, context, mtype) tree chain; ! tree context; int mtype; { *************** *** 5584,5588 **** int f1, f2; ! /* Ensure that all protocols have bodies! */ if (flag_warn_protocol) { f1 = check_methods (PROTOCOL_CLS_METHODS (p), --- 5926,5930 ---- int f1, f2; ! /* Ensure that all protocols have bodies. */ if (flag_warn_protocol) { f1 = check_methods (PROTOCOL_CLS_METHODS (p), *************** *** 5607,5611 **** } else ! ; /* an identifier...if we could not find a protocol. */ /* Check protocols recursively. */ --- 5949,5953 ---- } else ! ; /* An identifier if we could not find a protocol. */ /* Check protocols recursively. */ *************** *** 5672,5693 **** return error_mark_node; } ! implemented_classes = perm_tree_cons (NULLT, class_name, implemented_classes); } ! /* pre-build the following entities - for speed/convenience. */ if (!self_id) ! self_id = get_identifier ("self"); if (!ucmd_id) ucmd_id = get_identifier ("_cmd"); ! if (!objc_super_template) objc_super_template = build_super_template (); ! method_slot = 0; /* reset for multiple classes per file */ implementation_context = class; ! /* lookup the interface for this implementation. */ if (!(implementation_template = lookup_interface (class_name))) --- 6014,6038 ---- return error_mark_node; } ! implemented_classes = perm_tree_cons (NULL_TREE, class_name, implemented_classes); } ! /* Pre-build the following entities - for speed/convenience. */ if (!self_id) ! self_id = get_identifier ("self"); if (!ucmd_id) ucmd_id = get_identifier ("_cmd"); ! if (!unused_list) ! unused_list ! = build_tree_list (get_identifier ("__unused__"), NULL_TREE); if (!objc_super_template) objc_super_template = build_super_template (); ! /* Reset for multiple classes per file. */ ! method_slot = 0; implementation_context = class; ! /* Lookup the interface for this implementation. */ if (!(implementation_template = lookup_interface (class_name))) *************** *** 5698,5703 **** } ! /* if a super class has been specified in the implementation, ! insure it conforms to the one specified in the interface */ if (super_name --- 6043,6048 ---- } ! /* If a super class has been specified in the implementation, ! insure it conforms to the one specified in the interface. */ if (super_name *************** *** 5710,5713 **** --- 6055,6059 ---- error ("previous declaration of `%s'", name); } + else if (! super_name) { *************** *** 5716,5719 **** --- 6062,6066 ---- } } + else if (code == CLASS_INTERFACE_TYPE) { *************** *** 5728,5738 **** = lookup_and_install_protocols (protocol_list); } else if (code == CATEGORY_INTERFACE_TYPE) { tree class_category_is_assoc_with; ! /* for a category, class_name is really the name of the class that ! the following set of methods will be associated with...we must ! find the interface so that can derive the objects template */ if (!(class_category_is_assoc_with = lookup_interface (class_name))) --- 6075,6086 ---- = lookup_and_install_protocols (protocol_list); } + else if (code == CATEGORY_INTERFACE_TYPE) { tree class_category_is_assoc_with; ! /* For a category, class_name is really the name of the class that ! the following set of methods will be associated with. We must ! find the interface so that can derive the objects template. */ if (!(class_category_is_assoc_with = lookup_interface (class_name))) *************** *** 5740,5744 **** error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); ! exit (1); } else --- 6088,6092 ---- error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); ! exit (FATAL_EXIT_CODE); } else *************** *** 5749,5770 **** = lookup_and_install_protocols (protocol_list); } else if (code == CATEGORY_IMPLEMENTATION_TYPE) { ! /* pre-build the following entities - for speed/convenience. */ if (!self_id) self_id = get_identifier ("self"); if (!ucmd_id) ucmd_id = get_identifier ("_cmd"); ! if (!objc_super_template) objc_super_template = build_super_template (); ! method_slot = 0; /* reset for multiple classes per file */ implementation_context = class; ! /* for a category, class_name is really the name of the class that ! the following set of methods will be associated with...we must ! find the interface so that can derive the objects template */ if (!(implementation_template = lookup_interface (class_name))) --- 6097,6122 ---- = lookup_and_install_protocols (protocol_list); } + else if (code == CATEGORY_IMPLEMENTATION_TYPE) { ! /* Pre-build the following entities for speed/convenience. */ if (!self_id) self_id = get_identifier ("self"); if (!ucmd_id) ucmd_id = get_identifier ("_cmd"); ! if (!unused_list) ! unused_list ! = build_tree_list (get_identifier ("__unused__"), NULL_TREE); if (!objc_super_template) objc_super_template = build_super_template (); ! /* Reset for multiple classes per file. */ ! method_slot = 0; implementation_context = class; ! /* For a category, class_name is really the name of the class that ! the following set of methods will be associated with. We must ! find the interface so that can derive the objects template. */ if (!(implementation_template = lookup_interface (class_name))) *************** *** 5772,5776 **** error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); ! exit (1); } } --- 6124,6128 ---- error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); ! exit (FATAL_EXIT_CODE); } } *************** *** 5788,5792 **** tree ivar_context; ! /* check consistency of the instance variables. */ if (CLASS_IVARS (class)) --- 6140,6144 ---- tree ivar_context; ! /* Check consistency of the instance variables. */ if (CLASS_IVARS (class)) *************** *** 5800,5804 **** build_class_template (); ! if (!(imp_entry = (struct imp_entry *) xmalloc (sizeof (struct imp_entry)))) perror ("unable to allocate in objc-tree.c"); --- 6152,6157 ---- build_class_template (); ! if (!(imp_entry ! = (struct imp_entry *) xmalloc (sizeof (struct imp_entry)))) perror ("unable to allocate in objc-tree.c"); *************** *** 5811,5815 **** imp_entry->meta_decl = UOBJC_METACLASS_decl; ! /* append to front and increment count */ imp_list = imp_entry; if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) --- 6164,6168 ---- imp_entry->meta_decl = UOBJC_METACLASS_decl; ! /* Append to front and increment count. */ imp_list = imp_entry; if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) *************** *** 5820,5823 **** --- 6173,6177 ---- return ivar_context; } + else if (TREE_CODE (class) == CLASS_INTERFACE_TYPE) { *************** *** 5826,5837 **** if (!TYPE_FIELDS (record)) { ! finish_struct (record, build_ivar_chain (class, 0)); CLASS_STATIC_TEMPLATE (class) = record; ! /* mark this record as a class template - for static typing */ TREE_STATIC_TEMPLATE (record) = 1; } ! return NULLT; } else return error_mark_node; --- 6180,6193 ---- if (!TYPE_FIELDS (record)) { ! finish_struct (record, build_ivar_chain (class, 0), NULL_TREE); CLASS_STATIC_TEMPLATE (class) = record; ! /* Mark this record as a class template for static typing. */ TREE_STATIC_TEMPLATE (record) = 1; } ! ! return NULL_TREE; } + else return error_mark_node; *************** *** 5846,5854 **** if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) { ! /* all code generation is done in finish_objc */ if (implementation_template != implementation_context) { ! /* ensure that all method listed in the interface contain bodies! */ check_methods (CLASS_CLS_METHODS (implementation_template), CLASS_CLS_METHODS (implementation_context), '+'); --- 6202,6210 ---- if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) { ! /* All code generation is done in finish_objc. */ if (implementation_template != implementation_context) { ! /* Ensure that all method listed in the interface contain bodies. */ check_methods (CLASS_CLS_METHODS (implementation_template), CLASS_CLS_METHODS (implementation_context), '+'); *************** *** 5862,5870 **** } } else if (TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE) { tree category = CLASS_CATEGORY_LIST (implementation_template); ! /* find the category interface from the class it is associated with */ while (category) { --- 6218,6227 ---- } } + else if (TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE) { tree category = CLASS_CATEGORY_LIST (implementation_template); ! /* Find the category interface from the class it is associated with. */ while (category) { *************** *** 5876,5880 **** if (category) { ! /* ensure that all method listed in the interface contain bodies! */ check_methods (CLASS_CLS_METHODS (category), CLASS_CLS_METHODS (implementation_context), '+'); --- 6233,6237 ---- if (category) { ! /* Ensure all method listed in the interface contain bodies. */ check_methods (CLASS_CLS_METHODS (category), CLASS_CLS_METHODS (implementation_context), '+'); *************** *** 5888,5891 **** --- 6245,6249 ---- } } + else if (TREE_CODE (class) == CLASS_INTERFACE_TYPE) { *************** *** 5898,5904 **** sprintf (string, "_%s", class_name); ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_EXTERN]); ! decl_specs = tree_cons (NULLT, objc_object_reference, decl_specs); ! define_decl (build1 (INDIRECT_REF, NULLT, get_identifier (string)), decl_specs); } --- 6256,6262 ---- sprintf (string, "_%s", class_name); ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_EXTERN]); ! decl_specs = tree_cons (NULL_TREE, objc_object_reference, decl_specs); ! define_decl (build1 (INDIRECT_REF, NULL_TREE, get_identifier (string)), decl_specs); } *************** *** 5909,5913 **** tree protocol; { ! /* put protocol on list in reverse order */ TREE_CHAIN (protocol) = protocol_chain; protocol_chain = protocol; --- 6267,6271 ---- tree protocol; { ! /* Put protocol on list in reverse order. */ TREE_CHAIN (protocol) = protocol_chain; protocol_chain = protocol; *************** *** 5926,5930 **** return chain; } ! return NULLT; } --- 6284,6289 ---- return chain; } ! ! return NULL_TREE; } *************** *** 6055,6059 **** } ! /* we have a type that does not get special treatment... */ /* NeXT extension */ --- 6414,6418 ---- } ! /* We have a type that does not get special treatment. */ /* NeXT extension */ *************** *** 6075,6079 **** if (an_int_cst == NULL) { - /* split for obvious reasons. North-Keys 30 Mar 1991 */ encode_pointer (type, curtype, format); return; --- 6434,6437 ---- *************** *** 6083,6086 **** --- 6441,6445 ---- (TREE_INT_CST_LOW (an_int_cst) / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); + obstack_grow (&util_obstack, buffer, strlen (buffer)); encode_type (array_of, curtype, format); *************** *** 6106,6116 **** tree name = TYPE_NAME (type); ! /* we have a reference - this is a NeXT extension */ if (obstack_object_size (&util_obstack) - curtype == 1 && format == OBJC_ENCODE_INLINE_DEFS) { ! /* output format of struct for first level only! */ ! tree fields = TYPE_FIELDS (type); --- 6465,6474 ---- tree name = TYPE_NAME (type); ! /* We have a reference; this is a NeXT extension. */ if (obstack_object_size (&util_obstack) - curtype == 1 && format == OBJC_ENCODE_INLINE_DEFS) { ! /* Output format of struct for first level only. */ tree fields = TYPE_FIELDS (type); *************** *** 6123,6126 **** --- 6481,6485 ---- obstack_1grow (&util_obstack, '='); } + else obstack_grow (&util_obstack, "{?=", 3); *************** *** 6128,6133 **** --- 6487,6494 ---- for ( ; fields; fields = TREE_CHAIN (fields)) encode_field_decl (fields, curtype, format); + obstack_1grow (&util_obstack, '}'); } + else if (name && TREE_CODE (name) == IDENTIFIER_NODE) { *************** *** 6138,6144 **** obstack_1grow (&util_obstack, '}'); } ! else /* we have an untagged structure or a typedef */ obstack_grow (&util_obstack, "{?}", 3); } else { --- 6499,6508 ---- obstack_1grow (&util_obstack, '}'); } ! ! else ! /* We have an untagged structure or a typedef. */ obstack_grow (&util_obstack, "{?}", 3); } + else { *************** *** 6154,6157 **** --- 6518,6522 ---- IDENTIFIER_POINTER (name), strlen (IDENTIFIER_POINTER (name))); + else obstack_1grow (&util_obstack, '?'); *************** *** 6168,6181 **** if (fname && TREE_CODE (fname) == IDENTIFIER_NODE) { ! obstack_grow (&util_obstack, ! IDENTIFIER_POINTER (fname), ! strlen (IDENTIFIER_POINTER (fname))); } obstack_1grow (&util_obstack, '"'); } encode_field_decl (fields, curtype, format); } obstack_1grow (&util_obstack, '}'); } else { --- 6533,6550 ---- if (fname && TREE_CODE (fname) == IDENTIFIER_NODE) { ! obstack_grow (&util_obstack, ! IDENTIFIER_POINTER (fname), ! strlen (IDENTIFIER_POINTER (fname))); } + obstack_1grow (&util_obstack, '"'); } + encode_field_decl (fields, curtype, format); } + obstack_1grow (&util_obstack, '}'); } + else { *************** *** 6185,6190 **** IDENTIFIER_POINTER (name), strlen (IDENTIFIER_POINTER (name))); ! else /* we have an untagged structure or a typedef */ obstack_1grow (&util_obstack, '?'); obstack_1grow (&util_obstack, '}'); } --- 6554,6561 ---- IDENTIFIER_POINTER (name), strlen (IDENTIFIER_POINTER (name))); ! else ! /* We have an untagged structure or a typedef. */ obstack_1grow (&util_obstack, '?'); + obstack_1grow (&util_obstack, '}'); } *************** *** 6192,6195 **** --- 6563,6567 ---- break; } + case UNION_TYPE: { *************** *** 6197,6201 **** || format != OBJC_ENCODE_INLINE_DEFS) { ! /* we have a reference - this is a NeXT extension-- or we don't want the details. */ if (TYPE_NAME (type) --- 6569,6573 ---- || format != OBJC_ENCODE_INLINE_DEFS) { ! /* We have a reference (this is a NeXT extension) or we don't want the details. */ if (TYPE_NAME (type) *************** *** 6208,6212 **** obstack_1grow (&util_obstack, ')'); } ! else /* we have an untagged structure or a typedef */ obstack_grow (&util_obstack, "(?)", 3); } --- 6580,6586 ---- obstack_1grow (&util_obstack, ')'); } ! ! else ! /* We have an untagged structure or a typedef. */ obstack_grow (&util_obstack, "(?)", 3); } *************** *** 6217,6220 **** --- 6591,6595 ---- for ( ; fields; fields = TREE_CHAIN (fields)) encode_field_decl (fields, curtype, format); + obstack_1grow (&util_obstack, ')'); } *************** *** 6228,6236 **** } ! /* Support bitfields, the current version of Objective-C does not support ! them. the string will consist of one or more "b:n"'s where n is an integer describing the width of the bitfield. Currently, classes in the kit implement a method "-(char *)describeBitfieldStruct:" that ! simulates this...if they do not implement this method, the archiver assumes the bitfield is 16 bits wide (padded if necessary) and packed according to the GNU compiler. After looking at the "kit", it appears --- 6603,6611 ---- } ! /* Support bitfields. The current version of Objective-C does not support ! them. The string will consist of one or more "b:n"'s where n is an integer describing the width of the bitfield. Currently, classes in the kit implement a method "-(char *)describeBitfieldStruct:" that ! simulates this. If they do not implement this method, the archiver assumes the bitfield is 16 bits wide (padded if necessary) and packed according to the GNU compiler. After looking at the "kit", it appears *************** *** 6263,6311 **** && TREE_INT_CST_HIGH (TYPE_MIN_VALUE (type)) == 0) { ! /* unsigned integer types */ ! if (TYPE_MODE (type) == QImode) /* 'C' */ obstack_1grow (&util_obstack, 'C'); ! else if (TYPE_MODE (type) == HImode) /* 'S' */ obstack_1grow (&util_obstack, 'S'); else if (TYPE_MODE (type) == SImode) { if (type == long_unsigned_type_node) ! obstack_1grow (&util_obstack, 'L'); /* 'L' */ else ! obstack_1grow (&util_obstack, 'I'); /* 'I' */ } ! else if (TYPE_MODE (type) == DImode) /* 'Q' */ obstack_1grow (&util_obstack, 'Q'); } ! else /* signed integer types */ { ! if (TYPE_MODE (type) == QImode) /* 'c' */ obstack_1grow (&util_obstack, 'c'); ! else if (TYPE_MODE (type) == HImode) /* 's' */ obstack_1grow (&util_obstack, 's'); ! else if (TYPE_MODE (type) == SImode) /* 'i' */ { if (type == long_integer_type_node) ! obstack_1grow (&util_obstack, 'l'); /* 'l' */ else ! obstack_1grow (&util_obstack, 'i'); /* 'i' */ } ! else if (TYPE_MODE (type) == DImode) /* 'q' */ obstack_1grow (&util_obstack, 'q'); } } else if (code == REAL_TYPE) { ! /* floating point types */ ! if (TYPE_MODE (type) == SFmode) /* 'f' */ obstack_1grow (&util_obstack, 'f'); else if (TYPE_MODE (type) == DFmode ! || TYPE_MODE (type) == TFmode) /* 'd' */ obstack_1grow (&util_obstack, 'd'); } ! else if (code == VOID_TYPE) /* 'v' */ obstack_1grow (&util_obstack, 'v'); --- 6638,6690 ---- && TREE_INT_CST_HIGH (TYPE_MIN_VALUE (type)) == 0) { ! /* Unsigned integer types. */ ! if (TYPE_MODE (type) == QImode) obstack_1grow (&util_obstack, 'C'); ! else if (TYPE_MODE (type) == HImode) obstack_1grow (&util_obstack, 'S'); else if (TYPE_MODE (type) == SImode) { if (type == long_unsigned_type_node) ! obstack_1grow (&util_obstack, 'L'); else ! obstack_1grow (&util_obstack, 'I'); } ! else if (TYPE_MODE (type) == DImode) obstack_1grow (&util_obstack, 'Q'); } ! ! else ! /* Signed integer types. */ { ! if (TYPE_MODE (type) == QImode) obstack_1grow (&util_obstack, 'c'); ! else if (TYPE_MODE (type) == HImode) obstack_1grow (&util_obstack, 's'); ! else if (TYPE_MODE (type) == SImode) { if (type == long_integer_type_node) ! obstack_1grow (&util_obstack, 'l'); else ! obstack_1grow (&util_obstack, 'i'); } ! ! else if (TYPE_MODE (type) == DImode) obstack_1grow (&util_obstack, 'q'); } } + else if (code == REAL_TYPE) { ! /* Floating point types. */ ! if (TYPE_MODE (type) == SFmode) obstack_1grow (&util_obstack, 'f'); else if (TYPE_MODE (type) == DFmode ! || TYPE_MODE (type) == TFmode) obstack_1grow (&util_obstack, 'd'); } ! else if (code == VOID_TYPE) obstack_1grow (&util_obstack, 'v'); *************** *** 6354,6357 **** --- 6733,6737 ---- while ((next = TREE_OPERAND (complex_expr, 0))) complex_expr = next; + return complex_expr; } *************** *** 6381,6413 **** /* Required to implement _msgSuper. */ method_context = method; ! UOBJC_SUPER_decl = NULLT; ! pushlevel (0); /* Must be called BEFORE start_function. */ /* Generate prototype declarations for arguments..."new-style". */ if (TREE_CODE (method_context) == INSTANCE_METHOD_DECL) ! decl_specs = build_tree_list (NULLT, uprivate_record); else ! /* really a `struct objc_class *'...however we allow people to ! assign to self...which changes its type midstream. */ ! decl_specs = build_tree_list (NULLT, objc_object_reference); - push_parm_decl (build_tree_list (decl_specs, - build1 (INDIRECT_REF, NULLT, self_id))); - #ifdef OBJC_INT_SELECTORS ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_UNSIGNED]); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); ! push_parm_decl (build_tree_list (decl_specs, ucmd_id)); #else /* not OBJC_INT_SELECTORS */ ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); ! push_parm_decl (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULLT, ucmd_id))); #endif /* not OBJC_INT_SELECTORS */ ! /* generate argument declarations if a keyword_decl */ if (METHOD_SEL_ARGS (method)) { --- 6761,6799 ---- /* Required to implement _msgSuper. */ method_context = method; ! UOBJC_SUPER_decl = NULL_TREE; ! /* Must be called BEFORE start_function. */ ! pushlevel (0); /* Generate prototype declarations for arguments..."new-style". */ if (TREE_CODE (method_context) == INSTANCE_METHOD_DECL) ! decl_specs = build_tree_list (NULL_TREE, uprivate_record); else ! /* Really a `struct objc_class *'. However, we allow people to ! assign to self, which changes its type midstream. */ ! decl_specs = build_tree_list (NULL_TREE, objc_object_reference); ! ! push_parm_decl (build_tree_list ! (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULL_TREE, self_id)), ! build_tree_list (unused_list, NULL_TREE))); #ifdef OBJC_INT_SELECTORS ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_UNSIGNED]); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_INT], decl_specs); ! push_parm_decl (build_tree_list (build_tree_list (decl_specs, ucmd_id), ! build_tree_list (unused_list, NULL_TREE))); #else /* not OBJC_INT_SELECTORS */ ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); ! push_parm_decl (build_tree_list ! (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULL_TREE, ucmd_id)), ! build_tree_list (unused_list, NULL_TREE))); #endif /* not OBJC_INT_SELECTORS */ ! /* Generate argument declarations if a keyword_decl. */ if (METHOD_SEL_ARGS (method)) { *************** *** 6422,6434 **** tree last_expr = expr_last (arg_decl); ! /* unite the abstract decl with its name */ TREE_OPERAND (last_expr, 0) = KEYWORD_ARG_NAME (arglist); ! push_parm_decl (build_tree_list (arg_spec, arg_decl)); ! /* unhook...restore the abstract declarator */ ! TREE_OPERAND (last_expr, 0) = NULLT; } else ! push_parm_decl (build_tree_list (arg_spec, ! KEYWORD_ARG_NAME (arglist))); arglist = TREE_CHAIN (arglist); --- 6808,6826 ---- tree last_expr = expr_last (arg_decl); ! /* Unite the abstract decl with its name. */ TREE_OPERAND (last_expr, 0) = KEYWORD_ARG_NAME (arglist); ! push_parm_decl (build_tree_list ! (build_tree_list (arg_spec, arg_decl), ! build_tree_list (NULL_TREE, NULL_TREE))); ! ! /* Unhook: restore the abstract declarator. */ ! TREE_OPERAND (last_expr, 0) = NULL_TREE; } + else ! push_parm_decl (build_tree_list ! (build_tree_list (arg_spec, ! KEYWORD_ARG_NAME (arglist)), ! build_tree_list (NULL_TREE, NULL_TREE))); arglist = TREE_CHAIN (arglist); *************** *** 6439,6443 **** if (METHOD_ADD_ARGS (method) > (tree)1) { ! /* we have a variable length selector - in "prototype" format */ tree akey = TREE_PURPOSE (METHOD_ADD_ARGS (method)); while (akey) --- 6831,6835 ---- if (METHOD_ADD_ARGS (method) > (tree)1) { ! /* We have a variable length selector - in "prototype" format. */ tree akey = TREE_PURPOSE (METHOD_ADD_ARGS (method)); while (akey) *************** *** 6470,6474 **** } ! /* return 1 if `method' is consistent with `proto' */ static int --- 6862,6866 ---- } ! /* Return 1 if METHOD is consistent with PROTO. */ static int *************** *** 6478,6489 **** static tree function_type = 0; ! /* create a function_type node once */ if (!function_type) { ! struct obstack *ambient_obstack = current_obstack; ! ! current_obstack = &permanent_obstack; function_type = make_node (FUNCTION_TYPE); ! current_obstack = ambient_obstack; } --- 6870,6880 ---- static tree function_type = 0; ! /* Create a function_type node once. */ if (!function_type) { ! push_obstacks_nochange (); ! end_temporary_allocation (); function_type = make_node (FUNCTION_TYPE); ! pop_obstacks (); } *************** *** 6497,6501 **** } ! /* return 1 if `proto1' is consistent with `proto2' */ static int --- 6888,6892 ---- } ! /* Return 1 if PROTO1 is consistent with PROTO2. */ static int *************** *** 6505,6524 **** static tree function_type1 = 0, function_type2 = 0; ! /* create a couple function_type node's once */ if (!function_type1) { ! struct obstack *ambient_obstack = current_obstack; ! ! current_obstack = &permanent_obstack; function_type1 = make_node (FUNCTION_TYPE); function_type2 = make_node (FUNCTION_TYPE); ! current_obstack = ambient_obstack; } ! /* Install argument types - normally set by build_function_type. */ TYPE_ARG_TYPES (function_type1) = get_arg_type_list (proto1, METHOD_REF, 0); TYPE_ARG_TYPES (function_type2) = get_arg_type_list (proto2, METHOD_REF, 0); ! /* install return type */ TREE_TYPE (function_type1) = groktypename (TREE_TYPE (proto1)); TREE_TYPE (function_type2) = groktypename (TREE_TYPE (proto2)); --- 6896,6914 ---- static tree function_type1 = 0, function_type2 = 0; ! /* Create a couple function_type node's once. */ if (!function_type1) { ! push_obstacks_nochange (); ! end_temporary_allocation (); function_type1 = make_node (FUNCTION_TYPE); function_type2 = make_node (FUNCTION_TYPE); ! pop_obstacks (); } ! /* Install argument types; normally set by build_function_type. */ TYPE_ARG_TYPES (function_type1) = get_arg_type_list (proto1, METHOD_REF, 0); TYPE_ARG_TYPES (function_type2) = get_arg_type_list (proto2, METHOD_REF, 0); ! /* Install return type. */ TREE_TYPE (function_type1) = groktypename (TREE_TYPE (proto1)); TREE_TYPE (function_type2) = groktypename (TREE_TYPE (proto2)); *************** *** 6527,6535 **** } ! /* - generate an identifier for the function. the format is "_n_cls", where 1 <= n <= nMethods, and cls is the name the implementation we are processing. ! - install the return type from the method declaration. ! - if we have a prototype, check for type consistency. */ static void --- 6917,6925 ---- } ! /* - Generate an identifier for the function. the format is "_n_cls", where 1 <= n <= nMethods, and cls is the name the implementation we are processing. ! - Install the return type from the method declaration. ! - If we have a prototype, check for type consistency. */ static void *************** *** 6541,6546 **** char *buf, *sel_name, *class_name, *cat_name; ! /* synth the storage class & assemble the return type */ ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ret_spec = TREE_PURPOSE (TREE_TYPE (method)); decl_specs = chainon (sc_spec, ret_spec); --- 6931,6936 ---- char *buf, *sel_name, *class_name, *cat_name; ! /* Synth the storage class & assemble the return type. */ ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ret_spec = TREE_PURPOSE (TREE_TYPE (method)); decl_specs = chainon (sc_spec, ret_spec); *************** *** 6553,6556 **** --- 6943,6947 ---- : IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); method_slot++; + /* Make sure this is big enough for any plausible method label. */ buf = (char *) alloca (50 + strlen (sel_name) + strlen (class_name) *************** *** 6562,6571 **** method_id = get_identifier (buf); ! method_decl = build_nt (CALL_EXPR, method_id, parmlist, NULLT); ! /* check the declarator portion of the return type for the method */ if ((ret_decl = TREE_VALUE (TREE_TYPE (method)))) { ! /* unite the complex decl (specified in the abstract decl) with the function decl just synthesized..(int *), (int (*)()), (int (*)[]). */ tree save_expr = expr_last (ret_decl); --- 6953,6962 ---- method_id = get_identifier (buf); ! method_decl = build_nt (CALL_EXPR, method_id, parmlist, NULL_TREE); ! /* Check the declarator portion of the return type for the method. */ if ((ret_decl = TREE_VALUE (TREE_TYPE (method)))) { ! /* Unite the complex decl (specified in the abstract decl) with the function decl just synthesized..(int *), (int (*)()), (int (*)[]). */ tree save_expr = expr_last (ret_decl); *************** *** 6573,6594 **** TREE_OPERAND (save_expr, 0) = method_decl; method_decl = ret_decl; ! /* fool the parser into thinking it is starting a function */ ! start_function (decl_specs, method_decl, 0); ! /* unhook...this has the effect of restoring the abstract declarator */ ! TREE_OPERAND (save_expr, 0) = NULLT; } else { TREE_VALUE (TREE_TYPE (method)) = method_decl; ! /* fool the parser into thinking it is starting a function */ ! start_function (decl_specs, method_decl, 0); ! /* unhook...this has the effect of restoring the abstract declarator */ ! TREE_VALUE (TREE_TYPE (method)) = NULLT; } METHOD_DEFINITION (method) = current_function_decl; - /* Check consistency...start_function, pushdecl, duplicate_decls. */ - if (implementation_template != implementation_context) { --- 6964,6988 ---- TREE_OPERAND (save_expr, 0) = method_decl; method_decl = ret_decl; ! ! /* Fool the parser into thinking it is starting a function. */ ! start_function (decl_specs, method_decl, NULL_TREE, NULL_TREE, 0); ! ! /* Unhook: this has the effect of restoring the abstract declarator. */ ! TREE_OPERAND (save_expr, 0) = NULL_TREE; } + else { TREE_VALUE (TREE_TYPE (method)) = method_decl; ! ! /* Fool the parser into thinking it is starting a function. */ ! start_function (decl_specs, method_decl, NULL_TREE, NULL_TREE, 0); ! ! /* Unhook: this has the effect of restoring the abstract declarator. */ ! TREE_VALUE (TREE_TYPE (method)) = NULL_TREE; } METHOD_DEFINITION (method) = current_function_decl; if (implementation_template != implementation_context) { *************** *** 6632,6640 **** self_decl = TREE_PURPOSE (parmlist); ! poplevel (0, 0, 0); /* must be called BEFORE start_function. */ ! really_start_method (method_context, parmlist); ! ! store_parm_decls (); /* must be called AFTER start_function. */ } --- 7026,7032 ---- self_decl = TREE_PURPOSE (parmlist); ! poplevel (0, 0, 0); really_start_method (method_context, parmlist); ! store_parm_decls (); } *************** *** 6647,6658 **** { UOBJC_SUPER_decl = start_decl (get_identifier (UTAG_SUPER), ! build_tree_list (NULLT, objc_super_template), ! 0); ! finish_decl (UOBJC_SUPER_decl, NULLT, NULLT); ! /* this prevents `unused variable' warnings when compiling with -Wall. */ ! DECL_IN_SYSTEM_HEADER (UOBJC_SUPER_decl) = 1; } } --- 7039,7051 ---- { UOBJC_SUPER_decl = start_decl (get_identifier (UTAG_SUPER), ! build_tree_list (NULL_TREE, objc_super_template), ! 0, NULL_TREE, NULL_TREE); ! finish_decl (UOBJC_SUPER_decl, NULL_TREE, NULL_TREE); ! /* This prevents `unused variable' warnings when compiling with -Wall. */ ! TREE_USED (UOBJC_SUPER_decl) = 1; ! DECL_ARTIFICIAL (UOBJC_SUPER_decl) = 1; } } *************** *** 6671,6680 **** tree super_expr, super_expr_list; ! /* set receiver to self */ super_expr = build_component_ref (UOBJC_SUPER_decl, self_id); super_expr = build_modify_expr (super_expr, NOP_EXPR, self_decl); ! super_expr_list = build_tree_list (NULLT, super_expr); ! /* set class to begin searching */ super_expr = build_component_ref (UOBJC_SUPER_decl, get_identifier ("class")); --- 7064,7073 ---- tree super_expr, super_expr_list; ! /* Set receiver to self. */ super_expr = build_component_ref (UOBJC_SUPER_decl, self_id); super_expr = build_modify_expr (super_expr, NOP_EXPR, self_decl); ! super_expr_list = build_tree_list (NULL_TREE, super_expr); ! /* Set class to begin searching. */ super_expr = build_component_ref (UOBJC_SUPER_decl, get_identifier ("class")); *************** *** 6691,6700 **** : uucls_super_ref)); } ! else /* we have a category... */ { tree super_name = CLASS_SUPER_NAME (implementation_template); tree super_class; ! if (!super_name) /* Barf if super used in a category of Object. */ { error ("no super class declared in interface for `%s'", --- 7084,7095 ---- : uucls_super_ref)); } ! ! else ! /* We have a category. */ { tree super_name = CLASS_SUPER_NAME (implementation_template); tree super_class; ! if (!super_name) { error ("no super class declared in interface for `%s'", *************** *** 6720,6732 **** = build_function_call (super_class, ! build_tree_list (NULLT, ! my_build_string (IDENTIFIER_LENGTH (super_name) + 1, ! IDENTIFIER_POINTER (super_name)))); } - /* cast! */ TREE_TYPE (super_class) = TREE_TYPE (ucls_super_ref); super_expr = build_modify_expr (super_expr, NOP_EXPR, super_class); } chainon (super_expr_list, build_tree_list (NULL_TREE, super_expr)); --- 7115,7128 ---- = build_function_call (super_class, ! build_tree_list ! (NULL_TREE, ! my_build_string (IDENTIFIER_LENGTH (super_name) + 1, ! IDENTIFIER_POINTER (super_name)))); } TREE_TYPE (super_class) = TREE_TYPE (ucls_super_ref); super_expr = build_modify_expr (super_expr, NOP_EXPR, super_class); } + chainon (super_expr_list, build_tree_list (NULL_TREE, super_expr)); *************** *** 6753,6761 **** tree result; ! /* return type */ encode_type (TREE_TYPE (TREE_TYPE (func_decl)), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* stack size */ for (parms = DECL_ARGUMENTS (func_decl); parms; parms = TREE_CHAIN (parms)) --- 7149,7158 ---- tree result; ! /* Return type. */ encode_type (TREE_TYPE (TREE_TYPE (func_decl)), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! ! /* Stack size. */ for (parms = DECL_ARGUMENTS (func_decl); parms; parms = TREE_CHAIN (parms)) *************** *** 6774,6790 **** obstack_grow (&util_obstack, buffer, strlen (buffer)); ! /* argument types */ for (parms = DECL_ARGUMENTS (func_decl); parms; parms = TREE_CHAIN (parms)) { ! /* type */ encode_type (TREE_TYPE (parms), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* compute offset */ sprintf (buffer, "%d", forwarding_offset (parms)); ! /* indicate register */ if (offset_is_register) obstack_1grow (&util_obstack, '+'); --- 7171,7187 ---- obstack_grow (&util_obstack, buffer, strlen (buffer)); ! /* Argument types. */ for (parms = DECL_ARGUMENTS (func_decl); parms; parms = TREE_CHAIN (parms)) { ! /* Type. */ encode_type (TREE_TYPE (parms), obstack_object_size (&util_obstack), OBJC_ENCODE_INLINE_DEFS); ! /* Compute offset. */ sprintf (buffer, "%d", forwarding_offset (parms)); ! /* Indicate register. */ if (offset_is_register) obstack_1grow (&util_obstack, '+'); *************** *** 6793,6797 **** } ! obstack_1grow (&util_obstack, 0); /* null terminate string */ result = get_identifier (obstack_finish (&util_obstack)); obstack_free (&util_obstack, util_firstobj); --- 7190,7194 ---- } ! obstack_1grow (&util_obstack, 0); result = get_identifier (obstack_finish (&util_obstack)); obstack_free (&util_obstack, util_firstobj); *************** *** 6806,6812 **** finish_function (0); ! /* this must be done AFTER finish_function, since the optimizer may ! find "may be used before set" errors. */ ! method_context = NULLT; /* required to implement _msgSuper. */ } --- 7203,7209 ---- finish_function (0); ! /* Required to implement _msgSuper. This must be done AFTER finish_function, ! since the optimizer may find "may be used before set" errors. */ ! method_context = NULL_TREE; } *************** *** 6821,6824 **** --- 7218,7222 ---- return 1; } + else return 0; *************** *** 6855,6858 **** --- 7253,7257 ---- strcat (str, "[]"); } + else if (code == ARRAY_TYPE) { *************** *** 6867,6870 **** --- 7266,7270 ---- strcat (str, "[]"); } + else if (code == CALL_EXPR) { *************** *** 6881,6887 **** strcat (str, ")"); } else if (code == FUNCTION_TYPE) { ! tree chain = TYPE_ARG_TYPES (decl); /* a list of types */ strcat (str, "("); --- 7281,7288 ---- strcat (str, ")"); } + else if (code == FUNCTION_TYPE) { ! tree chain = TYPE_ARG_TYPES (decl); strcat (str, "("); *************** *** 6895,6898 **** --- 7296,7300 ---- strcat (str, ")"); } + else if (code == INDIRECT_REF) { *************** *** 6918,6921 **** --- 7320,7324 ---- strcpy (str, tmpbuf); } + else if (code == POINTER_TYPE) { *************** *** 6955,6959 **** op = TREE_OPERAND (decl, 0); ! /* we have a pointer to a function or array...(*)(), (*)[] */ if ((code == ARRAY_REF || code == CALL_EXPR) && op && TREE_CODE (op) == INDIRECT_REF) --- 7358,7362 ---- op = TREE_OPERAND (decl, 0); ! /* We have a pointer to a function or array...(*)(), (*)[] */ if ((code == ARRAY_REF || code == CALL_EXPR) && op && TREE_CODE (op) == INDIRECT_REF) *************** *** 6979,6991 **** str = buf; ! /* this clause is done iteratively...rather than recursively */ do { op = (is_complex_decl (TREE_TYPE (decl)) ! ? TREE_TYPE (decl) : NULLT); adorn_decl (decl, str); ! /* we have a pointer to a function or array...(*)(), (*)[] */ if (code == POINTER_TYPE && op && (TREE_CODE (op) == FUNCTION_TYPE --- 7382,7394 ---- str = buf; ! /* This clause is done iteratively rather than recursively. */ do { op = (is_complex_decl (TREE_TYPE (decl)) ! ? TREE_TYPE (decl) : NULL_TREE); adorn_decl (decl, str); ! /* We have a pointer to a function or array...(*)(), (*)[] */ if (code == POINTER_TYPE && op && (TREE_CODE (op) == FUNCTION_TYPE *************** *** 6999,7010 **** decl = (is_complex_decl (TREE_TYPE (decl)) ! ? TREE_TYPE (decl) : NULLT); } ! while (decl && (code = TREE_CODE (decl))); break; case IDENTIFIER_NODE: ! /* will only happen if we are processing a "raw" expr-decl. */ strcpy (buf, IDENTIFIER_POINTER (decl)); return buf; --- 7402,7415 ---- decl = (is_complex_decl (TREE_TYPE (decl)) ! ? TREE_TYPE (decl) : NULL_TREE); } ! ! while (decl && (code = TREE_CODE (decl))) ! ; break; case IDENTIFIER_NODE: ! /* Will only happen if we are processing a "raw" expr-decl. */ strcpy (buf, IDENTIFIER_POINTER (decl)); return buf; *************** *** 7013,7017 **** return str; } ! else /* we have an abstract declarator or a _DECL node */ { strcpy (buf, name); --- 7418,7424 ---- return str; } ! ! else ! /* We have an abstract declarator or a _DECL node. */ { strcpy (buf, name); *************** *** 7055,7059 **** while (chain) { ! strcat (buf, IDENTIFIER_POINTER (PROTOCOL_NAME (TREE_VALUE (chain)))); chain = TREE_CHAIN (chain); if (chain) --- 7462,7468 ---- while (chain) { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); chain = TREE_CHAIN (chain); if (chain) *************** *** 7063,7069 **** --- 7472,7480 ---- } } + else strcat (buf, "untagged struct"); } + else if (TREE_CODE (aspec) == UNION_TYPE) { *************** *** 7077,7080 **** --- 7488,7492 ---- strcat (buf, "untagged union"); } + else if (TREE_CODE (aspec) == ENUMERAL_TYPE) { *************** *** 7088,7096 **** strcat (buf, "untagged enum"); } else if (TREE_CODE (aspec) == TYPE_DECL && DECL_NAME (aspec)) ! { ! strcat (buf, IDENTIFIER_POINTER (DECL_NAME (aspec))); ! } ! /* NEW!!! */ else if (IS_ID (aspec)) { --- 7500,7507 ---- strcat (buf, "untagged enum"); } + else if (TREE_CODE (aspec) == TYPE_DECL && DECL_NAME (aspec)) ! strcat (buf, IDENTIFIER_POINTER (DECL_NAME (aspec))); ! else if (IS_ID (aspec)) { *************** *** 7105,7109 **** while (chain) { ! strcat (buf, IDENTIFIER_POINTER (PROTOCOL_NAME (TREE_VALUE (chain)))); chain = TREE_CHAIN (chain); if (chain) --- 7516,7522 ---- while (chain) { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); chain = TREE_CHAIN (chain); if (chain) *************** *** 7119,7183 **** else { ! /* type qualifiers */ ! if (TREE_READONLY (declspecs)) ! strcat (buf, "const "); ! if (TYPE_VOLATILE (declspecs)) ! strcat (buf, "volatile "); ! switch (TREE_CODE (declspecs)) ! { ! /* type specifiers */ ! case INTEGER_TYPE: /* signed integer types */ ! declspecs = TYPE_MAIN_VARIANT (declspecs); ! if (declspecs == short_integer_type_node) /* 's' */ ! strcat (buf, "short int "); ! else if (declspecs == integer_type_node) /* 'i' */ ! strcat (buf, "int "); ! else if (declspecs == long_integer_type_node) /* 'l' */ ! strcat (buf, "long int "); ! else if (declspecs == long_long_integer_type_node) /* 'l' */ ! strcat (buf, "long long int "); ! else if (declspecs == signed_char_type_node /* 'c' */ ! || declspecs == char_type_node) ! strcat (buf, "char "); ! ! /* unsigned integer types */ ! ! else if (declspecs == short_unsigned_type_node) /* 'S' */ ! strcat (buf, "unsigned short "); ! else if (declspecs == unsigned_type_node) /* 'I' */ ! strcat (buf, "unsigned int "); ! else if (declspecs == long_unsigned_type_node) /* 'L' */ ! strcat (buf, "unsigned long "); ! else if (declspecs == long_long_unsigned_type_node) /* 'L' */ ! strcat (buf, "unsigned long long "); ! else if (declspecs == unsigned_char_type_node) /* 'C' */ ! strcat (buf, "unsigned char "); ! break; ! case REAL_TYPE: /* floating point types */ ! declspecs = TYPE_MAIN_VARIANT (declspecs); ! if (declspecs == float_type_node) /* 'f' */ ! strcat (buf, "float "); ! else if (declspecs == double_type_node) /* 'd' */ ! strcat (buf, "double "); ! else if (declspecs == long_double_type_node) /* 'd' */ ! strcat (buf, "long double "); ! break; ! case RECORD_TYPE: ! if (TYPE_NAME (declspecs) ! && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) { tree protocol_list = TYPE_PROTOCOL_LIST (declspecs); ! if (! TREE_STATIC_TEMPLATE (declspecs)) ! strcat (buf, "struct "); ! strcat (buf, IDENTIFIER_POINTER (TYPE_NAME (declspecs))); ! /* NEW!!! */ if (protocol_list) { --- 7532,7656 ---- else { ! /* Type qualifiers. */ ! if (TREE_READONLY (declspecs)) ! strcat (buf, "const "); ! if (TYPE_VOLATILE (declspecs)) ! strcat (buf, "volatile "); ! ! switch (TREE_CODE (declspecs)) ! { ! /* Type specifiers. */ ! ! case INTEGER_TYPE: ! declspecs = TYPE_MAIN_VARIANT (declspecs); ! ! /* Signed integer types. */ ! ! if (declspecs == short_integer_type_node) ! strcat (buf, "short int "); ! else if (declspecs == integer_type_node) ! strcat (buf, "int "); ! else if (declspecs == long_integer_type_node) ! strcat (buf, "long int "); ! else if (declspecs == long_long_integer_type_node) ! strcat (buf, "long long int "); ! else if (declspecs == signed_char_type_node ! || declspecs == char_type_node) ! strcat (buf, "char "); ! ! /* Unsigned integer types. */ ! ! else if (declspecs == short_unsigned_type_node) ! strcat (buf, "unsigned short "); ! else if (declspecs == unsigned_type_node) ! strcat (buf, "unsigned int "); ! else if (declspecs == long_unsigned_type_node) ! strcat (buf, "unsigned long "); ! else if (declspecs == long_long_unsigned_type_node) ! strcat (buf, "unsigned long long "); ! else if (declspecs == unsigned_char_type_node) ! strcat (buf, "unsigned char "); ! break; ! case REAL_TYPE: ! declspecs = TYPE_MAIN_VARIANT (declspecs); ! if (declspecs == float_type_node) ! strcat (buf, "float "); ! else if (declspecs == double_type_node) ! strcat (buf, "double "); ! else if (declspecs == long_double_type_node) ! strcat (buf, "long double "); ! break; ! case RECORD_TYPE: ! if (TYPE_NAME (declspecs) ! && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) ! { ! tree protocol_list = TYPE_PROTOCOL_LIST (declspecs); ! if (! TREE_STATIC_TEMPLATE (declspecs)) ! strcat (buf, "struct "); ! strcat (buf, IDENTIFIER_POINTER (TYPE_NAME (declspecs))); ! if (protocol_list) ! { ! tree chain = protocol_list; ! strcat (buf, " <"); ! while (chain) ! { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); ! chain = TREE_CHAIN (chain); ! if (chain) ! strcat (buf, ", "); ! } ! strcat (buf, ">"); ! } ! } ! else ! strcat (buf, "untagged struct"); ! ! strcat (buf, " "); ! break; ! ! case UNION_TYPE: ! if (TYPE_NAME (declspecs) ! && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) ! { ! strcat (buf, "union "); ! strcat (buf, IDENTIFIER_POINTER (TYPE_NAME (declspecs))); ! strcat (buf, " "); ! } ! ! else ! strcat (buf, "untagged union "); ! break; ! ! case ENUMERAL_TYPE: ! if (TYPE_NAME (declspecs) ! && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) ! { ! strcat (buf, "enum "); ! strcat (buf, IDENTIFIER_POINTER (TYPE_NAME (declspecs))); ! strcat (buf, " "); ! } ! ! else ! strcat (buf, "untagged enum "); ! break; ! ! case VOID_TYPE: ! strcat (buf, "void "); ! break; ! ! case POINTER_TYPE: { tree protocol_list = TYPE_PROTOCOL_LIST (declspecs); ! strcat (buf, "id"); if (protocol_list) { *************** *** 7187,7254 **** while (chain) { ! strcat (buf, IDENTIFIER_POINTER (PROTOCOL_NAME (TREE_VALUE (chain)))); chain = TREE_CHAIN (chain); if (chain) strcat (buf, ", "); } strcat (buf, ">"); } } - else - strcat (buf, "untagged struct"); - - strcat (buf, " "); - break; - - case UNION_TYPE: - if (TYPE_NAME (declspecs) - && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) - { - strcat (buf, "union "); - strcat (buf, IDENTIFIER_POINTER (TYPE_NAME (declspecs))); - strcat (buf, " "); - } - else - strcat (buf, "untagged union "); - break; - - case ENUMERAL_TYPE: - if (TYPE_NAME (declspecs) - && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) - { - strcat (buf, "enum "); - strcat (buf, IDENTIFIER_POINTER (TYPE_NAME (declspecs))); - strcat (buf, " "); - } - else - strcat (buf, "untagged enum "); - break; - - case VOID_TYPE: - strcat (buf, "void "); - break; - - /* NEW!!! */ - case POINTER_TYPE: - { - tree protocol_list = TYPE_PROTOCOL_LIST (declspecs); - - strcat (buf, "id"); - if (protocol_list) - { - tree chain = protocol_list; - - strcat (buf, " <"); - while (chain) - { - strcat (buf, IDENTIFIER_POINTER (PROTOCOL_NAME (TREE_VALUE (chain)))); - chain = TREE_CHAIN (chain); - if (chain) - strcat (buf, ", "); - } - strcat (buf, ">"); - } } - } } } --- 7660,7675 ---- while (chain) { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); chain = TREE_CHAIN (chain); if (chain) strcat (buf, ", "); } + strcat (buf, ">"); } } } } } *************** *** 7266,7270 **** tree declarator; /* "array_ref", "indirect_ref", "call_expr"... */ ! /* we have a "raw", abstract declarator (typename) */ declarator = TREE_VALUE (atype_or_adecl); declspecs = TREE_PURPOSE (atype_or_adecl); --- 7687,7691 ---- tree declarator; /* "array_ref", "indirect_ref", "call_expr"... */ ! /* We have a "raw", abstract declarator (typename). */ declarator = TREE_VALUE (atype_or_adecl); declspecs = TREE_PURPOSE (atype_or_adecl); *************** *** 7277,7280 **** --- 7698,7702 ---- } } + else { *************** *** 7288,7292 **** atype = TREE_TYPE (atype_or_adecl); else ! atype = atype_or_adecl; /* assume we have a *_type node */ if (is_complex_decl (atype)) --- 7710,7715 ---- atype = TREE_TYPE (atype_or_adecl); else ! /* Assume we have a *_type node. */ ! atype = atype_or_adecl; if (is_complex_decl (atype)) *************** *** 7294,7298 **** tree chain; ! /* get the declaration specifier...it is at the end of the list */ declarator = chain = atype; do --- 7717,7721 ---- tree chain; ! /* Get the declaration specifier; it is at the end of the list. */ declarator = chain = atype; do *************** *** 7301,7308 **** declspecs = chain; } else { declspecs = atype; ! declarator = NULLT; } --- 7724,7732 ---- declspecs = chain; } + else { declspecs = atype; ! declarator = NULL_TREE; } *************** *** 7322,7325 **** --- 7746,7750 ---- strcat (buf, gen_declarator (declarator, declbuf, decl_name)); } + else if (decl_name[0]) { *************** *** 7334,7337 **** --- 7759,7763 ---- } } + return buf; } *************** *** 7355,7359 **** chain = METHOD_SEL_ARGS (method); if (chain) ! { /* we have a chain of keyword_decls */ do { --- 7781,7786 ---- chain = METHOD_SEL_ARGS (method); if (chain) ! { ! /* We have a chain of keyword_decls. */ do { *************** *** 7368,7371 **** --- 7795,7799 ---- strcat (buf, ")"); } + strcat (buf, IDENTIFIER_POINTER (KEYWORD_ARG_NAME (chain))); if ((chain = TREE_CHAIN (chain))) *************** *** 7378,7384 **** else if (METHOD_ADD_ARGS (method)) { ! /* we have a tree list node as generate by get_parm_info. */ chain = TREE_PURPOSE (METHOD_ADD_ARGS (method)); ! /* know we have a chain of parm_decls */ while (chain) { --- 7806,7813 ---- else if (METHOD_ADD_ARGS (method)) { ! /* We have a tree list node as generate by get_parm_info. */ chain = TREE_PURPOSE (METHOD_ADD_ARGS (method)); ! ! /* Know we have a chain of parm_decls. */ while (chain) { *************** *** 7389,7399 **** } } ! else /* we have a unary selector */ strcat (buf, IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); return buf; } ! ! /* debug info... */ static void --- 7818,7830 ---- } } ! ! else ! /* We have a unary selector. */ strcat (buf, IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); return buf; } ! ! /* Debug info. */ static void *************** *** 7534,7538 **** generate_protocols (); ! if (implementation_context || class_names_chain || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) { --- 7965,7972 ---- generate_protocols (); ! if (objc_static_instances) ! generate_static_references (); ! ! if (implementation_context || class_names_chain || objc_static_instances || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) { *************** *** 7543,7550 **** } ! /* dump the class references...this forces the appropriate classes to be linked into the executable image, preserving unix archive ! semantics...this can be removed when we move to a more dynamically linked environment. */ for (chain = cls_ref_chain; chain; chain = TREE_CHAIN (chain)) { --- 7977,7985 ---- } ! /* Dump the class references. This forces the appropriate classes to be linked into the executable image, preserving unix archive ! semantics. This can be removed when we move to a more dynamically linked environment. */ + for (chain = cls_ref_chain; chain; chain = TREE_CHAIN (chain)) { *************** *** 7557,7561 **** handle_impent (impent); ! /* dump the string table last */ generate_strings (); --- 7992,7996 ---- handle_impent (impent); ! /* Dump the string table last. */ generate_strings (); *************** *** 7627,7640 **** name = DECL_NAME (TREE_PURPOSE (chain)); ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_STATIC]); /* static struct objc_class * _OBJC_CLASS_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULLT, type, sc_spec); ! /* the `decl' that is returned from start_decl is the one that we ! forward declared in `build_class_reference'. */ ! decl = start_decl (name, decl_specs, 1); ! end_temporary_allocation (); ! finish_decl (decl, expr, NULLT); return; } --- 8062,8074 ---- name = DECL_NAME (TREE_PURPOSE (chain)); ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); /* static struct objc_class * _OBJC_CLASS_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); ! /* The decl that is returned from start_decl is the one that we ! forward declared in build_class_reference. */ ! decl = start_decl (name, decl_specs, 1, NULL_TREE, NULL_TREE); ! finish_decl (decl, expr, NULL_TREE); return; } *************** *** 7710,7713 **** --- 8144,8148 ---- assemble_asm (my_build_string (strlen (string) + 1, string)); } + else { *************** *** 7718,7721 **** --- 8153,8157 ---- } } + else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE) { *************** *** 7740,7743 **** --- 8176,8180 ---- assemble_asm (my_build_string (strlen (string) + 1, string)); } + else { *************** *** 7767,7771 **** if (TREE_CODE (loop) == FUNCTION_DECL && DECL_INITIAL (loop)) { ! /* we have a function definition - generate prototype */ bzero (errbuf, BUFSIZE); gen_declaration (loop, errbuf); --- 8204,8208 ---- if (TREE_CODE (loop) == FUNCTION_DECL && DECL_INITIAL (loop)) { ! /* We have a function definition: generate prototype. */ bzero (errbuf, BUFSIZE); gen_declaration (loop, errbuf); *************** *** 7775,7779 **** } } ! { /* dump global chains */ tree loop; int i, index = 0, offset = 0; --- 8212,8217 ---- } } ! { ! /* Dump global chains. */ tree loop; int i, index = 0, offset = 0; *************** *** 7794,7797 **** --- 8232,8236 ---- } } + for (i = 0; i < SIZEHASHTABLE; i++) { *************** *** 7808,7811 **** --- 8247,8251 ---- } } + fprintf (fp, "\nsel_refdef_chain:\n"); for (loop = sel_refdef_chain; loop; loop = TREE_CHAIN (loop)) *************** *** 7817,7820 **** --- 8257,8261 ---- offset += IDENTIFIER_LENGTH (TREE_VALUE (loop)) + 1; } + fprintf (fp, "\n (max_selector_index: %4d.\n", max_selector_index); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc-act.h gcc-2.7.0/objc-act.h *** gcc-2.6.3/objc-act.h Mon Apr 12 19:48:43 1993 --- gcc-2.7.0/objc-act.h Thu Jun 15 07:53:58 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 23,27 **** /* used by yyparse */ ! void objc_finish PROTO((void)); tree start_class PROTO((enum tree_code, tree, tree, tree)); tree continue_class PROTO((tree)); --- 24,28 ---- /* used by yyparse */ ! void finish_file PROTO((void)); tree start_class PROTO((enum tree_code, tree, tree, tree)); tree continue_class PROTO((tree)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/objc-tree.def gcc-2.7.0/objc-tree.def *** gcc-2.6.3/objc-tree.def Fri Apr 9 19:02:39 1993 --- gcc-2.7.0/objc-tree.def Thu Jun 15 07:54:42 1995 *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/optabs.c gcc-2.7.0/optabs.c *** gcc-2.6.3/optabs.c Tue Nov 29 16:51:18 1994 --- gcc-2.7.0/optabs.c Thu Jun 15 07:55:15 1995 *************** *** 1,4 **** /* Expand the basic unary and binary arithmetic operations, for GNU compiler. ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Expand the basic unary and binary arithmetic operations, for GNU compiler. ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 212,215 **** --- 213,225 ---- enum insn_code setcc_gen_code[NUM_RTX_CODE]; + #ifdef HAVE_conditional_move + /* Indexed by the machine mode, gives the insn code to make a conditional + move insn. This is not indexed by the rtx-code like bcc_gen_fctn and + setcc_gen_code to cut down on the number of named patterns. Consider a day + when a lot more rtx codes are conditional (eg: for the ARM). */ + + enum insn_code movcc_gen_code[NUM_MACHINE_MODES]; + #endif + static int add_equal_note PROTO((rtx, rtx, enum rtx_code, rtx, rtx)); static rtx widen_operand PROTO((rtx, enum machine_mode, *************** *** 381,386 **** if (CONSTANT_P (op1) && preserve_subexpressions_p () ! && rtx_cost (op1, binoptab->code) > 2) ! op1 = force_reg (shift_op ? word_mode : mode, op1); /* Record where to delete back to if we backtrack. */ --- 391,396 ---- if (CONSTANT_P (op1) && preserve_subexpressions_p () ! && ! shift_op && rtx_cost (op1, binoptab->code) > 2) ! op1 = force_reg (mode, op1); /* Record where to delete back to if we backtrack. */ *************** *** 446,454 **** if (GET_MODE (op0) != VOIDmode ! && GET_MODE (op0) != mode0) xop0 = convert_to_mode (mode0, xop0, unsignedp); if (GET_MODE (xop1) != VOIDmode ! && GET_MODE (xop1) != mode1) xop1 = convert_to_mode (mode1, xop1, unsignedp); --- 456,466 ---- if (GET_MODE (op0) != VOIDmode ! && GET_MODE (op0) != mode0 ! && mode0 != VOIDmode) xop0 = convert_to_mode (mode0, xop0, unsignedp); if (GET_MODE (xop1) != VOIDmode ! && GET_MODE (xop1) != mode1 ! && mode1 != VOIDmode) xop1 = convert_to_mode (mode1, xop1, unsignedp); *************** *** 456,463 **** pseudo regs. */ ! if (! (*insn_operand_predicate[icode][1]) (xop0, mode0)) xop0 = copy_to_mode_reg (mode0, xop0); ! if (! (*insn_operand_predicate[icode][2]) (xop1, mode1)) xop1 = copy_to_mode_reg (mode1, xop1); --- 468,477 ---- pseudo regs. */ ! if (! (*insn_operand_predicate[icode][1]) (xop0, mode0) ! && mode0 != VOIDmode) xop0 = copy_to_mode_reg (mode0, xop0); ! if (! (*insn_operand_predicate[icode][2]) (xop1, mode1) ! && mode1 != VOIDmode) xop1 = copy_to_mode_reg (mode1, xop1); *************** *** 1035,1039 **** /* If the target is the same as one of the inputs, don't use it. This prevents problems with the REG_EQUAL note. */ ! if (target == op0 || target == op1) target = 0; --- 1049,1054 ---- /* If the target is the same as one of the inputs, don't use it. This prevents problems with the REG_EQUAL note. */ ! if (target == op0 || target == op1 ! || (target != 0 && GET_CODE (target) != REG)) target = 0; *************** *** 1500,1504 **** } ! if (GET_MODE (op0) != mode) op0 = convert_to_mode (mode, op0, unsignedp); --- 1515,1520 ---- } ! if (GET_MODE (op0) != VOIDmode ! && GET_MODE (op0) != mode) op0 = convert_to_mode (mode, op0, unsignedp); *************** *** 2042,2045 **** --- 2058,2072 ---- } + /* If there is no negate operation, try doing a subtract from zero. + The US Software GOFAST library needs this. */ + if (unoptab == neg_optab) + { + rtx temp; + temp = expand_binop (mode, sub_optab, CONST0_RTX (mode), op0, + target, unsignedp, OPTAB_LIB_WIDEN); + if (temp) + return temp; + } + return 0; } *************** *** 3036,3039 **** --- 3063,3208 ---- } + #ifdef HAVE_conditional_move + + /* Emit a conditional move instruction if the machine supports one for that + condition and machine mode. + + OP0 and OP1 are the operands that should be compared using CODE. CMODE is + the mode to use should they be constants. If it is VOIDmode, they cannot + both be constants. + + OP2 should be stored in TARGET if the comparison is true, otherwise OP3 + should be stored there. MODE is the mode to use should they be constants. + If it is VOIDmode, they cannot both be constants. + + The result is either TARGET (perhaps modified) or NULL_RTX if the operation + is not supported. */ + + rtx + emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode, + unsignedp) + rtx target; + enum rtx_code code; + rtx op0, op1; + enum machine_mode cmode; + rtx op2, op3; + enum machine_mode mode; + int unsignedp; + { + rtx tem, subtarget, comparison, insn; + enum insn_code icode; + + /* If one operand is constant, make it the second one. Only do this + if the other operand is not constant as well. */ + + if ((CONSTANT_P (op0) && ! CONSTANT_P (op1)) + || (GET_CODE (op0) == CONST_INT && GET_CODE (op1) != CONST_INT)) + { + tem = op0; + op0 = op1; + op1 = tem; + code = swap_condition (code); + } + + if (cmode == VOIDmode) + cmode = GET_MODE (op0); + + if ((CONSTANT_P (op2) && ! CONSTANT_P (op3)) + || (GET_CODE (op2) == CONST_INT && GET_CODE (op3) != CONST_INT)) + { + tem = op2; + op2 = op3; + op3 = tem; + /* ??? This may not be appropriate (consider IEEE). Perhaps we should + call can_reverse_comparison_p here and bail out if necessary. + It's not clear whether we need to do this canonicalization though. */ + code = reverse_condition (code); + } + + if (mode == VOIDmode) + mode = GET_MODE (op2); + + icode = movcc_gen_code[mode]; + + if (icode == CODE_FOR_nothing) + return 0; + + if (flag_force_mem) + { + op2 = force_not_mem (op2); + op3 = force_not_mem (op3); + } + + if (target) + target = protect_from_queue (target, 1); + else + target = gen_reg_rtx (mode); + + subtarget = target; + + emit_queue (); + + op2 = protect_from_queue (op2, 0); + op3 = protect_from_queue (op3, 0); + + /* If the insn doesn't accept these operands, put them in pseudos. */ + + if (! (*insn_operand_predicate[icode][0]) + (subtarget, insn_operand_mode[icode][0])) + subtarget = gen_reg_rtx (insn_operand_mode[icode][0]); + + if (! (*insn_operand_predicate[icode][2]) + (op2, insn_operand_mode[icode][2])) + op2 = copy_to_mode_reg (insn_operand_mode[icode][2], op2); + + if (! (*insn_operand_predicate[icode][3]) + (op3, insn_operand_mode[icode][3])) + op3 = copy_to_mode_reg (insn_operand_mode[icode][3], op3); + + /* Everything should now be in the suitable form, so emit the compare insn + and then the conditional move. */ + + comparison + = compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX, 0); + + /* ??? Watch for const0_rtx (nop) and const_true_rtx (unconditional)? */ + if (GET_CODE (comparison) != code) + /* This shouldn't happen. */ + abort (); + + insn = GEN_FCN (icode) (subtarget, comparison, op2, op3); + + /* If that failed, then give up. */ + if (insn == 0) + return 0; + + emit_insn (insn); + + if (subtarget != target) + convert_move (target, subtarget, 0); + + return target; + } + + /* Return non-zero if a conditional move of mode MODE is supported. + + This function is for combine so it can tell whether an insn that looks + like a conditional move is actually supported by the hardware. If we + guess wrong we lose a bit on optimization, but that's it. */ + /* ??? sparc64 supports conditionally moving integers values based on fp + comparisons, and vice versa. How do we handle them? */ + + int + can_conditionally_move_p (mode) + enum machine_mode mode; + { + if (movcc_gen_code[mode] != CODE_FOR_nothing) + return 1; + + return 0; + } + + #endif /* HAVE_conditional_move */ + /* These three functions generate an insn body and return it rather than emitting the insn. *************** *** 3756,3760 **** register int last_mode; register char *opname; ! register char suffix; { register int mode; --- 3925,3929 ---- register int last_mode; register char *opname; ! register int suffix; { register int mode; *************** *** 3794,3798 **** register optab optable; register char *opname; ! register char suffix; { init_libfuncs (optable, SImode, TImode, opname, suffix); --- 3963,3967 ---- register optab optable; register char *opname; ! register int suffix; { init_libfuncs (optable, SImode, TImode, opname, suffix); *************** *** 3808,3812 **** register optab optable; register char *opname; ! register char suffix; { init_libfuncs (optable, SFmode, TFmode, opname, suffix); --- 3977,3981 ---- register optab optable; register char *opname; ! register int suffix; { init_libfuncs (optable, SFmode, TFmode, opname, suffix); *************** *** 3822,3826 **** register optab optable; register char *opname; ! register char suffix; { init_libfuncs (optable, SCmode, TCmode, opname, suffix); --- 3991,3995 ---- register optab optable; register char *opname; ! register int suffix; { init_libfuncs (optable, SCmode, TCmode, opname, suffix); *************** *** 3861,3864 **** --- 4030,4038 ---- setcc_gen_code[i] = CODE_FOR_nothing; + #ifdef HAVE_conditional_move + for (i = 0; i < NUM_MACHINE_MODES; i++) + movcc_gen_code[i] = CODE_FOR_nothing; + #endif + add_optab = init_optab (PLUS); sub_optab = init_optab (MINUS); *************** *** 3971,3978 **** = gen_rtx (SYMBOL_REF, Pmode, MULDI3_LIBCALL); #endif - #ifdef MULTI3_LIBCALL - smul_optab->handlers[(int) TImode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, MULTI3_LIBCALL); - #endif #ifdef DIVSI3_LIBCALL --- 4145,4148 ---- *************** *** 3984,3991 **** = gen_rtx (SYMBOL_REF, Pmode, DIVDI3_LIBCALL); #endif - #ifdef DIVTI3_LIBCALL - sdiv_optab->handlers[(int) TImode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, DIVTI3_LIBCALL); - #endif #ifdef UDIVSI3_LIBCALL --- 4154,4157 ---- *************** *** 3997,4006 **** = gen_rtx (SYMBOL_REF, Pmode, UDIVDI3_LIBCALL); #endif - #ifdef UDIVTI3_LIBCALL - udiv_optab->handlers[(int) TImode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, UDIVTI3_LIBCALL); - #endif - #ifdef MODSI3_LIBCALL smod_optab->handlers[(int) SImode].libfunc --- 4163,4167 ---- *************** *** 4011,4020 **** = gen_rtx (SYMBOL_REF, Pmode, MODDI3_LIBCALL); #endif - #ifdef MODTI3_LIBCALL - smod_optab->handlers[(int) TImode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, MODTI3_LIBCALL); - #endif - #ifdef UMODSI3_LIBCALL umod_optab->handlers[(int) SImode].libfunc --- 4172,4176 ---- *************** *** 4025,4054 **** = gen_rtx (SYMBOL_REF, Pmode, UMODDI3_LIBCALL); #endif - #ifdef UMODTI3_LIBCALL - umod_optab->handlers[(int) TImode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, UMODTI3_LIBCALL); - #endif - - /* Define library calls for quad FP instructions */ - #ifdef ADDTF3_LIBCALL - add_optab->handlers[(int) TFmode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, ADDTF3_LIBCALL); - #endif - #ifdef SUBTF3_LIBCALL - sub_optab->handlers[(int) TFmode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, SUBTF3_LIBCALL); - #endif - #ifdef MULTF3_LIBCALL - smul_optab->handlers[(int) TFmode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, MULTF3_LIBCALL); - #endif - #ifdef DIVTF3_LIBCALL - flodiv_optab->handlers[(int) TFmode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, DIVTF3_LIBCALL); - #endif - #ifdef SQRTTF2_LIBCALL - sqrt_optab->handlers[(int) TFmode].libfunc - = gen_rtx (SYMBOL_REF, Pmode, SQRTTF2_LIBCALL); - #endif /* Use cabs for DC complex abs, since systems generally have cabs. --- 4181,4184 ---- *************** *** 4118,4141 **** letf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__letf2"); - /* Define library calls for quad FP instructions */ - #ifdef EQTF2_LIBCALL - eqtf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, EQTF2_LIBCALL); - #endif - #ifdef NETF2_LIBCALL - netf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, NETF2_LIBCALL); - #endif - #ifdef GTTF2_LIBCALL - gttf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, GTTF2_LIBCALL); - #endif - #ifdef GETF2_LIBCALL - getf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, GETF2_LIBCALL); - #endif - #ifdef LTTF2_LIBCALL - lttf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, LTTF2_LIBCALL); - #endif - #ifdef LETF2_LIBCALL - letf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, LETF2_LIBCALL); - #endif - floatsisf_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__floatsisf"); floatdisf_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__floatdisf"); --- 4248,4251 ---- *************** *** 4185,4211 **** fixunstfdi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__fixunstfdi"); fixunstfti_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__fixunstfti"); - - /* Define library calls for quad FP instructions */ - #ifdef TRUNCTFSF2_LIBCALL - trunctfsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, TRUNCTFSF2_LIBCALL); - #endif - #ifdef TRUNCTFDF2_LIBCALL - trunctfdf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, TRUNCTFDF2_LIBCALL); - #endif - #ifdef EXTENDSFTF2_LIBCALL - extendsftf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, EXTENDSFTF2_LIBCALL); - #endif - #ifdef EXTENDDFTF2_LIBCALL - extenddftf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, EXTENDDFTF2_LIBCALL); - #endif - #ifdef FLOATSITF2_LIBCALL - floatsitf_libfunc = gen_rtx (SYMBOL_REF, Pmode, FLOATSITF2_LIBCALL); - #endif - #ifdef FIX_TRUNCTFSI2_LIBCALL - fixtfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, FIX_TRUNCTFSI2_LIBCALL); - #endif - #ifdef FIXUNS_TRUNCTFSI2_LIBCALL - fixunstfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, FIXUNS_TRUNCTFSI2_LIBCALL); - #endif #ifdef INIT_TARGET_OPTABS --- 4295,4298 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/output.h gcc-2.7.0/output.h *** gcc-2.6.3/output.h Thu Apr 21 15:15:02 1994 --- gcc-2.7.0/output.h Thu Jun 15 07:55:44 1995 *************** *** 17,21 **** 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. */ /* Initialize data in final at the beginning of a compilation. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Initialize data in final at the beginning of a compilation. */ *************** *** 42,45 **** --- 43,47 ---- extern void init_insn_lengths PROTO((void)); + #ifdef RTX_CODE /* Obtain the current length of an insn. If branch shortening has been done, get its actual length. Otherwise, get its maximum length. */ *************** *** 113,124 **** available in leaf functions. */ extern void leaf_renumber_regs_insn PROTO((rtx)); ! /* Output a name (as found inside a symbol_ref) in assembler syntax. */ ! extern void assemble_name STDIO_PROTO((FILE *, char *)); /* When outputting assembler code, indicates which alternative of the constraints was actually satisfied. */ extern int which_alternative; /* When outputting delayed branch sequences, this rtx holds the sequence being output. It is null when no delayed branch --- 115,303 ---- available in leaf functions. */ extern void leaf_renumber_regs_insn PROTO((rtx)); + #endif ! /* Functions in varasm.c. */ + /* Tell assembler to switch to text section. */ + extern void text_section PROTO((void)); + + /* Tell assembler to switch to data section. */ + extern void data_section PROTO((void)); + + /* Tell assembler to switch to read-only data section. This is normally + the text section. */ + extern void readonly_data_section PROTO((void)); + + /* Determine if we're in the text section. */ + extern int in_text_section PROTO((void)); + + #ifdef TREE_CODE + /* Tell assembler to change to section NAME for DECL. + If DECL is NULL, just switch to section NAME. + If NAME is NULL, get the name from DECL. */ + extern void named_section PROTO((tree, char *)); + + /* Tell assembler to switch to the section for function DECL. */ + extern void function_section PROTO((tree)); + + /* Create the rtl to represent a function, for a function definition. + DECL is a FUNCTION_DECL node which describes which function. + The rtl is stored into DECL. */ + extern void make_function_rtl PROTO((tree)); + + /* Decode an `asm' spec for a declaration as a register name. + Return the register number, or -1 if nothing specified, + or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized, + or -3 if ASMSPEC is `cc' and is not recognized, + or -4 if ASMSPEC is `memory' and is not recognized. + Accept an exact spelling or a decimal number. + Prefixes such as % are optional. */ + extern int decode_reg_name PROTO((char *)); + + /* Create the DECL_RTL for a declaration for a static or external variable + or static or external function. + ASMSPEC, if not 0, is the string which the user specified + as the assembler symbol name. + TOP_LEVEL is nonzero if this is a file-scope variable. + + This is never called for PARM_DECL nodes. */ + extern void make_decl_rtl PROTO((tree, char *, int)); + + /* Make the rtl for variable VAR be volatile. + Use this only for static variables. */ + extern void make_var_volatile PROTO((tree)); + + /* Output alignment directive to align for constant expression EXP. */ + extern void assemble_constant_align PROTO((tree)); + + /* Output a string of literal assembler code + for an `asm' keyword used between functions. */ + extern void assemble_asm PROTO((tree)); + + /* Record an element in the table of global destructors. + How this is done depends on what sort of assembler and linker + are in use. + + NAME should be the name of a global function to be called + at exit time. This name is output using assemble_name. */ + extern void assemble_destructor PROTO((char *)); + + /* Likewise for global constructors. */ + extern void assemble_constructor PROTO((char *)); + + /* Likewise for entries we want to record for garbage collection. + Garbage collection is still under development. */ + extern void assemble_gc_entry PROTO((char *)); + + /* Output assembler code for the constant pool of a function and associated + with defining the name of the function. DECL describes the function. + NAME is the function's name. For the constant pool, we use the current + constant pool data. */ + extern void assemble_start_function PROTO((tree, char *)); + + /* Output assembler code associated with defining the size of the + function. DECL describes the function. NAME is the function's name. */ + extern void assemble_end_function PROTO((tree, char *)); + + /* Assemble code to leave SIZE bytes of zeros. */ + extern void assemble_zeros PROTO((int)); + + /* Assemble an alignment pseudo op for an ALIGN-bit boundary. */ + extern void assemble_align PROTO((int)); + + /* Assemble a string constant with the specified C string as contents. */ + extern void assemble_string PROTO((char *, int)); + /* Assemble everything that is needed for a variable or function declaration. + Not used for automatic variables, and not used for function definitions. + Should not be called for variables of incomplete structure type. + + TOP_LEVEL is nonzero if this variable has file scope. + AT_END is nonzero if this is the special handling, at end of compilation, + to define things that have had only tentative definitions. + DONT_OUTPUT_DATA if nonzero means don't actually output the + initial value (that will be done by the caller). */ + extern void assemble_variable PROTO((tree, int, int, int)); + + /* Output text storage for constructor CONSTR. */ + extern void bc_output_constructor PROTO((tree, int)); + + /* Create storage for constructor CONSTR. */ + extern void bc_output_data_constructor PROTO((tree)); + + /* Output something to declare an external symbol to the assembler. + (Most assemblers don't need this, so we normally output nothing.) + Do nothing if DECL is not external. */ + extern void assemble_external PROTO((tree)); + #endif + + #ifdef RTX_CODE + /* Similar, for calling a library function FUN. */ + extern void assemble_external_libcall PROTO((rtx)); + #endif + + /* Declare the label NAME global. */ + extern void assemble_global PROTO((char *)); + + /* Assemble a label named NAME. */ + extern void assemble_label PROTO((char *)); + + /* Output to FILE a reference to the assembler name of a C-level name NAME. + If NAME starts with a *, the rest of NAME is output verbatim. + Otherwise NAME is transformed in an implementation-defined way + (usually by the addition of an underscore). + Many macros in the tm file are defined to call this function. */ + extern void assemble_name STDIO_PROTO((FILE *, char *)); + + #ifdef RTX_CODE + /* Assemble the integer constant X into an object of SIZE bytes. + X must be either a CONST_INT or CONST_DOUBLE. + + Return 1 if we were able to output the constant, otherwise 0. If FORCE is + non-zero, abort if we can't output the constant. */ + extern int assemble_integer PROTO((rtx, int, int)); + + #ifdef EMUSHORT + /* Assemble the floating-point constant D into an object of size MODE. */ + extern void assemble_real PROTO((REAL_VALUE_TYPE, + enum machine_mode)); + #endif + #endif + + /* At the end of a function, forget the memory-constants + previously made for CONST_DOUBLEs. Mark them as not on real_constant_chain. + Also clear out real_constant_chain and clear out all the chain-pointers. */ + extern void clear_const_double_mem PROTO((void)); + + /* Start deferring output of subconstants. */ + extern void defer_addressed_constants PROTO((void)); + + /* Stop deferring output of subconstants, + and output now all those that have been deferred. */ + extern void output_deferred_addressed_constants PROTO((void)); + + /* Initialize constant pool hashing for next function. */ + extern void init_const_rtx_hash_table PROTO((void)); + + /* Return the size of the constant pool. */ + extern int get_pool_size PROTO((void)); + + #ifdef TREE_CODE + /* Write all the constants in the constant pool. */ + extern void output_constant_pool PROTO((char *, tree)); + + /* Output assembler code for constant EXP to FILE, with no label. + This includes the pseudo-op such as ".int" or ".byte", and a newline. + Assumes output_addressed_constants has been done on EXP already. + + Generate exactly SIZE bytes of assembler data, padding at the end + with zeros if necessary. SIZE must always be specified. */ + extern void output_constant PROTO((tree, int)); + #endif + /* When outputting assembler code, indicates which alternative of the constraints was actually satisfied. */ extern int which_alternative; + #ifdef RTX_CODE /* When outputting delayed branch sequences, this rtx holds the sequence being output. It is null when no delayed branch *************** *** 128,131 **** --- 307,311 ---- This variable is defined in final.c. */ extern rtx final_sequence; + #endif /* Number of bytes of args popped by function being compiled on its return. *************** *** 206,209 **** --- 386,390 ---- extern char *current_function_name; + #ifdef RTX_CODE /* If non-zero, an RTL expression for that location at which the current function returns its result. Usually equal to *************** *** 216,219 **** --- 397,401 ---- extern rtx current_function_epilogue_delay_list; + #endif /* Nonzero means generate position-independent code. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/pcp.h gcc-2.7.0/pcp.h *** gcc-2.6.3/pcp.h Sat Aug 1 22:55:28 1992 --- gcc-2.7.0/pcp.h Thu Jun 15 07:56:05 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/print-rtl.c gcc-2.7.0/print-rtl.c *** gcc-2.6.3/print-rtl.c Wed Jun 30 13:26:11 1993 --- gcc-2.7.0/print-rtl.c Thu Jun 15 07:56:24 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/print-tree.c gcc-2.7.0/print-tree.c *** gcc-2.6.3/print-tree.c Thu Aug 25 11:46:10 1994 --- gcc-2.7.0/print-tree.c Thu Jun 15 07:56:40 1995 *************** *** 1,4 **** /* Prints out tree in human readable form - GNU C-compiler ! Copyright (C) 1990, 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Prints out tree in human readable form - GNU C-compiler ! Copyright (C) 1990, 1991, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 373,377 **** if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node)) ! fputs (" supress-debug", file); if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) --- 374,378 ---- if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node)) ! fputs (" suppress-debug", file); if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) *************** *** 417,420 **** --- 418,422 ---- print_node (file, "size", DECL_SIZE (node), indent + 4); + print_node (file, "attributes", TYPE_ATTRIBUTES (node), indent + 4); indent_to (file, indent + 3); if (TREE_CODE (node) != FUNCTION_DECL) *************** *** 427,430 **** --- 429,433 ---- print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4); print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4); + print_node_brief (file, "machine_attributes", DECL_MACHINE_ATTRIBUTES (node), indent + 4); print_node_brief (file, "abstract_origin", DECL_ABSTRACT_ORIGIN (node), indent + 4); *************** *** 474,477 **** --- 477,482 ---- if (TYPE_TRANSPARENT_UNION (node)) fputs (" transparent-union", file); + if (TYPE_PACKED (node)) + fputs (" packed", file); if (TYPE_LANG_FLAG_0 (node)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/protoize.c gcc-2.7.0/protoize.c *** gcc-2.6.3/protoize.c Mon Nov 7 21:27:44 1994 --- gcc-2.7.0/protoize.c Thu Jun 15 07:57:09 1995 *************** *** 1,4 **** ! /* Protoize program - Original version by Ron Guilmette at MCC. ! Copyright (C) 1989, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- ! /* Protoize program - Original version by Ron Guilmette (rfg@segfault.us.com). ! Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* Any reasonable C++ compiler should have all of the same features --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Any reasonable C++ compiler should have all of the same features *************** *** 65,68 **** --- 66,70 ---- #include #include + #ifndef _WIN32 #if defined(POSIX) || defined(CONCURRENT) #include *************** *** 70,73 **** --- 72,76 ---- #include #endif + #endif #include *************** *** 79,88 **** #undef getopt extern int errno; ! #if defined(bsd4_4) || defined(__NetBSD__) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif extern char *version_string; --- 82,100 ---- #undef getopt + #ifndef errno extern int errno; ! #endif ! ! #ifndef HAVE_STRERROR ! extern int sys_nerr; ! #if defined(bsd4_4) extern const char *const sys_errlist[]; #else extern char *sys_errlist[]; #endif + #else + extern char *strerror(); + #endif + extern char *version_string; *************** *** 159,163 **** --- 171,177 ---- extern VOLATILE voidfn abort; #endif + #ifndef _WIN32 extern int kill (); + #endif extern int creat (); #if 0 /* These conflict with stdio.h on some systems. */ *************** *** 611,614 **** --- 625,650 ---- static const char *shortpath (); + char * + my_strerror(e) + int e; + { + + #ifdef HAVE_STRERROR + return strerror(e); + + #else + + static char buffer[30]; + if (!e) + return ""; + + if (e > 0 && e < sys_nerr) + return sys_errlist[e]; + + sprintf (buffer, "Unknown error %d", e); + return buffer; + #endif + } + /* Allocate some space, but check that the allocation was successful. */ /* alloca.c uses this, so don't make it static. */ *************** *** 786,790 **** #endif fprintf (stderr, "%s: error writing file `%s': %s\n", ! pname, shortpath (NULL, out_fname), sys_errlist[errno]); return; } --- 822,826 ---- #endif fprintf (stderr, "%s: error writing file `%s': %s\n", ! pname, shortpath (NULL, out_fname), my_strerror(errno)); return; } *************** *** 813,817 **** } ! /* Return true if the given character is a legal identifier character. */ static int --- 849,853 ---- } ! /* Return true if the given character is a valid identifier character. */ static int *************** *** 1478,1482 **** { fprintf (stderr, "%s: %s: can't get status: %s\n", ! pname, shortpath (NULL, filename), sys_errlist[errno]); stat_buf.st_mtime = (time_t) -1; } --- 1514,1518 ---- { fprintf (stderr, "%s: %s: can't get status: %s\n", ! pname, shortpath (NULL, filename), my_strerror(errno)); stat_buf.st_mtime = (time_t) -1; } *************** *** 2079,2083 **** { fprintf (stderr, "%s: could not fork process: %s\n", ! pname, sys_errlist[errno]); return 0; } --- 2115,2119 ---- { fprintf (stderr, "%s: could not fork process: %s\n", ! pname, my_strerror(errno)); return 0; } *************** *** 2107,2111 **** { fprintf (stderr, "%s: wait failed: %s\n", ! pname, sys_errlist[errno]); return 0; } --- 2143,2147 ---- { fprintf (stderr, "%s: wait failed: %s\n", ! pname, my_strerror(errno)); return 0; } *************** *** 2134,2138 **** --- 2170,2181 ---- write (f, compile_params[0], strlen (compile_params[0])); write (f, ": ", 2); + #ifdef HAVE_STRERROR + { + char *p = strerror(e); + write (f, p, strlen (p)); + } + #else write (f, sys_errlist[e], strlen (sys_errlist[e])); + #endif write (f, "\n", 1); _exit (1); *************** *** 2194,2198 **** fprintf (stderr, "%s: can't read aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); errors++; return; --- 2237,2241 ---- fprintf (stderr, "%s: can't read aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); errors++; return; *************** *** 2222,2226 **** fprintf (stderr, "%s: can't read aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); errors++; return; --- 2265,2269 ---- fprintf (stderr, "%s: can't read aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); errors++; return; *************** *** 2237,2241 **** fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); errors++; return; --- 2280,2284 ---- fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); errors++; return; *************** *** 2264,2268 **** fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n", pname, shortpath (NULL, base_source_filename), ! sys_errlist[errno]); errors++; return; --- 2307,2311 ---- fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n", pname, shortpath (NULL, base_source_filename), ! my_strerror(errno)); errors++; return; *************** *** 2285,2289 **** fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); return; } --- 2328,2332 ---- fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); return; } *************** *** 2301,2305 **** fprintf (stderr, "%s: error reading aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); free (aux_info_base); close (aux_info_file); --- 2344,2348 ---- fprintf (stderr, "%s: error reading aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); free (aux_info_base); close (aux_info_file); *************** *** 2313,2317 **** fprintf (stderr, "%s: error closing aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); free (aux_info_base); close (aux_info_file); --- 2356,2360 ---- fprintf (stderr, "%s: error closing aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); free (aux_info_base); close (aux_info_file); *************** *** 2327,2331 **** fprintf (stderr, "%s: can't delete aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); /* Save a pointer into the first line of the aux_info file which --- 2370,2374 ---- fprintf (stderr, "%s: can't delete aux info file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); /* Save a pointer into the first line of the aux_info file which *************** *** 2393,2397 **** fprintf (stderr, "%s: can't delete file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! sys_errlist[errno]); return; } --- 2436,2440 ---- fprintf (stderr, "%s: can't delete file `%s': %s\n", pname, shortpath (NULL, aux_info_filename), ! my_strerror(errno)); return; } *************** *** 2469,2473 **** fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n", pname, shortpath (NULL, filename), ! shortpath (NULL, new_filename), sys_errlist[errno]); errors++; return; --- 2512,2516 ---- fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n", pname, shortpath (NULL, filename), ! shortpath (NULL, new_filename), my_strerror(errno)); errors++; return; *************** *** 2477,2481 **** { fprintf (stderr, "%s: warning: can't delete file `%s': %s\n", ! pname, shortpath (NULL, filename), sys_errlist[errno]); errors++; return; --- 2520,2524 ---- { fprintf (stderr, "%s: warning: can't delete file `%s': %s\n", ! pname, shortpath (NULL, filename), my_strerror(errno)); errors++; return; *************** *** 3010,3014 **** will be copied into the output buffer. ! Note that the request implide when this routine is called includes the byte pointed to by the argument pointer `p'. */ --- 3053,3057 ---- will be copied into the output buffer. ! Note that the request implied when this routine is called includes the byte pointed to by the argument pointer `p'. */ *************** *** 3487,3491 **** The one we were looking for *must* be followed by either a '{' or ! by an alphabetic character, while others *cannot* legally be followed by such characters. */ --- 3530,3534 ---- The one we were looking for *must* be followed by either a '{' or ! by an alphabetic character, while others *cannot* validly be followed by such characters. */ *************** *** 3807,3811 **** } #else /* !defined (UNPROTOIZE) */ ! /* If we are protoizing, there may be some flotsum & jetsum (like comments and preprocessing directives) after the old formals list but before the following { and we would like to preserve that stuff while effectively --- 3850,3854 ---- } #else /* !defined (UNPROTOIZE) */ ! /* If we are protoizing, there may be some flotsam & jetsam (like comments and preprocessing directives) after the old formals list but before the following { and we would like to preserve that stuff while effectively *************** *** 3820,3824 **** const char *scan; const char *scan_orig; ! int have_flotsum = 0; int have_newlines = 0; --- 3863,3867 ---- const char *scan; const char *scan_orig; ! int have_flotsam = 0; int have_newlines = 0; *************** *** 3840,3846 **** } else ! have_flotsum = 1; } ! if (have_flotsum) output_bytes (end_formals_orig + 1, (size_t) (start_body_orig - end_formals_orig) - 1); --- 3883,3889 ---- } else ! have_flotsam = 1; } ! if (have_flotsam) output_bytes (end_formals_orig + 1, (size_t) (start_body_orig - end_formals_orig) - 1); *************** *** 3856,3860 **** /* Clean up the clean text buffer. Do this by converting comments and ! preprocessor directives into spaces. Also convert line continuations into whitespace. Also, whiteout string and character literals. */ --- 3899,3903 ---- /* Clean up the clean text buffer. Do this by converting comments and ! preprocessing directives into spaces. Also convert line continuations into whitespace. Also, whiteout string and character literals. */ *************** *** 4106,4110 **** or an "include" file). To do this we read the file into memory, keep a virgin copy there, make another cleaned in-core copy of the original file ! (i.e. one in which all of the comments and preprocessor directives have been replaced with whitespace), then use these two in-core copies of the file to make a new edited in-core copy of the file. Finally, rename the --- 4149,4153 ---- or an "include" file). To do this we read the file into memory, keep a virgin copy there, make another cleaned in-core copy of the original file ! (i.e. one in which all of the comments and preprocessing directives have been replaced with whitespace), then use these two in-core copies of the file to make a new edited in-core copy of the file. Finally, rename the *************** *** 4113,4117 **** Note that the trick of making a copy of the original sans comments & ! preprocessor directives make the editing a whole lot easier. */ static void --- 4156,4160 ---- Note that the trick of making a copy of the original sans comments & ! preprocessing directives make the editing a whole lot easier. */ static void *************** *** 4173,4177 **** { fprintf (stderr, "%s: can't get status for file `%s': %s\n", ! pname, shortpath (NULL, convert_filename), sys_errlist[errno]); return; } --- 4216,4220 ---- { fprintf (stderr, "%s: can't get status for file `%s': %s\n", ! pname, shortpath (NULL, convert_filename), my_strerror(errno)); return; } *************** *** 4208,4212 **** fprintf (stderr, "%s: can't open file `%s' for reading: %s\n", pname, shortpath (NULL, convert_filename), ! sys_errlist[errno]); return; } --- 4251,4255 ---- fprintf (stderr, "%s: can't open file `%s' for reading: %s\n", pname, shortpath (NULL, convert_filename), ! my_strerror(errno)); return; } *************** *** 4221,4225 **** fprintf (stderr, "\n%s: error reading input file `%s': %s\n", pname, shortpath (NULL, convert_filename), ! sys_errlist[errno]); return; } --- 4264,4268 ---- fprintf (stderr, "\n%s: error reading input file `%s': %s\n", pname, shortpath (NULL, convert_filename), ! my_strerror(errno)); return; } *************** *** 4254,4258 **** fprintf (stderr, "%s: can't create/open clean file `%s': %s\n", pname, shortpath (NULL, clean_filename), ! sys_errlist[errno]); return; } --- 4297,4301 ---- fprintf (stderr, "%s: can't create/open clean file `%s': %s\n", pname, shortpath (NULL, clean_filename), ! my_strerror(errno)); return; } *************** *** 4363,4367 **** shortpath (NULL, convert_filename), shortpath (NULL, new_filename), ! sys_errlist[errno]); return; } --- 4406,4410 ---- shortpath (NULL, convert_filename), shortpath (NULL, new_filename), ! my_strerror(errno)); return; } *************** *** 4372,4376 **** { fprintf (stderr, "%s: can't delete file `%s': %s\n", ! pname, shortpath (NULL, convert_filename), sys_errlist[errno]); return; } --- 4415,4419 ---- { fprintf (stderr, "%s: can't delete file `%s': %s\n", ! pname, shortpath (NULL, convert_filename), my_strerror(errno)); return; } *************** *** 4385,4389 **** fprintf (stderr, "%s: can't create/open output file `%s': %s\n", pname, shortpath (NULL, convert_filename), ! sys_errlist[errno]); return; } --- 4428,4432 ---- fprintf (stderr, "%s: can't create/open output file `%s': %s\n", pname, shortpath (NULL, convert_filename), ! my_strerror(errno)); return; } *************** *** 4411,4415 **** if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1) fprintf (stderr, "%s: can't change mode of file `%s': %s\n", ! pname, shortpath (NULL, convert_filename), sys_errlist[errno]); /* Note: We would try to change the owner and group of the output file --- 4454,4458 ---- if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1) fprintf (stderr, "%s: can't change mode of file `%s': %s\n", ! pname, shortpath (NULL, convert_filename), my_strerror(errno)); /* Note: We would try to change the owner and group of the output file *************** *** 4554,4558 **** { fprintf (stderr, "%s: cannot get working directory: %s\n", ! pname, sys_errlist[errno]); exit (1); } --- 4597,4601 ---- { fprintf (stderr, "%s: cannot get working directory: %s\n", ! pname, my_strerror(errno)); exit (1); } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/real.c gcc-2.7.0/real.c *** gcc-2.6.3/real.c Sat Nov 5 13:57:08 1994 --- gcc-2.7.0/real.c Thu Jun 15 07:57:39 1995 *************** *** 1,5 **** /* real.c - implementation of REAL_ARITHMETIC, REAL_VALUE_ATOF, and support for XFmode IEEE extended real floating point arithmetic. ! Copyright (C) 1993, 1994 Free Software Foundation, Inc. Contributed by Stephen L. Moshier (moshier@world.std.com). --- 1,5 ---- /* real.c - implementation of REAL_ARITHMETIC, REAL_VALUE_ATOF, and support for XFmode IEEE extended real floating point arithmetic. ! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Stephen L. Moshier (moshier@world.std.com). *************** *** 18,22 **** 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 --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include *************** *** 45,75 **** real.h). ! The first part of this file interfaces gcc to ieee.c, which is a ! floating point arithmetic suite that was not written with gcc in ! mind. The interface is followed by ieee.c itself and related ! items. Avoid changing ieee.c unless you have suitable test ! programs available. A special version of the PARANOIA floating ! point arithmetic tester, modified for this purpose, can be found ! on usc.edu : /pub/C-numanal/ieeetest.zoo. Some tutorial ! information on ieee.c is given in my book: S. L. Moshier, ! _Methods and Programs for Mathematical Functions_, Prentice-Hall ! or Simon & Schuster Int'l, 1989. A library of XFmode elementary ! transcendental functions can be obtained by ftp from ! research.att.com: netlib/cephes/ldouble.shar.Z */ /* Type of computer arithmetic. ! Only one of DEC, IBM, MIEEE, IBMPC, or UNK should get defined. ! `MIEEE' refers generically to big-endian IEEE floating-point data ! structure. This definition should work in SFmode `float' type and ! DFmode `double' type on virtually all big-endian IEEE machines. ! If LONG_DOUBLE_TYPE_SIZE has been defined to be 96, then MIEEE ! also invokes the particular XFmode (`long double' type) data ! structure used by the Motorola 680x0 series processors. ! ! `IBMPC' refers generally to little-endian IEEE machines. In this ! case, if LONG_DOUBLE_TYPE_SIZE has been defined to be 96, then ! IBMPC also invokes the particular XFmode `long double' data ! structure used by the Intel 80x86 series processors. `DEC' refers specifically to the Digital Equipment Corp PDP-11 --- 46,74 ---- real.h). ! The first part of this file interfaces gcc to a floating point ! arithmetic suite that was not written with gcc in mind. Avoid ! changing the low-level arithmetic routines unless you have suitable ! test programs available. A special version of the PARANOIA floating ! point arithmetic tester, modified for this purpose, can be found on ! usc.edu: /pub/C-numanal/ieeetest.zoo. Other tests, and libraries of ! XFmode and TFmode transcendental functions, can be obtained by ftp from ! netlib.att.com: netlib/cephes. */ /* Type of computer arithmetic. ! Only one of DEC, IBM, IEEE, or UNK should get defined. ! `IEEE', when REAL_WORDS_BIG_ENDIAN is non-zero, refers generically ! to big-endian IEEE floating-point data structure. This definition ! should work in SFmode `float' type and DFmode `double' type on ! virtually all big-endian IEEE machines. If LONG_DOUBLE_TYPE_SIZE ! has been defined to be 96, then IEEE also invokes the particular ! XFmode (`long double' type) data structure used by the Motorola ! 680x0 series processors. ! ! `IEEE', when REAL_WORDS_BIG_ENDIAN is zero, refers generally to ! little-endian IEEE machines. In this case, if LONG_DOUBLE_TYPE_SIZE ! has been defined to be 96, then IEEE also invokes the particular ! XFmode `long double' data structure used by the Intel 80x86 series ! processors. `DEC' refers specifically to the Digital Equipment Corp PDP-11 *************** *** 120,131 **** #else /* it's also not an IBM */ #if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT ! #if FLOAT_WORDS_BIG_ENDIAN ! /* Motorola IEEE, high order words come first (Sun workstation): */ ! #define MIEEE 1 ! #else /* not big-endian */ ! /* Intel IEEE, low order words come first: ! */ ! #define IBMPC 1 ! #endif /* big-endian */ #else /* it's not IEEE either */ /* UNKnown arithmetic. We don't support this and can't go on. */ --- 119,123 ---- #else /* it's also not an IBM */ #if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT ! #define IEEE #else /* it's not IEEE either */ /* UNKnown arithmetic. We don't support this and can't go on. */ *************** *** 136,139 **** --- 128,133 ---- #endif /* not VAX */ + #define REAL_WORDS_BIG_ENDIAN FLOAT_WORDS_BIG_ENDIAN + #else /* REAL_ARITHMETIC not defined means that the *host's* data *************** *** 151,159 **** #else /* it's also not an IBM */ #if HOST_FLOAT_FORMAT == IEEE_FLOAT_FORMAT ! #if HOST_FLOAT_WORDS_BIG_ENDIAN ! #define MIEEE 1 ! #else /* not big-endian */ ! #define IBMPC 1 ! #endif /* big-endian */ #else /* it's not IEEE either */ unknown arithmetic type --- 145,149 ---- #else /* it's also not an IBM */ #if HOST_FLOAT_FORMAT == IEEE_FLOAT_FORMAT ! #define IEEE #else /* it's not IEEE either */ unknown arithmetic type *************** *** 163,166 **** --- 153,158 ---- #endif /* not VAX */ + #define REAL_WORDS_BIG_ENDIAN HOST_FLOAT_WORDS_BIG_ENDIAN + #endif /* REAL_ARITHMETIC not defined */ *************** *** 264,290 **** but host stores it in host endian-ness. */ ! #if HOST_FLOAT_WORDS_BIG_ENDIAN == FLOAT_WORDS_BIG_ENDIAN ! #define GET_REAL(r,e) e53toe ((unsigned EMUSHORT*) (r), (e)) ! #define PUT_REAL(e,r) etoe53 ((e), (unsigned EMUSHORT *) (r)) ! ! #else /* endian-ness differs */ ! /* emulator uses target endian-ness internally */ ! #define GET_REAL(r,e) \ ! do { unsigned EMUSHORT w[4]; \ ! w[3] = ((EMUSHORT *) r)[0]; \ ! w[2] = ((EMUSHORT *) r)[1]; \ ! w[1] = ((EMUSHORT *) r)[2]; \ ! w[0] = ((EMUSHORT *) r)[3]; \ ! e53toe (w, (e)); } while (0) ! ! #define PUT_REAL(e,r) \ ! do { unsigned EMUSHORT w[4]; \ ! etoe53 ((e), w); \ ! *((EMUSHORT *) r) = w[3]; \ ! *((EMUSHORT *) r + 1) = w[2]; \ ! *((EMUSHORT *) r + 2) = w[1]; \ ! *((EMUSHORT *) r + 3) = w[0]; } while (0) ! ! #endif /* endian-ness differs */ #else /* not REAL_ARITHMETIC */ --- 256,288 ---- but host stores it in host endian-ness. */ ! #define GET_REAL(r,e) \ ! do { \ ! if (HOST_FLOAT_WORDS_BIG_ENDIAN == REAL_WORDS_BIG_ENDIAN) \ ! e53toe ((unsigned EMUSHORT*) (r), (e)); \ ! else \ ! { \ ! unsigned EMUSHORT w[4]; \ ! w[3] = ((EMUSHORT *) r)[0]; \ ! w[2] = ((EMUSHORT *) r)[1]; \ ! w[1] = ((EMUSHORT *) r)[2]; \ ! w[0] = ((EMUSHORT *) r)[3]; \ ! e53toe (w, (e)); \ ! } \ ! } while (0) ! ! #define PUT_REAL(e,r) \ ! do { \ ! if (HOST_FLOAT_WORDS_BIG_ENDIAN == REAL_WORDS_BIG_ENDIAN) \ ! etoe53 ((e), (unsigned EMUSHORT *) (r)); \ ! else \ ! { \ ! unsigned EMUSHORT w[4]; \ ! etoe53 ((e), w); \ ! *((EMUSHORT *) r) = w[3]; \ ! *((EMUSHORT *) r + 1) = w[2]; \ ! *((EMUSHORT *) r + 2) = w[1]; \ ! *((EMUSHORT *) r + 3) = w[0]; \ ! } \ ! } while (0) #else /* not REAL_ARITHMETIC */ *************** *** 437,533 **** unsigned long th, t; ! #if FLOAT_WORDS_BIG_ENDIAN ! switch (mode) { ! ! case TFmode: ! /* Swap halfwords in the fourth long. */ ! th = (unsigned long) e[6] & 0xffff; ! t = (unsigned long) e[7] & 0xffff; ! t |= th << 16; ! x[3] = (long) t; ! ! case XFmode: ! ! /* Swap halfwords in the third long. */ ! th = (unsigned long) e[4] & 0xffff; ! t = (unsigned long) e[5] & 0xffff; ! t |= th << 16; ! x[2] = (long) t; ! /* fall into the double case */ ! ! case DFmode: ! ! /* swap halfwords in the second word */ ! th = (unsigned long) e[2] & 0xffff; ! t = (unsigned long) e[3] & 0xffff; ! t |= th << 16; ! x[1] = (long) t; ! /* fall into the float case */ ! ! case HFmode: ! case SFmode: ! /* swap halfwords in the first word */ ! th = (unsigned long) e[0] & 0xffff; ! t = (unsigned long) e[1] & 0xffff; ! t |= th << 16; ! x[0] = t; ! break; ! default: ! abort (); } ! ! #else ! ! /* Pack the output array without swapping. */ ! ! switch (mode) { ! ! case TFmode: ! ! /* Pack the fourth long. */ ! th = (unsigned long) e[7] & 0xffff; ! t = (unsigned long) e[6] & 0xffff; ! t |= th << 16; ! x[3] = (long) t; ! ! case XFmode: ! /* Pack the third long. ! Each element of the input REAL_VALUE_TYPE array has 16 useful bits ! in it. */ ! th = (unsigned long) e[5] & 0xffff; ! t = (unsigned long) e[4] & 0xffff; ! t |= th << 16; ! x[2] = (long) t; ! /* fall into the double case */ ! ! case DFmode: ! ! /* pack the second long */ ! th = (unsigned long) e[3] & 0xffff; ! t = (unsigned long) e[2] & 0xffff; ! t |= th << 16; ! x[1] = (long) t; ! /* fall into the float case */ ! case HFmode: ! case SFmode: ! /* pack the first long */ ! th = (unsigned long) e[1] & 0xffff; ! t = (unsigned long) e[0] & 0xffff; ! t |= th << 16; ! x[0] = t; ! break; ! default: ! abort (); } - - #endif } --- 435,531 ---- unsigned long th, t; ! if (REAL_WORDS_BIG_ENDIAN) { ! switch (mode) ! { ! case TFmode: ! /* Swap halfwords in the fourth long. */ ! th = (unsigned long) e[6] & 0xffff; ! t = (unsigned long) e[7] & 0xffff; ! t |= th << 16; ! x[3] = (long) t; ! ! case XFmode: ! ! /* Swap halfwords in the third long. */ ! th = (unsigned long) e[4] & 0xffff; ! t = (unsigned long) e[5] & 0xffff; ! t |= th << 16; ! x[2] = (long) t; ! /* fall into the double case */ ! ! case DFmode: ! ! /* swap halfwords in the second word */ ! th = (unsigned long) e[2] & 0xffff; ! t = (unsigned long) e[3] & 0xffff; ! t |= th << 16; ! x[1] = (long) t; ! /* fall into the float case */ ! ! case HFmode: ! case SFmode: ! ! /* swap halfwords in the first word */ ! th = (unsigned long) e[0] & 0xffff; ! t = (unsigned long) e[1] & 0xffff; ! t |= th << 16; ! x[0] = t; ! break; ! default: ! abort (); ! } } ! else { ! /* Pack the output array without swapping. */ ! switch (mode) ! { ! case TFmode: ! /* Pack the fourth long. */ ! th = (unsigned long) e[7] & 0xffff; ! t = (unsigned long) e[6] & 0xffff; ! t |= th << 16; ! x[3] = (long) t; ! ! case XFmode: ! ! /* Pack the third long. ! Each element of the input REAL_VALUE_TYPE array has 16 useful bits ! in it. */ ! th = (unsigned long) e[5] & 0xffff; ! t = (unsigned long) e[4] & 0xffff; ! t |= th << 16; ! x[2] = (long) t; ! /* fall into the double case */ ! ! case DFmode: ! ! /* pack the second long */ ! th = (unsigned long) e[3] & 0xffff; ! t = (unsigned long) e[2] & 0xffff; ! t |= th << 16; ! x[1] = (long) t; ! /* fall into the float case */ ! ! case HFmode: ! case SFmode: ! ! /* pack the first long */ ! th = (unsigned long) e[1] & 0xffff; ! t = (unsigned long) e[0] & 0xffff; ! t |= th << 16; ! x[0] = t; ! break; ! default: ! abort (); ! } } } *************** *** 898,902 **** } - /* Check whether a REAL_VALUE_TYPE item is a NaN. */ --- 896,899 ---- *************** *** 997,1004 **** ! /* Target values are arrays of host longs. A long is guaranteed ! to be at least 32 bits wide. */ ! /* 128-bit long double */ void --- 994,1010 ---- ! /* The following routines convert REAL_VALUE_TYPE to the various floating ! point formats that are meaningful to supported computers. ! ! The results are returned in 32-bit pieces, each piece stored in a `long'. ! This is so they can be printed by statements like ! ! fprintf (file, "%lx, %lx", L[0], L[1]); ! ! that will work on both narrow- and wide-word host computers. */ ! /* Convert R to a 128-bit long double precision value. The output array L ! contains four 32-bit pieces of the result, in the order they would appear ! in memory. */ void *************** *** 1014,1018 **** } ! /* 80-bit long double */ void --- 1020,1026 ---- } ! /* Convert R to a double extended precision value. The output array L ! contains three 32-bit pieces of the result, in the order they would ! appear in memory. */ void *************** *** 1028,1031 **** --- 1036,1042 ---- } + /* Convert R to a double precision value. The output array L contains two + 32-bit pieces of the result, in the order they would appear in memory. */ + void etardouble (r, l) *************** *** 1040,1043 **** --- 1051,1057 ---- } + /* Convert R to a single precision float value stored in the least-significant + bits of a `long'. */ + long etarsingle (r) *************** *** 1053,1056 **** --- 1067,1075 ---- } + /* Convert X to a decimal ASCII string S for output to an assembly + language file. Note, there is no standard way to spell infinity or + a NaN, so these values may require special treatment in the tm.h + macros. */ + void ereal_to_decimal (x, s) *************** *** 1064,1067 **** --- 1083,1089 ---- } + /* Compare X and Y. Return 1 if X > Y, 0 if X == Y, -1 if X < Y, + or -2 if either is a NaN. */ + int ereal_cmp (x, y) *************** *** 1075,1078 **** --- 1097,1102 ---- } + /* Return 1 if the sign bit of X is set, else return 0. */ + int ereal_isneg (x) *************** *** 1094,1098 **** the arrays. ! External e type data structure, simulates Intel 8087 chip temporary real format but possibly with a larger significand: --- 1118,1122 ---- the arrays. ! External e type data structure, similar to Intel 8087 chip temporary real format but possibly with a larger significand: *************** *** 1103,1107 **** ! Internal data structure of a number (a "word" is 16 bits): ei[0] sign word (0 for positive, 0xffff for negative) --- 1127,1131 ---- ! Internal exploded e-type data structure of a number (a "word" is 16 bits): ei[0] sign word (0 for positive, 0xffff for negative) *************** *** 1116,1120 **** ! Routines for external format numbers asctoe (string, e) ASCII string to extended double e type --- 1140,1144 ---- ! Routines for external format e-type numbers asctoe (string, e) ASCII string to extended double e type *************** *** 1160,1164 **** ! Routines for internal format numbers eaddm (ai, bi) add significands, bi = bi + ai --- 1184,1188 ---- ! Routines for internal format exploded e-type numbers eaddm (ai, bi) add significands, bi = bi + ai *************** *** 1221,1227 **** For computers, such as IBM PC, that follow the IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE ! Std 754-1985), the symbol IBMPC or MIEEE should be defined. These numbers have 53-bit significands. In this mode, constants are provided as arrays of hexadecimal 16 bit integers. To accommodate other types of computer arithmetic, all --- 1245,1253 ---- For computers, such as IBM PC, that follow the IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE ! Std 754-1985), the symbol IEEE should be defined. These numbers have 53-bit significands. In this mode, constants are provided as arrays of hexadecimal 16 bit integers. + The endian-ness of generated values is controlled by + REAL_WORDS_BIG_ENDIAN. To accommodate other types of computer arithmetic, all *************** *** 1322,1327 **** #endif - - /* Control register for rounding precision. This can be set to 113 (if NE=10), 80 (if NE=6), 64, 56, 53, or 24 bits. */ --- 1348,1351 ---- *************** *** 1330,1334 **** extern int rndprc; ! /* Clear out entire external format number. */ static void --- 1354,1358 ---- extern int rndprc; ! /* Clear out entire e-type number X. */ static void *************** *** 1342,1349 **** } - - /* Move external format number from a to b. */ - static void emov (a, b) --- 1366,1371 ---- } + /* Move e-type number from A to B. */ static void emov (a, b) *************** *** 1357,1361 **** ! /* Absolute value of external format number. */ static void --- 1379,1383 ---- ! /* Absolute value of e-type X. */ static void *************** *** 1367,1371 **** } ! /* Negate external format number. */ static void --- 1389,1393 ---- } ! /* Negate the e-type number X. */ static void *************** *** 1377,1384 **** } ! - /* Return 1 if sign bit of external format number is nonzero, else zero. */ - static int eisneg (x) --- 1399,1404 ---- } ! /* Return 1 if sign bit of e-type number X is nonzero, else zero. */ static int eisneg (x) *************** *** 1392,1397 **** } ! ! /* Return 1 if external format number is infinity, else return zero. */ static int --- 1412,1416 ---- } ! /* Return 1 if e-type number X is infinity, else return zero. */ static int *************** *** 1410,1414 **** } - /* Check if e-type number is not a number. The bit pattern is one that we defined, so we know for sure how to detect it. */ --- 1429,1432 ---- *************** *** 1435,1439 **** } ! /* Fill external format number with infinity pattern (IEEE) or largest possible number (non-IEEE). */ --- 1453,1457 ---- } ! /* Fill e-type number X with infinity pattern (IEEE) or largest possible number (non-IEEE). */ *************** *** 1477,1481 **** } - /* Output an e-type NaN. This generates Intel's quiet NaN pattern for extended real. --- 1495,1498 ---- *************** *** 1495,1501 **** } - /* Move in external format number, converting it to internal format. */ - static void emovi (a, b) --- 1512,1517 ---- } + /* Move in an e-type number A, converting it to exploded e-type B. */ static void emovi (a, b) *************** *** 1543,1548 **** } ! ! /* Move internal format number out, converting it to external format. */ static void --- 1559,1563 ---- } ! /* Move out exploded e-type number A, converting it to e type B. */ static void *************** *** 1583,1587 **** } ! /* Clear out internal format number. */ static void --- 1598,1602 ---- } ! /* Clear out exploded e-type number XI. */ static void *************** *** 1595,1600 **** } ! ! /* Same, but don't touch the sign. */ static void --- 1610,1614 ---- } ! /* Clear out exploded e-type XI, but don't touch the sign. */ static void *************** *** 1609,1616 **** } - - /* Move internal format number from a to b. */ - static void emovz (a, b) --- 1623,1628 ---- } + /* Move exploded e-type number from A to B. */ static void emovz (a, b) *************** *** 1625,1629 **** } ! /* Generate internal format NaN. The explicit pattern for this is maximum exponent and top two significant bits set. */ --- 1637,1641 ---- } ! /* Generate exploded e-type NaN. The explicit pattern for this is maximum exponent and top two significant bits set. */ *************** *** 1639,1643 **** } ! /* Return nonzero if internal format number is a NaN. */ static int --- 1651,1655 ---- } ! /* Return nonzero if exploded e-type X is a NaN. */ static int *************** *** 1658,1662 **** } ! /* Return nonzero if sign of internal format number is nonzero. */ static int --- 1670,1674 ---- } ! /* Return nonzero if sign of exploded e-type X is nonzero. */ static int *************** *** 1668,1672 **** } ! /* Fill internal format number with infinity pattern. This has maximum exponent and significand all zeros. */ --- 1680,1684 ---- } ! /* Fill exploded e-type X with infinity pattern. This has maximum exponent and significand all zeros. */ *************** *** 1680,1684 **** } ! /* Return nonzero if internal format number is infinite. */ static int --- 1692,1696 ---- } ! /* Return nonzero if exploded e-type X is infinite. */ static int *************** *** 1697,1701 **** ! /* Compare significands of numbers in internal format. Guard words are included in the comparison. --- 1709,1713 ---- ! /* Compare significands of numbers in internal exploded e-type format. Guard words are included in the comparison. *************** *** 1726,1732 **** } - /* Shift significand down by 1 bit. */ - static void eshdn1 (x) --- 1738,1743 ---- } + /* Shift significand of exploded e-type X down by 1 bit. */ static void eshdn1 (x) *************** *** 1751,1758 **** } ! - /* Shift significand up by 1 bit. */ - static void eshup1 (x) --- 1762,1767 ---- } ! /* Shift significand of exploded e-type X up by 1 bit. */ static void eshup1 (x) *************** *** 1778,1782 **** ! /* Shift significand down by 8 bits. */ static void --- 1787,1791 ---- ! /* Shift significand of exploded e-type X down by 8 bits. */ static void *************** *** 1799,1803 **** } ! /* Shift significand up by 8 bits. */ static void --- 1808,1812 ---- } ! /* Shift significand of exploded e-type X up by 8 bits. */ static void *************** *** 1821,1825 **** } ! /* Shift significand up by 16 bits. */ static void --- 1830,1834 ---- } ! /* Shift significand of exploded e-type X up by 16 bits. */ static void *************** *** 1839,1843 **** } ! /* Shift significand down by 16 bits. */ static void --- 1848,1852 ---- } ! /* Shift significand of exploded e-type X down by 16 bits. */ static void *************** *** 1856,1861 **** *(--p) = 0; } ! ! /* Add significands. x + y replaces y. */ static void --- 1865,1870 ---- *(--p) = 0; } ! ! /* Add significands of exploded e-type X and Y. X + Y replaces Y. */ static void *************** *** 1883,1887 **** } ! /* Subtract significands. y - x replaces y. */ static void --- 1892,1896 ---- } ! /* Subtract significands of exploded e-type X and Y. Y - X replaces Y. */ static void *************** *** 2063,2082 **** #else ! /* Radix 65536 versions of multiply and divide */ - /* Multiply significand of e-type number b - by 16-bit quantity a, e-type result to c. */ - static void m16m (a, b, c) unsigned int a; ! unsigned short b[], c[]; { ! register unsigned short *pp; ! register unsigned long carry; ! unsigned short *ps; ! unsigned short p[NI]; ! unsigned long aa, m; int i; --- 2072,2090 ---- #else ! /* Radix 65536 versions of multiply and divide. */ + /* Multiply significand of e-type number B + by 16-bit quantity A, return e-type result to C. */ static void m16m (a, b, c) unsigned int a; ! unsigned EMUSHORT b[], c[]; { ! register unsigned EMUSHORT *pp; ! register unsigned EMULONG carry; ! unsigned EMUSHORT *ps; ! unsigned EMUSHORT p[NI]; ! unsigned EMULONG aa, m; int i; *************** *** 2097,2105 **** else { ! m = (unsigned long) aa * *ps--; carry = (m & 0xffff) + *pp; ! *pp-- = (unsigned short)carry; carry = (carry >> 16) + (m >> 16) + *pp; ! *pp = (unsigned short)carry; *(pp-1) = carry >> 16; } --- 2105,2113 ---- else { ! m = (unsigned EMULONG) aa * *ps--; carry = (m & 0xffff) + *pp; ! *pp-- = (unsigned EMUSHORT)carry; carry = (carry >> 16) + (m >> 16) + *pp; ! *pp = (unsigned EMUSHORT)carry; *(pp-1) = carry >> 16; } *************** *** 2109,2125 **** } ! ! /* Divide significands. Neither the numerator nor the denominator ! is permitted to have its high guard word nonzero. */ static int edivm (den, num) ! unsigned short den[], num[]; { int i; ! register unsigned short *p; ! unsigned long tnum; ! unsigned short j, tdenm, tquot; ! unsigned short tprod[NI+1]; p = &equot[0]; --- 2117,2133 ---- } ! /* Divide significands of exploded e-types NUM / DEN. Neither the ! numerator NUM nor the denominator DEN is permitted to have its high guard ! word nonzero. */ static int edivm (den, num) ! unsigned EMUSHORT den[], num[]; { int i; ! register unsigned EMUSHORT *p; ! unsigned EMULONG tnum; ! unsigned EMUSHORT j, tdenm, tquot; ! unsigned EMUSHORT tprod[NI+1]; p = &equot[0]; *************** *** 2136,2140 **** { /* Find trial quotient digit (the radix is 65536). */ ! tnum = (((unsigned long) num[M]) << 16) + num[M+1]; /* Do not execute the divide instruction if it will overflow. */ --- 2144,2148 ---- { /* Find trial quotient digit (the radix is 65536). */ ! tnum = (((unsigned EMULONG) num[M]) << 16) + num[M+1]; /* Do not execute the divide instruction if it will overflow. */ *************** *** 2176,2189 **** } - - /* Multiply significands */ static int emulm (a, b) ! unsigned short a[], b[]; { ! unsigned short *p, *q; ! unsigned short pprod[NI]; ! unsigned short j; int i; --- 2184,2196 ---- } + /* Multiply significands of exploded e-type A and B, result in B. */ static int emulm (a, b) ! unsigned EMUSHORT a[], b[]; { ! unsigned EMUSHORT *p, *q; ! unsigned EMUSHORT pprod[NI]; ! unsigned EMUSHORT j; int i; *************** *** 2222,2238 **** /* Normalize and round off. ! The internal format number to be rounded is "s". ! Input "lost" indicates whether or not the number is exact. ! This is the so-called sticky bit. ! Input "subflg" indicates whether the number was obtained ! by a subtraction operation. In that case if lost is nonzero then the number is slightly smaller than indicated. ! Input "exp" is the biased exponent, which may be negative. ! the exponent field of "s" is ignored but is replaced by ! "exp" as adjusted by normalization and rounding. ! Input "rcntrl" is the rounding control. For future reference: In order for emdnorm to round off denormal --- 2229,2245 ---- /* Normalize and round off. ! The internal format number to be rounded is S. ! Input LOST is 0 if the value is exact. This is the so-called sticky bit. ! Input SUBFLG indicates whether the number was obtained ! by a subtraction operation. In that case if LOST is nonzero then the number is slightly smaller than indicated. ! Input EXP is the biased exponent, which may be negative. ! the exponent field of S is ignored but is replaced by ! EXP as adjusted by normalization and rounding. ! Input RCNTRL is the rounding control. If it is nonzero, the ! returned value will be rounded to RNDPRC bits. For future reference: In order for emdnorm to round off denormal *************** *** 2362,2367 **** /* Shift down 1 temporarily if the data structure has an implied ! most significant bit and the number is denormal. */ ! if ((exp <= 0) && (rndprc != 64) && (rndprc != NBITS)) { lost |= s[NI - 1] & 1; --- 2369,2376 ---- /* Shift down 1 temporarily if the data structure has an implied ! most significant bit and the number is denormal. ! Intel long double denormals also lose one bit of precision. */ ! if ((exp <= 0) && (rndprc != NBITS) ! && ((rndprc != 64) || ((rndprc == 64) && ! REAL_WORDS_BIG_ENDIAN))) { lost |= s[NI - 1] & 1; *************** *** 2401,2405 **** } mddone: ! if ((exp <= 0) && (rndprc != 64) && (rndprc != NBITS)) { eshup1 (s); --- 2410,2416 ---- } mddone: ! /* Undo the temporary shift for denormal values. */ ! if ((exp <= 0) && (rndprc != NBITS) ! && ((rndprc != 64) || ((rndprc == 64) && ! REAL_WORDS_BIG_ENDIAN))) { eshup1 (s); *************** *** 2447,2453 **** } ! ! ! /* Subtract external format numbers. */ static int subflg = 0; --- 2458,2462 ---- } ! /* Subtract. C = B - A, all e type numbers. */ static int subflg = 0; *************** *** 2483,2489 **** } - /* Add. */ - static void eadd (a, b, c) --- 2492,2497 ---- } + /* Add. C = A + B, all e type. */ static void eadd (a, b, c) *************** *** 2517,2520 **** --- 2525,2530 ---- } + /* Arithmetic common to both addition and subtraction. */ + static void eadd1 (a, b, c) *************** *** 2577,2581 **** } /* if same sign, result is double */ ! /* double denomalized tiny number */ if ((bi[E] == 0) && ((bi[3] & 0x8000) == 0)) { --- 2587,2591 ---- } /* if same sign, result is double */ ! /* double denormalized tiny number */ if ((bi[E] == 0) && ((bi[3] & 0x8000) == 0)) { *************** *** 2619,2626 **** } ! - /* Divide. */ - static void ediv (a, b, c) --- 2629,2634 ---- } ! /* Divide: C = B/A, all e type. */ static void ediv (a, b, c) *************** *** 2723,2730 **** } ! - /* Multiply. */ - static void emul (a, b, c) --- 2731,2736 ---- } ! /* Multiply e-types A and B, return e-type product C. */ static void emul (a, b, c) *************** *** 2815,2823 **** } ! - - /* Convert IEEE double precision to e type. */ - static void e53toe (pe, y) --- 2821,2826 ---- } ! /* Convert double precision PE to e-type Y. */ static void e53toe (pe, y) *************** *** 2826,2830 **** #ifdef DEC ! dectoe (pe, y); /* see etodec.c */ #else --- 2829,2833 ---- #ifdef DEC ! dectoe (pe, y); #else *************** *** 2842,2848 **** denorm = 0; /* flag if denormalized number */ ecleaz (yy); ! #ifdef IBMPC ! e += 3; ! #endif r = *e; yy[0] = 0; --- 2845,2850 ---- denorm = 0; /* flag if denormalized number */ ecleaz (yy); ! if (! REAL_WORDS_BIG_ENDIAN) ! e += 3; r = *e; yy[0] = 0; *************** *** 2855,2873 **** { #ifdef NANS ! #ifdef IBMPC ! if (((pe[3] & 0xf) != 0) || (pe[2] != 0) ! || (pe[1] != 0) || (pe[0] != 0)) { ! enan (y, yy[0] != 0); ! return; } ! #else ! if (((pe[0] & 0xf) != 0) || (pe[1] != 0) ! || (pe[2] != 0) || (pe[3] != 0)) { ! enan (y, yy[0] != 0); ! return; } - #endif #endif /* NANS */ eclear (y); --- 2857,2878 ---- { #ifdef NANS ! if (! REAL_WORDS_BIG_ENDIAN) { ! if (((pe[3] & 0xf) != 0) || (pe[2] != 0) ! || (pe[1] != 0) || (pe[0] != 0)) ! { ! enan (y, yy[0] != 0); ! return; ! } } ! else { ! if (((pe[0] & 0xf) != 0) || (pe[1] != 0) ! || (pe[2] != 0) || (pe[3] != 0)) ! { ! enan (y, yy[0] != 0); ! return; ! } } #endif /* NANS */ eclear (y); *************** *** 2890,2903 **** yy[E] = r; p = &yy[M + 1]; ! #ifdef IBMPC ! *p++ = *(--e); ! *p++ = *(--e); ! *p++ = *(--e); ! #endif ! #ifdef MIEEE ! ++e; ! *p++ = *e++; ! *p++ = *e++; ! *p++ = *e++; #endif eshift (yy, -5); --- 2895,2912 ---- yy[E] = r; p = &yy[M + 1]; ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! { ! *p++ = *(--e); ! *p++ = *(--e); ! *p++ = *(--e); ! } ! else ! { ! ++e; ! *p++ = *e++; ! *p++ = *e++; ! *p++ = *e++; ! } #endif eshift (yy, -5); *************** *** 2914,2917 **** --- 2923,2928 ---- } + /* Convert double extended precision float PE to e type Y. */ + static void e64toe (pe, y) *************** *** 2926,2933 **** for (i = 0; i < NE - 5; i++) *p++ = 0; - #ifdef IBMPC - for (i = 0; i < 5; i++) - *p++ = *e++; - #endif /* This precision is not ordinarily supported on DEC or IBM. */ #ifdef DEC --- 2937,2940 ---- *************** *** 2942,2977 **** *p-- = *e++; #endif ! #ifdef MIEEE ! p = &yy[0] + (NE - 1); ! *p-- = *e++; ! ++e; ! for (i = 0; i < 4; i++) ! *p-- = *e++; #endif - p = yy; - q = y; #ifdef INFINITY if (*p == 0x7fff) { #ifdef NANS ! #ifdef IBMPC ! for (i = 0; i < 4; i++) { ! if (pe[i] != 0) { ! enan (y, (*p & 0x8000) != 0); ! return; } } ! #else ! for (i = 1; i <= 4; i++) { ! if (pe[i] != 0) { ! enan (y, (*p & 0x8000) != 0); ! return; } } - #endif #endif /* NANS */ eclear (y); --- 2949,3010 ---- *p-- = *e++; #endif ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! { ! for (i = 0; i < 5; i++) ! *p++ = *e++; ! ! /* For denormal long double Intel format, shift significand up one ! -- but only if the top significand bit is zero. A top bit of 1 ! is "pseudodenormal" when the exponent is zero. */ ! if((yy[NE-1] & 0x7fff) == 0 && (yy[NE-2] & 0x8000) == 0) ! { ! unsigned EMUSHORT temp[NI]; ! ! emovi(yy, temp); ! eshup1(temp); ! emovo(temp,y); ! return; ! } ! } ! else ! { ! p = &yy[0] + (NE - 1); ! *p-- = *e++; ! ++e; ! for (i = 0; i < 4; i++) ! *p-- = *e++; ! } #endif #ifdef INFINITY + /* Point to the exponent field and check max exponent cases. */ + p = &yy[NE - 1]; if (*p == 0x7fff) { #ifdef NANS ! if (! REAL_WORDS_BIG_ENDIAN) { ! for (i = 0; i < 4; i++) { ! if ((i != 3 && pe[i] != 0) ! /* Anything but 0x8000 here, including 0, is a NaN. */ ! || (i == 3 && pe[i] != 0x8000)) ! { ! enan (y, (*p & 0x8000) != 0); ! return; ! } } } ! else { ! for (i = 1; i <= 4; i++) { ! if (pe[i] != 0) ! { ! enan (y, (*p & 0x8000) != 0); ! return; ! } } } #endif /* NANS */ eclear (y); *************** *** 2982,2989 **** --- 3015,3025 ---- } #endif /* INFINITY */ + p = yy; + q = y; for (i = 0; i < NE; i++) *q++ = *p++; } + /* Convert 128-bit long double precision float PE to e type Y. */ static void *************** *** 2999,3004 **** denorm = 0; ecleaz (yy); ! #ifdef IBMPC ! e += 7; #endif r = *e; --- 3035,3041 ---- denorm = 0; ecleaz (yy); ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! e += 7; #endif r = *e; *************** *** 3011,3033 **** { #ifdef NANS ! #ifdef IBMPC ! for (i = 0; i < 7; i++) { ! if (pe[i] != 0) { ! enan (y, yy[0] != 0); ! return; } } ! #else ! for (i = 1; i < 8; i++) { ! if (pe[i] != 0) { ! enan (y, yy[0] != 0); ! return; } } - #endif #endif /* NANS */ eclear (y); --- 3048,3073 ---- { #ifdef NANS ! if (! REAL_WORDS_BIG_ENDIAN) { ! for (i = 0; i < 7; i++) { ! if (pe[i] != 0) ! { ! enan (y, yy[0] != 0); ! return; ! } } } ! else { ! for (i = 1; i < 8; i++) { ! if (pe[i] != 0) ! { ! enan (y, yy[0] != 0); ! return; ! } } } #endif /* NANS */ eclear (y); *************** *** 3040,3051 **** yy[E] = r; p = &yy[M + 1]; ! #ifdef IBMPC ! for (i = 0; i < 7; i++) ! *p++ = *(--e); ! #endif ! #ifdef MIEEE ! ++e; ! for (i = 0; i < 7; i++) ! *p++ = *e++; #endif /* If denormal, remove the implied bit; else shift down 1. */ --- 3080,3095 ---- yy[E] = r; p = &yy[M + 1]; ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! { ! for (i = 0; i < 7; i++) ! *p++ = *(--e); ! } ! else ! { ! ++e; ! for (i = 0; i < 7; i++) ! *p++ = *e++; ! } #endif /* If denormal, remove the implied bit; else shift down 1. */ *************** *** 3062,3067 **** } ! ! /* Convert IEEE single precision to e type. */ static void --- 3106,3110 ---- } ! /* Convert single precision float PE to e type Y. */ static void *************** *** 3082,3087 **** denorm = 0; /* flag if denormalized number */ ecleaz (yy); ! #ifdef IBMPC ! e += 1; #endif #ifdef DEC --- 3125,3131 ---- denorm = 0; /* flag if denormalized number */ ecleaz (yy); ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! e += 1; #endif #ifdef DEC *************** *** 3098,3114 **** { #ifdef NANS ! #ifdef MIEEE ! if (((pe[0] & 0x7f) != 0) || (pe[1] != 0)) { ! enan (y, yy[0] != 0); ! return; } ! #else ! if (((pe[1] & 0x7f) != 0) || (pe[0] != 0)) { ! enan (y, yy[0] != 0); ! return; } - #endif #endif /* NANS */ eclear (y); --- 3142,3161 ---- { #ifdef NANS ! if (REAL_WORDS_BIG_ENDIAN) { ! if (((pe[0] & 0x7f) != 0) || (pe[1] != 0)) ! { ! enan (y, yy[0] != 0); ! return; ! } } ! else { ! if (((pe[1] & 0x7f) != 0) || (pe[0] != 0)) ! { ! enan (y, yy[0] != 0); ! return; ! } } #endif /* NANS */ eclear (y); *************** *** 3130,3142 **** yy[E] = r; p = &yy[M + 1]; - #ifdef IBMPC - *p++ = *(--e); - #endif #ifdef DEC *p++ = *(--e); #endif ! #ifdef MIEEE ! ++e; ! *p++ = *e++; #endif eshift (yy, -8); --- 3177,3191 ---- yy[E] = r; p = &yy[M + 1]; #ifdef DEC *p++ = *(--e); #endif ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! *p++ = *(--e); ! else ! { ! ++e; ! *p++ = *e++; ! } #endif eshift (yy, -8); *************** *** 3152,3155 **** --- 3201,3205 ---- } + /* Convert e-type X to IEEE 128-bit long double format E. */ static void *************** *** 3183,3187 **** } ! /* Move out internal format to ieee long double */ static void --- 3233,3238 ---- } ! /* Convert exploded e-type X, that has already been rounded to ! 113-bit precision, to IEEE 128-bit long double format Y. */ static void *************** *** 3200,3208 **** #endif p = a; ! #ifdef MIEEE ! q = b; ! #else ! q = b + 7; /* point to output exponent */ ! #endif /* If not denormal, delete the implied bit. */ --- 3251,3258 ---- #endif p = a; ! if (REAL_WORDS_BIG_ENDIAN) ! q = b; ! else ! q = b + 7; /* point to output exponent */ /* If not denormal, delete the implied bit. */ *************** *** 3213,3239 **** /* combine sign and exponent */ i = *p++; ! #ifdef MIEEE ! if (i) ! *q++ = *p++ | 0x8000; ! else ! *q++ = *p++; ! #else ! if (i) ! *q-- = *p++ | 0x8000; else ! *q-- = *p++; ! #endif /* skip over guard word */ ++p; /* move the significand */ ! #ifdef MIEEE ! for (i = 0; i < 7; i++) ! *q++ = *p++; ! #else ! for (i = 0; i < 7; i++) ! *q-- = *p++; ! #endif } static void etoe64 (x, e) --- 3263,3297 ---- /* combine sign and exponent */ i = *p++; ! if (REAL_WORDS_BIG_ENDIAN) ! { ! if (i) ! *q++ = *p++ | 0x8000; ! else ! *q++ = *p++; ! } else ! { ! if (i) ! *q-- = *p++ | 0x8000; ! else ! *q-- = *p++; ! } /* skip over guard word */ ++p; /* move the significand */ ! if (REAL_WORDS_BIG_ENDIAN) ! { ! for (i = 0; i < 7; i++) ! *q++ = *p++; ! } ! else ! { ! for (i = 0; i < 7; i++) ! *q-- = *p++; ! } } + /* Convert e-type X to IEEE double extended format E. */ + static void etoe64 (x, e) *************** *** 3267,3272 **** } ! ! /* Move out internal format to ieee long double. */ static void --- 3325,3330 ---- } ! /* Convert exploded e-type X, that has already been rounded to ! 64-bit precision, to IEEE double extended format Y. */ static void *************** *** 3284,3301 **** } #endif p = a; ! #if defined(MIEEE) || defined(IBM) q = b; ! #else ! q = b + 4; /* point to output exponent */ #if LONG_DOUBLE_TYPE_SIZE == 96 ! /* Clear the last two bytes of 12-byte Intel format */ ! *(q+1) = 0; #endif #endif /* combine sign and exponent */ i = *p++; ! #if defined(MIEEE) || defined(IBM) if (i) *q++ = *p++ | 0x8000; --- 3342,3371 ---- } #endif + /* Shift denormal long double Intel format significand down one bit. */ + if ((a[E] == 0) && ! REAL_WORDS_BIG_ENDIAN) + eshdn1 (a); p = a; ! #ifdef IBM q = b; ! #endif ! #ifdef DEC ! q = b + 4; ! #endif ! #ifdef IEEE ! if (REAL_WORDS_BIG_ENDIAN) ! q = b; ! else ! { ! q = b + 4; /* point to output exponent */ #if LONG_DOUBLE_TYPE_SIZE == 96 ! /* Clear the last two bytes of 12-byte Intel format */ ! *(q+1) = 0; #endif + } #endif /* combine sign and exponent */ i = *p++; ! #ifdef IBM if (i) *q++ = *p++ | 0x8000; *************** *** 3303,3307 **** *q++ = *p++; *q++ = 0; ! #else if (i) *q-- = *p++ | 0x8000; --- 3373,3378 ---- *q++ = *p++; *q++ = 0; ! #endif ! #ifdef DEC if (i) *q-- = *p++ | 0x8000; *************** *** 3309,3328 **** *q-- = *p++; #endif /* skip over guard word */ ++p; /* move the significand */ ! #if defined(MIEEE) || defined(IBM) for (i = 0; i < 4; i++) *q++ = *p++; ! #else for (i = 0; i < 4; i++) *q-- = *p++; #endif } ! ! /* e type to IEEE double precision. */ #ifdef DEC static void --- 3380,3440 ---- *q-- = *p++; #endif + #ifdef IEEE + if (REAL_WORDS_BIG_ENDIAN) + { + if (i) + *q++ = *p++ | 0x8000; + else + *q++ = *p++; + *q++ = 0; + } + else + { + if (i) + *q-- = *p++ | 0x8000; + else + *q-- = *p++; + } + #endif /* skip over guard word */ ++p; /* move the significand */ ! #ifdef IBM for (i = 0; i < 4; i++) *q++ = *p++; ! #endif ! #ifdef DEC for (i = 0; i < 4; i++) *q-- = *p++; #endif + #ifdef IEEE + if (REAL_WORDS_BIG_ENDIAN) + { + for (i = 0; i < 4; i++) + *q++ = *p++; + } + else + { + #ifdef INFINITY + if (eiisinf (a)) + { + /* Intel long double infinity significand. */ + *q-- = 0x8000; + *q-- = 0; + *q-- = 0; + *q = 0; + return; + } + #endif + for (i = 0; i < 4; i++) + *q-- = *p++; + } + #endif } ! /* e type to double precision. */ #ifdef DEC + /* Convert e-type X to DEC-format double E. */ static void *************** *** 3333,3336 **** --- 3445,3451 ---- } + /* Convert exploded e-type X, that has already been rounded to + 56-bit double precision, to DEC double Y. */ + static void toe53 (x, y) *************** *** 3342,3345 **** --- 3457,3461 ---- #else #ifdef IBM + /* Convert e-type X to IBM 370-format double E. */ static void *************** *** 3350,3353 **** --- 3466,3472 ---- } + /* Convert exploded e-type X, that has already been rounded to + 56-bit precision, to IBM 370 double Y. */ + static void toe53 (x, y) *************** *** 3359,3362 **** --- 3478,3483 ---- #else /* it's neither DEC nor IBM */ + /* Convert e-type X to IEEE double E. */ + static void etoe53 (x, e) *************** *** 3390,3393 **** --- 3511,3516 ---- } + /* Convert exploded e-type X, that has already been rounded to + 53-bit precision, to IEEE double Y. */ static void *************** *** 3406,3411 **** #endif p = &x[0]; ! #ifdef IBMPC ! y += 3; #endif *y = 0; /* output high order */ --- 3529,3535 ---- #endif p = &x[0]; ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! y += 3; #endif *y = 0; /* output high order */ *************** *** 3418,3445 **** #ifdef INFINITY *y |= 0x7ff0; ! #ifdef IBMPC ! *(--y) = 0; ! *(--y) = 0; ! *(--y) = 0; ! #endif ! #ifdef MIEEE ! ++y; ! *y++ = 0; ! *y++ = 0; ! *y++ = 0; ! #endif #else *y |= (unsigned EMUSHORT) 0x7fef; ! #ifdef IBMPC ! *(--y) = 0xffff; ! *(--y) = 0xffff; ! *(--y) = 0xffff; ! #endif ! #ifdef MIEEE ! ++y; ! *y++ = 0xffff; ! *y++ = 0xffff; ! *y++ = 0xffff; ! #endif #endif return; --- 3542,3573 ---- #ifdef INFINITY *y |= 0x7ff0; ! if (! REAL_WORDS_BIG_ENDIAN) ! { ! *(--y) = 0; ! *(--y) = 0; ! *(--y) = 0; ! } ! else ! { ! ++y; ! *y++ = 0; ! *y++ = 0; ! *y++ = 0; ! } #else *y |= (unsigned EMUSHORT) 0x7fef; ! if (! REAL_WORDS_BIG_ENDIAN) ! { ! *(--y) = 0xffff; ! *(--y) = 0xffff; ! *(--y) = 0xffff; ! } ! else ! { ! ++y; ! *y++ = 0xffff; ! *y++ = 0xffff; ! *y++ = 0xffff; ! } #endif return; *************** *** 3456,3470 **** i |= *p++ & (unsigned EMUSHORT) 0x0f; /* *p = xi[M] */ *y |= (unsigned EMUSHORT) i; /* high order output already has sign bit set */ ! #ifdef IBMPC ! *(--y) = *p++; ! *(--y) = *p++; ! *(--y) = *p; ! #endif ! #ifdef MIEEE ! ++y; ! *y++ = *p++; ! *y++ = *p++; ! *y++ = *p++; ! #endif } --- 3584,3600 ---- i |= *p++ & (unsigned EMUSHORT) 0x0f; /* *p = xi[M] */ *y |= (unsigned EMUSHORT) i; /* high order output already has sign bit set */ ! if (! REAL_WORDS_BIG_ENDIAN) ! { ! *(--y) = *p++; ! *(--y) = *p++; ! *(--y) = *p; ! } ! else ! { ! ++y; ! *y++ = *p++; ! *y++ = *p++; ! *y++ = *p++; ! } } *************** *** 3474,3480 **** ! /* e type to IEEE single precision. */ #ifdef IBM static void --- 3604,3611 ---- ! /* e type to single precision. */ #ifdef IBM + /* Convert e-type X to IBM 370 float E. */ static void *************** *** 3485,3488 **** --- 3616,3622 ---- } + /* Convert exploded e-type X, that has already been rounded to + float precision, to IBM 370 float Y. */ + static void toe24 (x, y) *************** *** 3493,3496 **** --- 3627,3631 ---- #else + /* Convert e-type X to IEEE float E. DEC float is the same as IEEE float. */ static void *************** *** 3525,3528 **** --- 3660,3666 ---- } + /* Convert exploded e-type X, that has already been rounded to + float precision, to IEEE float Y. */ + static void toe24 (x, y) *************** *** 3540,3545 **** #endif p = &x[0]; ! #ifdef IBMPC ! y += 1; #endif #ifdef DEC --- 3678,3684 ---- #endif p = &x[0]; ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! y += 1; #endif #ifdef DEC *************** *** 3556,3580 **** #ifdef INFINITY *y |= (unsigned EMUSHORT) 0x7f80; - #ifdef IBMPC - *(--y) = 0; - #endif #ifdef DEC *(--y) = 0; #endif ! #ifdef MIEEE ! ++y; ! *y = 0; #endif #else /* no INFINITY */ *y |= (unsigned EMUSHORT) 0x7f7f; - #ifdef IBMPC - *(--y) = 0xffff; - #endif #ifdef DEC *(--y) = 0xffff; #endif ! #ifdef MIEEE ! ++y; ! *y = 0xffff; #endif #ifdef ERANGE --- 3695,3723 ---- #ifdef INFINITY *y |= (unsigned EMUSHORT) 0x7f80; #ifdef DEC *(--y) = 0; #endif ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! *(--y) = 0; ! else ! { ! ++y; ! *y = 0; ! } #endif #else /* no INFINITY */ *y |= (unsigned EMUSHORT) 0x7f7f; #ifdef DEC *(--y) = 0xffff; #endif ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! *(--y) = 0xffff; ! else ! { ! ++y; ! *y = 0xffff; ! } #endif #ifdef ERANGE *************** *** 3594,3607 **** } i |= *p++ & (unsigned EMUSHORT) 0x7f; /* *p = xi[M] */ ! *y |= i; /* high order output already has sign bit set */ ! #ifdef IBMPC ! *(--y) = *p; ! #endif #ifdef DEC *(--y) = *p; #endif ! #ifdef MIEEE ! ++y; ! *y = *p; #endif } --- 3737,3753 ---- } i |= *p++ & (unsigned EMUSHORT) 0x7f; /* *p = xi[M] */ ! /* High order output already has sign bit set. */ ! *y |= i; #ifdef DEC *(--y) = *p; #endif ! #ifdef IEEE ! if (! REAL_WORDS_BIG_ENDIAN) ! *(--y) = *p; ! else ! { ! ++y; ! *y = *p; ! } #endif } *************** *** 3666,3671 **** return (0); /* equality */ - - diff: --- 3812,3815 ---- *************** *** 3676,3683 **** } ! ! ! ! /* Find nearest integer to x = floor (x + 0.5). */ static void --- 3820,3824 ---- } ! /* Find e-type nearest integer to X, as floor (X + 0.5). */ static void *************** *** 3689,3696 **** } ! ! ! ! /* Convert HOST_WIDE_INT to e type. */ static void --- 3830,3834 ---- } ! /* Convert HOST_WIDE_INT LP to e type Y. */ static void *************** *** 3734,3738 **** } ! /* Convert unsigned HOST_WIDE_INT to e type. */ static void --- 3872,3876 ---- } ! /* Convert unsigned HOST_WIDE_INT LP to e type Y. */ static void *************** *** 3769,3774 **** ! /* Find signed HOST_WIDE_INT integer and floating point fractional ! parts of e-type (packed internal format) floating point input X. The integer output I has the sign of the input, except that positive overflow is permitted if FIXUNS_TRUNC_LIKE_FIX_TRUNC. --- 3907,3912 ---- ! /* Find signed HOST_WIDE_INT integer I and floating point fractional ! part FRAC of e-type (packed internal format) floating point input X. The integer output I has the sign of the input, except that positive overflow is permitted if FIXUNS_TRUNC_LIKE_FIX_TRUNC. *************** *** 3855,3861 **** ! /* Find unsigned HOST_WIDE_INT integer and floating point fractional parts. ! A negative e type input yields integer output = 0 ! but correct fraction. */ static void --- 3993,3999 ---- ! /* Find unsigned HOST_WIDE_INT integer I and floating point fractional part ! FRAC of e-type X. A negative input yields integer output = 0 but ! correct fraction. */ static void *************** *** 3926,3933 **** } - - /* Shift significand area up or down by the number of bits given by SC. */ - static int eshift (x, sc) --- 4064,4069 ---- } + /* Shift the significand of exploded e-type X up or down by SC bits. */ static int eshift (x, sc) *************** *** 3993,4000 **** } ! ! ! /* Shift normalize the significand area pointed to by argument. ! Shift count (up = positive) is returned. */ static int --- 4129,4134 ---- } ! /* Shift normalize the significand area of exploded e-type X. ! Return the shift count (up = positive). */ static int *************** *** 4064,4072 **** } ! ! ! ! /* Convert e type number to decimal format ASCII string. ! The constants are for 64 bit precision. */ #define NTEN 12 --- 4198,4202 ---- } ! /* Powers of ten used in decimal <-> binary conversions. */ #define NTEN 12 *************** *** 4170,4173 **** --- 4300,4306 ---- #endif + /* Convert float value X to ASCII string STRING with NDIG digits after + the decimal point. */ + static void e24toasc (x, string, ndigs) *************** *** 4182,4185 **** --- 4315,4320 ---- } + /* Convert double value X to ASCII string STRING with NDIG digits after + the decimal point. */ static void *************** *** 4195,4198 **** --- 4330,4335 ---- } + /* Convert double extended value X to ASCII string STRING with NDIG digits + after the decimal point. */ static void *************** *** 4208,4211 **** --- 4345,4351 ---- } + /* Convert 128-bit long double value X to ASCII string STRING with NDIG digits + after the decimal point. */ + static void e113toasc (x, string, ndigs) *************** *** 4220,4223 **** --- 4360,4365 ---- } + /* Convert e-type X to ASCII string STRING with NDIGS digits after + the decimal point. */ static char wstring[80]; /* working storage for ASCII output */ *************** *** 4272,4276 **** goto tnzro; /* denormalized number */ } ! goto isone; /* legal all zeros */ } tnzro: --- 4414,4418 ---- goto tnzro; /* denormalized number */ } ! goto isone; /* valid all zeros */ } tnzro: *************** *** 4530,4542 **** ! /* Convert ASCII string to quadruple precision floating point ! Numeric input is free field decimal number with max of 15 digits with or ! without decimal point entered as ASCII from teletype. Entering E after ! the number followed by a second number causes the second number to be ! interpreted as a power of 10 to be multiplied by the first number ! (i.e., "scientific" notation). */ ! /* ASCII to single */ static void --- 4672,4683 ---- ! /* Convert ASCII string to floating point. ! Numeric input is a free format decimal number of any length, with ! or without decimal point. Entering E after the number followed by an ! integer number causes the second number to be interpreted as a power of ! 10 to be multiplied by the first number (i.e., "scientific" notation). */ ! /* Convert ASCII string S to single precision float value Y. */ static void *************** *** 4549,4553 **** ! /* ASCII to double */ static void --- 4690,4694 ---- ! /* Convert ASCII string S to double precision value Y. */ static void *************** *** 4564,4568 **** ! /* ASCII to long double */ static void --- 4705,4709 ---- ! /* Convert ASCII string S to double extended value Y. */ static void *************** *** 4574,4578 **** } ! /* ASCII to 128-bit long double */ static void --- 4715,4719 ---- } ! /* Convert ASCII string S to 128-bit long double Y. */ static void *************** *** 4584,4588 **** } ! /* ASCII to super double */ static void --- 4725,4729 ---- } ! /* Convert ASCII string S to e type Y. */ static void *************** *** 4594,4600 **** } - /* ASCII to e type, with specified rounding precision = oprec. */ - static void asctoeg (ss, y, oprec) --- 4735,4741 ---- } + /* Convert ASCII string SS to e type Y, with a specified rounding precision + of OPREC bits. */ static void asctoeg (ss, y, oprec) *************** *** 4910,4914 **** ! /* y = largest integer not greater than x (truncated toward minus infinity) */ static unsigned EMUSHORT bmask[] = --- 5051,5056 ---- ! /* Return Y = largest integer not greater than X (truncated toward minus ! infinity). */ static unsigned EMUSHORT bmask[] = *************** *** 4980,4986 **** ! /* Returns s and exp such that s * 2**exp = x and .5 <= s < 1. ! For example, 1.1 = 0.55 * 2**1 ! Handles denormalized numbers properly using long integer exp. */ static void --- 5122,5127 ---- ! /* Return S and EXP such that S * 2^EXP = X and .5 <= S < 1. ! For example, 1.1 = 0.55 * 2^1. */ static void *************** *** 4994,4997 **** --- 5135,5139 ---- emovi (x, xi); + /* Handle denormalized numbers properly using long integer exponent. */ li = (EMULONG) ((EMUSHORT) xi[1]); *************** *** 5005,5012 **** } ! - /* Return y = x * 2**pwr2. */ - static void eldexp (x, pwr2, y) --- 5147,5152 ---- } ! /* Return e type Y = X * 2^PWR2. */ static void eldexp (x, pwr2, y) *************** *** 5028,5033 **** ! /* c = remainder after dividing b by a ! Least significant integer quotient bits left in equot[]. */ static void --- 5168,5173 ---- ! /* C = remainder after dividing B by A, all e type values. ! Least significant integer quotient bits left in EQUOT. */ static void *************** *** 5064,5067 **** --- 5204,5210 ---- } + /* Return quotient of exploded e-types NUM / DEN in EQUOT, + remainder in NUM. */ + static void eiremain (den, num) *************** *** 5084,5090 **** } else - { j = 0; - } eshup1 (equot); equot[NI - 1] |= j; --- 5227,5231 ---- *************** *** 5095,5100 **** } ! /* This routine may be called to report one of the following ! error conditions (in the include file mconf.h). Mnemonic Value Significance --- 5236,5241 ---- } ! /* Report an error condition CODE encountered in function NAME. ! CODE is one of the following: Mnemonic Value Significance *************** *** 5110,5126 **** ERANGE 34 Unix range error code ! The default version of the file prints the function name, ! passed to it by the pointer fctnam, followed by the ! error condition. The display is directed to the standard ! output device. The routine then returns to the calling ! program. Users may wish to modify the program to abort by ! calling exit under severe error conditions such as domain ! errors. ! ! Since all error conditions pass control to this function, ! the display may be easily changed, eliminated, or directed ! to an error logging device. */ ! ! /* Note: the order of appearance of the following messages is bound to the error codes defined above. */ --- 5251,5255 ---- ERANGE 34 Unix range error code ! The order of appearance of the following messages is bound to the error codes defined above. */ *************** *** 5148,5155 **** char errstr[80]; ! /* Display string passed by calling program, which is supposed to be the name of the function in which the error occurred. ! ! Display error message defined by the code argument. */ if ((code <= 0) || (code >= NMSGS)) --- 5277,5283 ---- char errstr[80]; ! /* The string passed by the calling program is supposed to be the name of the function in which the error occurred. ! The code argument selects which error message string will be printed. */ if ((code <= 0) || (code >= NMSGS)) *************** *** 5163,5167 **** #ifdef DEC ! /* Convert DEC double precision to e type. */ static void --- 5291,5295 ---- #ifdef DEC ! /* Convert DEC double precision D to e type E. */ static void *************** *** 5203,5214 **** } ! ! ! /* ! ; convert e type to DEC double precision ! ; double d; ! ; EMUSHORT e[NE]; ! ; etodec (e, &d); ! */ static void --- 5331,5335 ---- } ! /* Convert e type X to DEC double precision D. */ static void *************** *** 5221,5226 **** emovi (x, xi); ! exp = (EMULONG) xi[E] - (EXONE - 0201); /* adjust exponent for offsets */ ! /* round off to nearest or even */ rndsav = rndprc; rndprc = 56; --- 5342,5348 ---- emovi (x, xi); ! /* Adjust exponent for offsets. */ ! exp = (EMULONG) xi[E] - (EXONE - 0201); ! /* Round off to nearest or even. */ rndsav = rndprc; rndprc = 56; *************** *** 5230,5233 **** --- 5352,5358 ---- } + /* Convert exploded e-type X, that has already been rounded to + 56-bit precision, to DEC format double Y. */ + static void todec (x, y) *************** *** 5401,5410 **** TFMODE_NAN; #else ! #ifdef MIEEE ! unsigned EMUSHORT TFnan[8] = {0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}; ! #endif ! #ifdef IBMPC ! unsigned EMUSHORT TFnan[8] = {0, 0, 0, 0, 0, 0, 0x8000, 0xffff}; #endif #endif --- 5526,5533 ---- TFMODE_NAN; #else ! #ifdef IEEE ! unsigned EMUSHORT TFbignan[8] = {0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}; ! unsigned EMUSHORT TFlittlenan[8] = {0, 0, 0, 0, 0, 0, 0x8000, 0xffff}; #endif #endif *************** *** 5413,5432 **** XFMODE_NAN; #else ! #ifdef MIEEE ! unsigned EMUSHORT XFnan[6] = {0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}; #endif - #ifdef IBMPC - unsigned EMUSHORT XFnan[6] = {0, 0, 0, 0xc000, 0xffff, 0}; #endif - #endif #ifdef DFMODE_NAN DFMODE_NAN; #else ! #ifdef MIEEE ! unsigned EMUSHORT DFnan[4] = {0x7fff, 0xffff, 0xffff, 0xffff}; ! #endif ! #ifdef IBMPC ! unsigned EMUSHORT DFnan[4] = {0, 0, 0, 0xfff8}; #endif #endif --- 5536,5552 ---- XFMODE_NAN; #else ! #ifdef IEEE ! unsigned EMUSHORT XFbignan[6] = ! {0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}; ! unsigned EMUSHORT XFlittlenan[6] = {0, 0, 0, 0xc000, 0xffff, 0}; #endif #endif #ifdef DFMODE_NAN DFMODE_NAN; #else ! #ifdef IEEE ! unsigned EMUSHORT DFbignan[4] = {0x7fff, 0xffff, 0xffff, 0xffff}; ! unsigned EMUSHORT DFlittlenan[4] = {0, 0, 0, 0xfff8}; #endif #endif *************** *** 5435,5445 **** SFMODE_NAN; #else ! #ifdef MIEEE ! unsigned EMUSHORT SFnan[2] = {0x7fff, 0xffff}; #endif - #ifdef IBMPC - unsigned EMUSHORT SFnan[2] = {0, 0xffc0}; #endif - #endif --- 5555,5563 ---- SFMODE_NAN; #else ! #ifdef IEEE ! unsigned EMUSHORT SFbignan[2] = {0x7fff, 0xffff}; ! unsigned EMUSHORT SFlittlenan[2] = {0, 0xffc0}; #endif #endif *************** *** 5460,5477 **** case TFmode: n = 8; ! p = TFnan; break; case XFmode: n = 6; ! p = XFnan; break; case DFmode: n = 4; ! p = DFnan; break; case HFmode: case SFmode: n = 2; ! p = SFnan; break; #endif --- 5578,5607 ---- case TFmode: n = 8; ! if (REAL_WORDS_BIG_ENDIAN) ! p = TFbignan; ! else ! p = TFlittlenan; break; case XFmode: n = 6; ! if (REAL_WORDS_BIG_ENDIAN) ! p = XFbignan; ! else ! p = XFlittlenan; break; case DFmode: n = 4; ! if (REAL_WORDS_BIG_ENDIAN) ! p = DFbignan; ! else ! p = DFlittlenan; break; case HFmode: case SFmode: n = 2; ! if (REAL_WORDS_BIG_ENDIAN) ! p = SFbignan; ! else ! p = SFlittlenan; break; #endif *************** *** 5479,5490 **** abort (); } ! #ifdef MIEEE ! *nan++ = (sign << 15) | *p++; ! #endif while (--n != 0) *nan++ = *p++; ! #ifndef MIEEE ! *nan = (sign << 15) | *p; ! #endif } --- 5609,5618 ---- abort (); } ! if (REAL_WORDS_BIG_ENDIAN) ! *nan++ = (sign << 15) | *p++; while (--n != 0) *nan++ = *p++; ! if (! REAL_WORDS_BIG_ENDIAN) ! *nan = (sign << 15) | *p; } *************** *** 5503,5513 **** /* Convert 32 bit integer to array of 16 bit pieces in target machine order. This is the inverse operation to what the function `endian' does. */ ! #if FLOAT_WORDS_BIG_ENDIAN ! s[0] = (unsigned EMUSHORT) (f >> 16); ! s[1] = (unsigned EMUSHORT) f; ! #else ! s[0] = (unsigned EMUSHORT) f; ! s[1] = (unsigned EMUSHORT) (f >> 16); ! #endif /* Convert and promote the target float to E-type. */ e24toe (s, e); --- 5631,5644 ---- /* Convert 32 bit integer to array of 16 bit pieces in target machine order. This is the inverse operation to what the function `endian' does. */ ! if (REAL_WORDS_BIG_ENDIAN) ! { ! s[0] = (unsigned EMUSHORT) (f >> 16); ! s[1] = (unsigned EMUSHORT) f; ! } ! else ! { ! s[0] = (unsigned EMUSHORT) f; ! s[1] = (unsigned EMUSHORT) (f >> 16); ! } /* Convert and promote the target float to E-type. */ e24toe (s, e); *************** *** 5536,5563 **** /* Convert array of HOST_WIDE_INT to equivalent array of 16-bit pieces. */ ! #if FLOAT_WORDS_BIG_ENDIAN ! s[0] = (unsigned EMUSHORT) (d[0] >> 16); ! s[1] = (unsigned EMUSHORT) d[0]; #if HOST_BITS_PER_WIDE_INT == 32 ! s[2] = (unsigned EMUSHORT) (d[1] >> 16); ! s[3] = (unsigned EMUSHORT) d[1]; #else ! /* In this case the entire target double is contained in the ! first array element. The second element of the input is ignored. */ ! s[2] = (unsigned EMUSHORT) (d[0] >> 48); ! s[3] = (unsigned EMUSHORT) (d[0] >> 32); #endif ! #else ! /* Target float words are little-endian. */ ! s[0] = (unsigned EMUSHORT) d[0]; ! s[1] = (unsigned EMUSHORT) (d[0] >> 16); #if HOST_BITS_PER_WIDE_INT == 32 ! s[2] = (unsigned EMUSHORT) d[1]; ! s[3] = (unsigned EMUSHORT) (d[1] >> 16); #else ! s[2] = (unsigned EMUSHORT) (d[0] >> 32); ! s[3] = (unsigned EMUSHORT) (d[0] >> 48); #endif ! #endif /* Convert target double to E-type. */ e53toe (s, e); --- 5667,5698 ---- /* Convert array of HOST_WIDE_INT to equivalent array of 16-bit pieces. */ ! if (REAL_WORDS_BIG_ENDIAN) ! { ! s[0] = (unsigned EMUSHORT) (d[0] >> 16); ! s[1] = (unsigned EMUSHORT) d[0]; #if HOST_BITS_PER_WIDE_INT == 32 ! s[2] = (unsigned EMUSHORT) (d[1] >> 16); ! s[3] = (unsigned EMUSHORT) d[1]; #else ! /* In this case the entire target double is contained in the ! first array element. The second element of the input is ! ignored. */ ! s[2] = (unsigned EMUSHORT) (d[0] >> 48); ! s[3] = (unsigned EMUSHORT) (d[0] >> 32); #endif ! } ! else ! { ! /* Target float words are little-endian. */ ! s[0] = (unsigned EMUSHORT) d[0]; ! s[1] = (unsigned EMUSHORT) (d[0] >> 16); #if HOST_BITS_PER_WIDE_INT == 32 ! s[2] = (unsigned EMUSHORT) d[1]; ! s[3] = (unsigned EMUSHORT) (d[1] >> 16); #else ! s[2] = (unsigned EMUSHORT) (d[0] >> 32); ! s[3] = (unsigned EMUSHORT) (d[0] >> 48); #endif ! } /* Convert target double to E-type. */ e53toe (s, e); *************** *** 5570,5574 **** /* Convert target computer unsigned 64-bit integer to e-type. The endian-ness of DImode follows the convention for integers, ! so we use WORDS_BIG_ENDIAN here, not FLOAT_WORDS_BIG_ENDIAN. */ static void --- 5705,5709 ---- /* Convert target computer unsigned 64-bit integer to e-type. The endian-ness of DImode follows the convention for integers, ! so we use WORDS_BIG_ENDIAN here, not REAL_WORDS_BIG_ENDIAN. */ static void *************** *** 5581,5591 **** ecleaz (yi); ! #if WORDS_BIG_ENDIAN ! for (k = M; k < M + 4; k++) ! yi[k] = *di++; ! #else ! for (k = M + 3; k >= M; k--) ! yi[k] = *di++; ! #endif yi[E] = EXONE + 47; /* exponent if normalize shift count were 0 */ if ((k = enormlz (yi)) > NBITS)/* normalize the significand */ --- 5716,5729 ---- ecleaz (yi); ! if (WORDS_BIG_ENDIAN) ! { ! for (k = M; k < M + 4; k++) ! yi[k] = *di++; ! } ! else ! { ! for (k = M + 3; k >= M; k--) ! yi[k] = *di++; ! } yi[E] = EXONE + 47; /* exponent if normalize shift count were 0 */ if ((k = enormlz (yi)) > NBITS)/* normalize the significand */ *************** *** 5609,5619 **** ecleaz (yi); ! #if WORDS_BIG_ENDIAN ! for (k = M; k < M + 4; k++) ! yi[k] = *di++; ! #else ! for (k = M + 3; k >= M; k--) ! yi[k] = *di++; ! #endif /* Take absolute value */ sign = 0; --- 5747,5760 ---- ecleaz (yi); ! if (WORDS_BIG_ENDIAN) ! { ! for (k = M; k < M + 4; k++) ! yi[k] = *di++; ! } ! else ! { ! for (k = M + 3; k >= M; k--) ! yi[k] = *di++; ! } /* Take absolute value */ sign = 0; *************** *** 5681,5699 **** j = 16; eshift (xi, j); ! #if WORDS_BIG_ENDIAN ! *i++ = xi[M]; ! #else ! i += 3; ! *i-- = xi[M]; ! #endif k -= j; do { eshup6 (xi); ! #if WORDS_BIG_ENDIAN ! *i++ = xi[M]; ! #else ! *i-- = xi[M]; ! #endif } while ((k -= 16) > 0); --- 5822,5840 ---- j = 16; eshift (xi, j); ! if (WORDS_BIG_ENDIAN) ! *i++ = xi[M]; ! else ! { ! i += 3; ! *i-- = xi[M]; ! } k -= j; do { eshup6 (xi); ! if (WORDS_BIG_ENDIAN) ! *i++ = xi[M]; ! else ! *i-- = xi[M]; } while ((k -= 16) > 0); *************** *** 5706,5721 **** noshift: ! #if WORDS_BIG_ENDIAN ! i += 3; ! *i-- = xi[M]; ! *i-- = 0; ! *i-- = 0; ! *i = 0; ! #else ! *i++ = xi[M]; ! *i++ = 0; ! *i++ = 0; ! *i = 0; ! #endif } } --- 5847,5865 ---- noshift: ! if (WORDS_BIG_ENDIAN) ! { ! i += 3; ! *i-- = xi[M]; ! *i-- = 0; ! *i-- = 0; ! *i = 0; ! } ! else ! { ! *i++ = xi[M]; ! *i++ = 0; ! *i++ = 0; ! *i = 0; ! } } } *************** *** 5760,5778 **** j = 16; eshift (xi, j); ! #if WORDS_BIG_ENDIAN ! *i++ = xi[M]; ! #else ! i += 3; ! *i-- = xi[M]; ! #endif k -= j; do { eshup6 (xi); ! #if WORDS_BIG_ENDIAN ! *i++ = xi[M]; ! #else ! *i-- = xi[M]; ! #endif } while ((k -= 16) > 0); --- 5904,5922 ---- j = 16; eshift (xi, j); ! if (WORDS_BIG_ENDIAN) ! *i++ = xi[M]; ! else ! { ! i += 3; ! *i-- = xi[M]; ! } k -= j; do { eshup6 (xi); ! if (WORDS_BIG_ENDIAN) ! *i++ = xi[M]; ! else ! *i-- = xi[M]; } while ((k -= 16) > 0); *************** *** 5783,5798 **** eshift (xi, k); ! #if WORDS_BIG_ENDIAN ! i += 3; ! *i = xi[M]; ! *i-- = 0; ! *i-- = 0; ! *i = 0; ! #else ! *i++ = xi[M]; ! *i++ = 0; ! *i++ = 0; ! *i = 0; ! #endif } /* Negate if negative */ --- 5927,5945 ---- eshift (xi, k); ! if (WORDS_BIG_ENDIAN) ! { ! i += 3; ! *i = xi[M]; ! *i-- = 0; ! *i-- = 0; ! *i = 0; ! } ! else ! { ! *i++ = xi[M]; ! *i++ = 0; ! *i++ = 0; ! *i = 0; ! } } /* Negate if negative */ *************** *** 5800,5814 **** { carry = 0; ! #if WORDS_BIG_ENDIAN ! isave += 3; ! #endif for (k = 0; k < 4; k++) { acc = (unsigned EMULONG) (~(*isave) & 0xffff) + carry; ! #if WORDS_BIG_ENDIAN ! *isave-- = acc; ! #else ! *isave++ = acc; ! #endif carry = 0; if (acc & 0x10000) --- 5947,5959 ---- { carry = 0; ! if (WORDS_BIG_ENDIAN) ! isave += 3; for (k = 0; k < 4; k++) { acc = (unsigned EMULONG) (~(*isave) & 0xffff) + carry; ! if (WORDS_BIG_ENDIAN) ! *isave-- = acc; ! else ! *isave++ = acc; carry = 0; if (acc & 0x10000) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/real.h gcc-2.7.0/real.h *** gcc-2.6.3/real.h Tue Jun 14 18:01:12 1994 --- gcc-2.7.0/real.h Thu Jun 15 07:57:56 1995 *************** *** 16,20 **** 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. */ #ifndef REAL_H_INCLUDED --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef REAL_H_INCLUDED *************** *** 261,277 **** proper word order for the target. */ #ifndef REAL_VALUE_TO_TARGET_DOUBLE - #if HOST_FLOAT_WORDS_BIG_ENDIAN == FLOAT_WORDS_BIG_ENDIAN #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \ do { REAL_VALUE_TYPE in = (IN); /* Make sure it's not in a register. */\ ! (OUT)[0] = ((long *) &in)[0]; \ ! (OUT)[1] = ((long *) &in)[1]; \ } while (0) - #else - #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \ - do { REAL_VALUE_TYPE in = (IN); /* Make sure it's not in a register. */\ - (OUT)[1] = ((long *) &in)[0]; \ - (OUT)[0] = ((long *) &in)[1]; \ - } while (0) - #endif #endif #endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */ --- 262,278 ---- proper word order for the target. */ #ifndef REAL_VALUE_TO_TARGET_DOUBLE #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \ do { REAL_VALUE_TYPE in = (IN); /* Make sure it's not in a register. */\ ! if (HOST_FLOAT_WORDS_BIG_ENDIAN == FLOAT_WORDS_BIG_ENDIAN) \ ! { \ ! (OUT)[0] = ((long *) &in)[0]; \ ! (OUT)[1] = ((long *) &in)[1]; \ ! } \ ! else \ ! { \ ! (OUT)[1] = ((long *) &in)[0]; \ ! (OUT)[0] = ((long *) &in)[1]; \ ! } \ } while (0) #endif #endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/recog.c gcc-2.7.0/recog.c *** gcc-2.6.3/recog.c Mon Oct 17 11:28:23 1994 --- gcc-2.7.0/recog.c Thu Jun 15 07:58:34 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 85,89 **** /* Try recognizing the instruction INSN, and return the code number that results. ! Remeber the code so that repeated calls do not need to spend the time for actual rerecognition. --- 86,90 ---- /* Try recognizing the instruction INSN, and return the code number that results. ! Remember the code so that repeated calls do not need to spend the time for actual rerecognition. *************** *** 424,432 **** rtx new; ! #if BYTES_BIG_ENDIAN ! offset += (MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))); ! #endif new = gen_rtx (MEM, mode, plus_constant (XEXP (to, 0), offset)); --- 425,432 ---- rtx new; ! if (BYTES_BIG_ENDIAN) ! offset += (MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))); new = gen_rtx (MEM, mode, plus_constant (XEXP (to, 0), offset)); *************** *** 475,482 **** /* If the bytes and bits are counted differently, we must adjust the offset. */ ! #if BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN ! offset = (GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (wanted_mode) ! - offset); ! #endif pos %= GET_MODE_BITSIZE (wanted_mode); --- 475,481 ---- /* If the bytes and bits are counted differently, we must adjust the offset. */ ! if (BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN) ! offset = (GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (wanted_mode) ! - offset); pos %= GET_MODE_BITSIZE (wanted_mode); *************** *** 1084,1091 **** rtx inner = SUBREG_REG (op); ! #if BYTES_BIG_ENDIAN ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (op))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (inner)))); ! #endif if (mode != VOIDmode && GET_MODE (op) != mode) --- 1083,1089 ---- rtx inner = SUBREG_REG (op); ! if (BYTES_BIG_ENDIAN) ! offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (op))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (inner)))); if (mode != VOIDmode && GET_MODE (op) != mode) *************** *** 1787,1790 **** --- 1785,1789 ---- case 'E': + #ifndef REAL_ARITHMETIC /* Match any CONST_DOUBLE, but only if we can examine the bits of it reliably. */ *************** *** 1793,1796 **** --- 1792,1796 ---- && GET_MODE (op) != VOIDmode && ! flag_pretend_float) break; + #endif if (GET_CODE (op) == CONST_DOUBLE) win = 1; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/recog.h gcc-2.7.0/recog.h *** gcc-2.6.3/recog.h Fri Mar 19 21:10:57 1993 --- gcc-2.7.0/recog.h Thu Jun 15 07:58:13 1995 *************** *** 16,20 **** 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. */ /* Add prototype support. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Add prototype support. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/reg-stack.c gcc-2.7.0/reg-stack.c *** gcc-2.6.3/reg-stack.c Sat Nov 5 13:57:40 1994 --- gcc-2.7.0/reg-stack.c Thu Jun 15 17:36:05 1995 *************** *** 1,4 **** /* Register to Stack convert for GNU compiler. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Register to Stack convert for GNU compiler. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 pass converts stack-like registers from the "flat register --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This pass converts stack-like registers from the "flat register *************** *** 170,176 **** #define REG_STACK_SIZE (LAST_STACK_REG - FIRST_STACK_REG + 1) - /* True if the current function returns a real value. */ - static int current_function_returns_real; - /* This is the basic stack record. TOP is an index into REG[] such that REG[TOP] is the top of stack. If TOP is -1 the stack is empty. --- 171,174 ---- *************** *** 220,224 **** /* This is the register file for all register after conversion */ ! static rtx FP_mode_reg[FIRST_PSEUDO_REGISTER][(int) MAX_MACHINE_MODE]; /* Get the basic block number of an insn. See note at block_number --- 218,226 ---- /* This is the register file for all register after conversion */ ! static rtx ! FP_mode_reg[LAST_STACK_REG+1-FIRST_STACK_REG][(int) MAX_MACHINE_MODE]; ! ! #define FP_MODE_REG(regno,mode) \ ! (FP_mode_reg[(regno)-FIRST_STACK_REG][(int)(mode)]) /* Get the basic block number of an insn. See note at block_number *************** *** 241,248 **** --- 243,295 ---- static uses_reg_or_mem (); static void stack_reg_life_analysis (); + static void record_reg_life_pat (); static void change_stack (); static void convert_regs (); static void dump_stack_info (); + /* Mark all registers needed for this pattern. */ + + static void + mark_regs_pat (pat, set) + rtx pat; + HARD_REG_SET *set; + { + enum machine_mode mode; + register int regno; + register int count; + + if (GET_CODE (pat) == SUBREG) + { + mode = GET_MODE (pat); + regno = SUBREG_WORD (pat); + regno += REGNO (SUBREG_REG (pat)); + } + else + regno = REGNO (pat), mode = GET_MODE (pat); + + for (count = HARD_REGNO_NREGS (regno, mode); + count; count--, regno++) + SET_HARD_REG_BIT (*set, regno); + } + + /* Reorganise the stack into ascending numbers, + after this insn. */ + + static void + straighten_stack (insn, regstack) + rtx insn; + stack regstack; + { + struct stack_def temp_stack; + int top; + + temp_stack.reg_set = regstack->reg_set; + + for (top = temp_stack.top = regstack->top; top >= 0; top--) + temp_stack.reg[top] = FIRST_STACK_REG + temp_stack.top - top; + + change_stack (insn, regstack, &temp_stack, emit_insn_after); + } + /* Return non-zero if any stack register is mentioned somewhere within PAT. */ *************** *** 294,305 **** int stack_reg_seen = 0; enum machine_mode mode; ! current_function_returns_real ! = TREE_CODE (TREE_TYPE (DECL_RESULT (current_function_decl))) == REAL_TYPE; ! for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode; ! mode = GET_MODE_WIDER_MODE (mode)) ! for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! FP_mode_reg[i][(int) mode] = gen_rtx (REG, mode, i); /* Count the basic blocks. Also find maximum insn uid. */ --- 341,369 ---- int stack_reg_seen = 0; enum machine_mode mode; + HARD_REG_SET stackentry; ! CLEAR_HARD_REG_SET (stackentry); ! { ! static initialised; ! if (!initialised) ! { ! #if 0 ! initialised = 1; /* This array can not have been previously ! initialised, because the rtx's are ! thrown away between compilations of ! functions. */ ! #endif ! for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) ! { ! for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode; ! mode = GET_MODE_WIDER_MODE (mode)) ! FP_MODE_REG (i, mode) = gen_rtx (REG, mode, i); ! for (mode = GET_CLASS_NARROWEST_MODE (MODE_COMPLEX_FLOAT); mode != VOIDmode; ! mode = GET_MODE_WIDER_MODE (mode)) ! FP_MODE_REG (i, mode) = gen_rtx (REG, mode, i); ! } ! } ! } /* Count the basic blocks. Also find maximum insn uid. */ *************** *** 307,310 **** --- 371,375 ---- register RTX_CODE prev_code = BARRIER; register RTX_CODE code; + register before_function_beg = 1; max_uid = 0; *************** *** 328,339 **** blocks++; /* Remember whether or not this insn mentions an FP regs. Check JUMP_INSNs too, in case someone creates a funny PARALLEL. */ ! if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' && stack_regs_mentioned_p (PATTERN (insn))) { stack_reg_seen = 1; PUT_MODE (insn, QImode); } else --- 393,414 ---- blocks++; + if (code == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) + before_function_beg = 0; + /* Remember whether or not this insn mentions an FP regs. Check JUMP_INSNs too, in case someone creates a funny PARALLEL. */ ! if (GET_RTX_CLASS (code) == 'i' && stack_regs_mentioned_p (PATTERN (insn))) { stack_reg_seen = 1; PUT_MODE (insn, QImode); + + /* Note any register passing parameters. */ + + if (before_function_beg && code == INSN + && GET_CODE (PATTERN (insn)) == USE) + record_reg_life_pat (PATTERN (insn), (HARD_REG_SET*) 0, + &stackentry, 1); } else *************** *** 374,378 **** find_blocks (first); ! stack_reg_life_analysis (first); /* Dump the life analysis debug information before jump --- 449,453 ---- find_blocks (first); ! stack_reg_life_analysis (first, &stackentry); /* Dump the life analysis debug information before jump *************** *** 446,456 **** rtx *pat; { ! while (GET_CODE (*pat) == SUBREG ! || GET_CODE (*pat) == FLOAT ! || GET_CODE (*pat) == FIX ! || GET_CODE (*pat) == FLOAT_EXTEND) ! pat = & XEXP (*pat, 0); ! ! return pat; } --- 521,545 ---- rtx *pat; { ! for (;;) ! switch (GET_CODE (*pat)) ! { ! case SUBREG: ! /* eliminate FP subregister accesses in favour of the ! actual FP register in use. */ ! { ! rtx subreg; ! if (FP_REG_P (subreg = SUBREG_REG (*pat))) ! { ! *pat = FP_MODE_REG (REGNO (subreg) + SUBREG_WORD (*pat), ! GET_MODE (subreg)); ! default: ! return pat; ! } ! } ! case FLOAT: ! case FIX: ! case FLOAT_EXTEND: ! pat = & XEXP (*pat, 0); ! } } *************** *** 964,982 **** output (such as ZERO_EXTRACT) - this cannot happen on a 387. */ ! void ! record_reg_life_pat (pat, src, dest) rtx pat; HARD_REG_SET *src, *dest; { register char *fmt; register int i; ! if (STACK_REG_P (pat)) { if (src) ! SET_HARD_REG_BIT (*src, REGNO (pat)); if (dest) ! SET_HARD_REG_BIT (*dest, REGNO (pat)); return; --- 1053,1073 ---- output (such as ZERO_EXTRACT) - this cannot happen on a 387. */ ! static void ! record_reg_life_pat (pat, src, dest, douse) rtx pat; HARD_REG_SET *src, *dest; + int douse; { register char *fmt; register int i; ! if (STACK_REG_P (pat) ! || GET_CODE (pat) == SUBREG && STACK_REG_P (SUBREG_REG (pat))) { if (src) ! mark_regs_pat (pat, src); if (dest) ! mark_regs_pat (pat, dest); return; *************** *** 985,995 **** if (GET_CODE (pat) == SET) { ! record_reg_life_pat (XEXP (pat, 0), NULL_PTR, dest); ! record_reg_life_pat (XEXP (pat, 1), src, NULL_PTR); return; } /* We don't need to consider either of these cases. */ ! if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER) return; --- 1076,1086 ---- if (GET_CODE (pat) == SET) { ! record_reg_life_pat (XEXP (pat, 0), NULL_PTR, dest, 0); ! record_reg_life_pat (XEXP (pat, 1), src, NULL_PTR, 0); return; } /* We don't need to consider either of these cases. */ ! if (GET_CODE (pat) == USE && !douse || GET_CODE (pat) == CLOBBER) return; *************** *** 1002,1009 **** for (j = XVECLEN (pat, i) - 1; j >= 0; j--) ! record_reg_life_pat (XVECEXP (pat, i, j), src, dest); } else if (fmt[i] == 'e') ! record_reg_life_pat (XEXP (pat, i), src, dest); } } --- 1093,1100 ---- for (j = XVECLEN (pat, i) - 1; j >= 0; j--) ! record_reg_life_pat (XVECEXP (pat, i, j), src, dest, 0); } else if (fmt[i] == 'e') ! record_reg_life_pat (XEXP (pat, i), src, dest, 0); } } *************** *** 1095,1100 **** } - /* An insn referencing a stack reg has a mode of QImode. */ - if (GET_MODE (insn) == QImode) { HARD_REG_SET src, dest; --- 1186,1189 ---- *************** *** 1103,1108 **** CLEAR_HARD_REG_SET (src); CLEAR_HARD_REG_SET (dest); - record_reg_life_pat (PATTERN (insn), &src, &dest); for (regno = FIRST_STACK_REG; regno <= LAST_STACK_REG; regno++) if (! TEST_HARD_REG_BIT (regstack->reg_set, regno)) --- 1192,1204 ---- CLEAR_HARD_REG_SET (src); CLEAR_HARD_REG_SET (dest); + if (GET_CODE (insn) == CALL_INSN) + for (note = CALL_INSN_FUNCTION_USAGE (insn); + note; + note = XEXP (note, 1)) + if (GET_CODE (XEXP (note, 0)) == USE) + record_reg_life_pat (SET_DEST (XEXP (note, 0)), &src, NULL_PTR, 0); + + record_reg_life_pat (PATTERN (insn), &src, &dest, 0); for (regno = FIRST_STACK_REG; regno <= LAST_STACK_REG; regno++) if (! TEST_HARD_REG_BIT (regstack->reg_set, regno)) *************** *** 1111,1167 **** && ! TEST_HARD_REG_BIT (dest, regno)) REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_DEAD, ! FP_mode_reg[regno][(int) DFmode], REG_NOTES (insn)); else if (TEST_HARD_REG_BIT (dest, regno)) REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_UNUSED, ! FP_mode_reg[regno][(int) DFmode], REG_NOTES (insn)); } ! AND_COMPL_HARD_REG_SET (regstack->reg_set, dest); ! IOR_HARD_REG_SET (regstack->reg_set, src); ! } ! ! /* There might be a reg that is live after a function call. ! Initialize it to zero so that the program does not crash. See comment ! towards the end of stack_reg_life_analysis(). */ ! ! if (GET_CODE (insn) == CALL_INSN) ! { ! int reg = FIRST_FLOAT_REG; ! ! /* If a stack reg is mentioned in a CALL_INSN, it must be as the ! return value. */ ! ! if (stack_regs_mentioned_p (PATTERN (insn))) ! reg++; ! ! for (; reg <= LAST_STACK_REG; reg++) ! if (TEST_HARD_REG_BIT (regstack->reg_set, reg)) ! { ! rtx init, pat; ! /* The insn will use virtual register numbers, and so ! convert_regs is expected to process these. But BLOCK_NUM ! cannot be used on these insns, because they do not appear in ! block_number[]. */ ! pat = gen_rtx (SET, VOIDmode, FP_mode_reg[reg][(int) DFmode], ! CONST0_RTX (DFmode)); ! init = emit_insn_after (pat, insn); ! PUT_MODE (init, QImode); ! CLEAR_HARD_REG_BIT (regstack->reg_set, reg); ! /* If the CALL_INSN was the end of a block, move the ! block_end to point to the new insn. */ ! if (block_end[block] == insn) ! block_end[block] = init; ! } ! /* Some regs do not survive a CALL */ ! AND_COMPL_HARD_REG_SET (regstack->reg_set, call_used_reg_set); } } --- 1207,1257 ---- && ! TEST_HARD_REG_BIT (dest, regno)) REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_DEAD, ! FP_MODE_REG (regno, DFmode), REG_NOTES (insn)); else if (TEST_HARD_REG_BIT (dest, regno)) REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_UNUSED, ! FP_MODE_REG (regno, DFmode), REG_NOTES (insn)); } ! if (GET_CODE (insn) == CALL_INSN) ! { ! int reg; ! ! /* There might be a reg that is live after a function call. ! Initialize it to zero so that the program does not crash. See ! comment towards the end of stack_reg_life_analysis(). */ ! ! for (reg = FIRST_STACK_REG; reg <= LAST_STACK_REG; reg++) ! if (! TEST_HARD_REG_BIT (dest, reg) ! && TEST_HARD_REG_BIT (regstack->reg_set, reg)) ! { ! rtx init, pat; ! /* The insn will use virtual register numbers, and so ! convert_regs is expected to process these. But BLOCK_NUM ! cannot be used on these insns, because they do not appear in ! block_number[]. */ ! pat = gen_rtx (SET, VOIDmode, FP_MODE_REG (reg, DFmode), ! CONST0_RTX (DFmode)); ! init = emit_insn_after (pat, insn); ! PUT_MODE (init, QImode); ! CLEAR_HARD_REG_BIT (regstack->reg_set, reg); ! /* If the CALL_INSN was the end of a block, move the ! block_end to point to the new insn. */ ! if (block_end[block] == insn) ! block_end[block] = init; ! } ! /* Some regs do not survive a CALL */ ! AND_COMPL_HARD_REG_SET (regstack->reg_set, call_used_reg_set); ! } ! AND_COMPL_HARD_REG_SET (regstack->reg_set, dest); ! IOR_HARD_REG_SET (regstack->reg_set, src); } } *************** *** 1310,1317 **** /* If current function returns its result in an fp stack register, ! return the register number. Otherwise return -1. */ ! static int ! stack_result_p (decl) tree decl; { --- 1400,1407 ---- /* If current function returns its result in an fp stack register, ! return the REG. Otherwise, return 0. */ ! static rtx ! stack_result (decl) tree decl; { *************** *** 1319,1324 **** if (result != 0 ! && !(GET_CODE (result) == REG ! && REGNO (result) < FIRST_PSEUDO_REGISTER)) { #ifdef FUNCTION_OUTGOING_VALUE --- 1409,1414 ---- if (result != 0 ! && ! (GET_CODE (result) == REG ! && REGNO (result) < FIRST_PSEUDO_REGISTER)) { #ifdef FUNCTION_OUTGOING_VALUE *************** *** 1330,1334 **** } ! return STACK_REG_P (result) ? REGNO (result) : -1; } --- 1420,1424 ---- } ! return result != 0 && STACK_REG_P (result) ? result : 0; } *************** *** 1342,1346 **** Then, start with the last block and work back to the first block. Similarly, work backwards within each block, insn by insn, recording ! which regs are die and which are used (and therefore live) in the hard reg set of block_stack_in[]. --- 1432,1436 ---- Then, start with the last block and work back to the first block. Similarly, work backwards within each block, insn by insn, recording ! which regs are dead and which are used (and therefore live) in the hard reg set of block_stack_in[]. *************** *** 1364,1392 **** static void ! stack_reg_life_analysis (first) rtx first; { int reg, block; struct stack_def regstack; ! if (current_function_returns_real ! && stack_result_p (current_function_decl) >= 0) ! { ! /* Find all RETURN insns and mark them. */ ! ! int value_regno = stack_result_p (current_function_decl); ! ! for (block = blocks - 1; block >= 0; block--) ! if (GET_CODE (block_end[block]) == JUMP_INSN ! && GET_CODE (PATTERN (block_end[block])) == RETURN) ! SET_HARD_REG_BIT (block_out_reg_set[block], value_regno); ! /* Mark of the end of last block if we "fall off" the end of the ! function into the epilogue. */ ! if (GET_CODE (block_end[blocks-1]) != JUMP_INSN ! || GET_CODE (PATTERN (block_end[blocks-1])) == RETURN) ! SET_HARD_REG_BIT (block_out_reg_set[blocks-1], value_regno); ! } /* now scan all blocks backward for stack register use */ --- 1454,1484 ---- static void ! stack_reg_life_analysis (first, stackentry) rtx first; + HARD_REG_SET *stackentry; { int reg, block; struct stack_def regstack; ! { ! rtx retvalue; ! if (retvalue = stack_result (current_function_decl)) ! { ! /* Find all RETURN insns and mark them. */ ! for (block = blocks - 1; --block >= 0;) ! if (GET_CODE (block_end[block]) == JUMP_INSN ! && GET_CODE (PATTERN (block_end[block])) == RETURN) ! mark_regs_pat (retvalue, block_out_reg_set+block); ! ! /* Mark off the end of last block if we "fall off" the end of the ! function into the epilogue. */ ! ! if (GET_CODE (block_end[blocks-1]) != JUMP_INSN ! || GET_CODE (PATTERN (block_end[blocks-1])) == RETURN) ! mark_regs_pat (retvalue, block_out_reg_set+blocks-1); ! } ! } /* now scan all blocks backward for stack register use */ *************** *** 1471,1475 **** } - { /* If any reg is live at the start of the first block of a function, then we must guarantee that the reg holds some value by --- 1563,1566 ---- *************** *** 1477,1492 **** fault trying to access an empty register. */ - HARD_REG_SET empty_regs; - CLEAR_HARD_REG_SET (empty_regs); - GO_IF_HARD_REG_SUBSET (block_stack_in[0].reg_set, empty_regs, - no_live_regs); - } - /* Load zero into each live register. The fact that a register ! appears live at the function start does not necessarily imply an error ! in the user program: it merely means that we could not determine that ! there wasn't such an error, just as -Wunused sometimes gives ! "incorrect" warnings. In those cases, these initializations will do ! no harm. Note that we are inserting virtual register references here: --- 1568,1577 ---- fault trying to access an empty register. */ /* Load zero into each live register. The fact that a register ! appears live at the function start necessarily implies an error ! in the user program: it means that (unless the offending code is *never* ! executed) this program is using uninitialised floating point ! variables. In order to keep broken code like this happy, we initialise ! those variables with zero. Note that we are inserting virtual register references here: *************** *** 1495,1503 **** for (reg = LAST_STACK_REG; reg >= FIRST_STACK_REG; reg--) ! if (TEST_HARD_REG_BIT (block_stack_in[0].reg_set, reg)) { rtx init_rtx; ! init_rtx = gen_rtx (SET, VOIDmode, FP_mode_reg[reg][(int) DFmode], CONST0_RTX (DFmode)); block_begin[0] = emit_insn_after (init_rtx, first); --- 1580,1589 ---- for (reg = LAST_STACK_REG; reg >= FIRST_STACK_REG; reg--) ! if (TEST_HARD_REG_BIT (block_stack_in[0].reg_set, reg) ! && ! TEST_HARD_REG_BIT (*stackentry, reg)) { rtx init_rtx; ! init_rtx = gen_rtx (SET, VOIDmode, FP_MODE_REG(reg, DFmode), CONST0_RTX (DFmode)); block_begin[0] = emit_insn_after (init_rtx, first); *************** *** 1506,1512 **** CLEAR_HARD_REG_BIT (block_stack_in[0].reg_set, reg); } - - no_live_regs: - ; } --- 1592,1595 ---- *************** *** 1528,1535 **** abort (); ! if (GET_MODE_CLASS (GET_MODE (*reg)) != MODE_FLOAT) ! abort (); ! *reg = FP_mode_reg[regno][(int) GET_MODE (*reg)]; } --- 1611,1622 ---- abort (); ! switch (GET_MODE_CLASS (GET_MODE (*reg))) ! { ! default: abort (); ! case MODE_FLOAT: ! case MODE_COMPLEX_FLOAT:; ! } ! *reg = FP_MODE_REG (regno, GET_MODE (*reg)); } *************** *** 1615,1620 **** abort (); ! pop_rtx = gen_rtx (SET, VOIDmode, FP_mode_reg[hard_regno][(int) DFmode], ! FP_mode_reg[FIRST_STACK_REG][(int) DFmode]); pop_insn = (*when) (pop_rtx, insn); --- 1702,1707 ---- abort (); ! pop_rtx = gen_rtx (SET, VOIDmode, FP_MODE_REG (hard_regno, DFmode), ! FP_MODE_REG (FIRST_STACK_REG, DFmode)); pop_insn = (*when) (pop_rtx, insn); *************** *** 1623,1627 **** REG_NOTES (pop_insn) = gen_rtx (EXPR_LIST, REG_DEAD, ! FP_mode_reg[FIRST_STACK_REG][(int) DFmode], REG_NOTES (pop_insn)); --- 1710,1714 ---- REG_NOTES (pop_insn) = gen_rtx (EXPR_LIST, REG_DEAD, ! FP_MODE_REG (FIRST_STACK_REG, DFmode), REG_NOTES (pop_insn)); *************** *** 1707,1712 **** } ! swap_rtx = gen_swapdf (FP_mode_reg[hard_regno][(int) DFmode], ! FP_mode_reg[FIRST_STACK_REG][(int) DFmode]); swap_insn = emit_insn_after (swap_rtx, i1); /* ??? This used to be VOIDmode, but that seems wrong. */ --- 1794,1799 ---- } ! swap_rtx = gen_swapdf (FP_MODE_REG (hard_regno, DFmode), ! FP_MODE_REG (FIRST_STACK_REG, DFmode)); swap_insn = emit_insn_after (swap_rtx, i1); /* ??? This used to be VOIDmode, but that seems wrong. */ *************** *** 1723,1736 **** rtx pat; { ! rtx *src = get_true_reg (&SET_SRC (pat)); ! rtx *dest = get_true_reg (&SET_DEST (pat)); rtx note; ! if (STACK_REG_P (*src) && STACK_REG_P (*dest)) { /* Write from one stack reg to another. If SRC dies here, then just change the register mapping and delete the insn. */ ! note = find_regno_note (insn, REG_DEAD, REGNO (*src)); if (note) { --- 1810,1826 ---- rtx pat; { ! rtx *psrc = get_true_reg (&SET_SRC (pat)); ! rtx *pdest = get_true_reg (&SET_DEST (pat)); ! rtx src, dest; rtx note; ! src = *psrc; dest = *pdest; ! ! if (STACK_REG_P (src) && STACK_REG_P (dest)) { /* Write from one stack reg to another. If SRC dies here, then just change the register mapping and delete the insn. */ ! note = find_regno_note (insn, REG_DEAD, REGNO (src)); if (note) { *************** *** 1738,1750 **** /* If this is a no-op move, there must not be a REG_DEAD note. */ ! if (REGNO (*src) == REGNO (*dest)) abort (); for (i = regstack->top; i >= 0; i--) ! if (regstack->reg[i] == REGNO (*src)) break; /* The source must be live, and the dest must be dead. */ ! if (i < 0 || get_hard_regnum (regstack, *dest) >= FIRST_STACK_REG) abort (); --- 1828,1840 ---- /* If this is a no-op move, there must not be a REG_DEAD note. */ ! if (REGNO (src) == REGNO (dest)) abort (); for (i = regstack->top; i >= 0; i--) ! if (regstack->reg[i] == REGNO (src)) break; /* The source must be live, and the dest must be dead. */ ! if (i < 0 || get_hard_regnum (regstack, dest) >= FIRST_STACK_REG) abort (); *************** *** 1752,1758 **** If so, just pop the src. */ ! if (find_regno_note (insn, REG_UNUSED, REGNO (*dest))) { ! emit_pop_insn (insn, regstack, *src, emit_insn_after); delete_insn_for_stacker (insn); --- 1842,1848 ---- If so, just pop the src. */ ! if (find_regno_note (insn, REG_UNUSED, REGNO (dest))) { ! emit_pop_insn (insn, regstack, src, emit_insn_after); delete_insn_for_stacker (insn); *************** *** 1760,1767 **** } ! regstack->reg[i] = REGNO (*dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest)); ! CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (*src)); delete_insn_for_stacker (insn); --- 1850,1857 ---- } ! regstack->reg[i] = REGNO (dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest)); ! CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (src)); delete_insn_for_stacker (insn); *************** *** 1777,1784 **** for REG_UNUSED will not work for deleted insns. */ ! if (REGNO (*src) == REGNO (*dest)) { ! if (find_regno_note (insn, REG_UNUSED, REGNO (*dest))) ! emit_pop_insn (insn, regstack, *dest, emit_insn_after); delete_insn_for_stacker (insn); --- 1867,1874 ---- for REG_UNUSED will not work for deleted insns. */ ! if (REGNO (src) == REGNO (dest)) { ! if (find_regno_note (insn, REG_UNUSED, REGNO (dest))) ! emit_pop_insn (insn, regstack, dest, emit_insn_after); delete_insn_for_stacker (insn); *************** *** 1787,1800 **** /* The destination ought to be dead */ ! if (get_hard_regnum (regstack, *dest) >= FIRST_STACK_REG) abort (); ! replace_reg (src, get_hard_regnum (regstack, *src)); ! regstack->reg[++regstack->top] = REGNO (*dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest)); ! replace_reg (dest, FIRST_STACK_REG); } ! else if (STACK_REG_P (*src)) { /* Save from a stack reg to MEM, or possibly integer reg. Since --- 1877,1890 ---- /* The destination ought to be dead */ ! if (get_hard_regnum (regstack, dest) >= FIRST_STACK_REG) abort (); ! replace_reg (psrc, get_hard_regnum (regstack, src)); ! regstack->reg[++regstack->top] = REGNO (dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest)); ! replace_reg (pdest, FIRST_STACK_REG); } ! else if (STACK_REG_P (src)) { /* Save from a stack reg to MEM, or possibly integer reg. Since *************** *** 1802,1815 **** needs be. */ ! emit_swap_insn (insn, regstack, *src); ! note = find_regno_note (insn, REG_DEAD, REGNO (*src)); if (note) { replace_reg (&XEXP (note, 0), FIRST_STACK_REG); regstack->top--; ! CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (*src)); } ! else if (GET_MODE (*src) == XFmode && regstack->top != REG_STACK_SIZE) { /* A 387 cannot write an XFmode value to a MEM without --- 1892,1905 ---- needs be. */ ! emit_swap_insn (insn, regstack, src); ! note = find_regno_note (insn, REG_DEAD, REGNO (src)); if (note) { replace_reg (&XEXP (note, 0), FIRST_STACK_REG); regstack->top--; ! CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (src)); } ! else if (GET_MODE (src) == XFmode && regstack->top != REG_STACK_SIZE) { /* A 387 cannot write an XFmode value to a MEM without *************** *** 1821,1825 **** a pop. */ rtx push_rtx, push_insn; ! rtx top_stack_reg = FP_mode_reg[FIRST_STACK_REG][(int) XFmode]; push_rtx = gen_movxf (top_stack_reg, top_stack_reg); --- 1911,1915 ---- a pop. */ rtx push_rtx, push_insn; ! rtx top_stack_reg = FP_MODE_REG (FIRST_STACK_REG, XFmode); push_rtx = gen_movxf (top_stack_reg, top_stack_reg); *************** *** 1830,1836 **** } ! replace_reg (src, FIRST_STACK_REG); } ! else if (STACK_REG_P (*dest)) { /* Load from MEM, or possibly integer REG or constant, into the --- 1920,1926 ---- } ! replace_reg (psrc, FIRST_STACK_REG); } ! else if (STACK_REG_P (dest)) { /* Load from MEM, or possibly integer REG or constant, into the *************** *** 1840,1844 **** /* The destination ought to be dead */ ! if (get_hard_regnum (regstack, *dest) >= FIRST_STACK_REG) abort (); --- 1930,1934 ---- /* The destination ought to be dead */ ! if (get_hard_regnum (regstack, dest) >= FIRST_STACK_REG) abort (); *************** *** 1846,1852 **** abort (); ! regstack->reg[++regstack->top] = REGNO (*dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest)); ! replace_reg (dest, FIRST_STACK_REG); } else --- 1936,1942 ---- abort (); ! regstack->reg[++regstack->top] = REGNO (dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest)); ! replace_reg (pdest, FIRST_STACK_REG); } else *************** *** 2020,2025 **** case CALL: ! regstack->reg[++regstack->top] = REGNO (*dest); ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest)); replace_reg (dest, FIRST_STACK_REG); break; --- 2110,2122 ---- case CALL: ! { ! int count; ! for (count = HARD_REGNO_NREGS (REGNO (*dest), GET_MODE (*dest)); ! --count >= 0;) ! { ! regstack->reg[++regstack->top] = REGNO (*dest) + count; ! SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest) + count); ! } ! } replace_reg (dest, FIRST_STACK_REG); break; *************** *** 2423,2427 **** the right reg there without calling replace_reg. */ ! *clobber_loc[i] = FP_mode_reg[regnum][(int) DFmode]; } } --- 2520,2524 ---- the right reg there without calling replace_reg. */ ! *clobber_loc[i] = FP_MODE_REG (regnum, DFmode); } } *************** *** 2525,2539 **** int n_operands; ! if ((GET_CODE (insn) != INSN && GET_CODE (insn) != CALL_INSN) ! || INSN_DELETED_P (insn)) ! return; ! /* The stack should be empty at a call. */ ! if (GET_CODE (insn) == CALL_INSN) ! for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) ! if (TEST_HARD_REG_BIT (regstack->reg_set, i)) ! abort (); /* Do the actual substitution if any stack regs are mentioned. Since we only record whether entire insn mentions stack regs, and --- 2622,2647 ---- int n_operands; ! if (GET_CODE (insn) == CALL_INSN) ! { ! int top = regstack->top; ! /* If there are any floating point parameters to be passed in ! registers for this call, make sure they are in the right ! order. */ ! if (top >= 0) ! { ! straighten_stack (PREV_INSN (insn), regstack); ! ! /* Now mark the arguments as dead after the call. */ + while (regstack->top >= 0) + { + CLEAR_HARD_REG_BIT (regstack->reg_set, FIRST_STACK_REG + regstack->top); + regstack->top--; + } + } + } + /* Do the actual substitution if any stack regs are mentioned. Since we only record whether entire insn mentions stack regs, and *************** *** 2631,2635 **** for (reg = old->top; reg >= 0; reg--) if (! TEST_HARD_REG_BIT (new->reg_set, old->reg[reg])) ! emit_pop_insn (insn, old, FP_mode_reg[old->reg[reg]][(int) DFmode], emit_insn_before); --- 2739,2743 ---- for (reg = old->top; reg >= 0; reg--) if (! TEST_HARD_REG_BIT (new->reg_set, old->reg[reg])) ! emit_pop_insn (insn, old, FP_MODE_REG (old->reg[reg], DFmode), emit_insn_before); *************** *** 2681,2685 **** emit_swap_insn (insn, old, ! FP_mode_reg[old->reg[reg]][(int) DFmode]); } --- 2789,2793 ---- emit_swap_insn (insn, old, ! FP_MODE_REG (old->reg[reg], DFmode)); } *************** *** 2692,2696 **** { emit_swap_insn (insn, old, ! FP_mode_reg[old->reg[reg]][(int) DFmode]); break; } --- 2800,2804 ---- { emit_swap_insn (insn, old, ! FP_MODE_REG (old->reg[reg], DFmode)); break; } *************** *** 2728,2733 **** int reg; ! if (GET_CODE (pat) != LABEL_REF) ! { int i, j; char *fmt = GET_RTX_FORMAT (GET_CODE (pat)); --- 2836,2846 ---- int reg; ! switch (GET_CODE (pat)) ! { ! case RETURN: ! straighten_stack (PREV_INSN (insn), regstack); ! return; ! default: ! { int i, j; char *fmt = GET_RTX_FORMAT (GET_CODE (pat)); *************** *** 2742,2746 **** } return; ! } label = XEXP (pat, 0); --- 2855,2861 ---- } return; ! } ! case LABEL_REF:; ! } label = XEXP (pat, 0); *************** *** 2859,2866 **** /* Don't bother processing unless there is a stack reg ! mentioned. ! ! ??? For now, process CALL_INSNs too to make sure that the ! stack regs are dead after a call. Remove this eventually. */ if (GET_MODE (insn) == QImode || GET_CODE (insn) == CALL_INSN) --- 2974,2979 ---- /* Don't bother processing unless there is a stack reg ! mentioned or if it's a CALL_INSN (register passing of ! floating point values). */ if (GET_MODE (insn) == QImode || GET_CODE (insn) == CALL_INSN) *************** *** 2896,2905 **** at its end that need to be popped before the function returns. */ ! for (reg = regstack.top; reg >= 0; reg--) ! if (! current_function_returns_real ! || regstack.reg[reg] != FIRST_STACK_REG) ! insn = emit_pop_insn (insn, ®stack, ! FP_mode_reg[regstack.reg[reg]][(int) DFmode], emit_insn_after); } --- 3009,3033 ---- at its end that need to be popped before the function returns. */ ! { ! int value_reg_low, value_reg_high; ! value_reg_low = value_reg_high = -1; ! { ! rtx retvalue; ! if (retvalue = stack_result (current_function_decl)) ! { ! value_reg_low = REGNO (retvalue); ! value_reg_high = value_reg_low + ! HARD_REGNO_NREGS (value_reg_low, GET_MODE (retvalue)) - 1; ! } ! ! } ! for (reg = regstack.top; reg >= 0; reg--) ! if (regstack.reg[reg] < value_reg_low || ! regstack.reg[reg] > value_reg_high) ! insn = emit_pop_insn (insn, ®stack, ! FP_MODE_REG (regstack.reg[reg], DFmode), emit_insn_after); + } + straighten_stack (insn, ®stack); } *************** *** 2975,2979 **** fprintf (file, "\nlive stack registers on block entry: "); ! for (regno = FIRST_STACK_REG; regno <= LAST_STACK_REG ; regno++) { if (TEST_HARD_REG_BIT (block_stack_in[block].reg_set, regno)) --- 3103,3107 ---- fprintf (file, "\nlive stack registers on block entry: "); ! for (regno = FIRST_STACK_REG; regno <= LAST_STACK_REG; regno++) { if (TEST_HARD_REG_BIT (block_stack_in[block].reg_set, regno)) *************** *** 2982,2986 **** fprintf (file, "\nlive stack registers on block exit: "); ! for (regno = FIRST_STACK_REG; regno <= LAST_STACK_REG ; regno++) { if (TEST_HARD_REG_BIT (block_out_reg_set[block], regno)) --- 3110,3114 ---- fprintf (file, "\nlive stack registers on block exit: "); ! for (regno = FIRST_STACK_REG; regno <= LAST_STACK_REG; regno++) { if (TEST_HARD_REG_BIT (block_out_reg_set[block], regno)) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/regclass.c gcc-2.7.0/regclass.c *** gcc-2.6.3/regclass.c Tue Jun 14 18:03:16 1994 --- gcc-2.7.0/regclass.c Thu Jun 15 07:59:45 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 45,49 **** /* If we have auto-increment or auto-decrement and we can have secondary reloads, we are not allowed to use classes requiring secondary ! reloads for psuedos auto-incremented since reload can't handle it. */ #ifdef AUTO_INC_DEC --- 46,50 ---- /* If we have auto-increment or auto-decrement and we can have secondary reloads, we are not allowed to use classes requiring secondary ! reloads for pseudos auto-incremented since reload can't handle it. */ #ifdef AUTO_INC_DEC *************** *** 411,415 **** HARD_REGNO_NREGS (fpreg, [SD]Fmode) returns 2. Ideally we'd like to use DF mode for the even registers and VOIDmode for the odd ! (for the cpu models where the odd ones are inaccessable). */ if (reg_raw_mode[i] == VOIDmode) reg_raw_mode[i] = word_mode; --- 412,416 ---- HARD_REGNO_NREGS (fpreg, [SD]Fmode) returns 2. Ideally we'd like to use DF mode for the even registers and VOIDmode for the odd ! (for the cpu models where the odd ones are inaccessible). */ if (reg_raw_mode[i] == VOIDmode) reg_raw_mode[i] = word_mode; *************** *** 1016,1019 **** --- 1017,1021 ---- enum op_type {OP_READ, OP_WRITE, OP_READ_WRITE} op_types[MAX_RECOG_OPERANDS]; int i, j; + rtx set; /* By default, each operand is an input operand. */ *************** *** 1171,1174 **** --- 1173,1177 ---- case 'E': + #ifndef REAL_ARITHMETIC /* Match any floating double constant, but only if we can examine the bits of it reliably. */ *************** *** 1177,1180 **** --- 1180,1184 ---- && GET_MODE (op) != VOIDmode && ! flag_pretend_float) break; + #endif if (GET_CODE (op) == CONST_DOUBLE) win = 1; *************** *** 1350,1353 **** --- 1354,1397 ---- } } + + /* If this insn is a single set copying operand 1 to operand 0 + and one is a pseudo with the other a hard reg that is in its + own register class, set the cost of that register class to -1. */ + + if ((set = single_set (insn)) != 0 + && ops[0] == SET_DEST (set) && ops[1] == SET_SRC (set) + && GET_CODE (ops[0]) == REG && GET_CODE (ops[1]) == REG) + for (i = 0; i <= 1; i++) + if (REGNO (ops[i]) >= FIRST_PSEUDO_REGISTER) + { + int regno = REGNO (ops[!i]); + enum machine_mode mode = GET_MODE (ops[!i]); + int class; + int nr; + + if (regno >= FIRST_PSEUDO_REGISTER && prefclass != 0 + && (reg_class_size[prefclass[regno]] + == CLASS_MAX_NREGS (prefclass[regno], mode))) + op_costs[i].cost[prefclass[regno]] = -1; + else if (regno < FIRST_PSEUDO_REGISTER) + for (class = 0; class < N_REG_CLASSES; class++) + if (TEST_HARD_REG_BIT (reg_class_contents[class], regno) + && reg_class_size[class] == CLASS_MAX_NREGS (class, mode)) + { + if (reg_class_size[class] == 1) + op_costs[i].cost[class] = -1; + else + { + for (nr = 0; nr < HARD_REGNO_NREGS(regno, mode); nr++) + { + if (!TEST_HARD_REG_BIT (reg_class_contents[class], regno + nr)) + break; + } + + if (nr == HARD_REGNO_NREGS(regno,mode)) + op_costs[i].cost[class] = -1; + } + } + } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/regs.h gcc-2.7.0/regs.h *** gcc-2.6.3/regs.h Sun Aug 7 08:50:23 1994 --- gcc-2.7.0/regs.h Thu Jun 15 08:00:16 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 54,58 **** extern short *reg_n_deaths; ! /* Indexed by N; says whether a psuedo register N was ever used within a SUBREG that changes the size of the reg. Some machines prohibit such objects to be in certain (usually floating-point) registers. */ --- 55,59 ---- extern short *reg_n_deaths; ! /* Indexed by N; says whether a pseudo register N was ever used within a SUBREG that changes the size of the reg. Some machines prohibit such objects to be in certain (usually floating-point) registers. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/reload.c gcc-2.7.0/reload.c *** gcc-2.6.3/reload.c Thu Oct 27 13:04:09 1994 --- gcc-2.7.0/reload.c Thu Jun 15 08:01:03 1995 *************** *** 1,4 **** /* Search an insn for pseudo regs that must be in hard regs and are not. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Search an insn for pseudo regs that must be in hard regs and are not. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 213,219 **** int reg_flag; /* Nonzero if referencing a register. */ int safe; /* Nonzero if this can't conflict with anything. */ ! rtx base; /* Base adddress for MEM. */ HOST_WIDE_INT start; /* Starting offset or register number. */ ! HOST_WIDE_INT end; /* Endinf offset or register number. */ }; --- 214,220 ---- int reg_flag; /* Nonzero if referencing a register. */ int safe; /* Nonzero if this can't conflict with anything. */ ! rtx base; /* Base address for MEM. */ HOST_WIDE_INT start; /* Starting offset or register number. */ ! HOST_WIDE_INT end; /* Ending offset or register number. */ }; *************** *** 726,730 **** rtx *in_subreg_loc = 0, *out_subreg_loc = 0; int secondary_in_reload = -1, secondary_out_reload = -1; ! enum insn_code secondary_in_icode, secondary_out_icode; /* INMODE and/or OUTMODE could be VOIDmode if no mode --- 727,732 ---- rtx *in_subreg_loc = 0, *out_subreg_loc = 0; int secondary_in_reload = -1, secondary_out_reload = -1; ! enum insn_code secondary_in_icode = CODE_FOR_nothing; ! enum insn_code secondary_out_icode = CODE_FOR_nothing; /* INMODE and/or OUTMODE could be VOIDmode if no mode *************** *** 798,804 **** Finally, reload the inner expression if it is a register that is in the class whose registers cannot be referenced in a different size ! and M1 is not the same size as M2. */ ! if (in != 0 && GET_CODE (in) == SUBREG && (CONSTANT_P (SUBREG_REG (in)) || GET_CODE (SUBREG_REG (in)) == PLUS --- 800,811 ---- Finally, reload the inner expression if it is a register that is in the class whose registers cannot be referenced in a different size ! and M1 is not the same size as M2. If SUBREG_WORD is nonzero, we ! cannot reload just the inside since we might end up with the wrong ! register class. */ ! if (in != 0 && GET_CODE (in) == SUBREG && SUBREG_WORD (in) == 0 ! #ifdef CLASS_CANNOT_CHANGE_SIZE ! && class != CLASS_CANNOT_CHANGE_SIZE ! #endif && (CONSTANT_P (SUBREG_REG (in)) || GET_CODE (SUBREG_REG (in)) == PLUS *************** *** 895,899 **** (except in the case of STRICT_LOW_PART, and in that case the constraint should label it input-output.) */ ! if (out != 0 && GET_CODE (out) == SUBREG && (CONSTANT_P (SUBREG_REG (out)) || strict_low --- 902,909 ---- (except in the case of STRICT_LOW_PART, and in that case the constraint should label it input-output.) */ ! if (out != 0 && GET_CODE (out) == SUBREG && SUBREG_WORD (out) == 0 ! #ifdef CLASS_CANNOT_CHANGE_SIZE ! && class != CLASS_CANNOT_CHANGE_SIZE ! #endif && (CONSTANT_P (SUBREG_REG (out)) || strict_low *************** *** 1383,1386 **** --- 1393,1397 ---- int i; int output_reload = -1; + int secondary_out = -1; rtx note; *************** *** 1526,1529 **** --- 1537,1550 ---- && (HARD_REGNO_NREGS (REGNO (XEXP (note, 0)), reload_outmode[output_reload]) <= HARD_REGNO_NREGS (REGNO (XEXP (note, 0)), GET_MODE (XEXP (note, 0)))) + /* Ensure that a secondary or tertiary reload for this output + won't want this register. */ + && ((secondary_out = reload_secondary_out_reload[output_reload]) == -1 + || (! (TEST_HARD_REG_BIT + (reg_class_contents[(int) reload_reg_class[secondary_out]], + REGNO (XEXP (note, 0)))) + && ((secondary_out = reload_secondary_out_reload[secondary_out]) == -1 + || ! (TEST_HARD_REG_BIT + (reg_class_contents[(int) reload_reg_class[secondary_out]], + REGNO (XEXP (note, 0))))))) && ! fixed_regs[REGNO (XEXP (note, 0))]) { *************** *** 2446,2450 **** /* If reg_equiv_address is not a constant address, copy it, since it may be shared. */ ! rtx address = reg_equiv_address[regno]; if (rtx_varies_p (address)) --- 2467,2475 ---- /* If reg_equiv_address is not a constant address, copy it, since it may be shared. */ ! /* We must rerun eliminate_regs, in case the elimination ! offsets have changed. */ ! rtx address = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], ! 0, NULL_RTX), ! 0); if (rtx_varies_p (address)) *************** *** 2792,2795 **** --- 2817,2828 ---- && (ind_levels ? offsettable_memref_p (operand) : offsettable_nonstrict_memref_p (operand))) + /* A reloaded auto-increment address is offsettable, + because it is now just a simple register indirect. */ + || (GET_CODE (operand) == MEM + && address_reloaded[i] + && (GET_CODE (XEXP (operand, 0)) == PRE_INC + || GET_CODE (XEXP (operand, 0)) == PRE_DEC + || GET_CODE (XEXP (operand, 0)) == POST_INC + || GET_CODE (XEXP (operand, 0)) == POST_DEC)) /* Certain mem addresses will become offsettable after they themselves are reloaded. This is important; *************** *** 2824,2827 **** --- 2857,2861 ---- case 'E': + #ifndef REAL_ARITHMETIC /* Match any floating double constant, but only if we can examine the bits of it reliably. */ *************** *** 2830,2833 **** --- 2864,2868 ---- && GET_MODE (operand) != VOIDmode && ! flag_pretend_float) break; + #endif if (GET_CODE (operand) == CONST_DOUBLE) win = 1; *************** *** 2972,2976 **** class by copying it to memory first, count that as another reload. This is consistent with other code and is ! required to avoid chosing another alternative when the constant is moved into memory by this function on an early reload pass. Note that the test here is --- 3007,3011 ---- class by copying it to memory first, count that as another reload. This is consistent with other code and is ! required to avoid choosing another alternative when the constant is moved into memory by this function on an early reload pass. Note that the test here is *************** *** 3853,3857 **** { /* If reg_equiv_address varies, it may be shared, so copy it. */ ! rtx addr = reg_equiv_address[regno]; if (rtx_varies_p (addr)) --- 3888,3896 ---- { /* If reg_equiv_address varies, it may be shared, so copy it. */ ! /* We must rerun eliminate_regs, in case the elimination ! offsets have changed. */ ! rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, ! NULL_RTX), ! 0); if (rtx_varies_p (addr)) *************** *** 3933,3945 **** { int offset = SUBREG_WORD (x) * UNITS_PER_WORD; ! rtx addr = (reg_equiv_address[regno] ? reg_equiv_address[regno] ! : XEXP (reg_equiv_mem[regno], 0)); ! #if BYTES_BIG_ENDIAN ! int size; ! size = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); ! offset += MIN (size, UNITS_PER_WORD); ! size = GET_MODE_SIZE (GET_MODE (x)); ! offset -= MIN (size, UNITS_PER_WORD); ! #endif addr = plus_constant (addr, offset); x = gen_rtx (MEM, GET_MODE (x), addr); --- 3972,3988 ---- { int offset = SUBREG_WORD (x) * UNITS_PER_WORD; ! /* We must rerun eliminate_regs, in case the elimination ! offsets have changed. */ ! rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, ! NULL_RTX), ! 0); ! if (BYTES_BIG_ENDIAN) ! { ! int size; ! size = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); ! offset += MIN (size, UNITS_PER_WORD); ! size = GET_MODE_SIZE (GET_MODE (x)); ! offset -= MIN (size, UNITS_PER_WORD); ! } addr = plus_constant (addr, offset); x = gen_rtx (MEM, GET_MODE (x), addr); *************** *** 3970,3974 **** { register int i; ! rtx tem = reg_equiv_address[regno]; #if 0 /* We cannot safely reuse a memloc made here; --- 4013,4020 ---- { register int i; ! /* We must rerun eliminate_regs, in case the elimination ! offsets have changed. */ ! rtx tem = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX), ! 0); #if 0 /* We cannot safely reuse a memloc made here; *************** *** 4062,4066 **** || (GET_CODE (XEXP (reg_equiv_mem[regno], 0)) == PLUS && GET_CODE (XEXP (XEXP (reg_equiv_mem[regno], 0), 0)) == REG ! && CONSTANT_P (XEXP (XEXP (reg_equiv_mem[regno], 0), 0))))) return 0; --- 4108,4112 ---- || (GET_CODE (XEXP (reg_equiv_mem[regno], 0)) == PLUS && GET_CODE (XEXP (XEXP (reg_equiv_mem[regno], 0), 0)) == REG ! && CONSTANT_P (XEXP (XEXP (reg_equiv_mem[regno], 0), 1))))) return 0; *************** *** 4524,4528 **** } ! if (code0 == MULT || code0 == SIGN_EXTEND || code1 == MEM) { find_reloads_address_1 (orig_op0, 1, &XEXP (x, 0), opnum, type, --- 4570,4575 ---- } ! if (code0 == MULT || code0 == SIGN_EXTEND || code0 == TRUNCATE ! || code0 == ZERO_EXTEND || code1 == MEM) { find_reloads_address_1 (orig_op0, 1, &XEXP (x, 0), opnum, type, *************** *** 4532,4536 **** } ! else if (code1 == MULT || code1 == SIGN_EXTEND || code0 == MEM) { find_reloads_address_1 (orig_op0, 0, &XEXP (x, 0), opnum, type, --- 4579,4584 ---- } ! else if (code1 == MULT || code1 == SIGN_EXTEND || code1 == TRUNCATE ! || code1 == ZERO_EXTEND || code0 == MEM) { find_reloads_address_1 (orig_op0, 0, &XEXP (x, 0), opnum, type, *************** *** 5525,5528 **** --- 5573,5579 ---- && ! push_operand (dest, GET_MODE (dest))) return 0; + else if (GET_CODE (dest) == MEM && regno >= FIRST_PSEUDO_REGISTER + && reg_equiv_memory_loc[regno] != 0) + return 0; else if (need_stable_sp && push_operand (dest, GET_MODE (dest))) return 0; *************** *** 5571,5574 **** --- 5622,5670 ---- } + if (GET_CODE (p) == CALL_INSN && CALL_INSN_FUNCTION_USAGE (p)) + { + rtx link; + + for (link = CALL_INSN_FUNCTION_USAGE (p); XEXP (link, 1) != 0; + link = XEXP (link, 1)) + { + pat = XEXP (link, 0); + if (GET_CODE (pat) == CLOBBER) + { + register rtx dest = SET_DEST (pat); + while (GET_CODE (dest) == SUBREG + || GET_CODE (dest) == ZERO_EXTRACT + || GET_CODE (dest) == SIGN_EXTRACT + || GET_CODE (dest) == STRICT_LOW_PART) + dest = XEXP (dest, 0); + if (GET_CODE (dest) == REG) + { + register int xregno = REGNO (dest); + int xnregs; + if (REGNO (dest) < FIRST_PSEUDO_REGISTER) + xnregs = HARD_REGNO_NREGS (xregno, GET_MODE (dest)); + else + xnregs = 1; + if (xregno < regno + nregs + && xregno + xnregs > regno) + return 0; + if (xregno < valueno + valuenregs + && xregno + xnregs > valueno) + return 0; + if (goal_mem_addr_varies + && reg_overlap_mentioned_for_reload_p (dest, + goal)) + return 0; + } + else if (goal_mem && GET_CODE (dest) == MEM + && ! push_operand (dest, GET_MODE (dest))) + return 0; + else if (need_stable_sp + && push_operand (dest, GET_MODE (dest))) + return 0; + } + } + } + #ifdef AUTO_INC_DEC /* If this insn auto-increments or auto-decrements *************** *** 5703,5707 **** if (reload_in[r]) { ! fprintf (stderr, "\nreload_in (%s) = ", mode_name[reload_inmode[r]]); debug_rtx (reload_in[r]); } --- 5799,5804 ---- if (reload_in[r]) { ! fprintf (stderr, "\nreload_in (%s) = ", ! GET_MODE_NAME (reload_inmode[r])); debug_rtx (reload_in[r]); } *************** *** 5709,5713 **** if (reload_out[r]) { ! fprintf (stderr, "\nreload_out (%s) = ", mode_name[reload_outmode[r]]); debug_rtx (reload_out[r]); } --- 5806,5811 ---- if (reload_out[r]) { ! fprintf (stderr, "\nreload_out (%s) = ", ! GET_MODE_NAME (reload_outmode[r])); debug_rtx (reload_out[r]); } *************** *** 5715,5719 **** fprintf (stderr, "%s, ", reg_class_names[(int) reload_reg_class[r]]); ! fprintf (stderr, "%s (opnum = %d)", reload_when_needed_name[(int)reload_when_needed[r]], reload_opnum[r]); --- 5813,5818 ---- fprintf (stderr, "%s, ", reg_class_names[(int) reload_reg_class[r]]); ! fprintf (stderr, "%s (opnum = %d)", ! reload_when_needed_name[(int)reload_when_needed[r]], reload_opnum[r]); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/reload.h gcc-2.7.0/reload.h *** gcc-2.6.3/reload.h Mon Oct 17 11:28:49 1994 --- gcc-2.7.0/reload.h Thu Jun 15 08:00:35 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/reload1.c gcc-2.7.0/reload1.c *** gcc-2.6.3/reload1.c Sat Nov 5 13:57:29 1994 --- gcc-2.7.0/reload1.c Thu Jun 15 08:01:47 1995 *************** *** 1,4 **** /* Reload pseudo regs into hard regs for insns that require hard regs. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Reload pseudo regs into hard regs for insns that require hard regs. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 169,172 **** --- 170,178 ---- static short spill_regs[FIRST_PSEUDO_REGISTER]; + /* Index of last register assigned as a spill register. We allocate in + a round-robin fashion. */ + + static int last_spill_reg; + /* Describes order of preference for putting regs into spill_regs. Contains the numbers of all the hard regs, in order most preferred first. *************** *** 692,695 **** --- 698,704 ---- spill_reg_order[i] = -1; + /* Initialize to -1, which means take the first spill register. */ + last_spill_reg = -1; + /* On most machines, we can't use any register explicitly used in the rtl as a spill register. But on some, we have to. Those will have *************** *** 916,920 **** /* To compute the number of reload registers of each class ! needed for an insn, we must similate what choose_reload_regs can do. We do this by splitting an insn into an "input" and an "output" part. RELOAD_OTHER reloads are used in both. --- 925,929 ---- /* To compute the number of reload registers of each class ! needed for an insn, we must simulate what choose_reload_regs can do. We do this by splitting an insn into an "input" and an "output" part. RELOAD_OTHER reloads are used in both. *************** *** 1539,1543 **** /* Put all registers spilled so far back in potential_reload_regs, but put them at the front, since we've already spilled most of the ! psuedos in them (we might have left some pseudos unspilled if they were in a block that didn't need any spill registers of a conflicting class. We used to try to mark off the need for those registers, --- 1548,1552 ---- /* Put all registers spilled so far back in potential_reload_regs, but put them at the front, since we've already spilled most of the ! pseudos in them (we might have left some pseudos unspilled if they were in a block that didn't need any spill registers of a conflicting class. We used to try to mark off the need for those registers, *************** *** 1654,1658 **** p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) ! max_groups[(int) *p++]--; /* Indicate both these regs are part of a group. */ --- 1663,1671 ---- p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) ! { ! if (group_size [(int) *p] <= group_size [class]) ! max_groups[(int) *p]--; ! p++; ! } /* Indicate both these regs are part of a group. */ *************** *** 1769,1774 **** p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) ! max_groups[(int) *p++]--; ! break; } --- 1782,1791 ---- p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) ! { ! if (group_size [(int) *p] ! <= group_size [class]) ! max_groups[(int) *p]--; ! p++; ! } break; } *************** *** 2118,2122 **** p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) ! max_groups[(int) *p++]--; /* Don't count these registers again. */ --- 2135,2143 ---- p = reg_class_superclasses[class]; while (*p != LIM_REG_CLASSES) ! { ! if (group_size [(int) *p] <= group_size [class]) ! max_groups[(int) *p]--; ! p++; ! } /* Don't count these registers again. */ *************** *** 2329,2339 **** /* No known place to spill from => no slot to reuse. */ x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size, -1); ! #if BYTES_BIG_ENDIAN ! /* Cancel the big-endian correction done in assign_stack_local. ! Get the address of the beginning of the slot. ! This is so we can do a big-endian correction unconditionally ! below. */ ! adjust = inherent_size - total_size; ! #endif } /* Reuse a stack slot if possible. */ --- 2350,2361 ---- /* No known place to spill from => no slot to reuse. */ x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size, -1); ! if (BYTES_BIG_ENDIAN) ! /* Cancel the big-endian correction done in assign_stack_local. ! Get the address of the beginning of the slot. ! This is so we can do a big-endian correction unconditionally ! below. */ ! adjust = inherent_size - total_size; ! ! RTX_UNCHANGING_P (x) = RTX_UNCHANGING_P (regno_reg_rtx[i]); } /* Reuse a stack slot if possible. */ *************** *** 2349,2352 **** --- 2371,2375 ---- and for total size. */ enum machine_mode mode = GET_MODE (regno_reg_rtx[i]); + rtx stack_slot; if (spill_stack_slot[from_reg]) { *************** *** 2359,2379 **** /* Make a slot with that size. */ x = assign_stack_local (mode, total_size, -1); ! #if BYTES_BIG_ENDIAN ! /* Cancel the big-endian correction done in assign_stack_local. ! Get the address of the beginning of the slot. ! This is so we can do a big-endian correction unconditionally ! below. */ ! adjust = GET_MODE_SIZE (mode) - total_size; ! #endif ! spill_stack_slot[from_reg] = x; spill_stack_slot_width[from_reg] = total_size; } - #if BYTES_BIG_ENDIAN /* On a big endian machine, the "address" of the slot is the address of the low part that fits its inherent mode. */ ! if (inherent_size < total_size) adjust += (total_size - inherent_size); - #endif /* BYTES_BIG_ENDIAN */ /* If we have any adjustment to make, or if the stack slot is the --- 2382,2407 ---- /* Make a slot with that size. */ x = assign_stack_local (mode, total_size, -1); ! stack_slot = x; ! if (BYTES_BIG_ENDIAN) ! { ! /* Cancel the big-endian correction done in assign_stack_local. ! Get the address of the beginning of the slot. ! This is so we can do a big-endian correction unconditionally ! below. */ ! adjust = GET_MODE_SIZE (mode) - total_size; ! if (adjust) ! stack_slot = gen_rtx (MEM, mode_for_size (total_size ! * BITS_PER_UNIT, ! MODE_INT, 1), ! plus_constant (XEXP (x, 0), adjust)); ! } ! spill_stack_slot[from_reg] = stack_slot; spill_stack_slot_width[from_reg] = total_size; } /* On a big endian machine, the "address" of the slot is the address of the low part that fits its inherent mode. */ ! if (BYTES_BIG_ENDIAN && inherent_size < total_size) adjust += (total_size - inherent_size); /* If we have any adjustment to make, or if the stack slot is the *************** *** 2770,2774 **** constant, apply the distribute law and move the constant out so that we have (plus (mult ..) ..). This is needed in order ! to keep load-address insns valid. This case is pathalogical. We ignore the possibility of overflow here. */ if (GET_CODE (XEXP (x, 0)) == REG --- 2798,2802 ---- constant, apply the distribute law and move the constant out so that we have (plus (mult ..) ..). This is needed in order ! to keep load-address insns valid. This case is pathological. We ignore the possibility of overflow here. */ if (GET_CODE (XEXP (x, 0)) == REG *************** *** 2931,2939 **** enum machine_mode mode = GET_MODE (x); ! #if BYTES_BIG_ENDIAN ! offset += (MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (new))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))); ! #endif PUT_MODE (new, mode); --- 2959,2966 ---- enum machine_mode mode = GET_MODE (x); ! if (BYTES_BIG_ENDIAN) ! offset += (MIN (UNITS_PER_WORD, ! GET_MODE_SIZE (GET_MODE (new))) ! - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))); PUT_MODE (new, mode); *************** *** 3345,3349 **** done: ! /* If we changed something, perform elmination in REG_NOTES. This is needed even when REPLACE is zero because a REG_DEAD note might refer to a register that we eliminate and could cause a different number --- 3372,3376 ---- done: ! /* If we changed something, perform elimination in REG_NOTES. This is needed even when REPLACE is zero because a REG_DEAD note might refer to a register that we eliminate and could cause a different number *************** *** 3778,3781 **** --- 3805,3809 ---- { rtx avoid_return_reg = 0; + rtx oldpat = PATTERN (insn); #ifdef SMALL_REGISTER_CLASSES *************** *** 3907,3911 **** (obeying register constraints). That is correct; such reload registers ARE still valid. */ ! note_stores (PATTERN (insn), forget_old_reloads_1); /* There may have been CLOBBER insns placed after INSN. So scan --- 3935,3939 ---- (obeying register constraints). That is correct; such reload registers ARE still valid. */ ! note_stores (oldpat, forget_old_reloads_1); /* There may have been CLOBBER insns placed after INSN. So scan *************** *** 4665,4673 **** int reload_spill_index[MAX_RELOADS]; - /* Index of last register assigned as a spill register. We allocate in - a round-robin fashio. */ - - static int last_spill_reg = 0; - /* Find a spill register to use as a reload register for reload R. LAST_RELOAD is non-zero if this is the last reload for the insn being --- 4693,4696 ---- *************** *** 6603,6610 **** { register int nregno = REGNO (reload_out[r]); ! int num_regs = HARD_REGNO_NREGS (nregno, GET_MODE (reload_out[r])); ! while (num_regs-- > 0) ! reg_last_reload_reg[nregno + num_regs] = 0; } } --- 6626,6638 ---- { register int nregno = REGNO (reload_out[r]); ! if (nregno >= FIRST_PSEUDO_REGISTER) ! reg_last_reload_reg[nregno] = 0; ! else ! { ! int num_regs = HARD_REGNO_NREGS (nregno,GET_MODE (reload_out[r])); ! while (num_regs-- > 0) ! reg_last_reload_reg[nregno + num_regs] = 0; ! } } } *************** *** 6625,6628 **** --- 6653,6670 ---- { rtx last = get_last_insn (); + rtx tem; + + /* If IN is a paradoxical SUBREG, remove it and try to put the + opposite SUBREG on OUT. Likewise for a paradoxical SUBREG on OUT. */ + if (GET_CODE (in) == SUBREG + && (GET_MODE_SIZE (GET_MODE (in)) + > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))) + && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (in)), out)) != 0) + in = SUBREG_REG (in), out = tem; + else if (GET_CODE (out) == SUBREG + && (GET_MODE_SIZE (GET_MODE (out)) + > GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))) + && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (out)), in)) != 0) + out = SUBREG_REG (out), in = tem; /* How to do this reload can get quite tricky. Normally, we are being diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/reorg.c gcc-2.7.0/reorg.c *** gcc-2.6.3/reorg.c Tue Nov 15 19:34:05 1994 --- gcc-2.7.0/reorg.c Thu Jun 15 08:02:32 1995 *************** *** 1,4 **** /* Perform instruction reorganizations for delay slot filling. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu). Hacked by Michael Tiemann (tiemann@cygnus.com). --- 1,4 ---- /* Perform instruction reorganizations for delay slot filling. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu). Hacked by Michael Tiemann (tiemann@cygnus.com). *************** *** 18,22 **** 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. */ /* Instruction reorganization pass. --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Instruction reorganization pass. *************** *** 163,166 **** --- 164,168 ---- { char memory; /* Insn sets or needs a memory location. */ + char unch_memory; /* Insn sets of needs a "unchanging" MEM. */ char volatil; /* Insn sets or needs a volatile memory loc. */ char cc; /* Insn sets or needs the condition codes. */ *************** *** 170,174 **** /* Macro to clear all resources. */ #define CLEAR_RESOURCE(RES) \ ! do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \ CLEAR_HARD_REG_SET ((RES)->regs); } while (0) --- 172,176 ---- /* Macro to clear all resources. */ #define CLEAR_RESOURCE(RES) \ ! do { (RES)->memory = (RES)->unch_memory = (RES)->volatil = (RES)->cc = 0; \ CLEAR_HARD_REG_SET ((RES)->regs); } while (0) *************** *** 245,249 **** int, int *, int *)); static void try_merge_delay_insns PROTO((rtx, rtx)); ! static rtx redundant_insn_p PROTO((rtx, rtx, rtx)); static int own_thread_p PROTO((rtx, rtx, int)); static int find_basic_block PROTO((rtx)); --- 247,251 ---- int, int *, int *)); static void try_merge_delay_insns PROTO((rtx, rtx)); ! static rtx redundant_insn PROTO((rtx, rtx, rtx)); static int own_thread_p PROTO((rtx, rtx, int)); static int find_basic_block PROTO((rtx)); *************** *** 311,315 **** /* If this memory shouldn't change, it really isn't referencing memory. */ ! if (! RTX_UNCHANGING_P (x)) res->memory = 1; res->volatil = MEM_VOLATILE_P (x); --- 313,319 ---- /* If this memory shouldn't change, it really isn't referencing memory. */ ! if (RTX_UNCHANGING_P (x)) ! res->unch_memory = 1; ! else res->memory = 1; res->volatil = MEM_VOLATILE_P (x); *************** *** 380,383 **** --- 384,388 ---- rtx sequence = 0; int seq_size = 0; + rtx next = NEXT_INSN (x); int i; *************** *** 385,388 **** --- 390,394 ---- if (NEXT_INSN (insn) != x) { + next = NEXT_INSN (NEXT_INSN (insn)); sequence = PATTERN (NEXT_INSN (insn)); seq_size = XVECLEN (sequence, 0); *************** *** 405,408 **** --- 411,426 ---- SET_HARD_REG_BIT (res->regs, i); + /* Check for a NOTE_INSN_SETJMP. If it exists, then we must + assume that this call can need any register. + + This is done to be more conservative about how we handle setjmp. + We assume that they both use and set all registers. Using all + registers ensures that a register will not be considered dead + just because it crosses a setjmp call. A register should be + considered dead only if the setjmp call returns non-zero. */ + if (next && GET_CODE (next) == NOTE + && NOTE_LINE_NUMBER (next) == NOTE_INSN_SETJMP) + SET_HARD_REG_SET (res->regs); + { rtx link; *************** *** 603,606 **** --- 621,625 ---- { res->memory = 1; + res->unch_memory = RTX_UNCHANGING_P (x); res->volatil = MEM_VOLATILE_P (x); } *************** *** 694,697 **** --- 713,717 ---- { if ((res1->cc && res2->cc) || (res1->memory && res2->memory) + || (res1->unch_memory && res2->unch_memory) || res1->volatil || res2->volatil) return 1; *************** *** 1593,1602 **** /* We can't do anything if there are more delay slots in SEQ than we can handle, or if we don't know that it will be a taken branch. - We know that it will be a taken branch if it is either an unconditional ! branch or a conditional branch with a stricter branch condition. */ if (XVECLEN (seq, 0) - 1 > slots_remaining ! || ! condition_dominates_p (condition, XVECEXP (seq, 0, 0))) return delay_list; --- 1613,1627 ---- /* We can't do anything if there are more delay slots in SEQ than we can handle, or if we don't know that it will be a taken branch. We know that it will be a taken branch if it is either an unconditional ! branch or a conditional branch with a stricter branch condition. + Also, exit if the branch has more than one set, since then it is computing + other results that can't be ignored, e.g. the HPPA mov&branch instruction. + ??? It may be possible to move other sets into INSN in addition to + moving the instructions in the delay slots. */ + if (XVECLEN (seq, 0) - 1 > slots_remaining ! || ! condition_dominates_p (condition, XVECEXP (seq, 0, 0)) ! || ! single_set (XVECEXP (seq, 0, 0))) return delay_list; *************** *** 1622,1626 **** /* If this insn was already done (usually in a previous delay slot), pretend we put it in our delay slot. */ ! if (redundant_insn_p (trial, insn, new_delay_list)) continue; --- 1647,1651 ---- /* If this insn was already done (usually in a previous delay slot), pretend we put it in our delay slot. */ ! if (redundant_insn (trial, insn, new_delay_list)) continue; *************** *** 1712,1716 **** /* If this insn was already done, we don't need it. */ ! if (redundant_insn_p (trial, insn, delay_list)) { delete_from_delay_slot (trial); --- 1737,1741 ---- /* If this insn was already done, we don't need it. */ ! if (redundant_insn (trial, insn, delay_list)) { delete_from_delay_slot (trial); *************** *** 1925,1929 **** static rtx ! redundant_insn_p (insn, target, delay_list) rtx insn; rtx target; --- 1950,1954 ---- static rtx ! redundant_insn (insn, target, delay_list) rtx insn; rtx target; *************** *** 2015,2018 **** --- 2040,2044 ---- simpler tests. */ needed.memory |= set.memory; + needed.unch_memory |= set.unch_memory; IOR_HARD_REG_SET (needed.regs, set.regs); *************** *** 2436,2440 **** /* We have to assume memory is needed, but the CC isn't. */ res->memory = 1; ! res->volatil = 0; res->cc = 0; --- 2462,2466 ---- /* We have to assume memory is needed, but the CC isn't. */ res->memory = 1; ! res->volatil = res->unch_memory = 0; res->cc = 0; *************** *** 3035,3038 **** --- 3061,3065 ---- &needed_at_jump); needed.memory |= needed_at_jump.memory; + needed.unch_memory |= needed_at_jump.unch_memory; IOR_HARD_REG_SET (needed.regs, needed_at_jump.regs); } *************** *** 3078,3083 **** /* If this is a call or jump, we might not get here. */ ! if (GET_CODE (trial) == CALL_INSN ! || GET_CODE (trial) == JUMP_INSN) maybe_never = 1; } --- 3105,3110 ---- /* If this is a call or jump, we might not get here. */ ! if (GET_CODE (trial_delay) == CALL_INSN ! || GET_CODE (trial_delay) == JUMP_INSN) maybe_never = 1; } *************** *** 3085,3089 **** /* If there are slots left to fill and our search was stopped by an unconditional branch, try the insn at the branch target. We can ! redirect the branch if it works. */ if (slots_to_fill != slots_filled && trial --- 3112,3118 ---- /* If there are slots left to fill and our search was stopped by an unconditional branch, try the insn at the branch target. We can ! redirect the branch if it works. ! ! Don't do this if the insn at the branch target is a branch. */ if (slots_to_fill != slots_filled && trial *************** *** 3094,3097 **** --- 3123,3127 ---- && ! (GET_CODE (next_trial) == INSN && GET_CODE (PATTERN (next_trial)) == SEQUENCE) + && GET_CODE (next_trial) != JUMP_INSN && ! insn_references_resource_p (next_trial, &set, 1) && ! insn_sets_resource_p (next_trial, &set, 1) *************** *** 3147,3153 **** slots_filled = 0; - needed = end_of_function_needs; CLEAR_RESOURCE (&set); for (trial = get_last_insn (); ! stop_search_p (trial, 1); trial = PREV_INSN (trial)) --- 3177,3201 ---- slots_filled = 0; CLEAR_RESOURCE (&set); + /* The frame pointer and stack pointer are needed at the beginning of + the epilogue, so instructions setting them can not be put in the + epilogue delay slot. However, everything else needed at function + end is safe, so we don't want to use end_of_function_needs here. */ + CLEAR_RESOURCE (&needed); + if (frame_pointer_needed) + { + SET_HARD_REG_BIT (needed.regs, FRAME_POINTER_REGNUM); + #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM + SET_HARD_REG_BIT (needed.regs, HARD_FRAME_POINTER_REGNUM); + #endif + #ifdef EXIT_IGNORE_STACK + if (! EXIT_IGNORE_STACK) + #endif + SET_HARD_REG_BIT (needed.regs, STACK_POINTER_REGNUM); + } + else + SET_HARD_REG_BIT (needed.regs, STACK_POINTER_REGNUM); + for (trial = get_last_insn (); ! stop_search_p (trial, 1); trial = PREV_INSN (trial)) *************** *** 3161,3164 **** --- 3209,3213 ---- if (! insn_references_resource_p (trial, &set, 1) && ! insn_sets_resource_p (trial, &needed, 1) + && ! insn_sets_resource_p (trial, &set, 1) #ifdef HAVE_cc0 /* Don't want to mess with cc0 here. */ *************** *** 3313,3317 **** actually need to add it to the delay list; we can merely pretend we did. */ ! if (prior_insn = redundant_insn_p (trial, insn, delay_list)) { if (own_thread) --- 3362,3366 ---- actually need to add it to the delay list; we can merely pretend we did. */ ! if (prior_insn = redundant_insn (trial, insn, delay_list)) { if (own_thread) *************** *** 3409,3414 **** && ! insn_references_resource_p (new_thread, &set, 1) ! && redundant_insn_p (new_thread, insn, ! delay_list)) new_thread = next_active_insn (new_thread); break; --- 3458,3462 ---- && ! insn_references_resource_p (new_thread, &set, 1) ! && redundant_insn (new_thread, insn, delay_list)) new_thread = next_active_insn (new_thread); break; *************** *** 3828,3832 **** previous insn. Remove it from the delay slot if so; then set up to reprocess this insn. */ ! if (redundant_insn_p (XVECEXP (pat, 0, 1), delay_insn, 0)) { delete_from_delay_slot (XVECEXP (pat, 0, 1)); --- 3876,3880 ---- previous insn. Remove it from the delay slot if so; then set up to reprocess this insn. */ ! if (redundant_insn (XVECEXP (pat, 0, 1), delay_insn, 0)) { delete_from_delay_slot (XVECEXP (pat, 0, 1)); *************** *** 3848,3852 **** don't convert a jump into a RETURN here. */ trial = follow_jumps (target_label); ! trial = prev_label (next_active_insn (trial)); if (trial == 0 && target_label != 0) trial = find_end_label (); --- 3896,3905 ---- don't convert a jump into a RETURN here. */ trial = follow_jumps (target_label); ! /* We use next_real_insn instead of next_active_insn, so that ! the special USE insns emitted by reorg won't be ignored. ! If they are ignored, then they will get deleted if target_label ! is now unreachable, and that would cause mark_target_live_regs ! to fail. */ ! trial = prev_label (next_real_insn (trial)); if (trial == 0 && target_label != 0) trial = find_end_label (); *************** *** 3863,3867 **** trial = next_active_insn (target_label); if (trial && GET_CODE (PATTERN (trial)) != SEQUENCE ! && redundant_insn_p (trial, insn, 0)) { trial = next_active_insn (trial); --- 3916,3920 ---- trial = next_active_insn (target_label); if (trial && GET_CODE (PATTERN (trial)) != SEQUENCE ! && redundant_insn (trial, insn, 0)) { trial = next_active_insn (trial); *************** *** 3882,3886 **** && (simplejump_p (XVECEXP (PATTERN (trial), 0, 0)) || GET_CODE (PATTERN (XVECEXP (PATTERN (trial), 0, 0))) == RETURN) ! && redundant_insn_p (XVECEXP (PATTERN (trial), 0, 1), insn, 0)) { target_label = JUMP_LABEL (XVECEXP (PATTERN (trial), 0, 0)); --- 3935,3939 ---- && (simplejump_p (XVECEXP (PATTERN (trial), 0, 0)) || GET_CODE (PATTERN (XVECEXP (PATTERN (trial), 0, 0))) == RETURN) ! && redundant_insn (XVECEXP (PATTERN (trial), 0, 1), insn, 0)) { target_label = JUMP_LABEL (XVECEXP (PATTERN (trial), 0, 0)); *************** *** 4216,4219 **** --- 4269,4273 ---- end_of_function_needs.cc = 0; end_of_function_needs.memory = 1; + end_of_function_needs.unch_memory = 0; CLEAR_HARD_REG_SET (end_of_function_needs.regs); *************** *** 4270,4281 **** = (struct target_info **) alloca ((TARGET_HASH_PRIME * sizeof (struct target_info *))); ! bzero (target_hash_table, TARGET_HASH_PRIME * sizeof (struct target_info *)); bb_ticks = (int *) alloca (n_basic_blocks * sizeof (int)); ! bzero (bb_ticks, n_basic_blocks * sizeof (int)); /* Initialize the statistics for this function. */ ! bzero (num_insns_needing_delays, sizeof num_insns_needing_delays); ! bzero (num_filled_delays, sizeof num_filled_delays); /* Now do the delay slot filling. Try everything twice in case earlier --- 4324,4336 ---- = (struct target_info **) alloca ((TARGET_HASH_PRIME * sizeof (struct target_info *))); ! bzero ((char *) target_hash_table, ! TARGET_HASH_PRIME * sizeof (struct target_info *)); bb_ticks = (int *) alloca (n_basic_blocks * sizeof (int)); ! bzero ((char *) bb_ticks, n_basic_blocks * sizeof (int)); /* Initialize the statistics for this function. */ ! bzero ((char *) num_insns_needing_delays, sizeof num_insns_needing_delays); ! bzero ((char *) num_filled_delays, sizeof num_filled_delays); /* Now do the delay slot filling. Try everything twice in case earlier diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/rtl.c gcc-2.7.0/rtl.c *** gcc-2.6.3/rtl.c Fri Mar 25 14:17:09 1994 --- gcc-2.7.0/rtl.c Thu Jun 15 08:02:59 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/rtl.def gcc-2.7.0/rtl.def *** gcc-2.6.3/rtl.def Fri May 6 17:33:49 1994 --- gcc-2.7.0/rtl.def Thu Jun 15 08:03:32 1995 *************** *** 2,6 **** Register Transfer Expressions (rtx's) that make up the Register Transfer Language (rtl) used in the Back End of the GNU compiler. ! Copyright (C) 1987, 1988, 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 2,6 ---- Register Transfer Expressions (rtx's) that make up the Register Transfer Language (rtl) used in the Back End of the GNU compiler. ! Copyright (C) 1987, 1988, 1992, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 18,22 **** 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. */ --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 385,389 **** the function to be inlined and the current function being expanded. */ ! DEF_RTL_EXPR(INLINE_HEADER, "inline_header", "iuuuiiiiiieiiEe", 'x') /* ---------------------------------------------------------------------- --- 386,390 ---- the function to be inlined and the current function being expanded. */ ! DEF_RTL_EXPR(INLINE_HEADER, "inline_header", "iuuuiiiiiieeiiEe", 'x') /* ---------------------------------------------------------------------- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/rtl.h gcc-2.7.0/rtl.h *** gcc-2.6.3/rtl.h Thu Sep 1 22:13:31 1994 --- gcc-2.7.0/rtl.h Thu Jun 15 08:03:16 1995 *************** *** 1,4 **** /* Register Transfer Language (RTL) definitions for GNU C-Compiler ! Copyright (C) 1987, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Register Transfer Language (RTL) definitions for GNU C-Compiler ! Copyright (C) 1987, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 455,459 **** /* The rest is used instead of the above, in a CODE_LABEL, if bytecode is being output. ! We make the slightly klugy assumption that a LABEL has enough slots to hold these things. That happens to be true. */ --- 456,460 ---- /* The rest is used instead of the above, in a CODE_LABEL, if bytecode is being output. ! We make the slightly kludgy assumption that a LABEL has enough slots to hold these things. That happens to be true. */ *************** *** 597,600 **** --- 598,602 ---- POPS_ARGS is the number of bytes of input arguments popped by the function STACK_SLOT_LIST is the list of stack slots. + FORCED_LABELS is the list of labels whose address was taken. FUNCTION_FLAGS are where single-bit flags are saved. OUTGOING_ARGS_SIZE is the size of the largest outgoing stack parameter list. *************** *** 617,624 **** #define POPS_ARGS(RTX) ((RTX)->fld[9].rtint) #define STACK_SLOT_LIST(RTX) ((RTX)->fld[10].rtx) ! #define FUNCTION_FLAGS(RTX) ((RTX)->fld[11].rtint) ! #define OUTGOING_ARGS_SIZE(RTX) ((RTX)->fld[12].rtint) ! #define ORIGINAL_ARG_VECTOR(RTX) ((RTX)->fld[13].rtvec) ! #define ORIGINAL_DECL_INITIAL(RTX) ((RTX)->fld[14].rtx) /* In FUNCTION_FLAGS we save some variables computed when emitting the code --- 619,627 ---- #define POPS_ARGS(RTX) ((RTX)->fld[9].rtint) #define STACK_SLOT_LIST(RTX) ((RTX)->fld[10].rtx) ! #define FORCED_LABELS(RTX) ((RTX)->fld[11].rtx) ! #define FUNCTION_FLAGS(RTX) ((RTX)->fld[12].rtint) ! #define OUTGOING_ARGS_SIZE(RTX) ((RTX)->fld[13].rtint) ! #define ORIGINAL_ARG_VECTOR(RTX) ((RTX)->fld[14].rtvec) ! #define ORIGINAL_DECL_INITIAL(RTX) ((RTX)->fld[15].rtx) /* In FUNCTION_FLAGS we save some variables computed when emitting the code *************** *** 716,720 **** extern rtx gen_reg_rtx PROTO((enum machine_mode)); extern rtx gen_label_rtx PROTO((void)); ! extern rtx gen_inline_header_rtx PROTO((rtx, rtx, int, int, int, int, int, int, rtx, int, int, rtvec, rtx)); extern rtx gen_lowpart_common PROTO((enum machine_mode, rtx)); extern rtx gen_lowpart PROTO((enum machine_mode, rtx)); --- 719,725 ---- extern rtx gen_reg_rtx PROTO((enum machine_mode)); extern rtx gen_label_rtx PROTO((void)); ! extern rtx gen_inline_header_rtx PROTO((rtx, rtx, int, int, int, int, ! int, int, rtx, rtx, int, int, ! rtvec, rtx)); extern rtx gen_lowpart_common PROTO((enum machine_mode, rtx)); extern rtx gen_lowpart PROTO((enum machine_mode, rtx)); *************** *** 727,730 **** --- 732,736 ---- extern int subreg_lowpart_p PROTO((rtx)); extern rtx make_safe_from PROTO((rtx, rtx)); + extern rtx convert_memory_address PROTO((enum machine_mode, rtx)); extern rtx memory_address PROTO((enum machine_mode, rtx)); extern rtx get_insns PROTO((void)); *************** *** 761,764 **** --- 767,771 ---- extern rtx emit_insns PROTO((rtx)); extern rtx emit_insns_before PROTO((rtx, rtx)); + extern rtx emit_insns_after PROTO((rtx, rtx)); extern rtx emit_jump_insn PROTO((rtx)); extern rtx emit_call_insn PROTO((rtx)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/rtl.texi gcc-2.7.0/rtl.texi *** gcc-2.6.3/rtl.texi Sun Aug 7 08:58:53 1994 --- gcc-2.7.0/rtl.texi Tue May 16 07:43:10 1995 *************** *** 631,635 **** ``Extended Floating'' mode represents a triple-precision (twelve byte) floating point number. This mode is used for IEEE extended floating ! point. @findex TFmode --- 631,636 ---- ``Extended Floating'' mode represents a triple-precision (twelve byte) floating point number. This mode is used for IEEE extended floating ! point. On some systems not all bits within these bytes will actually ! be used. @findex TFmode *************** *** 2783,2788 **** argument, a stdio stream, and returns a single RTL object. ! Reading RTL from a file is very slow. This is no currently not a ! problem because reading RTL occurs only as part of building the compiler. --- 2784,2789 ---- argument, a stdio stream, and returns a single RTL object. ! Reading RTL from a file is very slow. This is not currently a ! problem since reading RTL occurs only as part of building the compiler. diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/rtlanal.c gcc-2.7.0/rtlanal.c *** gcc-2.6.3/rtlanal.c Thu Aug 25 18:48:16 1994 --- gcc-2.7.0/rtlanal.c Thu Jun 15 08:03:58 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/scan-decls.c gcc-2.7.0/scan-decls.c *** gcc-2.6.3/scan-decls.c Sun Nov 7 22:08:34 1993 --- gcc-2.7.0/scan-decls.c Thu Jun 15 08:04:57 1995 *************** *** 1,4 **** /* scan-decls.c - Extracts declarations from cpp output. ! Copyright (C) 1993 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it --- 1,4 ---- /* scan-decls.c - Extracts declarations from cpp output. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it *************** *** 14,18 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. Written by Per Bothner , July 1993. */ --- 14,18 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Written by Per Bothner , July 1993. */ *************** *** 21,30 **** #include #include "hconfig.h" ! #include "scan.h" - sstring buf; - sstring rtype; - sstring arg_list; - int brace_nesting = 0; --- 21,26 ---- #include #include "hconfig.h" ! #include "cpplib.h" int brace_nesting = 0; *************** *** 41,56 **** static void ! skip_to_closing_brace (fp) ! FILE *fp; { int nesting = 1; for (;;) { ! int c = get_token (fp, &buf); ! if (c == EOF) break; ! if (c == '{') nesting++; ! if (c == '}' && --nesting == 0) break; } --- 37,52 ---- static void ! skip_to_closing_brace (pfile) ! cpp_reader *pfile; { int nesting = 1; for (;;) { ! enum cpp_token token = cpp_get_token (pfile); ! if (token == CPP_EOF) break; ! if (token == CPP_LBRACE) nesting++; ! if (token == CPP_RBRACE && --nesting == 0) break; } *************** *** 58,78 **** /* This function scans a C source file (actually, the output of cpp), ! reading from FP. It looks for function declarations, and certain ! other interesting sequences (external variables and macros). */ int ! scan_decls (fp) ! FILE *fp; { - int c; int saw_extern, saw_inline; new_statement: ! c = get_token (fp, &buf); handle_statement: current_extern_C = 0; saw_extern = 0; saw_inline = 0; ! if (c == '}') { /* Pop an 'extern "C"' nesting level, if appropriate. */ --- 54,102 ---- /* This function scans a C source file (actually, the output of cpp), ! reading from FP. It looks for function declarations, and ! external variable declarations. ! ! The following grammar (as well as some extra stuff) is recognized: ! ! declaration: ! (decl-specifier)* declarator ("," declarator)* ";" ! decl-specifier: ! identifier ! keyword ! extern "C" ! declarator: ! (ptr-operator)* dname [ "(" argument-declaration-list ")" ] ! ptr-operator: ! ("*" | "&") ("const" | "volatile")* ! dname: ! identifier + Here dname is the actual name being declared. + */ + int ! scan_decls (pfile, argc, argv) ! cpp_reader *pfile; ! int argc; ! char**argv; { int saw_extern, saw_inline; + int old_written; + /* If declarator_start is non-zero, it marks the start of the current + declarator. If it is zero, we are either still parsing the + decl-specs, or prev_id_start marks the start of the declarator. */ + int declarator_start; + int prev_id_start, prev_id_end; + enum cpp_token token; new_statement: ! CPP_SET_WRITTEN (pfile, 0); ! token = cpp_get_token (pfile); ! handle_statement: current_extern_C = 0; saw_extern = 0; saw_inline = 0; ! if (token == CPP_RBRACE) { /* Pop an 'extern "C"' nesting level, if appropriate. */ *************** *** 83,202 **** goto new_statement; } ! if (c == '{') { brace_nesting++; goto new_statement; } ! if (c == EOF) return 0; ! if (c == ';') goto new_statement; ! if (c != IDENTIFIER_TOKEN) goto new_statement; ! rtype.ptr = rtype.base; ! if (SSTRING_LENGTH (&buf) > 16 ! && strncmp (buf.base, "__DEFINED_MACRO_", 16) == 0) ! { ! /* For certain interesting macro names, fixproto puts ! #ifdef FOO ! __DEFINED_MACRO_FOO ! #endif ! into the file to be pre-processed. So if we see __DEFINED_MACRO_FOO, ! it means FOO was defined, which we may want to make a note of. */ ! recognized_macro (buf.base+16); ! goto new_statement; ! } ! if (strcmp (buf.base, "inline") == 0) ! { ! saw_inline = 1; ! c = get_token (fp, &buf); ! } ! if (strcmp (buf.base, "extern") == 0) ! { ! saw_extern = 1; ! c = get_token (fp, &buf); ! if (c == STRING_TOKEN && strcmp (buf.base, "C") == 0) ! { ! current_extern_C = 1; ! c = get_token (fp, &buf); ! if (c == '{') ! { ! brace_nesting++; ! extern_C_braces[extern_C_braces_length++] = brace_nesting; ! goto new_statement; ! } ! c = get_token (fp, &buf); ! } ! } for (;;) { ! int followingc = getc (fp); /* char following token in buf */ ! ! MAKE_SSTRING_SPACE (&rtype, 1); ! *rtype.ptr = 0; ! ! if (c == IDENTIFIER_TOKEN) { ! int nextc = skip_spaces (fp, followingc); ! if (nextc == '(') { int nesting = 1; ! int func_lineno = source_lineno; ! char *args; ! ! arg_list.ptr = arg_list.base; for (;;) { ! c = getc (fp); ! if (c == '(') nesting++; ! else if (c == ')') ! if (--nesting == 0) ! break; ! if (c == EOF) ! break; ! if (c == '\n') { ! c = ' '; ! source_lineno++; ! lineno++; } ! SSTRING_PUT (&arg_list, c); } ! SSTRING_PUT (&arg_list, '\0'); ! args = arg_list.base; ! while (*args == ' ') ! args++; ! recognized_function (buf.base, (saw_inline ? 'I' : in_extern_C_brace || current_extern_C ? 'F' : 'f'), ! rtype.base, args, ! source_filename.base, func_lineno); ! c = get_token (fp, &buf); ! if (c == '{') { /* skip body of (normally) inline function */ ! skip_to_closing_brace (fp); goto new_statement; } ! goto handle_statement; } ! else if (nextc == ';' && saw_extern) { ! recognized_extern (buf.base, rtype.base); ! goto new_statement; } ! else ! ungetc (nextc, fp); } - else if (followingc != EOF) - ungetc (followingc, fp); - if (c == ';' || c == '{' || c == '}' || c == EOF) - goto handle_statement; - sstring_append (&rtype, &buf); - if (followingc == ' ' || followingc == '\t' || followingc == '\n') - SSTRING_PUT (&rtype, ' '); - c = get_token (fp, &buf); } } --- 107,252 ---- goto new_statement; } ! if (token == CPP_LBRACE) { brace_nesting++; goto new_statement; } ! if (token == CPP_EOF) return 0; ! if (token == CPP_SEMICOLON) goto new_statement; ! if (token != CPP_NAME) goto new_statement; ! ! prev_id_start = 0; ! declarator_start = 0; for (;;) { ! int start_written = CPP_WRITTEN (pfile); ! token = cpp_get_token (pfile); ! handle_token: ! switch (token) { ! case CPP_LPAREN: ! /* Looks like this is the start of a formal parameter list. */ ! if (prev_id_start) { int nesting = 1; ! int have_arg_list = 0; ! cpp_buffer *fbuf = cpp_file_buffer (pfile); ! long func_lineno; ! cpp_buf_line_and_col (fbuf, &func_lineno, NULL); for (;;) { ! token = cpp_get_token (pfile); ! if (token == CPP_LPAREN) nesting++; ! else if (token == CPP_RPAREN) { ! nesting--; ! if (nesting == 0) ! break; } ! else if (token == CPP_EOF) ! break; ! else if (token == CPP_NAME || token == CPP_3DOTS) ! have_arg_list = 1; } ! recognized_function (pfile->token_buffer + prev_id_start, ! prev_id_end - prev_id_start, (saw_inline ? 'I' : in_extern_C_brace || current_extern_C ? 'F' : 'f'), ! pfile->token_buffer, prev_id_start, ! have_arg_list, ! fbuf->nominal_fname, func_lineno); ! token = cpp_get_non_space_token (pfile); ! if (token == CPP_LBRACE) { /* skip body of (normally) inline function */ ! skip_to_closing_brace (pfile); goto new_statement; } ! goto maybe_handle_comma; } ! break; ! case CPP_OTHER: ! if (CPP_WRITTEN (pfile) == start_written + 1 ! && (CPP_PWRITTEN (pfile)[-1] == '*' ! || CPP_PWRITTEN (pfile)[-1] == '&')) ! declarator_start = start_written; ! else ! goto handle_statement; ! break; ! case CPP_COMMA: ! case CPP_SEMICOLON: ! if (prev_id_start && saw_extern) { ! recognized_extern (pfile->token_buffer + prev_id_start, ! prev_id_end - prev_id_start, ! pfile->token_buffer, ! prev_id_start); } ! /* ... fall through ... */ ! maybe_handle_comma: ! if (token != CPP_COMMA) ! goto new_statement; ! handle_comma: ! /* Handle multiple declarators in a single declaration, ! as in: extern char *strcpy (), *strcat (), ... ; */ ! if (declarator_start == 0) ! declarator_start = prev_id_start; ! CPP_SET_WRITTEN (pfile, declarator_start); ! break; ! case CPP_NAME: ! /* "inline" and "extern" are recognized but skipped */ ! if (strcmp (pfile->token_buffer, "inline") == 0) ! { ! saw_inline = 1; ! CPP_SET_WRITTEN (pfile, start_written); ! } ! if (strcmp (pfile->token_buffer, "extern") == 0) ! { ! saw_extern = 1; ! CPP_SET_WRITTEN (pfile, start_written); ! token = cpp_get_non_space_token (pfile); ! if (token == CPP_STRING ! && strcmp (pfile->token_buffer, "\"C\"") == 0) ! { ! CPP_SET_WRITTEN (pfile, start_written); ! current_extern_C = 1; ! token = cpp_get_non_space_token (pfile); ! if (token == CPP_LBRACE) ! { ! brace_nesting++; ! extern_C_braces[extern_C_braces_length++] ! = brace_nesting; ! goto new_statement; ! } ! } ! else ! goto handle_token; ! break; ! } ! /* This may be the name of a variable or function. */ ! prev_id_start = start_written; ! prev_id_end = CPP_WRITTEN (pfile); ! break; ! ! case CPP_EOF: ! return; /* ??? FIXME */ ! ! case CPP_LBRACE: case CPP_RBRACE: case CPP_DIRECTIVE: ! goto new_statement; /* handle_statement? */ ! ! case CPP_HSPACE: case CPP_VSPACE: case CPP_COMMENT: case CPP_POP: ! /* Skip initial white space. */ ! if (start_written == 0) ! CPP_SET_WRITTEN (pfile, 0); ! break; ! ! default: ! prev_id_start = NULL; } } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/scan.c gcc-2.7.0/scan.c *** gcc-2.6.3/scan.c Mon Apr 11 17:23:33 1994 --- gcc-2.7.0/scan.c Thu Jun 15 08:05:31 1995 *************** *** 14,18 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "scan.h" --- 14,18 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "scan.h" *************** *** 59,91 **** } - memory_full () - { - abort(); - } - - char * - xmalloc (size) - unsigned size; - { - register char *ptr = (char *) malloc (size); - if (ptr != 0) return (ptr); - memory_full (); - /*NOTREACHED*/ - return 0; - } - - - char * - xrealloc (old, size) - char *old; - unsigned size; - { - register char *ptr = (char *) realloc (old, size); - if (ptr != 0) return (ptr); - memory_full (); - /*NOTREACHED*/ - return 0; - } - int scan_ident (fp, s, c) --- 59,62 ---- *************** *** 267,279 **** *s->ptr = 0; return c; - } - - unsigned long - hash (str) - char *str; - { - int h = 0; - /* Replace this with something faster/better! FIXME! */ - while (*str) h = (h << 3) + *str++; - return h & 0x7FFFFFFF; } --- 238,240 ---- diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/scan.h gcc-2.7.0/scan.h *** gcc-2.6.3/scan.h Sat Nov 6 01:09:48 1993 --- gcc-2.7.0/scan.h Thu Jun 15 08:06:05 1995 *************** *** 14,18 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include --- 14,18 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include *************** *** 60,64 **** extern char *xmalloc _PARAMS((unsigned)); extern char *xrealloc _PARAMS((char *, unsigned)); ! extern unsigned long hash _PARAMS((char*)); /* get_token is a simple C lexer. */ --- 60,64 ---- extern char *xmalloc _PARAMS((unsigned)); extern char *xrealloc _PARAMS((char *, unsigned)); ! extern unsigned long hash _PARAMS((const char*)); /* get_token is a simple C lexer. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/sched.c gcc-2.7.0/sched.c *** gcc-2.6.3/sched.c Tue Sep 20 15:55:14 1994 --- gcc-2.7.0/sched.c Thu Jun 15 08:06:39 1995 *************** *** 1,4 **** /* Instruction scheduling pass. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com) --- 1,4 ---- /* Instruction scheduling pass. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com) *************** *** 18,22 **** 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. */ /* Instruction scheduling pass. --- 18,23 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Instruction scheduling pass. *************** *** 848,852 **** /* If MEM is an unchanging read, then it can't possibly conflict with the store to X, because there is at most one store to MEM, and it must ! have occured somewhere before MEM. */ if (RTX_UNCHANGING_P (mem)) return 0; --- 849,853 ---- /* If MEM is an unchanging read, then it can't possibly conflict with the store to X, because there is at most one store to MEM, and it must ! have occurred somewhere before MEM. */ if (RTX_UNCHANGING_P (mem)) return 0; *************** *** 2368,2372 **** /* Macros and functions for keeping the priority queue sorted, and ! dealing with queueing and unqueueing of instructions. */ #define SCHED_SORT(READY, NEW_READY, OLD_READY) \ --- 2369,2373 ---- /* Macros and functions for keeping the priority queue sorted, and ! dealing with queueing and dequeueing of instructions. */ #define SCHED_SORT(READY, NEW_READY, OLD_READY) \ *************** *** 2865,2869 **** && regno != STACK_POINTER_REGNUM) { ! if (! all_needed && ! dead_or_set_p (insn, x)) { /* Check for the case where the register dying partially --- 2866,2875 ---- && regno != STACK_POINTER_REGNUM) { ! /* ??? It is perhaps a dead_or_set_p bug that it does ! not check for REG_UNUSED notes itself. This is necessary ! for the case where the SET_DEST is a subreg of regno, as ! dead_or_set_p handles subregs specially. */ ! if (! all_needed && ! dead_or_set_p (insn, x) ! && ! find_reg_note (insn, REG_UNUSED, x)) { /* Check for the case where the register dying partially *************** *** 3104,3107 **** --- 3110,3140 ---- } + /* Search INSN for fake REG_DEAD notes for NOTE_INSN_SETJMP, + NOTE_INSN_LOOP_BEG, and NOTE_INSN_LOOP_END; and convert them back + into NOTEs. LAST is the last instruction output by the instruction + scheduler. Return the new value of LAST. */ + + static rtx + reemit_notes (insn, last) + rtx insn; + rtx last; + { + rtx note; + + for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) + { + if (REG_NOTE_KIND (note) == REG_DEAD + && GET_CODE (XEXP (note, 0)) == CONST_INT) + { + if (INTVAL (XEXP (note, 0)) == NOTE_INSN_SETJMP) + emit_note_after (INTVAL (XEXP (note, 0)), insn); + else + last = emit_note_before (INTVAL (XEXP (note, 0)), last); + remove_note (insn, note); + } + } + return last; + } + /* Use modified list scheduling to rearrange insns in basic block B. FILE, if nonzero, is where we dump interesting output about *************** *** 3427,3431 **** if ((REG_NOTE_KIND (link) == REG_DEAD || REG_NOTE_KIND (link) == REG_UNUSED) ! /* Verify that the REG_NOTE has a legal value. */ && GET_CODE (XEXP (link, 0)) == REG) { --- 3460,3464 ---- if ((REG_NOTE_KIND (link) == REG_DEAD || REG_NOTE_KIND (link) == REG_UNUSED) ! /* Verify that the REG_NOTE has a valid value. */ && GET_CODE (XEXP (link, 0)) == REG) { *************** *** 3530,3534 **** if ((REG_NOTE_KIND (link) == REG_DEAD || REG_NOTE_KIND (link) == REG_UNUSED) ! /* Verify that the REG_NOTE has a legal value. */ && GET_CODE (XEXP (link, 0)) == REG) { --- 3563,3567 ---- if ((REG_NOTE_KIND (link) == REG_DEAD || REG_NOTE_KIND (link) == REG_UNUSED) ! /* Verify that the REG_NOTE has a valid value. */ && GET_CODE (XEXP (link, 0)) == REG) { *************** *** 3859,3878 **** /* Check to see if we need to re-emit any notes here. */ ! { ! rtx note; ! ! for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) ! { ! if (REG_NOTE_KIND (note) == REG_DEAD ! && GET_CODE (XEXP (note, 0)) == CONST_INT) ! { ! if (INTVAL (XEXP (note, 0)) == NOTE_INSN_SETJMP) ! emit_note_after (INTVAL (XEXP (note, 0)), insn); ! else ! last = emit_note_before (INTVAL (XEXP (note, 0)), last); ! remove_note (insn, note); ! } ! } ! } /* Everything that precedes INSN now either becomes "ready", if --- 3892,3896 ---- /* Check to see if we need to re-emit any notes here. */ ! last = reemit_notes (insn, last); /* Everything that precedes INSN now either becomes "ready", if *************** *** 3889,3893 **** if (SCHED_GROUP_P (insn)) { ! /* Disable these insns from being launched. */ link = insn; while (SCHED_GROUP_P (link)) --- 3907,3912 ---- if (SCHED_GROUP_P (insn)) { ! /* Disable these insns from being launched, in case one of the ! insns in the group has a dependency on an earlier one. */ link = insn; while (SCHED_GROUP_P (link)) *************** *** 3898,3907 **** } ! /* None of these insns can move forward into delay slots. */ while (SCHED_GROUP_P (insn)) { insn = PREV_INSN (insn); - new_ready = schedule_insn (insn, ready, new_ready, clock); - INSN_PRIORITY (insn) = DONE_PRIORITY; sched_n_insns += 1; --- 3917,3925 ---- } ! /* Now handle each group insn like the main insn was handled ! above. */ while (SCHED_GROUP_P (insn)) { insn = PREV_INSN (insn); sched_n_insns += 1; *************** *** 3909,3912 **** --- 3927,3936 ---- PREV_INSN (last) = insn; last = insn; + + last = reemit_notes (insn, last); + + /* ??? Why don't we set LAUNCH_PRIORITY here? */ + new_ready = schedule_insn (insn, ready, new_ready, clock); + INSN_PRIORITY (insn) = DONE_PRIORITY; } } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/sdbout.c gcc-2.7.0/sdbout.c *** gcc-2.6.3/sdbout.c Fri Sep 30 17:23:57 1994 --- gcc-2.7.0/sdbout.c Thu Jun 15 08:07:11 1995 *************** *** 1,4 **** /* Output sdb-format symbol table information from GNU compiler. ! Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Output sdb-format symbol table information from GNU compiler. ! Copyright (C) 1988, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ /* mike@tredysvr.Tredydev.Unisys.COM says: --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* mike@tredysvr.Tredydev.Unisys.COM says: *************** *** 54,58 **** /* Mips systems use the SDB functions to dump out symbols, but do not supply usable syms.h include files. */ ! #if defined(USG) && !defined(MIPS) && !defined (hpux) && !defined(WINNT) #include /* Use T_INT if we don't have T_VOID. */ --- 55,59 ---- /* Mips systems use the SDB functions to dump out symbols, but do not supply usable syms.h include files. */ ! #if defined(USG) && !defined(MIPS) && !defined (hpux) && !defined(_WIN32) && !defined(__linux__) #include /* Use T_INT if we don't have T_VOID. */ *************** *** 370,374 **** tree type; { ! int val = plain_type_1 (type); /* If we have already saved up some array dimensions, print them now. */ --- 371,375 ---- tree type; { ! int val = plain_type_1 (type, 0); /* If we have already saved up some array dimensions, print them now. */ *************** *** 423,433 **** /* Find the IDENTIFIER_NODE for the type name. */ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) { - t = TYPE_NAME (type); - } - #if 1 /* As a temporary hack, use typedef names for C++ only. */ - else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL - && TYPE_LANG_SPECIFIC (type)) - { t = DECL_NAME (TYPE_NAME (type)); /* The DECL_NAME for templates includes "<>", which breaks --- 424,430 ---- /* Find the IDENTIFIER_NODE for the type name. */ if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) + t = TYPE_NAME (type); + else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL) { t = DECL_NAME (TYPE_NAME (type)); /* The DECL_NAME for templates includes "<>", which breaks *************** *** 437,441 **** t = DECL_ASSEMBLER_NAME (TYPE_NAME (type)); } - #endif /* Now get the name as a string, or invent one. */ --- 434,437 ---- *************** *** 455,467 **** } static int ! plain_type_1 (type) tree type; { if (type == 0) type = void_type_node; ! if (type == error_mark_node) type = integer_type_node; ! type = TYPE_MAIN_VARIANT (type); switch (TREE_CODE (type)) --- 451,473 ---- } + /* Return the .type value for type TYPE. + + LEVEL indicates how many levels deep we have recursed into the type. + The SDB debug format can only represent 6 derived levels of types. + After that, we must output inaccurate debug info. We deliberately + stop before the 7th level, so that ADA recursive types will not give an + infinite loop. */ + static int ! plain_type_1 (type, level) tree type; + int level; { if (type == 0) type = void_type_node; ! else if (type == error_mark_node) type = integer_type_node; ! else ! type = TYPE_MAIN_VARIANT (type); switch (TREE_CODE (type)) *************** *** 508,511 **** --- 514,519 ---- if (size == LONG_TYPE_SIZE) return (TREE_UNSIGNED (type) ? T_ULONG : T_LONG); + if (size == LONG_LONG_TYPE_SIZE) /* better than nothing */ + return (TREE_UNSIGNED (type) ? T_ULONG : T_LONG); return 0; } *************** *** 524,528 **** { int m; ! m = plain_type_1 (TREE_TYPE (type)); if (sdb_n_dims < SDB_MAX_DIM) sdb_dims[sdb_n_dims++] --- 532,539 ---- { int m; ! if (level >= 6) ! return T_VOID; ! else ! m = plain_type_1 (TREE_TYPE (type), level+1); if (sdb_n_dims < SDB_MAX_DIM) sdb_dims[sdb_n_dims++] *************** *** 573,577 **** case REFERENCE_TYPE: { ! int m = plain_type_1 (TREE_TYPE (type)); return PUSH_DERIVED_LEVEL (DT_PTR, m); } --- 584,592 ---- case REFERENCE_TYPE: { ! int m; ! if (level >= 6) ! return T_VOID; ! else ! m = plain_type_1 (TREE_TYPE (type), level+1); return PUSH_DERIVED_LEVEL (DT_PTR, m); } *************** *** 579,583 **** case METHOD_TYPE: { ! int m = plain_type_1 (TREE_TYPE (type)); return PUSH_DERIVED_LEVEL (DT_FCN, m); } --- 594,602 ---- case METHOD_TYPE: { ! int m; ! if (level >= 6) ! return T_VOID; ! else ! m = plain_type_1 (TREE_TYPE (type), level+1); return PUSH_DERIVED_LEVEL (DT_FCN, m); } *************** *** 788,795 **** /* Record the name for, starting a symtab entry. */ ! if (DECL_LANG_SPECIFIC (decl)) ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); ! else ! name = IDENTIFIER_POINTER (DECL_NAME (decl)); if (GET_CODE (value) == MEM --- 807,811 ---- /* Record the name for, starting a symtab entry. */ ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); if (GET_CODE (value) == MEM *************** *** 1009,1013 **** tree type; { ! text_section (); switch (TREE_CODE (type)) --- 1025,1033 ---- tree type; { ! if (current_function_decl != NULL_TREE ! && DECL_SECTION_NAME (current_function_decl) != NULL_TREE) ! ; /* Don't change section amid function. */ ! else ! text_section (); switch (TREE_CODE (type)) *************** *** 1159,1166 **** CONTIN; ! if (DECL_LANG_SPECIFIC (tem)) ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (tem)); ! else ! name = IDENTIFIER_POINTER (DECL_NAME (tem)); PUT_SDB_DEF (name); if (DECL_BIT_FIELD_TYPE (tem)) --- 1179,1183 ---- CONTIN; ! name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (tem)); PUT_SDB_DEF (name); if (DECL_BIT_FIELD_TYPE (tem)) *************** *** 1253,1262 **** the address if the least significant bytes (which we are using) are not the first ones. */ ! #if BYTES_BIG_ENDIAN ! if (TREE_TYPE (parms) != DECL_ARG_TYPE (parms)) current_sym_value += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms))) - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))); ! #endif if (GET_CODE (DECL_RTL (parms)) == MEM && GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS --- 1270,1279 ---- the address if the least significant bytes (which we are using) are not the first ones. */ ! if (BYTES_BIG_ENDIAN ! && TREE_TYPE (parms) != DECL_ARG_TYPE (parms)) current_sym_value += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms))) - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))); ! if (GET_CODE (DECL_RTL (parms)) == MEM && GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS *************** *** 1375,1383 **** so it occupies the least significant bytes. On a big-endian machine those are not the low-numbered ones. */ ! #if BYTES_BIG_ENDIAN ! if (offset != -1 && TREE_TYPE (parms) != DECL_ARG_TYPE (parms)) offset += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms))) - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))); - #endif if (INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)) != offset) {...} #endif --- 1392,1400 ---- so it occupies the least significant bytes. On a big-endian machine those are not the low-numbered ones. */ ! if (BYTES_BIG_ENDIAN ! && offset != -1 ! && TREE_TYPE (parms) != DECL_ARG_TYPE (parms)) offset += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms))) - GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))); if (INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)) != offset) {...} #endif diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/stack.h gcc-2.7.0/stack.h *** gcc-2.6.3/stack.h Fri Mar 19 21:11:03 1993 --- gcc-2.7.0/stack.h Thu Jun 15 08:07:45 1995 *************** *** 15,19 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Summary: this file contains additional structures that layer --- 15,20 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Summary: this file contains additional structures that layer diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/stmt.c gcc-2.7.0/stmt.c *** gcc-2.6.3/stmt.c Thu Sep 29 19:37:39 1994 --- gcc-2.7.0/stmt.c Thu Jun 15 08:08:17 1995 *************** *** 1,4 **** /* Expands front end tree to back end RTL for GNU C-Compiler ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Expands front end tree to back end RTL for GNU C-Compiler ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 439,443 **** static void bc_fixup_gotos PROTO((struct nesting *, int, tree, rtx, int)); - static int warn_if_unused_value PROTO((tree)); static void bc_expand_start_cond PROTO((tree, int)); static void bc_expand_end_cond PROTO((void)); --- 440,443 ---- *************** *** 449,454 **** static void bc_expand_decl_init PROTO((tree)); static void expand_null_return_1 PROTO((rtx, int)); static int tail_recursion_args PROTO((tree, tree)); ! static void expand_cleanups PROTO((tree, tree)); static void bc_expand_start_case PROTO((struct nesting *, tree, tree, char *)); --- 449,455 ---- static void bc_expand_decl_init PROTO((tree)); static void expand_null_return_1 PROTO((rtx, int)); + static void expand_value_return PROTO((rtx)); static int tail_recursion_args PROTO((tree, tree)); ! static void expand_cleanups PROTO((tree, tree, int, int)); static void bc_expand_start_case PROTO((struct nesting *, tree, tree, char *)); *************** *** 610,614 **** --- 611,621 ---- { rtx x = expand_expr (exp, NULL_RTX, VOIDmode, 0); + + #ifdef POINTERS_EXTEND_UNSIGNED + x = convert_memory_address (Pmode, x); + #endif + emit_queue (); + do_pending_stack_adjust (); emit_indirect_jump (x); } *************** *** 805,809 **** if (block->data.block.cleanups != 0) { ! expand_cleanups (block->data.block.cleanups, NULL_TREE); do_pending_stack_adjust (); } --- 812,816 ---- if (block->data.block.cleanups != 0) { ! expand_cleanups (block->data.block.cleanups, NULL_TREE, 1, 1); do_pending_stack_adjust (); } *************** *** 869,873 **** if (block->data.block.cleanups != 0) { ! expand_cleanups (block->data.block.cleanups, NULL_TREE); do_pending_stack_adjust (); } --- 876,880 ---- if (block->data.block.cleanups != 0) { ! expand_cleanups (block->data.block.cleanups, NULL_TREE, 1, 1); do_pending_stack_adjust (); } *************** *** 1182,1186 **** && TREE_VALUE (lists) != 0) { ! expand_cleanups (TREE_VALUE (lists), 0); /* Pop any pushes done in the cleanups, in case function is about to return. */ --- 1189,1193 ---- && TREE_VALUE (lists) != 0) { ! expand_cleanups (TREE_VALUE (lists), NULL_TREE, 1, 1); /* Pop any pushes done in the cleanups, in case function is about to return. */ *************** *** 1214,1219 **** } ! /* Mark the cleanups of exited blocks so that they are executed ! by the code above. */ for (prev = 0, f = goto_fixup_chain; f; prev = f, f = f->next) if (f->before_jump != 0 --- 1221,1227 ---- } ! /* For any still-undefined labels, do the cleanups for this block now. ! We must do this now since items in the cleanup list may go out ! of scope when the block ends. */ for (prev = 0, f = goto_fixup_chain; f; prev = f, f = f->next) if (f->before_jump != 0 *************** *** 1222,1241 **** a stack level to restore, that started before the fixup, mark this stack level as needing restoration ! when the fixup is later finalized. ! Also mark the cleanup_list_list element for F ! that corresponds to this block, so that ultimately ! this block's cleanups will be executed by the code above. */ && thisblock != 0 ! /* Note: if THISBLOCK == 0 and we have a label that hasn't appeared, ! it means the label is undefined. That's erroneous, but possible. */ && (thisblock->data.block.block_start_count <= f->block_start_count)) { tree lists = f->cleanup_list_list; for (; lists; lists = TREE_CHAIN (lists)) /* If the following elt. corresponds to our containing block then the elt. must be for this block. */ if (TREE_CHAIN (lists) == thisblock->data.block.outer_cleanups) ! TREE_ADDRESSABLE (lists) = 1; if (stack_level) --- 1230,1261 ---- a stack level to restore, that started before the fixup, mark this stack level as needing restoration ! when the fixup is later finalized. */ && thisblock != 0 ! /* Note: if THISBLOCK == 0 and we have a label that hasn't appeared, it ! means the label is undefined. That's erroneous, but possible. */ && (thisblock->data.block.block_start_count <= f->block_start_count)) { tree lists = f->cleanup_list_list; + rtx cleanup_insns; + for (; lists; lists = TREE_CHAIN (lists)) /* If the following elt. corresponds to our containing block then the elt. must be for this block. */ if (TREE_CHAIN (lists) == thisblock->data.block.outer_cleanups) ! { ! start_sequence (); ! pushlevel (0); ! set_block (f->context); ! expand_cleanups (TREE_VALUE (lists), NULL_TREE, 1, 1); ! do_pending_stack_adjust (); ! cleanup_insns = get_insns (); ! poplevel (1, 0, 0); ! end_sequence (); ! f->before_jump ! = emit_insns_after (cleanup_insns, f->before_jump); ! ! TREE_VALUE (lists) = 0; ! } if (stack_level) *************** *** 1320,1324 **** if (output_bytecode) { ! error ("`asm' is illegal when generating bytecode"); return; } --- 1340,1344 ---- if (output_bytecode) { ! error ("`asm' is invalid when generating bytecode"); return; } *************** *** 1368,1372 **** if (output_bytecode) { ! error ("`asm' is illegal when generating bytecode"); return; } --- 1388,1392 ---- if (output_bytecode) { ! error ("`asm' is invalid when generating bytecode"); return; } *************** *** 1390,1396 **** { tree val = TREE_VALUE (tail); tree val1; int j; ! int found_equal; /* If there's an erroneous arg, emit no insn. */ --- 1410,1418 ---- { tree val = TREE_VALUE (tail); + tree type = TREE_TYPE (val); tree val1; int j; ! int found_equal = 0; ! int allows_reg = 0; /* If there's an erroneous arg, emit no insn. */ *************** *** 1398,1414 **** return; ! /* Make sure constraint has `=' and does not have `+'. */ ! found_equal = 0; ! for (j = 0; j < TREE_STRING_LENGTH (TREE_PURPOSE (tail)); j++) ! { ! if (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j] == '+') ! { ! error ("output operand constraint contains `+'"); ! return; ! } ! if (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j] == '=') found_equal = 1; ! } if (! found_equal) { --- 1420,1457 ---- return; ! /* Make sure constraint has `=' and does not have `+'. Also, see ! if it allows any register. Be liberal on the latter test, since ! the worst that happens if we get it wrong is we issue an error ! message. */ ! for (j = 0; j < TREE_STRING_LENGTH (TREE_PURPOSE (tail)) - 1; j++) ! switch (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j]) ! { ! case '+': ! error ("output operand constraint contains `+'"); ! return; ! ! case '=': found_equal = 1; ! break; ! ! case '?': case '!': case '*': case '%': case '&': ! case '0': case '1': case '2': case '3': case '4': ! case 'V': case 'm': case 'o': case '<': case '>': ! case 'E': case 'F': case 'G': case 'H': case 'X': ! case 's': case 'i': case 'n': ! case 'I': case 'J': case 'K': case 'L': case 'M': ! case 'N': case 'O': case 'P': case ',': ! #ifdef EXTRA_CONSTRAINT ! case 'Q': case 'R': case 'S': case 'T': case 'U': ! #endif ! break; ! ! case 'p': case 'g': case 'r': ! default: ! allows_reg = 1; ! break; ! } ! if (! found_equal) { *************** *** 1417,1445 **** } ! /* If an output operand is not a variable or indirect ref, ! or a part of one, ! create a SAVE_EXPR which is a pseudo-reg ! to act as an intermediate temporary. ! Make the asm insn write into that, then copy it to ! the real output operand. */ ! ! while (TREE_CODE (val) == COMPONENT_REF ! || TREE_CODE (val) == ARRAY_REF) ! val = TREE_OPERAND (val, 0); ! ! if (TREE_CODE (val) != VAR_DECL ! && TREE_CODE (val) != PARM_DECL ! && TREE_CODE (val) != INDIRECT_REF) ! { ! TREE_VALUE (tail) = save_expr (TREE_VALUE (tail)); ! /* If it's a constant, print error now so don't crash later. */ ! if (TREE_CODE (TREE_VALUE (tail)) != SAVE_EXPR) { ! error ("invalid output in `asm'"); ! return; } ! } ! output_rtx[i] = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); } --- 1460,1496 ---- } ! /* If an output operand is not a decl or indirect ref and our constraint ! allows a register, make a temporary to act as an intermediate. ! Make the asm insn write into that, then our caller will copy it to ! the real output operand. Likewise for promoted variables. */ ! ! if (TREE_CODE (val) == INDIRECT_REF ! || (TREE_CODE_CLASS (TREE_CODE (val)) == 'd' ! && ! (GET_CODE (DECL_RTL (val)) == REG ! && GET_MODE (DECL_RTL (val)) != TYPE_MODE (type))) ! || ! allows_reg) ! { ! if (! allows_reg) ! mark_addressable (TREE_VALUE (tail)); ! ! output_rtx[i] ! = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); ! ! if (! allows_reg && GET_CODE (output_rtx[i]) != MEM) ! error ("output number %d not directly addressable", i); ! } ! else ! { ! if (TYPE_MODE (type) == BLKmode) { ! output_rtx[i] = assign_stack_temp (BLKmode, ! int_size_in_bytes (type), 0); ! MEM_IN_STRUCT_P (output_rtx[i]) = AGGREGATE_TYPE_P (type); } ! else ! output_rtx[i] = gen_reg_rtx (TYPE_MODE (type)); ! TREE_VALUE (tail) = make_tree (type, output_rtx[i]); ! } } *************** *** 1493,1496 **** --- 1544,1553 ---- XVECEXP (body, 3, i) /* argvec */ = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); + if (CONSTANT_P (XVECEXP (body, 3, i)) + && ! general_operand (XVECEXP (body, 3, i), + TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))))) + XVECEXP (body, 3, i) + = force_reg (TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))), + XVECEXP (body, 3, i)); XVECEXP (body, 4, i) /* constraints */ = gen_rtx (ASM_INPUT, TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))), *************** *** 1573,1576 **** --- 1630,1634 ---- /* Ignore unknown register, error already signalled. */ + continue; } *************** *** 1622,1625 **** --- 1680,1689 ---- warn_if_unused_value (exp); } + + /* If EXP is of function type and we are expanding statements for + value, convert it to pointer-to-function. */ + if (expr_stmts_for_value && TREE_CODE (TREE_TYPE (exp)) == FUNCTION_TYPE) + exp = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (exp)), exp); + last_expr_type = TREE_TYPE (exp); if (! flag_syntax_only) *************** *** 1668,1672 **** Return 1 if a warning is printed; 0 otherwise. */ ! static int warn_if_unused_value (exp) tree exp; --- 1732,1736 ---- Return 1 if a warning is printed; 0 otherwise. */ ! int warn_if_unused_value (exp) tree exp; *************** *** 1698,1701 **** --- 1762,1768 ---- return warn_if_unused_value (TREE_OPERAND (exp, 1)); + case SAVE_EXPR: + return warn_if_unused_value (TREE_OPERAND (exp, 1)); + case TRUTH_ORIF_EXPR: case TRUTH_ANDIF_EXPR: *************** *** 1732,1740 **** tem = TREE_OPERAND (tem, 0); ! if (TREE_CODE (tem) == MODIFY_EXPR || TREE_CODE (tem) == INIT_EXPR) return 0; } ! /* ... fall through ... */ default: /* Referencing a volatile value is a side effect, so don't warn. */ --- 1799,1815 ---- tem = TREE_OPERAND (tem, 0); ! if (TREE_CODE (tem) == MODIFY_EXPR || TREE_CODE (tem) == INIT_EXPR ! || TREE_CODE (tem) == CALL_EXPR) return 0; } ! goto warn; + case INDIRECT_REF: + /* Don't warn about automatic dereferencing of references, since + the user cannot control it. */ + if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == REFERENCE_TYPE) + return warn_if_unused_value (TREE_OPERAND (exp, 0)); + /* ... fall through ... */ + default: /* Referencing a volatile value is a side effect, so don't warn. */ *************** *** 1743,1746 **** --- 1818,1822 ---- && TREE_THIS_VOLATILE (exp)) return 0; + warn: warning_with_file_and_line (emit_filename, emit_lineno, "value computed is not used"); *************** *** 2391,2395 **** /* Generate RTL to return from the current function, with value VAL. */ ! void expand_value_return (val) rtx val; --- 2467,2471 ---- /* Generate RTL to return from the current function, with value VAL. */ ! static void expand_value_return (val) rtx val; *************** *** 2635,2639 **** #endif /* HAVE_return */ ! if (cleanups && retval_rhs != 0 && TREE_TYPE (retval_rhs) != void_type_node --- 2711,2811 ---- #endif /* HAVE_return */ ! /* If the result is an aggregate that is being returned in one (or more) ! registers, load the registers here. The compiler currently can't handle ! copying a BLKmode value into registers. We could put this code in a ! more general area (for use by everyone instead of just function ! call/return), but until this feature is generally usable it is kept here ! (and in expand_call). The value must go into a pseudo in case there ! are cleanups that will clobber the real return register. */ ! ! if (retval_rhs != 0 ! && TYPE_MODE (TREE_TYPE (retval_rhs)) == BLKmode ! && GET_CODE (DECL_RTL (DECL_RESULT (current_function_decl))) == REG) ! { ! int i; ! int big_endian_correction = 0; ! int bytes = int_size_in_bytes (TREE_TYPE (retval_rhs)); ! int n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; ! rtx *result_pseudos = (rtx *) alloca (sizeof (rtx) * n_regs); ! rtx result_reg; ! rtx result_val = expand_expr (retval_rhs, NULL_RTX, VOIDmode, 0); ! enum machine_mode tmpmode, result_reg_mode; ! ! /* Structures smaller than a word are aligned to the least significant ! byte (to the right). On a BYTES_BIG_ENDIAN machine, this means we ! must skip the empty high order bytes when calculating the bit ! offset. */ ! if (BYTES_BIG_ENDIAN && bytes < UNITS_PER_WORD) ! big_endian_correction = (BITS_PER_WORD - (bytes * BITS_PER_UNIT)); ! ! for (i = 0; i < n_regs; i++) ! { ! rtx reg = gen_reg_rtx (word_mode); ! rtx word = operand_subword_force (result_val, i, BLKmode); ! int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (retval_rhs)),BITS_PER_WORD); ! int bitpos; ! ! result_pseudos[i] = reg; ! ! /* Clobber REG and move each partword into it. Ensure we don't ! go past the end of the structure. Note that the loop below ! works because we've already verified that padding and ! endianness are compatible. */ ! emit_insn (gen_rtx (CLOBBER, VOIDmode, reg)); ! ! for (bitpos = 0; ! bitpos < BITS_PER_WORD && bytes > 0; ! bitpos += bitsize, bytes -= bitsize / BITS_PER_UNIT) ! { ! int xbitpos = bitpos + big_endian_correction; ! ! store_bit_field (reg, bitsize, xbitpos, word_mode, ! extract_bit_field (word, bitsize, bitpos, 1, ! NULL_RTX, word_mode, ! word_mode, ! bitsize / BITS_PER_UNIT, ! BITS_PER_WORD), ! bitsize / BITS_PER_UNIT, BITS_PER_WORD); ! } ! } ! ! /* Find the smallest integer mode large enough to hold the ! entire structure and use that mode instead of BLKmode ! on the USE insn for the return register. */ ! bytes = int_size_in_bytes (TREE_TYPE (retval_rhs)); ! for (tmpmode = GET_CLASS_NARROWEST_MODE (MODE_INT); ! tmpmode != MAX_MACHINE_MODE; ! tmpmode = GET_MODE_WIDER_MODE (tmpmode)) ! { ! /* Have we found a large enough mode? */ ! if (GET_MODE_SIZE (tmpmode) >= bytes) ! break; ! } ! ! /* No suitable mode found. */ ! if (tmpmode == MAX_MACHINE_MODE) ! abort (); ! ! PUT_MODE (DECL_RTL (DECL_RESULT (current_function_decl)), tmpmode); ! ! if (GET_MODE_SIZE (tmpmode) < GET_MODE_SIZE (word_mode)) ! result_reg_mode = word_mode; ! else ! result_reg_mode = tmpmode; ! result_reg = gen_reg_rtx (result_reg_mode); ! ! /* Now that the value is in pseudos, copy it to the result reg(s). */ ! emit_queue (); ! free_temp_slots (); ! for (i = 0; i < n_regs; i++) ! emit_move_insn (operand_subword (result_reg, i, 0, result_reg_mode), ! result_pseudos[i]); ! ! if (tmpmode != result_reg_mode) ! result_reg = gen_lowpart (tmpmode, result_reg); ! ! expand_value_return (result_reg); ! } ! else if (cleanups && retval_rhs != 0 && TREE_TYPE (retval_rhs) != void_type_node *************** *** 2964,2967 **** --- 3136,3140 ---- emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "abort"), 0, VOIDmode, 0); + emit_barrier (); emit_label (afterward); } *************** *** 2996,3025 **** { /* Only clean up here if this point can actually be reached. */ ! if (GET_CODE (get_last_insn ()) != BARRIER) ! { ! /* Don't let cleanups affect ({...}) constructs. */ ! int old_expr_stmts_for_value = expr_stmts_for_value; ! rtx old_last_expr_value = last_expr_value; ! tree old_last_expr_type = last_expr_type; ! expr_stmts_for_value = 0; ! ! /* Do the cleanups. */ ! expand_cleanups (thisblock->data.block.cleanups, NULL_TREE); ! do_pending_stack_adjust (); ! ! expr_stmts_for_value = old_expr_stmts_for_value; ! last_expr_value = old_last_expr_value; ! last_expr_type = old_last_expr_type; ! /* Restore the stack level. */ ! if (thisblock->data.block.stack_level != 0) ! { ! emit_stack_restore (thisblock->next ? SAVE_BLOCK : SAVE_FUNCTION, ! thisblock->data.block.stack_level, NULL_RTX); ! if (nonlocal_goto_handler_slot != 0) ! emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, ! NULL_RTX); ! } } --- 3169,3198 ---- { /* Only clean up here if this point can actually be reached. */ ! int reachable = GET_CODE (get_last_insn ()) != BARRIER; ! /* Don't let cleanups affect ({...}) constructs. */ ! int old_expr_stmts_for_value = expr_stmts_for_value; ! rtx old_last_expr_value = last_expr_value; ! tree old_last_expr_type = last_expr_type; ! expr_stmts_for_value = 0; ! ! /* Do the cleanups. */ ! expand_cleanups (thisblock->data.block.cleanups, NULL_TREE, 0, reachable); ! if (reachable) ! do_pending_stack_adjust (); ! expr_stmts_for_value = old_expr_stmts_for_value; ! last_expr_value = old_last_expr_value; ! last_expr_type = old_last_expr_type; ! ! /* Restore the stack level. */ ! ! if (reachable && thisblock->data.block.stack_level != 0) ! { ! emit_stack_restore (thisblock->next ? SAVE_BLOCK : SAVE_FUNCTION, ! thisblock->data.block.stack_level, NULL_RTX); ! if (nonlocal_goto_handler_slot != 0) ! emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, ! NULL_RTX); } *************** *** 3151,3154 **** --- 3324,3328 ---- Until we know the size, represent its address with a reg. */ DECL_RTL (decl) = gen_rtx (MEM, BLKmode, gen_reg_rtx (Pmode)); + MEM_IN_STRUCT_P (DECL_RTL (decl)) = AGGREGATE_TYPE_P (type); } else if (DECL_MODE (decl) != BLKmode *************** *** 3212,3215 **** --- 3386,3390 ---- / BITS_PER_UNIT), 1); + MEM_IN_STRUCT_P (DECL_RTL (decl)) = AGGREGATE_TYPE_P (TREE_TYPE (decl)); /* Set alignment we actually gave this decl. */ *************** *** 3395,3398 **** --- 3570,3574 ---- /* Free any temporaries we made while initializing the decl. */ + preserve_temp_slots (NULL_RTX); free_temp_slots (); } *************** *** 3582,3591 **** whose TREE_PURPOSE matches DONT_DO is omitted. This is sometimes used to avoid a cleanup associated with ! a value that is being returned out of the scope. */ static void ! expand_cleanups (list, dont_do) tree list; tree dont_do; { tree tail; --- 3758,3775 ---- whose TREE_PURPOSE matches DONT_DO is omitted. This is sometimes used to avoid a cleanup associated with ! a value that is being returned out of the scope. ! ! If IN_FIXUP is non-zero, we are generating this cleanup for a fixup ! goto and handle protection regions specially in that case. ! ! If REACHABLE, we emit code, otherwise just inform the exception handling ! code about this finalization. */ static void ! expand_cleanups (list, dont_do, in_fixup, reachable) tree list; tree dont_do; + int in_fixup; + int reachable; { tree tail; *************** *** 3594,3612 **** { if (TREE_CODE (TREE_VALUE (tail)) == TREE_LIST) ! expand_cleanups (TREE_VALUE (tail), dont_do); else { ! (*interim_eh_hook) (TREE_VALUE (tail)); ! /* Cleanups may be run multiple times. For example, ! when exiting a binding contour, we expand the ! cleanups associated with that contour. When a goto ! within that binding contour has a target outside that ! contour, it will expand all cleanups from its scope to ! the target. Though the cleanups are expanded multiple ! times, the control paths are non-overlapping so the ! cleanups will not be executed twice. */ ! expand_expr (TREE_VALUE (tail), const0_rtx, VOIDmode, 0); ! free_temp_slots (); } } --- 3778,3800 ---- { if (TREE_CODE (TREE_VALUE (tail)) == TREE_LIST) ! expand_cleanups (TREE_VALUE (tail), dont_do, in_fixup, reachable); else { ! if (! in_fixup) ! (*interim_eh_hook) (TREE_VALUE (tail)); ! if (reachable) ! { ! /* Cleanups may be run multiple times. For example, ! when exiting a binding contour, we expand the ! cleanups associated with that contour. When a goto ! within that binding contour has a target outside that ! contour, it will expand all cleanups from its scope to ! the target. Though the cleanups are expanded multiple ! times, the control paths are non-overlapping so the ! cleanups will not be executed twice. */ ! expand_expr (TREE_VALUE (tail), const0_rtx, VOIDmode, 0); ! free_temp_slots (); ! } } } *************** *** 4115,4119 **** case INTEGER_TYPE: if (TREE_CODE (TYPE_MIN_VALUE (type)) != INTEGER_CST ! || TREE_CODE (TYPE_MIN_VALUE (type)) != INTEGER_CST) return -1; else --- 4303,4307 ---- case INTEGER_TYPE: if (TREE_CODE (TYPE_MIN_VALUE (type)) != INTEGER_CST ! || TREE_CODE (TYPE_MAX_VALUE (type)) != INTEGER_CST) return -1; else *************** *** 4178,4182 **** SPARSENESS is as determined by all_cases_count. ! The time needed is propotional to COUNT, unless SPARSENESS is 2, in which case quadratic time is needed. */ --- 4366,4370 ---- SPARSENESS is as determined by all_cases_count. ! The time needed is proportional to COUNT, unless SPARSENESS is 2, in which case quadratic time is needed. */ *************** *** 4395,4399 **** /* ??? This optimization is disabled because it causes valid programs to fail. ANSI C does not guarantee that an expression with enum type ! will have a value that is the same as one of the enumation literals. */ /* If all values were found as case labels, make one of them the default --- 4583,4587 ---- /* ??? This optimization is disabled because it causes valid programs to fail. ANSI C does not guarantee that an expression with enum type ! will have a value that is the same as one of the enumeration literals. */ /* If all values were found as case labels, make one of them the default diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/stor-layout.c gcc-2.7.0/stor-layout.c *** gcc-2.6.3/stor-layout.c Thu Oct 20 09:41:02 1994 --- gcc-2.7.0/stor-layout.c Thu Jun 15 08:08:47 1995 *************** *** 1,4 **** /* C-compiler utilities for types and variables storage layout ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* C-compiler utilities for types and variables storage layout ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 23,26 **** --- 24,28 ---- #include "tree.h" + #include "flags.h" #include "function.h" *************** *** 80,84 **** } ! /* Given a size SIZE that isn't constant, return a SAVE_EXPR to serve as the actual size-expression for a type or decl. */ --- 82,86 ---- } ! /* Given a size SIZE that may not be a constant, return a SAVE_EXPR to serve as the actual size-expression for a type or decl. */ *************** *** 90,94 **** items (e.g., languages which have elaboration procedures like Ada), just return SIZE unchanged. Likewise for self-referential sizes. */ ! if (global_bindings_p () < 0 || contains_placeholder_p (size)) return size; --- 92,97 ---- items (e.g., languages which have elaboration procedures like Ada), just return SIZE unchanged. Likewise for self-referential sizes. */ ! if (TREE_CONSTANT (size) ! || global_bindings_p () < 0 || contains_placeholder_p (size)) return size; *************** *** 221,231 **** if (code == FIELD_DECL && DECL_BIT_FIELD (decl)) { - /* This is a bit-field. We don't know how to handle - them except for integral types, and front ends should - never generate them otherwise. */ - - if (! INTEGRAL_TYPE_P (type)) - abort (); - if (spec_size == 0 && DECL_NAME (decl) != 0) abort (); --- 224,227 ---- *************** *** 249,252 **** --- 245,250 ---- if (maximum_field_alignment != 0) DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), maximum_field_alignment); + else if (flag_pack_struct) + DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), BITS_PER_UNIT); } *************** *** 372,375 **** --- 370,375 ---- if (maximum_field_alignment != 0) type_align = MIN (type_align, maximum_field_alignment); + else if (flag_pack_struct) + type_align = MIN (type_align, BITS_PER_UNIT); record_align = MAX (record_align, type_align); *************** *** 414,417 **** --- 414,418 ---- /* If #pragma pack is in effect, turn off this feature. */ && maximum_field_alignment == 0 + && !flag_pack_struct && !integer_zerop (DECL_SIZE (field))) { *************** *** 448,451 **** --- 449,454 ---- if (maximum_field_alignment != 0) type_align = MIN (type_align, maximum_field_alignment); + else if (flag_pack_struct) + type_align = MIN (type_align, BITS_PER_UNIT); /* A bit field may not span the unit of alignment of its type. *************** *** 670,674 **** case LANG_TYPE: /* This kind of type is the responsibility ! of the languge-specific code. */ abort (); --- 673,677 ---- case LANG_TYPE: /* This kind of type is the responsibility ! of the language-specific code. */ abort (); *************** *** 707,712 **** case OFFSET_TYPE: TYPE_SIZE (type) = size_int (POINTER_SIZE); ! TYPE_MODE (type) = mode_for_size (POINTER_SIZE, ! GET_MODE_CLASS (Pmode), 0); break; --- 710,714 ---- case OFFSET_TYPE: TYPE_SIZE (type) = size_int (POINTER_SIZE); ! TYPE_MODE (type) = ptr_mode; break; *************** *** 719,724 **** case POINTER_TYPE: case REFERENCE_TYPE: ! TYPE_MODE (type) = mode_for_size (POINTER_SIZE, ! GET_MODE_CLASS (Pmode), 0); TYPE_SIZE (type) = size_int (POINTER_SIZE); TREE_UNSIGNED (type) = 1; --- 721,725 ---- case POINTER_TYPE: case REFERENCE_TYPE: ! TYPE_MODE (type) = ptr_mode; TYPE_SIZE (type) = size_int (POINTER_SIZE); TREE_UNSIGNED (type) = 1; *************** *** 741,744 **** --- 742,754 ---- size_binop (MINUS_EXPR, TYPE_MAX_VALUE (index), TYPE_MIN_VALUE (index))); + + /* If neither bound is a constant and sizetype is signed, make + sure the size is never negative. We should really do this + if *either* bound is non-constant, but this is the best + compromise between C and Ada. */ + if (! TREE_UNSIGNED (sizetype) + && TREE_CODE (TYPE_MIN_VALUE (index)) != INTEGER_CST + && TREE_CODE (TYPE_MAX_VALUE (index)) != INTEGER_CST) + length = size_binop (MAX_EXPR, length, size_zero_node); TYPE_SIZE (type) = size_binop (MULT_EXPR, length, diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/stupid.c gcc-2.7.0/stupid.c *** gcc-2.6.3/stupid.c Fri Aug 12 14:54:20 1994 --- gcc-2.7.0/stupid.c Thu Jun 15 08:09:19 1995 *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/texinfo.tex gcc-2.7.0/texinfo.tex *** gcc-2.6.3/texinfo.tex Mon Nov 14 18:17:54 1994 --- gcc-2.7.0/texinfo.tex Thu Jun 15 18:12:25 1995 *************** *** 23,33 **** %what you give them. Help stamp out software-hoarding! % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} ! \deftexinfoversion$Revision: 2.137 $ \message{Loading texinfo package [Version \texinfoversion]:} ! % Print the version number if in a .fmt file. ! \everyjob{\message{[Texinfo version \texinfoversion]}\message{}} % Save some parts of plain tex whose names we will redefine. --- 23,46 ---- %what you give them. Help stamp out software-hoarding! + + % Send bug reports to bug-texinfo@prep.ai.mit.edu. + % Please include a *precise* test case in each bug report. + + + % Make it possible to create a .fmt file just by loading this file: + % if the underlying format is not loaded, start by loading it now. + % Added by gildea November 1993. + \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi + % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} ! \deftexinfoversion$Revision: 2.145 $ \message{Loading texinfo package [Version \texinfoversion]:} ! % If in a .fmt file, print the version number ! % and turn on active characters that we couldn't do earlier because ! % they might have appeared in the input file name. ! \everyjob{\message{[Texinfo version \texinfoversion]}\message{} ! \catcode`+=\active \catcode`\_=\active} % Save some parts of plain tex whose names we will redefine. *************** *** 760,764 **** \fi } ! \def\setzzz#1#2 \endsetzzz{\expandafter\xdef\csname SET#1\endcsname{#2}} % @clear VAR clears (i.e., unsets) the variable VAR. --- 773,780 ---- \fi } ! % Can't use \xdef to pre-expand #2 and save some time, since \temp or ! % \next or other control sequences that we've defined might get us into ! % an infinite loop. Consider `@set foo @cite{bar}'. ! \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} % @clear VAR clears (i.e., unsets) the variable VAR. *************** *** 952,956 **** \let\indsf=\indrm \let\indbf=\indrm ! \let\indsc=\indrm \font\indi=cmmi9 \font\indsy=cmsy9 --- 968,972 ---- \let\indsf=\indrm \let\indbf=\indrm ! \setfont\indsc{csc10 at 9pt} \font\indi=cmmi9 \font\indsy=cmsy9 *************** *** 3342,3345 **** --- 3358,3364 ---- \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + % This is used to turn on special parens + % but make & act ordinary (given that it's active). + \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} % Definitions of (, ) and & used in args for functions. *************** *** 3550,3554 **** % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. ! \functionparens \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 --- 3569,3574 ---- % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. ! % Use \boldbraxnoamp, not \functionparens, so that & is not special. ! \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 *************** *** 4242,4245 **** --- 4262,4269 ---- \def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}} + % Use @afourwide to print on European A4 paper in wide format. + \def\afourwide{\afourpaper + \changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}} + % Define macros to output various characters with catcode for normal text. \catcode`\"=\other *************** *** 4315,4318 **** --- 4339,4351 ---- \global\def={{\tt \char 61}}} + \catcode`+=\active + \catcode`\_=\active + + % If a .fmt file is being used, characters that might appear in a file + % name cannot be active until we have parsed the command line. + % So turn them off again, and have \everyjob (or @setfilename) turn them on. + % \otherifyactive is called near the end of this file. + \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} + \catcode`\@=0 *************** *** 4357,4360 **** --- 4390,4397 ---- @let+=@normalplus} + % Make _ and + \other characters, temporarily. + % This is canceled by @fixbackslash. + @otherifyactive + % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing *************** *** 4367,4372 **** % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % ! @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi} %% These look ok in all fonts, so just make them not special. The @rm below --- 4404,4412 ---- % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. + % Also back turn on active characters that might appear in the input + % file name, in case not using a pre-dumped format. % ! @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi ! @catcode`+=@active @catcode`@_=@active} %% These look ok in all fonts, so just make them not special. The @rm below diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/tm.texi gcc-2.7.0/tm.texi *** gcc-2.6.3/tm.texi Thu Nov 3 17:56:46 1994 --- gcc-2.7.0/tm.texi Sun Jun 11 13:45:25 1995 *************** *** 170,173 **** --- 170,184 ---- loads the standard C library from the usual place. See @file{gcc.c}. + @findex LIBGCC_SPEC + @item LIBGCC_SPEC + Another C string constant that tells the GNU CC driver program + how and when to place a reference to @file{libgcc.a} into the + linker command line. This constant is placed both before and after + the value of @code{LIB_SPEC}. + + If this macro is not defined, the GNU CC driver provides a default that + passes the string @samp{-lgcc} to the linker unless the @samp{-shared} + option is specified. + @findex STARTFILE_SPEC @item STARTFILE_SPEC *************** *** 238,241 **** --- 249,259 ---- used, or when the compiler is built as a cross compiler. + @findex INIT_ENVIRONMENT + @item INIT_ENVIRONMENT + Define this macro as a C string constant if you with to set environment + variables for programs called by the driver, such as the assembler and + loader. The driver passes the value of this macro to @code{putenv} to + initialize the necessary environment variables. + @findex LOCAL_INCLUDE_DIR @item LOCAL_INCLUDE_DIR *************** *** 328,332 **** @item ! The directories specified by the environment variable @code{LIBRARY_PATH}. @item --- 346,351 ---- @item ! The directories specified by the environment variable @code{LIBRARY_PATH} ! (native only, cross compilers do not use this). @item *************** *** 384,392 **** @code{sun} and @code{unix} provided @samp{-ansi} is not specified. - @findex STDC_VALUE - @item STDC_VALUE - Define the value to be assigned to the built-in macro @code{__STDC__}. - The default is the value @samp{1}. - @findex extern int target_flags @item extern int target_flags; --- 403,406 ---- *************** *** 531,539 **** @findex BITS_BIG_ENDIAN @item BITS_BIG_ENDIAN ! Define this macro to be the value 1 if the most significant bit in a ! byte has the lowest number; otherwise define it to be the value zero. This means that bit-field instructions count from the most significant bit. If the machine has no bit-field instructions, then this must still ! be defined, but it doesn't matter which value it is defined to. This macro does not affect the way structure fields are packed into --- 545,554 ---- @findex BITS_BIG_ENDIAN @item BITS_BIG_ENDIAN ! Define this macro to have the value 1 if the most significant bit in a ! byte has the lowest number; otherwise define it to have the value zero. This means that bit-field instructions count from the most significant bit. If the machine has no bit-field instructions, then this must still ! be defined, but it doesn't matter which value it is defined to. This ! macro need not be a constant. This macro does not affect the way structure fields are packed into *************** *** 542,561 **** @findex BYTES_BIG_ENDIAN @item BYTES_BIG_ENDIAN ! Define this macro to be 1 if the most significant byte in a word has the ! lowest number. @findex WORDS_BIG_ENDIAN @item WORDS_BIG_ENDIAN ! Define this macro to be 1 if, in a multiword object, the most ! significant word has the lowest number. This applies to both memory ! locations and registers; GNU CC fundamentally assumes that the order of ! words in memory is the same as the order in registers. @findex FLOAT_WORDS_BIG_ENDIAN @item FLOAT_WORDS_BIG_ENDIAN ! Define this macro to be 1 if @code{DFmode}, @code{XFmode} or @code{TFmode} floating point numbers are stored in memory with the word ! containing the sign bit at the lowest address; otherwise define it to be ! 0. You need not define this macro if the ordering is the same as for --- 557,584 ---- @findex BYTES_BIG_ENDIAN @item BYTES_BIG_ENDIAN ! Define this macro to have the value 1 if the most significant byte in a ! word has the lowest number. This macro need not be a constant. @findex WORDS_BIG_ENDIAN @item WORDS_BIG_ENDIAN ! Define this macro to have the value 1 if, in a multiword object, the ! most significant word has the lowest number. This applies to both ! memory locations and registers; GNU CC fundamentally assumes that the ! order of words in memory is the same as the order in registers. This ! macro need not be a constant. ! ! @findex LIBGCC2_WORDS_BIG_ENDIAN ! @item LIBGCC2_WORDS_BIG_ENDIAN ! Define this macro if WORDS_BIG_ENDIAN is not constant. This must be a ! constant value with the same meaning as WORDS_BIG_ENDIAN, which will be ! used only when compiling libgcc2.c. Typically the value will be set ! based on preprocessor defines. @findex FLOAT_WORDS_BIG_ENDIAN @item FLOAT_WORDS_BIG_ENDIAN ! Define this macro to have the value 1 if @code{DFmode}, @code{XFmode} or @code{TFmode} floating point numbers are stored in memory with the word ! containing the sign bit at the lowest address; otherwise define it to ! have the value 0. This macro need not be a constant. You need not define this macro if the ordering is the same as for *************** *** 581,593 **** Number of storage units in a word; normally 4. ! @findex MAX_UNITS_PER_WORD ! @item MAX_UNITS_PER_WORD ! Maximum number of units in a word. If this is undefined, the default is @code{UNITS_PER_WORD}. Otherwise, it is the constant value that is the ! largest value that @code{UNITS_PER_WORD} can have at run-time. @findex POINTER_SIZE @item POINTER_SIZE ! Width of a pointer, in bits. @findex PROMOTE_MODE --- 604,627 ---- Number of storage units in a word; normally 4. ! @findex MIN_UNITS_PER_WORD ! @item MIN_UNITS_PER_WORD ! Minimum number of units in a word. If this is undefined, the default is @code{UNITS_PER_WORD}. Otherwise, it is the constant value that is the ! smallest value that @code{UNITS_PER_WORD} can have at run-time. @findex POINTER_SIZE @item POINTER_SIZE ! Width of a pointer, in bits. You must specify a value no wider than the ! width of @code{Pmode}. If it is not equal to the width of @code{Pmode}, ! you must define @code{POINTERS_EXTEND_UNSIGNED}. ! ! @findex POINTERS_EXTEND_UNSIGNED ! @item POINTERS_EXTEND_UNSIGNED ! A C expression whose value is nonzero if pointers that need to be ! extended from being @code{POINTER_SIZE} bits wide to @code{Pmode} ! are sign-extended and zero if they are zero-extended. ! ! You need not define this macro if the @code{POINTER_SIZE} is equal ! to the width of @code{Pmode}. @findex PROMOTE_MODE *************** *** 912,916 **** A C expression for the size in bits of the type @code{long long} on the target machine. If you don't define this, the default is two ! words. @findex CHAR_TYPE_SIZE --- 946,951 ---- A C expression for the size in bits of the type @code{long long} on the target machine. If you don't define this, the default is two ! words. If you want to support GNU Ada on your machine, the value of ! macro must be at least 64. @findex CHAR_TYPE_SIZE *************** *** 1811,1815 **** used. Only define this macro to some other expression if pseudo allocated by @file{local-alloc.c} end up in memory because their hard ! registers were needed for spill regisers. If this macro returns nonzero for those classes, those pseudos will only be allocated by @file{global.c}, which knows how to reallocate the pseudo to another --- 1846,1850 ---- used. Only define this macro to some other expression if pseudo allocated by @file{local-alloc.c} end up in memory because their hard ! registers were needed for spill registers. If this macro returns nonzero for those classes, those pseudos will only be allocated by @file{global.c}, which knows how to reallocate the pseudo to another *************** *** 1835,1839 **** If defined, a C expression for a class that contains registers which the compiler must always access in a mode that is the same size as the mode ! in which it loaded the register, unless neither mode is integral. For the example, loading 32-bit integer or floating-point objects into --- 1870,1874 ---- If defined, a C expression for a class that contains registers which the compiler must always access in a mode that is the same size as the mode ! in which it loaded the register. For the example, loading 32-bit integer or floating-point objects into *************** *** 1990,1994 **** @findex SETUP_FRAME_ADDRESSES ! @item SERTUP_FRAME_ADDRESSES () If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed. For example, --- 2025,2029 ---- @findex SETUP_FRAME_ADDRESSES ! @item SETUP_FRAME_ADDRESSES () If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed. For example, *************** *** 2316,2320 **** @findex RETURN_POPS_ARGS ! @item RETURN_POPS_ARGS (@var{funtype}, @var{stack-size}) A C expression that should indicate the number of bytes of its own arguments that a function pops on returning, or 0 if the --- 2351,2355 ---- @findex RETURN_POPS_ARGS ! @item RETURN_POPS_ARGS (@var{fundecl}, @var{funtype}, @var{stack-size}) A C expression that should indicate the number of bytes of its own arguments that a function pops on returning, or 0 if the *************** *** 2322,2325 **** --- 2357,2366 ---- after the function returns. + @var{fundecl} is a C variable whose value is a tree node that + describes the function in question. Normally it is a node of type + @code{FUNCTION_DECL} that describes the declaration of the function. + From this it is possible to obtain the DECL_MACHINE_ATTRIBUTES of + the function. + @var{funtype} is a C variable whose value is a tree node that describes the function in question. Normally it is a node of type *************** *** 3171,3174 **** --- 3212,3227 ---- end of the source file. The macro @code{SETUP_INCOMING_VARARGS} should not generate any instructions in this case. + + @findex STRICT_ARGUMENT_NAMING + @item STRICT_ARGUMENT_NAMING + Define this macro if the location where a function argument is passed + depends on whether or not it is a named argument. + + This macro controls how the @var{named} argument to @code{FUNCTION_ARG} + is set for varargs and stdarg functions. With this macro defined, + the @var{named} argument is always true for named arguments, and false for + unnamed arguments. If this is not defined, but @code{SETUP_INCOMING_VARARGS} + is defined, then all arguments are treated as named. Otherwise, all named + arguments except the last are treated as named. @end table *************** *** 4226,4230 **** necessary). ! findex PIC_OFFSET_TABLE_REG_CALL_CLOBBERED @item PIC_OFFSET_TABLE_REG_CALL_CLOBBERED Define this macro if the register defined by --- 4279,4283 ---- necessary). ! @findex PIC_OFFSET_TABLE_REG_CALL_CLOBBERED @item PIC_OFFSET_TABLE_REG_CALL_CLOBBERED Define this macro if the register defined by *************** *** 4377,4383 **** @findex ASM_OUTPUT_SECTION_NAME ! @item ASM_OUTPUT_SECTION_NAME (@var{stream}, @var{string}) ! A C statement to output something to the assembler file to switch to the ! section contained in @var{string}. Some target formats do not support arbitrary sections. Do not define this macro in such cases. --- 4430,4437 ---- @findex ASM_OUTPUT_SECTION_NAME ! @item ASM_OUTPUT_SECTION_NAME (@var{stream}, @var{decl}, @var{name}) ! A C statement to output something to the assembler file to switch to section ! @var{name} for object @var{decl} which is either a @code{FUNCTION_DECL}, a ! @code{VAR_DECL} or @code{NULL_TREE}. Some target formats do not support arbitrary sections. Do not define this macro in such cases. *************** *** 4691,4694 **** --- 4745,4771 ---- for making that name global, and a newline. + @findex ASM_WEAKEN_LABEL + @item ASM_WEAKEN_LABEL + A C statement (sans semicolon) to output to the stdio stream + @var{stream} some commands that will make the label @var{name} weak; + that is, available for reference from other files but only used if + no other definition is available. 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 making that name weak, and a newline. + + If you don't define this macro, GNU CC will not support weak + symbols and you should not define the @code{SUPPORTS_WEAK} macro. + + @findex SUPPORTS_WEAK + @item SUPPORTS_WEAK + A C expression which evaluates to true if the target supports weak symbols. + + If you don't define this macro, @file{defaults.h} provides a default + definition. If @code{ASM_WEAKEN_LABEL} is defined, the default + definition is @samp{1}; otherwise, it is @samp{0}. Define this macro if + you want to control weak symbol support with a compiler flag such as + @samp{-melf}. + @findex ASM_OUTPUT_EXTERNAL @item ASM_OUTPUT_EXTERNAL (@var{stream}, @var{decl}, @var{name}) *************** *** 4860,4865 **** Depending on the operating system and its executable file format, either @file{crtstuff.c} or @file{libgcc2.c} traverses these lists at startup ! time and exit time. Constructors are called in forward order of the ! list; destructors in reverse order. The best way to handle static constructors works only for object file --- 4937,4942 ---- Depending on the operating system and its executable file format, either @file{crtstuff.c} or @file{libgcc2.c} traverses these lists at startup ! time and exit time. Constructors are called in reverse order of the ! list; destructors in forward order. The best way to handle static constructors works only for object file *************** *** 4983,4986 **** --- 5060,5073 ---- @code{INIT_SECTION_ASM_OP}. + @item LD_INIT_SWITCH + @findex LD_INIT_SWITCH + If defined, a C string constant for a switch that tells the linker that + the following symbol is an initialization routine. + + @item LD_FINI_SWITCH + @findex LD_FINI_SWITCH + If defined, a C string constant for a switch that tells the linker that + the following symbol is a finalization routine. + @item INVOKE__main @findex INVOKE__main *************** *** 5033,5036 **** --- 5120,5126 ---- for dynamic constructor/destructor functions. + These macros are effective only in a native compiler; @code{collect2} as + part of a cross compiler always uses @code{nm} for the target machine. + @findex REAL_NM_FILE_NAME @item REAL_NM_FILE_NAME *************** *** 5038,5045 **** to execute @code{nm}. The default is to search the path normally for @code{nm}. - @end table ! These macros are effective only in a native compiler; @code{collect2} as ! part of a cross compiler always uses @code{nm} for the target machine. @node Instruction Output --- 5128,5152 ---- to execute @code{nm}. The default is to search the path normally for @code{nm}. ! If your system supports shared libraries and has a program to list the ! dynamic dependencies of a given library or executable, you can define ! these macros to enable support for running initialization and ! termination functions in shared libraries: ! ! @findex LDD_SUFFIX ! @item LDD_SUFFIX ! Define this macro to a C string constant containing the name of the ! program which lists dynamic dependencies, like @code{"ldd"} under SunOS 4. ! ! @findex PARSE_LDD_OUTPUT ! @item PARSE_LDD_OUTPUT (@var{PTR}) ! Define this macro to be C code that extracts filenames from the output ! of the program denoted by @code{LDD_SUFFIX}. @var{PTR} is a variable ! of type @code{char *} that points to the beginning of a line of output ! from @code{LDD_SUFFIX}. If the line lists a dynamic dependency, the ! code must advance @var{PTR} to the beginning of the filename on that ! line. Otherwise, it must set @var{PTR} to @code{NULL}. ! ! @end table @node Instruction Output *************** *** 5197,5201 **** If your target supports multiple dialects of assembler language (such as different opcodes), define this macro as a C expression that gives the ! numeric index of the assembler langauge dialect to use, with zero as the first variant. --- 5304,5308 ---- If your target supports multiple dialects of assembler language (such as different opcodes), define this macro as a C expression that gives the ! numeric index of the assembler language dialect to use, with zero as the first variant. *************** *** 6187,6196 **** @findex Pmode @item Pmode ! An alias for the machine mode for pointers. Normally the definition ! can be ! ! @smallexample ! #define Pmode SImode ! @end smallexample @findex FUNCTION_MODE --- 6294,6307 ---- @findex Pmode @item Pmode ! An alias for the machine mode for pointers. On most machines, define ! this to be the integer mode corresponding to the width of a hardware ! pointer; @code{SImode} on 32-bit machine or @code{DImode} on 64-bit machines. ! On some machines you must define this to be one of the partial integer ! modes, such as @code{PSImode}. ! ! The width of @code{Pmode} must be at least as large as the value of ! @code{POINTER_SIZE}. If it is not equal, you must define the macro ! @code{POINTERS_EXTEND_UNSIGNED} to specify how pointers are extended ! to @code{Pmode}. @findex FUNCTION_MODE *************** *** 6236,6258 **** programs which already use it. ! @findex VALID_MACHINE_ATTRIBUTE ! @item VALID_MACHINE_ATTRIBUTE (@var{type}, @var{attributes}, @var{identifier}) ! Define this macro if you want to support machine specific attributes for ! types. If defined, it should be a C statement whose value is nonzero if ! @var{identifier} is an attribute that is valid for @var{type}. The ! attributes in @var{attributes} have previously been assigned to @var{type}. @findex COMP_TYPE_ATTRIBUTES @item COMP_TYPE_ATTRIBUTES (@var{type1}, @var{type2}) ! Define this macro if type attributes must be checked for compatibility. ! If defined, it should be a C statement that returns zero if the ! attributes on @var{type1} and @var{type2} are incompatible, one if they ! are compatible, and two if they are nearly compatible (which causes a ! warning to be generated). @findex SET_DEFAULT_TYPE_ATTRIBUTES @item SET_DEFAULT_TYPE_ATTRIBUTES (@var{type}) ! Define this macro if you want to give the newly defined @var{type} some ! default attributes. @findex DOLLARS_IN_IDENTIFIERS --- 6347,6373 ---- programs which already use it. ! @findex VALID_MACHINE_DECL_ATTRIBUTE ! @item VALID_MACHINE_DECL_ATTRIBUTE (@var{decl}, @var{attributes}, @var{identifier}, @var{args}) ! If defined, a C expression whose value is nonzero if @var{identifier} with ! arguments @var{args} is a valid machine specific attribute for @var{decl}. ! The attributes in @var{attributes} have previously been assigned to @var{decl}. ! ! @findex VALID_MACHINE_TYPE_ATTRIBUTE ! @item VALID_MACHINE_TYPE_ATTRIBUTE (@var{type}, @var{attributes}, @var{identifier}, @var{args}) ! If defined, a C expression whose value is nonzero if @var{identifier} with ! arguments @var{args} is a valid machine specific attribute for @var{type}. ! The attributes in @var{attributes} have previously been assigned to @var{type}. @findex COMP_TYPE_ATTRIBUTES @item COMP_TYPE_ATTRIBUTES (@var{type1}, @var{type2}) ! If defined, a C expression whose value is zero if the attributes on ! @var{type1} and @var{type2} are incompatible, one if they are compatible, ! and two if they are nearly compatible (which causes a warning to be ! generated). @findex SET_DEFAULT_TYPE_ATTRIBUTES @item SET_DEFAULT_TYPE_ATTRIBUTES (@var{type}) ! If defined, a C statement that assigns default attributes to ! newly defined @var{type}. @findex DOLLARS_IN_IDENTIFIERS diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/toplev.c gcc-2.7.0/toplev.c *** gcc-2.6.3/toplev.c Tue Oct 25 16:09:12 1994 --- gcc-2.7.0/toplev.c Thu Jun 15 08:09:51 1995 *************** *** 1,4 **** /* Top level of GNU C compiler ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Top level of GNU C compiler ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,22 **** 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 is the top level of cc1/c++. It parses command args, opens files, invokes the various passes --- 16,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This is the top level of cc1/c++. It parses command args, opens files, invokes the various passes *************** *** 37,41 **** #include ! #ifndef WINNT #ifdef USG #undef FLOAT --- 37,41 ---- #include ! #ifndef _WIN32 #ifdef USG #undef FLOAT *************** *** 56,85 **** #include "input.h" #include "tree.h" - /* #include "c-tree.h" */ #include "rtl.h" #include "flags.h" #include "insn-attr.h" #include "defaults.h" #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" #endif - - #include "bytecode.h" - #include "bc-emit.h" #ifdef VMS /* The extra parameters substantially improve the I/O performance. */ static FILE * ! VMS_fopen (fname, type) char * fname; char * type; { ! if (strcmp (type, "w") == 0) ! return fopen (fname, type, "mbc=16", "deq=64", "fop=tef", "shr=nil"); ! return fopen (fname, type, "mbc=16"); } ! #define fopen VMS_fopen ! #endif #ifndef DEFAULT_GDB_EXTENSIONS --- 56,91 ---- #include "input.h" #include "tree.h" #include "rtl.h" #include "flags.h" #include "insn-attr.h" #include "defaults.h" + #include "output.h" + #include "bytecode.h" + #include "bc-emit.h" #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" #endif #ifdef VMS /* The extra parameters substantially improve the I/O performance. */ static FILE * ! vms_fopen (fname, type) char * fname; char * type; { ! /* The in the gcc-vms-1.42 distribution prototypes fopen with two ! fixed arguments, which matches ANSI's specification but not VAXCRTL's ! pre-ANSI implementation. This hack circumvents the mismatch problem. */ ! FILE *(*vmslib_fopen)() = (FILE *(*)()) fopen; ! ! if (*type == 'w') ! return (*vmslib_fopen) (fname, type, "mbc=32", ! "deq=64", "fop=tef", "shr=nil"); ! else ! return (*vmslib_fopen) (fname, type, "mbc=32"); } ! #define fopen vms_fopen ! #endif /* VMS */ #ifndef DEFAULT_GDB_EXTENSIONS *************** *** 509,512 **** --- 515,521 ---- #endif + /* Tag all structures with __attribute__(packed) */ + int flag_pack_struct = 0; + /* Table of language-independent -f options. STRING is the option name. VARIABLE is the address of the variable. *************** *** 554,557 **** --- 563,567 ---- {"verbose-asm", &flag_verbose_asm, 1}, {"gnu-linker", &flag_gnu_linker, 1}, + {"pack-struct", &flag_pack_struct, 1}, {"bytecode", &output_bytecode, 1} }; *************** *** 635,716 **** "-Wno-write-strings", - /* These are for C++. */ - "-+e0", /* gcc.c tacks the `-' on the front. */ - "-+e1", - "-+e2", - "-faccess-control", - "-fno-access-control", - "-fall-virtual", - "-fno-all-virtual", - "-falt-external-templates", - "-fno-alt-external-templates", - "-fansi-overloading", - "-fno-ansi-overloading", - "-fcadillac", - "-fno-cadillac", - "-fconserve-space", - "-fno-conserve-space", - "-fdefault-inline", - "-fno-default-inline", - "-fdossier", - "-fno-dossier", - "-felide-constructors", - "-fno-elide-constructors", - "-fenum-int-equiv", - "-fno-enum-int-equiv", - "-fexternal-templates", - "-fno-external-templates", - "-fgc", - "-fno-gc", - "-fhandle-exceptions", - "-fno-handle-exceptions", - "-fhandle-signatures", - "-fno-handle-signatures", - "-fhuge-objects", - "-fno-huge-objects", - "-fimplement-inlines", - "-fno-implement-inlines", - "-fimplicit-templates", - "-fno-implicit-templates", - "-flabels-ok", - "-fno-labels-ok", - "-fmemoize-lookups", - "-fno-memoize-lookups", - "-fnonnull-objects", - "-fno-nonnull-objects", - "-fsave-memoized", - "-fno-save-memoized", - "-fshort-temps", - "-fno-short-temps", - "-fstats", - "-fno-stats", - "-fstrict-prototype", - "-fno-strict-prototype", - "-fthis-is-variable", - "-fno-this-is-variable", - "-fvtable-thunks", - "-fno-vtable-thunks", - "-fxref", - "-fno-xref", - - "-Wreturn-type", - "-Wno-return-type", - "-Woverloaded-virtual", - "-Wno-overloaded-virtual", - "-Wenum-clash", - "-Wno-enum-clash", - "-Wtemplate-debugging", - "-Wno-template-debugging", - "-Wctor-dtor-privacy", - "-Wno-ctor-dtor-privacy", - "-Wnon-virtual-dtor", - "-Wno-non-virtual-dtor", - "-Wextern-inline", - "-Wno-extern-inline", - "-Wreorder", - "-Wno-reorder", - "-Wsynth", - "-Wno-synth", - /* these are for obj c */ "-lang-objc", --- 645,648 ---- *************** *** 725,730 **** "-Wno-protocol", ! /* This is for GNAT and is temporary. */ ! "-gnat", 0 }; --- 657,661 ---- "-Wno-protocol", ! #include "options.h" 0 }; *************** *** 854,860 **** get_run_time () { ! #ifdef WINNT ! return 0; ! #else #ifdef USG struct tms tms; --- 785,789 ---- get_run_time () { ! #ifndef _WIN32 #ifdef USG struct tms tms; *************** *** 862,866 **** #ifndef VMS struct rusage rusage; ! #else /* VMS */ struct { --- 791,795 ---- #ifndef VMS struct rusage rusage; ! #else struct { *************** *** 872,879 **** #endif #endif if (quiet_flag) return 0; ! #ifdef USG times (&tms); --- 801,814 ---- #endif #endif + #endif if (quiet_flag) return 0; ! #ifdef _WIN32 ! if (clock() < 0) ! return 0; ! else ! return (clock() * 1000); ! #else /* not _WIN32 */ #ifdef USG times (&tms); *************** *** 940,944 **** fprintf (stderr, "%s: ", progname); perror (name); ! exit (35); } --- 875,879 ---- fprintf (stderr, "%s: ", progname); perror (name); ! exit (FATAL_EXIT_CODE); } *************** *** 948,952 **** { fprintf (stderr, "%s: %s: I/O error\n", progname, name); ! exit (35); } --- 883,887 ---- { fprintf (stderr, "%s: %s: I/O error\n", progname, name); ! exit (FATAL_EXIT_CODE); } *************** *** 1062,1080 **** } ! /* Prints out, if necessary, the name of the current function ! which caused an error. Called from all error and warning functions. */ void ! report_error_function (file) char *file; { - struct file_stack *p; - - if (need_error_newline) - { - fprintf (stderr, "\n"); - need_error_newline = 0; - } - if (last_error_function != current_function_decl) { --- 997,1007 ---- } ! /* The default function to print out name of current function that caused ! an error. */ void ! default_print_error_function (file) char *file; { if (last_error_function != current_function_decl) { *************** *** 1097,1100 **** --- 1024,1051 ---- last_error_function = current_function_decl; } + } + + /* Called by report_error_function to print out function name. + * Default may be overridden by language front-ends. */ + + void (*print_error_function) PROTO((char*)) = default_print_error_function; + + /* Prints out, if necessary, the name of the current function + that caused an error. Called from all error and warning functions. */ + + void + report_error_function (file) + char *file; + { + struct file_stack *p; + + if (need_error_newline) + { + fprintf (stderr, "\n"); + need_error_newline = 0; + } + + (*print_error_function) (file); + if (input_file_stack && input_file_stack->next != 0 && input_file_stack_tick != last_error_tick) *************** *** 1399,1403 **** { verror (s, ap); ! exit (34); } --- 1350,1354 ---- { verror (s, ap); ! exit (FATAL_EXIT_CODE); } *************** *** 2193,2196 **** --- 2144,2153 ---- input_filename = name; + /* Put an entry on the input file stack for the main input file. */ + input_file_stack + = (struct file_stack *) xmalloc (sizeof (struct file_stack)); + input_file_stack->next = 0; + input_file_stack->name = input_filename; + /* Perform language-specific initialization. This may set main_input_filename. */ *************** *** 2202,2211 **** main_input_filename = name; - /* Put an entry on the input file stack for the main input file. */ - input_file_stack - = (struct file_stack *) xmalloc (sizeof (struct file_stack)); - input_file_stack->next = 0; - input_file_stack->name = input_filename; - if (!output_bytecode) { --- 2159,2162 ---- *************** *** 2473,2476 **** --- 2424,2431 ---- } + /* Write out any pending weak symbol declarations. */ + + weak_finish (); + /* Do dbx symbols */ #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) *************** *** 2732,2736 **** { lose = function_cannot_inline_p (decl); ! /* If not optimzing, then make sure the DECL_INLINE bit is off. */ if (lose || ! optimize) --- 2687,2691 ---- { lose = function_cannot_inline_p (decl); ! /* If not optimizing, then make sure the DECL_INLINE bit is off. */ if (lose || ! optimize) *************** *** 2772,2802 **** finish_compilation will call rest_of_compilation again for those functions that need to be output. Also defer those ! functions that were marked inline but weren't inlined; they ! may never be used. */ ! if ((specd || DECL_INLINE (decl)) ! && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl) ! && ! flag_keep_inline_functions) ! || DECL_DEFER_OUTPUT (decl) ! || DECL_EXTERNAL (decl))) { ! #ifdef DWARF_DEBUGGING_INFO ! /* Generate the DWARF info for the "abstract" instance ! of a function which we may later generate inlined and/or ! out-of-line instances of. */ ! if (write_symbols == DWARF_DEBUG) { ! set_decl_abstract_flags (decl, 1); ! TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0)); ! set_decl_abstract_flags (decl, 0); ! } #endif ! TIMEVAR (integration_time, save_for_inline_nocopy (decl)); ! goto exit_rest_of_compilation; } /* If we have to compile the function now, save its rtl and subdecls so that its compilation will not affect what others get. */ ! if (DECL_INLINE (decl)) { #ifdef DWARF_DEBUGGING_INFO --- 2727,2762 ---- finish_compilation will call rest_of_compilation again for those functions that need to be output. Also defer those ! functions that we are supposed to defer. */ ! if (DECL_DEFER_OUTPUT (decl) ! || ((specd || DECL_INLINE (decl)) ! && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl) ! && ! flag_keep_inline_functions) ! || DECL_EXTERNAL (decl)))) { ! DECL_DEFER_OUTPUT (decl) = 1; ! ! /* If -Wreturn-type, we have to do a bit of compilation. */ ! if (! warn_return_type) { ! #ifdef DWARF_DEBUGGING_INFO ! /* Generate the DWARF info for the "abstract" instance ! of a function which we may later generate inlined and/or ! out-of-line instances of. */ ! if (write_symbols == DWARF_DEBUG) ! { ! set_decl_abstract_flags (decl, 1); ! TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0)); ! set_decl_abstract_flags (decl, 0); ! } #endif ! TIMEVAR (integration_time, save_for_inline_nocopy (decl)); ! goto exit_rest_of_compilation; ! } } /* If we have to compile the function now, save its rtl and subdecls so that its compilation will not affect what others get. */ ! if (DECL_INLINE (decl) || DECL_DEFER_OUTPUT (decl)) { #ifdef DWARF_DEBUGGING_INFO *************** *** 2816,2825 **** TIMEVAR (integration_time, save_for_inline_copying (decl)); } - } ! if (DECL_DEFER_OUTPUT (decl)) ! goto exit_rest_of_compilation; ! TREE_ASM_WRITTEN (decl) = 1; /* Now that integrate will no longer see our rtl, we need not distinguish --- 2776,2788 ---- TIMEVAR (integration_time, save_for_inline_copying (decl)); } ! /* If specified extern inline but we aren't inlining it, we are ! done. */ ! if (specd && DECL_EXTERNAL (decl)) ! goto exit_rest_of_compilation; ! } ! if (! DECL_DEFER_OUTPUT (decl)) ! TREE_ASM_WRITTEN (decl) = 1; /* Now that integrate will no longer see our rtl, we need not distinguish *************** *** 2878,2882 **** /* Now is when we stop if -fsyntax-only and -Wreturn-type. */ ! if (rtl_dump_and_exit || flag_syntax_only) goto exit_rest_of_compilation; --- 2841,2845 ---- /* Now is when we stop if -fsyntax-only and -Wreturn-type. */ ! if (rtl_dump_and_exit || flag_syntax_only || DECL_DEFER_OUTPUT (decl)) goto exit_rest_of_compilation; *************** *** 2916,2920 **** TIMEVAR (cse_time, delete_dead_from_cse (insns, max_reg_num ())); ! if (tem) TIMEVAR (jump_time, jump_optimize (insns, 0, 0, 0)); } --- 2879,2883 ---- TIMEVAR (cse_time, delete_dead_from_cse (insns, max_reg_num ())); ! if (tem || optimize > 1) TIMEVAR (jump_time, jump_optimize (insns, 0, 0, 0)); } *************** *** 3228,3237 **** #endif ! if (optimize > 0) ! /* Shorten branches. */ ! TIMEVAR (shorten_branch_time, ! { ! shorten_branches (get_insns ()); ! }); #ifdef STACK_REGS --- 3191,3199 ---- #endif ! /* Shorten branches. */ ! TIMEVAR (shorten_branch_time, ! { ! shorten_branches (get_insns ()); ! }); #ifdef STACK_REGS *************** *** 3354,3358 **** p = argv[0] + strlen (argv[0]); ! while (p != argv[0] && p[-1] != '/') --p; progname = p; --- 3316,3325 ---- p = argv[0] + strlen (argv[0]); ! while (p != argv[0] && p[-1] != '/' ! #ifdef DIR_SEPARATOR ! && p[-1] != DIR_SEPARATOR ! #endif ! ) ! --p; progname = p; *************** *** 3435,3438 **** --- 3402,3406 ---- flag_rerun_cse_after_loop = 1; flag_caller_saves = 1; + flag_force_mem = 1; #ifdef INSN_SCHEDULING flag_schedule_insns = 1; *************** *** 3948,3952 **** compile_file (filename); ! #if !defined(OS2) && !defined(VMS) && !defined(WINNT) if (flag_print_mem) { --- 3916,3920 ---- compile_file (filename); ! #if !defined(OS2) && !defined(VMS) && !defined(_WIN32) if (flag_print_mem) { *************** *** 3966,3970 **** #endif /* not USG */ } ! #endif /* not OS2 and not VMS and not WINNT */ if (errorcount) --- 3934,3938 ---- #endif /* not USG */ } ! #endif /* not OS2 and not VMS and not _WIN32 */ if (errorcount) *************** *** 3973,3977 **** exit (FATAL_EXIT_CODE); exit (SUCCESS_EXIT_CODE); ! return 34; } --- 3941,3945 ---- exit (FATAL_EXIT_CODE); exit (SUCCESS_EXIT_CODE); ! return 0; } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/tree.c gcc-2.7.0/tree.c *** gcc-2.6.3/tree.c Tue Nov 15 19:28:59 1994 --- gcc-2.7.0/tree.c Thu Jun 15 08:10:23 1995 *************** *** 1,4 **** /* Language-independent node constructors for parse phase of GNU compiler. ! Copyright (C) 1987, 1988, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Language-independent node constructors for parse phase of GNU compiler. ! Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 67,70 **** --- 68,82 ---- struct obstack maybepermanent_obstack; + /* This is a list of function_maybepermanent_obstacks for top-level inline + functions that are compiled in the middle of compiling other functions. */ + + struct simple_obstack_stack *toplev_inline_obstacks; + + /* This is a list of function_maybepermanent_obstacks for inline functions + nested in the current function that were compiled in the middle of + compiling other functions. */ + + struct simple_obstack_stack *inline_obstacks; + /* The contents of the current function definition are allocated in this obstack, and all are freed at the end of the function. *************** *** 265,269 **** void gcc_obstack_init (); - static tree stabilize_reference_1 (); /* Init the principal obstacks. */ --- 277,280 ---- *************** *** 317,326 **** /* Save all variables describing the current status into the structure *P. ! This is used before starting a nested function. */ void ! save_tree_status (p, toplevel) struct function *p; ! int toplevel; { p->all_types_permanent = all_types_permanent; --- 328,340 ---- /* Save all variables describing the current status into the structure *P. ! This is used before starting a nested function. ! ! CONTEXT is the decl_function_context for the function we're about to ! compile; if it isn't current_function_decl, we have to play some games. */ void ! save_tree_status (p, context) struct function *p; ! tree context; { p->all_types_permanent = all_types_permanent; *************** *** 335,349 **** p->saveable_obstack = saveable_obstack; p->rtl_obstack = rtl_obstack; ! if (! toplevel) { ! /* Objects that need to be saved in this function can be in the nonsaved ! obstack of the enclosing function since they can't possibly be needed ! once it has returned. */ ! function_maybepermanent_obstack = function_obstack; ! maybepermanent_firstobj ! = (char *) obstack_finish (function_maybepermanent_obstack); ! } function_obstack = (struct obstack *) xmalloc (sizeof (struct obstack)); gcc_obstack_init (function_obstack); --- 349,389 ---- p->saveable_obstack = saveable_obstack; p->rtl_obstack = rtl_obstack; + p->inline_obstacks = inline_obstacks; ! if (context == current_function_decl) ! /* Objects that need to be saved in this function can be in the nonsaved ! obstack of the enclosing function since they can't possibly be needed ! once it has returned. */ ! function_maybepermanent_obstack = function_obstack; ! else { ! /* We're compiling a function which isn't nested in the current ! function. We need to create a new maybepermanent_obstack for this ! function, since it can't go onto any of the existing obstacks. */ ! struct simple_obstack_stack **head; ! struct simple_obstack_stack *current; ! ! if (context == NULL_TREE) ! head = &toplev_inline_obstacks; ! else ! { ! struct function *f = find_function_data (context); ! head = &f->inline_obstacks; ! } ! ! current = ((struct simple_obstack_stack *) ! xmalloc (sizeof (struct simple_obstack_stack))); + current->obstack = (struct obstack *) xmalloc (sizeof (struct obstack)); + function_maybepermanent_obstack = current->obstack; + gcc_obstack_init (function_maybepermanent_obstack); + + current->next = *head; + *head = current; + } + + maybepermanent_firstobj + = (char *) obstack_finish (function_maybepermanent_obstack); + function_obstack = (struct obstack *) xmalloc (sizeof (struct obstack)); gcc_obstack_init (function_obstack); *************** *** 361,367 **** void ! restore_tree_status (p, toplevel) struct function *p; - int toplevel; { all_types_permanent = p->all_types_permanent; --- 401,406 ---- void ! restore_tree_status (p) struct function *p; { all_types_permanent = p->all_types_permanent; *************** *** 370,384 **** obstack_free (&momentary_obstack, momentary_function_firstobj); ! if (! toplevel) ! { ! /* Free saveable storage used by the function just compiled and not ! saved. ! CAUTION: This is in function_obstack of the containing function. ! So we must be sure that we never allocate from that obstack during ! the compilation of a nested function if we expect it to survive ! past the nested function's end. */ ! obstack_free (function_maybepermanent_obstack, maybepermanent_firstobj); ! } obstack_free (function_obstack, 0); --- 409,420 ---- obstack_free (&momentary_obstack, momentary_function_firstobj); ! /* Free saveable storage used by the function just compiled and not ! saved. ! CAUTION: This is in function_obstack of the containing function. ! So we must be sure that we never allocate from that obstack during ! the compilation of a nested function if we expect it to survive ! past the nested function's end. */ ! obstack_free (function_maybepermanent_obstack, maybepermanent_firstobj); obstack_free (function_obstack, 0); *************** *** 394,397 **** --- 430,434 ---- saveable_obstack = p->saveable_obstack; rtl_obstack = p->rtl_obstack; + inline_obstacks = p->inline_obstacks; } *************** *** 410,413 **** --- 447,451 ---- rtl_obstack = saveable_obstack = function_maybepermanent_obstack; momentary_stack = 0; + inline_obstacks = 0; } *************** *** 534,540 **** else obstack_free (&momentary_obstack, momentary_firstobj); ! obstack_free (&maybepermanent_obstack, maybepermanent_firstobj); obstack_free (&temp_decl_obstack, temp_decl_firstobj); current_obstack = &permanent_obstack; expression_obstack = &permanent_obstack; --- 572,589 ---- else obstack_free (&momentary_obstack, momentary_firstobj); ! obstack_free (function_maybepermanent_obstack, maybepermanent_firstobj); obstack_free (&temp_decl_obstack, temp_decl_firstobj); + /* Free up the maybepermanent_obstacks for any of our nested functions + which were compiled at a lower level. */ + while (inline_obstacks) + { + struct simple_obstack_stack *current = inline_obstacks; + inline_obstacks = current->next; + obstack_free (current->obstack, 0); + free (current->obstack); + free (current); + } + current_obstack = &permanent_obstack; expression_obstack = &permanent_obstack; *************** *** 753,756 **** --- 802,814 ---- } + /* Set things up so the next clear_momentary will only clear memory + past our present position in momentary_obstack. */ + + void + preserve_momentary () + { + momentary_stack->base = (char *) obstack_base (&momentary_obstack); + } + /* Free all the storage in the current momentary-allocation level. In C, this happens at the end of each statement. */ *************** *** 864,872 **** function, then we must allocate the PARM_DECL on the parent's obstack, so that they will live to the end of the parent's ! closing brace. This is neccesary in case we try to inline the function into its parent. PARM_DECLs of top-level functions do not have this problem. However, ! we allocate them where we put the FUNCTION_DECL for languauges such as Ada that need to consult some flags in the PARM_DECLs of the function when calling it. --- 922,930 ---- function, then we must allocate the PARM_DECL on the parent's obstack, so that they will live to the end of the parent's ! closing brace. This is necessary in case we try to inline the function into its parent. PARM_DECLs of top-level functions do not have this problem. However, ! we allocate them where we put the FUNCTION_DECL for languages such as Ada that need to consult some flags in the PARM_DECLs of the function when calling it. *************** *** 1416,1420 **** } ! /* Return 1 if EXPR is the integer constant zero. */ int --- 1474,1479 ---- } ! /* Return 1 if EXPR is the integer constant zero or a complex constant ! of zero. */ int *************** *** 1424,1433 **** STRIP_NOPS (expr); ! return (TREE_CODE (expr) == INTEGER_CST ! && TREE_INT_CST_LOW (expr) == 0 ! && TREE_INT_CST_HIGH (expr) == 0); } ! /* Return 1 if EXPR is the integer constant one. */ int --- 1483,1496 ---- STRIP_NOPS (expr); ! return ((TREE_CODE (expr) == INTEGER_CST ! && TREE_INT_CST_LOW (expr) == 0 ! && TREE_INT_CST_HIGH (expr) == 0) ! || (TREE_CODE (expr) == COMPLEX_CST ! && integer_zerop (TREE_REALPART (expr)) ! && integer_zerop (TREE_IMAGPART (expr)))); } ! /* Return 1 if EXPR is the integer constant one or the corresponding ! complex constant. */ int *************** *** 1437,1447 **** STRIP_NOPS (expr); ! return (TREE_CODE (expr) == INTEGER_CST ! && TREE_INT_CST_LOW (expr) == 1 ! && TREE_INT_CST_HIGH (expr) == 0); } ! /* Return 1 if EXPR is an integer containing all 1's ! in as much precision as it contains. */ int --- 1500,1513 ---- STRIP_NOPS (expr); ! return ((TREE_CODE (expr) == INTEGER_CST ! && TREE_INT_CST_LOW (expr) == 1 ! && TREE_INT_CST_HIGH (expr) == 0) ! || (TREE_CODE (expr) == COMPLEX_CST ! && integer_onep (TREE_REALPART (expr)) ! && integer_zerop (TREE_IMAGPART (expr)))); } ! /* Return 1 if EXPR is an integer containing all 1's in as much precision as ! it contains. Likewise for the corresponding complex constant. */ int *************** *** 1454,1458 **** STRIP_NOPS (expr); ! if (TREE_CODE (expr) != INTEGER_CST) return 0; --- 1520,1529 ---- STRIP_NOPS (expr); ! if (TREE_CODE (expr) == COMPLEX_CST ! && integer_all_onesp (TREE_REALPART (expr)) ! && integer_zerop (TREE_IMAGPART (expr))) ! return 1; ! ! else if (TREE_CODE (expr) != INTEGER_CST) return 0; *************** *** 1461,1465 **** return TREE_INT_CST_LOW (expr) == -1 && TREE_INT_CST_HIGH (expr) == -1; ! prec = TYPE_PRECISION (TREE_TYPE (expr)); if (prec >= HOST_BITS_PER_WIDE_INT) { --- 1532,1538 ---- return TREE_INT_CST_LOW (expr) == -1 && TREE_INT_CST_HIGH (expr) == -1; ! /* Note that using TYPE_PRECISION here is wrong. We care about the ! actual bits, not the (arbitrary) range of the type. */ ! prec = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (expr))); if (prec >= HOST_BITS_PER_WIDE_INT) { *************** *** 1496,1499 **** --- 1569,1577 ---- STRIP_NOPS (expr); + if (TREE_CODE (expr) == COMPLEX_CST + && integer_pow2p (TREE_REALPART (expr)) + && integer_zerop (TREE_IMAGPART (expr))) + return 1; + if (TREE_CODE (expr) != INTEGER_CST) return 0; *************** *** 1517,1525 **** STRIP_NOPS (expr); ! return (TREE_CODE (expr) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst0)); } ! /* Return 1 if EXPR is the real constant one. */ int --- 1595,1606 ---- STRIP_NOPS (expr); ! return ((TREE_CODE (expr) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst0)) ! || (TREE_CODE (expr) == COMPLEX_CST ! && real_zerop (TREE_REALPART (expr)) ! && real_zerop (TREE_IMAGPART (expr)))); } ! /* Return 1 if EXPR is the real constant one in real or complex form. */ int *************** *** 1529,1534 **** STRIP_NOPS (expr); ! return (TREE_CODE (expr) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst1)); } --- 1610,1618 ---- STRIP_NOPS (expr); ! return ((TREE_CODE (expr) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst1)) ! || (TREE_CODE (expr) == COMPLEX_CST ! && real_onep (TREE_REALPART (expr)) ! && real_zerop (TREE_IMAGPART (expr)))); } *************** *** 1541,1546 **** STRIP_NOPS (expr); ! return (TREE_CODE (expr) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst2)); } --- 1625,1633 ---- STRIP_NOPS (expr); ! return ((TREE_CODE (expr) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst2)) ! || (TREE_CODE (expr) == COMPLEX_CST ! && real_twop (TREE_REALPART (expr)) ! && real_zerop (TREE_IMAGPART (expr)))); } *************** *** 1560,1564 **** /* Return first list element whose TREE_VALUE is ELEM. ! Return 0 if ELEM is not it LIST. */ tree --- 1647,1651 ---- /* Return first list element whose TREE_VALUE is ELEM. ! Return 0 if ELEM is not in LIST. */ tree *************** *** 1576,1580 **** /* Return first list element whose TREE_PURPOSE is ELEM. ! Return 0 if ELEM is not it LIST. */ tree --- 1663,1667 ---- /* Return first list element whose TREE_PURPOSE is ELEM. ! Return 0 if ELEM is not in LIST. */ tree *************** *** 1592,1596 **** /* Return first list element whose BINFO_TYPE is ELEM. ! Return 0 if ELEM is not it LIST. */ tree --- 1679,1683 ---- /* Return first list element whose BINFO_TYPE is ELEM. ! Return 0 if ELEM is not in LIST. */ tree *************** *** 1607,1611 **** } ! /* Return nonzero if ELEM is part of the chain CHAIN. */ int --- 1694,1698 ---- } ! /* Return nonzero if ELEM is part of the chain CHAIN. */ int *************** *** 1623,1626 **** --- 1710,1753 ---- } + /* Return nonzero if ELEM is equal to TREE_VALUE (CHAIN) for any piece of + chain CHAIN. */ + /* ??? This function was added for machine specific attributes but is no + longer used. It could be deleted if we could confirm all front ends + don't use it. */ + + int + chain_member_value (elem, chain) + tree elem, chain; + { + while (chain) + { + if (elem == TREE_VALUE (chain)) + return 1; + chain = TREE_CHAIN (chain); + } + + return 0; + } + + /* Return nonzero if ELEM is equal to TREE_PURPOSE (CHAIN) + for any piece of chain CHAIN. */ + /* ??? This function was added for machine specific attributes but is no + longer used. It could be deleted if we could confirm all front ends + don't use it. */ + + int + chain_member_purpose (elem, chain) + tree elem, chain; + { + while (chain) + { + if (elem == TREE_PURPOSE (chain)) + return 1; + chain = TREE_CHAIN (chain); + } + + return 0; + } + /* Return the length of a chain of nodes chained through TREE_CHAIN. We expect a null pointer to mark the end of the chain. *************** *** 2072,2075 **** --- 2199,2203 ---- { enum tree_code code = TREE_CODE (exp); + tree new = 0; tree inner; *************** *** 2092,2098 **** { case 1: ! return fold (build1 (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), ! f, r))); case 2: --- 2220,2227 ---- { case 1: ! new = fold (build1 (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), ! f, r))); ! break; case 2: *************** *** 2104,2111 **** abort (); ! return fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), ! f, r))); case 3: --- 2233,2241 ---- abort (); ! new = fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), ! f, r))); ! break; case 3: *************** *** 2118,2126 **** abort (); ! return fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 2), ! f, r))); } --- 2248,2256 ---- abort (); ! new = fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 2), ! f, r))); } *************** *** 2141,2167 **** return r; ! return fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! TREE_OPERAND (exp, 1))); case BIT_FIELD_REF: ! return fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 2), f, r))); case INDIRECT_REF: case BUFFER_REF: ! return fold (build1 (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), ! f, r))); case OFFSET_REF: ! return fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), f, r))); } } /* If it wasn't one of the cases we handle, give up. */ ! abort (); } --- 2271,2307 ---- return r; ! new = fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! TREE_OPERAND (exp, 1))); ! break; ! case BIT_FIELD_REF: ! new = fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 2), f, r))); ! break; ! case INDIRECT_REF: case BUFFER_REF: ! new = fold (build1 (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), ! f, r))); ! break; ! case OFFSET_REF: ! new = fold (build (code, TREE_TYPE (exp), ! substitute_in_expr (TREE_OPERAND (exp, 0), f, r), ! substitute_in_expr (TREE_OPERAND (exp, 1), f, r))); ! break; } } /* If it wasn't one of the cases we handle, give up. */ + if (new == 0) + abort (); ! TREE_READONLY (new) = TREE_READONLY (exp); ! return new; } *************** *** 2369,2372 **** --- 2509,2519 ---- break; + case RTL_EXPR: + result = build1 (INDIRECT_REF, TREE_TYPE (ref), + save_expr (build1 (ADDR_EXPR, + build_pointer_type (TREE_TYPE (ref)), + ref))); + break; + /* If arg isn't a kind of lvalue we recognize, make no change. *************** *** 2401,2405 **** multiple utterances of the same expression should that prove fruitful. */ ! static tree stabilize_reference_1 (e) tree e; --- 2548,2552 ---- multiple utterances of the same expression should that prove fruitful. */ ! tree stabilize_reference_1 (e) tree e; *************** *** 2726,2734 **** } /* Return a type like TTYPE except that its TYPE_ATTRIBUTE is ATTRIBUTE. ! Such modified types already made are recorded so that duplicates ! are not made. */ tree --- 2873,2891 ---- } + /* Return a declaration like DDECL except that its DECL_MACHINE_ATTRIBUTE + is ATTRIBUTE. */ + + tree + build_decl_attribute_variant (ddecl, attribute) + tree ddecl, attribute; + { + DECL_MACHINE_ATTRIBUTES (ddecl) = attribute; + return ddecl; + } + /* Return a type like TTYPE except that its TYPE_ATTRIBUTE is ATTRIBUTE. ! Record such modified types already made so we don't make duplicates. */ tree *************** *** 2759,2763 **** hashcode = TYPE_HASH (TREE_CODE (ntype)) + TYPE_HASH (TREE_TYPE (ntype)) ! + type_hash_list (attribute); switch (TREE_CODE (ntype)) --- 2916,2920 ---- hashcode = TYPE_HASH (TREE_CODE (ntype)) + TYPE_HASH (TREE_TYPE (ntype)) ! + attribute_hash_list (attribute); switch (TREE_CODE (ntype)) *************** *** 2784,2787 **** --- 2941,3110 ---- return ttype; } + + /* Return a 1 if ATTR_NAME and ATTR_ARGS is valid for either declaration DECL + or type TYPE and 0 otherwise. Validity is determined the configuration + macros VALID_MACHINE_DECL_ATTRIBUTE and VALID_MACHINE_TYPE_ATTRIBUTE. */ + + int + valid_machine_attribute (attr_name, attr_args, decl, type) + tree attr_name, attr_args; + tree decl; + tree type; + { + int valid = 0; + tree decl_attr_list = decl != 0 ? DECL_MACHINE_ATTRIBUTES (decl) : 0; + tree type_attr_list = TYPE_ATTRIBUTES (type); + + if (TREE_CODE (attr_name) != IDENTIFIER_NODE) + abort (); + + #ifdef VALID_MACHINE_DECL_ATTRIBUTE + if (decl != 0 + && VALID_MACHINE_DECL_ATTRIBUTE (decl, decl_attr_list, attr_name, attr_args)) + { + tree attr = lookup_attribute (IDENTIFIER_POINTER (attr_name), + decl_attr_list); + + if (attr != NULL_TREE) + { + /* Override existing arguments. Declarations are unique so we can + modify this in place. */ + TREE_VALUE (attr) = attr_args; + } + else + { + decl_attr_list = tree_cons (attr_name, attr_args, decl_attr_list); + decl = build_decl_attribute_variant (decl, decl_attr_list); + } + + valid = 1; + } + #endif + + #ifdef VALID_MACHINE_TYPE_ATTRIBUTE + if (VALID_MACHINE_TYPE_ATTRIBUTE (type, type_attr_list, attr_name, attr_args)) + { + tree attr = lookup_attribute (IDENTIFIER_POINTER (attr_name), + type_attr_list); + + if (attr != NULL_TREE) + { + /* Override existing arguments. + ??? This currently works since attribute arguments are not + included in `attribute_hash_list'. Something more complicated + may be needed in the future. */ + TREE_VALUE (attr) = attr_args; + } + else + { + type_attr_list = tree_cons (attr_name, attr_args, type_attr_list); + type = build_type_attribute_variant (type, type_attr_list); + } + if (decl != 0) + TREE_TYPE (decl) = type; + valid = 1; + } + + /* Handle putting a type attribute on pointer-to-function-type by putting + the attribute on the function type. */ + else if (TREE_CODE (type) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE + && VALID_MACHINE_TYPE_ATTRIBUTE (TREE_TYPE (type), type_attr_list, + attr_name, attr_args)) + { + tree inner_type = TREE_TYPE (type); + tree inner_attr_list = TYPE_ATTRIBUTES (inner_type); + tree attr = lookup_attribute (IDENTIFIER_POINTER (attr_name), + type_attr_list); + + if (attr != NULL_TREE) + TREE_VALUE (attr) = attr_args; + else + { + inner_attr_list = tree_cons (attr_name, attr_args, inner_attr_list); + inner_type = build_type_attribute_variant (inner_type, + inner_attr_list); + } + + if (decl != 0) + TREE_TYPE (decl) = build_pointer_type (inner_type); + + valid = 1; + } + #endif + + return valid; + } + + /* Return non-zero if IDENT is a valid name for attribute ATTR, + or zero if not. + + We try both `text' and `__text__', ATTR may be either one. */ + /* ??? It might be a reasonable simplification to require ATTR to be only + `text'. One might then also require attribute lists to be stored in + their canonicalized form. */ + + int + is_attribute_p (attr, ident) + char *attr; + tree ident; + { + int ident_len, attr_len; + char *p; + + if (TREE_CODE (ident) != IDENTIFIER_NODE) + return 0; + + if (strcmp (attr, IDENTIFIER_POINTER (ident)) == 0) + return 1; + + p = IDENTIFIER_POINTER (ident); + ident_len = strlen (p); + attr_len = strlen (attr); + + /* If ATTR is `__text__', IDENT must be `text'; and vice versa. */ + if (attr[0] == '_') + { + if (attr[1] != '_' + || attr[attr_len - 2] != '_' + || attr[attr_len - 1] != '_') + abort (); + if (ident_len == attr_len - 4 + && strncmp (attr + 2, p, attr_len - 4) == 0) + return 1; + } + else + { + if (ident_len == attr_len + 4 + && p[0] == '_' && p[1] == '_' + && p[ident_len - 2] == '_' && p[ident_len - 1] == '_' + && strncmp (attr, p + 2, attr_len) == 0) + return 1; + } + + return 0; + } + + /* Given an attribute name and a list of attributes, return a pointer to the + attribute's list element if the attribute is part of the list, or NULL_TREE + if not found. */ + + tree + lookup_attribute (attr_name, list) + char *attr_name; + tree list; + { + tree l; + + for (l = list; l; l = TREE_CHAIN (l)) + { + if (TREE_CODE (TREE_PURPOSE (l)) != IDENTIFIER_NODE) + abort (); + if (is_attribute_p (attr_name, TREE_PURPOSE (l))) + return l; + } + + return NULL_TREE; + } /* Return a type like TYPE except that its TYPE_READONLY is CONSTP *************** *** 2938,2941 **** --- 3261,3265 ---- || tree_int_cst_equal (TYPE_MIN_VALUE (h->type), TYPE_MIN_VALUE (type))) + /* Note that TYPE_DOMAIN is TYPE_ARG_TYPES for FUNCTION_TYPE. */ && (TYPE_DOMAIN (h->type) == TYPE_DOMAIN (type) || (TYPE_DOMAIN (h->type) *************** *** 2943,2947 **** && TYPE_DOMAIN (type) && TREE_CODE (TYPE_DOMAIN (type)) == TREE_LIST ! && type_list_equal (TYPE_DOMAIN (h->type), TYPE_DOMAIN (type))))) return h->type; return 0; --- 3267,3272 ---- && TYPE_DOMAIN (type) && TREE_CODE (TYPE_DOMAIN (type)) == TREE_LIST ! && type_list_equal (TYPE_DOMAIN (h->type), ! TYPE_DOMAIN (type))))) return h->type; return 0; *************** *** 3007,3010 **** --- 3332,3351 ---- } + /* Compute a hash code for a list of attributes (chain of TREE_LIST nodes + with names in the TREE_PURPOSE slots and args in the TREE_VALUE slots), + by adding the hash codes of the individual attributes. */ + + int + attribute_hash_list (list) + tree list; + { + register int hashcode; + register tree tail; + for (hashcode = 0, tail = list; tail; tail = TREE_CHAIN (tail)) + /* ??? Do we want to add in TREE_VALUE too? */ + hashcode += TYPE_HASH (TREE_PURPOSE (tail)); + return hashcode; + } + /* Given two lists of attributes, return true if list l2 is equivalent to l1. */ *************** *** 3018,3023 **** } ! /* Given two lists of attributes, return true if list l2 is ! completely contained within l1. */ int --- 3359,3369 ---- } ! /* Given two lists of attributes, return true if list L2 is ! completely contained within L1. */ ! /* ??? This would be faster if attribute names were stored in a canonicalized ! form. Otherwise, if L1 uses `foo' and L2 uses `__foo__', the long method ! must be used to show these elements are equivalent (which they are). */ ! /* ??? It's not clear that attributes with arguments will always be handled ! correctly. */ int *************** *** 3031,3037 **** return 1; ! /* Then check the obvious, maybe the lists are similar. */ for (t1 = l1, t2 = l2; t1 && t2 && TREE_VALUE (t1) == TREE_VALUE (t2); t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2)); --- 3377,3384 ---- return 1; ! /* Maybe the lists are similar. */ for (t1 = l1, t2 = l2; t1 && t2 + && TREE_PURPOSE (t1) == TREE_PURPOSE (t2) && TREE_VALUE (t1) == TREE_VALUE (t2); t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2)); *************** *** 3042,3047 **** for (; t2; t2 = TREE_CHAIN (t2)) ! if (!value_member (l1, t2)) return 0; return 1; } --- 3389,3402 ---- for (; t2; t2 = TREE_CHAIN (t2)) ! { ! tree attr ! = lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)), l1); ! ! if (attr == NULL_TREE) return 0; + if (simple_cst_equal (TREE_VALUE (t2), TREE_VALUE (attr)) != 1) + return 0; + } + return 1; } *************** *** 3057,3075 **** { register tree t1, t2; for (t1 = l1, t2 = l2; t1 && t2; t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2)) ! { ! if (TREE_VALUE (t1) != TREE_VALUE (t2)) ! return 0; ! if (TREE_PURPOSE (t1) != TREE_PURPOSE (t2)) ! { ! int cmp = simple_cst_equal (TREE_PURPOSE (t1), TREE_PURPOSE (t2)); ! if (cmp < 0) ! abort (); ! if (cmp == 0 ! || TREE_TYPE (TREE_PURPOSE (t1)) ! != TREE_TYPE (TREE_PURPOSE (t2))) ! return 0; ! } ! } return t1 == t2; --- 3412,3423 ---- { register tree t1, t2; + for (t1 = l1, t2 = l2; t1 && t2; t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2)) ! if (TREE_VALUE (t1) != TREE_VALUE (t2) ! || (TREE_PURPOSE (t1) != TREE_PURPOSE (t2) ! && ! (1 == simple_cst_equal (TREE_PURPOSE (t1), TREE_PURPOSE (t2)) ! && (TREE_TYPE (TREE_PURPOSE (t1)) ! == TREE_TYPE (TREE_PURPOSE (t2)))))) ! return 0; return t1 == t2; *************** *** 3128,3132 **** } ! /* Compare two constructor-element-type constants. */ int simple_cst_list_equal (l1, l2) --- 3476,3482 ---- } ! /* Compare two constructor-element-type constants. Return 1 if the lists ! are known to be equal; otherwise return 0. */ ! int simple_cst_list_equal (l1, l2) *************** *** 3135,3146 **** while (l1 != NULL_TREE && l2 != NULL_TREE) { ! int cmp = simple_cst_equal (TREE_VALUE (l1), TREE_VALUE (l2)); ! if (cmp < 0) ! abort (); ! if (cmp == 0) return 0; l1 = TREE_CHAIN (l1); l2 = TREE_CHAIN (l2); } return (l1 == l2); } --- 3485,3495 ---- while (l1 != NULL_TREE && l2 != NULL_TREE) { ! if (simple_cst_equal (TREE_VALUE (l1), TREE_VALUE (l2)) != 1) return 0; + l1 = TREE_CHAIN (l1); l2 = TREE_CHAIN (l2); } + return (l1 == l2); } *************** *** 3241,3246 **** } ! /* This general rule works for most tree codes. ! All exceptions should be handled above. */ switch (TREE_CODE_CLASS (code1)) --- 3590,3600 ---- } ! /* This general rule works for most tree codes. All exceptions should be ! handled above. If this is a language-specific tree code, we can't ! trust what might be in the operand, so say we don't know ! the situation. */ ! if (code1 ! >= sizeof standard_tree_code_type / sizeof standard_tree_code_type[0]) ! return -1; switch (TREE_CODE_CLASS (code1)) *************** *** 3390,3400 **** if (TYPE_PRECISION (itype1) != TYPE_PRECISION (itype2) || TYPE_MODE (itype1) != TYPE_MODE (itype2) ! || ! simple_cst_equal (TYPE_SIZE (itype1), TYPE_SIZE (itype2)) || TYPE_ALIGN (itype1) != TYPE_ALIGN (itype2)) return 0; ! if (simple_cst_equal (TYPE_MIN_VALUE (itype1), TYPE_MIN_VALUE (itype2)) ! && simple_cst_equal (TYPE_MAX_VALUE (itype1), TYPE_MAX_VALUE (itype2))) return 1; } return 0; } --- 3744,3757 ---- if (TYPE_PRECISION (itype1) != TYPE_PRECISION (itype2) || TYPE_MODE (itype1) != TYPE_MODE (itype2) ! || simple_cst_equal (TYPE_SIZE (itype1), TYPE_SIZE (itype2)) != 1 || TYPE_ALIGN (itype1) != TYPE_ALIGN (itype2)) return 0; ! if (1 == simple_cst_equal (TYPE_MIN_VALUE (itype1), ! TYPE_MIN_VALUE (itype2)) ! && 1 == simple_cst_equal (TYPE_MAX_VALUE (itype1), ! TYPE_MAX_VALUE (itype2))) return 1; } + return 0; } *************** *** 3983,3987 **** sprintf (buf, FILE_FUNCTION_FORMAT, p); ! /* Don't need to pull wierd characters out of global names. */ if (p != first_global_object_name) { --- 4340,4344 ---- sprintf (buf, FILE_FUNCTION_FORMAT, p); ! /* Don't need to pull weird characters out of global names. */ if (p != first_global_object_name) { *************** *** 4009,4013 **** } ! /* Expand (the constant part of) a SET_TYPE CONTRUCTOR node. The result is placed in BUFFER (which has length BIT_SIZE), with one bit in each char ('\000' or '\001'). --- 4366,4370 ---- } ! /* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node. The result is placed in BUFFER (which has length BIT_SIZE), with one bit in each char ('\000' or '\001'). *************** *** 4067,4088 **** } ! /* Expand (the constant part of) a SET_TYPE CONTRUCTOR node. ! The result is placed in BUFFER (which is an array of WD_SIZE ! words). TYPE_ALIGN bits are stored in each element of BUFFER. If the constructor is constant, NULL_TREE is returned. Otherwise, a TREE_LIST of the non-constant elements is emitted. */ tree ! get_set_constructor_words (init, buffer, wd_size) tree init; ! HOST_WIDE_INT *buffer; int wd_size; { int i; tree vals = TREE_OPERAND (init, 1); ! int set_word_size = TYPE_ALIGN (TREE_TYPE (init)); int bit_size = wd_size * set_word_size; int bit_pos = 0; ! HOST_WIDE_INT *wordp = buffer; char *bit_buffer = (char*)alloca(bit_size); tree non_const_bits = get_set_constructor_bits (init, bit_buffer, bit_size); --- 4424,4444 ---- } ! /* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node. ! The result is placed in BUFFER (which is an array of bytes). If the constructor is constant, NULL_TREE is returned. Otherwise, a TREE_LIST of the non-constant elements is emitted. */ tree ! get_set_constructor_bytes (init, buffer, wd_size) tree init; ! unsigned char *buffer; int wd_size; { int i; tree vals = TREE_OPERAND (init, 1); ! int set_word_size = BITS_PER_UNIT; int bit_size = wd_size * set_word_size; int bit_pos = 0; ! unsigned char *bytep = buffer; char *bit_buffer = (char*)alloca(bit_size); tree non_const_bits = get_set_constructor_bits (init, bit_buffer, bit_size); *************** *** 4095,4107 **** if (bit_buffer[i]) { ! #if BITS_BIG_ENDIAN ! *wordp |= (1 << (set_word_size - 1 - bit_pos)); ! #else ! *wordp |= 1 << bit_pos; ! #endif } bit_pos++; if (bit_pos >= set_word_size) ! bit_pos = 0, wordp++; } return non_const_bits; --- 4451,4462 ---- if (bit_buffer[i]) { ! if (BYTES_BIG_ENDIAN) ! *bytep |= (1 << (set_word_size - 1 - bit_pos)); ! else ! *bytep |= 1 << bit_pos; } bit_pos++; if (bit_pos >= set_word_size) ! bit_pos = 0, bytep++; } return non_const_bits; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/tree.def gcc-2.7.0/tree.def *** gcc-2.6.3/tree.def Thu May 12 20:04:43 1994 --- gcc-2.7.0/tree.def Thu Jun 15 08:11:16 1995 *************** *** 1,5 **** /* This file contains the definitions and documentation for the tree codes used in the GNU C compiler. ! Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* This file contains the definitions and documentation for the tree codes used in the GNU C compiler. ! Copyright (C) 1987, 1988, 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 17,21 **** 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. */ --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 201,205 **** /* Types of sets for Pascal. Special fields are the same as ! in an array type. The target type is always a boolean type. */ DEFTREECODE (SET_TYPE, "set_type", "t", 0) --- 202,208 ---- /* Types of sets for Pascal. Special fields are the same as ! in an array type. The target type is always a boolean type. ! Used for both bitstrings and powersets in Chill; ! TYPE_STRING_FLAG indicates a bitstring. */ DEFTREECODE (SET_TYPE, "set_type", "t", 0) *************** *** 443,448 **** /* Specify a cleanup point. ! Operand 0 is the expression that has cleanups that we want ensure are ! cleaned up. */ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", "e", 1) --- 446,463 ---- /* Specify a cleanup point. ! Operand 0 is an expression that may have cleanups. If it does, those ! cleanups are executed after the expression is expanded. ! ! Note that if the expression is a reference to storage, it is forced out ! of memory before the cleanups are run. This is necessary to handle ! cases where the cleanups modify the storage referenced; in the ! expression 't.i', if 't' is a struct with an integer member 'i' and a ! cleanup which modifies 'i', the value of the expression depends on ! whether the cleanup is run before or after 't.i' is evaluated. When ! expand_expr is run on 't.i', it returns a MEM. This is not good enough; ! the value of 't.i' must be forced out of memory. ! ! As a consequence, the operand of a CLEANUP_POINT_EXPR must not have ! BLKmode, because it will not be forced out of memory. */ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", "e", 1) diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/tree.h gcc-2.7.0/tree.h *** gcc-2.6.3/tree.h Thu Sep 8 14:25:41 1994 --- gcc-2.7.0/tree.h Thu Jun 15 08:10:49 1995 *************** *** 1,4 **** /* Front-end tree definitions for GNU compiler. ! Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Front-end tree definitions for GNU compiler. ! Copyright (C) 1989, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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 "machmode.h" --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #include "machmode.h" *************** *** 235,238 **** --- 236,244 ---- || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE \ || TREE_CODE (TYPE) == SET_TYPE) + + /* Nonzero if TYPE represents a pointer type. */ + + #define POINTER_TYPE_P(TYPE) \ + (TREE_CODE (TYPE) == POINTER_TYPE || TREE_CODE (TYPE) == REFERENCE_TYPE) /* Define many boolean fields that all tree nodes have. */ *************** *** 569,573 **** #define TYPE_MAX_VALUE(NODE) ((NODE)->type.maxval) #define TYPE_PRECISION(NODE) ((NODE)->type.precision) - #define TYPE_PARSE_INFO(NODE) ((NODE)->type.parse_info) #define TYPE_SYMTAB_ADDRESS(NODE) ((NODE)->type.symtab.address) #define TYPE_SYMTAB_POINTER(NODE) ((NODE)->type.symtab.pointer) --- 575,578 ---- *************** *** 624,627 **** --- 629,636 ---- #define TYPE_TRANSPARENT_UNION(NODE) ((NODE)->type.transparent_union_flag) + /* Indicated that objects of this type should be layed out in as + compact a way as possible. */ + #define TYPE_PACKED(NODE) ((NODE)->type.packed_flag) + struct tree_type { *************** *** 643,646 **** --- 652,656 ---- unsigned needs_constructing_flag : 1; unsigned transparent_union_flag : 1; + unsigned packed_flag : 1; unsigned lang_flag_0 : 1; unsigned lang_flag_1 : 1; *************** *** 650,659 **** unsigned lang_flag_5 : 1; unsigned lang_flag_6 : 1; ! /* room for 5 more bits */ unsigned int align; union tree_node *pointer_to; union tree_node *reference_to; - int parse_info; union {int address; char *pointer; } symtab; union tree_node *name; --- 660,668 ---- unsigned lang_flag_5 : 1; unsigned lang_flag_6 : 1; ! /* room for 4 more bits */ unsigned int align; union tree_node *pointer_to; union tree_node *reference_to; union {int address; char *pointer; } symtab; union tree_node *name; *************** *** 767,770 **** --- 776,782 ---- #define DECL_CONTEXT(NODE) ((NODE)->decl.context) #define DECL_FIELD_CONTEXT(NODE) ((NODE)->decl.context) + /* In a DECL this is the field where configuration dependent machine + attributes are store */ + #define DECL_MACHINE_ATTRIBUTES(NODE) ((NODE)->decl.machine_attributes) /* In a FIELD_DECL, this is the field position, counting in bits, of the bit closest to the beginning of the structure. */ *************** *** 860,864 **** "abstract instance" of the given declaration (e.g. in the original declaration of an inline function). When generating symbolic debugging ! information, we musn't try to generate any address information for nodes marked as "abstract instances" because we don't actually generate any code or allocate any data space for such instances. */ --- 872,876 ---- "abstract instance" of the given declaration (e.g. in the original declaration of an inline function). When generating symbolic debugging ! information, we mustn't try to generate any address information for nodes marked as "abstract instances" because we don't actually generate any code or allocate any data space for such instances. */ *************** *** 927,931 **** /* Used in VAR_DECLs to indicate that the variable is a vtable. ! It is also used in FIELD_DECLs for vtable pointers. */ #define DECL_VIRTUAL_P(NODE) ((NODE)->decl.virtual_flag) --- 939,944 ---- /* Used in VAR_DECLs to indicate that the variable is a vtable. ! Used in FIELD_DECLs for vtable pointers. ! Used in FUNCTION_DECLs to indicate that the function is virtual. */ #define DECL_VIRTUAL_P(NODE) ((NODE)->decl.virtual_flag) *************** *** 939,942 **** --- 952,966 ---- #define DECL_TRANSPARENT_UNION(NODE) ((NODE)->decl.transparent_union) + /* Used in FUNCTION_DECLs to indicate that they should be run automatically + at the beginning or end of execution. */ + #define DECL_STATIC_CONSTRUCTOR(NODE) ((NODE)->decl.static_ctor_flag) + #define DECL_STATIC_DESTRUCTOR(NODE) ((NODE)->decl.static_dtor_flag) + + /* Used to indicate that this DECL represents a compiler-generated entity. */ + #define DECL_ARTIFICIAL(NODE) ((NODE)->decl.artificial_flag) + + /* Used to indicate that this DECL has weak linkage. */ + #define DECL_WEAK(NODE) ((NODE)->decl.weak_flag) + /* Additional flags for language-specific uses. */ #define DECL_LANG_FLAG_0(NODE) ((NODE)->decl.lang_flag_0) *************** *** 975,979 **** unsigned defer_output : 1; unsigned transparent_union : 1; ! /* room for four more */ unsigned lang_flag_0 : 1; --- 999,1007 ---- unsigned defer_output : 1; unsigned transparent_union : 1; ! unsigned static_ctor_flag : 1; ! unsigned static_dtor_flag : 1; ! unsigned artificial_flag : 1; ! unsigned weak_flag : 1; ! /* room for no more */ unsigned lang_flag_0 : 1; *************** *** 994,997 **** --- 1022,1026 ---- union tree_node *assembler_name; union tree_node *section_name; + union tree_node *machine_attributes; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ *************** *** 1175,1178 **** --- 1204,1208 ---- extern tree purpose_member PROTO((tree, tree)); extern tree binfo_member PROTO((tree, tree)); + extern int attribute_hash_list PROTO((tree)); extern int attribute_list_equal PROTO((tree, tree)); extern int attribute_list_contained PROTO((tree, tree)); *************** *** 1195,1199 **** --- 1225,1244 ---- extern tree build_type_attribute_variant PROTO((tree, tree)); + extern tree build_decl_attribute_variant PROTO((tree, tree)); + + /* Return 1 if an attribute and its arguments are valid for a decl or type. */ + + int valid_machine_attribute PROTO((tree, tree, tree, tree)); + /* Given a tree node and a string, return non-zero if the tree node is + a valid attribute name for the string. */ + + int is_attribute_p PROTO((char *, tree)); + + /* Given an attribute name and a list of attributes, return the list element + of the attribute or NULL_TREE if not found. */ + + tree lookup_attribute PROTO((char *, tree)); + /* Given a type node TYPE, and CONSTP and VOLATILEP, return a type for the same kind of data as TYPE describes. *************** *** 1242,1246 **** extern int int_size_in_bytes PROTO((tree)); extern tree size_binop PROTO((enum tree_code, tree, tree)); ! extern tree size_int PROTO((unsigned)); extern tree round_up PROTO((tree, int)); extern tree get_pending_sizes PROTO((void)); --- 1287,1291 ---- extern int int_size_in_bytes PROTO((tree)); extern tree size_binop PROTO((enum tree_code, tree, tree)); ! extern tree size_int PROTO((unsigned HOST_WIDE_INT)); extern tree round_up PROTO((tree, int)); extern tree get_pending_sizes PROTO((void)); *************** *** 1352,1355 **** --- 1397,1406 ---- extern tree stabilize_reference PROTO((tree)); + /* Subroutine of stabilize_reference; this is called for subtrees of + references. Any expression with side-effects must be put in a SAVE_EXPR + to ensure that it is only evaluated once. */ + + extern tree stabilize_reference_1 PROTO((tree)); + /* Return EXP, stripped of any conversions to wider types in such a way that the result of converting to type FOR_TYPE *************** *** 1467,1470 **** --- 1518,1526 ---- extern int pedantic; + /* Nonzero means lvalues are limited to those valid in pedantic ANSI C. + Zero means allow extended lvalues. */ + + extern int pedantic_lvalues; + /* Nonzero means can safely call expand_expr now; otherwise layout_type puts variable sizes onto `pending_sizes' instead. */ *************** *** 1500,1505 **** extern char *perm_calloc PROTO((int, long)); extern tree get_set_constructor_bits PROTO((tree, char*, int)); ! extern tree get_set_constructor_words PROTO((tree, ! HOST_WIDE_INT*, int)); /* In stmt.c */ --- 1556,1561 ---- extern char *perm_calloc PROTO((int, long)); extern tree get_set_constructor_bits PROTO((tree, char*, int)); ! extern tree get_set_constructor_bytes PROTO((tree, ! unsigned char*, int)); /* In stmt.c */ *************** *** 1509,1512 **** --- 1565,1569 ---- extern tree expand_end_stmt_expr PROTO((tree)); extern void expand_expr_stmt PROTO((tree)); + extern int warn_if_unused_value PROTO((tree)); extern void expand_decl_init PROTO((tree)); extern void clear_last_expr PROTO((void)); *************** *** 1589,1593 **** extern void lang_finish PROTO((void)); ! /* Funtion to identify which front-end produced the output file. */ extern char *lang_identify PROTO((void)); --- 1646,1650 ---- extern void lang_finish PROTO((void)); ! /* Function to identify which front-end produced the output file. */ extern char *lang_identify PROTO((void)); diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/unroll.c gcc-2.7.0/unroll.c *** gcc-2.6.3/unroll.c Thu Oct 20 16:28:42 1994 --- gcc-2.7.0/unroll.c Thu Jun 15 08:11:44 1995 *************** *** 1,4 **** /* Try to unroll loops, and split induction variables. ! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by James E. Wilson, Cygnus Support/UC Berkeley. --- 1,4 ---- /* Try to unroll loops, and split induction variables. ! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Contributed by James E. Wilson, Cygnus Support/UC Berkeley. *************** *** 17,21 **** 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. */ /* Try to unroll a loop, and split induction variables. --- 17,22 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* Try to unroll a loop, and split induction variables. *************** *** 194,206 **** /* Forward declarations. */ ! static void init_reg_map (); ! static int precondition_loop_p (); ! static void copy_loop_body (); ! static void iteration_info (); ! static rtx approx_final_value (); ! static int find_splittable_regs (); ! static int find_splittable_givs (); ! static rtx fold_rtx_mult_add (); ! static rtx remap_split_bivs (); /* Try to unroll one loop and split induction variables in the loop. --- 195,213 ---- /* Forward declarations. */ ! static void init_reg_map PROTO((struct inline_remap *, int)); ! static int precondition_loop_p PROTO((rtx *, rtx *, rtx *, rtx, rtx)); ! static rtx calculate_giv_inc PROTO((rtx, rtx, int)); ! static rtx initial_reg_note_copy PROTO((rtx, struct inline_remap *)); ! static void final_reg_note_copy PROTO((rtx, struct inline_remap *)); ! static void copy_loop_body PROTO((rtx, rtx, struct inline_remap *, rtx, int, ! enum unroll_types, rtx, rtx, rtx, rtx)); ! static void iteration_info PROTO((rtx, rtx *, rtx *, rtx, rtx)); ! static rtx approx_final_value PROTO((enum rtx_code, rtx, int *, int *)); ! static int find_splittable_regs PROTO((enum unroll_types, rtx, rtx, rtx, int)); ! static int find_splittable_givs PROTO((struct iv_class *,enum unroll_types, ! rtx, rtx, rtx, int)); ! static int reg_dead_after_loop PROTO((rtx, rtx, rtx)); ! static rtx fold_rtx_mult_add PROTO((rtx, rtx, rtx, enum machine_mode)); ! static rtx remap_split_bivs PROTO((rtx)); /* Try to unroll one loop and split induction variables in the loop. *************** *** 232,235 **** --- 239,243 ---- struct inline_remap *map; char *local_label; + char *local_regno; int maxregnum; int new_maxregnum; *************** *** 712,715 **** --- 720,754 ---- = (struct induction **) alloca (maxregnum * sizeof (struct induction *)); bzero ((char *) addr_combined_regs, maxregnum * sizeof (struct induction *)); + /* We must limit it to max_reg_before_loop, because only these pseudo + registers have valid regno_first_uid info. Any register created after + that is unlikely to be local to the loop anyways. */ + local_regno = (char *) alloca (max_reg_before_loop); + bzero (local_regno, max_reg_before_loop); + + /* Mark all local registers, i.e. the ones which are referenced only + inside the loop. */ + if (INSN_UID (copy_end) < max_uid_for_loop) + { + int copy_start_luid = INSN_LUID (copy_start); + int copy_end_luid = INSN_LUID (copy_end); + + /* If a register is used in the jump insn, we must not duplicate it + since it will also be used outside the loop. */ + if (GET_CODE (copy_end) == JUMP_INSN) + copy_end_luid--; + /* If copy_start points to the NOTE that starts the loop, then we must + use the next luid, because invariant pseudo-regs moved out of the loop + have their lifetimes modified to start here, but they are not safe + to duplicate. */ + if (copy_start == loop_start) + copy_start_luid++; + + for (j = FIRST_PSEUDO_REGISTER; j < max_reg_before_loop; ++j) + if (regno_first_uid[j] > 0 && regno_first_uid[j] <= max_uid_for_loop + && uid_luid[regno_first_uid[j]] >= copy_start_luid + && regno_last_uid[j] > 0 && regno_last_uid[j] <= max_uid_for_loop + && uid_luid[regno_last_uid[j]] <= copy_end_luid) + local_regno[j] = 1; + } /* If this loop requires exit tests when unrolled, check to see if we *************** *** 924,927 **** --- 963,970 ---- map->label_map[j] = gen_label_rtx (); + for (j = FIRST_PSEUDO_REGISTER; j < max_reg_before_loop; j++) + if (local_regno[j]) + map->reg_map[j] = gen_reg_rtx (GET_MODE (regno_reg_rtx[j])); + /* The last copy needs the compare/branch insns at the end, so reset copy_end here if the loop ends with a conditional *************** *** 1061,1064 **** --- 1104,1111 ---- map->label_map[j] = gen_label_rtx (); + for (j = FIRST_PSEUDO_REGISTER; j < max_reg_before_loop; j++) + if (local_regno[j]) + map->reg_map[j] = gen_reg_rtx (GET_MODE (regno_reg_rtx[j])); + /* If loop starts with a branch to the test, then fix it so that it points to the test of the first unrolled copy of the loop. */ *************** *** 1546,1553 **** /* Check for shared address givs, and avoid ! incrementing the shared psuedo reg more than once. */ ! if (! (tv != v && tv->insn == v->insn ! && tv->new_reg == v->new_reg)) { /* tv->dest_reg may actually be a (PLUS (REG) --- 1593,1599 ---- /* Check for shared address givs, and avoid ! incrementing the shared pseudo reg more than once. */ ! if (! tv->same_insn) { /* tv->dest_reg may actually be a (PLUS (REG) *************** *** 1707,1711 **** If the previous insn set CC0, substitute constants on it as well. */ ! if (sets_cc0_p (copy) != 0) cc0_insn = copy; else --- 1753,1757 ---- If the previous insn set CC0, substitute constants on it as well. */ ! if (sets_cc0_p (PATTERN (copy)) != 0) cc0_insn = copy; else *************** *** 1759,1764 **** rtx jmp; rtx lab = gen_label_rtx (); ! /* Can't do it by reversing the jump (probably becasue we ! couln't reverse the conditions), so emit a new jump_insn after COPY, and redirect the jump around that. */ --- 1805,1810 ---- rtx jmp; rtx lab = gen_label_rtx (); ! /* Can't do it by reversing the jump (probably because we ! couldn't reverse the conditions), so emit a new jump_insn after COPY, and redirect the jump around that. */ *************** *** 1811,1816 **** for a switch statement. This label must have been mapped, so just use the label_map to get the new jump label. */ ! JUMP_LABEL (copy) = map->label_map[CODE_LABEL_NUMBER ! (JUMP_LABEL (insn))]; } --- 1857,1862 ---- for a switch statement. This label must have been mapped, so just use the label_map to get the new jump label. */ ! JUMP_LABEL (copy) ! = map->label_map[CODE_LABEL_NUMBER (JUMP_LABEL (insn))]; } *************** *** 1986,1990 **** and uses a negligible amount of CPU time on average. */ ! static int back_branch_in_range_p (insn, loop_start, loop_end) rtx insn; --- 2032,2036 ---- and uses a negligible amount of CPU time on average. */ ! int back_branch_in_range_p (insn, loop_start, loop_end) rtx insn; *************** *** 2436,2439 **** --- 2482,2512 ---- } + /* Return 1 if the first and last unrolled copy of the address giv V is valid + for the instruction that is using it. Do not make any changes to that + instruction. */ + + static int + verify_addresses (v, giv_inc, unroll_number) + struct induction *v; + rtx giv_inc; + int unroll_number; + { + int ret = 1; + rtx orig_addr = *v->location; + rtx last_addr = plus_constant (v->dest_reg, + INTVAL (giv_inc) * (unroll_number - 1)); + + /* First check to see if either address would fail. */ + if (! validate_change (v->insn, v->location, v->dest_reg, 0) + || ! validate_change (v->insn, v->location, last_addr, 0)) + ret = 0; + + /* Now put things back the way they were before. This will always + succeed. */ + validate_change (v->insn, v->location, orig_addr, 0); + + return ret; + } + /* For every giv based on the biv BL, check to determine whether it is splittable. This is a subroutine to find_splittable_regs (). *************** *** 2450,2458 **** int unroll_number; { ! struct induction *v; rtx final_value; rtx tem; int result = 0; for (v = bl->giv; v; v = v->next_iv) { --- 2523,2539 ---- int unroll_number; { ! struct induction *v, *v2; rtx final_value; rtx tem; int result = 0; + /* Scan the list of givs, and set the same_insn field when there are + multiple identical givs in the same insn. */ + for (v = bl->giv; v; v = v->next_iv) + for (v2 = v->next_iv; v2; v2 = v2->next_iv) + if (v->insn == v2->insn && rtx_equal_p (v->new_reg, v2->new_reg) + && ! v2->same_insn) + v2->same_insn = v; + for (v = bl->giv; v; v = v->next_iv) { *************** *** 2586,2590 **** /* If value is not a constant, register, or register plus constant, then compute its value into a register before ! loop start. This prevents illegal rtx sharing, and should generate better code. We can use bl->initial_value here instead of splittable_regs[bl->regno] because this code --- 2667,2671 ---- /* If value is not a constant, register, or register plus constant, then compute its value into a register before ! loop start. This prevents invalid rtx sharing, and should generate better code. We can use bl->initial_value here instead of splittable_regs[bl->regno] because this code *************** *** 2624,2628 **** /* As a special case, if we have multiple identical address givs ! within a single instruction, then we do use a single psuedo reg for both. This is necessary in case one is a match_dup of the other. */ --- 2705,2709 ---- /* As a special case, if we have multiple identical address givs ! within a single instruction, then we do use a single pseudo reg for both. This is necessary in case one is a match_dup of the other. */ *************** *** 2630,2641 **** v->const_adjust = 0; ! if (v->same && v->same->insn == v->insn ! && v->new_reg == v->same->new_reg) { ! v->dest_reg = v->same->dest_reg; if (loop_dump_stream) fprintf (loop_dump_stream, ! "Sharing address givs with reg %d\n", ! REGNO (v->dest_reg)); } else if (unroll_type != UNROLL_COMPLETELY) --- 2711,2721 ---- v->const_adjust = 0; ! if (v->same_insn) { ! v->dest_reg = v->same_insn->dest_reg; if (loop_dump_stream) fprintf (loop_dump_stream, ! "Sharing address givs in insn %d\n", ! INSN_UID (v->insn)); } else if (unroll_type != UNROLL_COMPLETELY) *************** *** 2660,2668 **** address resulting from loop unrolling, if one fails, then can't do const elim here. */ ! if (memory_address_p (v->mem_mode, v->dest_reg) ! && memory_address_p (v->mem_mode, ! plus_constant (v->dest_reg, ! INTVAL (giv_inc) ! * (unroll_number - 1)))) { /* Save the negative of the eliminated const, so --- 2740,2744 ---- address resulting from loop unrolling, if one fails, then can't do const elim here. */ ! if (! verify_addresses (v, giv_inc, unroll_number)) { /* Save the negative of the eliminated const, so *************** *** 2685,2699 **** /* If the address hasn't been checked for validity yet, do so now, and fail completely if either the first or the last ! unrolled copy of the address is not a valid address. */ if (v->dest_reg == tem ! && (! memory_address_p (v->mem_mode, v->dest_reg) ! || ! memory_address_p (v->mem_mode, ! plus_constant (v->dest_reg, ! INTVAL (giv_inc) ! * (unroll_number -1))))) { if (loop_dump_stream) fprintf (loop_dump_stream, ! "Illegal address for giv at insn %d\n", INSN_UID (v->insn)); continue; --- 2761,2772 ---- /* If the address hasn't been checked for validity yet, do so now, and fail completely if either the first or the last ! unrolled copy of the address is not a valid address ! for the instruction that uses it. */ if (v->dest_reg == tem ! && ! verify_addresses (v, giv_inc, unroll_number)) { if (loop_dump_stream) fprintf (loop_dump_stream, ! "Invalid address for giv at insn %d\n", INSN_UID (v->insn)); continue; *************** *** 2728,2732 **** if (loop_dump_stream) fprintf (loop_dump_stream, ! "Illegal init insn, rewritten.\n"); } } --- 2801,2805 ---- if (loop_dump_stream) fprintf (loop_dump_stream, ! "Invalid init insn, rewritten.\n"); } } *************** *** 2736,2749 **** /* Check the resulting address for validity, and fail ! if the resulting address would be illegal. */ ! if (! memory_address_p (v->mem_mode, v->dest_reg) ! || ! memory_address_p (v->mem_mode, ! plus_constant (v->dest_reg, ! INTVAL (giv_inc) * ! (unroll_number -1)))) { if (loop_dump_stream) fprintf (loop_dump_stream, ! "Illegal address for giv at insn %d\n", INSN_UID (v->insn)); continue; --- 2809,2818 ---- /* Check the resulting address for validity, and fail ! if the resulting address would be invalid. */ ! if (! verify_addresses (v, giv_inc, unroll_number)) { if (loop_dump_stream) fprintf (loop_dump_stream, ! "Invalid address for giv at insn %d\n", INSN_UID (v->insn)); continue; *************** *** 3331,3335 **** } ! /* Replace uses of split bivs with their split psuedo register. This is for original instructions which remain after loop unrolling without copying. */ --- 3400,3404 ---- } ! /* Replace uses of split bivs with their split pseudo register. This is for original instructions which remain after loop unrolling without copying. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/varasm.c gcc-2.7.0/varasm.c *** gcc-2.6.3/varasm.c Mon Nov 21 22:22:11 1994 --- gcc-2.7.0/varasm.c Thu Jun 15 08:12:06 1995 *************** *** 1,4 **** /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 35,38 **** --- 36,40 ---- #include "function.h" #include "expr.h" + #include "output.h" #include "hard-reg-set.h" #include "regs.h" *************** *** 42,45 **** --- 44,48 ---- #include "obstack.h" + #include "c-pragma.h" #ifdef XCOFF_DEBUGGING_INFO *************** *** 96,121 **** tree last_assemble_variable_decl; /* Nonzero if at least one function definition has been seen. */ - static int function_defined; ! extern FILE *asm_out_file; ! static char *compare_constant_1 (); ! static void record_constant_1 (); ! static void output_constant_def_contents (); ! static int contains_pointers_p (); ! static void bc_output_ascii (); ! ! void output_constant_pool (); ! void assemble_name (); ! int output_addressed_constants (); ! void output_constant (); ! void output_constructor (); ! void output_byte_asm (); ! void text_section (); ! void readonly_data_section (); ! void data_section (); ! void named_section (); ! static void bc_assemble_integer (); #ifdef EXTRA_SECTIONS --- 99,149 ---- tree last_assemble_variable_decl; + + #ifdef HANDLE_PRAGMA_WEAK + /* Any weak symbol declarations waiting to be emitted. */ + + struct weak_syms + { + struct weak_syms *next; + char *name; + char *value; + }; + + static struct weak_syms *weak_decls; + #endif + /* Nonzero if at least one function definition has been seen. */ ! static int function_defined; ! struct addr_const; ! struct constant_descriptor; ! struct rtx_const; ! struct pool_constant; ! ! static void bc_make_decl_rtl PROTO((tree, char *, int)); ! static char *strip_reg_name PROTO((char *)); ! static void bc_output_ascii PROTO((FILE *, char *, int)); ! static int contains_pointers_p PROTO((tree)); ! static void decode_addr_const PROTO((tree, struct addr_const *)); ! static int const_hash PROTO((tree)); ! static int compare_constant PROTO((tree, ! struct constant_descriptor *)); ! static char *compare_constant_1 PROTO((tree, char *)); ! static struct constant_descriptor *record_constant PROTO((tree)); ! static void record_constant_1 PROTO((tree)); ! static tree copy_constant PROTO((tree)); ! static void output_constant_def_contents PROTO((tree, int, int)); ! static void decode_rtx_const PROTO((enum machine_mode, rtx, ! struct rtx_const *)); ! static int const_hash_rtx PROTO((enum machine_mode, rtx)); ! static int compare_constant_rtx PROTO((enum machine_mode, rtx, ! struct constant_descriptor *)); ! static struct constant_descriptor *record_constant_rtx PROTO((enum machine_mode, ! rtx)); ! static struct pool_constant *find_pool_constant PROTO((rtx)); ! static int output_addressed_constants PROTO((tree)); ! static void bc_assemble_integer PROTO((tree, int)); ! static void output_constructor PROTO((tree, int)); #ifdef EXTRA_SECTIONS *************** *** 204,213 **** } ! /* Tell assembler to change to named section. */ void ! named_section (name) char *name; { if (in_section != in_named || strcmp (name, in_named_name)) { --- 232,250 ---- } ! /* Tell assembler to change to section NAME for DECL. ! If DECL is NULL, just switch to section NAME. ! If NAME is NULL, get the name from DECL. */ void ! named_section (decl, name) ! tree decl; char *name; { + if (decl != NULL_TREE + && (TREE_CODE (decl) != FUNCTION_DECL && TREE_CODE (decl) != VAR_DECL)) + abort (); + if (name == NULL) + name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); + if (in_section != in_named || strcmp (name, in_named_name)) { *************** *** 216,220 **** #ifdef ASM_OUTPUT_SECTION_NAME ! ASM_OUTPUT_SECTION_NAME (asm_out_file, name); #else /* Section attributes are not supported if this macro isn't provided - --- 253,257 ---- #ifdef ASM_OUTPUT_SECTION_NAME ! ASM_OUTPUT_SECTION_NAME (asm_out_file, decl, name); #else /* Section attributes are not supported if this macro isn't provided - *************** *** 225,228 **** --- 262,282 ---- } } + + /* Switch to the section for function DECL. + + If DECL is NULL_TREE, switch to the text section. + ??? It's not clear that we will ever be passed NULL_TREE, but it's + safer to handle it. */ + + void + function_section (decl) + tree decl; + { + if (decl != NULL_TREE + && DECL_SECTION_NAME (decl) != NULL_TREE) + named_section (decl, (char *) 0); + else + text_section (); + } /* Create the rtl to represent a function, for a function definition. *************** *** 283,287 **** TOP_LEVEL is nonzero if this is a file-scope variable. This is never called for PARM_DECLs. */ ! void bc_make_decl_rtl (decl, asmspec, top_level) tree decl; --- 337,342 ---- TOP_LEVEL is nonzero if this is a file-scope variable. This is never called for PARM_DECLs. */ ! ! static void bc_make_decl_rtl (decl, asmspec, top_level) tree decl; *************** *** 501,505 **** else if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl) != NULL_TREE ! && DECL_INITIAL (decl) == NULL_TREE) { warning_with_decl (decl, --- 556,562 ---- else if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl) != NULL_TREE ! && DECL_INITIAL (decl) == NULL_TREE ! && DECL_COMMON (decl) ! && ! flag_no_common) { warning_with_decl (decl, *************** *** 713,720 **** output_constant_pool (fnname, decl); ! if (IN_NAMED_SECTION (decl)) ! named_section (TREE_STRING_POINTER (DECL_SECTION_NAME (decl))); ! else ! text_section (); /* Tell assembler to move to target machine's alignment for functions. */ --- 770,774 ---- output_constant_pool (fnname, decl); ! function_section (decl); /* Tell assembler to move to target machine's alignment for functions. */ *************** *** 749,753 **** { if (!first_global_object_name) ! STRIP_NAME_ENCODING (first_global_object_name, fnname); if (output_bytecode) BC_GLOBALIZE_LABEL (asm_out_file, fnname); --- 803,819 ---- { if (!first_global_object_name) ! { ! char *p; ! ! STRIP_NAME_ENCODING (p, fnname); ! first_global_object_name = permalloc (strlen (p) + 1); ! strcpy (first_global_object_name, p); ! } ! ! #ifdef ASM_WEAKEN_LABEL ! if (DECL_WEAK (decl)) ! ASM_WEAKEN_LABEL (asm_out_file, fnname); ! else ! #endif if (output_bytecode) BC_GLOBALIZE_LABEL (asm_out_file, fnname); *************** *** 905,908 **** --- 971,975 ---- int top_level; int at_end; + int dont_output_data; { register char *name; *************** *** 955,959 **** /* Normally no need to say anything here for external references, ! since assemble_external is called by the langauge-specific code when a declaration is first seen. */ --- 1022,1026 ---- /* Normally no need to say anything here for external references, ! since assemble_external is called by the language-specific code when a declaration is first seen. */ *************** *** 996,1012 **** TREE_ASM_WRITTEN (decl) = 1; ! /* If storage size is erroneously variable, just continue. ! Error message was already made. */ ! if (DECL_SIZE (decl)) { if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) goto finish; - app_disable (); - /* This is better than explicit arithmetic, since it avoids overflow. */ size_tree = size_binop (CEIL_DIV_EXPR, ! DECL_SIZE (decl), size_int (BITS_PER_UNIT)); if (TREE_INT_CST_HIGH (size_tree) != 0) --- 1063,1076 ---- TREE_ASM_WRITTEN (decl) = 1; ! app_disable (); ! if (! dont_output_data) { if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) goto finish; /* This is better than explicit arithmetic, since it avoids overflow. */ size_tree = size_binop (CEIL_DIV_EXPR, ! DECL_SIZE (decl), size_int (BITS_PER_UNIT)); if (TREE_INT_CST_HIGH (size_tree) != 0) *************** *** 1121,1125 **** { if (!first_global_object_name) ! STRIP_NAME_ENCODING(first_global_object_name, name); ASM_GLOBALIZE_LABEL (asm_out_file, name); } --- 1185,1201 ---- { if (!first_global_object_name) ! { ! char *p; ! ! STRIP_NAME_ENCODING (p, name); ! first_global_object_name = permalloc (strlen (p) + 1); ! strcpy (first_global_object_name, p); ! } ! ! #ifdef ASM_WEAKEN_LABEL ! if (DECL_WEAK (decl)) ! ASM_WEAKEN_LABEL (asm_out_file, name); ! else ! #endif ASM_GLOBALIZE_LABEL (asm_out_file, name); } *************** *** 1142,1146 **** /* Switch to the proper section for this data. */ if (IN_NAMED_SECTION (decl)) ! named_section (TREE_STRING_POINTER (DECL_SECTION_NAME (decl))); else { --- 1218,1222 ---- /* Switch to the proper section for this data. */ if (IN_NAMED_SECTION (decl)) ! named_section (decl, NULL); else { *************** *** 1276,1284 **** if (DECL_INITIAL (decl)) /* Output the actual data. */ ! output_constant (DECL_INITIAL (decl), ! int_size_in_bytes (TREE_TYPE (decl))); else /* Leave space for it. */ ! assemble_zeros (int_size_in_bytes (TREE_TYPE (decl))); } --- 1352,1359 ---- if (DECL_INITIAL (decl)) /* Output the actual data. */ ! output_constant (DECL_INITIAL (decl), TREE_INT_CST_LOW (size_tree)); else /* Leave space for it. */ ! assemble_zeros (TREE_INT_CST_LOW (size_tree)); } *************** *** 1362,1367 **** void ! bc_output_constructor (constr) ! tree constr; { int i; --- 1437,1443 ---- void ! bc_output_constructor (constr, size) ! tree constr; ! int size; { int i; *************** *** 1377,1389 **** /* Align */ ! for (i = 0; TYPE_ALIGN (constr) >= BITS_PER_UNIT << (i + 1); i++); if (i > 0) BC_OUTPUT_ALIGN (asm_out_file, i); /* Output data */ ! output_constant (constr, int_size_in_bytes (TREE_TYPE (constr))); } - /* Create storage for constructor CONSTR. */ --- 1453,1466 ---- /* Align */ ! for (i = 0; TYPE_ALIGN (constr) >= BITS_PER_UNIT << (i + 1); i++) ! ; ! if (i > 0) BC_OUTPUT_ALIGN (asm_out_file, i); /* Output data */ ! output_constant (constr, size); } /* Create storage for constructor CONSTR. */ *************** *** 1406,1410 **** } - /* Output something to declare an external symbol to the assembler. (Most assemblers don't need this, so we normally output nothing.) --- 1483,1486 ---- *************** *** 1487,1493 **** --- 1563,1575 ---- { char *real_name; + int save_warn_id_clash = warn_id_clash; STRIP_NAME_ENCODING (real_name, name); + + /* Don't warn about an identifier name length clash on this name, since + it can be a user symbol suffixed by a number. */ + warn_id_clash = 0; TREE_SYMBOL_REFERENCED (get_identifier (real_name)) = 1; + warn_id_clash = save_warn_id_clash; if (name[0] == '*') *************** *** 2090,2094 **** /* Compute a hash code for a constant expression. */ ! int const_hash (exp) tree exp; --- 2172,2176 ---- /* Compute a hash code for a constant expression. */ ! static int const_hash (exp) tree exp; *************** *** 2113,2116 **** --- 2195,2204 ---- return const_hash (TREE_REALPART (exp)) * 5 + const_hash (TREE_IMAGPART (exp)); + else if (code == CONSTRUCTOR && TREE_CODE (TREE_TYPE (exp)) == SET_TYPE) + { + len = int_size_in_bytes (TREE_TYPE (exp)); + p = (char*) alloca (len); + get_set_constructor_bytes (exp, (unsigned char *) p, len); + } else if (code == CONSTRUCTOR) { *************** *** 2238,2241 **** --- 2326,2335 ---- return p; } + else if (code == CONSTRUCTOR && TREE_CODE (TREE_TYPE (exp)) == SET_TYPE) + { + len = int_size_in_bytes (TREE_TYPE (exp)); + strp = (char*) alloca (len); + get_set_constructor_bytes (exp, (unsigned char *) strp, len); + } else if (code == CONSTRUCTOR) { *************** *** 2355,2444 **** obstack_1grow (&permanent_obstack, (unsigned int) code); ! if (code == INTEGER_CST) { obstack_1grow (&permanent_obstack, TYPE_PRECISION (TREE_TYPE (exp))); strp = (char *) &TREE_INT_CST_LOW (exp); len = 2 * sizeof TREE_INT_CST_LOW (exp); ! } ! else if (code == REAL_CST) ! { obstack_1grow (&permanent_obstack, TYPE_PRECISION (TREE_TYPE (exp))); strp = (char *) &TREE_REAL_CST (exp); len = sizeof TREE_REAL_CST (exp); ! } ! else if (code == STRING_CST) ! { if (flag_writable_strings) return; strp = TREE_STRING_POINTER (exp); len = TREE_STRING_LENGTH (exp); obstack_grow (&permanent_obstack, (char *) &TREE_STRING_LENGTH (exp), sizeof TREE_STRING_LENGTH (exp)); ! } ! else if (code == COMPLEX_CST) ! { record_constant_1 (TREE_REALPART (exp)); record_constant_1 (TREE_IMAGPART (exp)); return; - } - else if (code == CONSTRUCTOR) - { - register tree link; - int length = list_length (CONSTRUCTOR_ELTS (exp)); - tree type; - - obstack_grow (&permanent_obstack, (char *) &length, sizeof length); - - /* For record constructors, insist that the types match. - For arrays, just verify both constructors are for arrays. */ - if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE) - type = TREE_TYPE (exp); - else - type = 0; - obstack_grow (&permanent_obstack, (char *) &type, sizeof type); ! /* For arrays, insist that the size in bytes match. */ ! if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE) { ! int size = int_size_in_bytes (TREE_TYPE (exp)); ! obstack_grow (&permanent_obstack, (char *) &size, sizeof size); } ! ! for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link)) { ! if (TREE_VALUE (link)) ! record_constant_1 (TREE_VALUE (link)); else { ! tree zero = 0; ! obstack_grow (&permanent_obstack, (char *) &zero, sizeof zero); } } - return; ! } ! else if (code == ADDR_EXPR) ! { ! struct addr_const value; ! decode_addr_const (exp, &value); ! /* Record the offset. */ ! obstack_grow (&permanent_obstack, ! (char *) &value.offset, sizeof value.offset); ! /* Record the symbol name. */ ! obstack_grow (&permanent_obstack, XSTR (value.base, 0), ! strlen (XSTR (value.base, 0)) + 1); return; ! } ! else if (code == PLUS_EXPR || code == MINUS_EXPR) ! { record_constant_1 (TREE_OPERAND (exp, 0)); record_constant_1 (TREE_OPERAND (exp, 1)); return; ! } ! else if (code == NOP_EXPR || code == CONVERT_EXPR) ! { record_constant_1 (TREE_OPERAND (exp, 0)); return; } --- 2449,2557 ---- obstack_1grow (&permanent_obstack, (unsigned int) code); ! switch (code) { + case INTEGER_CST: obstack_1grow (&permanent_obstack, TYPE_PRECISION (TREE_TYPE (exp))); strp = (char *) &TREE_INT_CST_LOW (exp); len = 2 * sizeof TREE_INT_CST_LOW (exp); ! break; ! ! case REAL_CST: obstack_1grow (&permanent_obstack, TYPE_PRECISION (TREE_TYPE (exp))); strp = (char *) &TREE_REAL_CST (exp); len = sizeof TREE_REAL_CST (exp); ! break; ! ! case STRING_CST: if (flag_writable_strings) return; + strp = TREE_STRING_POINTER (exp); len = TREE_STRING_LENGTH (exp); obstack_grow (&permanent_obstack, (char *) &TREE_STRING_LENGTH (exp), sizeof TREE_STRING_LENGTH (exp)); ! break; ! ! case COMPLEX_CST: record_constant_1 (TREE_REALPART (exp)); record_constant_1 (TREE_IMAGPART (exp)); return; ! case CONSTRUCTOR: ! if (TREE_CODE (TREE_TYPE (exp)) == SET_TYPE) { ! int nbytes = int_size_in_bytes (TREE_TYPE (exp)); ! obstack_grow (&permanent_obstack, &nbytes, sizeof (nbytes)); ! obstack_blank (&permanent_obstack, nbytes); ! get_set_constructor_bytes ! (exp, (unsigned char *) permanent_obstack.next_free, nbytes); ! return; } ! else { ! register tree link; ! int length = list_length (CONSTRUCTOR_ELTS (exp)); ! tree type; ! ! obstack_grow (&permanent_obstack, (char *) &length, sizeof length); ! ! /* For record constructors, insist that the types match. ! For arrays, just verify both constructors are for arrays. */ ! if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE) ! type = TREE_TYPE (exp); else + type = 0; + obstack_grow (&permanent_obstack, (char *) &type, sizeof type); + + /* For arrays, insist that the size in bytes match. */ + if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE) { ! int size = int_size_in_bytes (TREE_TYPE (exp)); ! obstack_grow (&permanent_obstack, (char *) &size, sizeof size); ! } ! ! for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link)) ! { ! if (TREE_VALUE (link)) ! record_constant_1 (TREE_VALUE (link)); ! else ! { ! tree zero = 0; ! obstack_grow (&permanent_obstack, ! (char *) &zero, sizeof zero); ! } } } return; ! ! case ADDR_EXPR: ! { ! struct addr_const value; ! ! decode_addr_const (exp, &value); ! /* Record the offset. */ ! obstack_grow (&permanent_obstack, ! (char *) &value.offset, sizeof value.offset); ! /* Record the symbol name. */ ! obstack_grow (&permanent_obstack, XSTR (value.base, 0), ! strlen (XSTR (value.base, 0)) + 1); ! } return; ! ! case PLUS_EXPR: ! case MINUS_EXPR: record_constant_1 (TREE_OPERAND (exp, 0)); record_constant_1 (TREE_OPERAND (exp, 1)); return; ! ! case NOP_EXPR: ! case CONVERT_EXPR: ! case NON_LVALUE_EXPR: record_constant_1 (TREE_OPERAND (exp, 0)); return; + + default: + abort (); } *************** *** 2505,2514 **** switch (TREE_CODE (exp)) { case INTEGER_CST: case REAL_CST: case STRING_CST: - case ADDR_EXPR: - /* For ADDR_EXPR, we do not want to copy the decl - whose address is requested. */ return copy_node (exp); --- 2618,2633 ---- switch (TREE_CODE (exp)) { + case ADDR_EXPR: + /* For ADDR_EXPR, we do not want to copy the decl whose address + is requested. We do want to copy constants though. */ + if (TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (exp, 0))) == 'c') + return build1 (TREE_CODE (exp), TREE_TYPE (exp), + copy_constant (TREE_OPERAND (exp, 0))); + else + return copy_node (exp); + case INTEGER_CST: case REAL_CST: case STRING_CST: return copy_node (exp); *************** *** 2537,2540 **** --- 2656,2662 ---- for (tail = list; tail; tail = TREE_CHAIN (tail)) TREE_VALUE (tail) = copy_constant (TREE_VALUE (tail)); + if (TREE_CODE (TREE_TYPE (exp)) == SET_TYPE) + for (tail = list; tail; tail = TREE_CHAIN (tail)) + TREE_PURPOSE (tail) = copy_constant (TREE_PURPOSE (tail)); return copy; *************** *** 2674,2678 **** if (IN_NAMED_SECTION (exp)) ! named_section (TREE_STRING_POINTER (DECL_SECTION_NAME (exp))); else { --- 2796,2800 ---- if (IN_NAMED_SECTION (exp)) ! named_section (exp, NULL); else { *************** *** 2795,2799 **** } ! /* Save and restore it for a nested function. */ void --- 2917,2921 ---- } ! /* Save and restore status for a nested function. */ void *************** *** 2933,2937 **** /* Compute a hash code for a constant RTL expression. */ ! int const_hash_rtx (mode, x) enum machine_mode mode; --- 3055,3059 ---- /* Compute a hash code for a constant RTL expression. */ ! static int const_hash_rtx (mode, x) enum machine_mode mode; *************** *** 3283,3287 **** Indicate whether an ADDR_EXPR has been encountered. */ ! int output_addressed_constants (exp) tree exp; --- 3405,3409 ---- Indicate whether an ADDR_EXPR has been encountered. */ ! static int output_addressed_constants (exp) tree exp; *************** *** 3335,3354 **** return reloc; } - - - /* Output assembler for byte constant */ - void - output_byte_asm (byte) - int byte; - { - if (output_bytecode) - bc_emit_const ((char *) &byte, sizeof (char)); - #ifdef ASM_OUTPUT_BYTE - else - { - ASM_OUTPUT_BYTE (asm_out_file, byte); - } - #endif - } /* Output assembler code for constant EXP to FILE, with no label. --- 3457,3460 ---- *************** *** 3383,3393 **** /* Eliminate the NON_LVALUE_EXPR_EXPR that makes a cast not be an lvalue. That way we get the constant (we hope) inside it. Also, strip off any ! NOP_EXPR that converts between two record, union, or array types. */ while ((TREE_CODE (exp) == NOP_EXPR && (TREE_TYPE (exp) == TREE_TYPE (TREE_OPERAND (exp, 0)) ! || TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE ! || TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE ! || TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE ! || TREE_CODE (TREE_TYPE (exp)) == QUAL_UNION_TYPE)) || TREE_CODE (exp) == NON_LVALUE_EXPR) exp = TREE_OPERAND (exp, 0); --- 3489,3496 ---- /* Eliminate the NON_LVALUE_EXPR_EXPR that makes a cast not be an lvalue. That way we get the constant (we hope) inside it. Also, strip off any ! NOP_EXPR that converts between two record, union, array, or set types. */ while ((TREE_CODE (exp) == NOP_EXPR && (TREE_TYPE (exp) == TREE_TYPE (TREE_OPERAND (exp, 0)) ! || AGGREGATE_TYPE_P (TREE_TYPE (exp)))) || TREE_CODE (exp) == NON_LVALUE_EXPR) exp = TREE_OPERAND (exp, 0); *************** *** 3469,3472 **** --- 3572,3591 ---- abort (); return; + + case SET_TYPE: + if (TREE_CODE (exp) == INTEGER_CST) + assemble_integer (expand_expr (exp, NULL_RTX, + VOIDmode, EXPAND_INITIALIZER), + size, 1); + else if (TREE_CODE (exp) == CONSTRUCTOR) + { + unsigned char *buffer = (unsigned char *) alloca (size); + if (get_set_constructor_bytes (exp, buffer, size)) + abort (); + assemble_string ((char *) buffer, size); + } + else + error ("unknown set constructor type"); + return; } *************** *** 3475,3480 **** } - /* Bytecode specific code to output assembler for integer. */ static void bc_assemble_integer (exp, size) --- 3594,3599 ---- } /* Bytecode specific code to output assembler for integer. */ + static void bc_assemble_integer (exp, size) *************** *** 3547,3561 **** else if (size == 8) { ! #if WORDS_BIG_ENDIAN ! int i = TREE_INT_CST_HIGH (const_part); ! bc_emit ((char *) &i, 4); ! i = TREE_INT_CST_LOW (const_part); ! bc_emit ((char *) &i, 4); ! #else ! int i = TREE_INT_CST_LOW (const_part); ! bc_emit ((char *) &i, 4); ! i = TREE_INT_CST_HIGH (const_part); ! bc_emit ((char *) &i, 4); ! #endif size -= 8; } --- 3666,3683 ---- else if (size == 8) { ! if (WORDS_BIG_ENDIAN) ! { ! int i = TREE_INT_CST_HIGH (const_part); ! bc_emit ((char *) &i, 4); ! i = TREE_INT_CST_LOW (const_part); ! bc_emit ((char *) &i, 4); ! } ! else ! { ! int i = TREE_INT_CST_LOW (const_part); ! bc_emit ((char *) &i, 4); ! i = TREE_INT_CST_HIGH (const_part); ! bc_emit ((char *) &i, 4); ! } size -= 8; } *************** *** 3574,3578 **** Generate at least SIZE bytes, padding if necessary. */ ! void output_constructor (exp, size) tree exp; --- 3696,3700 ---- Generate at least SIZE bytes, padding if necessary. */ ! static void output_constructor (exp, size) tree exp; *************** *** 3743,3747 **** { int this_time; ! int shift, value; int next_byte = next_offset / BITS_PER_UNIT; int next_bit = next_offset % BITS_PER_UNIT; --- 3865,3870 ---- { int this_time; ! int shift; ! HOST_WIDE_INT value; int next_byte = next_offset / BITS_PER_UNIT; int next_bit = next_offset % BITS_PER_UNIT; *************** *** 3760,3821 **** this_time = MIN (end_offset - next_offset, BITS_PER_UNIT - next_bit); ! #if BYTES_BIG_ENDIAN ! /* On big-endian machine, take the most significant bits ! first (of the bits that are significant) ! and put them into bytes from the most significant end. */ ! shift = end_offset - next_offset - this_time; ! /* Don't try to take a bunch of bits that cross ! the word boundary in the INTEGER_CST. */ ! if (shift < HOST_BITS_PER_WIDE_INT ! && shift + this_time > HOST_BITS_PER_WIDE_INT) ! { ! this_time -= (HOST_BITS_PER_WIDE_INT - shift); ! shift = HOST_BITS_PER_WIDE_INT; ! } ! ! /* Now get the bits from the appropriate constant word. */ ! if (shift < HOST_BITS_PER_WIDE_INT) ! { ! value = TREE_INT_CST_LOW (val); ! } ! else if (shift < 2 * HOST_BITS_PER_WIDE_INT) { ! value = TREE_INT_CST_HIGH (val); ! shift -= HOST_BITS_PER_WIDE_INT; } else - abort (); - byte |= (((value >> shift) - & (((HOST_WIDE_INT) 1 << this_time) - 1)) - << (BITS_PER_UNIT - this_time - next_bit)); - #else - /* On little-endian machines, - take first the least significant bits of the value - and pack them starting at the least significant - bits of the bytes. */ - shift = (next_offset - - TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field))); - /* Don't try to take a bunch of bits that cross - the word boundary in the INTEGER_CST. */ - if (shift < HOST_BITS_PER_WIDE_INT - && shift + this_time > HOST_BITS_PER_WIDE_INT) { ! this_time -= (HOST_BITS_PER_WIDE_INT - shift); ! shift = HOST_BITS_PER_WIDE_INT; } - - /* Now get the bits from the appropriate constant word. */ - if (shift < HOST_BITS_PER_INT) - value = TREE_INT_CST_LOW (val); - else if (shift < 2 * HOST_BITS_PER_WIDE_INT) - { - value = TREE_INT_CST_HIGH (val); - shift -= HOST_BITS_PER_WIDE_INT; - } - else - abort (); - byte |= ((value >> shift) - & (((HOST_WIDE_INT) 1 << this_time) - 1)) << next_bit; - #endif next_offset += this_time; byte_buffer_in_use = 1; --- 3883,3948 ---- this_time = MIN (end_offset - next_offset, BITS_PER_UNIT - next_bit); ! if (BYTES_BIG_ENDIAN) { ! /* On big-endian machine, take the most significant bits ! first (of the bits that are significant) ! and put them into bytes from the most significant end. */ ! shift = end_offset - next_offset - this_time; ! /* Don't try to take a bunch of bits that cross ! the word boundary in the INTEGER_CST. */ ! if (shift < HOST_BITS_PER_WIDE_INT ! && shift + this_time > HOST_BITS_PER_WIDE_INT) ! { ! this_time -= (HOST_BITS_PER_WIDE_INT - shift); ! shift = HOST_BITS_PER_WIDE_INT; ! } ! ! /* Now get the bits from the appropriate constant word. */ ! if (shift < HOST_BITS_PER_WIDE_INT) ! { ! value = TREE_INT_CST_LOW (val); ! } ! else if (shift < 2 * HOST_BITS_PER_WIDE_INT) ! { ! value = TREE_INT_CST_HIGH (val); ! shift -= HOST_BITS_PER_WIDE_INT; ! } ! else ! abort (); ! byte |= (((value >> shift) ! & (((HOST_WIDE_INT) 1 << this_time) - 1)) ! << (BITS_PER_UNIT - this_time - next_bit)); } else { ! /* On little-endian machines, ! take first the least significant bits of the value ! and pack them starting at the least significant ! bits of the bytes. */ ! shift = (next_offset ! - TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field))); ! /* Don't try to take a bunch of bits that cross ! the word boundary in the INTEGER_CST. */ ! if (shift < HOST_BITS_PER_WIDE_INT ! && shift + this_time > HOST_BITS_PER_WIDE_INT) ! { ! this_time -= (HOST_BITS_PER_WIDE_INT - shift); ! shift = HOST_BITS_PER_WIDE_INT; ! } ! ! /* Now get the bits from the appropriate constant word. */ ! if (shift < HOST_BITS_PER_INT) ! value = TREE_INT_CST_LOW (val); ! else if (shift < 2 * HOST_BITS_PER_WIDE_INT) ! { ! value = TREE_INT_CST_HIGH (val); ! shift -= HOST_BITS_PER_WIDE_INT; ! } ! else ! abort (); ! byte |= (((value >> shift) ! & (((HOST_WIDE_INT) 1 << this_time) - 1)) ! << next_bit); } next_offset += this_time; byte_buffer_in_use = 1; *************** *** 3832,3883 **** } - - #ifdef HANDLE_SYSV_PRAGMA - - /* Support #pragma weak by default if WEAK_ASM_OP and ASM_OUTPUT_DEF - are defined. */ - #if defined (WEAK_ASM_OP) && defined (ASM_OUTPUT_DEF) - - /* See c-pragma.c for an identical definition. */ - enum pragma_state - { - ps_start, - ps_done, - ps_bad, - ps_weak, - ps_name, - ps_equals, - ps_value, - ps_pack, - ps_left, - ps_align, - ps_right - }; - /* Output asm to handle ``#pragma weak'' */ void ! handle_pragma_weak (what, asm_out_file, name, value) enum pragma_state what; - FILE *asm_out_file; char *name, *value; { if (what == ps_name || what == ps_value) { ! fprintf (asm_out_file, "\t%s\t", WEAK_ASM_OP); ! if (output_bytecode) ! BC_OUTPUT_LABELREF (asm_out_file, name); else ! ASM_OUTPUT_LABELREF (asm_out_file, name); ! fputc ('\n', asm_out_file); ! if (what == ps_value) ! ASM_OUTPUT_DEF (asm_out_file, name, value); } else if (! (what == ps_done || what == ps_start)) warning ("malformed `#pragma weak'"); } ! #endif /* HANDLE_PRAGMA_WEAK or (WEAK_ASM_OP and SET_ASM_OP) */ ! #endif /* WEAK_ASM_OP && ASM_OUTPUT_DEF */ --- 3959,4055 ---- } /* Output asm to handle ``#pragma weak'' */ void ! handle_pragma_weak (what, name, value) enum pragma_state what; char *name, *value; { + #ifdef HANDLE_PRAGMA_WEAK if (what == ps_name || what == ps_value) { ! struct weak_syms *weak = ! (struct weak_syms *)permalloc (sizeof (struct weak_syms)); ! weak->next = weak_decls; ! weak->name = permalloc (strlen (name) + 1); ! strcpy (weak->name, name); ! if (what != ps_value) ! weak->value = NULL_PTR; ! else ! { ! weak->value = permalloc (strlen (value) + 1); ! strcpy (weak->value, value); ! } ! weak_decls = weak; } else if (! (what == ps_done || what == ps_start)) warning ("malformed `#pragma weak'"); + #endif /* HANDLE_PRAGMA_WEAK */ + } + + /* Declare DECL to be a weak symbol. */ + + void + declare_weak (decl) + tree decl; + { + if (! TREE_PUBLIC (decl)) + error_with_decl (decl, "weak declaration of `%s' must be public"); + else if (TREE_ASM_WRITTEN (decl)) + error_with_decl (decl, "weak declaration of `%s' must precede definition"); + else if (SUPPORTS_WEAK) + DECL_WEAK (decl) = 1; } ! /* Emit any pending weak declarations. */ ! void ! weak_finish () ! { ! #ifdef HANDLE_PRAGMA_WEAK ! if (HANDLE_PRAGMA_WEAK) ! { ! struct weak_syms *t; ! for (t = weak_decls; t; t = t->next) ! { ! ASM_WEAKEN_LABEL (asm_out_file, t->name); ! if (t->value) ! ASM_OUTPUT_DEF (asm_out_file, t->name, t->value); ! } ! } ! #endif ! } ! ! void ! assemble_alias (decl, target) ! tree decl, target; ! { ! #ifdef ASM_OUTPUT_DEF ! char *name; ! ! make_decl_rtl (decl, (char*)0, 1); ! name = XSTR (XEXP (DECL_RTL (decl), 0), 0); ! ! /* Make name accessible from other files, if appropriate. */ ! ! if (TREE_PUBLIC (decl)) ! { ! #ifdef ASM_WEAKEN_LABEL ! if (DECL_WEAK (decl)) ! ASM_WEAKEN_LABEL (asm_out_file, name); ! else ! #endif ! if (output_bytecode) ! BC_GLOBALIZE_LABEL (asm_out_file, name); ! else ! ASM_GLOBALIZE_LABEL (asm_out_file, name); ! } ! ! ASM_OUTPUT_DEF (asm_out_file, name, IDENTIFIER_POINTER (target)); ! TREE_ASM_WRITTEN (decl) = 1; ! #else ! warning ("alias definitions not supported in this configuration"); ! #endif ! } diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/version.c gcc-2.7.0/version.c *** gcc-2.6.3/version.c Mon Nov 14 18:12:47 1994 --- gcc-2.7.0/version.c Thu Jun 15 17:38:00 1995 *************** *** 1 **** ! char *version_string = "2.6.3"; --- 1 ---- ! char *version_string = "2.7.0"; diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/vmsconfig.com gcc-2.7.0/vmsconfig.com *** gcc-2.6.3/vmsconfig.com Mon Jul 11 15:29:01 1994 --- gcc-2.7.0/vmsconfig.com Fri May 19 06:57:02 1995 *************** *** 7,10 **** --- 7,11 ---- $ ! $set symbol/scope=(nolocal,noglobal) + $if f$trnlnm("IFILE$").nes."" then close/noLog ifile$ $ ! $ echo = "write sys$output" *************** *** 62,69 **** $ echo "Linked `config-vax.h' to `[.config.vax]vax.h' for `tm.h'." $ ! ! $ if f$search("md.") .nes. "" then delete md..* ! $ copy [.config.vax]vax.md []md. ! $ echo "Linked `md' to `[.config.vax]vax.md'. $ ! $ if f$search("aux-output.c") .nes. "" then delete aux-output.c.* $ copy [.config.vax]vax.c []aux-output.c --- 63,74 ---- $ echo "Linked `config-vax.h' to `[.config.vax]vax.h' for `tm.h'." $ ! ! $ call make_lang_incl "options.h" $ ! + $ call make_lang_incl "specs.h" + $ ! + $ if f$search("vax.md") .nes. "" then delete vax.md;* + $ copy [.config.vax]vax.md []vax.md + $ echo "Copied `vax.md' from `[.config.vax]vax.md'." + $ ! $ if f$search("aux-output.c") .nes. "" then delete aux-output.c.* $ copy [.config.vax]vax.c []aux-output.c *************** *** 121,347 **** $! $echo "Now processing Makefile.in to generate linker option files." ! $edit/tpu/nojournal/nosection/nodisplay/command=sys$input ! PROCEDURE generate_option_file (TAG_NAME, outfile) ! position (beginning_of (newbuffer)); ! recursive_fetch_tag (TAG_NAME); ! ! ! ! Now fix up a few things in the output buffer ! ! ! pat_replace ("bytecode "," "); ! pat_replace (".o ",","); ! pat_replace (".o",""); !appear at end of lines. ! ! ! ! Remove trailing commas, if present. ! ! ! position (beginning_of (newbuffer)); ! LOOP ! range1 := search_quietly("," & ((SPAN(" ") & LINE_END) | LINE_END), ! FORWARD, EXACT); ! exitif range1 = 0; ! position (beginning_of (range1)); ! erase(range1); ! split_line; ! ENDLOOP; ! ! get rid of leading spaces on lines. ! position (beginning_of (current_buffer)) ; ! LOOP ! range1 := search_quietly ( LINE_BEGIN & " ", FORWARD, EXACT) ; ! EXITIF range1 = 0; ! position (end_of (range1)); ! erase_character(1); ! ENDLOOP; ! ! ! ! Now write the output file. ! ! ! SET(OUTPUT_FILE, newbuffer, outfile); ! write_file (newbuffer); ! erase (newbuffer); ! ENDPROCEDURE; ! ! ! ! Looks up a tag, copies it to newbuffer, and then translates any $(...) ! ! definitions that appear. The translation is put at the current point. ! ! ! PROCEDURE recursive_fetch_tag (TAG_N); ! fetch_tag (TAG_N); ! ! ! ! substitute any makefile symbols $(...) ! ! ! position (beginning_of (current_buffer)) ; ! LOOP ! range1 := search_quietly ("$(" & SPAN("abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ#~0123456789") ! & ")", FORWARD, EXACT) ; ! EXITIF range1 = 0; ! position (beginning_of (range1)); ! move_horizontal(2); ! mark_1 := MARK (NONE); ! position (end_of (range1)); ! move_horizontal(-1); ! mark_2 := MARK (NONE); ! tag_range := CREATE_RANGE(MARK_1, MARK_2, NONE); ! position (end_of (range1)); ! tag_string := STR (tag_range); ! erase (range1); ! fetch_tag (LINE_BEGIN & tag_string & ((SPAN(" ") & "=") | "=")); ! position (beginning_of (current_buffer)) ; ! ENDLOOP; ! ENDPROCEDURE; ! ! ! ! Looks up the translation of a tag, and inserts it at the current location ! ! in the buffer ! ! ! PROCEDURE fetch_tag (TAG_N); ! LOCAL mark1, mark2, mark3, range2; ! mark3 := MARK(NONE) ; ! position (beginning_of (mainbuffer)) ; ! range2 := search_quietly (TAG_N, FORWARD, EXACT) ; ! IF (range2 = 0) then ! position (mark3); ! return; ! endif; ! position (end_of (range2)) ; ! MOVE_HORIZONTAL(1); ! mark1 := MARK(NONE) ; ! position (beginning_of (range2)) ; ! MOVE_VERTICAL(1); ! MOVE_HORIZONTAL(-2); ! LOOP ! EXITIF CURRENT_CHARACTER <> "\" ; ! ERASE_CHARACTER(1); ! MOVE_HORIZONTAL(1); ! MOVE_VERTICAL(1); ! MOVE_HORIZONTAL(-2); ! ENDLOOP; ! MOVE_HORIZONTAL(1); ! mark2 := MARK(NONE) ; ! range2 := CREATE_RANGE(mark1, mark2, NONE) ; ! position (mark3); ! if (length(range2) = 0) then return; endif; ! copy_text(range2); ! ENDPROCEDURE; ! ! PROCEDURE pat_replace ( ! oldstring, ! ! newstring) ! ! LOCAL range2; ! position (beginning_of (current_buffer)) ; ! LOOP ! range2 := search_quietly (oldstring, FORWARD, EXACT) ; ! EXITIF range2 = 0 ; ! position (beginning_of (range2)) ; ! erase (range2) ; ! copy_text (newstring) ; ! ENDLOOP ; ! ENDPROCEDURE ; ! ! ! ! ! ! ...fix this... ! ! ! ! ! procedure temporary_cplusplus_hack() ! position(end_of(compiler_list)); ! copy_text("cc1plus"); ! position(end_of(mainbuffer)); ! copy_text("cc1plus: [.cp]call,[.cp]decl,[.cp]errfn,[.cp]expr,[.cp]pt,[.cp]sig\"); split_line; ! copy_text(" [.cp]typeck2,[.cp]class,[.cp]decl2,[.cp]error,[.cp]gc,[.cp]lex\"); split_line; ! copy_text(" [.cp]parse,[.cp]ptree,[.cp]spew,[.cp]typeck,[.cp]cvt,[.cp]edsel\"); split_line; ! copy_text(" [.cp]except,[.cp]init,[.cp]method,[.cp]search,[.cp]tree,[.cp]xref\"); split_line; ! copy_text(" []c-common\"); split_line; ! copy_text(" bc-emit,bc-optab\"); split_line; ! copy_text(" obstack"); split_line; ! endprocedure; ! ! ! ! this is the start of the main procedure ! filename := GET_INFO (COMMAND_LINE, 'file_name') ; ! mainbuffer := CREATE_BUFFER ("Makefile.in", "Makefile.in") ; ! newbuffer := CREATE_BUFFER("outfile"); ! compiler_list := CREATE_BUFFER("compilers"); ! ! ! ! Add to this list, as required. The file "Makefile.in" is searched for a ! ! tag that looks like "LINE_BEGIN + 'tag + (optional space) + "="". The ! ! contents are assumed to be a list of object files, and from this list a ! ! VMS linker options file is generated. ! ! ! position (beginning_of (compiler_list)); ! recursive_fetch_tag(LINE_BEGIN & "COMPILERS" & ((SPAN(" ") & "=") | "=")); ! position (beginning_of (compiler_list)); ! LOOP ! kill leading spaces. ! exitif current_character <> " "; ! erase_character(1); ! ENDLOOP; ! position (beginning_of (compiler_list)); ! LOOP ! remove any double spaces. ! range1 := search_quietly (" ", FORWARD, EXACT) ; EXITIF range1 = 0 ; ! position (beginning_of (range1)) ; ! erase_character(1); ! ENDLOOP ; ! position (end_of (compiler_list)); ! move_horizontal(-1); ! LOOP ! kill trailing spaces. ! exitif current_character <> " "; ! erase_character(1); ! move_horizontal(-1); ! ENDLOOP; ! position (beginning_of (compiler_list)); ! LOOP ! range1 := search_quietly (" ", FORWARD, EXACT) ; ! EXITIF range1 = 0 ; ! position (beginning_of (range1)) ; ! erase (range1) ; ! split_line; ! ENDLOOP ; ! ! ! ! ! This needs to be fixed. ! ! ! ! ! temporary_cplusplus_hack(); ! ! ! ! We now have a list of supported compilers. Now write it, and use it. ! ! ! SET(OUTPUT_FILE, compiler_list, "compilers.list"); ! write_file (compiler_list); ! generate_option_file(LINE_BEGIN & "OBJS" & ((SPAN(" ") & "=") | "="), ! "independent.opt"); ! generate_option_file(LINE_BEGIN & "LIB2FUNCS" & ((SPAN(" ") & "=") | "="), ! "libgcc2.list"); ! generate_option_file(LINE_BEGIN & "BC_ALL" & ((SPAN(" ") & "=") | "="), ! "bc_all.opt"); ! generate_option_file(LINE_BEGIN & "BI_OBJ" & ((SPAN(" ") & "=") | "="), ! "bi_all.opt"); ! ! ! Now change OBJS in the Makefile, so each language specific options file ! ! does not pick up all of the language independent files. ! ! position (beginning_of (mainbuffer)); ! range1 := search_quietly (LINE_BEGIN & "OBJS" & ((SPAN(" ") & "=") | "="), ! FORWARD, EXACT) ; ! position (end_of (range1)); ! split_line; ! position (beginning_of (compiler_list)); ! LOOP ! cmark := mark(NONE); ! exitif cmark = end_of(compiler_list); ! message(current_line); ! generate_option_file(LINE_BEGIN & current_line & ((SPAN(" ") & ":") | ":"), ! current_line+"-objs.opt"); ! position (cmark); ! move_vertical(1); ! ENDLOOP ; ! quit ; $ echo "" $! $! Remove excessive versions of the option files... $! ! $ purge *.opt ! $ purge compilers.list,libgcc2.list $! $! $! $ if f$search("config.status") .nes. "" then delete config.status.* ! $ open/write file config.status ! $ write file "Links are now set up for use with a vax running VMS." ! $ close file $ type config.status $ echo "" --- 126,474 ---- $! $echo "Now processing Makefile.in to generate linker option files." ! $edit/TPU/noJournal/noSection/noDisplay/Command=sys$input: Makefile.in ! !! ! VARIABLE makefile_buf, opt_file_buf, complist_buf, extra_compilers; ! Globals. ! !! ! PROCEDURE process_makefile( ) ! ! ! ! Interpret Makefile.in and subsidiary Make-lang.in templates. ! ! ! LOCAL range1, cmark, makefilename; ! ! makefilename := GET_INFO (COMMAND_LINE, 'FILE_NAME'); ! "Makefile.in" ! makefile_buf := CREATE_BUFFER ("makefile", makefilename); ! opt_file_buf := CREATE_BUFFER ("opt_file"); ! complist_buf := CREATE_BUFFER ("complist"); ! extra_compilers := CREATE_ARRAY; ! ! ! SET (NO_WRITE, makefile_buf, ON); ! Used as workspace; don't save it. ! SET (OUTPUT_FILE, complist_buf, "compilers.list"); ! ! ! ! Make some textual substitutions. ! ! ! configure_makefile (); ! ! ! ! Collect a list of supported compilers (``COMPILERS=xxx'' macro). ! ! ! identify_compilers (); ! ! ! ! Plus other known compilers described by Make-lang.in makefile fragments. ! ! Add new entries as needed; args are (target name, subdirectory name). ! ! ! additional_compiler ("cc1plus", "cp"); ! ! ! WRITE_FILE (complist_buf); ! Now save "compilers.list". ! ! ! ! Add to this list, as required. The file "Makefile.in" is searched for ! ! a tag that looks like "LINE_BEGIN + 'tag + (optional space) + "="". ! ! The contents are assumed to be a list of object files, and from this ! ! list a VMS linker options file is generated. ! ! ! generate_option_file ("OBJS", "=", "independent.opt"); ! generate_option_file ("LIB2FUNCS", "=", "libgcc2.list"); ! generate_option_file ("BC_ALL", "=", "bc_all.list"); ! generate_option_file ("BI_OBJ", "=", "bi_all.opt"); ! ! ! ! Now change OBJS in the Makefile, so each language specific options file ! ! does not pick up all of the language independent files. ! ! ! POSITION (BEGINNING_OF (makefile_buf)); ! COPY_TEXT ("OBJS="); ! New copy with empty value, seen before real OBJS. ! SPLIT_LINE; ! ! ! ! Lastly, process each compiler-specific object dependency list. ! ! ! POSITION (BEGINNING_OF (complist_buf)); ! LOOP ! cmark := MARK (NONE); ! EXITIF (cmark = END_OF (complist_buf)); ! ! The current line contains the name of a compiler target, such as "cc1". ! MESSAGE (CURRENT_LINE); ! Give some interactive feedback. ! generate_option_file (CURRENT_LINE, ":", CURRENT_LINE + "-objs.opt"); ! POSITION (cmark); ! MOVE_VERTICAL (1); ! Go to the next line. ! ENDLOOP; ! ENDPROCEDURE; !process_makefile ! !! ! ! PROCEDURE process_objc_lib( ) ! ! ! ! Intrepret objc/Makefile, after finishing the top makefile. ! ! ! ON_ERROR ! [TPU$_OPENIN]: ! MESSAGE ("Cannot load objc/Makefile for ""ObjClib""; skipping it."); ! RETURN; ! ENDON_ERROR; ! ! ERASE (makefile_buf); !discard top Makefile ! POSITION (END_OF (makefile_buf)); ! READ_FILE ("[.objc]Makefile"); !load objc one ! MESSAGE ("objclib"); ! pat_replace (ASCII(9), " "); !change any to ! generate_option_file ("OBJC_O", "=", "objc-objs.opt"); ! POSITION (BEGINNING_OF (makefile_buf)); ! ! Join any continuation lines; we want the header list to be one line. ! pat_replace ("\" & LINE_END, ); ! generate_option_file ("OBJC_H", "=", "objc-hdrs.list"); ! ENDPROCEDURE; !process_objc_lib ! !! ! ! PROCEDURE configure_makefile( ) ! ! ! ! Plug in some values normally handled by `configure'. Rather than ! ! replacing the dummy entries, insert the real entries before them. ! ! ! POSITION (BEGINNING_OF (makefile_buf)); ! COPY_TEXT ("target=vax-vms"); SPLIT_LINE; ! COPY_TEXT ("out_file=aux-output.c"); SPLIT_LINE; ! vax/vax.c ! COPY_TEXT ("out_object_file=aux-output.o"); SPLIT_LINE; ! aux-output.obj ! COPY_TEXT ("md_file=vax.md"); SPLIT_LINE; ! vax/vax.md ! COPY_TEXT ("tm_file=tm.h"); SPLIT_LINE; ! vax/tm-vms.h ! ENDPROCEDURE; !configure_makefile ! !! ! ! PROCEDURE identify_compilers( ) ! ! ! ! Retrieve the list of supported compilers from Makefile.in, and put them ! ! into file "compilers.list", one per line, for subsequent access from DCL. ! ! ! LOCAL range1; ! ! ! Strip most comments from the makefile, to speed up subsequent processing. ! POSITION (BEGINNING_OF (makefile_buf)); ! pat_replace (LINE_BEGIN & "#" & REMAIN & LINE_END, ); ! !# ! Convert directory references to VMS syntax (actually, just strip it). ! !# pat_replace (" $(srcdir)/", " "); ! ! Look up the ``COMPILERS=cc1 xyzzy'' Makefile macro and put ! ! its ``cc1 xyzzy'' value into the compilers buffer. ! POSITION (BEGINNING_OF (complist_buf)); ! !#--at some point we may want to add this-- ! !# recursive_fetch_tag ("CCCP", "="); ! Include the preprocessor. ! !# POSITION (END_OF (complist_buf)); ! recursive_fetch_tag ("COMPILERS", "="); ! ! Convert all spaces into newlines, then remove any blank lines. ! pat_replace (SPAN(" "), LINE_END); ! pat_replace (LINE_BEGIN & LINE_END, ); ! ENDPROCEDURE; !identify_compilers ! !! ! ! PROCEDURE additional_compiler( cname, subdir ) ! ! ! ! Load Make-lang.in for compiler CNAME from SUBDIR and append it to the ! ! end of Makefile.in's buffer. Add CNAME to the "compilers.list" buffer. ! ! ! ON_ERROR ! ! Don't abort if user removes the supporting subdirectory for a ! ! language she's not interested in. ! [TPU$_OPENIN]: ! MESSAGE ("Cannot load " + subdir + "/Make-lang.in for " ! + '"' + cname + '"' + "; skipping it."); ! RETURN; ! ENDON_ERROR; ! ! POSITION (END_OF (makefile_buf)); ! SPLIT_LINE; ! Separate with a blank line. ! READ_FILE ("[." + subdir + "]Make-lang.in"); ! Load Makefile fragment. ! ! Make sure that $(xxx_OTH_SRCS) expands to empty string by renaming $(it) ! pat_replace ("_OTH_SRCS)", "_OTH_SRCS_dummy_)"); ! ! Convert subdirectory references into VMS syntax. ! pat_replace ("$(srcdir)/" + subdir + "/", "[." + subdir + "]"); ! ! Add this name to compilers.list. ! POSITION (END_OF (complist_buf)); ! COPY_TEXT (cname); ! ! Make array entry indexed by compiler's file name; its value is arbitrary. ! extra_compilers{cname} := subdir; ! ENDPROCEDURE; !additional_compiler ! !! ! ! PROCEDURE generate_option_file( tag_name, punct, outfile_name ) ! ! ! ! Produce a file listing the names of particular object files, for use ! ! as input to the linker and also for use in finding source names by ! ! make-cc1.com. Generally, any name suffix will be suppressed. ! ! ! LOCAL range1, range2; ! ! POSITION (BEGINNING_OF (opt_file_buf)); ! recursive_fetch_tag (tag_name, punct); ! ! First fix up for subdirectory/Make-lang.in. ! IF (pat_replace ("stamp-objlist" & (SPAN(" ")|LINE_END), " ") > 0) THEN ! recursive_fetch_tag ("stamp-objlist", ":"); ! ENDIF; ! ! Now fix up a few things in the output buffer. ! pat_replace (("bytecode"|"Makefile") & (SPAN(" ")|LINE_END), " "); ! !# FILL (CURRENT_BUFFER, " ", 1, 80, 0); ! Condense things a bit. ! pat_replace ("." & ("o"|"c"|"y") & ((SPAN(" ")&LINE_END)|LINE_END), LINE_END); ! pat_replace ("." & ("o"|"c"|"y") & SPAN(" "), ","); ! pat_replace (".h" & (SPAN(" ")|LINE_END), ".h,"); ! ! Remove trailing commas, if present. ! pat_replace ("," & ((SPAN(" ")&LINE_END)|LINE_END), LINE_END); ! ! Get rid of spaces and blank lines. ! pat_replace (SPAN(" "), LINE_END); ! pat_replace (LINE_BEGIN & LINE_END, ); ! ! Second fix up for subdirectory/Make-lang.in; ! ! avoid "sticky defaults" when linker processes the resulting options file. ! IF (extra_compilers{outfile_name - "-objs.opt"} <> TPU$K_UNSPECIFIED) THEN ! POSITION (BEGINNING_OF (opt_file_buf)); ! range1 := CREATE_RANGE (MARK (NONE), END_OF (CURRENT_BUFFER), NONE); ! LOOP ! range2 := SEARCH_QUIETLY (LINE_BEGIN | ",", FORWARD, EXACT, range1); ! EXITIF (range2 = 0); ! POSITION (BEGINNING_OF (range2)); ! IF (CURRENT_CHARACTER = ",") THEN MOVE_HORIZONTAL (1); ENDIF; ! ! If it's not already "[.subdir]name", explicitly make it "[]name". ! IF (CURRENT_CHARACTER <> "[") THEN COPY_TEXT ("[]"); ENDIF; ! MOVE_HORIZONTAL (1); ! MODIFY_RANGE (range1, MARK (NONE), END_OF (range1)); ! ENDLOOP; ! ENDIF; ! ! Now write the output file. ! SET (OUTPUT_FILE, opt_file_buf, outfile_name); ! WRITE_FILE (opt_file_buf); ! ERASE (opt_file_buf); ! Clear buffer out for next opt_file pass. ! ENDPROCEDURE; !generate_option_file ! !! ! ! PROCEDURE recursive_fetch_tag( tag_n, punct ) ! ! ! ! Look up TAG_N, copy it to OPT_FILE_BUF, and then translate any $(...) ! ! definitions that appear. The translation is put at the current point. ! ! ! LOCAL mark1, mark2, range1, tag_range, tag_string; ! ! fetch_tag (tag_n, punct); ! ! Substitute any makefile symbols $(...). ! POSITION (BEGINNING_OF (CURRENT_BUFFER)); ! LOOP ! range1 := SEARCH_QUIETLY ("$(" & SPAN("abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ#~0123456789") ! & ")", FORWARD, EXACT); ! EXITIF (range1 = 0); ! POSITION (BEGINNING_OF (range1)); ! MOVE_HORIZONTAL (2); ! Past opening "$(". ! mark1 := MARK (NONE); ! POSITION (END_OF (range1)); ! MOVE_HORIZONTAL (-1); ! In front of closing ")". ! mark2 := MARK (NONE); ! tag_range := CREATE_RANGE (mark1, mark2, NONE); ! POSITION (END_OF (range1)); ! tag_string := STR (tag_range); ! ERASE (range1); ! fetch_tag (tag_string, "="); ! POSITION (BEGINNING_OF (CURRENT_BUFFER)); ! ENDLOOP; ! ENDPROCEDURE; !recursive_fetch_tag ! !! ! PROCEDURE fetch_tag( tag_n, punct ) ! ! ! ! Looks up the translation of a tag, and inserts it at the current location ! ! in the buffer. ! ! ! LOCAL mark0, mark1, mark2, range2; + mark0 := MARK (NONE); ! Remember where we started; restore before return. + POSITION (BEGINNING_OF (makefile_buf)); + ! The tag definition always starts in the first column, and might have + ! optional space(es) before "=" or ":" punctuation. + range2 := SEARCH_QUIETLY (LINE_BEGIN & tag_n & ((SPAN(" ") & punct) | punct), + FORWARD, EXACT); + IF (range2 = 0) THEN + POSITION (mark0); + RETURN; + ENDIF; + POSITION (END_OF (range2)); + MOVE_HORIZONTAL (1); ! Move beyond "TAG=". + mark1 := MARK (NONE); + POSITION (BEGINNING_OF (range2)); + LOOP + MOVE_VERTICAL (1); + MOVE_HORIZONTAL (-2); + EXITIF (CURRENT_CHARACTER <> "\"); + ERASE_CHARACTER (1); + MOVE_HORIZONTAL (1); + ENDLOOP; + MOVE_HORIZONTAL (1); + mark2 := MARK (NONE); + range2 := CREATE_RANGE (mark1, mark2, NONE); + POSITION (mark0); + IF (LENGTH (range2) <> 0) THEN + COPY_TEXT (range2); + ENDIF; + ENDPROCEDURE; !fetch_tag + !! ! PROCEDURE pat_replace( oldstring, newstring ) ! ! ! ! Replace all occurrences of a pattern. ! ! ! LOCAL range1, range2, kill_it, count; ! ! count := 0; ! kill_it := (GET_INFO (newstring, 'TYPE') = UNSPECIFIED); ! Omitted arg. ! range1 := CREATE_RANGE (BEGINNING_OF (CURRENT_BUFFER), ! END_OF (CURRENT_BUFFER), NONE); ! LOOP ! range2 := SEARCH_QUIETLY (oldstring, FORWARD, EXACT, range1); ! EXITIF (range2 = 0); ! count := count + 1; ! POSITION (BEGINNING_OF (range2)); ! ERASE (range2); ! IF (newstring = LINE_END) THEN ! SPLIT_LINE; ! ELSE IF (NOT kill_it) THEN ! COPY_TEXT (newstring); ! ENDIF; ENDIF; ! MODIFY_RANGE (range1, MARK (NONE), END_OF (range1)); ! ENDLOOP; ! RETURN count; ! ENDPROCEDURE; !pat_replace ! !! ! ! ! ! This is the main routine. ! ! process_makefile (); ! process_objc_lib (); !this uses a different makefile ! QUIT; ! All done; don't write any modified buffers. ! !! $ echo "" $! $! Remove excessive versions of the option files... $! ! $ purge *.opt,*.list $! $! $! $ if f$search("config.status") .nes. "" then delete config.status.* ! $ create config.status ! Links are now set up for use with a vax running VMS. $ type config.status $ echo "" + $! + $ exit + $ + $! + $! Constuct a header file based on subdirectory contents + $! + $make_lang_incl: subroutine + $ if f$search(p1).nes."" then delete 'p1';* + $ create 'p1' !empty file with ordinary text-file attributes + $ open/Append ifile$ 'p1' + $ write ifile$ "/* ''p1' */" + $ hfile = f$search("[]''p1'") + $ topdir = f$parse(hfile,,,"DIRECTORY") - "]" + $lang_incl_loop: + $ hfile = f$search("[.*]lang-''p1'") + $ if hfile.eqs."" then goto lang_incl_done + $ dir = f$parse(hfile,,,"DIRECTORY") - "]" + $! convert absolute path to relative one, yielding "[.subdir]" + $ dir = "[" + f$edit(dir - topdir,"LOWERCASE") + "]" + $ write ifile$ "#include ""''dir'lang-''p1'""" + $ goto lang_incl_loop + $lang_incl_done: + $ close ifile$ + $ echo "Created `''p1''." + $ endsubroutine !make_lang_incl diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/xcoffout.c gcc-2.7.0/xcoffout.c *** gcc-2.6.3/xcoffout.c Tue May 31 20:18:04 1994 --- gcc-2.7.0/xcoffout.c Thu Jun 15 08:12:30 1995 *************** *** 1,4 **** /* Output xcoff-format symbol table information from GNU compiler. ! Copyright (C) 1992 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Output xcoff-format symbol table information from GNU compiler. ! Copyright (C) 1992, 1994 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 16,20 **** 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. */ --- 16,21 ---- 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, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ *************** *** 144,157 **** /* Handle built-in C types here. */ ! assign_type_number (syms, "int", -1); assign_type_number (syms, "char", -2); assign_type_number (syms, "short int", -3); ! assign_type_number (syms, "long int", -4); assign_type_number (syms, "unsigned char", -5); assign_type_number (syms, "signed char", -6); assign_type_number (syms, "short unsigned int", -7); ! assign_type_number (syms, "unsigned int", -8); /* No such type "unsigned". */ ! assign_type_number (syms, "long unsigned int", -10); assign_type_number (syms, "void", -11); assign_type_number (syms, "float", -12); --- 145,158 ---- /* Handle built-in C types here. */ ! assign_type_number (syms, "int", (TARGET_64BIT ? -31 : -1)); assign_type_number (syms, "char", -2); assign_type_number (syms, "short int", -3); ! assign_type_number (syms, "long int", (TARGET_64BIT ? -31 : -4)); assign_type_number (syms, "unsigned char", -5); assign_type_number (syms, "signed char", -6); assign_type_number (syms, "short unsigned int", -7); ! assign_type_number (syms, "unsigned int", (TARGET_64BIT ? -32 : -8)); /* No such type "unsigned". */ ! assign_type_number (syms, "long unsigned int", (TARGET_64BIT ? -32 : -10)); assign_type_number (syms, "void", -11); assign_type_number (syms, "float", -12); *************** *** 159,167 **** assign_type_number (syms, "long double", -14); /* Pascal and Fortran types run from -15 to -29. */ ! /* No such type "wchar". */ - /* "long long int", and "long long unsigned int", are not handled here, - because there are no predefined types that match them. */ - /* ??? Should also handle built-in C++ and Obj-C types. There perhaps aren't any that C doesn't already have. */ --- 160,168 ---- assign_type_number (syms, "long double", -14); /* Pascal and Fortran types run from -15 to -29. */ ! assign_type_number (syms, "wchar", -30); ! assign_type_number (syms, "long long int", -31); ! assign_type_number (syms, "long long unsigned int", -32); ! /* Additional Fortran types run from -33 to -37. */ /* ??? Should also handle built-in C++ and Obj-C types. There perhaps aren't any that C doesn't already have. */ *************** *** 484,488 **** } ! /* Any pending .bi or .ei must occur before the .function psuedo op. Otherwise debuggers will think that the function is in the previous file and/or at the wrong line number. */ --- 485,489 ---- } ! /* Any pending .bi or .ei must occur before the .function pseudo op. Otherwise debuggers will think that the function is in the previous file and/or at the wrong line number. */ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c -x TAGS -x gcc.?? -x gcc.??s -x gcc.aux -x gcc.info* -x cpp.?? -x cpp.??s -x cpp.aux -x cpp.info* -x cp/parse.c -x cp/parse.h gcc-2.6.3/xcoffout.h gcc-2.7.0/xcoffout.h *** gcc-2.6.3/xcoffout.h Tue May 31 20:18:08 1994 --- gcc-2.7.0/xcoffout.h Tue May 16 07:44:51 1995 *************** *** 146,150 **** We don't actually do this here, because the assembler gets confused if there is more than one .file directive. ASM_FILE_START in config/rs6000/rs6000.h ! is already emitting a .file direcgtory, so we don't output one here also. Initialize xcoff_lastfile. */ #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \ --- 146,150 ---- We don't actually do this here, because the assembler gets confused if there is more than one .file directive. ASM_FILE_START in config/rs6000/rs6000.h ! is already emitting a .file directory, so we don't output one here also. Initialize xcoff_lastfile. */ #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \